diff options
author | Todd Poynor <toddpoynor@google.com> | 2011-08-29 08:12:23 -0400 |
---|---|---|
committer | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2011-09-24 03:58:57 -0400 |
commit | c1df2dcc90dc6f5110726e9bdcd2353db989c29d (patch) | |
tree | ca6f589df8bcc6448398324569e11c0e645fbd6c | |
parent | 342fd144292a6b64ea869e4052eb250486c8f326 (diff) |
OMAP: Fix a BUG in l3 error handler.
With the current sequence of registering the irq and
assigning it to the app_irq, debug_irq driver variables,
there can be corner cases where the pending irq gets
triggered immediately after registering, handler gets called
resulting in a crash. So changed this sequence.
Signed-off-by: sricharan <r.sricharan@ti.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
-rw-r--r-- | arch/arm/mach-omap2/omap_l3_noc.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/omap_l3_noc.c b/arch/arm/mach-omap2/omap_l3_noc.c index d560c8894e1f..cf237dd4dba5 100644 --- a/arch/arm/mach-omap2/omap_l3_noc.c +++ b/arch/arm/mach-omap2/omap_l3_noc.c | |||
@@ -124,7 +124,7 @@ static int __init omap4_l3_probe(struct platform_device *pdev) | |||
124 | { | 124 | { |
125 | static struct omap4_l3 *l3; | 125 | static struct omap4_l3 *l3; |
126 | struct resource *res; | 126 | struct resource *res; |
127 | int ret, irq; | 127 | int ret; |
128 | 128 | ||
129 | l3 = kzalloc(sizeof(*l3), GFP_KERNEL); | 129 | l3 = kzalloc(sizeof(*l3), GFP_KERNEL); |
130 | if (!l3) | 130 | if (!l3) |
@@ -176,8 +176,8 @@ static int __init omap4_l3_probe(struct platform_device *pdev) | |||
176 | /* | 176 | /* |
177 | * Setup interrupt Handlers | 177 | * Setup interrupt Handlers |
178 | */ | 178 | */ |
179 | irq = platform_get_irq(pdev, 0); | 179 | l3->debug_irq = platform_get_irq(pdev, 0); |
180 | ret = request_irq(irq, | 180 | ret = request_irq(l3->debug_irq, |
181 | l3_interrupt_handler, | 181 | l3_interrupt_handler, |
182 | IRQF_DISABLED, "l3-dbg-irq", l3); | 182 | IRQF_DISABLED, "l3-dbg-irq", l3); |
183 | if (ret) { | 183 | if (ret) { |
@@ -185,10 +185,9 @@ static int __init omap4_l3_probe(struct platform_device *pdev) | |||
185 | OMAP44XX_IRQ_L3_DBG); | 185 | OMAP44XX_IRQ_L3_DBG); |
186 | goto err3; | 186 | goto err3; |
187 | } | 187 | } |
188 | l3->debug_irq = irq; | ||
189 | 188 | ||
190 | irq = platform_get_irq(pdev, 1); | 189 | l3->app_irq = platform_get_irq(pdev, 1); |
191 | ret = request_irq(irq, | 190 | ret = request_irq(l3->app_irq, |
192 | l3_interrupt_handler, | 191 | l3_interrupt_handler, |
193 | IRQF_DISABLED, "l3-app-irq", l3); | 192 | IRQF_DISABLED, "l3-app-irq", l3); |
194 | if (ret) { | 193 | if (ret) { |
@@ -196,7 +195,6 @@ static int __init omap4_l3_probe(struct platform_device *pdev) | |||
196 | OMAP44XX_IRQ_L3_APP); | 195 | OMAP44XX_IRQ_L3_APP); |
197 | goto err4; | 196 | goto err4; |
198 | } | 197 | } |
199 | l3->app_irq = irq; | ||
200 | 198 | ||
201 | return 0; | 199 | return 0; |
202 | 200 | ||