* [PATCH] arm: omap: make wakeupgen_lock raw
@ 2012-12-07 14:49 Felipe Balbi
2013-01-24 18:22 ` Felipe Balbi
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2012-12-07 14:49 UTC (permalink / raw)
To: Tony Lindgren
Cc: Linux OMAP Mailing List, Linux ARM Kernel Mailing List,
Thomas Gleixner, Felipe Balbi
From: Thomas Gleixner <tglx@linutronix.de>
When applying RT patch on top of Linux, spinlocks are
implemented as RT-mutexes, which means they are preemptable.
Current GIC implementation on OMAP is using a spinlock
to protect against preemption. As it turns out, we need
to convert that lock into a raw_spinlock so that OMAP's
interrupt controller works as expected after RT-patch
is applied.
This patch is simply to decrease the amount of changes
RT-team needs to carry out of tree. It doesn't cause any
changes in behavior.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
---
Thomas, all I did here was take the patch from v3.6.2-rt21
patchset, apply to current Linus' tree (v3.7-rc8) and compile
test with our omap2plus_defconfig.
If you think the commit log I wrong is lacking, please suggest
changes and I will fix it up. Just thought this is the kind of
patch which can go to mainline today and decrease the amount of
patches out-of-tree regarding RT support.
cheers
arch/arm/mach-omap2/omap-wakeupgen.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
index 5d3b4f4..8633a43 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -46,7 +46,7 @@
static void __iomem *wakeupgen_base;
static void __iomem *sar_base;
-static DEFINE_SPINLOCK(wakeupgen_lock);
+static DEFINE_RAW_SPINLOCK(wakeupgen_lock);
static unsigned int irq_target_cpu[MAX_IRQS];
static unsigned int irq_banks = MAX_NR_REG_BANKS;
static unsigned int max_irqs = MAX_IRQS;
@@ -134,9 +134,9 @@ static void wakeupgen_mask(struct irq_data *d)
{
unsigned long flags;
- spin_lock_irqsave(&wakeupgen_lock, flags);
+ raw_spin_lock_irqsave(&wakeupgen_lock, flags);
_wakeupgen_clear(d->irq, irq_target_cpu[d->irq]);
- spin_unlock_irqrestore(&wakeupgen_lock, flags);
+ raw_spin_unlock_irqrestore(&wakeupgen_lock, flags);
}
/*
@@ -146,9 +146,9 @@ static void wakeupgen_unmask(struct irq_data *d)
{
unsigned long flags;
- spin_lock_irqsave(&wakeupgen_lock, flags);
+ raw_spin_lock_irqsave(&wakeupgen_lock, flags);
_wakeupgen_set(d->irq, irq_target_cpu[d->irq]);
- spin_unlock_irqrestore(&wakeupgen_lock, flags);
+ raw_spin_unlock_irqrestore(&wakeupgen_lock, flags);
}
#ifdef CONFIG_HOTPLUG_CPU
@@ -189,7 +189,7 @@ static void wakeupgen_irqmask_all(unsigned int cpu, unsigned int set)
{
unsigned long flags;
- spin_lock_irqsave(&wakeupgen_lock, flags);
+ raw_spin_lock_irqsave(&wakeupgen_lock, flags);
if (set) {
_wakeupgen_save_masks(cpu);
_wakeupgen_set_all(cpu, WKG_MASK_ALL);
@@ -197,7 +197,7 @@ static void wakeupgen_irqmask_all(unsigned int cpu, unsigned int set)
_wakeupgen_set_all(cpu, WKG_UNMASK_ALL);
_wakeupgen_restore_masks(cpu);
}
- spin_unlock_irqrestore(&wakeupgen_lock, flags);
+ raw_spin_unlock_irqrestore(&wakeupgen_lock, flags);
}
#endif
--
1.8.0.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: omap: make wakeupgen_lock raw
2012-12-07 14:49 [PATCH] arm: omap: make wakeupgen_lock raw Felipe Balbi
@ 2013-01-24 18:22 ` Felipe Balbi
2013-01-25 7:51 ` Santosh Shilimkar
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2013-01-24 18:22 UTC (permalink / raw)
To: Felipe Balbi
Cc: Tony Lindgren, Linux OMAP Mailing List,
Linux ARM Kernel Mailing List, Thomas Gleixner
[-- Attachment #1: Type: text/plain, Size: 766 bytes --]
Hi,
On Fri, Dec 07, 2012 at 04:49:47PM +0200, Felipe Balbi wrote:
> From: Thomas Gleixner <tglx@linutronix.de>
>
> When applying RT patch on top of Linux, spinlocks are
> implemented as RT-mutexes, which means they are preemptable.
>
> Current GIC implementation on OMAP is using a spinlock
> to protect against preemption. As it turns out, we need
> to convert that lock into a raw_spinlock so that OMAP's
> interrupt controller works as expected after RT-patch
> is applied.
>
> This patch is simply to decrease the amount of changes
> RT-team needs to carry out of tree. It doesn't cause any
> changes in behavior.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
ping
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: omap: make wakeupgen_lock raw
2013-01-24 18:22 ` Felipe Balbi
@ 2013-01-25 7:51 ` Santosh Shilimkar
2013-02-01 22:38 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: Santosh Shilimkar @ 2013-01-25 7:51 UTC (permalink / raw)
To: balbi, Tony Lindgren
Cc: Thomas Gleixner, Linux OMAP Mailing List,
Linux ARM Kernel Mailing List
On Thursday 24 January 2013 11:52 PM, Felipe Balbi wrote:
> Hi,
>
> On Fri, Dec 07, 2012 at 04:49:47PM +0200, Felipe Balbi wrote:
>> From: Thomas Gleixner <tglx@linutronix.de>
>>
>> When applying RT patch on top of Linux, spinlocks are
>> implemented as RT-mutexes, which means they are preemptable.
>>
>> Current GIC implementation on OMAP is using a spinlock
>> to protect against preemption. As it turns out, we need
>> to convert that lock into a raw_spinlock so that OMAP's
>> interrupt controller works as expected after RT-patch
>> is applied.
>>
>> This patch is simply to decrease the amount of changes
>> RT-team needs to carry out of tree. It doesn't cause any
>> changes in behavior.
>>
>> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>> Signed-off-by: Felipe Balbi <balbi@ti.com>
>
Sorry i missed this patch. Tony can you please
pick it up?
For the patch,
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: omap: make wakeupgen_lock raw
2013-01-25 7:51 ` Santosh Shilimkar
@ 2013-02-01 22:38 ` Tony Lindgren
0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2013-02-01 22:38 UTC (permalink / raw)
To: Santosh Shilimkar
Cc: balbi, Thomas Gleixner, Linux OMAP Mailing List,
Linux ARM Kernel Mailing List
* Santosh Shilimkar <santosh.shilimkar@ti.com> [130124 23:54]:
> On Thursday 24 January 2013 11:52 PM, Felipe Balbi wrote:
> >Hi,
> >
> >On Fri, Dec 07, 2012 at 04:49:47PM +0200, Felipe Balbi wrote:
> >>From: Thomas Gleixner <tglx@linutronix.de>
> >>
> >>When applying RT patch on top of Linux, spinlocks are
> >>implemented as RT-mutexes, which means they are preemptable.
> >>
> >>Current GIC implementation on OMAP is using a spinlock
> >>to protect against preemption. As it turns out, we need
> >>to convert that lock into a raw_spinlock so that OMAP's
> >>interrupt controller works as expected after RT-patch
> >>is applied.
> >>
> >>This patch is simply to decrease the amount of changes
> >>RT-team needs to carry out of tree. It doesn't cause any
> >>changes in behavior.
> >>
> >>Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> >>Signed-off-by: Felipe Balbi <balbi@ti.com>
> >
> Sorry i missed this patch. Tony can you please
> pick it up?
>
> For the patch,
> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>
Looks like no comments, so applying this into
omap-for-v3.9/fixes-non-critical.
Regards,
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-01 22:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-07 14:49 [PATCH] arm: omap: make wakeupgen_lock raw Felipe Balbi
2013-01-24 18:22 ` Felipe Balbi
2013-01-25 7:51 ` Santosh Shilimkar
2013-02-01 22:38 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).