All of lore.kernel.org
 help / color / mirror / Atom feed
From: dgilbert@interlog.com (Douglas Gilbert)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] rtc: rtc-at91rm9200: use a variable for storing IMR
Date: Tue, 26 Mar 2013 17:09:59 -0400	[thread overview]
Message-ID: <51520EA7.8090808@interlog.com> (raw)
In-Reply-To: <20130326192713.GA31628@localhost>

On 13-03-26 03:27 PM, Johan Hovold wrote:
> On Fri, Mar 15, 2013 at 06:37:12PM +0100, Nicolas Ferre wrote:
>> On some revisions of AT91 SoCs, the RTC IMR register is not working.
>> Instead of elaborating a workaround for that specific SoC or IP version,
>> we simply use a software variable to store the Interrupt Mask Register and
>> modify it for each enabling/disabling of an interrupt. The overhead of this
>> is negligible anyway.
>
> The patch does not add any memory barriers or register read-backs when
> manipulating the interrupt-mask variable. This could possibly lead to
> spurious interrupts both when enabling and disabling the various
> RTC-interrupts due to write reordering and bus latencies.
>
> Has this been considered? And is this reason enough for a more targeted
> work-around so that the SOCs with functional RTC_IMR are not affected?

The SoCs in question use a single embedded ARM926EJ-S and
according to the Atmel documentation, that CPU's instruction
set contains no barrier (or related) instructions.

In the arch/arm/mach-at91 sub-tree of the kernel source
I can find no use of the wmb() call. Also checked all drivers
in the kernel containing "at91" and none called wmb().

Doug Gilbert

WARNING: multiple messages have this Message-ID (diff)
From: Douglas Gilbert <dgilbert@interlog.com>
To: Johan Hovold <jhovold@gmail.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
	Ludovic Desroches <ludovic.desroches@atmel.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtc: rtc-at91rm9200: use a variable for storing IMR
Date: Tue, 26 Mar 2013 17:09:59 -0400	[thread overview]
Message-ID: <51520EA7.8090808@interlog.com> (raw)
In-Reply-To: <20130326192713.GA31628@localhost>

On 13-03-26 03:27 PM, Johan Hovold wrote:
> On Fri, Mar 15, 2013 at 06:37:12PM +0100, Nicolas Ferre wrote:
>> On some revisions of AT91 SoCs, the RTC IMR register is not working.
>> Instead of elaborating a workaround for that specific SoC or IP version,
>> we simply use a software variable to store the Interrupt Mask Register and
>> modify it for each enabling/disabling of an interrupt. The overhead of this
>> is negligible anyway.
>
> The patch does not add any memory barriers or register read-backs when
> manipulating the interrupt-mask variable. This could possibly lead to
> spurious interrupts both when enabling and disabling the various
> RTC-interrupts due to write reordering and bus latencies.
>
> Has this been considered? And is this reason enough for a more targeted
> work-around so that the SOCs with functional RTC_IMR are not affected?

The SoCs in question use a single embedded ARM926EJ-S and
according to the Atmel documentation, that CPU's instruction
set contains no barrier (or related) instructions.

In the arch/arm/mach-at91 sub-tree of the kernel source
I can find no use of the wmb() call. Also checked all drivers
in the kernel containing "at91" and none called wmb().

Doug Gilbert


  reply	other threads:[~2013-03-26 21:09 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15 17:37 [PATCH] rtc: rtc-at91rm9200: use a variable for storing IMR Nicolas Ferre
2013-03-15 17:37 ` Nicolas Ferre
2013-03-20 21:50 ` Andrew Morton
2013-03-20 21:50   ` Andrew Morton
2013-03-21  1:15   ` Douglas Gilbert
2013-03-21  1:15     ` Douglas Gilbert
2013-03-21 21:33     ` Andrew Morton
2013-03-21 21:33       ` Andrew Morton
2013-03-21  9:46   ` Nicolas Ferre
2013-03-21  9:46     ` Nicolas Ferre
2013-03-26 19:27 ` Johan Hovold
2013-03-26 19:27   ` Johan Hovold
2013-03-26 21:09   ` Douglas Gilbert [this message]
2013-03-26 21:09     ` Douglas Gilbert
2013-03-28  9:57     ` Johan Hovold
2013-03-28  9:57       ` Johan Hovold
2013-03-28 16:16       ` Nicolas Ferre
2013-03-28 16:16         ` Nicolas Ferre
2013-03-29 15:57         ` Johan Hovold
2013-03-29 15:57           ` Johan Hovold
2013-03-28 18:20       ` Douglas Gilbert
2013-03-28 18:20         ` Douglas Gilbert
2013-03-29 15:45         ` Nicolas Ferre
2013-03-29 15:45           ` Nicolas Ferre
2013-03-29 16:01         ` Johan Hovold
2013-03-29 16:01           ` Johan Hovold

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=51520EA7.8090808@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=linux-arm-kernel@lists.infradead.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.