aboutsummaryrefslogtreecommitdiff
path: root/arch/m68k
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2013-08-09 21:26:12 +0000
committerGeert Uytterhoeven <geert@linux-m68k.org>2013-08-23 12:49:01 +0200
commit3c776a07914c9a154902486ac848abc16111d35e (patch)
tree2be1c86c75032a7124c911a67d36b77f69033d03 /arch/m68k
parentb36f4be3de1b123d8601de062e7dbfc904f305fb (diff)
m68k: Ignore disabled HSYNC interrupt on Atari for irqs_disabled()
When running a multi-platform kernel on Atari, warning messages like the following may be printed: WARNING: at /root/linux-3.10.1/init/main.c:698 do_one_initcall+0x12e/0x13a() initcall param_sysfs_init+0x0/0x1a4 returned with disabled interrupts This is caused by the different definitions of ALLOWINT for Atari and other platforms: #if defined(MACH_ATARI_ONLY) #define ALLOWINT (~0x500) #else #define ALLOWINT (~0x700) #endif On Atari, we want to disable the high-frequency HSYNC interrupt: - On Atari-only kernels, this is handled completely through ALLOWINT, - On multi-platform kernels, this is handled by disabling the HSYNC interrupt from the interrupt handler. However, as in the latter case arch_irqs_disabled_flags() didn't ignore the disabling of the HSYNC interrupt, irqs_disabled() would detect false positives. Ignore the HSYNC interrupt when running on Atari to fix this. For single-platform kernels this test is optimized away by the compiler. Reported-by: Thorsten Glaser <tg@debian.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Thorsten Glaser <tg@debian.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/include/asm/irqflags.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/m68k/include/asm/irqflags.h b/arch/m68k/include/asm/irqflags.h
index 7ef4115b8c4a..5053092b369f 100644
--- a/arch/m68k/include/asm/irqflags.h
+++ b/arch/m68k/include/asm/irqflags.h
@@ -67,6 +67,10 @@ static inline void arch_local_irq_restore(unsigned long flags)
static inline bool arch_irqs_disabled_flags(unsigned long flags)
{
+ if (MACH_IS_ATARI) {
+ /* Ignore HSYNC = ipl 2 on Atari */
+ return (flags & ~(ALLOWINT | 0x200)) != 0;
+ }
return (flags & ~ALLOWINT) != 0;
}