All of lore.kernel.org
 help / color / mirror / Atom feed
* [Adeos-main] [PATCH 0/2] Fasteoi fixes
@ 2011-11-30 11:58 Wolfgang Mauerer
  2011-11-30 11:58 ` [Adeos-main] [PATCH 1/2] Fix fasteoi masking Wolfgang Mauerer
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Wolfgang Mauerer @ 2011-11-30 11:58 UTC (permalink / raw)
  To: rpm; +Cc: jan.kiszka, adeos-main, gernot.hillier

Dear all,

following Jan's considerations, I found that we lack a generic
bug fix for the fasteoi handler in 2.6.38, which is backported
in the first patch. The second patch makes ipipe agree with
threaded one-shot handlers.

Pending adaption to the latest API, this part is also relevant
for the ipipe-3.0-noarch. Philippe, do you agree with the
approach?

Cheers, Wolfgang

--
Siemens AG, Open Source Platforms,
Corporate Competence Centre Embedded Linux



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Adeos-main] [PATCH 1/2] Fix fasteoi masking
  2011-11-30 11:58 [Adeos-main] [PATCH 0/2] Fasteoi fixes Wolfgang Mauerer
@ 2011-11-30 11:58 ` Wolfgang Mauerer
  2011-11-30 11:58 ` [Adeos-main] [PATCH 2/2] Don't unconditionally unmask fasteoi interrupts Wolfgang Mauerer
  2011-12-11 16:03 ` [Adeos-main] [PATCH 0/2] Fasteoi fixes Philippe Gerum
  2 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Mauerer @ 2011-11-30 11:58 UTC (permalink / raw)
  To: rpm; +Cc: jan.kiszka, adeos-main, Wolfgang Mauerer, gernot.hillier

To prevent interrupt storms, the fasteoi handler must mask
the interrupt line in oneshot mode. Backported from c69e3758ff56.
---
 kernel/irq/chip.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 9671529..2d25c62 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -575,6 +575,9 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
 		goto out;
 	}
 
+	if (desc->status & IRQ_ONESHOT)
+		mask_irq(desc);
+
 	desc->status |= IRQ_INPROGRESS;
 	desc->status &= ~IRQ_PENDING;
 	raw_spin_unlock(&desc->lock);
-- 
1.7.6.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Adeos-main] [PATCH 2/2] Don't unconditionally unmask fasteoi interrupts
  2011-11-30 11:58 [Adeos-main] [PATCH 0/2] Fasteoi fixes Wolfgang Mauerer
  2011-11-30 11:58 ` [Adeos-main] [PATCH 1/2] Fix fasteoi masking Wolfgang Mauerer
@ 2011-11-30 11:58 ` Wolfgang Mauerer
  2011-12-11 16:03 ` [Adeos-main] [PATCH 0/2] Fasteoi fixes Philippe Gerum
  2 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Mauerer @ 2011-11-30 11:58 UTC (permalink / raw)
  To: rpm; +Cc: jan.kiszka, adeos-main, Wolfgang Mauerer, gernot.hillier

For threaded interrupt handlers in oneshot mode, the
hard irq handler will not yet have satisfied the device,
so we need to keep the line masked until irq_finalize_oneshot().
---
 kernel/irq/chip.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 2d25c62..b79ec1d 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -589,7 +589,8 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
 	raw_spin_lock(&desc->lock);
 	desc->status &= ~IRQ_INPROGRESS;
 #ifdef CONFIG_IPIPE
-	desc->irq_data.chip->irq_unmask(&desc->irq_data);
+	if (!(desc->status & IRQ_MASKED))
+		desc->irq_data.chip->irq_unmask(&desc->irq_data);
 out:
 #else
 out:
-- 
1.7.6.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Adeos-main] [PATCH 0/2] Fasteoi fixes
  2011-11-30 11:58 [Adeos-main] [PATCH 0/2] Fasteoi fixes Wolfgang Mauerer
  2011-11-30 11:58 ` [Adeos-main] [PATCH 1/2] Fix fasteoi masking Wolfgang Mauerer
  2011-11-30 11:58 ` [Adeos-main] [PATCH 2/2] Don't unconditionally unmask fasteoi interrupts Wolfgang Mauerer
@ 2011-12-11 16:03 ` Philippe Gerum
  2 siblings, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2011-12-11 16:03 UTC (permalink / raw)
  To: Wolfgang Mauerer; +Cc: jan.kiszka, adeos-main, gernot.hillier

On 11/30/2011 12:58 PM, Wolfgang Mauerer wrote:
> Dear all,
>
> following Jan's considerations, I found that we lack a generic
> bug fix for the fasteoi handler in 2.6.38, which is backported
> in the first patch. The second patch makes ipipe agree with
> threaded one-shot handlers.
>
> Pending adaption to the latest API, this part is also relevant
> for the ipipe-3.0-noarch. Philippe, do you agree with the
> approach?
>

Fine with me. Merged, thanks.

> Cheers, Wolfgang
>
> --
> Siemens AG, Open Source Platforms,
> Corporate Competence Centre Embedded Linux
>
>


-- 
Philippe.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-11 16:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-30 11:58 [Adeos-main] [PATCH 0/2] Fasteoi fixes Wolfgang Mauerer
2011-11-30 11:58 ` [Adeos-main] [PATCH 1/2] Fix fasteoi masking Wolfgang Mauerer
2011-11-30 11:58 ` [Adeos-main] [PATCH 2/2] Don't unconditionally unmask fasteoi interrupts Wolfgang Mauerer
2011-12-11 16:03 ` [Adeos-main] [PATCH 0/2] Fasteoi fixes Philippe Gerum

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.