m68k/irq - use polled IRQ flag for MFP timer cascaded interrupts
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Geert Uytterhoeven
maintainerPATCH 1/1 m68k/irq - use polled IRQ flag for MFP timer cascaded interrupts
---------- Forwarded message ----------
From: Michael Schmitz <[email protected]>
Date: Sat, Dec 21, 2013 at 8:38 AM
Subject: [PATCH] m68k/irq - use polled IRQ flag for MFP timer cascaded interrupts
To: [email protected]
Cc: [email protected], Michael Schmitz <[email protected]>
--- arch/m68k/atari/ataints.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
arch/m68k/atari/ataints.c +4 -1
@@ -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
What does that fix?
Andreas.
Signature · 3 lines
Andreas Schwab, [email protected] GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Geert Uytterhoeven
maintainerQuoted 1 line · Andreas Schwab
What does that fix?
This uses the infrastructure support in commit b39898cd4077f4b6ec706e717c938751c34e1dc4 ("genirq: Prevent spurious detection for unconditionally polled interrupts"), which replaces
m68k/irq: Add handle_polled_irq() for timer based soft interrupts
in our tree.
This is to be folded into
m68k/atari: use polled interrupt handler for timer D interrupts m68k/atari: use dedicated irq_chip for timer D interrupts
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
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
Andreas,
Quoted 1 line
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
Quoted 11 lines
Andreas.
Signature · 7 lines
Andreas Schwab, [email protected] 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Please add your explanation to the patch.
Andreas.
Signature · 3 lines
Andreas Schwab, [email protected] GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Andreas,
Quoted 1 line
Please add your explanation to the patch.
OK, will do.
Happy Xmas to all!
Cheers,
Michael
Quoted 7 lines
Andreas.
Signature · 3 lines
Andreas Schwab, [email protected] GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Geert Uytterhoeven
maintainerQuoted 1 line
Missing SoB.
Quoted 9 lines
--- arch/m68k/atari/ataints.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)arch/m68k/atari/ataints.c +0
-0
arch/m68k/atari/ataints.c void __init atari_init_IRQ(void) · line 337
Quoted 9 lines
arch/m68k/atari/ataints.c +3
-1@@ -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?
arch/m68k/atari/ataints.c void __init atari_init_IRQ(void) · line 341
Quoted 4 lines
arch/m68k/atari/ataints.c +1
-0+/* 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 -- [email protected]
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
Geert,
forgot to reply to all last time ...
Quoted 3 lines
Quoted 1 line
Missing SoB.
Sorry, please add:
Quoted 19 lines
Quoted 19 lines
--- arch/m68k/atari/ataints.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)arch/m68k/atari/ataints.c +1
-1@@ -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 );
Quoted 6 lines
arch/m68k/atari/ataints.c void __init atari_init_IRQ(void) · line 337
Quoted 2 lines
arch/m68k/atari/ataints.c +2
-0+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
Quoted 20 lines
Quoted 5 lines
arch/m68k/atari/ataints.c +1
-0+/* 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 -- [email protected]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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html