All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tero Kristo <t-kristo@ti.com>
To: Paul Walmsley <paul@pwsan.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>,
	tony@atomide.com, linux-omap@vger.kernel.org, nsekhar@ti.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 0/3] ARM: OMAP2+: hwmod: RTC: Add lock and unlock hooks
Date: Thu, 16 Jul 2015 10:09:23 +0300	[thread overview]
Message-ID: <55A758A3.2070108@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1507160014371.32764@utopia.booyaka.com>

On 07/16/2015 03:15 AM, Paul Walmsley wrote:
> On Tue, 14 Jul 2015, Tero Kristo wrote:
>
>> On 07/14/2015 01:09 PM, Lokesh Vutla wrote:
>>> Hi,
>>> On Wednesday 10 June 2015 02:56 PM, Lokesh Vutla wrote:
>>>> Some IP blocks like RTC, needs an additional unlocking mechanism for
>>>> writing to its registers. This patch adds optional lock and unlock
>>>> function pointers to the IP block's hwmod data which gets executed
>>>> before and after writing into IP sysconfig register.
>>>> And also hook lock and unlock functions to AMx3xx, DRA7 RTC hwmod data,
>>>> so that sysconfig registers are updated properly.
>>> ping on this series.
>>>
>>> Thanks and regards,
>>> Lokesh
>>
>
> [...]
>
>> It is also racy, as there is no locking in place to avoid concurrent access to
>> the lock/unlock registers across hwmod+driver.
>
> I don't see the race.  Where is it?

See drivers/rtc/rtc-omap.c, am3352_rtc_unlock and am3352_rtc_lock.

That code is accessing the exact same registers.

-Tero

WARNING: multiple messages have this Message-ID (diff)
From: t-kristo@ti.com (Tero Kristo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/3] ARM: OMAP2+: hwmod: RTC: Add lock and unlock hooks
Date: Thu, 16 Jul 2015 10:09:23 +0300	[thread overview]
Message-ID: <55A758A3.2070108@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1507160014371.32764@utopia.booyaka.com>

On 07/16/2015 03:15 AM, Paul Walmsley wrote:
> On Tue, 14 Jul 2015, Tero Kristo wrote:
>
>> On 07/14/2015 01:09 PM, Lokesh Vutla wrote:
>>> Hi,
>>> On Wednesday 10 June 2015 02:56 PM, Lokesh Vutla wrote:
>>>> Some IP blocks like RTC, needs an additional unlocking mechanism for
>>>> writing to its registers. This patch adds optional lock and unlock
>>>> function pointers to the IP block's hwmod data which gets executed
>>>> before and after writing into IP sysconfig register.
>>>> And also hook lock and unlock functions to AMx3xx, DRA7 RTC hwmod data,
>>>> so that sysconfig registers are updated properly.
>>> ping on this series.
>>>
>>> Thanks and regards,
>>> Lokesh
>>
>
> [...]
>
>> It is also racy, as there is no locking in place to avoid concurrent access to
>> the lock/unlock registers across hwmod+driver.
>
> I don't see the race.  Where is it?

See drivers/rtc/rtc-omap.c, am3352_rtc_unlock and am3352_rtc_lock.

That code is accessing the exact same registers.

-Tero

  reply	other threads:[~2015-07-16  7:09 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-10  9:26 [PATCH 0/3] ARM: OMAP2+: hwmod: RTC: Add lock and unlock hooks Lokesh Vutla
2015-06-10  9:26 ` Lokesh Vutla
2015-06-10  9:26 ` [PATCH 1/3] ARM: OMAP2+: hwmod: add support for " Lokesh Vutla
2015-06-10  9:26   ` Lokesh Vutla
2015-07-16  0:07   ` Paul Walmsley
2015-07-16  0:07     ` Paul Walmsley
2015-06-10  9:26 ` [PATCH 2/3] ARM: DRA: hwmod: RTC: Add lock and unlock functions Lokesh Vutla
2015-06-10  9:26   ` Lokesh Vutla
2015-07-16  0:13   ` Paul Walmsley
2015-07-16  0:13     ` Paul Walmsley
2015-07-16 12:34     ` Lokesh Vutla
2015-07-16 12:34       ` Lokesh Vutla
2015-06-10  9:26 ` [PATCH 3/3] ARM: AMx3xx: " Lokesh Vutla
2015-06-10  9:26   ` Lokesh Vutla
2015-07-16  0:14   ` Paul Walmsley
2015-07-16  0:14     ` Paul Walmsley
2015-07-16 12:28     ` Lokesh Vutla
2015-07-16 12:28       ` Lokesh Vutla
2015-07-14 10:09 ` [PATCH 0/3] ARM: OMAP2+: hwmod: RTC: Add lock and unlock hooks Lokesh Vutla
2015-07-14 10:09   ` Lokesh Vutla
2015-07-14 14:51   ` Tero Kristo
2015-07-14 14:51     ` Tero Kristo
2015-07-16  0:15     ` Paul Walmsley
2015-07-16  0:15       ` Paul Walmsley
2015-07-16  7:09       ` Tero Kristo [this message]
2015-07-16  7:09         ` Tero Kristo
2015-07-16 10:13         ` Paul Walmsley
2015-07-16 10:13           ` Paul Walmsley
2015-07-16 12:03           ` Tero Kristo
2015-07-16 12:03             ` Tero Kristo
2015-07-16 12:26             ` Lokesh Vutla
2015-07-16 12:26               ` Lokesh Vutla

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=55A758A3.2070108@ti.com \
    --to=t-kristo@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=lokeshvutla@ti.com \
    --cc=nsekhar@ti.com \
    --cc=paul@pwsan.com \
    --cc=tony@atomide.com \
    /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.