From mboxrd@z Thu Jan 1 00:00:00 1970 From: peter@hurleysoftware.com (Peter Hurley) Date: Fri, 05 Sep 2014 11:24:52 -0400 Subject: [RFC PATCH 1/1] drivers: introduce ARM SBSA generic UART driver In-Reply-To: <5409CC61.1040709@arm.com> References: <1409328803-1953-1-git-send-email-andre.przywara@arm.com> <1409328803-1953-2-git-send-email-andre.przywara@arm.com> <54060A4B.2050504@hurleysoftware.com> <5409CC61.1040709@arm.com> Message-ID: <5409D5C4.5000905@hurleysoftware.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 09/05/2014 10:44 AM, Andre Przywara wrote: > On 02/09/14 19:19, Peter Hurley wrote: >> On 08/29/2014 12:13 PM, Andre Przywara wrote: >>> +static void >>> +sbsa_uart_set_termios(struct uart_port *port, struct ktermios *termios, >>> + struct ktermios *old) >>> +{ >>> + unsigned long flags; >>> + unsigned int baud = 115200; >>> + >>> + spin_lock_irqsave(&port->lock, flags); >> ^^^^^^^^^^^^^^^^^ >> >> Can be spin_lock_irq(&port->lock) here. > > Why is this? Because this code cannot be called with interrupts already > off? Yes. > This would apply to the original PL011 driver also then? Also, yes. I mentioned it because new code should use the spin_lock_irq() flavor [primarily as a visual aid for driver authors]. Regards, Peter Hurley