From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
Will Deacon <Will.Deacon@arm.com>
Subject: Re: [PATCH V3] ARM: GIC: Convert GIC library to use the IO relaxed operations
Date: Tue, 03 May 2011 15:44:53 +0530 [thread overview]
Message-ID: <4DBFD59D.50008@ti.com> (raw)
In-Reply-To: <1304417481.19196.60.camel@e102109-lin.cambridge.arm.com>
On 5/3/2011 3:41 PM, Catalin Marinas wrote:
[...]
>> diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
>> index e9c2ff8..80b3d3c 100644
>> --- a/arch/arm/common/gic.c
>> +++ b/arch/arm/common/gic.c
>> @@ -89,7 +89,8 @@ static void gic_mask_irq(struct irq_data *d)
>> u32 mask = 1<< (d->irq % 32);
>>
>> spin_lock(&irq_controller_lock);
>> - writel(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4);
>> + writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4);
>> + readl_relaxed(gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4);
>
> As I commented on the version 2 of this patch, I don't think we should
> even bother with the additional readl_relaxed() here. It's not enough to
> prevent spurious interrupts anyway.
>
I forgot to drop this one.
>> @@ -392,6 +393,7 @@ void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
>> unsigned long map = *cpus_addr(*mask);
>>
>> /* this always happens on GIC0 */
>> - writel(map<< 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT);
>> + dsb();
>> + writel_relaxed(map<< 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT);
>
> I would add a comment before the dsb() on why it is needed. Maybe something like:
>
> /*
> * Ensure that stores to Normal memory are visible to the other CPUs before
> * issuing the IPI.
> */
>
>
> Otherwise the patch looks fine (I'll add my ack after you fix the above).
>
Thanks. Will add above comment, drop the readl and repost with your ack.
Same will push it the patch system
Regards
Santosh
WARNING: multiple messages have this Message-ID (diff)
From: santosh.shilimkar@ti.com (Santosh Shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V3] ARM: GIC: Convert GIC library to use the IO relaxed operations
Date: Tue, 03 May 2011 15:44:53 +0530 [thread overview]
Message-ID: <4DBFD59D.50008@ti.com> (raw)
In-Reply-To: <1304417481.19196.60.camel@e102109-lin.cambridge.arm.com>
On 5/3/2011 3:41 PM, Catalin Marinas wrote:
[...]
>> diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
>> index e9c2ff8..80b3d3c 100644
>> --- a/arch/arm/common/gic.c
>> +++ b/arch/arm/common/gic.c
>> @@ -89,7 +89,8 @@ static void gic_mask_irq(struct irq_data *d)
>> u32 mask = 1<< (d->irq % 32);
>>
>> spin_lock(&irq_controller_lock);
>> - writel(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4);
>> + writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4);
>> + readl_relaxed(gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4);
>
> As I commented on the version 2 of this patch, I don't think we should
> even bother with the additional readl_relaxed() here. It's not enough to
> prevent spurious interrupts anyway.
>
I forgot to drop this one.
>> @@ -392,6 +393,7 @@ void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
>> unsigned long map = *cpus_addr(*mask);
>>
>> /* this always happens on GIC0 */
>> - writel(map<< 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT);
>> + dsb();
>> + writel_relaxed(map<< 16 | irq, gic_data[0].dist_base + GIC_DIST_SOFTINT);
>
> I would add a comment before the dsb() on why it is needed. Maybe something like:
>
> /*
> * Ensure that stores to Normal memory are visible to the other CPUs before
> * issuing the IPI.
> */
>
>
> Otherwise the patch looks fine (I'll add my ack after you fix the above).
>
Thanks. Will add above comment, drop the readl and repost with your ack.
Same will push it the patch system
Regards
Santosh
next prev parent reply other threads:[~2011-05-03 10:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 6:22 [PATCH V3] ARM: GIC: Convert GIC library to use the IO relaxed operations Santosh Shilimkar
2011-04-29 6:22 ` Santosh Shilimkar
2011-05-03 10:11 ` Catalin Marinas
2011-05-03 10:11 ` Catalin Marinas
2011-05-03 10:14 ` Santosh Shilimkar [this message]
2011-05-03 10:14 ` Santosh Shilimkar
2011-05-04 11:02 ` Santosh Shilimkar
2011-05-04 11:02 ` Santosh Shilimkar
2011-05-04 17:04 ` Will Deacon
2011-05-04 17:04 ` Will Deacon
2011-05-05 6:03 ` Santosh Shilimkar
2011-05-05 6:03 ` Santosh Shilimkar
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=4DBFD59D.50008@ti.com \
--to=santosh.shilimkar@ti.com \
--cc=Will.Deacon@arm.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@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.