All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Andre Przywara <andre.przywara@arm.com>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Cc: "linux@vger.kernel.org" <linux@vger.kernel.org>,
	Russell King <linux@arm.linux.org.uk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.cz>
Subject: Re: [RFC PATCH 1/1] drivers: introduce ARM SBSA generic UART driver
Date: Fri, 05 Sep 2014 11:24:52 -0400	[thread overview]
Message-ID: <5409D5C4.5000905@hurleysoftware.com> (raw)
In-Reply-To: <5409CC61.1040709@arm.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: peter@hurleysoftware.com (Peter Hurley)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 1/1] drivers: introduce ARM SBSA generic UART driver
Date: Fri, 05 Sep 2014 11:24:52 -0400	[thread overview]
Message-ID: <5409D5C4.5000905@hurleysoftware.com> (raw)
In-Reply-To: <5409CC61.1040709@arm.com>

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

  reply	other threads:[~2014-09-05 15:25 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-29 16:13 [RFC PATCH 0/1] ARM SBSA UART driver Andre Przywara
2014-08-29 16:13 ` Andre Przywara
2014-08-29 16:13 ` [RFC PATCH 1/1] drivers: introduce ARM SBSA generic " Andre Przywara
2014-08-29 16:13   ` Andre Przywara
2014-08-29 18:59   ` Arnd Bergmann
2014-08-29 18:59     ` Arnd Bergmann
2014-08-29 23:10     ` Andre Przywara
2014-08-29 23:10       ` Andre Przywara
2014-09-02 19:51       ` Arnd Bergmann
2014-09-02 19:51         ` Arnd Bergmann
2014-09-05 14:11         ` Andre Przywara
2014-09-05 14:11           ` Andre Przywara
2014-09-05 14:11           ` Andre Przywara
2014-09-02  3:06   ` Rob Herring
2014-09-02  3:06     ` Rob Herring
2014-09-02 10:06     ` Andre Przywara
2014-09-02 10:06       ` Andre Przywara
2014-09-02 10:46       ` Mark Rutland
2014-09-02 10:46         ` Mark Rutland
2014-09-02 10:46         ` Mark Rutland
2014-09-02 13:20       ` Rob Herring
2014-09-02 13:20         ` Rob Herring
2014-09-02 13:48         ` Arnd Bergmann
2014-09-02 13:48           ` Arnd Bergmann
2014-09-02 17:38           ` Rob Herring
2014-09-02 17:38             ` Rob Herring
2014-09-02 19:34             ` Arnd Bergmann
2014-09-02 19:34               ` Arnd Bergmann
2014-09-05 14:27               ` Andre Przywara
2014-09-05 14:27                 ` Andre Przywara
2014-09-05 14:37             ` Andre Przywara
2014-09-05 14:37               ` Andre Przywara
2014-09-02 18:19   ` Peter Hurley
2014-09-02 18:19     ` Peter Hurley
2014-09-05 14:44     ` Andre Przywara
2014-09-05 14:44       ` Andre Przywara
2014-09-05 15:24       ` Peter Hurley [this message]
2014-09-05 15:24         ` Peter Hurley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5409D5C4.5000905@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=andre.przywara@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.