aboutsummaryrefslogtreecommitdiffstats
path: root/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/irq.c
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2003-03-25 14:10:16 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2003-03-25 14:10:16 +0000
commit40d269696c5de58c38df86d11f7debfb970c474d (patch)
tree155601347e039cf9acc7533ed98c49376071c47d /old/xenolinux-2.4.16-sparse/arch/xeno/kernel/irq.c
parent82a3e7c6c21b9d8eddc706c652cf57f73de5af21 (diff)
downloadxen-40d269696c5de58c38df86d11f7debfb970c474d.tar.gz
xen-40d269696c5de58c38df86d11f7debfb970c474d.tar.bz2
xen-40d269696c5de58c38df86d11f7debfb970c474d.zip
bitkeeper revision 1.160 (3e806348iI6F7p-OrCqKtE4h8_NgxQ)
.del-xor.h~2cd144e48fc282fb: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/xor.h .del-vga.h~f739bcd0d15a060b: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/vga.h .del-user.h~2416efc51bfdf653: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/user.h .del-unistd.h~542a4265bbde875f: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/unistd.h .del-unaligned.h~3720d8e6f6489c70: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/unaligned.h .del-ucontext.h~7c514eccb96e5c2c: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/ucontext.h .del-uaccess.h~1db7128cf065d28: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/uaccess.h .del-types.h~6f89af02373cf40e: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/types.h .del-tlb.h~36a10111face8cf8: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/tlb.h .del-timex.h~14ba40d5403480f8: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/timex.h .del-termios.h~10cb1919354bb3c: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/termios.h .del-termbits.h~9f49d578b6425137: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/termbits.h .del-system.h~1209f9cb8d09be: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/system.h .del-swapfile.c~28c1c327b22a067f: Delete: old/xenolinux-2.4.16-sparse/mm/swapfile.c .del-string.h~1bd164bf2f37435a: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/string.h .del-string-486.h~70f2949afd4c7217: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/string-486.h .del-statfs.h~925b3af593956e2d: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/statfs.h .del-stat.h~e85bc81529de3a4a: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/stat.h .del-panic.c~5033fabb3f2e710c: Delete: old/xenolinux-2.4.16-sparse/kernel/panic.c .del-mremap.c~5787787c5a3b49d: Delete: old/xenolinux-2.4.16-sparse/mm/mremap.c .del-memory.c~ec1a749ca2ed8acd: Delete: old/xenolinux-2.4.16-sparse/mm/memory.c .del-major.h~7653e946e9bf8159: Delete: old/xenolinux-2.4.16-sparse/include/linux/major.h .del-main.c~de169eb833d5a5cb: Delete: old/xenolinux-2.4.16-sparse/init/main.c .del-debug.h~e0aa141e34ec6221: Delete: old/xenolinux-2.4.16-sparse/include/linux/sunrpc/debug.h .del-blk.h~87e7b6403472571f: Delete: old/xenolinux-2.4.16-sparse/include/linux/blk.h .del-spinlock.h~fc0a4c0ddea83815: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/spinlock.h .del-softirq.h~c188e7ac18c858a9: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/softirq.h .del-sockios.h~65e1b7ba563df2c: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/sockios.h .del-socket.h~e3ba5757776f00c: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/socket.h .del-smplock.h~72176dfb8142375e: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/smplock.h .del-smp.h~80313a5f7eb193bb: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/smp.h .del-signal.h~2f1c9e8a4364ed8: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/signal.h .del-siginfo.h~348801659d7e1334: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/siginfo.h .del-sigcontext.h~1b647a394613b0dc: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/sigcontext.h .del-shmparam.h~c83ce37d9b16061c: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/shmparam.h .del-shmbuf.h~3ff48e518b9ecb0a: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/shmbuf.h .del-setup.h~2d7d5e0b8c7c48dc: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/setup.h .del-serial.h~90dee919c827ab29: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/serial.h .del-sembuf.h~f0fa7347b9fc071: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/sembuf.h .del-semaphore.h~d9f40f7e118c9d3c: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/semaphore.h .del-segment.h~cc492acab0d69477: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/segment.h .del-scatterlist.h~4be6ff4f53a3579b: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/scatterlist.h .del-rwsem.h~c9865b4ec1423b3a: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/rwsem.h .del-rwlock.h~3e6f58ae32c920e9: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/rwlock.h .del-resource.h~7e8eaa833cc25dca: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/resource.h .del-ptrace.h~c55079be77b9ee19: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/ptrace.h .del-processor.h~52612a255dfb7cbb: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/processor.h .del-posix_types.h~b6e7c803f3dbab8: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/posix_types.h .del-poll.h~f9b451e3ea9e50c: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/poll.h .del-pgtable.h~43ac63ace2e93820: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/pgtable.h .del-pgtable-3level.h~abbe18b96121bd83: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/pgtable-3level.h .del-pgtable-2level.h~8fe0307e54d8bf9b: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/pgtable-2level.h .del-pgalloc.h~9e75e06aeb89d316: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/pgalloc.h .del-parport.h~cff09d1bc0f89454: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/parport.h .del-param.h~471736b770596742: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/param.h .del-page.h~865cbedbe3bc818e: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/page.h .del-namei.h~38354dac74ae2dd8: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/namei.h .del-mtrr.h~ea4e1ec9703521e8: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/mtrr.h .del-msr.h~a6998ff4f5da0e0c: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/msr.h .del-msgbuf.h~5da37442976489a0: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/msgbuf.h .del-mpspec.h~381f4baa7d484bfb: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/mpspec.h .del-module.h~5a2fa3572f0b6bae: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/module.h .del-mmx.h~ef22db6d3bb87f3a: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/mmx.h .del-mmu_context.h~9fbf061b3d508d67: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/mmu_context.h .del-mmu.h~ba2b86348e168416: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/mmu.h .del-mman.h~18ee2a138def6b36: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/mman.h .del-mca_dma.h~eddb775e770502cb: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/mca_dma.h .del-mc146818rtc.h~c21b56e82a291c22: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/mc146818rtc.h .del-math_emu.h~4613a62a919e4aa1: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/math_emu.h .del-locks.h~399a95316c4c9ba7: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/locks.h .del-linux_logo.h~a388673ba10b8bf8: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/linux_logo.h .del-ldt.h~c03c75bf2fa23f40: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/ldt.h .del-kmap_types.h~eed873e2f55dcd50: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/kmap_types.h .del-keyboard.h~3d6d63ef29bf066c: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/keyboard.h .del-kdbprivate.h~8d8ff2e38b419e4c: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/kdbprivate.h .del-kdb.h~1981de7db9b5d353: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/kdb.h .del-irq.h~4702eca4cd45e793: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/irq.h .del-ipcbuf.h~f3ed215ace7ac98f: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/ipcbuf.h .del-ipc.h~8e9498e43aadf144: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/ipc.h .del-ioctls.h~263229b882e93cfd: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/ioctls.h .del-ioctl.h~bac00725b5ef0269: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/ioctl.h .del-io_apic.h~d3ebb23a7540d727: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/io_apic.h .del-io.h~28def6bcf143a288: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/io.h .del-init.h~f94c9cf325ec8a73: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/init.h .del-ide.h~1f18b51858f7de58: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/ide.h .del-i387.h~a09953497f47e974: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/i387.h .del-hypervisor.h~d2b860c8a01e7b7d: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor.h .del-hypervisor-ifs~7df8ec9215cf9987: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs .del-hw_irq.h~85b1e98ab3922232: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/hw_irq.h .del-highmem.h~961c664eb3006cf6: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/highmem.h .del-hdreg.h~af3fea048084de8c: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/hdreg.h .del-hardirq.h~b78749db9e13d06: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/hardirq.h .del-floppy.h~fc1f18b688d0a155: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/floppy.h .del-fixmap.h~63fec5045e83d303: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/fixmap.h .del-fcntl.h~5e345023494b641: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/fcntl.h .del-errno.h~2d307a9167d276be: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/errno.h .del-elf.h~5b4118314cd7dda8: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/elf.h .del-dma.h~bfdf9bdb575308fb: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/dma.h .del-div64.h~e6438de5f5adcdad: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/div64.h .del-desc.h~b339bfef4b0848b3: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/desc.h .del-delay.h~4f5c1f98fef9f480: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/delay.h .del-debugreg.h~94ad0b2f7ce81945: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/debugreg.h .del-current.h~4693f192fd42b4a6: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/current.h .del-cpufeature.h~9ee68ee4f8b525fd: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/cpufeature.h .del-checksum.h~db4bcfc8958c5d3f: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/checksum.h .del-cache.h~64626a79a0712d70: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/cache.h .del-byteorder.h~404697d4e47c3345: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/byteorder.h .del-bugs.h~df29bf2b4f74ccaf: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/bugs.h .del-boot.h~c7462d481f4a9: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/boot.h .del-bitops.h~ef7ea34f8a17ed86: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/bitops.h .del-atomic.h~55cde2d93d09526: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/atomic.h .del-apicdef.h~4ce7611333e9d1fc: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/apicdef.h .del-usercopy.c~b60ef441a832ff84: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/lib/usercopy.c .del-tty_io.c~b7ee058bd0b4d969: Delete: old/xenolinux-2.4.16-sparse/drivers/char/tty_io.c .del-traps.c~58f6978ca3914806: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/traps.c .del-time.c~8772141ba7a5b7be: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/time.c .del-sys_i386.c~f84bd504c2085dda: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/sys_i386.c .del-strstr.c~e80f16ebdccc4062: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/lib/strstr.c .del-signal.c~45454d7374cce0a1: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/signal.c .del-setup.c~6f22e121db6f1bc: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/setup.c .del-semaphore.c~3e7a2194beb1c8e4: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/semaphore.c .del-rd.c~99ae381b254bd356: Delete: old/xenolinux-2.4.16-sparse/drivers/block/rd.c .del-ptrace.c~8cb5d0b722ab58b9: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/ptrace.c .del-process.c~ab23652fb4106ce3: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/process.c .del-old-checksum.c~c3dfe224f68ed131: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/lib/old-checksum.c .del-mmx.c~3f27e7b4c5f3d68d: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/lib/mmx.c .del-mmu_context.c~ef75b8e1f894e729: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/mm/mmu_context.c .del-memcpy.c~91d0cb7e4e922f6e: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/lib/memcpy.c .del-ll_rw_blk.c~2c64b7fc36db523: Delete: old/xenolinux-2.4.16-sparse/drivers/block/ll_rw_blk.c .del-ldt.c~102d26cc1b63c830: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/ldt.c .del-irq.c~2bd9b09d889fd6b8: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/irq.c .del-ioport.c~2d86d4fbba2e2583: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/ioport.c .del-iodebug.c~982cc58799104651: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/lib/iodebug.c .del-init_task.c~53258077ed40d6be: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/init_task.c .del-init.c~3693c99014d6fc0d: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/mm/init.c .del-i387.c~571a2fa27676375: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/i387.c .del-i386_ksyms.c~68a55ed15a69598: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/i386_ksyms.c .del-hypervisor.c~a227c7d0b6a5fd42: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/mm/hypervisor.c .del-getuser.S~1ef189b582390381: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/lib/getuser.S .del-get_unmapped_area.c~3ad7561469aabec: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/mm/get_unmapped_area.c .del-fault.c~4f5a4a1859484525: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/mm/fault.c .del-extable.c~b98087717f427f26: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/mm/extable.c .del-exec.c~2557f6564ffdb2e0: Delete: old/xenolinux-2.4.16-sparse/fs/exec.c .del-delay.c~bddd92dcfafdf5ce: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/lib/delay.c .del-dec_and_lock.c~5ac45f1c3a6593c: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/lib/dec_and_lock.c .del-checksum.S~be8f8ce2d8964249: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/lib/checksum.S .del-apic.h~7e52954d00c0c4f: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/apic.h .del-a.out.h~7ace48e4361e6b64: Delete: old/xenolinux-2.4.16-sparse/include/asm-xeno/a.out.h .del-Makefile~92a08e51252c8752: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/lib/Makefile .del-Makefile~4b457be6621a5d5a: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/mm/Makefile .del-Config.in~e79aa726643e8d8f: Delete: old/xenolinux-2.4.16-sparse/drivers/block/Config.in .del-xl_block_test.c~aac5669d8f638637: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/drivers/block/xl_block_test.c .del-xl_block.c~cee1f87e3b5f99a: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/drivers/block/xl_block.c .del-vmlinux.lds~95fa124a7440e17f: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/vmlinux.lds .del-vfr.c~32830c0144380827: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/vfr.c .del-network.c~cc961aaabe0a0a77: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/drivers/network/network.c .del-mk~196fb97e64c3e303: Delete: old/xenolinux-2.4.16-sparse/mk .del-hypervisor.c~78a3960ab18cdbd5: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/hypervisor.c .del-head.S~7976f74358c43bf7: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/head.S .del-entry.S~126fc1af28caab2f: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/entry.S .del-dom0_ops.h~ebc6f2ba40efd4f8: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_ops.h .del-dom0_memory.c~89a290b73b42dafb: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_memory.c .del-dom0_core.c~b6447635a1dff297: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_core.c .del-dom0_block.c~56aa20e79fb98f4a: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_block.c .del-defconfig~4e50d7fc220d1aab: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/defconfig .del-console.c~de0ee868d96d8dbe: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/drivers/console/console.c .del-config.in~4afe788e4691d222: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/config.in .del-Makefile~fda4420ca7a5c777: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/Makefile .del-Makefile~d7ea62ca90003f31: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/boot/Makefile .del-Makefile~c6614e5f6a40fe8: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/drivers/console/Makefile .del-Makefile~8f946627850d08: Delete: old/xenolinux-2.4.16-sparse/Makefile .del-Makefile~4b0def0c8c803698: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/drivers/block/Makefile .del-Makefile~40bc4fd761c2e3e4: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/Makefile .del-Makefile~225ee771b0fb73fa: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/kernel/Makefile .del-Makefile~1d57425ac7aac33: Delete: old/xenolinux-2.4.16-sparse/arch/xeno/drivers/network/Makefile
Diffstat (limited to 'old/xenolinux-2.4.16-sparse/arch/xeno/kernel/irq.c')
-rw-r--r--old/xenolinux-2.4.16-sparse/arch/xeno/kernel/irq.c1129
1 files changed, 0 insertions, 1129 deletions
diff --git a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/irq.c b/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/irq.c
deleted file mode 100644
index 7c855904ae..0000000000
--- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/irq.c
+++ /dev/null
@@ -1,1129 +0,0 @@
-/*
- * linux/arch/i386/kernel/irq.c
- *
- * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
- *
- * This file contains the code used by various IRQ handling routines:
- * asking for different IRQ's should be done through these routines
- * instead of just grabbing them. Thus setups with different IRQ numbers
- * shouldn't result in any weird surprises, and installing new handlers
- * should be easier.
- */
-
-/*
- * (mostly architecture independent, will move to kernel/irq.c in 2.5.)
- *
- * IRQs are in fact implemented a bit like signal handlers for the kernel.
- * Naturally it's not a 1:1 relation, but there are similarities.
- */
-
-#include <linux/config.h>
-#include <linux/ptrace.h>
-#include <linux/errno.h>
-#include <linux/signal.h>
-#include <linux/sched.h>
-#include <linux/ioport.h>
-#include <linux/interrupt.h>
-#include <linux/timex.h>
-#include <linux/slab.h>
-#include <linux/random.h>
-#include <linux/smp_lock.h>
-#include <linux/init.h>
-#include <linux/kernel_stat.h>
-#include <linux/irq.h>
-#include <linux/proc_fs.h>
-#include <linux/kdb.h>
-
-#include <asm/atomic.h>
-#include <asm/io.h>
-#include <asm/smp.h>
-#include <asm/system.h>
-#include <asm/bitops.h>
-#include <asm/uaccess.h>
-#include <asm/pgalloc.h>
-#include <asm/delay.h>
-#include <asm/desc.h>
-#include <asm/irq.h>
-
-
-
-/*
- * Linux has a controller-independent x86 interrupt architecture.
- * every controller has a 'controller-template', that is used
- * by the main code to do the right thing. Each driver-visible
- * interrupt source is transparently wired to the apropriate
- * controller. Thus drivers need not be aware of the
- * interrupt-controller.
- *
- * Various interrupt controllers we handle: 8259 PIC, SMP IO-APIC,
- * PIIX4's internal 8259 PIC and SGI's Visual Workstation Cobalt (IO-)APIC.
- * (IO-APICs assumed to be messaging to Pentium local-APICs)
- *
- * the code is designed to be easily extended with new/different
- * interrupt controllers, without having to do assembly magic.
- */
-
-/*
- * Controller mappings for all interrupt sources:
- */
-irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned =
- { [0 ... NR_IRQS-1] = { 0, &no_irq_type, NULL, 0, SPIN_LOCK_UNLOCKED}};
-
-static void register_irq_proc (unsigned int irq);
-
-/*
- * Special irq handlers.
- */
-
-void no_action(int cpl, void *dev_id, struct pt_regs *regs) { }
-
-/*
- * Generic no controller code
- */
-
-static void enable_none(unsigned int irq) { }
-static unsigned int startup_none(unsigned int irq) { return 0; }
-static void disable_none(unsigned int irq) { }
-static void ack_none(unsigned int irq)
-{
- printk("unexpected IRQ trap at vector %02x\n", irq);
-}
-
-/* startup is the same as "enable", shutdown is same as "disable" */
-#define shutdown_none disable_none
-#define end_none enable_none
-
-struct hw_interrupt_type no_irq_type = {
- "none",
- startup_none,
- shutdown_none,
- enable_none,
- disable_none,
- ack_none,
- end_none
-};
-
-atomic_t irq_err_count;
-#ifdef CONFIG_X86_IO_APIC
-#ifdef APIC_MISMATCH_DEBUG
-atomic_t irq_mis_count;
-#endif
-#endif
-
-/*
- * Generic, controller-independent functions:
- */
-
-int get_irq_list(char *buf)
-{
- int i, j;
- struct irqaction * action;
- char *p = buf;
-
- p += sprintf(p, " ");
- for (j=0; j<smp_num_cpus; j++)
- p += sprintf(p, "CPU%d ",j);
- *p++ = '\n';
-
- for (i = 0 ; i < NR_IRQS ; i++) {
- action = irq_desc[i].action;
- if (!action)
- continue;
- p += sprintf(p, "%3d: ",i);
-#ifndef CONFIG_SMP
- p += sprintf(p, "%10u ", kstat_irqs(i));
-#else
- for (j = 0; j < smp_num_cpus; j++)
- p += sprintf(p, "%10u ",
- kstat.irqs[cpu_logical_map(j)][i]);
-#endif
- p += sprintf(p, " %14s", irq_desc[i].handler->typename);
- p += sprintf(p, " %s", action->name);
-
- for (action=action->next; action; action = action->next)
- p += sprintf(p, ", %s", action->name);
- *p++ = '\n';
- }
- p += sprintf(p, "NMI: ");
- for (j = 0; j < smp_num_cpus; j++)
- p += sprintf(p, "%10u ",
- nmi_count(cpu_logical_map(j)));
- p += sprintf(p, "\n");
-#if CONFIG_X86_LOCAL_APIC
- p += sprintf(p, "LOC: ");
- for (j = 0; j < smp_num_cpus; j++)
- p += sprintf(p, "%10u ",
- apic_timer_irqs[cpu_logical_map(j)]);
- p += sprintf(p, "\n");
-#endif
- p += sprintf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
-#ifdef CONFIG_X86_IO_APIC
-#ifdef APIC_MISMATCH_DEBUG
- p += sprintf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
-#endif
-#endif
- return p - buf;
-}
-
-
-/*
- * Global interrupt locks for SMP. Allow interrupts to come in on any
- * CPU, yet make cli/sti act globally to protect critical regions..
- */
-
-#ifdef CONFIG_SMP
-unsigned char global_irq_holder = NO_PROC_ID;
-unsigned volatile long global_irq_lock; /* pendantic: long for set_bit --RR */
-
-extern void show_stack(unsigned long* esp);
-
-static void show(char * str)
-{
- int i;
- int cpu = smp_processor_id();
-
- printk("\n%s, CPU %d:\n", str, cpu);
- printk("irq: %d [",irqs_running());
- for(i=0;i < smp_num_cpus;i++)
- printk(" %d",local_irq_count(i));
- printk(" ]\nbh: %d [",spin_is_locked(&global_bh_lock) ? 1 : 0);
- for(i=0;i < smp_num_cpus;i++)
- printk(" %d",local_bh_count(i));
-
- printk(" ]\nStack dumps:");
- for(i = 0; i < smp_num_cpus; i++) {
- unsigned long esp;
- if (i == cpu)
- continue;
- printk("\nCPU %d:",i);
- esp = init_tss[i].esp0;
- if (!esp) {
- /* tss->esp0 is set to NULL in cpu_init(),
- * it's initialized when the cpu returns to user
- * space. -- manfreds
- */
- printk(" <unknown> ");
- continue;
- }
- esp &= ~(THREAD_SIZE-1);
- esp += sizeof(struct task_struct);
- show_stack((void*)esp);
- }
- printk("\nCPU %d:",cpu);
- show_stack(NULL);
- printk("\n");
-}
-
-#define MAXCOUNT 100000000
-
-/*
- * I had a lockup scenario where a tight loop doing
- * spin_unlock()/spin_lock() on CPU#1 was racing with
- * spin_lock() on CPU#0. CPU#0 should have noticed spin_unlock(), but
- * apparently the spin_unlock() information did not make it
- * through to CPU#0 ... nasty, is this by design, do we have to limit
- * 'memory update oscillation frequency' artificially like here?
- *
- * Such 'high frequency update' races can be avoided by careful design, but
- * some of our major constructs like spinlocks use similar techniques,
- * it would be nice to clarify this issue. Set this define to 0 if you
- * want to check whether your system freezes. I suspect the delay done
- * by SYNC_OTHER_CORES() is in correlation with 'snooping latency', but
- * i thought that such things are guaranteed by design, since we use
- * the 'LOCK' prefix.
- */
-#define SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND 0
-
-#if SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND
-# define SYNC_OTHER_CORES(x) udelay(x+1)
-#else
-/*
- * We have to allow irqs to arrive between __sti and __cli
- */
-# define SYNC_OTHER_CORES(x) __asm__ __volatile__ ("nop")
-#endif
-
-static inline void wait_on_irq(int cpu)
-{
- int count = MAXCOUNT;
-
- for (;;) {
-
- /*
- * Wait until all interrupts are gone. Wait
- * for bottom half handlers unless we're
- * already executing in one..
- */
- if (!irqs_running())
- if (local_bh_count(cpu) || !spin_is_locked(&global_bh_lock))
- break;
-
- /* Duh, we have to loop. Release the lock to avoid deadlocks */
- clear_bit(0,&global_irq_lock);
-
- for (;;) {
- if (!--count) {
- show("wait_on_irq");
- count = ~0;
- }
- __sti();
- SYNC_OTHER_CORES(cpu);
- __cli();
- if (irqs_running())
- continue;
- if (global_irq_lock)
- continue;
- if (!local_bh_count(cpu) && spin_is_locked(&global_bh_lock))
- continue;
- if (!test_and_set_bit(0,&global_irq_lock))
- break;
- }
- }
-}
-
-/*
- * This is called when we want to synchronize with
- * interrupts. We may for example tell a device to
- * stop sending interrupts: but to make sure there
- * are no interrupts that are executing on another
- * CPU we need to call this function.
- */
-void synchronize_irq(void)
-{
- if (irqs_running()) {
- /* Stupid approach */
- cli();
- sti();
- }
-}
-
-static inline void get_irqlock(int cpu)
-{
-#ifdef CONFIG_KDB
- static int kdb_rate;
- if (KDB_IS_RUNNING() && kdb_rate++ < 10)
- kdb_printf("Warning: get_irqlock on cpu %d while kdb is running, may hang\n", smp_processor_id());
-#endif /* CONFIG_KDB */
- if (test_and_set_bit(0,&global_irq_lock)) {
- /* do we already hold the lock? */
- if ((unsigned char) cpu == global_irq_holder)
- return;
- /* Uhhuh.. Somebody else got it. Wait.. */
- do {
- do {
- rep_nop();
- } while (test_bit(0,&global_irq_lock));
- } while (test_and_set_bit(0,&global_irq_lock));
- }
- /*
- * We also to make sure that nobody else is running
- * in an interrupt context.
- */
- wait_on_irq(cpu);
-
- /*
- * Ok, finally..
- */
- global_irq_holder = cpu;
-}
-
-void __global_cli(void)
-{
- panic("__global_cli");
-}
-
-void __global_sti(void)
-{
- panic("__global_sti");
-}
-
-/*
- * SMP flags value to restore to:
- * 0 - global cli
- * 1 - global sti
- * 2 - local cli
- * 3 - local sti
- */
-unsigned long __global_save_flags(void)
-{
- panic("__global_save_flags");
-}
-
-void __global_restore_flags(unsigned long flags)
-{
- panic("__global_restore_flags");
-}
-
-#endif
-
-/*
- * This should really return information about whether
- * we should do bottom half handling etc. Right now we
- * end up _always_ checking the bottom half, which is a
- * waste of time and is not what some drivers would
- * prefer.
- */
-int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action)
-{
- int status;
- int cpu = smp_processor_id();
-
- irq_enter(cpu, irq);
-
- status = 1; /* Force the "do bottom halves" bit */
-
- if (!(action->flags & SA_INTERRUPT))
- __sti();
-
- do {
- status |= action->flags;
- action->handler(irq, action->dev_id, regs);
- action = action->next;
- } while (action);
- if (status & SA_SAMPLE_RANDOM)
- add_interrupt_randomness(irq);
- __cli();
-
- irq_exit(cpu, irq);
-
- return status;
-}
-
-/*
- * Generic enable/disable code: this just calls
- * down into the PIC-specific version for the actual
- * hardware disable after having gotten the irq
- * controller lock.
- */
-
-/**
- * disable_irq_nosync - disable an irq without waiting
- * @irq: Interrupt to disable
- *
- * Disable the selected interrupt line. Disables and Enables are
- * nested.
- * Unlike disable_irq(), this function does not ensure existing
- * instances of the IRQ handler have completed before returning.
- *
- * This function may be called from IRQ context.
- */
-
-inline void disable_irq_nosync(unsigned int irq)
-{
- irq_desc_t *desc = irq_desc + irq;
- unsigned long flags;
-
- spin_lock_irqsave(&desc->lock, flags);
- if (!desc->depth++) {
- desc->status |= IRQ_DISABLED;
- desc->handler->disable(irq);
- }
- spin_unlock_irqrestore(&desc->lock, flags);
-}
-
-/**
- * disable_irq - disable an irq and wait for completion
- * @irq: Interrupt to disable
- *
- * Disable the selected interrupt line. Enables and Disables are
- * nested.
- * This function waits for any pending IRQ handlers for this interrupt
- * to complete before returning. If you use this function while
- * holding a resource the IRQ handler may need you will deadlock.
- *
- * This function may be called - with care - from IRQ context.
- */
-
-void disable_irq(unsigned int irq)
-{
- disable_irq_nosync(irq);
-
- if (!local_irq_count(smp_processor_id())) {
- do {
- barrier();
- cpu_relax();
- } while (irq_desc[irq].status & IRQ_INPROGRESS);
- }
-}
-
-/**
- * enable_irq - enable handling of an irq
- * @irq: Interrupt to enable
- *
- * Undoes the effect of one call to disable_irq(). If this
- * matches the last disable, processing of interrupts on this
- * IRQ line is re-enabled.
- *
- * This function may be called from IRQ context.
- */
-
-void enable_irq(unsigned int irq)
-{
- irq_desc_t *desc = irq_desc + irq;
- unsigned long flags;
-
- spin_lock_irqsave(&desc->lock, flags);
- switch (desc->depth) {
- case 1: {
- unsigned int status = desc->status & ~IRQ_DISABLED;
- desc->status = status;
- if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
- desc->status = status | IRQ_REPLAY;
- hw_resend_irq(desc->handler,irq);
- }
- desc->handler->enable(irq);
- /* fall-through */
- }
- default:
- desc->depth--;
- break;
- case 0:
- printk("enable_irq(%u) unbalanced from %p\n", irq,
- __builtin_return_address(0));
- }
- spin_unlock_irqrestore(&desc->lock, flags);
-}
-
-/*
- * do_IRQ handles all normal device IRQ's (the special
- * SMP cross-CPU interrupts have their own specific
- * handlers).
- */
-asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs)
-{
- /*
- * We ack quickly, we don't want the irq controller
- * thinking we're snobs just because some other CPU has
- * disabled global interrupts (we have already done the
- * INT_ACK cycles, it's too late to try to pretend to the
- * controller that we aren't taking the interrupt).
- *
- * 0 return value means that this irq is already being
- * handled by some other CPU. (or is disabled)
- */
- int cpu = smp_processor_id();
- irq_desc_t *desc = irq_desc + irq;
- struct irqaction * action;
- unsigned int status;
-
- kstat.irqs[cpu][irq]++;
- spin_lock(&desc->lock);
- desc->handler->ack(irq);
- /*
- REPLAY is when Linux resends an IRQ that was dropped earlier
- WAITING is used by probe to mark irqs that are being tested
- */
- status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
- status |= IRQ_PENDING; /* we _want_ to handle it */
-
- /*
- * If the IRQ is disabled for whatever reason, we cannot
- * use the action we have.
- */
- action = NULL;
- if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
- action = desc->action;
- status &= ~IRQ_PENDING; /* we commit to handling */
- status |= IRQ_INPROGRESS; /* we are handling it */
- }
- desc->status = status;
-
- /*
- * If there is no IRQ handler or it was disabled, exit early.
- Since we set PENDING, if another processor is handling
- a different instance of this same irq, the other processor
- will take care of it.
- */
- if (!action)
- goto out;
-
- /*
- * Edge triggered interrupts need to remember
- * pending events.
- * This applies to any hw interrupts that allow a second
- * instance of the same irq to arrive while we are in do_IRQ
- * or in the handler. But the code here only handles the _second_
- * instance of the irq, not the third or fourth. So it is mostly
- * useful for irq hardware that does not mask cleanly in an
- * SMP environment.
- */
- for (;;) {
- spin_unlock(&desc->lock);
- handle_IRQ_event(irq, regs, action);
- spin_lock(&desc->lock);
-
- if (!(desc->status & IRQ_PENDING))
- break;
- desc->status &= ~IRQ_PENDING;
- }
- desc->status &= ~IRQ_INPROGRESS;
-out:
- /*
- * The ->end() handler has to deal with interrupts which got
- * disabled while the handler was running.
- */
- desc->handler->end(irq);
- spin_unlock(&desc->lock);
-
- if (softirq_pending(cpu))
- do_softirq();
-
- return 1;
-}
-
-/**
- * request_irq - allocate an interrupt line
- * @irq: Interrupt line to allocate
- * @handler: Function to be called when the IRQ occurs
- * @irqflags: Interrupt type flags
- * @devname: An ascii name for the claiming device
- * @dev_id: A cookie passed back to the handler function
- *
- * This call allocates interrupt resources and enables the
- * interrupt line and IRQ handling. From the point this
- * call is made your handler function may be invoked. Since
- * your handler function must clear any interrupt the board
- * raises, you must take care both to initialise your hardware
- * and to set up the interrupt handler in the right order.
- *
- * Dev_id must be globally unique. Normally the address of the
- * device data structure is used as the cookie. Since the handler
- * receives this value it makes sense to use it.
- *
- * If your interrupt is shared you must pass a non NULL dev_id
- * as this is required when freeing the interrupt.
- *
- * Flags:
- *
- * SA_SHIRQ Interrupt is shared
- *
- * SA_INTERRUPT Disable local interrupts while processing
- *
- * SA_SAMPLE_RANDOM The interrupt can be used for entropy
- *
- */
-
-int request_irq(unsigned int irq,
- void (*handler)(int, void *, struct pt_regs *),
- unsigned long irqflags,
- const char * devname,
- void *dev_id)
-{
- int retval;
- struct irqaction * action;
-
-#if 1
- /*
- * Sanity-check: shared interrupts should REALLY pass in
- * a real dev-ID, otherwise we'll have trouble later trying
- * to figure out which interrupt is which (messes up the
- * interrupt freeing logic etc).
- */
- if (irqflags & SA_SHIRQ) {
- if (!dev_id)
- printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", devname, (&irq)[-1]);
- }
-#endif
-
- if (irq >= NR_IRQS)
- return -EINVAL;
- if (!handler)
- return -EINVAL;
-
- action = (struct irqaction *)
- kmalloc(sizeof(struct irqaction), GFP_KERNEL);
- if (!action)
- return -ENOMEM;
-
- action->handler = handler;
- action->flags = irqflags;
- action->mask = 0;
- action->name = devname;
- action->next = NULL;
- action->dev_id = dev_id;
-
- retval = setup_irq(irq, action);
- if (retval)
- kfree(action);
- return retval;
-}
-
-/**
- * free_irq - free an interrupt
- * @irq: Interrupt line to free
- * @dev_id: Device identity to free
- *
- * Remove an interrupt handler. The handler is removed and if the
- * interrupt line is no longer in use by any driver it is disabled.
- * On a shared IRQ the caller must ensure the interrupt is disabled
- * on the card it drives before calling this function. The function
- * does not return until any executing interrupts for this IRQ
- * have completed.
- *
- * This function may be called from interrupt context.
- *
- * Bugs: Attempting to free an irq in a handler for the same irq hangs
- * the machine.
- */
-
-void free_irq(unsigned int irq, void *dev_id)
-{
- irq_desc_t *desc;
- struct irqaction **p;
- unsigned long flags;
-
- if (irq >= NR_IRQS)
- return;
-
- desc = irq_desc + irq;
- spin_lock_irqsave(&desc->lock,flags);
- p = &desc->action;
- for (;;) {
- struct irqaction * action = *p;
- if (action) {
- struct irqaction **pp = p;
- p = &action->next;
- if (action->dev_id != dev_id)
- continue;
-
- /* Found it - now remove it from the list of entries */
- *pp = action->next;
- if (!desc->action) {
- desc->status |= IRQ_DISABLED;
- desc->handler->shutdown(irq);
- }
- spin_unlock_irqrestore(&desc->lock,flags);
-
-#ifdef CONFIG_SMP
- /* Wait to make sure it's not being used on another CPU */
- while (desc->status & IRQ_INPROGRESS) {
- barrier();
- cpu_relax();
- }
-#endif
- kfree(action);
- return;
- }
- printk("Trying to free free IRQ%d\n",irq);
- spin_unlock_irqrestore(&desc->lock,flags);
- return;
- }
-}
-
-/*
- * IRQ autodetection code..
- *
- * This depends on the fact that any interrupt that
- * comes in on to an unassigned handler will get stuck
- * with "IRQ_WAITING" cleared and the interrupt
- * disabled.
- */
-
-static DECLARE_MUTEX(probe_sem);
-
-/**
- * probe_irq_on - begin an interrupt autodetect
- *
- * Commence probing for an interrupt. The interrupts are scanned
- * and a mask of potential interrupt lines is returned.
- *
- */
-
-unsigned long probe_irq_on(void)
-{
- unsigned int i;
- irq_desc_t *desc;
- unsigned long val;
- unsigned long delay;
-
- down(&probe_sem);
- /*
- * something may have generated an irq long ago and we want to
- * flush such a longstanding irq before considering it as spurious.
- */
- for (i = NR_IRQS-1; i > 0; i--) {
- desc = irq_desc + i;
-
- spin_lock_irq(&desc->lock);
- if (!irq_desc[i].action)
- irq_desc[i].handler->startup(i);
- spin_unlock_irq(&desc->lock);
- }
-
- /* Wait for longstanding interrupts to trigger. */
- for (delay = jiffies + HZ/50; time_after(delay, jiffies); )
- /* about 20ms delay */ synchronize_irq();
-
- /*
- * enable any unassigned irqs
- * (we must startup again here because if a longstanding irq
- * happened in the previous stage, it may have masked itself)
- */
- for (i = NR_IRQS-1; i > 0; i--) {
- desc = irq_desc + i;
-
- spin_lock_irq(&desc->lock);
- if (!desc->action) {
- desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
- if (desc->handler->startup(i))
- desc->status |= IRQ_PENDING;
- }
- spin_unlock_irq(&desc->lock);
- }
-
- /*
- * Wait for spurious interrupts to trigger
- */
- for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
- /* about 100ms delay */ synchronize_irq();
-
- /*
- * Now filter out any obviously spurious interrupts
- */
- val = 0;
- for (i = 0; i < NR_IRQS; i++) {
- irq_desc_t *desc = irq_desc + i;
- unsigned int status;
-
- spin_lock_irq(&desc->lock);
- status = desc->status;
-
- if (status & IRQ_AUTODETECT) {
- /* It triggered already - consider it spurious. */
- if (!(status & IRQ_WAITING)) {
- desc->status = status & ~IRQ_AUTODETECT;
- desc->handler->shutdown(i);
- } else
- if (i < 32)
- val |= 1 << i;
- }
- spin_unlock_irq(&desc->lock);
- }
-
- return val;
-}
-
-/*
- * Return a mask of triggered interrupts (this
- * can handle only legacy ISA interrupts).
- */
-
-/**
- * probe_irq_mask - scan a bitmap of interrupt lines
- * @val: mask of interrupts to consider
- *
- * Scan the ISA bus interrupt lines and return a bitmap of
- * active interrupts. The interrupt probe logic state is then
- * returned to its previous value.
- *
- * Note: we need to scan all the irq's even though we will
- * only return ISA irq numbers - just so that we reset them
- * all to a known state.
- */
-unsigned int probe_irq_mask(unsigned long val)
-{
- int i;
- unsigned int mask;
-
- mask = 0;
- for (i = 0; i < NR_IRQS; i++) {
- irq_desc_t *desc = irq_desc + i;
- unsigned int status;
-
- spin_lock_irq(&desc->lock);
- status = desc->status;
-
- if (status & IRQ_AUTODETECT) {
- if (i < 16 && !(status & IRQ_WAITING))
- mask |= 1 << i;
-
- desc->status = status & ~IRQ_AUTODETECT;
- desc->handler->shutdown(i);
- }
- spin_unlock_irq(&desc->lock);
- }
- up(&probe_sem);
-
- return mask & val;
-}
-
-/*
- * Return the one interrupt that triggered (this can
- * handle any interrupt source).
- */
-
-/**
- * probe_irq_off - end an interrupt autodetect
- * @val: mask of potential interrupts (unused)
- *
- * Scans the unused interrupt lines and returns the line which
- * appears to have triggered the interrupt. If no interrupt was
- * found then zero is returned. If more than one interrupt is
- * found then minus the first candidate is returned to indicate
- * their is doubt.
- *
- * The interrupt probe logic state is returned to its previous
- * value.
- *
- * BUGS: When used in a module (which arguably shouldnt happen)
- * nothing prevents two IRQ probe callers from overlapping. The
- * results of this are non-optimal.
- */
-
-int probe_irq_off(unsigned long val)
-{
- int i, irq_found, nr_irqs;
-
- nr_irqs = 0;
- irq_found = 0;
- for (i = 0; i < NR_IRQS; i++) {
- irq_desc_t *desc = irq_desc + i;
- unsigned int status;
-
- spin_lock_irq(&desc->lock);
- status = desc->status;
-
- if (status & IRQ_AUTODETECT) {
- if (!(status & IRQ_WAITING)) {
- if (!nr_irqs)
- irq_found = i;
- nr_irqs++;
- }
- desc->status = status & ~IRQ_AUTODETECT;
- desc->handler->shutdown(i);
- }
- spin_unlock_irq(&desc->lock);
- }
- up(&probe_sem);
-
- if (nr_irqs > 1)
- irq_found = -irq_found;
- return irq_found;
-}
-
-/* this was setup_x86_irq but it seems pretty generic */
-int setup_irq(unsigned int irq, struct irqaction * new)
-{
- int shared = 0;
- unsigned long flags;
- struct irqaction *old, **p;
- irq_desc_t *desc = irq_desc + irq;
-
- /*
- * Some drivers like serial.c use request_irq() heavily,
- * so we have to be careful not to interfere with a
- * running system.
- */
- if (new->flags & SA_SAMPLE_RANDOM) {
- /*
- * This function might sleep, we want to call it first,
- * outside of the atomic block.
- * Yes, this might clear the entropy pool if the wrong
- * driver is attempted to be loaded, without actually
- * installing a new handler, but is this really a problem,
- * only the sysadmin is able to do this.
- */
- rand_initialize_irq(irq);
- }
-
- /*
- * The following block of code has to be executed atomically
- */
- spin_lock_irqsave(&desc->lock,flags);
- p = &desc->action;
- if ((old = *p) != NULL) {
- /* Can't share interrupts unless both agree to */
- if (!(old->flags & new->flags & SA_SHIRQ)) {
- spin_unlock_irqrestore(&desc->lock,flags);
- return -EBUSY;
- }
-
- /* add new interrupt at end of irq queue */
- do {
- p = &old->next;
- old = *p;
- } while (old);
- shared = 1;
- }
-
- *p = new;
-
- if (!shared) {
- desc->depth = 0;
- desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING);
- desc->handler->startup(irq);
- }
- spin_unlock_irqrestore(&desc->lock,flags);
-
- register_irq_proc(irq);
- return 0;
-}
-
-static struct proc_dir_entry * root_irq_dir;
-static struct proc_dir_entry * irq_dir [NR_IRQS];
-
-#define HEX_DIGITS 8
-
-static unsigned int parse_hex_value (const char *buffer,
- unsigned long count, unsigned long *ret)
-{
- unsigned char hexnum [HEX_DIGITS];
- unsigned long value;
- int i;
-
- if (!count)
- return -EINVAL;
- if (count > HEX_DIGITS)
- count = HEX_DIGITS;
- if (copy_from_user(hexnum, buffer, count))
- return -EFAULT;
-
- /*
- * Parse the first 8 characters as a hex string, any non-hex char
- * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
- */
- value = 0;
-
- for (i = 0; i < count; i++) {
- unsigned int c = hexnum[i];
-
- switch (c) {
- case '0' ... '9': c -= '0'; break;
- case 'a' ... 'f': c -= 'a'-10; break;
- case 'A' ... 'F': c -= 'A'-10; break;
- default:
- goto out;
- }
- value = (value << 4) | c;
- }
-out:
- *ret = value;
- return 0;
-}
-
-#if CONFIG_SMP
-
-static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
-
-static unsigned long irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = ~0UL };
-static int irq_affinity_read_proc (char *page, char **start, off_t off,
- int count, int *eof, void *data)
-{
- if (count < HEX_DIGITS+1)
- return -EINVAL;
- return sprintf (page, "%08lx\n", irq_affinity[(long)data]);
-}
-
-static int irq_affinity_write_proc (struct file *file, const char *buffer,
- unsigned long count, void *data)
-{
- int irq = (long) data, full_count = count, err;
- unsigned long new_value;
-
- if (!irq_desc[irq].handler->set_affinity)
- return -EIO;
-
- err = parse_hex_value(buffer, count, &new_value);
-
- /*
- * Do not allow disabling IRQs completely - it's a too easy
- * way to make the system unusable accidentally :-) At least
- * one online CPU still has to be targeted.
- */
- if (!(new_value & cpu_online_map))
- return -EINVAL;
-
- irq_affinity[irq] = new_value;
- irq_desc[irq].handler->set_affinity(irq, new_value);
-
- return full_count;
-}
-
-#endif
-
-static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
- int count, int *eof, void *data)
-{
- unsigned long *mask = (unsigned long *) data;
- if (count < HEX_DIGITS+1)
- return -EINVAL;
- return sprintf (page, "%08lx\n", *mask);
-}
-
-static int prof_cpu_mask_write_proc (struct file *file, const char *buffer,
- unsigned long count, void *data)
-{
- unsigned long *mask = (unsigned long *) data, full_count = count, err;
- unsigned long new_value;
-
- err = parse_hex_value(buffer, count, &new_value);
- if (err)
- return err;
-
- *mask = new_value;
- return full_count;
-}
-
-#define MAX_NAMELEN 10
-
-static void register_irq_proc (unsigned int irq)
-{
- char name [MAX_NAMELEN];
-
- if (!root_irq_dir || (irq_desc[irq].handler == &no_irq_type) ||
- irq_dir[irq])
- return;
-
- memset(name, 0, MAX_NAMELEN);
- sprintf(name, "%d", irq);
-
- /* create /proc/irq/1234 */
- irq_dir[irq] = proc_mkdir(name, root_irq_dir);
-
-#if CONFIG_SMP
- {
- struct proc_dir_entry *entry;
-
- /* create /proc/irq/1234/smp_affinity */
- entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]);
-
- if (entry) {
- entry->nlink = 1;
- entry->data = (void *)(long)irq;
- entry->read_proc = irq_affinity_read_proc;
- entry->write_proc = irq_affinity_write_proc;
- }
-
- smp_affinity_entry[irq] = entry;
- }
-#endif
-}
-
-unsigned long prof_cpu_mask = -1;
-
-void init_irq_proc (void)
-{
- struct proc_dir_entry *entry;
- int i;
-
- /* create /proc/irq */
- root_irq_dir = proc_mkdir("irq", 0);
-
- /* create /proc/irq/prof_cpu_mask */
- entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir);
-
- if (!entry)
- return;
-
- entry->nlink = 1;
- entry->data = (void *)&prof_cpu_mask;
- entry->read_proc = prof_cpu_mask_read_proc;
- entry->write_proc = prof_cpu_mask_write_proc;
-
- /*
- * Create entries for all existing IRQs.
- */
- for (i = 0; i < NR_IRQS; i++)
- register_irq_proc(i);
-}
-