* [PATCH] m68k/irq - use polled IRQ flag for MFP timer cascaded interrupts @ 2014-01-11 1:01 Michael Schmitz 2014-01-11 10:39 ` Geert Uytterhoeven 0 siblings, 1 reply; 7+ messages in thread From: Michael Schmitz @ 2014-01-11 1:01 UTC (permalink / raw) To: geert; +Cc: linux-m68k, Michael Schmitz Some Atari hardware has no capacity to raise interrupts (e.g. network or USB adapter hardware attached via ROM port). The driver interrupt routine is called from a timer interrupt (timer D) in these cases, using chained device specific pseudo interrupts (IRQ_MFP_TIMER1 ff.) These interrupts will more often than not, return IRQ_NONE as there is not always work for the device handler when called. Too many unhandled interrupts will result in the interrupt being disabled by the stuck interrupt watchdog. As preferred option to flag interrupts as needing exclusion from the watchdog mechanism, tglx added the IRQ_IS_POLLED flag for use in such a case. Currently, two interrupts need to use this flag. Add more users as needed. This patch obsoletes the introduction of handle_polled_irq() in the m68k tree. Signed-off-By: Michael Schmitz <schmitz@debian.org> --- arch/m68k/atari/ataints.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index 90f7a48..3e73a63 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c @@ -330,9 +330,12 @@ void __init atari_init_IRQ(void) sound_ym.rd_data_reg_sel = 7; sound_ym.wd_data = 0xff; - m68k_setup_irq_controller(&atari_mfptimer_chip, handle_polled_irq, + m68k_setup_irq_controller(&atari_mfptimer_chip, handle_simple_irq, IRQ_MFP_TIMER1, 8); + irq_set_status_flags(IRQ_MFP_TIMER1, IRQ_IS_POLLED); + irq_set_status_flags(IRQ_MFP_TIMER2, IRQ_IS_POLLED); + /* prepare timer D data for use as poll interrupt */ /* set Timer D data Register - needs to be > 0 */ st_mfp.tim_dt_d = 254; /* < 100 Hz */ -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] m68k/irq - use polled IRQ flag for MFP timer cascaded interrupts 2014-01-11 1:01 [PATCH] m68k/irq - use polled IRQ flag for MFP timer cascaded interrupts Michael Schmitz @ 2014-01-11 10:39 ` Geert Uytterhoeven 0 siblings, 0 replies; 7+ messages in thread From: Geert Uytterhoeven @ 2014-01-11 10:39 UTC (permalink / raw) To: Michael Schmitz; +Cc: Linux/m68k, Michael Schmitz On Sat, Jan 11, 2014 at 2:01 AM, Michael Schmitz <schmitzmic@gmail.com> wrote: > Some Atari hardware has no capacity to raise interrupts (e.g. > network or USB adapter hardware attached via ROM port). The driver > interrupt routine is called from a timer interrupt (timer D) in > these cases, using chained device specific pseudo interrupts > (IRQ_MFP_TIMER1 ff.) > > These interrupts will more often than not, return IRQ_NONE as > there is not always work for the device handler when called. > Too many unhandled interrupts will result in the interrupt > being disabled by the stuck interrupt watchdog. > > As preferred option to flag interrupts as needing exclusion > from the watchdog mechanism, tglx added the IRQ_IS_POLLED flag > for use in such a case. Currently, two interrupts need to use > this flag. Add more users as needed. > > This patch obsoletes the introduction of handle_polled_irq() > in the m68k tree. > > Signed-off-By: Michael Schmitz <schmitz@debian.org> Thanks, will apply and queue for 3.14. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <1387611538-18305-1-git-send-email-schmitz@debian.org>]
[parent not found: <1387611538-18305-2-git-send-email-schmitz@debian.org>]
* Fwd: [PATCH] m68k/irq - use polled IRQ flag for MFP timer cascaded interrupts [not found] ` <1387611538-18305-2-git-send-email-schmitz@debian.org> @ 2013-12-22 10:19 ` Geert Uytterhoeven 2013-12-22 11:15 ` Andreas Schwab 2013-12-22 11:53 ` Geert Uytterhoeven 0 siblings, 2 replies; 7+ messages in thread From: Geert Uytterhoeven @ 2013-12-22 10:19 UTC (permalink / raw) To: Linux/m68k ---------- Forwarded message ---------- From: Michael Schmitz <schmitzmic@gmail.com> Date: Sat, Dec 21, 2013 at 8:38 AM Subject: [PATCH] m68k/irq - use polled IRQ flag for MFP timer cascaded interrupts To: geert@linux-m68k.org Cc: schmitzmic@gmail.com, Michael Schmitz <schmitz@debian.org> --- arch/m68k/atari/ataints.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index 90f7a48..3e73a63 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c @@ -330,9 +330,12 @@ void __init atari_init_IRQ(void) sound_ym.rd_data_reg_sel = 7; sound_ym.wd_data = 0xff; - m68k_setup_irq_controller(&atari_mfptimer_chip, handle_polled_irq, + m68k_setup_irq_controller(&atari_mfptimer_chip, handle_simple_irq, IRQ_MFP_TIMER1, 8); + irq_set_status_flags(IRQ_MFP_TIMER1, IRQ_IS_POLLED); + irq_set_status_flags(IRQ_MFP_TIMER2, IRQ_IS_POLLED); + /* prepare timer D data for use as poll interrupt */ /* set Timer D data Register - needs to be > 0 */ st_mfp.tim_dt_d = 254; /* < 100 Hz */ -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Fwd: [PATCH] m68k/irq - use polled IRQ flag for MFP timer cascaded interrupts 2013-12-22 10:19 ` Fwd: " Geert Uytterhoeven @ 2013-12-22 11:15 ` Andreas Schwab 2013-12-23 9:16 ` Michael Schmitz 2013-12-22 11:53 ` Geert Uytterhoeven 1 sibling, 1 reply; 7+ messages in thread From: Andreas Schwab @ 2013-12-22 11:15 UTC (permalink / raw) To: Geert Uytterhoeven; +Cc: Linux/m68k What does that fix? Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] m68k/irq - use polled IRQ flag for MFP timer cascaded interrupts 2013-12-22 11:15 ` Andreas Schwab @ 2013-12-23 9:16 ` Michael Schmitz 2013-12-23 11:30 ` Andreas Schwab 0 siblings, 1 reply; 7+ messages in thread From: Michael Schmitz @ 2013-12-23 9:16 UTC (permalink / raw) To: Andreas Schwab; +Cc: Linux/m68k, Geert Uytterhoeven Andreas, > What does that fix? Hardware with no interrupt line (EtherNEC, NetUSBee) has the driver interrupt routine polled from the Atari timer D interrupt, which calls in to the driver inthandler via driver-specific chained interrupts IRQ_MFP_TIMER1 etc. (see patch to set up irq chip for timer D interrupt earlier). These interrupts will, more often than not, return IRQ_NONE as there's not always any work to be done when called from the timer. Accumulation of unhandled interrupts then causes the handler to be disabled by the unhandled interrupt watchdog. Driver maintainers have been reluctant to accept other hacks to fix this issue (such as declaring the driver interrupt shared, and hooking up a handler that just returns IRQ_HANDLED always). Cheers, Michael > > Andreas. > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 > 4ED5 > "And now for something completely different." > -- > To unsubscribe from this list: send the line "unsubscribe linux-m68k" > in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] m68k/irq - use polled IRQ flag for MFP timer cascaded interrupts 2013-12-23 9:16 ` Michael Schmitz @ 2013-12-23 11:30 ` Andreas Schwab 2013-12-23 23:36 ` Michael Schmitz 0 siblings, 1 reply; 7+ messages in thread From: Andreas Schwab @ 2013-12-23 11:30 UTC (permalink / raw) To: Michael Schmitz; +Cc: Linux/m68k, Geert Uytterhoeven Please add your explanation to the patch. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] m68k/irq - use polled IRQ flag for MFP timer cascaded interrupts 2013-12-23 11:30 ` Andreas Schwab @ 2013-12-23 23:36 ` Michael Schmitz 0 siblings, 0 replies; 7+ messages in thread From: Michael Schmitz @ 2013-12-23 23:36 UTC (permalink / raw) To: Andreas Schwab; +Cc: Linux/m68k, Geert Uytterhoeven Andreas, > Please add your explanation to the patch. OK, will do. Happy Xmas to all! Cheers, Michael > > Andreas. > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 > 4ED5 > "And now for something completely different." ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] m68k/irq - use polled IRQ flag for MFP timer cascaded interrupts 2013-12-22 10:19 ` Fwd: " Geert Uytterhoeven 2013-12-22 11:15 ` Andreas Schwab @ 2013-12-22 11:53 ` Geert Uytterhoeven 2013-12-23 9:23 ` Michael Schmitz 1 sibling, 1 reply; 7+ messages in thread From: Geert Uytterhoeven @ 2013-12-22 11:53 UTC (permalink / raw) To: Michael Schmitz; +Cc: linux-m68k > Missing SoB. > --- > arch/m68k/atari/ataints.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c > index 90f7a48..3e73a63 100644 > --- a/arch/m68k/atari/ataints.c > +++ b/arch/m68k/atari/ataints.c > @@ -330,9 +330,12 @@ void __init atari_init_IRQ(void) > sound_ym.rd_data_reg_sel = 7; > sound_ym.wd_data = 0xff; > > - m68k_setup_irq_controller(&atari_mfptimer_chip, handle_polled_irq, > + m68k_setup_irq_controller(&atari_mfptimer_chip, handle_simple_irq, > IRQ_MFP_TIMER1, 8); > > + irq_set_status_flags(IRQ_MFP_TIMER1, IRQ_IS_POLLED); > + irq_set_status_flags(IRQ_MFP_TIMER2, IRQ_IS_POLLED); Why do you set this flag for timer 2, too? Timer D is timer1, right? > + > /* prepare timer D data for use as poll interrupt */ > /* set Timer D data Register - needs to be > 0 */ > st_mfp.tim_dt_d = 254; /* < 100 Hz */ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] m68k/irq - use polled IRQ flag for MFP timer cascaded interrupts 2013-12-22 11:53 ` Geert Uytterhoeven @ 2013-12-23 9:23 ` Michael Schmitz 0 siblings, 0 replies; 7+ messages in thread From: Michael Schmitz @ 2013-12-23 9:23 UTC (permalink / raw) To: Geert Uytterhoeven; +Cc: linux-m68k Geert, forgot to reply to all last time ... >> > > Missing SoB. Sorry, please add: Signed-off-By: Michael Schmitz <schmitz@debian.org> > >> --- >> arch/m68k/atari/ataints.c | 5 ++++- >> 1 files changed, 4 insertions(+), 1 deletions(-) >> >> diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c >> index 90f7a48..3e73a63 100644 >> --- a/arch/m68k/atari/ataints.c >> +++ b/arch/m68k/atari/ataints.c >> @@ -330,9 +330,12 @@ void __init atari_init_IRQ(void) >> sound_ym.rd_data_reg_sel = 7; >> sound_ym.wd_data = 0xff; >> >> - m68k_setup_irq_controller(&atari_mfptimer_chip, >> handle_polled_irq, >> + m68k_setup_irq_controller(&atari_mfptimer_chip, >> handle_simple_irq, >> IRQ_MFP_TIMER1, 8); >> >> + irq_set_status_flags(IRQ_MFP_TIMER1, IRQ_IS_POLLED); >> + irq_set_status_flags(IRQ_MFP_TIMER2, IRQ_IS_POLLED); > > Why do you set this flag for timer 2, too? Timer D is timer1, right? > > The IRQ_MFP_TIMER1 and IRQ_MFP_TIMER2 interrupts are the multiplexed ones. These are the only ones currently used by EtherNEC and NetUSBee (if someone wants to use IRQ_MFP_TIMER3 for another piece of broken hardware, this one would need the same flag added). IRQ_MFP_TIMD is the real hardware interrupt driving IRQ_MFP_TIMER1 and IRQ_MFP_TIMER2. It always returns IRQ_HANDLED so no flag required. Cheers, Michael > >> + >> /* prepare timer D data for use as poll interrupt */ >> /* set Timer D data Register - needs to be > 0 */ >> st_mfp.tim_dt_d = 254; /* < 100 Hz */ > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- > geert@linux-m68k.org > > In personal conversations with technical people, I call myself a > hacker. But > when I'm talking to journalists I just say "programmer" or something > like that. > -- Linus Torvalds > -- > To unsubscribe from this list: send the line "unsubscribe linux-m68k" > in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-01-11 10:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-11 1:01 [PATCH] m68k/irq - use polled IRQ flag for MFP timer cascaded interrupts Michael Schmitz
2014-01-11 10:39 ` Geert Uytterhoeven
[not found] <1387611538-18305-1-git-send-email-schmitz@debian.org>
[not found] ` <1387611538-18305-2-git-send-email-schmitz@debian.org>
2013-12-22 10:19 ` Fwd: " Geert Uytterhoeven
2013-12-22 11:15 ` Andreas Schwab
2013-12-23 9:16 ` Michael Schmitz
2013-12-23 11:30 ` Andreas Schwab
2013-12-23 23:36 ` Michael Schmitz
2013-12-22 11:53 ` Geert Uytterhoeven
2013-12-23 9:23 ` Michael Schmitz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox