Commit cfec5c01 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

[PATCH] factor out common <asm/hardirq.h> code

Since the irq handling rework in 2.5 lots of code in the individual
<asm/hardirq.h> files is the same.  This patch moves that common code
to <linux/hardirq.h>.  The following differences existed:

 - alpha, m68k, m68knommu and v850 were missing the ~PREEMPT_ACTIVE
   masking in the CONFIG_PREEMPT case of in_atomic().  These
   architectures don't support CONFIG_PREEMPT else this would have been
   an easily-spottbale bug
 - S390 didn't provide synchronize_irq as it doesn't fit into their
   I/O model.  They now get a spurious prototype/macro
 - ppc added a new preemptible() macro that is provided for all
   architectures now.

Most drivers were using <linux/interrupt.h> as they should, but a few
drivers and lots of architecture code has been updated to use
<linux/hardirq.h> instead of <asm/hardirq.h>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 36ea58a5
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
In user context, the <varname>current</varname> pointer (indicating In user context, the <varname>current</varname> pointer (indicating
the task we are currently executing) is valid, and the task we are currently executing) is valid, and
<function>in_interrupt()</function> <function>in_interrupt()</function>
(<filename>include/asm/hardirq.h</filename>) is <returnvalue>false (<filename>include/linux/interrupt.h</filename>) is <returnvalue>false
</returnvalue>. </returnvalue>.
</para> </para>
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
<para> <para>
You can tell you are in a softirq (or bottom half, or tasklet) You can tell you are in a softirq (or bottom half, or tasklet)
using the <function>in_softirq()</function> macro using the <function>in_softirq()</function> macro
(<filename class="headerfile">include/asm/hardirq.h</filename>). (<filename class="headerfile">include/linux/interrupt.h</filename>).
</para> </para>
<caution> <caution>
<para> <para>
......
...@@ -14,9 +14,8 @@ ...@@ -14,9 +14,8 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <asm/hardirq.h> #include <linux/firmware.h>
#include "linux/firmware.h"
MODULE_AUTHOR("Manuel Estrada Sainz <ranty@debian.org>"); MODULE_AUTHOR("Manuel Estrada Sainz <ranty@debian.org>");
MODULE_DESCRIPTION("Hackish sample for using firmware class directly"); MODULE_DESCRIPTION("Hackish sample for using firmware class directly");
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include <asm/bitops.h> #include <asm/bitops.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/hardirq.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/checksum.h> #include <asm/checksum.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardirq.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/hardirq.h>
#include <asm/bootinfo.h> #include <asm/bootinfo.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardirq.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#define DEFINE(sym, val) \ #define DEFINE(sym, val) \
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include <asm/checksum.h> #include <asm/checksum.h>
#include <asm/hardirq.h>
#include <asm/current.h> #include <asm/current.h>
#include <asm/gpio.h> #include <asm/gpio.h>
......
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/random.h> #include <linux/random.h>
#include <linux/bootmem.h> #include <linux/bootmem.h>
#include <linux/hardirq.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/traps.h> #include <asm/traps.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/hardirq.h>
#include <asm/errno.h> #include <asm/errno.h>
/* /*
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/bootmem.h> #include <linux/bootmem.h>
#include <linux/random.h> #include <linux/random.h>
#include <linux/hardirq.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -29,7 +30,6 @@ ...@@ -29,7 +30,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/gpio.h> #include <asm/gpio.h>
#include <asm/hardirq.h>
#include <asm/regs267x.h> #include <asm/regs267x.h>
#include <asm/errno.h> #include <asm/errno.h>
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/checksum.h> #include <asm/checksum.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardirq.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/mmx.h> #include <asm/mmx.h>
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/hardirq.h>
#include <asm/i387.h> #include <asm/i387.h>
#include <asm/hardirq.h>
/* /*
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/hardirq.h>
#include <asm/desc.h> #include <asm/desc.h>
#include <asm/kdebug.h> #include <asm/kdebug.h>
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/vt_kern.h> /* For unblank_screen() */ #include <linux/vt_kern.h> /* For unblank_screen() */
#include <linux/module.h> /* for EXPORT_SYMBOL */ #include <linux/module.h> /* for EXPORT_SYMBOL */
#include <linux/hardirq.h>
#include <asm/fpswa.h> #include <asm/fpswa.h>
#include <asm/hardirq.h>
#include <asm/ia32.h> #include <asm/ia32.h>
#include <asm/intrinsics.h> #include <asm/intrinsics.h>
#include <asm/processor.h> #include <asm/processor.h>
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/hardirq.h>
extern void die (char *, struct pt_regs *, long); extern void die (char *, struct pt_regs *, long);
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include <asm/checksum.h> #include <asm/checksum.h>
#include <asm/hardirq.h>
asmlinkage long long __ashldi3 (long long, int); asmlinkage long long __ashldi3 (long long, int);
asmlinkage long long __ashrdi3 (long long, int); asmlinkage long long __ashrdi3 (long long, int);
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/hardirq.h>
#include <asm/rtc.h> #include <asm/rtc.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardirq.h>
#include <asm/traps.h> #include <asm/traps.h>
#include <asm/q40_master.h> #include <asm/q40_master.h>
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/hardirq.h>
#include <asm/bootinfo.h> #include <asm/bootinfo.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardirq.h>
#define DEFINE(sym, val) \ #define DEFINE(sym, val) \
asm volatile("\n->" #sym " %0 " #val : : "i" (val)) asm volatile("\n->" #sym " %0 " #val : : "i" (val))
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include <asm/checksum.h> #include <asm/checksum.h>
#include <asm/hardirq.h>
#include <asm/current.h> #include <asm/current.h>
extern void dump_thread(struct pt_regs *, struct user *); extern void dump_thread(struct pt_regs *, struct user *);
......
...@@ -38,11 +38,11 @@ ...@@ -38,11 +38,11 @@
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/hardirq.h>
#include <asm/mipsregs.h> #include <asm/mipsregs.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/time.h> #include <asm/time.h>
#include <asm/hardirq.h>
#include <asm/div64.h> #include <asm/div64.h>
#include <asm/mach-au1x00/au1000.h> #include <asm/mach-au1x00/au1000.h>
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include <asm/cpu.h> #include <asm/cpu.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/hardirq.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/smp.h> #include <asm/smp.h>
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <asm/cpu.h> #include <asm/cpu.h>
#include <asm/cpu-features.h> #include <asm/cpu-features.h>
#include <asm/div64.h> #include <asm/div64.h>
#include <asm/hardirq.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/time.h> #include <asm/time.h>
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include <asm/mipsregs.h> #include <asm/mipsregs.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/hardirq.h>
#include <asm/div64.h> #include <asm/div64.h>
#include <asm/cpu.h> #include <asm/cpu.h>
#include <asm/time.h> #include <asm/time.h>
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <linux/module.h> #include <linux/module.h>
#include <asm/branch.h> #include <asm/branch.h>
#include <asm/hardirq.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
......
...@@ -32,11 +32,11 @@ ...@@ -32,11 +32,11 @@
#include <linux/thread_info.h> #include <linux/thread_info.h>
#include <linux/version.h> #include <linux/version.h>
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <asm/pgtable.h> #include <linux/hardirq.h>
#include <asm/pgtable.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/hardirq.h>
#include <asm/pdc.h> #include <asm/pdc.h>
#define DEFINE(sym, val) \ #define DEFINE(sym, val) \
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/hardirq.h> /* in_interrupt() */
#include <asm/system.h> #include <asm/system.h>
#include <asm/hardirq.h> /* in_interrupt() */
#undef INIT_STUCK #undef INIT_STUCK
#define INIT_STUCK 1L << 30 #define INIT_STUCK 1L << 30
......
...@@ -41,11 +41,11 @@ ...@@ -41,11 +41,11 @@
#include <linux/bootmem.h> #include <linux/bootmem.h>
#include <linux/highmem.h> #include <linux/highmem.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/hardirq.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardirq.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/mmu.h> #include <asm/mmu.h>
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/mqueue.h> #include <linux/mqueue.h>
#include <linux/hardirq.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -44,7 +45,6 @@ ...@@ -44,7 +45,6 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/mmu.h> #include <asm/mmu.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/hardirq.h>
extern unsigned long _get_SP(void); extern unsigned long _get_SP(void);
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/hardirq.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/smp.h> #include <asm/smp.h>
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/hardirq.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h> #include <asm/prom.h>
......
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/hardirq.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardirq.h>
#include <asm/pmac_feature.h> #include <asm/pmac_feature.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/sections.h> #include <asm/sections.h>
......
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/hardirq.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/hardirq.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h> #include <asm/prom.h>
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/adb.h> #include <linux/adb.h>
#include <linux/cuda.h> #include <linux/cuda.h>
#include <linux/pmu.h> #include <linux/pmu.h>
#include <linux/hardirq.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/prom.h> #include <asm/prom.h>
...@@ -26,7 +27,6 @@ ...@@ -26,7 +27,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/hardirq.h>
#include <asm/time.h> #include <asm/time.h>
#include <asm/nvram.h> #include <asm/nvram.h>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/open_pic.h> #include <asm/open_pic.h>
#include <asm/i8259.h> #include <asm/i8259.h>
#include <asm/hardirq.h>
#include "open_pic_defs.h" #include "open_pic_defs.h"
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/open_pic.h> #include <asm/open_pic.h>
#include <asm/i8259.h> #include <asm/i8259.h>
#include <asm/hardirq.h>
#include "open_pic_defs.h" #include "open_pic_defs.h"
......
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/mman.h> #include <linux/mman.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/hardirq.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/hardirq.h>
#include <asm/naca.h> #include <asm/naca.h>
#include <asm/paca.h> #include <asm/paca.h>
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/hardirq.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h> #include <asm/prom.h>
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/time.h> #include <linux/time.h>
#include <linux/adb.h> #include <linux/adb.h>
#include <linux/pmu.h> #include <linux/pmu.h>
#include <linux/interrupt.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/prom.h> #include <asm/prom.h>
...@@ -25,7 +26,6 @@ ...@@ -25,7 +26,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/hardirq.h>
#include <asm/time.h> #include <asm/time.h>
#include <asm/nvram.h> #include <asm/nvram.h>
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <linux/prctl.h> #include <linux/prctl.h>
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/interrupt.h>
#include <linux/version.h> #include <linux/version.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
...@@ -47,7 +48,6 @@ ...@@ -47,7 +48,6 @@
#include <asm/ppcdebug.h> #include <asm/ppcdebug.h>
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/iSeries/HvCallHpt.h> #include <asm/iSeries/HvCallHpt.h>
#include <asm/hardirq.h>
#include <asm/cputable.h> #include <asm/cputable.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
......
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/bcd.h> #include <linux/bcd.h>
#include <linux/interrupt.h>
#include <asm/hardirq.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/system.h> #include <asm/system.h>
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/hardirq.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/smp.h> #include <asm/smp.h>
......
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
#include <linux/wait.h> #include <linux/wait.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/interrupt.h>
#include <asm/hardirq.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/iSeries/LparData.h> #include <asm/iSeries/LparData.h>
......
...@@ -26,10 +26,10 @@ ...@@ -26,10 +26,10 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/percpu.h> #include <linux/percpu.h>
#include <linux/hardirq.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/tlb.h> #include <asm/tlb.h>
#include <asm/hardirq.h>
#include <linux/highmem.h> #include <linux/highmem.h>
DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch); DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch);
......
...@@ -25,11 +25,11 @@ ...@@ -25,11 +25,11 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/hardirq.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/hardirq.h>
#ifndef CONFIG_ARCH_S390X #ifndef CONFIG_ARCH_S390X
#define __FAIL_ADDR_MASK 0x7ffff000 #define __FAIL_ADDR_MASK 0x7ffff000
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/checksum.h> #include <asm/checksum.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardirq.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/hardirq.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/smp.h> #include <asm/smp.h>
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/hardirq.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/hardirq.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/kgdb.h> #include <asm/kgdb.h>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/hardirq.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/hardirq.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/checksum.h> #include <asm/checksum.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardirq.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/irq.h> #include <asm/irq.h>
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <asm/tlb.h> #include <asm/tlb.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/hardirq.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/registers.h> /* required by inline asm statements */ #include <asm/registers.h> /* required by inline asm statements */
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/hardirq.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/registers.h> /* required by inline asm statements */ #include <asm/registers.h> /* required by inline asm statements */
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/hardirq.h>
#include <asm/pcic.h> #include <asm/pcic.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
......
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
#include <asm/kdebug.h> #include <asm/kdebug.h>
#include <asm/mbus.h> #include <asm/mbus.h>
#include <asm/idprom.h> #include <asm/idprom.h>
#include <asm/hardirq.h>
#include <asm/machines.h> #include <asm/machines.h>
#include <asm/cpudata.h> #include <asm/cpudata.h>
#include <asm/setup.h> #include <asm/setup.h>
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/hardirq.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/cpudata.h> #include <asm/cpudata.h>
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include <asm/smp.h> #include <asm/smp.h>
#include <asm/mostek.h> #include <asm/mostek.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/hardirq.h>
#include <asm/user.h> #include <asm/user.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/checksum.h> #include <asm/checksum.h>
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/hardirq.h>
#include <asm/sbus.h> #include <asm/sbus.h>
#include <asm/sbi.h> #include <asm/sbi.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/hardirq.h>
#include <asm/cpudata.h> #include <asm/cpudata.h>
#define IRQ_RESCHEDULE 13 #define IRQ_RESCHEDULE 13
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/timer.h> #include <asm/timer.h>
#include <asm/smp.h> #include <asm/smp.h>
#include <asm/hardirq.h>
#include <asm/starfire.h> #include <asm/starfire.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/cache.h> #include <asm/cache.h>
......
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
#include <asm/idprom.h> #include <asm/idprom.h>
#include <asm/head.h> #include <asm/head.h>
#include <asm/starfire.h> #include <asm/starfire.h>
#include <asm/hardirq.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/timer.h> #include <asm/timer.h>
#include <asm/sections.h> #include <asm/sections.h>
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/hardirq.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/timer.h> #include <asm/timer.h>
#include <asm/starfire.h> #include <asm/starfire.h>
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardirq.h>
#include <asm/idprom.h> #include <asm/idprom.h>
#include <asm/svr4.h> #include <asm/svr4.h>
#include <asm/elf.h> #include <asm/elf.h>
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#include "linux/init.h" #include "linux/init.h"
#include "linux/interrupt.h" #include "linux/interrupt.h"
#include "linux/slab.h" #include "linux/slab.h"
#include "linux/hardirq.h"
#include "asm/current.h" #include "asm/current.h"
#include "asm/hardirq.h"
#include "asm/irq.h" #include "asm/irq.h"
#include "stdio_console.h" #include "stdio_console.h"
#include "line.h" #include "line.h"
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
#include "linux/init.h" #include "linux/init.h"
#include "linux/seq_file.h" #include "linux/seq_file.h"
#include "linux/profile.h" #include "linux/profile.h"
#include "linux/hardirq.h"
#include "asm/irq.h" #include "asm/irq.h"
#include "asm/hw_irq.h" #include "asm/hw_irq.h"
#include "asm/hardirq.h"
#include "asm/atomic.h" #include "asm/atomic.h"
#include "asm/signal.h" #include "asm/signal.h"
#include "asm/system.h" #include "asm/system.h"
......
...@@ -18,10 +18,10 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); ...@@ -18,10 +18,10 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
#include "linux/threads.h" #include "linux/threads.h"
#include "linux/interrupt.h" #include "linux/interrupt.h"
#include "linux/err.h" #include "linux/err.h"
#include "linux/hardirq.h"
#include "asm/smp.h" #include "asm/smp.h"
#include "asm/processor.h" #include "asm/processor.h"
#include "asm/spinlock.h" #include "asm/spinlock.h"
#include "asm/hardirq.h"
#include "user_util.h" #include "user_util.h"
#include "kern_util.h" #include "kern_util.h"
#include "kern.h" #include "kern.h"
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/hardirq.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardirq.h>
#include <asm/errno.h> #include <asm/errno.h>
#define DEFINE(sym, val) \ #define DEFINE(sym, val) \
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
#include <asm/checksum.h> #include <asm/checksum.h>
#include <asm/hardirq.h>
#include <asm/current.h> #include <asm/current.h>
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/stddef.h> #include <linux/stddef.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/hardirq.h>
#include <asm/pda.h> #include <asm/pda.h>
#include <asm/hardirq.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/segment.h> #include <asm/segment.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/checksum.h> #include <asm/checksum.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/hardirq.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/mmx.h> #include <asm/mmx.h>
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
#include <asm/hardirq.h>
#include <asm/smp.h> #include <asm/smp.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/proto.h> #include <asm/proto.h>
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kmod.h> #include <linux/kmod.h>
#include <asm/hardirq.h>
#include <asm/kmap_types.h> #include <asm/kmap_types.h>
extern enum km_type crypto_km_types[]; extern enum km_type crypto_km_types[];
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <asm/hardirq.h> #include <linux/interrupt.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#include <asm/hardirq.h> #include <linux/interrupt.h>
#define disable(oldspl) save_flags (oldspl) #define disable(oldspl) save_flags (oldspl)
......
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardirq.h>
#include <asm/pmac_feature.h> #include <asm/pmac_feature.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/interrupt.h>
#include <asm/hardirq.h>
#include <asm/cio.h> #include <asm/cio.h>
#include <asm/delay.h> #include <asm/delay.h>
#include <asm/irq.h> #include <asm/irq.h>
......
...@@ -39,20 +39,6 @@ typedef struct { ...@@ -39,20 +39,6 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have * The hardirq mask has to be large enough to have
* space for potentially nestable IRQ sources in the system * space for potentially nestable IRQ sources in the system
...@@ -64,28 +50,7 @@ typedef struct { ...@@ -64,28 +50,7 @@ typedef struct {
#error HARDIRQ_BITS is too low! #error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
#define in_atomic() (preempt_count() != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
#define in_atomic() (preempt_count() != 0)
#define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
# endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -95,10 +60,4 @@ do { \ ...@@ -95,10 +60,4 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#ifndef CONFIG_SMP
# define synchronize_irq(irq) barrier()
#else
extern void synchronize_irq(unsigned int irq);
#endif /* CONFIG_SMP */
#endif /* _ALPHA_HARDIRQ_H */ #endif /* _ALPHA_HARDIRQ_H */
...@@ -41,20 +41,6 @@ typedef struct { ...@@ -41,20 +41,6 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK|SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have space * The hardirq mask has to be large enough to have space
* for potentially all IRQ sources in the system nesting * for potentially all IRQ sources in the system nesting
...@@ -64,29 +50,9 @@ typedef struct { ...@@ -64,29 +50,9 @@ typedef struct {
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
extern asmlinkage void __do_softirq(void); extern asmlinkage void __do_softirq(void);
#define irq_exit() \ #define irq_exit() \
...@@ -96,10 +62,6 @@ extern asmlinkage void __do_softirq(void); ...@@ -96,10 +62,6 @@ extern asmlinkage void __do_softirq(void);
__do_softirq(); \ __do_softirq(); \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#define synchronize_irq(irq) barrier()
#else
extern void synchronize_irq(unsigned int irq);
#endif #endif
#endif /* __ASM_HARDIRQ_H */ #endif /* __ASM_HARDIRQ_H */
...@@ -32,20 +32,6 @@ typedef struct { ...@@ -32,20 +32,6 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK|SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have space * The hardirq mask has to be large enough to have space
* for potentially all IRQ sources in the system nesting * for potentially all IRQ sources in the system nesting
...@@ -55,26 +41,8 @@ typedef struct { ...@@ -55,26 +41,8 @@ typedef struct {
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
#define irq_exit() \ #define irq_exit() \
do { \ do { \
...@@ -84,9 +52,6 @@ typedef struct { ...@@ -84,9 +52,6 @@ typedef struct {
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#define synchronize_irq(irq) barrier()
#else
#error SMP not supported
#endif #endif
#endif /* __ASM_HARDIRQ_H */ #endif /* __ASM_HARDIRQ_H */
...@@ -40,20 +40,6 @@ typedef struct { ...@@ -40,20 +40,6 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have * The hardirq mask has to be large enough to have
* space for potentially all IRQ sources in the system * space for potentially all IRQ sources in the system
...@@ -63,27 +49,7 @@ typedef struct { ...@@ -63,27 +49,7 @@ typedef struct {
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -92,6 +58,4 @@ do { \ ...@@ -92,6 +58,4 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#define synchronize_irq(irq) barrier()
#endif /* __ASM_HARDIRQ_H */ #endif /* __ASM_HARDIRQ_H */
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/percpu.h> #include <linux/percpu.h>
#include <linux/hardirq.h>
#include <asm/types.h> #include <asm/types.h>
#include <asm/hardirq.h>
/* An unsigned long type for operations which are atomic for a single /* An unsigned long type for operations which are atomic for a single
* CPU. Usually used in combination with per-cpu variables. */ * CPU. Usually used in combination with per-cpu variables. */
......
...@@ -38,20 +38,6 @@ typedef struct { ...@@ -38,20 +38,6 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have * The hardirq mask has to be large enough to have
* space for potentially all IRQ sources in the system * space for potentially all IRQ sources in the system
...@@ -61,27 +47,7 @@ typedef struct { ...@@ -61,27 +47,7 @@ typedef struct {
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -90,10 +56,4 @@ do { \ ...@@ -90,10 +56,4 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#ifndef CONFIG_SMP
# define synchronize_irq(irq) barrier()
#else
# error h8300 SMP is not available
#endif /* CONFIG_SMP */
#endif #endif
...@@ -37,20 +37,6 @@ typedef struct { ...@@ -37,20 +37,6 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have * The hardirq mask has to be large enough to have
* space for potentially all IRQ sources in the system * space for potentially all IRQ sources in the system
...@@ -60,30 +46,10 @@ typedef struct { ...@@ -60,30 +46,10 @@ typedef struct {
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#define nmi_enter() (irq_enter()) #define nmi_enter() (irq_enter())
#define nmi_exit() (preempt_count() -= HARDIRQ_OFFSET) #define nmi_exit() (preempt_count() -= HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
# include <linux/smp_lock.h>
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -92,10 +58,4 @@ do { \ ...@@ -92,10 +58,4 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#ifndef CONFIG_SMP
# define synchronize_irq(irq) barrier()
#else
extern void synchronize_irq(unsigned int irq);
#endif /* CONFIG_SMP */
#endif /* __ASM_HARDIRQ_H */ #endif /* __ASM_HARDIRQ_H */
...@@ -52,20 +52,6 @@ ...@@ -52,20 +52,6 @@
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have space for potentially all IRQ sources * The hardirq mask has to be large enough to have space for potentially all IRQ sources
* in the system nesting on a single CPU: * in the system nesting on a single CPU:
...@@ -74,31 +60,4 @@ ...@@ -74,31 +60,4 @@
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context?
* Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#ifdef CONFIG_PREEMPT
# include <linux/smp_lock.h>
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#ifdef CONFIG_SMP
extern void synchronize_irq (unsigned int irq);
#else
# define synchronize_irq(irq) barrier()
#endif /* CONFIG_SMP */
#endif /* _ASM_IA64_HARDIRQ_H */ #endif /* _ASM_IA64_HARDIRQ_H */
...@@ -35,20 +35,6 @@ typedef struct { ...@@ -35,20 +35,6 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have * The hardirq mask has to be large enough to have
* space for potentially all IRQ sources in the system * space for potentially all IRQ sources in the system
...@@ -58,27 +44,7 @@ typedef struct { ...@@ -58,27 +44,7 @@ typedef struct {
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# define in_atomic() (preempt_count() != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -87,6 +53,4 @@ do { \ ...@@ -87,6 +53,4 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#define synchronize_irq(irq) barrier()
#endif #endif
...@@ -51,7 +51,7 @@ asmlinkage void resume(void); ...@@ -51,7 +51,7 @@ asmlinkage void resume(void);
#if 0 #if 0
#define local_irq_enable() asm volatile ("andiw %0,%%sr": : "i" (ALLOWINT) : "memory") #define local_irq_enable() asm volatile ("andiw %0,%%sr": : "i" (ALLOWINT) : "memory")
#else #else
#include <asm/hardirq.h> #include <linux/hardirq.h>
#define local_irq_enable() ({ \ #define local_irq_enable() ({ \
if (MACH_IS_Q40 || !hardirq_count()) \ if (MACH_IS_Q40 || !hardirq_count()) \
asm volatile ("andiw %0,%%sr": : "i" (ALLOWINT) : "memory"); \ asm volatile ("andiw %0,%%sr": : "i" (ALLOWINT) : "memory"); \
......
...@@ -36,20 +36,6 @@ typedef struct { ...@@ -36,20 +36,6 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have * The hardirq mask has to be large enough to have
* space for potentially all IRQ sources in the system * space for potentially all IRQ sources in the system
...@@ -59,33 +45,7 @@ typedef struct { ...@@ -59,33 +45,7 @@ typedef struct {
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#ifdef CONFIG_PREEMPT
# define in_atomic() (preempt_count() != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -94,10 +54,4 @@ do { \ ...@@ -94,10 +54,4 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#ifndef CONFIG_SMP
# define synchronize_irq(irq) barrier()
#else
# error m68knommu SMP is not available
#endif /* CONFIG_SMP */
#endif /* __M68K_HARDIRQ_H */ #endif /* __M68K_HARDIRQ_H */
...@@ -43,20 +43,6 @@ typedef struct { ...@@ -43,20 +43,6 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have * The hardirq mask has to be large enough to have
* space for potentially all IRQ sources in the system * space for potentially all IRQ sources in the system
...@@ -66,27 +52,7 @@ typedef struct { ...@@ -66,27 +52,7 @@ typedef struct {
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# include <linux/smp_lock.h>
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -95,10 +61,4 @@ do { \ ...@@ -95,10 +61,4 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#ifndef CONFIG_SMP
# define synchronize_irq(irq) barrier()
#else
extern void synchronize_irq(unsigned int irq);
#endif /* CONFIG_SMP */
#endif /* _ASM_HARDIRQ_H */ #endif /* _ASM_HARDIRQ_H */
...@@ -51,20 +51,6 @@ typedef struct { ...@@ -51,20 +51,6 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have space for potentially all IRQ sources * The hardirq mask has to be large enough to have space for potentially all IRQ sources
* in the system nesting on a single CPU: * in the system nesting on a single CPU:
...@@ -73,29 +59,7 @@ typedef struct { ...@@ -73,29 +59,7 @@ typedef struct {
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context?
* Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# error CONFIG_PREEMT currently not supported.
# define in_atomic() BUG()
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -104,10 +68,4 @@ do { \ ...@@ -104,10 +68,4 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#ifdef CONFIG_SMP
extern void synchronize_irq (unsigned int irq);
#else
# define synchronize_irq(irq) barrier()
#endif /* CONFIG_SMP */
#endif /* _PARISC_HARDIRQ_H */ #endif /* _PARISC_HARDIRQ_H */
...@@ -44,20 +44,6 @@ typedef struct { ...@@ -44,20 +44,6 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have * The hardirq mask has to be large enough to have
* space for potentially all IRQ sources in the system * space for potentially all IRQ sources in the system
...@@ -67,31 +53,7 @@ typedef struct { ...@@ -67,31 +53,7 @@ typedef struct {
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define preemptible() (preempt_count() == 0 && !irqs_disabled())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define preemptible() 0
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -100,11 +62,5 @@ do { \ ...@@ -100,11 +62,5 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#ifndef CONFIG_SMP
# define synchronize_irq(irq) barrier()
#else
extern void synchronize_irq(unsigned int irq);
#endif /* CONFIG_SMP */
#endif /* __ASM_HARDIRQ_H */ #endif /* __ASM_HARDIRQ_H */
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#ifdef __KERNEL__
#ifndef __ASM_HARDIRQ_H #ifndef __ASM_HARDIRQ_H
#define __ASM_HARDIRQ_H #define __ASM_HARDIRQ_H
...@@ -43,20 +42,6 @@ typedef struct { ...@@ -43,20 +42,6 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __HARDIRQ_MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__HARDIRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define SOFTIRQ_MASK (__HARDIRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define HARDIRQ_MASK (__HARDIRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have * The hardirq mask has to be large enough to have
* space for potentially all IRQ sources in the system * space for potentially all IRQ sources in the system
...@@ -66,29 +51,7 @@ typedef struct { ...@@ -66,29 +51,7 @@ typedef struct {
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define preemptible() (preempt_count() == 0 && !irqs_disabled())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define preemptible() 0
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -97,12 +60,4 @@ do { \ ...@@ -97,12 +60,4 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#ifndef CONFIG_SMP
# define synchronize_irq(irq) barrier()
#else
extern void synchronize_irq(unsigned int irq);
#endif /* CONFIG_SMP */
#endif /* __KERNEL__ */
#endif /* __ASM_HARDIRQ_H */ #endif /* __ASM_HARDIRQ_H */
...@@ -61,51 +61,15 @@ softirq_pending(unsigned int cpu) ...@@ -61,51 +61,15 @@ softirq_pending(unsigned int cpu)
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1) extern void do_call_softirq(void);
extern void account_ticks(struct pt_regs *);
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt()) #define invoke_softirq() do_call_softirq()
#define hardirq_endlock() do { } while (0)
#define irq_enter() \ #define irq_enter() \
do { \ do { \
(preempt_count() += HARDIRQ_OFFSET); \ (preempt_count() += HARDIRQ_OFFSET); \
} while(0) } while(0)
extern void do_call_softirq(void);
extern void account_ticks(struct pt_regs *);
#define invoke_softirq() do_call_softirq()
#ifdef CONFIG_PREEMPT
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define _ASM_IRQ_H #define _ASM_IRQ_H
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <asm/hardirq.h> #include <linux/hardirq.h>
/* /*
* the definition of irqs has changed in 2.5.46: * the definition of irqs has changed in 2.5.46:
......
...@@ -35,20 +35,6 @@ typedef struct { ...@@ -35,20 +35,6 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have * The hardirq mask has to be large enough to have
* space for potentially all IRQ sources in the system * space for potentially all IRQ sources in the system
...@@ -58,29 +44,10 @@ typedef struct { ...@@ -58,29 +44,10 @@ typedef struct {
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we in an interrupt context? Either doing bottom half
* or hardware interrupt processing?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#define nmi_enter() (irq_enter()) #define nmi_enter() (irq_enter())
#define nmi_exit() (preempt_count() -= HARDIRQ_OFFSET) #define nmi_exit() (preempt_count() -= HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -89,10 +56,4 @@ do { \ ...@@ -89,10 +56,4 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#ifndef CONFIG_SMP
# define synchronize_irq(irq) barrier()
#else
extern void synchronize_irq(unsigned int irq);
#endif /* CONFIG_SMP */
#endif /* __ASM_SH_HARDIRQ_H */ #endif /* __ASM_SH_HARDIRQ_H */
...@@ -42,42 +42,7 @@ typedef struct { ...@@ -42,42 +42,7 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
#include <linux/smp_lock.h>
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -86,10 +51,4 @@ do { \ ...@@ -86,10 +51,4 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#ifndef CONFIG_SMP
# define synchronize_irq(irq) barrier()
#else /* SMP */
extern void synchronize_irq(unsigned int irq);
#endif /* SMP */
#endif /* __SPARC_HARDIRQ_H */ #endif /* __SPARC_HARDIRQ_H */
...@@ -41,42 +41,7 @@ typedef struct { ...@@ -41,42 +41,7 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# include <linux/smp_lock.h>
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -85,10 +50,4 @@ do { \ ...@@ -85,10 +50,4 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#ifndef CONFIG_SMP
# define synchronize_irq(irq) barrier()
#else
extern void synchronize_irq(unsigned int irq);
#endif /* CONFIG_SMP */
#endif /* !(__SPARC64_HARDIRQ_H) */ #endif /* !(__SPARC64_HARDIRQ_H) */
...@@ -36,20 +36,6 @@ typedef struct { ...@@ -36,20 +36,6 @@ typedef struct {
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have * The hardirq mask has to be large enough to have
* space for potentially all IRQ sources in the system * space for potentially all IRQ sources in the system
...@@ -59,27 +45,7 @@ typedef struct { ...@@ -59,27 +45,7 @@ typedef struct {
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET) #define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# define in_atomic() (preempt_count() != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -88,10 +54,4 @@ do { \ ...@@ -88,10 +54,4 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#ifndef CONFIG_SMP
# define synchronize_irq(irq) barrier()
#else
# error v850nommu SMP is not available
#endif /* CONFIG_SMP */
#endif /* __V850_HARDIRQ_H__ */ #endif /* __V850_HARDIRQ_H__ */
...@@ -37,20 +37,6 @@ ...@@ -37,20 +37,6 @@
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) #define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) #define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/* /*
* The hardirq mask has to be large enough to have * The hardirq mask has to be large enough to have
* space for potentially all IRQ sources in the system * space for potentially all IRQ sources in the system
...@@ -60,31 +46,10 @@ ...@@ -60,31 +46,10 @@
# error HARDIRQ_BITS is too low! # error HARDIRQ_BITS is too low!
#endif #endif
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#define nmi_enter() (irq_enter()) #define nmi_enter() (irq_enter())
#define nmi_exit() (preempt_count() -= HARDIRQ_OFFSET) #define nmi_exit() (preempt_count() -= HARDIRQ_OFFSET)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#ifdef CONFIG_PREEMPT
# include <linux/smp_lock.h>
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \ #define irq_exit() \
do { \ do { \
preempt_count() -= IRQ_EXIT_OFFSET; \ preempt_count() -= IRQ_EXIT_OFFSET; \
...@@ -93,10 +58,4 @@ do { \ ...@@ -93,10 +58,4 @@ do { \
preempt_enable_no_resched(); \ preempt_enable_no_resched(); \
} while (0) } while (0)
#ifndef CONFIG_SMP
# define synchronize_irq(irq) barrier()
#else
extern void synchronize_irq(unsigned int irq);
#endif /* CONFIG_SMP */
#endif /* __ASM_HARDIRQ_H */ #endif /* __ASM_HARDIRQ_H */
#ifndef LINUX_HARDIRQ_H
#define LINUX_HARDIRQ_H
#include <linux/config.h>
#ifdef CONFIG_PREEPT
#include <linux/smp_lock.h>
#endif
#include <asm/hardirq.h>
#define __IRQ_MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__IRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define HARDIRQ_MASK (__IRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define SOFTIRQ_MASK (__IRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#ifdef CONFIG_PREEMPT
# define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != kernel_locked())
# define preemptible() (preempt_count() == 0 && !irqs_disabled())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define in_atomic() (preempt_count() != 0)
# define preemptible() 0
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#ifdef CONFIG_SMP
extern void synchronize_irq(unsigned int irq);
#else
# define synchronize_irq(irq) barrier()
#endif
#endif /* LINUX_HARDIRQ_H */
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/preempt.h> #include <linux/preempt.h>
#include <linux/cpumask.h> #include <linux/cpumask.h>
#include <linux/hardirq.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/hardirq.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/system.h> #include <asm/system.h>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#define _NET_IPV6_H #define _NET_IPV6_H
#include <linux/ipv6.h> #include <linux/ipv6.h>
#include <asm/hardirq.h> #include <linux/hardirq.h>
#include <net/ndisc.h> #include <net/ndisc.h>
#include <net/flow.h> #include <net/flow.h>
#include <net/snmp.h> #include <net/snmp.h>
......
...@@ -65,7 +65,6 @@ ...@@ -65,7 +65,6 @@
#include <linux/ac97_codec.h> #include <linux/ac97_codec.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/hardirq.h>
#ifndef PCI_DEVICE_ID_ALI_5455 #ifndef PCI_DEVICE_ID_ALI_5455
#define PCI_DEVICE_ID_ALI_5455 0x5455 #define PCI_DEVICE_ID_ALI_5455 0x5455
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment