]> git.hungrycats.org Git - linux/commitdiff
[PATCH] factor out common <asm/hardirq.h> code
authorChristoph Hellwig <hch@lst.de>
Wed, 8 Sep 2004 00:48:45 +0000 (17:48 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 8 Sep 2004 00:48:45 +0000 (17:48 -0700)
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: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
109 files changed:
Documentation/DocBook/kernel-hacking.tmpl
Documentation/firmware_class/firmware_sample_firmware_class.c
arch/alpha/kernel/smp.c
arch/cris/kernel/crisksyms.c
arch/h8300/kernel/asm-offsets.c
arch/h8300/kernel/h8300_ksyms.c
arch/h8300/kernel/ints.c
arch/h8300/platform/h8s/ints.c
arch/i386/kernel/i386_ksyms.c
arch/i386/lib/mmx.c
arch/i386/mm/fault.c
arch/ia64/kernel/traps.c
arch/ia64/mm/fault.c
arch/m68k/kernel/m68k_ksyms.c
arch/m68k/q40/q40ints.c
arch/m68knommu/kernel/asm-offsets.c
arch/m68knommu/kernel/m68k_ksyms.c
arch/mips/au1000/common/time.c
arch/mips/kernel/smp.c
arch/mips/kernel/time.c
arch/mips/mips-boards/generic/time.c
arch/mips/mm/fault.c
arch/parisc/kernel/asm-offsets.c
arch/parisc/lib/debuglocks.c
arch/ppc/kernel/dma-mapping.c
arch/ppc/kernel/process.c
arch/ppc/kernel/smp.c
arch/ppc/platforms/chrp_smp.c
arch/ppc/platforms/pmac_cpufreq.c
arch/ppc/platforms/pmac_smp.c
arch/ppc/platforms/pmac_time.c
arch/ppc/syslib/open_pic.c
arch/ppc/syslib/open_pic2.c
arch/ppc64/kernel/asm-offsets.c
arch/ppc64/kernel/pmac_smp.c
arch/ppc64/kernel/pmac_time.c
arch/ppc64/kernel/process.c
arch/ppc64/kernel/rtc.c
arch/ppc64/kernel/smp.c
arch/ppc64/kernel/viopath.c
arch/ppc64/mm/tlb.c
arch/s390/mm/fault.c
arch/sh/kernel/sh_ksyms.c
arch/sh/kernel/smp.c
arch/sh/mm/fault-nommu.c
arch/sh/mm/fault.c
arch/sh/mm/tlb-sh3.c
arch/sh/mm/tlb-sh4.c
arch/sh64/kernel/sh_ksyms.c
arch/sh64/mm/fault.c
arch/sh64/mm/tlbmiss.c
arch/sparc/kernel/irq.c
arch/sparc/kernel/setup.c
arch/sparc/kernel/smp.c
arch/sparc/kernel/sparc_ksyms.c
arch/sparc/kernel/sun4d_smp.c
arch/sparc/kernel/sun4m_smp.c
arch/sparc64/kernel/irq.c
arch/sparc64/kernel/setup.c
arch/sparc64/kernel/smp.c
arch/sparc64/kernel/sparc64_ksyms.c
arch/um/drivers/stdio_console.c
arch/um/kernel/irq.c
arch/um/kernel/smp.c
arch/v850/kernel/asm-consts.c
arch/v850/kernel/v850_ksyms.c
arch/x86_64/kernel/asm-offsets.c
arch/x86_64/kernel/x8664_ksyms.c
arch/x86_64/mm/fault.c
crypto/internal.h
drivers/base/firmware_class.c
drivers/char/rio/linux_compat.h
drivers/macintosh/via-pmu.c
drivers/s390/cio/cio.c
include/asm-alpha/hardirq.h
include/asm-arm/hardirq.h
include/asm-arm26/hardirq.h
include/asm-cris/hardirq.h
include/asm-generic/local.h
include/asm-h8300/hardirq.h
include/asm-i386/hardirq.h
include/asm-ia64/hardirq.h
include/asm-m68k/hardirq.h
include/asm-m68k/system.h
include/asm-m68knommu/hardirq.h
include/asm-mips/hardirq.h
include/asm-parisc/hardirq.h
include/asm-ppc/hardirq.h
include/asm-ppc64/hardirq.h
include/asm-s390/hardirq.h
include/asm-s390/irq.h
include/asm-sh/hardirq.h
include/asm-sparc/hardirq.h
include/asm-sparc64/hardirq.h
include/asm-v850/hardirq.h
include/asm-x86_64/hardirq.h
include/linux/hardirq.h [new file with mode: 0644]
include/linux/interrupt.h
include/net/ipv6.h
sound/oss/ali5455.c
sound/oss/au1000.c
sound/oss/cs46xx.c
sound/oss/forte.c
sound/oss/i810_audio.c
sound/oss/ite8172.c
sound/oss/nec_vrc5477.c
sound/oss/rme96xx.c
sound/oss/swarm_cs4297a.c
sound/oss/trident.c

index 0424c92f5db184e697ecfd8f943a2e3c2068f189..cd1bc1574613f38d6540d568960ba90fd3712b8e 100644 (file)
     In user context, the <varname>current</varname> pointer (indicating 
     the task we are currently executing) is valid, and
     <function>in_interrupt()</function>
-    (<filename>include/asm/hardirq.h</filename>) is <returnvalue>false
+    (<filename>include/linux/interrupt.h</filename>) is <returnvalue>false
     </returnvalue>.  
    </para>
 
    <para>
     You can tell you are in a softirq (or bottom half, or tasklet)
     using the <function>in_softirq()</function> macro 
-    (<filename class="headerfile">include/asm/hardirq.h</filename>).
+    (<filename class="headerfile">include/linux/interrupt.h</filename>).
    </para>
    <caution>
     <para>
index 037c0bed9eb2916787d2780ff27d66c807b8fb20..09eab2f1b3735f0f9ff6feb193bba7b70c72130f 100644 (file)
@@ -14,9 +14,8 @@
 #include <linux/module.h>
 #include <linux/init.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_DESCRIPTION("Hackish sample for using firmware class directly");
index edf9b929e9375e90614ab40072321311c6531d91..6d4d09c43912611244b8d807c3253e3ae06f7f3d 100644 (file)
@@ -36,7 +36,6 @@
 #include <asm/bitops.h>
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
-#include <asm/hardirq.h>
 #include <asm/mmu_context.h>
 #include <asm/tlbflush.h>
 
index 0bb5ab6d9669d7a6dba5d3f0a0133cdac1551089..7141bbecd7e41a511f0cc7e981111956ce3ff718 100644 (file)
@@ -16,7 +16,6 @@
 #include <asm/uaccess.h>
 #include <asm/checksum.h>
 #include <asm/io.h>
-#include <asm/hardirq.h>
 #include <asm/delay.h>
 #include <asm/irq.h>
 #include <asm/pgtable.h>
index 5e50c089305322a05cad295f7e8b90fed647dcb6..b78b82ad28a3868466b7b5a5c974fc83eea90884 100644 (file)
@@ -12,9 +12,9 @@
 #include <linux/sched.h>
 #include <linux/kernel_stat.h>
 #include <linux/ptrace.h>
+#include <linux/hardirq.h>
 #include <asm/bootinfo.h>
 #include <asm/irq.h>
-#include <asm/hardirq.h>
 #include <asm/ptrace.h>
 
 #define DEFINE(sym, val) \
index 544889fb18f0ae00027623047bc1cba527ed4daf..5a630233112ff2e77bdb5788a61813bb415eff77 100644 (file)
@@ -15,7 +15,6 @@
 #include <asm/io.h>
 #include <asm/semaphore.h>
 #include <asm/checksum.h>
-#include <asm/hardirq.h>
 #include <asm/current.h>
 #include <asm/gpio.h>
 
index 7246e29ea01d3907a459210b006f19e964e6eea3..edb3c4170013c417d53fa8258bf9f736eaf45bff 100644 (file)
 #include <linux/init.h>
 #include <linux/random.h>
 #include <linux/bootmem.h>
+#include <linux/hardirq.h>
 
 #include <asm/system.h>
 #include <asm/irq.h>
 #include <asm/traps.h>
 #include <asm/io.h>
 #include <asm/setup.h>
-#include <asm/hardirq.h>
 #include <asm/errno.h>
 
 /*
index bbefac4034e6106dc5beac0f96794ca398b235d1..5441cdd12a3996d46464380aba12679394cde975 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/random.h>
+#include <linux/hardirq.h>
 
 #include <asm/system.h>
 #include <asm/irq.h>
@@ -29,7 +30,6 @@
 #include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/gpio.h>
-#include <asm/hardirq.h>
 #include <asm/regs267x.h>
 #include <asm/errno.h>
 
index 3d07b92246d4ab607bfe6e18a738168d2fe255b1..b93f0332d0493fdd3fe5ac4029dd1a285d865454 100644 (file)
@@ -23,7 +23,6 @@
 #include <asm/uaccess.h>
 #include <asm/checksum.h>
 #include <asm/io.h>
-#include <asm/hardirq.h>
 #include <asm/delay.h>
 #include <asm/irq.h>
 #include <asm/mmx.h>
index d6fc84f375e3d3e516823c19a552e27cd87e8cca..01f8b1a2cc843c42bf7fa5c1e517f444b29c6469 100644 (file)
@@ -2,9 +2,9 @@
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/sched.h>
+#include <linux/hardirq.h>
 
 #include <asm/i387.h>
-#include <asm/hardirq.h> 
 
 
 /*
index f6599b30d46e8e8e0835bc1d708eb9e398849de6..e39f67886400ad4b0bf952eab7bab2df0d1327a8 100644 (file)
@@ -24,7 +24,6 @@
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
-#include <asm/hardirq.h>
 #include <asm/desc.h>
 #include <asm/kdebug.h>
 
index f8991313557d62193aea100914053dc609411ada..dc120b5ed4c7e2021f0176ceedb5a9892ad26a7e 100644 (file)
@@ -14,9 +14,9 @@
 #include <linux/tty.h>
 #include <linux/vt_kern.h>             /* For unblank_screen() */
 #include <linux/module.h>       /* for EXPORT_SYMBOL */
+#include <linux/hardirq.h>
 
 #include <asm/fpswa.h>
-#include <asm/hardirq.h>
 #include <asm/ia32.h>
 #include <asm/intrinsics.h>
 #include <asm/processor.h>
index 3a427fa00bd707838101345c9248cc8c85c716ce..ffacb680111e4baedb50743b6d9de90437ed0e19 100644 (file)
@@ -14,7 +14,6 @@
 #include <asm/processor.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
-#include <asm/hardirq.h>
 
 extern void die (char *, struct pt_regs *, long);
 
index 309248ac98094f8fd5a8cfb91bcfe4ffc39cc8b0..fe837e31afbf39eeb1208a8488a066e1c90febaf 100644 (file)
@@ -16,7 +16,6 @@
 #include <asm/io.h>
 #include <asm/semaphore.h>
 #include <asm/checksum.h>
-#include <asm/hardirq.h>
 
 asmlinkage long long __ashldi3 (long long, int);
 asmlinkage long long __ashrdi3 (long long, int);
index 54189735145f8817120bf4baf8b38eaedc1a1ea9..1215b5bea723af3a36b8663b00d41a19ea804dfe 100644 (file)
 #include <linux/sched.h>
 #include <linux/seq_file.h>
 #include <linux/interrupt.h>
+#include <linux/hardirq.h>
 
 #include <asm/rtc.h>
 #include <asm/ptrace.h>
 #include <asm/system.h>
 #include <asm/irq.h>
-#include <asm/hardirq.h>
 #include <asm/traps.h>
 
 #include <asm/q40_master.h>
index c803fe64e2ce4f2589dddfa7aefae7f2d0274e46..02c56f5385316d2da6c22756a029ac1085308224 100644 (file)
@@ -12,9 +12,9 @@
 #include <linux/sched.h>
 #include <linux/kernel_stat.h>
 #include <linux/ptrace.h>
+#include <linux/hardirq.h>
 #include <asm/bootinfo.h>
 #include <asm/irq.h>
-#include <asm/hardirq.h>
 
 #define DEFINE(sym, val) \
         asm volatile("\n->" #sym " %0 " #val : : "i" (val))
index 832483b617d63ce6d6ac860163a338034368257e..e93a5ad56496247bf8e35c0f4da2522f83b550c2 100644 (file)
@@ -16,7 +16,6 @@
 #include <asm/io.h>
 #include <asm/semaphore.h>
 #include <asm/checksum.h>
-#include <asm/hardirq.h>
 #include <asm/current.h>
 
 extern void dump_thread(struct pt_regs *, struct user *);
index f58f454cdc8cf53447b2bbc618f01d4b63047811..a72de97275f0678a781c4de404b153e3cf4b2424 100644 (file)
 #include <linux/kernel_stat.h>
 #include <linux/sched.h>
 #include <linux/spinlock.h>
+#include <linux/hardirq.h>
 
 #include <asm/mipsregs.h>
 #include <asm/ptrace.h>
 #include <asm/time.h>
-#include <asm/hardirq.h>
 #include <asm/div64.h>
 #include <asm/mach-au1x00/au1000.h>
 
index 61137d771aea1bd477983b63af96643dcb095b40..6d1c473f67d2d552ba2b226a5740ec2096a6c5af 100644 (file)
@@ -35,7 +35,6 @@
 #include <asm/cpu.h>
 #include <asm/processor.h>
 #include <asm/system.h>
-#include <asm/hardirq.h>
 #include <asm/mmu_context.h>
 #include <asm/smp.h>
 
index 29957e96ed0325130aeabe1eb15eafe2141b788d..915e5539e7f261bb30610909b502108eafe92596 100644 (file)
@@ -29,7 +29,6 @@
 #include <asm/cpu.h>
 #include <asm/cpu-features.h>
 #include <asm/div64.h>
-#include <asm/hardirq.h>
 #include <asm/sections.h>
 #include <asm/time.h>
 
index 9348cd3e6ddde91767d8ea18e66413db9e791662..fe7fc17305a69193d23396d0800de698d4ceff20 100644 (file)
@@ -31,7 +31,6 @@
 
 #include <asm/mipsregs.h>
 #include <asm/ptrace.h>
-#include <asm/hardirq.h>
 #include <asm/div64.h>
 #include <asm/cpu.h>
 #include <asm/time.h>
index 820c3af0868a5846a15ee890e7d09b5079e47195..ec8077c74e9cd658cd4f030f11af6052f1c68a04 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/module.h>
 
 #include <asm/branch.h>
-#include <asm/hardirq.h>
 #include <asm/mmu_context.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
index 64d49cb2d217dd04133446a56efaaf0aec9b6a00..cf8a8583fb561d10b8e4ddb66d6c74c52c3dac36 100644 (file)
 #include <linux/thread_info.h>
 #include <linux/version.h>
 #include <linux/ptrace.h>
-#include <asm/pgtable.h>
+#include <linux/hardirq.h>
 
+#include <asm/pgtable.h>
 #include <asm/ptrace.h>
 #include <asm/processor.h>
-#include <asm/hardirq.h>
 #include <asm/pdc.h>
 
 #define DEFINE(sym, val) \
index 7e79f1bade35c786ca30219c2e4d843e6de22866..5166a9378cfa0bd2a9a395eb9d3f716b620fc4f5 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/spinlock.h>
+#include <linux/hardirq.h>     /* in_interrupt() */
 #include <asm/system.h>
-#include <asm/hardirq.h>       /* in_interrupt() */
 
 #undef INIT_STUCK
 #define INIT_STUCK 1L << 30
index 35419c823723acb018b3b0e29b219ee14d71b878..334b8bfdc5017460a017c331a7ea8a79372fc75d 100644 (file)
 #include <linux/bootmem.h>
 #include <linux/highmem.h>
 #include <linux/dma-mapping.h>
+#include <linux/hardirq.h>
 
 #include <asm/pgalloc.h>
 #include <asm/prom.h>
 #include <asm/io.h>
-#include <asm/hardirq.h>
 #include <asm/mmu_context.h>
 #include <asm/pgtable.h>
 #include <asm/mmu.h>
index 97ad51ab823262727b30011edb74fa81bafe6417..d9ab6a7de95c85f6976c182d0a2c05e6c09b81ac 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/module.h>
 #include <linux/kallsyms.h>
 #include <linux/mqueue.h>
+#include <linux/hardirq.h>
 
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
@@ -44,7 +45,6 @@
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/prom.h>
-#include <asm/hardirq.h>
 
 extern unsigned long _get_SP(void);
 
index d3ffa353d29a314e91957208d781ced69c889bd6..dae491743fb685cb697ac1dd89b74c6b64c41732 100644 (file)
@@ -26,7 +26,6 @@
 #include <asm/irq.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
-#include <asm/hardirq.h>
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/smp.h>
index 71f62a05565b8e728444e24797feecb4407c7ba7..863d1e3256ca03d6d5dbd2c4e625407020f61fd3 100644 (file)
@@ -24,7 +24,6 @@
 #include <asm/irq.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
-#include <asm/hardirq.h>
 #include <asm/sections.h>
 #include <asm/io.h>
 #include <asm/prom.h>
index 5b2221a141847cf3665df4a6454525f527d9d7bd..9ad6bc91f20a7c35960205e16b07af8e30ec3e89 100644 (file)
 #include <linux/init.h>
 #include <linux/sysdev.h>
 #include <linux/i2c.h>
+#include <linux/hardirq.h>
 #include <asm/prom.h>
 #include <asm/machdep.h>
 #include <asm/irq.h>
-#include <asm/hardirq.h>
 #include <asm/pmac_feature.h>
 #include <asm/mmu_context.h>
 #include <asm/sections.h>
index 704742257b84161921b65f515d663b0fe74de9fd..1a300ff409f501c2aa810f453dbb1dfd638c47ea 100644 (file)
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/errno.h>
+#include <linux/hardirq.h>
 
 #include <asm/ptrace.h>
 #include <asm/atomic.h>
 #include <asm/irq.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
-#include <asm/hardirq.h>
 #include <asm/sections.h>
 #include <asm/io.h>
 #include <asm/prom.h>
index cd8e3e7c4d13e0edeb5aab806eb485fde860d48a..09636546f44e5e8485e3b173ca3197d8a87bac39 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/adb.h>
 #include <linux/cuda.h>
 #include <linux/pmu.h>
+#include <linux/hardirq.h>
 
 #include <asm/sections.h>
 #include <asm/prom.h>
@@ -26,7 +27,6 @@
 #include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/machdep.h>
-#include <asm/hardirq.h>
 #include <asm/time.h>
 #include <asm/nvram.h>
 
index 7f13e744fb8bffc2863eab1902c7f56fff9c5ee7..a22f80c8cf6e35dca9755a1055db8bb4158eb20b 100644 (file)
@@ -25,7 +25,6 @@
 #include <asm/sections.h>
 #include <asm/open_pic.h>
 #include <asm/i8259.h>
-#include <asm/hardirq.h>
 
 #include "open_pic_defs.h"
 
index 52cb4a494f305ec1e8d5b099f2066018f7921349..4401e01fbfaa874eb16a10e72ee50cdaed1e00ba 100644 (file)
@@ -28,7 +28,6 @@
 #include <asm/sections.h>
 #include <asm/open_pic.h>
 #include <asm/i8259.h>
-#include <asm/hardirq.h>
 
 #include "open_pic_defs.h"
 
index 8ec589d60ef1f2c50eceafc1646d556c7606e445..60cf1ac636544c0efa249c257ac2a316f41b0967 100644 (file)
 #include <linux/types.h>
 #include <linux/mman.h>
 #include <linux/mm.h>
+#include <linux/hardirq.h>
 #include <asm/io.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/processor.h>
-#include <asm/hardirq.h>
 
 #include <asm/naca.h>
 #include <asm/paca.h>
index a67e2a595c593d148d5978d4b3f543f607b7ecd9..fb6ab40147ed1f65168e969559ce4e264f669474 100644 (file)
@@ -38,7 +38,6 @@
 #include <asm/irq.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
-#include <asm/hardirq.h>
 #include <asm/sections.h>
 #include <asm/io.h>
 #include <asm/prom.h>
index aea28b9891a63e4faf43c0735fe342f5c9256bfe..06f379855e7839e55ed13cadbed0c2a6480bb2ca 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/time.h>
 #include <linux/adb.h>
 #include <linux/pmu.h>
+#include <linux/interrupt.h>
 
 #include <asm/sections.h>
 #include <asm/prom.h>
@@ -25,7 +26,6 @@
 #include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/machdep.h>
-#include <asm/hardirq.h>
 #include <asm/time.h>
 #include <asm/nvram.h>
 
index e1a35840c16b7468b0d40b81a3c5a36dc4b8754f..8fda55762dfd69246e73a874cc678d9568285b81 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/prctl.h>
 #include <linux/ptrace.h>
 #include <linux/kallsyms.h>
+#include <linux/interrupt.h>
 #include <linux/version.h>
 
 #include <asm/pgtable.h>
@@ -47,7 +48,6 @@
 #include <asm/ppcdebug.h>
 #include <asm/machdep.h>
 #include <asm/iSeries/HvCallHpt.h>
-#include <asm/hardirq.h>
 #include <asm/cputable.h>
 #include <asm/sections.h>
 #include <asm/tlbflush.h>
index 7bf41f3cab904b68303bbd9e5237d5b7e5ae8b0c..536a4991836403acc98f4c3838875f4e15ff5fb5 100644 (file)
@@ -34,8 +34,8 @@
 #include <linux/proc_fs.h>
 #include <linux/spinlock.h>
 #include <linux/bcd.h>
+#include <linux/interrupt.h>
 
-#include <asm/hardirq.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
index 1d0767df6fd1f0f38d8c2a0cb72de79586bd7448..7321d27905d5ca1548b9643769f7aea3370afd3e 100644 (file)
@@ -36,7 +36,6 @@
 #include <asm/irq.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
-#include <asm/hardirq.h>
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/smp.h>
index 7b6c257f42797521a577130c00f609f7da654d62..66a8102398fa73423a6671c9dfbffec0fca086c3 100644 (file)
@@ -38,8 +38,8 @@
 #include <linux/wait.h>
 #include <linux/seq_file.h>
 #include <linux/smp_lock.h>
+#include <linux/interrupt.h>
 
-#include <asm/hardirq.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <asm/iSeries/LparData.h>
index 8825e14cb35a337786029e763eb16e448d5ddcda..aa2d76ca46f25a46de64d95d934a41133d6c8b83 100644 (file)
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/percpu.h>
+#include <linux/hardirq.h>
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
 #include <asm/tlb.h>
-#include <asm/hardirq.h>
 #include <linux/highmem.h>
 
 DEFINE_PER_CPU(struct ppc64_tlb_batch, ppc64_tlb_batch);
index b5d5ae7a0ada50ab9889a530afa8396ea4219811..d6bd3d4298601b0afbd969253e066922f75549c5 100644 (file)
 #include <linux/init.h>
 #include <linux/console.h>
 #include <linux/module.h>
+#include <linux/hardirq.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
-#include <asm/hardirq.h>
 
 #ifndef CONFIG_ARCH_S390X
 #define __FAIL_ADDR_MASK 0x7ffff000
index 97057fc3c03048725d5c337792bd4360bb369ca5..5e5cdd7f28b6d8cf92df14634178ce1af8f3e85e 100644 (file)
@@ -16,7 +16,6 @@
 #include <asm/uaccess.h>
 #include <asm/checksum.h>
 #include <asm/io.h>
-#include <asm/hardirq.h>
 #include <asm/delay.h>
 #include <asm/tlbflush.h>
 #include <asm/cacheflush.h>
index 9efe2b12fdd1ef91600483ea3f54389049a32cd4..6ff83edf8374ea308ab2efc2225e77ea15575dbb 100644 (file)
@@ -26,7 +26,6 @@
 #include <asm/atomic.h>
 #include <asm/processor.h>
 #include <asm/system.h>
-#include <asm/hardirq.h>
 #include <asm/mmu_context.h>
 #include <asm/smp.h>
 
index e757b2c187b3deb26c5873d18450557b00ddb670..34d4e0c68fbb10e713699214214e47029584e9fb 100644 (file)
@@ -26,7 +26,6 @@
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
-#include <asm/hardirq.h>
 #include <asm/mmu_context.h>
 #include <asm/cacheflush.h>
 
index 43a9e26892746753fe15f65477e721681e5f90dc..7abba2161da6c9e5a51c0855f64517cd1be9449c 100644 (file)
@@ -26,7 +26,6 @@
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
-#include <asm/hardirq.h>
 #include <asm/mmu_context.h>
 #include <asm/cacheflush.h>
 #include <asm/kgdb.h>
index 318d1a529b49b91425c2eb3547a08e94fefc2f5c..4bffcf59cdb7e1da73f6e36a24da9ad94fd24e30 100644 (file)
@@ -25,7 +25,6 @@
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
-#include <asm/hardirq.h>
 #include <asm/mmu_context.h>
 #include <asm/cacheflush.h>
 
index 4b7a0bcdc1bcdf776af8f427e90b5e061bbcbba3..115b1b6be40b45c30c71b1413b4b6be8c1ef7cc7 100644 (file)
@@ -25,7 +25,6 @@
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
-#include <asm/hardirq.h>
 #include <asm/mmu_context.h>
 #include <asm/cacheflush.h>
 
index b16440d9145c50244a7b12da0f35440686e9514e..36cd5de959bd7485ba73164a09c59c83b19296a3 100644 (file)
@@ -25,7 +25,6 @@
 #include <asm/uaccess.h>
 #include <asm/checksum.h>
 #include <asm/io.h>
-#include <asm/hardirq.h>
 #include <asm/delay.h>
 #include <asm/irq.h>
 
index b5ab4a88cdb27221ff6aa4aec4755ce2c30a4f02..d1190b4158d8acbfbf340d2b56c2cc79865f6ab5 100644 (file)
@@ -30,7 +30,6 @@
 #include <asm/tlb.h>
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
-#include <asm/hardirq.h>
 #include <asm/mmu_context.h>
 #include <asm/registers.h>             /* required by inline asm statements */
 
index a69f7751c3fd2b8d31d7f9e219b90f2b2338acbc..69f686c885f12e412877ab958b1074b1689eae97 100644 (file)
@@ -40,7 +40,6 @@
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
-#include <asm/hardirq.h>
 #include <asm/mmu_context.h>
 #include <asm/registers.h>             /* required by inline asm statements */
 
index cfabf35ee0e01fa419231927edac958a676b4d0e..4e0ed320d225861d56bcb87e00b8fb508d9788cf 100644 (file)
@@ -45,7 +45,6 @@
 #include <asm/io.h>
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
-#include <asm/hardirq.h>
 #include <asm/pcic.h>
 #include <asm/cacheflush.h>
 
index 7bc43b4c0895b9c7db7b9aba3cbdab613e416ce8..55352ed85e8afe3187ec14ea00758e360d0e3d8e 100644 (file)
@@ -44,7 +44,6 @@
 #include <asm/kdebug.h>
 #include <asm/mbus.h>
 #include <asm/idprom.h>
-#include <asm/hardirq.h>
 #include <asm/machines.h>
 #include <asm/cpudata.h>
 #include <asm/setup.h>
index 46591a15eb43bb00a7dd04557f219c1334f7b1b0..f11dd14dbe3b18742803d9db31ab43513bbbbe32 100644 (file)
@@ -30,7 +30,6 @@
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
 #include <asm/oplib.h>
-#include <asm/hardirq.h>
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
 #include <asm/cpudata.h>
index 8c6341bae3669a63170601c9abff734e5320e0af..7282bc3ee014efbeabe36a04bbe5050b9d7839de 100644 (file)
@@ -41,7 +41,6 @@
 #include <asm/smp.h>
 #include <asm/mostek.h>
 #include <asm/ptrace.h>
-#include <asm/hardirq.h>
 #include <asm/user.h>
 #include <asm/uaccess.h>
 #include <asm/checksum.h>
index 739fb6f3cae43e9742257d95205be13afb096d35..1de4c8a39bf013a07585a5eaf9de9dd087573161 100644 (file)
@@ -30,7 +30,6 @@
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
 #include <asm/oplib.h>
-#include <asm/hardirq.h>
 #include <asm/sbus.h>
 #include <asm/sbi.h>
 #include <asm/tlbflush.h>
index f36f1bef56b03faa671448e81c728d29c757145a..100433e05d9441a36b275d4520e263e9a5c47bec 100644 (file)
@@ -29,7 +29,6 @@
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
 #include <asm/oplib.h>
-#include <asm/hardirq.h>
 #include <asm/cpudata.h>
 
 #define IRQ_RESCHEDULE         13
index fdb848178a86ad55f463ecf5a7c403c5091951a1..3162b2ed1e42659f66df53c57504c49264722896 100644 (file)
@@ -33,7 +33,6 @@
 #include <asm/oplib.h>
 #include <asm/timer.h>
 #include <asm/smp.h>
-#include <asm/hardirq.h>
 #include <asm/starfire.h>
 #include <asm/uaccess.h>
 #include <asm/cache.h>
index 438e373cec3c53d863c707a0c7d58e7b20e1a284..51e762bcd1dc8a37bf9f1859cbf18129c3c3fb07 100644 (file)
@@ -43,7 +43,6 @@
 #include <asm/idprom.h>
 #include <asm/head.h>
 #include <asm/starfire.h>
-#include <asm/hardirq.h>
 #include <asm/mmu_context.h>
 #include <asm/timer.h>
 #include <asm/sections.h>
index b1abd017755b4c502ae80019f742a65805b8e3c0..f2bbaafd8d57ab69a2ab7c9b807edbb9ca37063b 100644 (file)
@@ -32,7 +32,6 @@
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/oplib.h>
-#include <asm/hardirq.h>
 #include <asm/uaccess.h>
 #include <asm/timer.h>
 #include <asm/starfire.h>
index d641c541f9c77e7d355515059f54ac9f1e3602df..3864b4b6e8e5720180e19f057f2c35ab9c6f772a 100644 (file)
@@ -34,7 +34,6 @@
 #include <asm/pgtable.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-#include <asm/hardirq.h>
 #include <asm/idprom.h>
 #include <asm/svr4.h>
 #include <asm/elf.h>
index 5fdc50db6f0a9c5d256d5b675cc7079c9cb68252..d5df64e7b2113639c0889703c4cf00b2d8e82ab7 100644 (file)
@@ -17,8 +17,8 @@
 #include "linux/init.h"
 #include "linux/interrupt.h"
 #include "linux/slab.h"
+#include "linux/hardirq.h"
 #include "asm/current.h"
-#include "asm/hardirq.h"
 #include "asm/irq.h"
 #include "stdio_console.h"
 #include "line.h"
index 8acbf137da550a83c7439410f9f536f918d27913..5e55c3ae0c8ff16564d372bdce59296583416b0a 100644 (file)
@@ -19,9 +19,9 @@
 #include "linux/init.h"
 #include "linux/seq_file.h"
 #include "linux/profile.h"
+#include "linux/hardirq.h"
 #include "asm/irq.h"
 #include "asm/hw_irq.h"
-#include "asm/hardirq.h"
 #include "asm/atomic.h"
 #include "asm/signal.h"
 #include "asm/system.h"
index 8e970e0f0608366c43cbe9393010f35ebb614974..ace88c2393c6168cce54aa0867ea9638ac5dee47 100644 (file)
@@ -18,10 +18,10 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 #include "linux/threads.h"
 #include "linux/interrupt.h"
 #include "linux/err.h"
+#include "linux/hardirq.h"
 #include "asm/smp.h"
 #include "asm/processor.h"
 #include "asm/spinlock.h"
-#include "asm/hardirq.h"
 #include "user_util.h"
 #include "kern_util.h"
 #include "kern.h"
index 666930d9cea658d022c0241c0af797c8da8a4f81..24f291369070dc7511f011b10c813f337b8b7b7b 100644 (file)
@@ -12,8 +12,8 @@
 #include <linux/sched.h>
 #include <linux/kernel_stat.h>
 #include <linux/ptrace.h>
+#include <linux/hardirq.h>
 #include <asm/irq.h>
-#include <asm/hardirq.h>
 #include <asm/errno.h>
 
 #define DEFINE(sym, val) \
index 25170c4a8a047c5357e3a381af9ad7d7eedc1375..0ca64900dd913c40ec3682b58d921ed99767453f 100644 (file)
@@ -14,7 +14,6 @@
 #include <asm/io.h>
 #include <asm/semaphore.h>
 #include <asm/checksum.h>
-#include <asm/hardirq.h>
 #include <asm/current.h>
 
 
index 757f55078a7cd59a1b212faeeb611929cca80bff..37d12fa5ef7fcb34446dae808f938b2447402b9b 100644 (file)
@@ -7,8 +7,8 @@
 #include <linux/sched.h> 
 #include <linux/stddef.h>
 #include <linux/errno.h> 
+#include <linux/hardirq.h>
 #include <asm/pda.h>
-#include <asm/hardirq.h>
 #include <asm/processor.h>
 #include <asm/segment.h>
 #include <asm/thread_info.h>
index f64ea3d60de6e1c8d5ce2d01c0d7ee0886441e9d..6e3acce421bed45a4aeb207b7186a9eda6feb9b0 100644 (file)
@@ -21,7 +21,6 @@
 #include <asm/uaccess.h>
 #include <asm/checksum.h>
 #include <asm/io.h>
-#include <asm/hardirq.h>
 #include <asm/delay.h>
 #include <asm/irq.h>
 #include <asm/mmx.h>
index 1fa1f48aac4055d1af2777fc2c8c37625d2f7807..71722bd6abb6e1fdc24b9aafb80e29ec56ea7bd9 100644 (file)
@@ -27,7 +27,6 @@
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
-#include <asm/hardirq.h>
 #include <asm/smp.h>
 #include <asm/tlbflush.h>
 #include <asm/proto.h>
index b51fad1f9ff52eab2cc95669ff0b57c8a2e7fb24..e68e43886d3cc23439f30210e88b517911bf395e 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/kmod.h>
-#include <asm/hardirq.h>
 #include <asm/kmap_types.h>
 
 extern enum km_type crypto_km_types[];
index a57ba84eb2c6a467e17bf146ffc8d16aaeb4ed4b..9317f3f3191c0b24ce900665974db4eb19f97ee4 100644 (file)
@@ -12,7 +12,7 @@
 #include <linux/init.h>
 #include <linux/timer.h>
 #include <linux/vmalloc.h>
-#include <asm/hardirq.h>
+#include <linux/interrupt.h>
 #include <linux/bitops.h>
 #include <asm/semaphore.h>
 
index 26063cb6a007dbee1f3f23c230fcd3fed74dd087..d53843abe02d70ecb35fcd7df4eff52418330b76 100644 (file)
@@ -16,7 +16,7 @@
  *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <asm/hardirq.h>
+#include <linux/interrupt.h>
 
 
 #define disable(oldspl) save_flags (oldspl)
index f20842c5e014153b80a563650fb5983705eb88b4..1babc0f87bc2b0d05c2863a540f83b45bdce7c63 100644 (file)
@@ -52,7 +52,6 @@
 #include <asm/system.h>
 #include <asm/sections.h>
 #include <asm/irq.h>
-#include <asm/hardirq.h>
 #include <asm/pmac_feature.h>
 #include <asm/uaccess.h>
 #include <asm/mmu_context.h>
index 38e59dd243326a81e7a3a88790ca144d99b6cc17..f27b1649d024249dd3597368dc2d1e9ea601e8e8 100644 (file)
@@ -17,8 +17,8 @@
 #include <linux/slab.h>
 #include <linux/device.h>
 #include <linux/kernel_stat.h>
+#include <linux/interrupt.h>
 
-#include <asm/hardirq.h>
 #include <asm/cio.h>
 #include <asm/delay.h>
 #include <asm/irq.h>
index e188ed9cf87071179ebe5eb93930d0ffe6cb8741..10be402fcb26dde9cf87885260339706097fd69a 100644 (file)
@@ -39,20 +39,6 @@ typedef struct {
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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 nestable IRQ sources in the system
@@ -64,28 +50,7 @@ typedef struct {
 #error HARDIRQ_BITS is too low!
 #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)
-
-
-#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()                                             \
 do {                                                           \
                preempt_count() -= IRQ_EXIT_OFFSET;             \
@@ -95,10 +60,4 @@ do {                                                         \
                preempt_enable_no_resched();                    \
 } 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 */
index f5b478f16a52640dc37567073450ab84071e6025..3f734c4de7f04caf786b836618940822799cc7f0 100644 (file)
@@ -41,20 +41,6 @@ typedef struct {
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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 in the system nesting
@@ -64,29 +50,9 @@ typedef struct {
 # error HARDIRQ_BITS is too low!
 #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)
 
-#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
-
 extern asmlinkage void __do_softirq(void);
 
 #define irq_exit()                                                     \
@@ -96,10 +62,6 @@ extern asmlinkage void __do_softirq(void);
                        __do_softirq();                                 \
                preempt_enable_no_resched();                            \
        } while (0)
-
-#define synchronize_irq(irq)   barrier()
-#else
-extern void synchronize_irq(unsigned int irq);
 #endif
 
 #endif /* __ASM_HARDIRQ_H */
index 623b5f8fbb315959abca967c62205238c96b317b..52feb957f3e70d938e2a264d1de18b816c771b2a 100644 (file)
@@ -32,20 +32,6 @@ typedef struct {
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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 in the system nesting
@@ -55,26 +41,8 @@ typedef struct {
 # error HARDIRQ_BITS is too low!
 #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)
 
-#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
 #define irq_exit()                                                     \
        do {                                                            \
@@ -84,9 +52,6 @@ typedef struct {
                preempt_enable_no_resched();                            \
        } while (0)
 
-#define synchronize_irq(irq)   barrier()
-#else
-#error SMP not supported
 #endif
 
 #endif /* __ASM_HARDIRQ_H */
index c75100f8359b4cc5f252038d8dbf856a5633c59a..4e28c83324adfb756366958e7960949fe362e32a 100644 (file)
@@ -40,20 +40,6 @@ typedef struct {
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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 in the system
@@ -63,27 +49,7 @@ typedef struct {
 # error HARDIRQ_BITS is too low!
 #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)
-
-#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()                                                     \
 do {                                                                   \
                preempt_count() -= IRQ_EXIT_OFFSET;                     \
@@ -92,6 +58,4 @@ do {                                                                  \
                preempt_enable_no_resched();                            \
 } while (0)
 
-#define synchronize_irq(irq)   barrier()
-
 #endif /* __ASM_HARDIRQ_H */
index c814b2f840ba6f708b0ba7233e63f581f440aeb7..16fc00360f7582eef14a9934c9d6fe7f3abf7f7c 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <linux/config.h>
 #include <linux/percpu.h>
+#include <linux/hardirq.h>
 #include <asm/types.h>
-#include <asm/hardirq.h>
 
 /* An unsigned long type for operations which are atomic for a single
  * CPU.  Usually used in combination with per-cpu variables. */
index c0941a080bdd217c11f1e6793af3361d3b2caf32..c878cc44b6cb4c4928b9ebf959c77ce2e0f755e5 100644 (file)
@@ -38,20 +38,6 @@ typedef struct {
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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 in the system
@@ -61,27 +47,7 @@ typedef struct {
 # error HARDIRQ_BITS is too low!
 #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)
-
-#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()                                                     \
 do {                                                                   \
                preempt_count() -= IRQ_EXIT_OFFSET;                     \
@@ -90,10 +56,4 @@ do {                                                                 \
                preempt_enable_no_resched();                            \
 } while (0)
 
-#ifndef CONFIG_SMP
-# define synchronize_irq(irq)  barrier()
-#else
-# error h8300 SMP is not available
-#endif /* CONFIG_SMP */
-
 #endif
index 52fe4d99308526b9bfca9ecc231c7724616bad4c..8f5a07555667fddba580995bec1c0a55e62afdbe 100644 (file)
@@ -37,20 +37,6 @@ typedef struct {
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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 in the system
@@ -60,30 +46,10 @@ typedef struct {
 # error HARDIRQ_BITS is too low!
 #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_exit()             (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_enter()            (preempt_count() += HARDIRQ_OFFSET)
 #define irq_exit()                                                     \
 do {                                                                   \
                preempt_count() -= IRQ_EXIT_OFFSET;                     \
@@ -92,10 +58,4 @@ do {                                                                 \
                preempt_enable_no_resched();                            \
 } 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 */
index ec603240e3fedaff2eaf09e4bdbb2f8c22a959bf..f3ffa6340c4ba30e661e2851d60c0468d300fa8a 100644 (file)
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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
  * in the system nesting on a single CPU:
 # error HARDIRQ_BITS is too low!
 #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 */
index 80c86ec3ba74bb3f76a903faab8290228a71c238..c74ad7709210a844330c9d829325b1a89b356625 100644 (file)
@@ -35,20 +35,6 @@ typedef struct {
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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 in the system
@@ -58,27 +44,7 @@ typedef struct {
 # error HARDIRQ_BITS is too low!
 #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)
-
-#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()                                                     \
 do {                                                                   \
                preempt_count() -= IRQ_EXIT_OFFSET;                     \
@@ -87,6 +53,4 @@ do {                                                                  \
                preempt_enable_no_resched();                            \
 } while (0)
 
-#define synchronize_irq(irq)   barrier()
-
 #endif
index 5a9c74c09e50c3db3f81632ca04b1bd4d80f7d11..f0f36fca11bb73bfb53fa94f6d65ca5f5233fdbe 100644 (file)
@@ -51,7 +51,7 @@ asmlinkage void resume(void);
 #if 0
 #define local_irq_enable() asm volatile ("andiw %0,%%sr": : "i" (ALLOWINT) : "memory")
 #else
-#include <asm/hardirq.h>
+#include <linux/hardirq.h>
 #define local_irq_enable() ({                                                  \
        if (MACH_IS_Q40 || !hardirq_count())                                    \
                asm volatile ("andiw %0,%%sr": : "i" (ALLOWINT) : "memory");    \
index f8dbdf2de0e7d34c8cb368ace64c94e7b348ee43..840eac2812ae2c9116700516510770f229e598bb 100644 (file)
@@ -36,20 +36,6 @@ typedef struct {
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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 in the system
@@ -59,33 +45,7 @@ typedef struct {
 # error HARDIRQ_BITS is too low!
 #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)
-
-#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()                                                     \
 do {                                                                   \
                preempt_count() -= IRQ_EXIT_OFFSET;                     \
@@ -94,10 +54,4 @@ do {                                                                 \
                preempt_enable_no_resched();                            \
 } while (0)
 
-#ifndef CONFIG_SMP
-# define synchronize_irq(irq)  barrier()
-#else
-# error m68knommu SMP is not available
-#endif /* CONFIG_SMP */
-
 #endif /* __M68K_HARDIRQ_H */
index a045970ebd9e1ea86089e789048e8e0cbcb6528d..7562703b44e2a0e0b7b97b6ce735776d86759d9d 100644 (file)
@@ -43,20 +43,6 @@ typedef struct {
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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 in the system
@@ -66,27 +52,7 @@ typedef struct {
 # error HARDIRQ_BITS is too low!
 #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)
-
-#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()                                                     \
 do {                                                                   \
        preempt_count() -= IRQ_EXIT_OFFSET;                     \
@@ -95,10 +61,4 @@ do {                                                                   \
        preempt_enable_no_resched();                            \
 } 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 */
index dc9b4b73886bbd3a54e5b53106c4638b68745bda..7ebdebbe539ef3155af1df46c2ab0aecc5552181 100644 (file)
@@ -51,20 +51,6 @@ typedef struct {
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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
  * in the system nesting on a single CPU:
@@ -73,29 +59,7 @@ typedef struct {
 # error HARDIRQ_BITS is too low!
 #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)
-
-#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()                                                             \
 do {                                                                           \
                preempt_count() -= IRQ_EXIT_OFFSET;                             \
@@ -104,10 +68,4 @@ do {                                                                                \
                preempt_enable_no_resched();                                    \
 } 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 */
index 2531c3bdb5bfa9257e58d9cf9c616b3082f3b5d1..dfb847253e6c189ed3804967939e67e6a346c27b 100644 (file)
@@ -44,20 +44,6 @@ typedef struct {
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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 in the system
@@ -67,31 +53,7 @@ typedef struct {
 # error HARDIRQ_BITS is too low!
 #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)
-
-#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()                                                     \
 do {                                                                   \
        preempt_count() -= IRQ_EXIT_OFFSET;                             \
@@ -100,11 +62,5 @@ do {                                                                        \
        preempt_enable_no_resched();                                    \
 } 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 /* __KERNEL__ */
index e1a2fec9ffc0501a0d70ba606926f89440fd94ba..c09a7486dd98e370065cbc0bde73a9da21aba790 100644 (file)
@@ -1,4 +1,3 @@
-#ifdef __KERNEL__
 #ifndef __ASM_HARDIRQ_H
 #define __ASM_HARDIRQ_H
 
@@ -43,20 +42,6 @@ typedef struct {
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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
  * space for potentially all IRQ sources in the system
@@ -66,29 +51,7 @@ typedef struct {
 # error HARDIRQ_BITS is too low!
 #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)
-
-#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()                                                     \
 do {                                                                   \
                preempt_count() -= IRQ_EXIT_OFFSET;                     \
@@ -97,12 +60,4 @@ do {                                                                 \
                preempt_enable_no_resched();                            \
 } 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 */
index 1092143b8b975cac375bf048228d1a31c03de7e2..acbdf0c8bbb40eed3280d802a526ff54b4078236 100644 (file)
@@ -61,51 +61,15 @@ softirq_pending(unsigned int cpu)
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_BITS)
 #define HARDIRQ_SHIFT  (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
 
-#define __MASK(x)      ((1UL << (x))-1)
-
-#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())
-
+extern void do_call_softirq(void);
+extern void account_ticks(struct pt_regs *);
 
-#define hardirq_trylock()      (!in_interrupt())
-#define hardirq_endlock()      do { } while (0)
+#define invoke_softirq() do_call_softirq()
 
 #define irq_enter()                                                    \
 do {                                                                   \
        (preempt_count() += HARDIRQ_OFFSET);                            \
 } 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()                                                     \
 do {                                                                   \
        preempt_count() -= IRQ_EXIT_OFFSET;                             \
index cac6b3080725a86d5c83d926cef6dd845a1cc262..916a1aa0b07302f8100ca87b4fd8b3b8461cedc8 100644 (file)
@@ -2,7 +2,7 @@
 #define _ASM_IRQ_H
 
 #ifdef __KERNEL__
-#include <asm/hardirq.h>
+#include <linux/hardirq.h>
 
 /*
  * the definition of irqs has changed in 2.5.46:
index a57b94d22ecaa651db6080fd253084394c0ed85e..1d7135a7dcde0c513da13565694da94b5045c22d 100644 (file)
@@ -35,20 +35,6 @@ typedef struct {
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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 in the system
@@ -58,29 +44,10 @@ typedef struct {
 # error HARDIRQ_BITS is too low!
 #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_exit()             (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_enter()            (preempt_count() += HARDIRQ_OFFSET)
 #define irq_exit()                                                     \
 do {                                                                   \
                preempt_count() -= IRQ_EXIT_OFFSET;                     \
@@ -89,10 +56,4 @@ do {                                                                 \
                preempt_enable_no_resched();                            \
 } 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 */
index e882cf49088a5f5e16804e7d3ffe8e01af754126..548b44167a9d6ada684a3be0d11bc411a2874ced 100644 (file)
@@ -42,42 +42,7 @@ typedef struct {
 #define SOFTIRQ_SHIFT   (PREEMPT_SHIFT + PREEMPT_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)
-
-#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()                                                      \
 do {                                                                    \
                 preempt_count() -= IRQ_EXIT_OFFSET;                     \
@@ -86,10 +51,4 @@ do {                                                                    \
                 preempt_enable_no_resched();                            \
 } 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 */
index cae78abf215823f4bde78d603a6921caaed7b4a2..ac63de5505080f1651adcefa02be40541396abeb 100644 (file)
@@ -41,42 +41,7 @@ typedef struct {
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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)
-
-#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()                                                     \
 do {                                                                   \
                preempt_count() -= IRQ_EXIT_OFFSET;                     \
@@ -85,10 +50,4 @@ do {                                                                 \
                preempt_enable_no_resched();                            \
 } 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) */
index a997f9f8fdd7835bcc946bc9a251e9d5634a4c58..7493d6d486824252fdd093acd53806f211fb2987 100644 (file)
@@ -36,20 +36,6 @@ typedef struct {
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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 in the system
@@ -59,27 +45,7 @@ typedef struct {
 # error HARDIRQ_BITS is too low!
 #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)
-
-#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()                                                           \
 do {                                                                         \
        preempt_count() -= IRQ_EXIT_OFFSET;                                   \
@@ -88,10 +54,4 @@ do {                                                                       \
        preempt_enable_no_resched();                                          \
 } while (0)
 
-#ifndef CONFIG_SMP
-# define synchronize_irq(irq)  barrier()
-#else
-# error v850nommu SMP is not available
-#endif /* CONFIG_SMP */
-
 #endif /* __V850_HARDIRQ_H__ */
index d3c08b2a07695a134856c3e659738764a76b9009..9ce1a78084e866cec5700f23ede694bfaae5fb99 100644 (file)
 #define SOFTIRQ_SHIFT  (PREEMPT_SHIFT + PREEMPT_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 in the system
 # error HARDIRQ_BITS is too low!
 #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_exit()             (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_enter()            (preempt_count() += HARDIRQ_OFFSET)
 #define irq_exit()                                                     \
 do {                                                                   \
                preempt_count() -= IRQ_EXIT_OFFSET;                     \
@@ -93,10 +58,4 @@ do {                                                                 \
                preempt_enable_no_resched();                            \
 } 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 */
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
new file mode 100644 (file)
index 0000000..6ab0b3d
--- /dev/null
@@ -0,0 +1,51 @@
+#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 */
index 565321b0521311c60f73a3362a5048d38cd277cf..c7bf3795900999a6be010d033e790d6ef885a6d8 100644 (file)
@@ -8,8 +8,8 @@
 #include <linux/bitops.h>
 #include <linux/preempt.h>
 #include <linux/cpumask.h>
+#include <linux/hardirq.h>
 #include <asm/atomic.h>
-#include <asm/hardirq.h>
 #include <asm/ptrace.h>
 #include <asm/system.h>
 
index 034cf3084a778c91c77c49d7de020840946cbd2f..a3f44754ac08129d6f7aae209e3dc5f3c9e9bbd4 100644 (file)
@@ -16,7 +16,7 @@
 #define _NET_IPV6_H
 
 #include <linux/ipv6.h>
-#include <asm/hardirq.h>
+#include <linux/hardirq.h>
 #include <net/ndisc.h>
 #include <net/flow.h>
 #include <net/snmp.h>
index a7e2c3c0a5fd6c2af284dc1fc7a5b7443deb0cf2..8976224f5ae1e9ebecd4042efd737f4032746f82 100644 (file)
@@ -65,7 +65,6 @@
 #include <linux/ac97_codec.h>
 #include <linux/interrupt.h>
 #include <asm/uaccess.h>
-#include <asm/hardirq.h>
 
 #ifndef PCI_DEVICE_ID_ALI_5455
 #define PCI_DEVICE_ID_ALI_5455 0x5455
index ccfbad2dd02fbba35cea528f0d703659fc7098c5..c5d220e366dbd7143f1813a3d32deae98d40091c 100644 (file)
@@ -67,9 +67,9 @@
 #include <linux/smp_lock.h>
 #include <linux/ac97_codec.h>
 #include <linux/wrapper.h>
+#include <linux/interrupt.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
-#include <asm/hardirq.h>
 #include <asm/au1000.h>
 #include <asm/au1000_dma.h>
 
index a681f7b9690553516488592e35f6aa5aae76b3e1..c212b948c423cf079f9668bfd57f0a61a0a9e845 100644 (file)
@@ -94,7 +94,6 @@
 #include <asm/io.h>
 #include <asm/dma.h>
 #include <asm/uaccess.h>
-#include <asm/hardirq.h>
 
 #include "cs46xxpm-24.h"
 #include "cs46xx_wrapper-24.h"
index ac4badae5f5e089e6c98631f1cacbf1bd59e65c7..67b2bbb2aa101f0c5867e75cd272b58479e3152d 100644 (file)
@@ -45,7 +45,6 @@
 #include <linux/proc_fs.h>
 
 #include <asm/uaccess.h>
-#include <asm/hardirq.h>
 #include <asm/io.h>
 
 #define DRIVER_NAME    "forte"
index 24837f7d7427e762e7effc7930abd3e89b5048ea..47e5bed02bb0715911be378d3b58833acfd4deac 100644 (file)
 #include <linux/ac97_codec.h>
 #include <linux/bitops.h>
 #include <asm/uaccess.h>
-#include <asm/hardirq.h>
 
 #define DRIVER_VERSION "1.01"
 
index 16e7d01efec2a259fbb58669a325f11c53fa09b0..f98413314733ca461787097c84188e80cd3ffd2d 100644 (file)
 #include <linux/spinlock.h>
 #include <linux/smp_lock.h>
 #include <linux/ac97_codec.h>
+#include <linux/interrupt.h>
 #include <asm/io.h>
 #include <asm/dma.h>
 #include <asm/uaccess.h>
-#include <asm/hardirq.h>
 #include <asm/it8172/it8172.h>
 
 /* --------------------------------------------------------------------- */
index b40611b422a0674de4a733d7bd6f9c233135c3d7..0242f9021079bd2907967a80efe7802ce4dcd702 100644 (file)
@@ -82,7 +82,6 @@
 #include <asm/io.h>
 #include <asm/dma.h>
 #include <asm/uaccess.h>
-#include <asm/hardirq.h>
 
 /* -------------------debug macros -------------------------------------- */
 /* #undef VRC5477_AC97_DEBUG */
index 3df045dd55f9640928781d5f08a187a8603e508f..c770137f788065fdcb4826924cd5c7cd2e5ab6f2 100644 (file)
@@ -54,7 +54,7 @@ TODO:
 #include <linux/smp_lock.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
-#include <asm/hardirq.h>
+#include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/poll.h>
index 4846dc2cb12138e99d2b742935d50019de6d62b9..dee5a912d6652de3013ff2bfd5fea89ecbf3f95f 100644 (file)
@@ -70,6 +70,7 @@
 #include <linux/ac97_codec.h>
 #include <linux/pci.h>
 #include <linux/bitops.h>
+#include <linux/interrupt.h>
 #include <asm/io.h>
 #include <asm/dma.h>
 #include <linux/init.h>
@@ -77,7 +78,6 @@
 #include <linux/smp_lock.h>
 #include <linux/wrapper.h>
 #include <asm/uaccess.h>
-#include <asm/hardirq.h>
 
 #include <asm/sibyte/sb1250_regs.h>
 #include <asm/sibyte/sb1250_int.h>
index 1beb4e9ffe89ab570e43e1afea502f3f8e5a34a0..813a27e185d348e14fd849cbeebfefb409a51da8 100644 (file)
 #include <linux/gameport.h>
 #include <linux/kernel.h>
 #include <asm/uaccess.h>
-#include <asm/hardirq.h>
 #include <asm/io.h>
 #include <asm/dma.h>