ia64/xen-unstable

changeset 346:6b300fe8e6b9

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
author kaf24@scramble.cl.cam.ac.uk
date Tue Mar 25 14:10:16 2003 +0000 (2003-03-25)
parents dc2e4de1850f
children e28ef71fed4d e5e04893c022 be91d949977b
files .bk-to-hg .hg-to-bk .rootkeys old/xenolinux-2.4.16-sparse/Makefile old/xenolinux-2.4.16-sparse/arch/xeno/Makefile old/xenolinux-2.4.16-sparse/arch/xeno/boot/Makefile old/xenolinux-2.4.16-sparse/arch/xeno/config.in old/xenolinux-2.4.16-sparse/arch/xeno/defconfig old/xenolinux-2.4.16-sparse/arch/xeno/drivers/block/Makefile old/xenolinux-2.4.16-sparse/arch/xeno/drivers/block/xl_block.c old/xenolinux-2.4.16-sparse/arch/xeno/drivers/block/xl_block_test.c old/xenolinux-2.4.16-sparse/arch/xeno/drivers/console/Makefile old/xenolinux-2.4.16-sparse/arch/xeno/drivers/console/console.c old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/Makefile old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_block.c old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_core.c old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_memory.c old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_ops.h old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/vfr.c old/xenolinux-2.4.16-sparse/arch/xeno/drivers/network/Makefile old/xenolinux-2.4.16-sparse/arch/xeno/drivers/network/network.c old/xenolinux-2.4.16-sparse/arch/xeno/kernel/Makefile old/xenolinux-2.4.16-sparse/arch/xeno/kernel/entry.S old/xenolinux-2.4.16-sparse/arch/xeno/kernel/head.S old/xenolinux-2.4.16-sparse/arch/xeno/kernel/hypervisor.c old/xenolinux-2.4.16-sparse/arch/xeno/kernel/i386_ksyms.c old/xenolinux-2.4.16-sparse/arch/xeno/kernel/i387.c old/xenolinux-2.4.16-sparse/arch/xeno/kernel/init_task.c old/xenolinux-2.4.16-sparse/arch/xeno/kernel/ioport.c old/xenolinux-2.4.16-sparse/arch/xeno/kernel/irq.c old/xenolinux-2.4.16-sparse/arch/xeno/kernel/ldt.c old/xenolinux-2.4.16-sparse/arch/xeno/kernel/process.c old/xenolinux-2.4.16-sparse/arch/xeno/kernel/ptrace.c old/xenolinux-2.4.16-sparse/arch/xeno/kernel/semaphore.c old/xenolinux-2.4.16-sparse/arch/xeno/kernel/setup.c old/xenolinux-2.4.16-sparse/arch/xeno/kernel/signal.c old/xenolinux-2.4.16-sparse/arch/xeno/kernel/sys_i386.c old/xenolinux-2.4.16-sparse/arch/xeno/kernel/time.c old/xenolinux-2.4.16-sparse/arch/xeno/kernel/traps.c old/xenolinux-2.4.16-sparse/arch/xeno/lib/Makefile old/xenolinux-2.4.16-sparse/arch/xeno/lib/checksum.S old/xenolinux-2.4.16-sparse/arch/xeno/lib/dec_and_lock.c old/xenolinux-2.4.16-sparse/arch/xeno/lib/delay.c old/xenolinux-2.4.16-sparse/arch/xeno/lib/getuser.S old/xenolinux-2.4.16-sparse/arch/xeno/lib/iodebug.c old/xenolinux-2.4.16-sparse/arch/xeno/lib/memcpy.c old/xenolinux-2.4.16-sparse/arch/xeno/lib/mmx.c old/xenolinux-2.4.16-sparse/arch/xeno/lib/old-checksum.c old/xenolinux-2.4.16-sparse/arch/xeno/lib/strstr.c old/xenolinux-2.4.16-sparse/arch/xeno/lib/usercopy.c old/xenolinux-2.4.16-sparse/arch/xeno/mm/Makefile old/xenolinux-2.4.16-sparse/arch/xeno/mm/extable.c old/xenolinux-2.4.16-sparse/arch/xeno/mm/fault.c old/xenolinux-2.4.16-sparse/arch/xeno/mm/get_unmapped_area.c old/xenolinux-2.4.16-sparse/arch/xeno/mm/hypervisor.c old/xenolinux-2.4.16-sparse/arch/xeno/mm/init.c old/xenolinux-2.4.16-sparse/arch/xeno/mm/mmu_context.c old/xenolinux-2.4.16-sparse/arch/xeno/vmlinux.lds old/xenolinux-2.4.16-sparse/drivers/block/Config.in old/xenolinux-2.4.16-sparse/drivers/block/ll_rw_blk.c old/xenolinux-2.4.16-sparse/drivers/block/rd.c old/xenolinux-2.4.16-sparse/drivers/char/tty_io.c old/xenolinux-2.4.16-sparse/fs/exec.c old/xenolinux-2.4.16-sparse/include/asm-xeno/a.out.h old/xenolinux-2.4.16-sparse/include/asm-xeno/apic.h old/xenolinux-2.4.16-sparse/include/asm-xeno/apicdef.h old/xenolinux-2.4.16-sparse/include/asm-xeno/atomic.h old/xenolinux-2.4.16-sparse/include/asm-xeno/bitops.h old/xenolinux-2.4.16-sparse/include/asm-xeno/boot.h old/xenolinux-2.4.16-sparse/include/asm-xeno/bugs.h old/xenolinux-2.4.16-sparse/include/asm-xeno/byteorder.h old/xenolinux-2.4.16-sparse/include/asm-xeno/cache.h old/xenolinux-2.4.16-sparse/include/asm-xeno/checksum.h old/xenolinux-2.4.16-sparse/include/asm-xeno/cpufeature.h old/xenolinux-2.4.16-sparse/include/asm-xeno/current.h old/xenolinux-2.4.16-sparse/include/asm-xeno/debugreg.h old/xenolinux-2.4.16-sparse/include/asm-xeno/delay.h old/xenolinux-2.4.16-sparse/include/asm-xeno/desc.h old/xenolinux-2.4.16-sparse/include/asm-xeno/div64.h old/xenolinux-2.4.16-sparse/include/asm-xeno/dma.h old/xenolinux-2.4.16-sparse/include/asm-xeno/elf.h old/xenolinux-2.4.16-sparse/include/asm-xeno/errno.h old/xenolinux-2.4.16-sparse/include/asm-xeno/fcntl.h old/xenolinux-2.4.16-sparse/include/asm-xeno/fixmap.h old/xenolinux-2.4.16-sparse/include/asm-xeno/floppy.h old/xenolinux-2.4.16-sparse/include/asm-xeno/hardirq.h old/xenolinux-2.4.16-sparse/include/asm-xeno/hdreg.h old/xenolinux-2.4.16-sparse/include/asm-xeno/highmem.h old/xenolinux-2.4.16-sparse/include/asm-xeno/hw_irq.h old/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor.h old/xenolinux-2.4.16-sparse/include/asm-xeno/i387.h old/xenolinux-2.4.16-sparse/include/asm-xeno/ide.h old/xenolinux-2.4.16-sparse/include/asm-xeno/init.h old/xenolinux-2.4.16-sparse/include/asm-xeno/io.h old/xenolinux-2.4.16-sparse/include/asm-xeno/io_apic.h old/xenolinux-2.4.16-sparse/include/asm-xeno/ioctl.h old/xenolinux-2.4.16-sparse/include/asm-xeno/ioctls.h old/xenolinux-2.4.16-sparse/include/asm-xeno/ipc.h old/xenolinux-2.4.16-sparse/include/asm-xeno/ipcbuf.h old/xenolinux-2.4.16-sparse/include/asm-xeno/irq.h old/xenolinux-2.4.16-sparse/include/asm-xeno/kdb.h old/xenolinux-2.4.16-sparse/include/asm-xeno/kdbprivate.h old/xenolinux-2.4.16-sparse/include/asm-xeno/keyboard.h old/xenolinux-2.4.16-sparse/include/asm-xeno/kmap_types.h old/xenolinux-2.4.16-sparse/include/asm-xeno/ldt.h old/xenolinux-2.4.16-sparse/include/asm-xeno/linux_logo.h old/xenolinux-2.4.16-sparse/include/asm-xeno/locks.h old/xenolinux-2.4.16-sparse/include/asm-xeno/math_emu.h old/xenolinux-2.4.16-sparse/include/asm-xeno/mc146818rtc.h old/xenolinux-2.4.16-sparse/include/asm-xeno/mca_dma.h old/xenolinux-2.4.16-sparse/include/asm-xeno/mman.h old/xenolinux-2.4.16-sparse/include/asm-xeno/mmu.h old/xenolinux-2.4.16-sparse/include/asm-xeno/mmu_context.h old/xenolinux-2.4.16-sparse/include/asm-xeno/mmx.h old/xenolinux-2.4.16-sparse/include/asm-xeno/module.h old/xenolinux-2.4.16-sparse/include/asm-xeno/mpspec.h old/xenolinux-2.4.16-sparse/include/asm-xeno/msgbuf.h old/xenolinux-2.4.16-sparse/include/asm-xeno/msr.h old/xenolinux-2.4.16-sparse/include/asm-xeno/mtrr.h old/xenolinux-2.4.16-sparse/include/asm-xeno/namei.h old/xenolinux-2.4.16-sparse/include/asm-xeno/page.h old/xenolinux-2.4.16-sparse/include/asm-xeno/param.h old/xenolinux-2.4.16-sparse/include/asm-xeno/parport.h old/xenolinux-2.4.16-sparse/include/asm-xeno/pgalloc.h old/xenolinux-2.4.16-sparse/include/asm-xeno/pgtable-2level.h old/xenolinux-2.4.16-sparse/include/asm-xeno/pgtable-3level.h old/xenolinux-2.4.16-sparse/include/asm-xeno/pgtable.h old/xenolinux-2.4.16-sparse/include/asm-xeno/poll.h old/xenolinux-2.4.16-sparse/include/asm-xeno/posix_types.h old/xenolinux-2.4.16-sparse/include/asm-xeno/processor.h old/xenolinux-2.4.16-sparse/include/asm-xeno/ptrace.h old/xenolinux-2.4.16-sparse/include/asm-xeno/resource.h old/xenolinux-2.4.16-sparse/include/asm-xeno/rwlock.h old/xenolinux-2.4.16-sparse/include/asm-xeno/rwsem.h old/xenolinux-2.4.16-sparse/include/asm-xeno/scatterlist.h old/xenolinux-2.4.16-sparse/include/asm-xeno/segment.h old/xenolinux-2.4.16-sparse/include/asm-xeno/semaphore.h old/xenolinux-2.4.16-sparse/include/asm-xeno/sembuf.h old/xenolinux-2.4.16-sparse/include/asm-xeno/serial.h old/xenolinux-2.4.16-sparse/include/asm-xeno/setup.h old/xenolinux-2.4.16-sparse/include/asm-xeno/shmbuf.h old/xenolinux-2.4.16-sparse/include/asm-xeno/shmparam.h old/xenolinux-2.4.16-sparse/include/asm-xeno/sigcontext.h old/xenolinux-2.4.16-sparse/include/asm-xeno/siginfo.h old/xenolinux-2.4.16-sparse/include/asm-xeno/signal.h old/xenolinux-2.4.16-sparse/include/asm-xeno/smp.h old/xenolinux-2.4.16-sparse/include/asm-xeno/smplock.h old/xenolinux-2.4.16-sparse/include/asm-xeno/socket.h old/xenolinux-2.4.16-sparse/include/asm-xeno/sockios.h old/xenolinux-2.4.16-sparse/include/asm-xeno/softirq.h old/xenolinux-2.4.16-sparse/include/asm-xeno/spinlock.h old/xenolinux-2.4.16-sparse/include/asm-xeno/stat.h old/xenolinux-2.4.16-sparse/include/asm-xeno/statfs.h old/xenolinux-2.4.16-sparse/include/asm-xeno/string-486.h old/xenolinux-2.4.16-sparse/include/asm-xeno/string.h old/xenolinux-2.4.16-sparse/include/asm-xeno/system.h old/xenolinux-2.4.16-sparse/include/asm-xeno/termbits.h old/xenolinux-2.4.16-sparse/include/asm-xeno/termios.h old/xenolinux-2.4.16-sparse/include/asm-xeno/timex.h old/xenolinux-2.4.16-sparse/include/asm-xeno/tlb.h old/xenolinux-2.4.16-sparse/include/asm-xeno/types.h old/xenolinux-2.4.16-sparse/include/asm-xeno/uaccess.h old/xenolinux-2.4.16-sparse/include/asm-xeno/ucontext.h old/xenolinux-2.4.16-sparse/include/asm-xeno/unaligned.h old/xenolinux-2.4.16-sparse/include/asm-xeno/unistd.h old/xenolinux-2.4.16-sparse/include/asm-xeno/user.h old/xenolinux-2.4.16-sparse/include/asm-xeno/vga.h old/xenolinux-2.4.16-sparse/include/asm-xeno/xor.h old/xenolinux-2.4.16-sparse/include/linux/blk.h old/xenolinux-2.4.16-sparse/include/linux/major.h old/xenolinux-2.4.16-sparse/include/linux/sunrpc/debug.h old/xenolinux-2.4.16-sparse/init/main.c old/xenolinux-2.4.16-sparse/kernel/panic.c old/xenolinux-2.4.16-sparse/mk old/xenolinux-2.4.16-sparse/mm/memory.c old/xenolinux-2.4.16-sparse/mm/mremap.c old/xenolinux-2.4.16-sparse/mm/swapfile.c
line diff
     1.1 --- a/.bk-to-hg	Tue Mar 25 11:15:01 2003 +0000
     1.2 +++ b/.bk-to-hg	Tue Mar 25 14:10:16 2003 +0000
     1.3 @@ -1,7 +1,5 @@
     1.4  #!/bin/sh -x
     1.5  set -e
     1.6 -test -L old/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs
     1.7 -rm      old/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs
     1.8  test -L tools/domain_builder/dom0_ops.h
     1.9  rm      tools/domain_builder/dom0_ops.h
    1.10  (find -depth -type d -print | xargs -r rmdir 2>/dev/null) || true
     2.1 --- a/.hg-to-bk	Tue Mar 25 11:15:01 2003 +0000
     2.2 +++ b/.hg-to-bk	Tue Mar 25 14:10:16 2003 +0000
     2.3 @@ -1,10 +1,5 @@
     2.4  #!/bin/sh -x
     2.5  set -e
     2.6 -mkdir -p old
     2.7 -mkdir -p old/xenolinux-2.4.16-sparse
     2.8 -mkdir -p old/xenolinux-2.4.16-sparse/include
     2.9 -mkdir -p old/xenolinux-2.4.16-sparse/include/asm-xeno
    2.10 -ln -s ../../../xen-2.4.16/include/hypervisor-ifs old/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs
    2.11  mkdir -p tools
    2.12  mkdir -p tools/domain_builder
    2.13  ln -s ../../xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/dom0/dom0_ops.h tools/domain_builder/dom0_ops.h
     3.1 --- a/.rootkeys	Tue Mar 25 11:15:01 2003 +0000
     3.2 +++ b/.rootkeys	Tue Mar 25 14:10:16 2003 +0000
     3.3 @@ -1,181 +1,6 @@
     3.4  3ddb6b0bKlMz_dz-M59a1mkUa1lASw BitKeeper/etc/config
     3.5  3ddb6b0buTaC5zg1_a8FoAR9FWi_mw BitKeeper/etc/ignore
     3.6  3ddb79c9_hgSp-gsQm8HqWM_9W3B_A BitKeeper/etc/logging_ok
     3.7 -3ddb79bbYMXGmQTsr5BeGS_RuZ5f_w old/xenolinux-2.4.16-sparse/Makefile
     3.8 -3ddb79b7e0ssyz3Q1GoqjDds-x1PLQ old/xenolinux-2.4.16-sparse/arch/xeno/Makefile
     3.9 -3ddb79b7_rLvYZU3tOY6Wwuw_Sg3_w old/xenolinux-2.4.16-sparse/arch/xeno/boot/Makefile
    3.10 -3ddb79b8L4xnwrcvWk6nAbgKVbNkSA old/xenolinux-2.4.16-sparse/arch/xeno/config.in
    3.11 -3ddb79b7v_Be34as7_mlzFlw65hOjQ old/xenolinux-2.4.16-sparse/arch/xeno/defconfig
    3.12 -3ddb79b7KUvtx0knQJoRaBDZQeNidg old/xenolinux-2.4.16-sparse/arch/xeno/drivers/block/Makefile
    3.13 -3e4a8cb7JECr--r1ipnrkd7NKdbUqQ old/xenolinux-2.4.16-sparse/arch/xeno/drivers/block/xl_block.c
    3.14 -3e4a8cb7SLWsLTXQjv7ng6-3hL4pCA old/xenolinux-2.4.16-sparse/arch/xeno/drivers/block/xl_block_test.c
    3.15 -3ddb79b7LLVJBGynxHSOh9A9l97sug old/xenolinux-2.4.16-sparse/arch/xeno/drivers/console/Makefile
    3.16 -3ddb79b7UG2QiRAU-Wvc1Y_BLigu1Q old/xenolinux-2.4.16-sparse/arch/xeno/drivers/console/console.c
    3.17 -3ddb79b75eo4PRXkT6Th9popt_SJhg old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/Makefile
    3.18 -3e4a8cb79dT0F4q5T4GEqMj4CtAquQ old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_block.c
    3.19 -3ddb79b7Xyaoep6U0kLvx6Kx7OauDw old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_core.c
    3.20 -3df9ce13K7qSLBtHV-01QHPW62649Q old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_memory.c
    3.21 -3ddb79b7PulSkF9m3c7K5MkxHRf4hA old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_ops.h
    3.22 -3ddba759XOjcl_OF-52dOYq7sgMykQ old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/vfr.c
    3.23 -3ddb79b7s7yYBioHidSkIoHtQxYmOw old/xenolinux-2.4.16-sparse/arch/xeno/drivers/network/Makefile
    3.24 -3ddb79b7CpLL98ScdpbKkVBktlbCtQ old/xenolinux-2.4.16-sparse/arch/xeno/drivers/network/network.c
    3.25 -3ddb79b7hqi9krq6h98lnpONHGzvEA old/xenolinux-2.4.16-sparse/arch/xeno/kernel/Makefile
    3.26 -3ddb79b7eyEv5bsN8EQkjIG0y11Q1A old/xenolinux-2.4.16-sparse/arch/xeno/kernel/entry.S
    3.27 -3ddb79b70XAg9bJwp0-DWHe0LtzlBw old/xenolinux-2.4.16-sparse/arch/xeno/kernel/head.S
    3.28 -3ddb79b7dDsKjU22VxQ-C5BMFaMUmw old/xenolinux-2.4.16-sparse/arch/xeno/kernel/hypervisor.c
    3.29 -3ddb79b7xzwEc8-lo1vu3BxB-gBURQ old/xenolinux-2.4.16-sparse/arch/xeno/kernel/i386_ksyms.c
    3.30 -3ddb79b7i7pfPEcy_zjDfW9JHD305g old/xenolinux-2.4.16-sparse/arch/xeno/kernel/i387.c
    3.31 -3ddb79b7Ti2i5ztQzM-w67zN-cJD8A old/xenolinux-2.4.16-sparse/arch/xeno/kernel/init_task.c
    3.32 -3ddb79b7MEQGMZrsF94atNJZ4-OGzA old/xenolinux-2.4.16-sparse/arch/xeno/kernel/ioport.c
    3.33 -3ddb79b7DOz-Mz5jsjRd5W8jN0XbPw old/xenolinux-2.4.16-sparse/arch/xeno/kernel/irq.c
    3.34 -3ddb79b7bOAPk_YAUUsruhVGO2GOOg old/xenolinux-2.4.16-sparse/arch/xeno/kernel/ldt.c
    3.35 -3ddb79b7qf2WK6vMKcmOLIeKN5GSjg old/xenolinux-2.4.16-sparse/arch/xeno/kernel/process.c
    3.36 -3ddb79b7HdaBR7yk_u51auihbr31aQ old/xenolinux-2.4.16-sparse/arch/xeno/kernel/ptrace.c
    3.37 -3ddb79b7yJunvnrgWD2VTy6yot0PMg old/xenolinux-2.4.16-sparse/arch/xeno/kernel/semaphore.c
    3.38 -3ddb79b7BIitpVygiksiMBQYvh5Z2A old/xenolinux-2.4.16-sparse/arch/xeno/kernel/setup.c
    3.39 -3ddb79b7DTevmwhNla67jZxjBSIKFg old/xenolinux-2.4.16-sparse/arch/xeno/kernel/signal.c
    3.40 -3ddb79b76mCf-gZPR4KLjL8ktZ37GA old/xenolinux-2.4.16-sparse/arch/xeno/kernel/sys_i386.c
    3.41 -3ddb79b7xDsEKErRFeqcSm6eRrTEIg old/xenolinux-2.4.16-sparse/arch/xeno/kernel/time.c
    3.42 -3ddb79b7V4dv_KAQu4Msa2Ebhd0aKw old/xenolinux-2.4.16-sparse/arch/xeno/kernel/traps.c
    3.43 -3ddb79b8oUnwncDaZuRWF3-n3jPsIA old/xenolinux-2.4.16-sparse/arch/xeno/lib/Makefile
    3.44 -3ddb79b8BMxi8qW3_NT44SSd1uMD3Q old/xenolinux-2.4.16-sparse/arch/xeno/lib/checksum.S
    3.45 -3ddb79b8WcWel2g9zU9pBJb-yA8jBw old/xenolinux-2.4.16-sparse/arch/xeno/lib/dec_and_lock.c
    3.46 -3ddb79b8oxeiaIW6Au95OM0GlsMrMw old/xenolinux-2.4.16-sparse/arch/xeno/lib/delay.c
    3.47 -3ddb79b8XPasnRhvK-_6xYksf3S6qA old/xenolinux-2.4.16-sparse/arch/xeno/lib/getuser.S
    3.48 -3ddb79b8HFLUh8mwcl4X44ta-ny1KA old/xenolinux-2.4.16-sparse/arch/xeno/lib/iodebug.c
    3.49 -3ddb79b879qeoLlarHXvNIDEva6ssA old/xenolinux-2.4.16-sparse/arch/xeno/lib/memcpy.c
    3.50 -3ddb79b869CY_yr4HymV6k98pfpMgg old/xenolinux-2.4.16-sparse/arch/xeno/lib/mmx.c
    3.51 -3ddb79b8S77yf1--Qa4C0ZYmqKXCww old/xenolinux-2.4.16-sparse/arch/xeno/lib/old-checksum.c
    3.52 -3ddb79b8ffZ79cU2ZzfA2ekeo6pqeg old/xenolinux-2.4.16-sparse/arch/xeno/lib/strstr.c
    3.53 -3ddb79b82kQ5oIXpxq3TUmlgxsLzLg old/xenolinux-2.4.16-sparse/arch/xeno/lib/usercopy.c
    3.54 -3ddb79b8qdD_svLCCAja_oP2w4Tn8Q old/xenolinux-2.4.16-sparse/arch/xeno/mm/Makefile
    3.55 -3ddb79b8ukY8dsPYmR8eNk-aCzFPsQ old/xenolinux-2.4.16-sparse/arch/xeno/mm/extable.c
    3.56 -3ddb79b856Zta9b3s0bgUCGbG1blvQ old/xenolinux-2.4.16-sparse/arch/xeno/mm/fault.c
    3.57 -3df9ce13dZ6UGDjZbUeZfyH4Hy6aCA old/xenolinux-2.4.16-sparse/arch/xeno/mm/get_unmapped_area.c
    3.58 -3ddb79b85fpsKT8A9WYnuJg03b715g old/xenolinux-2.4.16-sparse/arch/xeno/mm/hypervisor.c
    3.59 -3ddb79b83Zj7Xn2QVhU4HeMuAC9FjA old/xenolinux-2.4.16-sparse/arch/xeno/mm/init.c
    3.60 -3df9ce13TRWIv0Mawm15zESP7jcT7A old/xenolinux-2.4.16-sparse/arch/xeno/mm/mmu_context.c
    3.61 -3ddb79b7aKdTkbr3u6aze8tVwGh_TQ old/xenolinux-2.4.16-sparse/arch/xeno/vmlinux.lds
    3.62 -3e4a8cb7lpFFwT1Iu9zXWc8Ew4klFA old/xenolinux-2.4.16-sparse/drivers/block/Config.in
    3.63 -3ddb79bbx682YH6vR2zbVOXwg73ULg old/xenolinux-2.4.16-sparse/drivers/block/ll_rw_blk.c
    3.64 -3ddb79bcJfHdwrPsjqgI33_OsGdVCg old/xenolinux-2.4.16-sparse/drivers/block/rd.c
    3.65 -3ddb79bcpVu-IbnqwQqpRqsEbLpsuw old/xenolinux-2.4.16-sparse/drivers/char/tty_io.c
    3.66 -3e15d5273gfR2fbcYe05kqBSAvCX_w old/xenolinux-2.4.16-sparse/fs/exec.c
    3.67 -3ddb79b8VFtfWSCrXKPN2K21zd_vtw old/xenolinux-2.4.16-sparse/include/asm-xeno/a.out.h
    3.68 -3ddb79b8Zzi13p3OAPV25QgiC3THAQ old/xenolinux-2.4.16-sparse/include/asm-xeno/apic.h
    3.69 -3ddb79baZDlsdV_m6C5CXnWMl15p1g old/xenolinux-2.4.16-sparse/include/asm-xeno/apicdef.h
    3.70 -3ddb79baZM88u4CnriVA8ZXBdnMNvg old/xenolinux-2.4.16-sparse/include/asm-xeno/atomic.h
    3.71 -3ddb79baYHyZsDCiXiq8Y8_XxHE-jQ old/xenolinux-2.4.16-sparse/include/asm-xeno/bitops.h
    3.72 -3ddb79b8vFGtGb6pg3GZFXSiwOZfcg old/xenolinux-2.4.16-sparse/include/asm-xeno/boot.h
    3.73 -3ddb79baW8tf6PiBQUF50QQM5nY9sw old/xenolinux-2.4.16-sparse/include/asm-xeno/bugs.h
    3.74 -3ddb79b80msOlzTZRoVudYdemzgOlA old/xenolinux-2.4.16-sparse/include/asm-xeno/byteorder.h
    3.75 -3ddb79b8brNSUEujnq8f_zr8kA-cUg old/xenolinux-2.4.16-sparse/include/asm-xeno/cache.h
    3.76 -3ddb79bayhr6C6prVhAYlFRChhf3wg old/xenolinux-2.4.16-sparse/include/asm-xeno/checksum.h
    3.77 -3ddb79b8RNUaDbpPjdVVwKAsbiTBKQ old/xenolinux-2.4.16-sparse/include/asm-xeno/cpufeature.h
    3.78 -3ddb79b8pJe4aNsUKkfHEoBT9Y-UMA old/xenolinux-2.4.16-sparse/include/asm-xeno/current.h
    3.79 -3ddb79b8KL7icUfxKRoWDIkHkLQ1kQ old/xenolinux-2.4.16-sparse/include/asm-xeno/debugreg.h
    3.80 -3ddb79baDUP_cRdFgqaH0rXUvMxx4A old/xenolinux-2.4.16-sparse/include/asm-xeno/delay.h
    3.81 -3ddb79b89CgBTFsS3joEJ1ZniSHEgA old/xenolinux-2.4.16-sparse/include/asm-xeno/desc.h
    3.82 -3ddb79ba6xyT4mJOYSp1Fg2l0ta93A old/xenolinux-2.4.16-sparse/include/asm-xeno/div64.h
    3.83 -3ddb79b80Z4ZUIqbD1Xu_t4OCuEHeQ old/xenolinux-2.4.16-sparse/include/asm-xeno/dma.h
    3.84 -3ddb79bac26NkKcPIEsfxETc5Snyag old/xenolinux-2.4.16-sparse/include/asm-xeno/elf.h
    3.85 -3ddb79ba722pCJ_g_xI8ebsE31IK-Q old/xenolinux-2.4.16-sparse/include/asm-xeno/errno.h
    3.86 -3ddb79b8vIpUpgaSNEneFkg5hYSvNg old/xenolinux-2.4.16-sparse/include/asm-xeno/fcntl.h
    3.87 -3e53dbfb9mmyM-y5NuBBTDJvQkDzjA old/xenolinux-2.4.16-sparse/include/asm-xeno/fixmap.h
    3.88 -3ddb79b8780YvqvK1g5KPIWzQ6P15w old/xenolinux-2.4.16-sparse/include/asm-xeno/floppy.h
    3.89 -3ddb79bas-nFywnmilbUeT34PEAA0g old/xenolinux-2.4.16-sparse/include/asm-xeno/hardirq.h
    3.90 -3ddb79batzR40ZFY9dvgs5f1aM9I6g old/xenolinux-2.4.16-sparse/include/asm-xeno/hdreg.h
    3.91 -3ddb79b90xBgbeYgCcImS2ZxJakxBA old/xenolinux-2.4.16-sparse/include/asm-xeno/highmem.h
    3.92 -3ddb79baXLZV3dUKQI2gIYpAy67RuA old/xenolinux-2.4.16-sparse/include/asm-xeno/hw_irq.h
    3.93 -3e00b957iYsdTI1x6THRwMoWSPIW2Q old/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs
    3.94 -3ddb79bapQ9Z9ewa5O1pqAVaNBTazg old/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor.h
    3.95 -3ddb79baL-pjPI8hg5xjPgd4__SlOA old/xenolinux-2.4.16-sparse/include/asm-xeno/i387.h
    3.96 -3ddb79ba66TwvG7HpbBo04fRhmj3KQ old/xenolinux-2.4.16-sparse/include/asm-xeno/ide.h
    3.97 -3ddb79bahFfCuRcmd9kBYA-CuGtCSg old/xenolinux-2.4.16-sparse/include/asm-xeno/init.h
    3.98 -3ddb79ba3wnwflaNW6QheYvxoj5S8Q old/xenolinux-2.4.16-sparse/include/asm-xeno/io.h
    3.99 -3ddb79ba1MhHpElCXFlijej2zWVk4g old/xenolinux-2.4.16-sparse/include/asm-xeno/io_apic.h
   3.100 -3ddb79baiyfcZN9rJwhq0UeFjI6GkQ old/xenolinux-2.4.16-sparse/include/asm-xeno/ioctl.h
   3.101 -3ddb79badReKYSok3yHShb4jg0vA-A old/xenolinux-2.4.16-sparse/include/asm-xeno/ioctls.h
   3.102 -3ddb79b9iuIxteTXg8_myIsrWF5uxg old/xenolinux-2.4.16-sparse/include/asm-xeno/ipc.h
   3.103 -3ddb79baw5Dxo78880UMSanDV70WdA old/xenolinux-2.4.16-sparse/include/asm-xeno/ipcbuf.h
   3.104 -3ddb79ban9FUBuEaznRZvPfry3xnHQ old/xenolinux-2.4.16-sparse/include/asm-xeno/irq.h
   3.105 -3ddb79banJ5r-mqE7LZ8nPGTADaGBA old/xenolinux-2.4.16-sparse/include/asm-xeno/kdb.h
   3.106 -3ddb79baoaoHGTW0oiBXFPUg4KWydw old/xenolinux-2.4.16-sparse/include/asm-xeno/kdbprivate.h
   3.107 -3ddb79bam2K6c7tS2HX6jis2Bqx71w old/xenolinux-2.4.16-sparse/include/asm-xeno/keyboard.h
   3.108 -3ddb79baQ8gGrZm2Jlo3I1ntD0H5HA old/xenolinux-2.4.16-sparse/include/asm-xeno/kmap_types.h
   3.109 -3ddb79b9MeQEYrafy-Mx9OoeVFM_uw old/xenolinux-2.4.16-sparse/include/asm-xeno/ldt.h
   3.110 -3ddb79baAsy5W-cJ9ML_w9chqqUh4A old/xenolinux-2.4.16-sparse/include/asm-xeno/linux_logo.h
   3.111 -3ddb79b9uhsumPVE0wGgarfIkYDSFA old/xenolinux-2.4.16-sparse/include/asm-xeno/locks.h
   3.112 -3ddb79b954ISbF9e68hB0WTulCJRgg old/xenolinux-2.4.16-sparse/include/asm-xeno/math_emu.h
   3.113 -3ddb79b9EZDlC6RGn_y0OYr0nyQWlw old/xenolinux-2.4.16-sparse/include/asm-xeno/mc146818rtc.h
   3.114 -3ddb79b9M6pTF4maDgh8TYbg_HHUbw old/xenolinux-2.4.16-sparse/include/asm-xeno/mca_dma.h
   3.115 -3ddb79baA7dlps8FkicOUEXKEQuQsA old/xenolinux-2.4.16-sparse/include/asm-xeno/mman.h
   3.116 -3ddb79baKfF36-eRvkxnEvMRQRai-w old/xenolinux-2.4.16-sparse/include/asm-xeno/mmu.h
   3.117 -3ddb79baQyKbT5U4EmZNePY9Txp-tA old/xenolinux-2.4.16-sparse/include/asm-xeno/mmu_context.h
   3.118 -3ddb79bberC3Ghs4vy-06Pu-LSiWtw old/xenolinux-2.4.16-sparse/include/asm-xeno/mmx.h
   3.119 -3ddb79bbsJLF10xQcKDoV8f_7gcOXg old/xenolinux-2.4.16-sparse/include/asm-xeno/module.h
   3.120 -3ddb79bbY5RffJ8_F1oC4VI7q3Eejg old/xenolinux-2.4.16-sparse/include/asm-xeno/mpspec.h
   3.121 -3ddb79b90vB4Vzzy_wL6SYXQMy9N9Q old/xenolinux-2.4.16-sparse/include/asm-xeno/msgbuf.h
   3.122 -3ddb79bbZ5a_vTk0xcgOHuPokaqwMw old/xenolinux-2.4.16-sparse/include/asm-xeno/msr.h
   3.123 -3ddb79b9y1xAKaPiBd79MBcCopNNYw old/xenolinux-2.4.16-sparse/include/asm-xeno/mtrr.h
   3.124 -3ddb79b90hX0QBJlWQN_VsHtX5Ijkw old/xenolinux-2.4.16-sparse/include/asm-xeno/namei.h
   3.125 -3ddb79bbG2p9MNq7tuISz8md1Oj2lg old/xenolinux-2.4.16-sparse/include/asm-xeno/page.h
   3.126 -3ddb79bb_iUa2piFSwaB8YPw-rB5SQ old/xenolinux-2.4.16-sparse/include/asm-xeno/param.h
   3.127 -3ddb79b9Y8UU0S9AoDznoqqcYxg9-A old/xenolinux-2.4.16-sparse/include/asm-xeno/parport.h
   3.128 -3ddb79b9K9_edWxBHS7TdCpyDmfp6g old/xenolinux-2.4.16-sparse/include/asm-xeno/pgalloc.h
   3.129 -3ddb79bahaS_P3UYp9VEU6kHxXbajA old/xenolinux-2.4.16-sparse/include/asm-xeno/pgtable-2level.h
   3.130 -3ddb79b9MjXUB_rk29GJgaNY24feCw old/xenolinux-2.4.16-sparse/include/asm-xeno/pgtable-3level.h
   3.131 -3ddb79bbPF2ENpNHBru8K3hyYVPmkQ old/xenolinux-2.4.16-sparse/include/asm-xeno/pgtable.h
   3.132 -3ddb79b9t9xKrOf8aP3X5jEit9tj-w old/xenolinux-2.4.16-sparse/include/asm-xeno/poll.h
   3.133 -3ddb79b9xHtTDWFaI9ncAtxyUth0Yg old/xenolinux-2.4.16-sparse/include/asm-xeno/posix_types.h
   3.134 -3ddb79b9VwZ9YsSpA7CkJmYXVadrCA old/xenolinux-2.4.16-sparse/include/asm-xeno/processor.h
   3.135 -3ddb79bbKaOkHrGG9j05AGlii-voaQ old/xenolinux-2.4.16-sparse/include/asm-xeno/ptrace.h
   3.136 -3ddb79bbVpJCVTXmc2yNf1rsC00YEg old/xenolinux-2.4.16-sparse/include/asm-xeno/resource.h
   3.137 -3ddb79bbtU0Kh27NbNpqKAIhshJvXQ old/xenolinux-2.4.16-sparse/include/asm-xeno/rwlock.h
   3.138 -3ddb79b97LhdmW6hYmybQOPDkK6plg old/xenolinux-2.4.16-sparse/include/asm-xeno/rwsem.h
   3.139 -3ddb79bbgRzM1NoXYbLoOCbZt8s5NA old/xenolinux-2.4.16-sparse/include/asm-xeno/scatterlist.h
   3.140 -3ddb79b9xCi3F80Z6xxx6nzkCAo8vQ old/xenolinux-2.4.16-sparse/include/asm-xeno/segment.h
   3.141 -3ddb79b9WxySbCKDoMgTgPtn1G3BFw old/xenolinux-2.4.16-sparse/include/asm-xeno/semaphore.h
   3.142 -3ddb79b9gNK3dtgXONloSBaNgZPjAg old/xenolinux-2.4.16-sparse/include/asm-xeno/sembuf.h
   3.143 -3ddb79bb2UTDgfwju2J3weDXemw3LA old/xenolinux-2.4.16-sparse/include/asm-xeno/serial.h
   3.144 -3ddb79bbAPFyA_n4dNVCRoee8obOKA old/xenolinux-2.4.16-sparse/include/asm-xeno/setup.h
   3.145 -3ddb79b9XTOB5DwWBGzPLLR4rNEkDQ old/xenolinux-2.4.16-sparse/include/asm-xeno/shmbuf.h
   3.146 -3ddb79b9-_jDlAj3qVZe4opi3zectQ old/xenolinux-2.4.16-sparse/include/asm-xeno/shmparam.h
   3.147 -3ddb79b9AW75ErwlTRX4McxO15sEaQ old/xenolinux-2.4.16-sparse/include/asm-xeno/sigcontext.h
   3.148 -3ddb79b9NBJW-KAI3mgveUCr7sIOwA old/xenolinux-2.4.16-sparse/include/asm-xeno/siginfo.h
   3.149 -3ddb79bbj0i8tUVNMKtZVrLJqv3Nsw old/xenolinux-2.4.16-sparse/include/asm-xeno/signal.h
   3.150 -3ddb79bbfAmpotdy-No2dwGez2fnIg old/xenolinux-2.4.16-sparse/include/asm-xeno/smp.h
   3.151 -3ddb79b9pDERXiqSumFWMTFJ1X9xIw old/xenolinux-2.4.16-sparse/include/asm-xeno/smplock.h
   3.152 -3ddb79bbuCOIWTlWEHgOTexEBbdDow old/xenolinux-2.4.16-sparse/include/asm-xeno/socket.h
   3.153 -3ddb79b9ExeUznVBlSn1e2nvOCrJ4A old/xenolinux-2.4.16-sparse/include/asm-xeno/sockios.h
   3.154 -3ddb79b9kL3xvucBb-Gmg4_vo-99vw old/xenolinux-2.4.16-sparse/include/asm-xeno/softirq.h
   3.155 -3ddb79b9rJ8AfSzGzA0arI8mazYLlQ old/xenolinux-2.4.16-sparse/include/asm-xeno/spinlock.h
   3.156 -3ddb79bbXaA_zUHNPkAKRNz1h0gIJw old/xenolinux-2.4.16-sparse/include/asm-xeno/stat.h
   3.157 -3ddb79b9G004IlCplrjWgF1aXbp8dA old/xenolinux-2.4.16-sparse/include/asm-xeno/statfs.h
   3.158 -3ddb79bbRsy3GlCFrQEbVMVp--xlwQ old/xenolinux-2.4.16-sparse/include/asm-xeno/string-486.h
   3.159 -3ddb79bb4xug4cDph6ODLQFQIan_sg old/xenolinux-2.4.16-sparse/include/asm-xeno/string.h
   3.160 -3ddb79b9JhjJtJUO3g5LmrHPkdxgKg old/xenolinux-2.4.16-sparse/include/asm-xeno/system.h
   3.161 -3ddb79b9tbjCU9zSbqKbbv4m8tijlg old/xenolinux-2.4.16-sparse/include/asm-xeno/termbits.h
   3.162 -3ddb79bbi0mW10tH4xX1_KHXKM_xPg old/xenolinux-2.4.16-sparse/include/asm-xeno/termios.h
   3.163 -3ddb79b9JuR1VvNzlkyMlA-Dnlmy9Q old/xenolinux-2.4.16-sparse/include/asm-xeno/timex.h
   3.164 -3ddb79b9Bofq-p3sCTF0ELVuf_iBYA old/xenolinux-2.4.16-sparse/include/asm-xeno/tlb.h
   3.165 -3ddb79b9tpBUqS8-S6euSqyk2hFkKg old/xenolinux-2.4.16-sparse/include/asm-xeno/types.h
   3.166 -3ddb79bb5bkAaEzD7pdqQZdWyA_0eQ old/xenolinux-2.4.16-sparse/include/asm-xeno/uaccess.h
   3.167 -3ddb79bbiDIz1dxgFixHKyGuqRqfDQ old/xenolinux-2.4.16-sparse/include/asm-xeno/ucontext.h
   3.168 -3ddb79ba_Smn-GiYtr5ZTMaZXn-AHg old/xenolinux-2.4.16-sparse/include/asm-xeno/unaligned.h
   3.169 -3ddb79bb3cMSs_k2X5Oq2hOIBvmPYA old/xenolinux-2.4.16-sparse/include/asm-xeno/unistd.h
   3.170 -3ddb79ba2qYtIQAT_-vCFkkZUXu_UQ old/xenolinux-2.4.16-sparse/include/asm-xeno/user.h
   3.171 -3ddb79bbqhb9X9qWOz5Bv4wOzrkITg old/xenolinux-2.4.16-sparse/include/asm-xeno/vga.h
   3.172 -3ddb79bbA52x94o6uwDYsbzrH2hjzA old/xenolinux-2.4.16-sparse/include/asm-xeno/xor.h
   3.173 -3e4a8cb7ON8EclY3NN3YPXyMT941hA old/xenolinux-2.4.16-sparse/include/linux/blk.h
   3.174 -3e4a8cb7GJrKD0z7EF0VZOhdEa01Mw old/xenolinux-2.4.16-sparse/include/linux/major.h
   3.175 -3ddb79bb_7YG4U75ZmEic9YXWTW7Vw old/xenolinux-2.4.16-sparse/include/linux/sunrpc/debug.h
   3.176 -3e4a8cb7j05wwb1uPZgY16s68o7qAw old/xenolinux-2.4.16-sparse/init/main.c
   3.177 -3ddb79bcxkVPfWlZ1PQKvDrfArzOVw old/xenolinux-2.4.16-sparse/kernel/panic.c
   3.178 -3ddb79bbP31im-mx2NbfthSeqty1Dg old/xenolinux-2.4.16-sparse/mk
   3.179 -3e15d52e0_j129JPvo7xfYGndVFpwQ old/xenolinux-2.4.16-sparse/mm/memory.c
   3.180 -3e15d535DLvpzTrLRUIerB69LpJD1g old/xenolinux-2.4.16-sparse/mm/mremap.c
   3.181 -3e15d531m1Y1_W8ki64AFOU_ua4C4w old/xenolinux-2.4.16-sparse/mm/swapfile.c
   3.182  3e6377b24eQqYMsDi9XrFkIgTzZ47A tools/balloon/Makefile
   3.183  3e6377d6eiFjF1hHIS6JEIOFk62xSA tools/balloon/README
   3.184  3e6377dbGcgnisKw16DPCaND7oGO3Q tools/balloon/balloon.c
     4.1 --- a/old/xenolinux-2.4.16-sparse/Makefile	Tue Mar 25 11:15:01 2003 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,583 +0,0 @@
     4.4 -VERSION = 2
     4.5 -PATCHLEVEL = 4
     4.6 -SUBLEVEL = 16
     4.7 -EXTRAVERSION = -kdb-xeno
     4.8 -
     4.9 -KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
    4.10 -
    4.11 -HW_ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
    4.12 -ifndef ARCH
    4.13 -ARCH := $(HW_ARCH)
    4.14 -endif
    4.15 -
    4.16 -ARCH=xeno
    4.17 -
    4.18 -KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//")
    4.19 -
    4.20 -CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
    4.21 -	  else if [ -x /bin/bash ]; then echo /bin/bash; \
    4.22 -	  else echo sh; fi ; fi)
    4.23 -TOPDIR	:= $(shell /bin/pwd)
    4.24 -
    4.25 -HPATH   	= $(TOPDIR)/include
    4.26 -FINDHPATH	= $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net
    4.27 -
    4.28 -HOSTCC  	= gcc
    4.29 -HOSTCFLAGS	= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
    4.30 -
    4.31 -CROSS_COMPILE 	= 
    4.32 -
    4.33 -#
    4.34 -# Include the make variables (CC, etc...)
    4.35 -#
    4.36 -
    4.37 -AS		= $(CROSS_COMPILE)as
    4.38 -LD		= $(CROSS_COMPILE)ld
    4.39 -CC		= $(CROSS_COMPILE)gcc
    4.40 -CPP		= $(CC) -E
    4.41 -AR		= $(CROSS_COMPILE)ar
    4.42 -NM		= $(CROSS_COMPILE)nm
    4.43 -STRIP		= $(CROSS_COMPILE)strip
    4.44 -OBJCOPY		= $(CROSS_COMPILE)objcopy
    4.45 -OBJDUMP		= $(CROSS_COMPILE)objdump
    4.46 -MAKEFILES	= $(TOPDIR)/.config
    4.47 -GENKSYMS	= /sbin/genksyms
    4.48 -DEPMOD		= /sbin/depmod
    4.49 -KALLSYMS	= /sbin/kallsyms
    4.50 -MODFLAGS	= -DMODULE
    4.51 -CFLAGS_KERNEL	=
    4.52 -PERL		= perl
    4.53 -AWK		= awk
    4.54 -TMPPREFIX	=
    4.55 -
    4.56 -export	VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
    4.57 -	CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
    4.58 -	CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS PERL AWK
    4.59 -
    4.60 -all:	do-it-all
    4.61 -
    4.62 -#
    4.63 -# Make "config" the default target if there is no configuration file or
    4.64 -# "depend" the target if there is no top-level dependency information.
    4.65 -#
    4.66 -
    4.67 -ifeq (.config,$(wildcard .config))
    4.68 -include .config
    4.69 -ifeq (.depend,$(wildcard .depend))
    4.70 -include .depend
    4.71 -do-it-all:	Version vmlinux
    4.72 -else
    4.73 -CONFIGURATION = depend
    4.74 -do-it-all:	depend
    4.75 -endif
    4.76 -else
    4.77 -CONFIGURATION = config
    4.78 -do-it-all:	config
    4.79 -endif
    4.80 -
    4.81 -#
    4.82 -# INSTALL_PATH specifies where to place the updated kernel and system map
    4.83 -# images.  Uncomment if you want to place them anywhere other than root.
    4.84 -#
    4.85 -
    4.86 -#export	INSTALL_PATH=/boot
    4.87 -
    4.88 -#
    4.89 -# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
    4.90 -# relocations required by build roots.  This is not defined in the
    4.91 -# makefile but the arguement can be passed to make if needed.
    4.92 -#
    4.93 -
    4.94 -MODLIB	:= $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
    4.95 -export MODLIB
    4.96 -
    4.97 -#
    4.98 -# standard CFLAGS
    4.99 -#
   4.100 -
   4.101 -CPPFLAGS := -D__KERNEL__ -I$(HPATH)
   4.102 -CPPFLAGS += $(patsubst %,-I%,$(CROSS_COMPILE_INC))
   4.103 -
   4.104 -CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
   4.105 -	  -fno-strict-aliasing -fno-common
   4.106 -ifndef CONFIG_FRAME_POINTER
   4.107 -CFLAGS += -fomit-frame-pointer
   4.108 -endif
   4.109 -AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
   4.110 -
   4.111 -#
   4.112 -# ROOT_DEV specifies the default root-device when making the image.
   4.113 -# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
   4.114 -# the default of FLOPPY is used by 'build'.
   4.115 -# This is i386 specific.
   4.116 -#
   4.117 -
   4.118 -export ROOT_DEV = CURRENT
   4.119 -
   4.120 -#
   4.121 -# If you want to preset the SVGA mode, uncomment the next line and
   4.122 -# set SVGA_MODE to whatever number you want.
   4.123 -# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
   4.124 -# The number is the same as you would ordinarily press at bootup.
   4.125 -# This is i386 specific.
   4.126 -#
   4.127 -
   4.128 -export SVGA_MODE = -DSVGA_MODE=NORMAL_VGA
   4.129 -
   4.130 -#
   4.131 -# If you want the RAM disk device, define this to be the size in blocks.
   4.132 -# This is i386 specific.
   4.133 -#
   4.134 -
   4.135 -#export RAMDISK = -DRAMDISK=512
   4.136 -
   4.137 -CORE_FILES	=kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o
   4.138 -NETWORKS	=net/network.o
   4.139 -
   4.140 -LIBS		=$(TOPDIR)/lib/lib.a
   4.141 -SUBDIRS		=kernel drivers mm fs net ipc lib
   4.142 -
   4.143 -ifeq ($(CONFIG_KDB),y)
   4.144 -CORE_FILES	+= kdb/kdb.o
   4.145 -SUBDIRS		+= kdb
   4.146 -endif
   4.147 -
   4.148 -DRIVERS-n :=
   4.149 -DRIVERS-y :=
   4.150 -DRIVERS-m :=
   4.151 -DRIVERS-  :=
   4.152 -
   4.153 -DRIVERS-$(CONFIG_ACPI) += drivers/acpi/acpi.o
   4.154 -DRIVERS-$(CONFIG_PARPORT) += drivers/parport/driver.o
   4.155 -DRIVERS-y += drivers/char/char.o \
   4.156 -	drivers/block/block.o \
   4.157 -	drivers/misc/misc.o \
   4.158 -	drivers/net/net.o \
   4.159 -	drivers/media/media.o
   4.160 -DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o
   4.161 -DRIVERS-$(CONFIG_DRM) += drivers/char/drm/drm.o
   4.162 -DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a
   4.163 -DRIVERS-$(CONFIG_ISDN) += drivers/isdn/isdn.a
   4.164 -DRIVERS-$(CONFIG_NET_FC) += drivers/net/fc/fc.o
   4.165 -DRIVERS-$(CONFIG_APPLETALK) += drivers/net/appletalk/appletalk.o
   4.166 -DRIVERS-$(CONFIG_TR) += drivers/net/tokenring/tr.o
   4.167 -DRIVERS-$(CONFIG_WAN) += drivers/net/wan/wan.o
   4.168 -DRIVERS-$(CONFIG_ARCNET) += drivers/net/arcnet/arcnetdrv.o
   4.169 -DRIVERS-$(CONFIG_ATM) += drivers/atm/atm.o
   4.170 -DRIVERS-$(CONFIG_IDE) += drivers/ide/idedriver.o
   4.171 -DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
   4.172 -DRIVERS-$(CONFIG_SCSI) += drivers/scsi/scsidrv.o
   4.173 -DRIVERS-$(CONFIG_FUSION_BOOT) += drivers/message/fusion/fusion.o
   4.174 -DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394drv.o
   4.175 -
   4.176 -ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR)$(CONFIG_PARIDE_PCD),)
   4.177 -DRIVERS-y += drivers/cdrom/driver.o
   4.178 -endif
   4.179 -
   4.180 -DRIVERS-$(CONFIG_SOUND) += drivers/sound/sounddrivers.o
   4.181 -DRIVERS-$(CONFIG_PCI) += drivers/pci/driver.o
   4.182 -DRIVERS-$(CONFIG_MTD) += drivers/mtd/mtdlink.o
   4.183 -DRIVERS-$(CONFIG_PCMCIA) += drivers/pcmcia/pcmcia.o
   4.184 -DRIVERS-$(CONFIG_NET_PCMCIA) += drivers/net/pcmcia/pcmcia_net.o
   4.185 -DRIVERS-$(CONFIG_NET_WIRELESS) += drivers/net/wireless/wireless_net.o
   4.186 -DRIVERS-$(CONFIG_PCMCIA_CHRDEV) += drivers/char/pcmcia/pcmcia_char.o
   4.187 -DRIVERS-$(CONFIG_DIO) += drivers/dio/dio.a
   4.188 -DRIVERS-$(CONFIG_SBUS) += drivers/sbus/sbus_all.o
   4.189 -DRIVERS-$(CONFIG_ZORRO) += drivers/zorro/driver.o
   4.190 -DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
   4.191 -DRIVERS-$(CONFIG_ALL_PPC) += drivers/macintosh/macintosh.o
   4.192 -DRIVERS-$(CONFIG_MAC) += drivers/macintosh/macintosh.o
   4.193 -DRIVERS-$(CONFIG_ISAPNP) += drivers/pnp/pnp.o
   4.194 -DRIVERS-$(CONFIG_SGI_IP22) += drivers/sgi/sgi.a
   4.195 -DRIVERS-$(CONFIG_VT) += drivers/video/video.o
   4.196 -DRIVERS-$(CONFIG_PARIDE) += drivers/block/paride/paride.a
   4.197 -DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o
   4.198 -DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
   4.199 -DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
   4.200 -DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o
   4.201 -DRIVERS-$(CONFIG_I2O) += drivers/message/i2o/i2o.o
   4.202 -DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda.o
   4.203 -DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o
   4.204 -DRIVERS-$(CONFIG_PHONE) += drivers/telephony/telephony.o
   4.205 -DRIVERS-$(CONFIG_MD) += drivers/md/mddev.o
   4.206 -DRIVERS-$(CONFIG_BLUEZ) += drivers/bluetooth/bluetooth.o
   4.207 -DRIVERS-$(CONFIG_HOTPLUG_PCI) += drivers/hotplug/vmlinux-obj.o
   4.208 -
   4.209 -DRIVERS := $(DRIVERS-y)
   4.210 -
   4.211 -
   4.212 -# files removed with 'make clean'
   4.213 -CLEAN_FILES = \
   4.214 -	kernel/ksyms.lst include/linux/compile.h \
   4.215 -	vmlinux System.map \
   4.216 -	$(TMPPREFIX).tmp* \
   4.217 -	drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
   4.218 -	drivers/char/conmakehash \
   4.219 -	drivers/char/drm/*-mod.c \
   4.220 -	drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist \
   4.221 -	drivers/zorro/devlist.h drivers/zorro/gen-devlist \
   4.222 -	drivers/sound/bin2hex drivers/sound/hex2hex \
   4.223 -	drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2} \
   4.224 -	drivers/scsi/aic7xxx/aicasm/aicasm_gram.c \
   4.225 -	drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \
   4.226 -	drivers/scsi/aic7xxx/aicasm/y.tab.h \
   4.227 -	drivers/scsi/aic7xxx/aicasm/aicasm \
   4.228 -	drivers/scsi/53c700-mem.c \
   4.229 -	net/khttpd/make_times_h \
   4.230 -	net/khttpd/times.h \
   4.231 -	submenu*
   4.232 -# directories removed with 'make clean'
   4.233 -CLEAN_DIRS = \
   4.234 -	modules
   4.235 -
   4.236 -# files removed with 'make mrproper'
   4.237 -MRPROPER_FILES = \
   4.238 -	include/linux/autoconf.h include/linux/version.h \
   4.239 -	drivers/net/hamradio/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h \
   4.240 -	drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h \
   4.241 -	drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h \
   4.242 -	drivers/net/hamradio/soundmodem/gentbl \
   4.243 -	drivers/sound/*_boot.h drivers/sound/.*.boot \
   4.244 -	drivers/sound/msndinit.c \
   4.245 -	drivers/sound/msndperm.c \
   4.246 -	drivers/sound/pndsperm.c \
   4.247 -	drivers/sound/pndspini.c \
   4.248 -	drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \
   4.249 -	.version .config* config.in config.old \
   4.250 -	scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \
   4.251 -	scripts/lxdialog/*.o scripts/lxdialog/lxdialog \
   4.252 -	.menuconfig.log \
   4.253 -	include/asm \
   4.254 -	kdb/gen-kdb_cmds.c \
   4.255 -	.hdepend scripts/mkdep scripts/split-include scripts/docproc \
   4.256 -	$(TOPDIR)/include/linux/modversions.h \
   4.257 -	kernel.spec
   4.258 -
   4.259 -# directories removed with 'make mrproper'
   4.260 -MRPROPER_DIRS = \
   4.261 -	include/config \
   4.262 -	$(TOPDIR)/include/linux/modules
   4.263 -
   4.264 -
   4.265 -include arch/$(ARCH)/Makefile
   4.266 -
   4.267 -export	CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL
   4.268 -
   4.269 -export	NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS
   4.270 -
   4.271 -.S.s:
   4.272 -	$(CPP) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -o $*.s $<
   4.273 -.S.o:
   4.274 -	$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -c -o $*.o $<
   4.275 -
   4.276 -Version: dummy
   4.277 -	@rm -f include/linux/compile.h
   4.278 -
   4.279 -boot: vmlinux
   4.280 -	@$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C arch/$(ARCH)/boot
   4.281 -
   4.282 -LD_VMLINUX	:= $(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o \
   4.283 -			--start-group \
   4.284 -			$(CORE_FILES) \
   4.285 -			$(DRIVERS) \
   4.286 -			$(NETWORKS) \
   4.287 -			$(LIBS) \
   4.288 -			--end-group
   4.289 -ifeq ($(CONFIG_KALLSYMS),y)
   4.290 -LD_VMLINUX_KALLSYMS	:= $(TMPPREFIX).tmp_kallsyms3.o
   4.291 -else
   4.292 -LD_VMLINUX_KALLSYMS	:=
   4.293 -endif
   4.294 -
   4.295 -vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o linuxsubdirs
   4.296 -	@$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" kallsyms
   4.297 -
   4.298 -.PHONY:	kallsyms
   4.299 -
   4.300 -kallsyms:
   4.301 -ifeq ($(CONFIG_KALLSYMS),y)
   4.302 -	@echo kallsyms pass 1
   4.303 -	$(LD_VMLINUX) -o $(TMPPREFIX).tmp_vmlinux1
   4.304 -	@$(KALLSYMS) $(TMPPREFIX).tmp_vmlinux1 > $(TMPPREFIX).tmp_kallsyms1.o
   4.305 -	@echo kallsyms pass 2
   4.306 -	@$(LD_VMLINUX) $(TMPPREFIX).tmp_kallsyms1.o -o $(TMPPREFIX).tmp_vmlinux2
   4.307 -	@$(KALLSYMS) $(TMPPREFIX).tmp_vmlinux2 > $(TMPPREFIX).tmp_kallsyms2.o
   4.308 -	@echo kallsyms pass 3
   4.309 -	@$(LD_VMLINUX) $(TMPPREFIX).tmp_kallsyms2.o -o $(TMPPREFIX).tmp_vmlinux3
   4.310 -	@$(KALLSYMS) $(TMPPREFIX).tmp_vmlinux3 > $(TMPPREFIX).tmp_kallsyms3.o
   4.311 -endif
   4.312 -	$(LD_VMLINUX) $(LD_VMLINUX_KALLSYMS) -o $(TMPPREFIX)vmlinux
   4.313 -ifneq ($(TMPPREFIX),)
   4.314 -	mv $(TMPPREFIX)vmlinux vmlinux
   4.315 -endif
   4.316 -	$(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
   4.317 -	@rm -f $(TMPPREFIX).tmp_vmlinux* $(TMPPREFIX).tmp_kallsyms*
   4.318 -
   4.319 -symlinks:
   4.320 -	rm -f include/asm
   4.321 -	( cd include ; ln -sf asm-$(ARCH) asm)
   4.322 -	@if [ ! -d include/linux/modules ]; then \
   4.323 -		mkdir include/linux/modules; \
   4.324 -	fi
   4.325 -
   4.326 -oldconfig: symlinks
   4.327 -	$(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
   4.328 -
   4.329 -xconfig: symlinks
   4.330 -	$(MAKE) -C scripts kconfig.tk
   4.331 -	wish -f scripts/kconfig.tk
   4.332 -
   4.333 -menuconfig: include/linux/version.h symlinks
   4.334 -	$(MAKE) -C scripts/lxdialog all
   4.335 -	$(CONFIG_SHELL) scripts/Menuconfig arch/$(ARCH)/config.in
   4.336 -
   4.337 -config: symlinks
   4.338 -	$(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in
   4.339 -
   4.340 -include/config/MARKER: scripts/split-include include/linux/autoconf.h
   4.341 -	scripts/split-include include/linux/autoconf.h include/config
   4.342 -	@ touch include/config/MARKER
   4.343 -
   4.344 -linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
   4.345 -
   4.346 -$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER
   4.347 -	$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
   4.348 -
   4.349 -$(TOPDIR)/include/linux/version.h: include/linux/version.h
   4.350 -$(TOPDIR)/include/linux/compile.h: include/linux/compile.h
   4.351 -
   4.352 -newversion:
   4.353 -	. scripts/mkversion > .tmpversion
   4.354 -	@mv -f .tmpversion .version
   4.355 -
   4.356 -include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion
   4.357 -	@echo -n \#define UTS_VERSION \"\#`cat .version` > .ver
   4.358 -	@if [ -n "$(CONFIG_SMP)" ] ; then echo -n " SMP" >> .ver; fi
   4.359 -	@if [ -f .name ]; then  echo -n \-`cat .name` >> .ver; fi
   4.360 -	@echo ' '`date`'"' >> .ver
   4.361 -	@echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> .ver
   4.362 -	@echo \#define LINUX_COMPILE_BY \"`whoami`\" >> .ver
   4.363 -	@echo \#define LINUX_COMPILE_HOST \"`hostname`\" >> .ver
   4.364 -	@if [ -x /bin/dnsdomainname ]; then \
   4.365 -	   echo \#define LINUX_COMPILE_DOMAIN \"`dnsdomainname`\"; \
   4.366 -	 elif [ -x /bin/domainname ]; then \
   4.367 -	   echo \#define LINUX_COMPILE_DOMAIN \"`domainname`\"; \
   4.368 -	 else \
   4.369 -	   echo \#define LINUX_COMPILE_DOMAIN ; \
   4.370 -	 fi >> .ver
   4.371 -	@echo \#define LINUX_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -1`\" >> .ver
   4.372 -	@mv -f .ver $@
   4.373 -
   4.374 -include/linux/version.h: ./Makefile
   4.375 -	@echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
   4.376 -	@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
   4.377 -	@echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver
   4.378 -	@mv -f .ver $@
   4.379 -
   4.380 -init/version.o: init/version.c include/linux/compile.h include/config/MARKER
   4.381 -	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(HW_ARCH)"' -c -o init/version.o init/version.c
   4.382 -
   4.383 -init/main.o: init/main.c include/config/MARKER
   4.384 -	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -c -o $*.o $<
   4.385 -
   4.386 -fs lib mm ipc kernel drivers net: dummy
   4.387 -	$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)
   4.388 -
   4.389 -TAGS: dummy
   4.390 -	etags `find include/asm-$(ARCH) -name '*.h'`
   4.391 -	find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs etags -a
   4.392 -	find $(SUBDIRS) init -name '*.[ch]' | xargs etags -a
   4.393 -
   4.394 -# Exuberant ctags works better with -I
   4.395 -tags: dummy
   4.396 -	CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
   4.397 -	ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
   4.398 -	find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
   4.399 -	find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a
   4.400 -
   4.401 -ifdef CONFIG_MODULES
   4.402 -ifdef CONFIG_MODVERSIONS
   4.403 -MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
   4.404 -endif
   4.405 -
   4.406 -.PHONY: modules
   4.407 -modules: $(patsubst %, _mod_%, $(SUBDIRS))
   4.408 -
   4.409 -.PHONY: $(patsubst %, _mod_%, $(SUBDIRS))
   4.410 -$(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER
   4.411 -	$(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules
   4.412 -
   4.413 -.PHONY: modules_install
   4.414 -modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post
   4.415 -
   4.416 -.PHONY: _modinst_
   4.417 -_modinst_:
   4.418 -	@rm -rf $(MODLIB)/kernel
   4.419 -	@rm -f $(MODLIB)/build
   4.420 -	@mkdir -p $(MODLIB)/kernel
   4.421 -	@ln -s $(TOPDIR) $(MODLIB)/build
   4.422 -
   4.423 -# If System.map exists, run depmod.  This deliberately does not have a
   4.424 -# dependency on System.map since that would run the dependency tree on
   4.425 -# vmlinux.  This depmod is only for convenience to give the initial
   4.426 -# boot a modules.dep even before / is mounted read-write.  However the
   4.427 -# boot script depmod is the master version.
   4.428 -ifeq "$(strip $(INSTALL_MOD_PATH))" ""
   4.429 -depmod_opts	:=
   4.430 -else
   4.431 -depmod_opts	:= -b $(INSTALL_MOD_PATH) -r
   4.432 -endif
   4.433 -.PHONY: _modinst_post
   4.434 -_modinst_post: _modinst_post_pcmcia
   4.435 -#	if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
   4.436 -
   4.437 -# Backwards compatibilty symlinks for people still using old versions
   4.438 -# of pcmcia-cs with hard coded pathnames on insmod.  Remove
   4.439 -# _modinst_post_pcmcia for kernel 2.4.1.
   4.440 -.PHONY: _modinst_post_pcmcia
   4.441 -_modinst_post_pcmcia:
   4.442 -	cd $(MODLIB); \
   4.443 -	mkdir -p pcmcia; \
   4.444 -	find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
   4.445 -
   4.446 -.PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
   4.447 -$(patsubst %, _modinst_%, $(SUBDIRS)) :
   4.448 -	$(MAKE) -C $(patsubst _modinst_%, %, $@) modules_install
   4.449 -
   4.450 -# modules disabled....
   4.451 -
   4.452 -else
   4.453 -modules modules_install: dummy
   4.454 -	@echo
   4.455 -	@echo "The present kernel configuration has modules disabled."
   4.456 -	@echo "Type 'make config' and enable loadable module support."
   4.457 -	@echo "Then build a kernel with module support enabled."
   4.458 -	@echo
   4.459 -	@exit 1
   4.460 -endif
   4.461 -
   4.462 -clean:	archclean
   4.463 -	find . \( -name '*.[oas]' -o -name core -o -name '.*.flags' \) -type f -print \
   4.464 -		| grep -v lxdialog/ | xargs rm -f
   4.465 -	rm -f $(CLEAN_FILES)
   4.466 -	rm -rf $(CLEAN_DIRS)
   4.467 -	$(MAKE) -C Documentation/DocBook clean
   4.468 -
   4.469 -mrproper: clean archmrproper
   4.470 -	find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f
   4.471 -	rm -f $(MRPROPER_FILES)
   4.472 -	rm -rf $(MRPROPER_DIRS)
   4.473 -	$(MAKE) -C Documentation/DocBook mrproper
   4.474 -
   4.475 -distclean: mrproper
   4.476 -	rm -f core `find . \( -not -type d \) -and \
   4.477 -		\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
   4.478 -		-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
   4.479 -		-o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
   4.480 -
   4.481 -backup: mrproper
   4.482 -	cd .. && tar cf - linux/ | gzip -9 > backup.gz
   4.483 -	sync
   4.484 -
   4.485 -sgmldocs: 
   4.486 -	chmod 755 $(TOPDIR)/scripts/docgen
   4.487 -	chmod 755 $(TOPDIR)/scripts/gen-all-syms
   4.488 -	chmod 755 $(TOPDIR)/scripts/kernel-doc
   4.489 -	$(MAKE) -C $(TOPDIR)/Documentation/DocBook books
   4.490 -
   4.491 -psdocs: sgmldocs
   4.492 -	$(MAKE) -C Documentation/DocBook ps
   4.493 -
   4.494 -pdfdocs: sgmldocs
   4.495 -	$(MAKE) -C Documentation/DocBook pdf
   4.496 -
   4.497 -htmldocs: sgmldocs
   4.498 -	$(MAKE) -C Documentation/DocBook html
   4.499 -
   4.500 -sums:
   4.501 -	find . -type f -print | sort | xargs sum > .SUMS
   4.502 -
   4.503 -dep-files: scripts/mkdep archdep include/linux/version.h
   4.504 -	scripts/mkdep -- init/*.c > .depend
   4.505 -	scripts/mkdep -- `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
   4.506 -	$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
   4.507 -ifdef CONFIG_MODVERSIONS
   4.508 -	$(MAKE) update-modverfile
   4.509 -endif
   4.510 -
   4.511 -ifdef CONFIG_MODVERSIONS
   4.512 -MODVERFILE := $(TOPDIR)/include/linux/modversions.h
   4.513 -else
   4.514 -MODVERFILE :=
   4.515 -endif
   4.516 -export	MODVERFILE
   4.517 -
   4.518 -depend dep: dep-files
   4.519 -
   4.520 -checkconfig:
   4.521 -	find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl
   4.522 -
   4.523 -checkhelp:
   4.524 -	find * -name [cC]onfig.in -print | sort | xargs $(PERL) -w scripts/checkhelp.pl
   4.525 -
   4.526 -checkincludes:
   4.527 -	find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl
   4.528 -
   4.529 -ifdef CONFIGURATION
   4.530 -..$(CONFIGURATION):
   4.531 -	@echo
   4.532 -	@echo "You have a bad or nonexistent" .$(CONFIGURATION) ": running 'make" $(CONFIGURATION)"'"
   4.533 -	@echo
   4.534 -	$(MAKE) $(CONFIGURATION)
   4.535 -	@echo
   4.536 -	@echo "Successful. Try re-making (ignore the error that follows)"
   4.537 -	@echo
   4.538 -	exit 1
   4.539 -
   4.540 -#dummy: ..$(CONFIGURATION)
   4.541 -dummy:
   4.542 -
   4.543 -else
   4.544 -
   4.545 -dummy:
   4.546 -
   4.547 -endif
   4.548 -
   4.549 -include Rules.make
   4.550 -
   4.551 -#
   4.552 -# This generates dependencies for the .h files.
   4.553 -#
   4.554 -
   4.555 -scripts/mkdep: scripts/mkdep.c
   4.556 -	$(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
   4.557 -
   4.558 -scripts/split-include: scripts/split-include.c
   4.559 -	$(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
   4.560 -
   4.561 -#
   4.562 -# RPM target
   4.563 -#
   4.564 -#	If you do a make spec before packing the tarball you can rpm -ta it
   4.565 -#
   4.566 -spec:
   4.567 -	. scripts/mkspec >kernel.spec
   4.568 -
   4.569 -#
   4.570 -#	Build a tar ball, generate an rpm from it and pack the result
   4.571 -#	There arw two bits of magic here
   4.572 -#	1) The use of /. to avoid tar packing just the symlink
   4.573 -#	2) Removing the .dep files as they have source paths in them that
   4.574 -#	   will become invalid
   4.575 -#
   4.576 -rpm:	clean spec
   4.577 -	find . \( -size 0 -o -name .depend -o -name .hdepend \) -type f -print | xargs rm -f
   4.578 -	set -e; \
   4.579 -	cd $(TOPDIR)/.. ; \
   4.580 -	ln -sf $(TOPDIR) $(KERNELPATH) ; \
   4.581 -	tar -cvz --exclude CVS -f $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \
   4.582 -	rm $(KERNELPATH) ; \
   4.583 -	cd $(TOPDIR) ; \
   4.584 -	. scripts/mkversion > .version ; \
   4.585 -	rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
   4.586 -	rm $(TOPDIR)/../$(KERNELPATH).tar.gz
     5.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/Makefile	Tue Mar 25 11:15:01 2003 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,98 +0,0 @@
     5.4 -#
     5.5 -# xeno/Makefile
     5.6 -#
     5.7 -# This file is included by the global makefile so that you can add your own
     5.8 -# architecture-specific flags and dependencies. Remember to do have actions
     5.9 -# for "archclean" and "archdep" for cleaning up and making dependencies for
    5.10 -# this architecture
    5.11 -#
    5.12 -# This file is subject to the terms and conditions of the GNU General Public
    5.13 -# License.  See the file "COPYING" in the main directory of this archive
    5.14 -# for more details.
    5.15 -#
    5.16 -# Copyright (C) 1994 by Linus Torvalds
    5.17 -#
    5.18 -# 19990713  Artur Skawina <skawina@geocities.com>
    5.19 -#           Added '-march' and '-mpreferred-stack-boundary' support
    5.20 -#
    5.21 -
    5.22 -LD=$(CROSS_COMPILE)ld -m elf_i386
    5.23 -OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
    5.24 -LDFLAGS=-e stext
    5.25 -LINKFLAGS =-T $(TOPDIR)/arch/xeno/vmlinux.lds $(LDFLAGS)
    5.26 -
    5.27 -CFLAGS += -pipe
    5.28 -
    5.29 -# prevent gcc from keeping the stack 16 byte aligned
    5.30 -CFLAGS += $(shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2"; fi)
    5.31 -
    5.32 -ifdef CONFIG_M686
    5.33 -CFLAGS += -march=i686
    5.34 -endif
    5.35 -
    5.36 -ifdef CONFIG_MPENTIUMIII
    5.37 -CFLAGS += -march=i686
    5.38 -endif
    5.39 -
    5.40 -ifdef CONFIG_MPENTIUM4
    5.41 -CFLAGS += -march=i686
    5.42 -endif
    5.43 -
    5.44 -ifdef CONFIG_MK7
    5.45 -CFLAGS += $(shell if $(CC) -march=athlon -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=athlon"; else echo "-march=i686 -malign-functions=4"; fi) 
    5.46 -endif
    5.47 -
    5.48 -HEAD := arch/xeno/kernel/head.o arch/xeno/kernel/init_task.o
    5.49 -
    5.50 -SUBDIRS += arch/xeno/kernel arch/xeno/mm arch/xeno/lib
    5.51 -SUBDIRS += arch/xeno/drivers/console arch/xeno/drivers/network
    5.52 -SUBDIRS += arch/xeno/drivers/dom0 arch/xeno/drivers/block
    5.53 -
    5.54 -CORE_FILES += arch/xeno/kernel/kernel.o arch/xeno/mm/mm.o
    5.55 -CORE_FILES += arch/xeno/drivers/console/con.o
    5.56 -CORE_FILES += arch/xeno/drivers/block/blk.o
    5.57 -CORE_FILES += arch/xeno/drivers/network/net.o
    5.58 -CORE_FILES += arch/xeno/drivers/dom0/dom0.o
    5.59 -LIBS := $(TOPDIR)/arch/xeno/lib/lib.a $(LIBS) $(TOPDIR)/arch/xeno/lib/lib.a
    5.60 -
    5.61 -arch/xeno/kernel: dummy
    5.62 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xeno/kernel
    5.63 -
    5.64 -arch/xeno/mm: dummy
    5.65 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xeno/mm
    5.66 -
    5.67 -arch/xeno/drivers/console: dummy
    5.68 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xeno/drivers/console
    5.69 -
    5.70 -arch/xeno/drivers/network: dummy
    5.71 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xeno/drivers/network
    5.72 -
    5.73 -arch/xeno/drivers/block: dummy
    5.74 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xeno/drivers/block
    5.75 -
    5.76 -arch/xeno/drivers/dom0: dummy
    5.77 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xeno/drivers/dom0
    5.78 -
    5.79 -ifdef CONFIG_KDB
    5.80 -arch/xeno/kdb: dummy
    5.81 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xeno/kdb
    5.82 -endif
    5.83 -
    5.84 -MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
    5.85 -
    5.86 -vmlinux: arch/xeno/vmlinux.lds
    5.87 -
    5.88 -FORCE: ;
    5.89 -
    5.90 -.PHONY: bzImage compressed clean archclean archmrproper archdep
    5.91 -
    5.92 -bzImage: vmlinux
    5.93 -	@$(MAKEBOOT) image.gz
    5.94 -
    5.95 -archclean:
    5.96 -	@$(MAKEBOOT) clean
    5.97 -
    5.98 -archmrproper:
    5.99 -
   5.100 -archdep:
   5.101 -	@$(MAKEBOOT) dep
     6.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/boot/Makefile	Tue Mar 25 11:15:01 2003 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,22 +0,0 @@
     6.4 -#
     6.5 -# arch/xeno/boot/Makefile
     6.6 -#
     6.7 -
     6.8 -image.gz: image
     6.9 -	gzip -f -9 < $< > $@
    6.10 -
    6.11 -image: $(TOPDIR)/vmlinux
    6.12 -	# Guest OS header -- first 8 bytes are identifier 'XenoGues'.
    6.13 -	echo -e -n 'XenoGues' >$@ 
    6.14 -	# Guest OS header -- next 4 bytes are load address (0xC0000000).
    6.15 -	echo -e -n '\000\000\000\300' >>$@
    6.16 -	$(OBJCOPY) $< image.body
    6.17 -	# Guest OS header is immediately followed by raw OS image.
    6.18 -	# Start address must be at byte 0.
    6.19 -	cat image.body >>$@
    6.20 -	rm -f image.body
    6.21 -
    6.22 -dep:
    6.23 -
    6.24 -clean:
    6.25 -	rm -f image image.gz
     7.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/config.in	Tue Mar 25 11:15:01 2003 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,135 +0,0 @@
     7.4 -#
     7.5 -# For a description of the syntax of this configuration file,
     7.6 -# see Documentation/kbuild/config-language.txt.
     7.7 -#
     7.8 -mainmenu_name "Linux Kernel Configuration"
     7.9 -
    7.10 -define_bool CONFIG_XENO y
    7.11 -
    7.12 -define_bool CONFIG_X86 y
    7.13 -define_bool CONFIG_ISA y
    7.14 -define_bool CONFIG_SBUS n
    7.15 -
    7.16 -define_bool CONFIG_UID16 y
    7.17 -
    7.18 -mainmenu_option next_comment
    7.19 -comment 'Code maturity level options'
    7.20 -bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
    7.21 -endmenu
    7.22 -
    7.23 -mainmenu_option next_comment
    7.24 -comment 'Loadable module support'
    7.25 -bool 'Enable loadable module support' CONFIG_MODULES
    7.26 -if [ "$CONFIG_MODULES" = "y" ]; then
    7.27 -   bool '  Set version information on all module symbols' CONFIG_MODVERSIONS
    7.28 -   bool '  Kernel module loader' CONFIG_KMOD
    7.29 -fi
    7.30 -endmenu
    7.31 -
    7.32 -mainmenu_option next_comment
    7.33 -comment 'Processor type and features'
    7.34 -choice 'Processor family' \
    7.35 -	"Pentium-Pro/Celeron/Pentium-II		CONFIG_M686 \
    7.36 -	 Pentium-III/Celeron(Coppermine)	CONFIG_MPENTIUMIII \
    7.37 -	 Pentium-4				CONFIG_MPENTIUM4 \
    7.38 -	 Athlon/Duron/K7			CONFIG_MK7" Pentium-Pro
    7.39 -
    7.40 -   define_bool CONFIG_X86_WP_WORKS_OK y
    7.41 -   define_bool CONFIG_X86_INVLPG y
    7.42 -   define_bool CONFIG_X86_CMPXCHG y
    7.43 -   define_bool CONFIG_X86_XADD y
    7.44 -   define_bool CONFIG_X86_BSWAP y
    7.45 -   define_bool CONFIG_X86_POPAD_OK y
    7.46 -   define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
    7.47 -   define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
    7.48 -
    7.49 -   define_bool CONFIG_X86_GOOD_APIC y
    7.50 -   define_bool CONFIG_X86_PGE y
    7.51 -   define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
    7.52 -   define_bool CONFIG_X86_TSC y
    7.53 -
    7.54 -if [ "$CONFIG_M686" = "y" ]; then
    7.55 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    7.56 -fi
    7.57 -if [ "$CONFIG_MPENTIUMIII" = "y" ]; then
    7.58 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    7.59 -fi
    7.60 -if [ "$CONFIG_MPENTIUM4" = "y" ]; then
    7.61 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 7
    7.62 -fi
    7.63 -if [ "$CONFIG_MK7" = "y" ]; then
    7.64 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 6
    7.65 -   define_bool CONFIG_X86_USE_3DNOW y
    7.66 -fi
    7.67 -
    7.68 -choice 'High Memory Support' \
    7.69 -	"off    CONFIG_NOHIGHMEM \
    7.70 -	 4GB    CONFIG_HIGHMEM4G \
    7.71 -	 64GB   CONFIG_HIGHMEM64G" off
    7.72 -if [ "$CONFIG_HIGHMEM4G" = "y" ]; then
    7.73 -   define_bool CONFIG_HIGHMEM y
    7.74 -fi
    7.75 -if [ "$CONFIG_HIGHMEM64G" = "y" ]; then
    7.76 -   define_bool CONFIG_HIGHMEM y
    7.77 -   define_bool CONFIG_X86_PAE y
    7.78 -fi
    7.79 -
    7.80 -#bool 'Symmetric multi-processing support' CONFIG_SMP
    7.81 -#if [ "$CONFIG_SMP" = "y" -a "$CONFIG_X86_CMPXCHG" = "y" ]; then
    7.82 -#   define_bool CONFIG_HAVE_DEC_LOCK y
    7.83 -#fi
    7.84 -endmenu
    7.85 -
    7.86 -mainmenu_option next_comment
    7.87 -comment 'General setup'
    7.88 -
    7.89 -bool 'Networking support' CONFIG_NET
    7.90 -
    7.91 -bool 'System V IPC' CONFIG_SYSVIPC
    7.92 -bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
    7.93 -bool 'Sysctl support' CONFIG_SYSCTL
    7.94 -if [ "$CONFIG_PROC_FS" = "y" ]; then
    7.95 -   choice 'Kernel core (/proc/kcore) format' \
    7.96 -	"ELF		CONFIG_KCORE_ELF	\
    7.97 -	 A.OUT		CONFIG_KCORE_AOUT" ELF
    7.98 -fi
    7.99 -tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
   7.100 -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
   7.101 -tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
   7.102 -
   7.103 -endmenu
   7.104 -
   7.105 -if [ "$CONFIG_NET" = "y" ]; then
   7.106 -   source net/Config.in
   7.107 -fi
   7.108 -
   7.109 -source drivers/block/Config.in
   7.110 -define_bool CONFIG_BLK_DEV_IDE_MODES n
   7.111 -define_bool CONFIG_BLK_DEV_HD n
   7.112 -
   7.113 -source fs/Config.in
   7.114 -
   7.115 -mainmenu_option next_comment
   7.116 -comment 'Kernel hacking'
   7.117 -
   7.118 -bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
   7.119 -if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then
   7.120 -   bool '  Debug high memory support' CONFIG_DEBUG_HIGHMEM
   7.121 -   bool '  Debug memory allocations' CONFIG_DEBUG_SLAB
   7.122 -   bool '  Memory mapped I/O debugging' CONFIG_DEBUG_IOVIRT
   7.123 -   bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ
   7.124 -   bool '  Spinlock debugging' CONFIG_DEBUG_SPINLOCK
   7.125 -   bool '  Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE
   7.126 -   bool '  Built-in Kernel Debugger support' CONFIG_KDB
   7.127 -   dep_tristate '    KDB modules' CONFIG_KDB_MODULES $CONFIG_KDB
   7.128 -   if [ "$CONFIG_KDB" = "y" ]; then
   7.129 -      bool '    KDB off by default' CONFIG_KDB_OFF
   7.130 -      comment '  Load all symbols for debugging is required for KDB'
   7.131 -      define_bool CONFIG_KALLSYMS y
   7.132 -   else
   7.133 -      bool '  Load all symbols for debugging' CONFIG_KALLSYMS
   7.134 -   fi
   7.135 -   bool '  Compile the kernel with frame pointers' CONFIG_FRAME_POINTER
   7.136 -fi
   7.137 -
   7.138 -endmenu
     8.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/defconfig	Tue Mar 25 11:15:01 2003 +0000
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,392 +0,0 @@
     8.4 -#
     8.5 -# Automatically generated make config: don't edit
     8.6 -#
     8.7 -CONFIG_X86=y
     8.8 -CONFIG_ISA=y
     8.9 -# CONFIG_SBUS is not set
    8.10 -CONFIG_UID16=y
    8.11 -
    8.12 -#
    8.13 -# Code maturity level options
    8.14 -#
    8.15 -# CONFIG_EXPERIMENTAL is not set
    8.16 -
    8.17 -#
    8.18 -# Loadable module support
    8.19 -#
    8.20 -CONFIG_MODULES=y
    8.21 -CONFIG_MODVERSIONS=y
    8.22 -CONFIG_KMOD=y
    8.23 -
    8.24 -#
    8.25 -# Processor type and features
    8.26 -#
    8.27 -# CONFIG_M386 is not set
    8.28 -# CONFIG_M486 is not set
    8.29 -# CONFIG_M586 is not set
    8.30 -# CONFIG_M586TSC is not set
    8.31 -# CONFIG_M586MMX is not set
    8.32 -CONFIG_M686=y
    8.33 -# CONFIG_MPENTIUMIII is not set
    8.34 -# CONFIG_MPENTIUM4 is not set
    8.35 -# CONFIG_MK6 is not set
    8.36 -# CONFIG_MK7 is not set
    8.37 -# CONFIG_MCRUSOE is not set
    8.38 -# CONFIG_MWINCHIPC6 is not set
    8.39 -# CONFIG_MWINCHIP2 is not set
    8.40 -# CONFIG_MWINCHIP3D is not set
    8.41 -# CONFIG_MCYRIXIII is not set
    8.42 -CONFIG_X86_WP_WORKS_OK=y
    8.43 -CONFIG_X86_INVLPG=y
    8.44 -CONFIG_X86_CMPXCHG=y
    8.45 -CONFIG_X86_XADD=y
    8.46 -CONFIG_X86_BSWAP=y
    8.47 -CONFIG_X86_POPAD_OK=y
    8.48 -# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
    8.49 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y
    8.50 -CONFIG_X86_L1_CACHE_SHIFT=5
    8.51 -CONFIG_X86_TSC=y
    8.52 -CONFIG_X86_GOOD_APIC=y
    8.53 -CONFIG_X86_PGE=y
    8.54 -CONFIG_X86_USE_PPRO_CHECKSUM=y
    8.55 -# CONFIG_TOSHIBA is not set
    8.56 -# CONFIG_I8K is not set
    8.57 -# CONFIG_MICROCODE is not set
    8.58 -# CONFIG_X86_MSR is not set
    8.59 -# CONFIG_X86_CPUID is not set
    8.60 -CONFIG_NOHIGHMEM=y
    8.61 -# CONFIG_HIGHMEM4G is not set
    8.62 -# CONFIG_HIGHMEM64G is not set
    8.63 -# CONFIG_MATH_EMULATION is not set
    8.64 -# CONFIG_MTRR is not set
    8.65 -# CONFIG_SMP is not set
    8.66 -# CONFIG_X86_UP_APIC is not set
    8.67 -
    8.68 -#
    8.69 -# General setup
    8.70 -#
    8.71 -CONFIG_NET=y
    8.72 -# CONFIG_PCI is not set
    8.73 -# CONFIG_EISA is not set
    8.74 -# CONFIG_MCA is not set
    8.75 -# CONFIG_HOTPLUG is not set
    8.76 -# CONFIG_PCMCIA is not set
    8.77 -# CONFIG_HOTPLUG_PCI is not set
    8.78 -CONFIG_SYSVIPC=y
    8.79 -# CONFIG_BSD_PROCESS_ACCT is not set
    8.80 -CONFIG_SYSCTL=y
    8.81 -CONFIG_KCORE_ELF=y
    8.82 -# CONFIG_KCORE_AOUT is not set
    8.83 -CONFIG_BINFMT_AOUT=y
    8.84 -CONFIG_BINFMT_ELF=y
    8.85 -# CONFIG_BINFMT_MISC is not set
    8.86 -# CONFIG_PM is not set
    8.87 -# CONFIG_APM_IGNORE_USER_SUSPEND is not set
    8.88 -# CONFIG_APM_DO_ENABLE is not set
    8.89 -# CONFIG_APM_CPU_IDLE is not set
    8.90 -# CONFIG_APM_DISPLAY_BLANK is not set
    8.91 -# CONFIG_APM_RTC_IS_GMT is not set
    8.92 -# CONFIG_APM_ALLOW_INTS is not set
    8.93 -# CONFIG_APM_REAL_MODE_POWER_OFF is not set
    8.94 -
    8.95 -#
    8.96 -# Memory Technology Devices (MTD)
    8.97 -#
    8.98 -# CONFIG_MTD is not set
    8.99 -
   8.100 -#
   8.101 -# Parallel port support
   8.102 -#
   8.103 -# CONFIG_PARPORT is not set
   8.104 -
   8.105 -#
   8.106 -# Plug and Play configuration
   8.107 -#
   8.108 -# CONFIG_PNP is not set
   8.109 -
   8.110 -#
   8.111 -# Block devices
   8.112 -#
   8.113 -# CONFIG_BLK_DEV_FD is not set
   8.114 -# CONFIG_BLK_DEV_XD is not set
   8.115 -CONFIG_BLK_DEV_LOOP=y
   8.116 -CONFIG_BLK_DEV_NBD=y
   8.117 -CONFIG_BLK_DEV_RAM=y
   8.118 -CONFIG_BLK_DEV_RAM_SIZE=4096
   8.119 -# CONFIG_BLK_DEV_INITRD is not set
   8.120 -CONFIG_XENOLINUX_BLOCK=y
   8.121 -
   8.122 -#
   8.123 -# Multi-device support (RAID and LVM)
   8.124 -#
   8.125 -# CONFIG_MD is not set
   8.126 -
   8.127 -#
   8.128 -# Networking options
   8.129 -#
   8.130 -CONFIG_PACKET=y
   8.131 -CONFIG_PACKET_MMAP=y
   8.132 -CONFIG_NETLINK=y
   8.133 -CONFIG_RTNETLINK=y
   8.134 -# CONFIG_NETLINK_DEV is not set
   8.135 -# CONFIG_NETFILTER is not set
   8.136 -CONFIG_FILTER=y
   8.137 -CONFIG_UNIX=y
   8.138 -CONFIG_INET=y
   8.139 -# CONFIG_IP_MULTICAST is not set
   8.140 -# CONFIG_IP_ADVANCED_ROUTER is not set
   8.141 -CONFIG_IP_PNP=y
   8.142 -# CONFIG_IP_PNP_DHCP is not set
   8.143 -# CONFIG_IP_PNP_BOOTP is not set
   8.144 -# CONFIG_IP_PNP_RARP is not set
   8.145 -# CONFIG_NET_IPIP is not set
   8.146 -# CONFIG_NET_IPGRE is not set
   8.147 -# CONFIG_INET_ECN is not set
   8.148 -# CONFIG_SYN_COOKIES is not set
   8.149 -
   8.150 -#
   8.151 -#  
   8.152 -#
   8.153 -# CONFIG_IPX is not set
   8.154 -# CONFIG_ATALK is not set
   8.155 -# CONFIG_DECNET is not set
   8.156 -# CONFIG_BRIDGE is not set
   8.157 -
   8.158 -#
   8.159 -# QoS and/or fair queueing
   8.160 -#
   8.161 -# CONFIG_NET_SCHED is not set
   8.162 -
   8.163 -#
   8.164 -# Telephony Support
   8.165 -#
   8.166 -# CONFIG_PHONE is not set
   8.167 -
   8.168 -#
   8.169 -# ATA/IDE/MFM/RLL support
   8.170 -#
   8.171 -# CONFIG_IDE is not set
   8.172 -# CONFIG_BLK_DEV_IDE_MODES is not set
   8.173 -# CONFIG_BLK_DEV_HD is not set
   8.174 -
   8.175 -#
   8.176 -# SCSI support
   8.177 -#
   8.178 -# CONFIG_SCSI is not set
   8.179 -
   8.180 -#
   8.181 -# Fusion MPT device support
   8.182 -#
   8.183 -# CONFIG_FUSION_BOOT is not set
   8.184 -# CONFIG_FUSION_ISENSE is not set
   8.185 -# CONFIG_FUSION_CTL is not set
   8.186 -# CONFIG_FUSION_LAN is not set
   8.187 -
   8.188 -#
   8.189 -# I2O device support
   8.190 -#
   8.191 -# CONFIG_I2O is not set
   8.192 -
   8.193 -#
   8.194 -# Network device support
   8.195 -#
   8.196 -# CONFIG_NETDEVICES is not set
   8.197 -
   8.198 -#
   8.199 -# Amateur Radio support
   8.200 -#
   8.201 -# CONFIG_HAMRADIO is not set
   8.202 -
   8.203 -#
   8.204 -# IrDA (infrared) support
   8.205 -#
   8.206 -# CONFIG_IRDA is not set
   8.207 -
   8.208 -#
   8.209 -# ISDN subsystem
   8.210 -#
   8.211 -# CONFIG_ISDN is not set
   8.212 -
   8.213 -#
   8.214 -# Old CD-ROM drivers (not SCSI, not IDE)
   8.215 -#
   8.216 -# CONFIG_CD_NO_IDESCSI is not set
   8.217 -
   8.218 -#
   8.219 -# Input core support
   8.220 -#
   8.221 -# CONFIG_INPUT is not set
   8.222 -CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
   8.223 -CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
   8.224 -
   8.225 -#
   8.226 -# Character devices
   8.227 -#
   8.228 -# CONFIG_VT is not set
   8.229 -# CONFIG_SERIAL is not set
   8.230 -# CONFIG_SERIAL_NONSTANDARD is not set
   8.231 -# CONFIG_UNIX98_PTYS is not set
   8.232 -
   8.233 -#
   8.234 -# I2C support
   8.235 -#
   8.236 -# CONFIG_I2C is not set
   8.237 -
   8.238 -#
   8.239 -# Mice
   8.240 -#
   8.241 -# CONFIG_BUSMOUSE is not set
   8.242 -# CONFIG_MOUSE is not set
   8.243 -
   8.244 -#
   8.245 -# Joysticks
   8.246 -#
   8.247 -# CONFIG_INPUT_GAMEPORT is not set
   8.248 -
   8.249 -#
   8.250 -# Input core support is needed for gameports
   8.251 -#
   8.252 -
   8.253 -#
   8.254 -# Input core support is needed for joysticks
   8.255 -#
   8.256 -# CONFIG_QIC02_TAPE is not set
   8.257 -
   8.258 -#
   8.259 -# Watchdog Cards
   8.260 -#
   8.261 -# CONFIG_WATCHDOG is not set
   8.262 -# CONFIG_NVRAM is not set
   8.263 -# CONFIG_RTC is not set
   8.264 -# CONFIG_DTLK is not set
   8.265 -# CONFIG_R3964 is not set
   8.266 -# CONFIG_APPLICOM is not set
   8.267 -
   8.268 -#
   8.269 -# Ftape, the floppy tape device driver
   8.270 -#
   8.271 -# CONFIG_FTAPE is not set
   8.272 -# CONFIG_AGP is not set
   8.273 -# CONFIG_DRM is not set
   8.274 -# CONFIG_MWAVE is not set
   8.275 -
   8.276 -#
   8.277 -# Multimedia devices
   8.278 -#
   8.279 -# CONFIG_VIDEO_DEV is not set
   8.280 -
   8.281 -#
   8.282 -# File systems
   8.283 -#
   8.284 -# CONFIG_QUOTA is not set
   8.285 -CONFIG_AUTOFS_FS=y
   8.286 -CONFIG_AUTOFS4_FS=y
   8.287 -CONFIG_EXT3_FS=y
   8.288 -CONFIG_JBD=y
   8.289 -# CONFIG_FAT_FS is not set
   8.290 -# CONFIG_CRAMFS is not set
   8.291 -# CONFIG_TMPFS is not set
   8.292 -# CONFIG_RAMFS is not set
   8.293 -# CONFIG_ISO9660_FS is not set
   8.294 -# CONFIG_MINIX_FS is not set
   8.295 -# CONFIG_VXFS_FS is not set
   8.296 -# CONFIG_NTFS_FS is not set
   8.297 -# CONFIG_HPFS_FS is not set
   8.298 -CONFIG_PROC_FS=y
   8.299 -# CONFIG_ROMFS_FS is not set
   8.300 -CONFIG_EXT2_FS=y
   8.301 -# CONFIG_SYSV_FS is not set
   8.302 -# CONFIG_UDF_FS is not set
   8.303 -# CONFIG_UFS_FS is not set
   8.304 -
   8.305 -#
   8.306 -# Network File Systems
   8.307 -#
   8.308 -# CONFIG_CODA_FS is not set
   8.309 -CONFIG_NFS_FS=y
   8.310 -CONFIG_NFS_V3=y
   8.311 -CONFIG_ROOT_NFS=y
   8.312 -CONFIG_NFSD=y
   8.313 -CONFIG_NFSD_V3=y
   8.314 -CONFIG_SUNRPC=y
   8.315 -CONFIG_LOCKD=y
   8.316 -CONFIG_LOCKD_V4=y
   8.317 -# CONFIG_SMB_FS is not set
   8.318 -# CONFIG_NCP_FS is not set
   8.319 -# CONFIG_ZISOFS_FS is not set
   8.320 -# CONFIG_ZLIB_FS_INFLATE is not set
   8.321 -
   8.322 -#
   8.323 -# Partition Types
   8.324 -#
   8.325 -# CONFIG_PARTITION_ADVANCED is not set
   8.326 -CONFIG_MSDOS_PARTITION=y
   8.327 -# CONFIG_SMB_NLS is not set
   8.328 -# CONFIG_NLS is not set
   8.329 -
   8.330 -#
   8.331 -# Sound
   8.332 -#
   8.333 -# CONFIG_SOUND is not set
   8.334 -
   8.335 -#
   8.336 -# USB support
   8.337 -#
   8.338 -
   8.339 -#
   8.340 -# USB Controllers
   8.341 -#
   8.342 -
   8.343 -#
   8.344 -# USB Device Class drivers
   8.345 -#
   8.346 -
   8.347 -#
   8.348 -# USB Human Interface Devices (HID)
   8.349 -#
   8.350 -
   8.351 -#
   8.352 -#   Input core support is needed for USB HID
   8.353 -#
   8.354 -
   8.355 -#
   8.356 -# USB Imaging devices
   8.357 -#
   8.358 -
   8.359 -#
   8.360 -# USB Multimedia devices
   8.361 -#
   8.362 -
   8.363 -#
   8.364 -#   Video4Linux support is needed for USB Multimedia device support
   8.365 -#
   8.366 -
   8.367 -#
   8.368 -# USB Network adaptors
   8.369 -#
   8.370 -
   8.371 -#
   8.372 -# USB port drivers
   8.373 -#
   8.374 -
   8.375 -#
   8.376 -# USB Serial Converter support
   8.377 -#
   8.378 -
   8.379 -#
   8.380 -# USB Miscellaneous drivers
   8.381 -#
   8.382 -
   8.383 -#
   8.384 -# Kernel hacking
   8.385 -#
   8.386 -CONFIG_DEBUG_KERNEL=y
   8.387 -# CONFIG_DEBUG_HIGHMEM is not set
   8.388 -# CONFIG_DEBUG_SLAB is not set
   8.389 -# CONFIG_DEBUG_IOVIRT is not set
   8.390 -# CONFIG_MAGIC_SYSRQ is not set
   8.391 -# CONFIG_DEBUG_SPINLOCK is not set
   8.392 -# CONFIG_DEBUG_BUGVERBOSE is not set
   8.393 -# CONFIG_KDB is not set
   8.394 -CONFIG_KALLSYMS=y
   8.395 -# CONFIG_FRAME_POINTER is not set
     9.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/drivers/block/Makefile	Tue Mar 25 11:15:01 2003 +0000
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,3 +0,0 @@
     9.4 -O_TARGET := blk.o
     9.5 -obj-y := xl_block.o xl_block_test.o
     9.6 -include $(TOPDIR)/Rules.make
    10.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/drivers/block/xl_block.c	Tue Mar 25 11:15:01 2003 +0000
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,490 +0,0 @@
    10.4 -/******************************************************************************
    10.5 - * xl_block.c
    10.6 - * 
    10.7 - * Xenolinux virtual block-device driver.
    10.8 - * 
    10.9 - */
   10.10 -
   10.11 -#include <linux/config.h>
   10.12 -#include <linux/module.h>
   10.13 -
   10.14 -#include <linux/kernel.h>
   10.15 -#include <linux/sched.h>
   10.16 -#include <linux/slab.h>
   10.17 -#include <linux/string.h>
   10.18 -#include <linux/errno.h>
   10.19 -
   10.20 -#include <linux/fs.h>
   10.21 -#include <linux/hdreg.h>
   10.22 -#include <linux/blkdev.h>
   10.23 -#include <linux/major.h>
   10.24 -
   10.25 -#include <asm/hypervisor-ifs/block.h>
   10.26 -#include <asm/hypervisor-ifs/hypervisor-if.h>
   10.27 -#include <asm/io.h>
   10.28 -#include <asm/uaccess.h>
   10.29 -
   10.30 -#define MAJOR_NR XLBLK_MAJOR   /* force defns in blk.h, must precede include */
   10.31 -static int xlblk_major = XLBLK_MAJOR;
   10.32 -#include <linux/blk.h>
   10.33 -
   10.34 -/* Copied from linux/ide.h */
   10.35 -typedef unsigned char	byte; 
   10.36 -
   10.37 -void xlblk_ide_register_disk(int, unsigned long);
   10.38 -
   10.39 -#define XLBLK_MAX 32 /* Maximum minor devices we support */
   10.40 -#define XLBLK_MAJOR_NAME "xhd"
   10.41 -#define IDE_PARTN_BITS 6                           /* from ide.h::PARTN_BITS */
   10.42 -#define IDE_PARTN_MASK ((1<<IDE_PARTN_BITS)-1)     /* from ide.h::PARTN_MASK */
   10.43 -static int xlblk_blk_size[XLBLK_MAX];
   10.44 -static int xlblk_blksize_size[XLBLK_MAX];
   10.45 -static int xlblk_read_ahead; 
   10.46 -static int xlblk_hardsect_size[XLBLK_MAX];
   10.47 -static int xlblk_max_sectors[XLBLK_MAX];
   10.48 -
   10.49 -#define XLBLK_RESPONSE_IRQ _EVENT_BLK_RESP
   10.50 -
   10.51 -#define DEBUG_IRQ    _EVENT_DEBUG 
   10.52 -
   10.53 -#if 0
   10.54 -#define DPRINTK(_f, _a...) printk ( KERN_ALERT _f , ## _a )
   10.55 -#define DPRINTK_IOCTL(_f, _a...) printk ( KERN_ALERT _f , ## _a )
   10.56 -#else
   10.57 -#define DPRINTK(_f, _a...) ((void)0)
   10.58 -#define DPRINTK_IOCTL(_f, _a...) ((void)0)
   10.59 -#endif
   10.60 -
   10.61 -static blk_ring_t *blk_ring;
   10.62 -static unsigned int resp_cons; /* Response consumer for comms ring. */
   10.63 -static xen_disk_info_t xen_disk_info;
   10.64 -
   10.65 -int hypervisor_request(void *         id,
   10.66 -                       int            operation,
   10.67 -                       char *         buffer,
   10.68 -                       unsigned long  block_number,
   10.69 -                       unsigned short block_size,
   10.70 -                       kdev_t         device);
   10.71 -
   10.72 -
   10.73 -/* ------------------------------------------------------------------------
   10.74 - */
   10.75 -
   10.76 -static int xenolinux_block_open(struct inode *inode, struct file *filep)
   10.77 -{
   10.78 -    DPRINTK("xenolinux_block_open\n"); 
   10.79 -    return 0;
   10.80 -}
   10.81 -
   10.82 -static int xenolinux_block_release(struct inode *inode, struct file *filep)
   10.83 -{
   10.84 -    DPRINTK("xenolinux_block_release\n");
   10.85 -    return 0;
   10.86 -}
   10.87 -
   10.88 -static int xenolinux_block_ioctl(struct inode *inode, struct file *filep,
   10.89 -			  unsigned command, unsigned long argument)
   10.90 -{
   10.91 -    int minor_dev;
   10.92 -    struct hd_geometry *geo = (struct hd_geometry *)argument;
   10.93 -
   10.94 -    DPRINTK("xenolinux_block_ioctl\n"); 
   10.95 -
   10.96 -    /* check permissions */
   10.97 -    if (!capable(CAP_SYS_ADMIN)) return -EPERM;
   10.98 -    if (!inode)                  return -EINVAL;
   10.99 -    minor_dev = MINOR(inode->i_rdev);
  10.100 -    if (minor_dev >= XLBLK_MAX)  return -ENODEV;
  10.101 -    
  10.102 -    DPRINTK_IOCTL("command: 0x%x, argument: 0x%lx, minor: 0x%x\n",
  10.103 -                  command, (long) argument, minor_dev); 
  10.104 -  
  10.105 -    switch (command)
  10.106 -    {
  10.107 -    case BLKGETSIZE:
  10.108 -        DPRINTK_IOCTL("   BLKGETSIZE: %x %lx\n", BLKGETSIZE, 
  10.109 -                      (long) xen_disk_info.disks[0].capacity); 
  10.110 -	return put_user(xen_disk_info.disks[0].capacity, 
  10.111 -			(unsigned long *) argument);
  10.112 -
  10.113 -    case BLKRRPART:
  10.114 -        DPRINTK_IOCTL("   BLKRRPART: %x\n", BLKRRPART); 
  10.115 -	break;
  10.116 -
  10.117 -    case BLKSSZGET:
  10.118 -        DPRINTK_IOCTL("   BLKSSZGET: %x 0x%x\n", BLKSSZGET,
  10.119 -                      xlblk_hardsect_size[minor_dev]);
  10.120 -	return xlblk_hardsect_size[minor_dev]; 
  10.121 -
  10.122 -    case HDIO_GETGEO:
  10.123 -        DPRINTK_IOCTL("   HDIO_GETGEO: %x\n", HDIO_GETGEO);
  10.124 -	if (!argument) return -EINVAL;
  10.125 -	if (put_user(0x00,  (unsigned long *) &geo->start)) return -EFAULT;
  10.126 -	if (put_user(0xff,  (byte *)&geo->heads)) return -EFAULT;
  10.127 -	if (put_user(0x3f,  (byte *)&geo->sectors)) return -EFAULT;
  10.128 -	if (put_user(0x106, (unsigned short *)&geo->cylinders)) return -EFAULT;
  10.129 -	return 0;
  10.130 -
  10.131 -    case HDIO_GETGEO_BIG: 
  10.132 -        DPRINTK_IOCTL("   HDIO_GETGEO_BIG: %x\n", HDIO_GETGEO_BIG);
  10.133 -	if (!argument) return -EINVAL;
  10.134 -	if (put_user(0x00,  (unsigned long *) &geo->start))  return -EFAULT;
  10.135 -	if (put_user(0xff,  (byte *)&geo->heads))   return -EFAULT;
  10.136 -	if (put_user(0x3f,  (byte *)&geo->sectors)) return -EFAULT;
  10.137 -	if (put_user(0x106, (unsigned int *) &geo->cylinders)) return -EFAULT;
  10.138 -
  10.139 -	return 0;
  10.140 -
  10.141 -    default:
  10.142 -        DPRINTK_IOCTL("   eh? unknown ioctl\n");
  10.143 -	break;
  10.144 -    }
  10.145 -    
  10.146 -    return 0;
  10.147 -}
  10.148 -
  10.149 -static int xenolinux_block_check(kdev_t dev)
  10.150 -{
  10.151 -    DPRINTK("xenolinux_block_check\n");
  10.152 -    return 0;
  10.153 -}
  10.154 -
  10.155 -static int xenolinux_block_revalidate(kdev_t dev)
  10.156 -{
  10.157 -    DPRINTK("xenolinux_block_revalidate\n"); 
  10.158 -    return 0;
  10.159 -}
  10.160 -
  10.161 -/*
  10.162 - * hypervisor_request
  10.163 - *
  10.164 - * request block io 
  10.165 - * 
  10.166 - * id: for guest use only.
  10.167 - * operation: XEN_BLOCK_READ, XEN_BLOCK_WRITE or XEN_BLOCK_PROBE
  10.168 - * buffer: buffer to read/write into. this should be a
  10.169 - *   virtual address in the guest os.
  10.170 - * block_number:  block to read
  10.171 - * block_size:  size of each block
  10.172 - * device:  ide/hda is 768 or 0x300
  10.173 - */
  10.174 -int hypervisor_request(void *         id,
  10.175 -                       int            operation,
  10.176 -                       char *         buffer,
  10.177 -                       unsigned long  block_number,
  10.178 -                       unsigned short block_size,
  10.179 -                       kdev_t         device)
  10.180 -{
  10.181 -    int position;
  10.182 -    void *buffer_ma; 
  10.183 -    kdev_t phys_device = (kdev_t) 0;
  10.184 -    unsigned long sector_number = 0;
  10.185 -    struct gendisk *gd;     
  10.186 -
  10.187 -    /*
  10.188 -     * Bail if there's no room in the request communication ring. This may be 
  10.189 -     * because we have a whole bunch of outstanding responses to process. No 
  10.190 -     * matter, as the response handler will kick the request queue.
  10.191 -     */
  10.192 -    if ( BLK_RING_INC(blk_ring->req_prod) == resp_cons )
  10.193 -        return 1;
  10.194 -
  10.195 -    buffer_ma = (void *)phys_to_machine(virt_to_phys(buffer)); 
  10.196 -
  10.197 -    switch ( operation )
  10.198 -    {
  10.199 -    case XEN_BLOCK_PROBE:
  10.200 -	phys_device = (kdev_t) 0;
  10.201 -	sector_number = 0;
  10.202 -        break;
  10.203 -
  10.204 -    case XEN_BLOCK_READ:
  10.205 -    case XEN_BLOCK_WRITE:
  10.206 -	if ( MAJOR(device) != XLBLK_MAJOR ) 
  10.207 -	    panic("error: xl_block::hypervisor_request: "
  10.208 -                  "unknown device [0x%x]\n", device);
  10.209 -        phys_device = MKDEV(IDE0_MAJOR, 0);
  10.210 -	/* Compute real buffer location on disk */
  10.211 -	sector_number = block_number;
  10.212 -	if ( (gd = (struct gendisk *)xen_disk_info.disks[0].gendisk) != NULL )
  10.213 -	    sector_number += gd->part[MINOR(device)&IDE_PARTN_MASK].start_sect;
  10.214 -        break;
  10.215 -
  10.216 -    default:
  10.217 -        panic("unknown op %d\n", operation);
  10.218 -    }
  10.219 -
  10.220 -    /* Fill out a communications ring structure & trap to the hypervisor */
  10.221 -    position = blk_ring->req_prod;
  10.222 -    blk_ring->ring[position].req.id            = id;
  10.223 -    blk_ring->ring[position].req.operation     = operation;
  10.224 -    blk_ring->ring[position].req.buffer        = buffer_ma;
  10.225 -    blk_ring->ring[position].req.block_number  = block_number;
  10.226 -    blk_ring->ring[position].req.block_size    = block_size;
  10.227 -    blk_ring->ring[position].req.device        = phys_device;
  10.228 -    blk_ring->ring[position].req.sector_number = sector_number;
  10.229 -
  10.230 -    blk_ring->req_prod = BLK_RING_INC(position);
  10.231 -
  10.232 -    return 0;
  10.233 -}
  10.234 -
  10.235 -
  10.236 -/*
  10.237 - * do_xlblk_request
  10.238 - *  read a block; request is in a request queue
  10.239 - */
  10.240 -static void do_xlblk_request (request_queue_t *rq)
  10.241 -{
  10.242 -    struct request *req;
  10.243 -    struct buffer_head *bh;
  10.244 -    int rw, nsect, full, queued = 0;
  10.245 -    
  10.246 -    DPRINTK("xlblk.c::do_xlblk_request for '%s'\n", DEVICE_NAME); 
  10.247 -
  10.248 -    while ( !rq->plugged && !QUEUE_EMPTY )
  10.249 -    {
  10.250 -	if ( (req = CURRENT) == NULL ) goto out;
  10.251 -		
  10.252 -        DPRINTK("do_xlblk_request %p: cmd %i, sec %lx, (%li/%li) bh:%p\n",
  10.253 -                req, req->cmd, req->sector,
  10.254 -                req->current_nr_sectors, req->nr_sectors, req->bh);
  10.255 -
  10.256 -        rw = req->cmd;
  10.257 -        if ( rw == READA ) rw = READ;
  10.258 -        if ((rw != READ) && (rw != WRITE))
  10.259 -            panic("XenoLinux Virtual Block Device: bad cmd: %d\n", rw);
  10.260 -
  10.261 -	req->errors = 0;
  10.262 -
  10.263 -        bh = req->bh;
  10.264 -        while ( bh != NULL )
  10.265 -	{
  10.266 -            full = hypervisor_request(
  10.267 -                bh, (rw == READ) ? XEN_BLOCK_READ : XEN_BLOCK_WRITE, 
  10.268 -                bh->b_data, bh->b_rsector, bh->b_size, bh->b_dev);
  10.269 -            
  10.270 -            if ( full ) goto out;
  10.271 -
  10.272 -            queued++;
  10.273 -
  10.274 -            /* Dequeue the buffer head from the request. */
  10.275 -            nsect = bh->b_size >> 9;
  10.276 -            req->bh = bh->b_reqnext;
  10.277 -            bh->b_reqnext = NULL;
  10.278 -            bh = req->bh;
  10.279 -            
  10.280 -            if ( bh != NULL )
  10.281 -            {
  10.282 -                /* There's another buffer head to do. Update the request. */
  10.283 -                req->hard_sector += nsect;
  10.284 -                req->hard_nr_sectors -= nsect;
  10.285 -                req->sector = req->hard_sector;
  10.286 -                req->nr_sectors = req->hard_nr_sectors;
  10.287 -                req->current_nr_sectors = bh->b_size >> 9;
  10.288 -                req->buffer = bh->b_data;
  10.289 -            }
  10.290 -            else
  10.291 -            {
  10.292 -                /* That was the last buffer head. Finalise the request. */
  10.293 -                if ( end_that_request_first(req, 1, "XenBlk") ) BUG();
  10.294 -                blkdev_dequeue_request(req);
  10.295 -                end_that_request_last(req);
  10.296 -            }
  10.297 -        }
  10.298 -    }
  10.299 -
  10.300 - out:
  10.301 -    if ( queued != 0 ) HYPERVISOR_block_io_op();
  10.302 -}
  10.303 -
  10.304 -
  10.305 -static struct block_device_operations xenolinux_block_fops = 
  10.306 -{
  10.307 -    open:               xenolinux_block_open,
  10.308 -    release:            xenolinux_block_release,
  10.309 -    ioctl:              xenolinux_block_ioctl,
  10.310 -    check_media_change: xenolinux_block_check,
  10.311 -    revalidate:         xenolinux_block_revalidate,
  10.312 -};
  10.313 -
  10.314 -static void xlblk_response_int(int irq, void *dev_id, struct pt_regs *ptregs)
  10.315 -{
  10.316 -    int i;
  10.317 -    unsigned long flags; 
  10.318 -    struct buffer_head *bh;
  10.319 -    
  10.320 -    spin_lock_irqsave(&io_request_lock, flags);	    
  10.321 -
  10.322 -    for ( i  = resp_cons;
  10.323 -	  i != blk_ring->resp_prod;
  10.324 -	  i  = BLK_RING_INC(i) )
  10.325 -    {
  10.326 -	blk_ring_resp_entry_t *bret = &blk_ring->ring[i].resp;
  10.327 -        if ( (bh = bret->id) != NULL ) bh->b_end_io(bh, 1);
  10.328 -    }
  10.329 -    
  10.330 -    resp_cons = i;
  10.331 -
  10.332 -    /* KAF: We can push work down at this point. We have the lock. */
  10.333 -    do_xlblk_request(BLK_DEFAULT_QUEUE(MAJOR_NR));
  10.334 -    
  10.335 -    spin_unlock_irqrestore(&io_request_lock, flags);
  10.336 -}
  10.337 -
  10.338 -
  10.339 -int __init xlblk_init(void)
  10.340 -{
  10.341 -    int i, error, result;
  10.342 -
  10.343 -    /* This mapping was created early at boot time. */
  10.344 -    blk_ring = (blk_ring_t *)fix_to_virt(FIX_BLKRING_BASE);
  10.345 -    blk_ring->req_prod = blk_ring->resp_prod = resp_cons = 0;
  10.346 -    
  10.347 -    error = request_irq(XLBLK_RESPONSE_IRQ, xlblk_response_int, 0, 
  10.348 -			"xlblk-response", NULL);
  10.349 -    if (error) {
  10.350 -	printk(KERN_ALERT "Could not allocate receive interrupt\n");
  10.351 -	goto fail;
  10.352 -    }
  10.353 -
  10.354 -    memset (&xen_disk_info, 0, sizeof(xen_disk_info));
  10.355 -    xen_disk_info.count = 0;
  10.356 -
  10.357 -    if ( hypervisor_request(NULL, XEN_BLOCK_PROBE, (char *) &xen_disk_info,
  10.358 -                            0, 0, (kdev_t) 0) )
  10.359 -        BUG();
  10.360 -    HYPERVISOR_block_io_op();
  10.361 -    while ( blk_ring->resp_prod != 1 ) barrier();
  10.362 -    for ( i = 0; i < xen_disk_info.count; i++ )
  10.363 -    { 
  10.364 -	printk (KERN_ALERT "  %2d: type: %d, capacity: %ld\n",
  10.365 -		i, xen_disk_info.disks[i].type, 
  10.366 -		xen_disk_info.disks[i].capacity);
  10.367 -    }
  10.368 -    
  10.369 -    SET_MODULE_OWNER(&xenolinux_block_fops);
  10.370 -    result = register_blkdev(xlblk_major, "block", &xenolinux_block_fops);
  10.371 -    if (result < 0) {
  10.372 -	printk (KERN_ALERT "xenolinux block: can't get major %d\n",
  10.373 -		xlblk_major);
  10.374 -	return result;
  10.375 -    }
  10.376 -
  10.377 -    /* initialize global arrays in drivers/block/ll_rw_block.c */
  10.378 -    for (i = 0; i < XLBLK_MAX; i++) {
  10.379 -	xlblk_blk_size[i]      = xen_disk_info.disks[0].capacity;
  10.380 -	xlblk_blksize_size[i]  = 512;
  10.381 -	xlblk_hardsect_size[i] = 512;
  10.382 -	xlblk_max_sectors[i]   = 128;
  10.383 -    }
  10.384 -    xlblk_read_ahead  = 8; 
  10.385 -
  10.386 -    blk_size[xlblk_major]      = xlblk_blk_size;
  10.387 -    blksize_size[xlblk_major]  = xlblk_blksize_size;
  10.388 -    hardsect_size[xlblk_major] = xlblk_hardsect_size;
  10.389 -    read_ahead[xlblk_major]    = xlblk_read_ahead; 
  10.390 -    max_sectors[xlblk_major]   = xlblk_max_sectors;
  10.391 -
  10.392 -    blk_init_queue(BLK_DEFAULT_QUEUE(xlblk_major), do_xlblk_request);
  10.393 -
  10.394 -    /*
  10.395 -     * Turn off barking 'headactive' mode. We dequeue buffer heads as
  10.396 -     * soon as we pass them down to Xen.
  10.397 -     */
  10.398 -    blk_queue_headactive(BLK_DEFAULT_QUEUE(xlblk_major), 0);
  10.399 -
  10.400 -    xlblk_ide_register_disk(0, xen_disk_info.disks[0].capacity);
  10.401 -
  10.402 -    printk(KERN_ALERT 
  10.403 -	   "XenoLinux Virtual Block Device Driver installed [device: %d]\n",
  10.404 -	   xlblk_major);
  10.405 -    return 0;
  10.406 -
  10.407 - fail:
  10.408 -    return error;
  10.409 -}
  10.410 -
  10.411 -void xlblk_ide_register_disk(int idx, unsigned long capacity)
  10.412 -{
  10.413 -    int units;
  10.414 -    int minors;
  10.415 -    struct gendisk *gd;
  10.416 -
  10.417 -    /* plagarized from ide-probe.c::init_gendisk */
  10.418 -    
  10.419 -    units = 2; /* from ide.h::MAX_DRIVES */
  10.420 -
  10.421 -    minors    = units * (1<<IDE_PARTN_BITS);
  10.422 -    gd        = kmalloc (sizeof(struct gendisk), GFP_KERNEL);
  10.423 -    gd->sizes = kmalloc (minors * sizeof(int), GFP_KERNEL);
  10.424 -    gd->part  = kmalloc (minors * sizeof(struct hd_struct), GFP_KERNEL);
  10.425 -    memset(gd->part, 0, minors * sizeof(struct hd_struct));
  10.426 -    
  10.427 -    gd->major        = xlblk_major;  
  10.428 -    gd->major_name   = XLBLK_MAJOR_NAME;
  10.429 -    gd->minor_shift  = IDE_PARTN_BITS; 
  10.430 -    gd->max_p	     = 1<<IDE_PARTN_BITS;
  10.431 -    gd->nr_real	     = units;           
  10.432 -    gd->real_devices = NULL;          
  10.433 -    gd->next	     = NULL;            
  10.434 -    gd->fops         = &xenolinux_block_fops;
  10.435 -    gd->de_arr       = kmalloc (sizeof *gd->de_arr * units, GFP_KERNEL);
  10.436 -    gd->flags	     = kmalloc (sizeof *gd->flags * units, GFP_KERNEL);
  10.437 -
  10.438 -    if (gd->de_arr)  
  10.439 -	memset (gd->de_arr, 0, sizeof *gd->de_arr * units);
  10.440 -
  10.441 -    if (gd->flags) 
  10.442 -	memset (gd->flags, 0, sizeof *gd->flags * units);
  10.443 -
  10.444 -    add_gendisk(gd);
  10.445 -
  10.446 -    xen_disk_info.disks[idx].gendisk = gd;
  10.447 -
  10.448 -    /* default disk size is just a big number.  in the future, we
  10.449 -       need a message to probe the devices to determine the actual size */
  10.450 -    register_disk(gd, MKDEV(xlblk_major, 0), 1<<IDE_PARTN_BITS,
  10.451 -		  &xenolinux_block_fops, capacity);
  10.452 -
  10.453 -    return;
  10.454 -}
  10.455 -
  10.456 -
  10.457 -
  10.458 -static void __exit xlblk_cleanup(void)
  10.459 -{
  10.460 -    /* CHANGE FOR MULTIQUEUE */
  10.461 -    blk_cleanup_queue(BLK_DEFAULT_QUEUE(xlblk_major));
  10.462 -
  10.463 -    /* clean up global arrays */
  10.464 -    read_ahead[xlblk_major] = 0;
  10.465 -
  10.466 -    if (blk_size[xlblk_major]) 
  10.467 -	kfree(blk_size[xlblk_major]);
  10.468 -    blk_size[xlblk_major] = NULL;
  10.469 -
  10.470 -    if (blksize_size[xlblk_major]) 
  10.471 -	kfree(blksize_size[xlblk_major]);
  10.472 -    blksize_size[xlblk_major] = NULL;
  10.473 -
  10.474 -    if (hardsect_size[xlblk_major]) 
  10.475 -	kfree(hardsect_size[xlblk_major]);
  10.476 -    hardsect_size[xlblk_major] = NULL;
  10.477 -    
  10.478 -    /* XXX: free each gendisk */
  10.479 -    if (unregister_blkdev(xlblk_major, "block"))
  10.480 -	printk(KERN_ALERT
  10.481 -	       "XenoLinux Virtual Block Device Driver uninstalled w/ errs\n");
  10.482 -    else
  10.483 -	printk(KERN_ALERT 
  10.484 -	       "XenoLinux Virtual Block Device Driver uninstalled\n");
  10.485 -
  10.486 -    return;
  10.487 -}
  10.488 -
  10.489 -
  10.490 -#ifdef MODULE
  10.491 -module_init(xlblk_init);
  10.492 -module_exit(xlblk_cleanup);
  10.493 -#endif
    11.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/drivers/block/xl_block_test.c	Tue Mar 25 11:15:01 2003 +0000
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,225 +0,0 @@
    11.4 -/******************************************************************************
    11.5 - * xenolinux_block_test.c
    11.6 - * 
    11.7 - */
    11.8 -#define EXPORT_SYMTAB
    11.9 -
   11.10 -#include <linux/config.h>
   11.11 -#include <linux/module.h>
   11.12 -
   11.13 -#include <linux/kernel.h>
   11.14 -#include <linux/init.h>
   11.15 -#include <linux/proc_fs.h>
   11.16 -#include <linux/sched.h>
   11.17 -#include <asm/uaccess.h>
   11.18 -#include <linux/slab.h>
   11.19 -#include <linux/string.h>
   11.20 -#include <linux/errno.h>
   11.21 -#include <linux/delay.h>
   11.22 -
   11.23 -#include <asm/hypervisor-ifs/block.h>
   11.24 -#include <asm/hypervisor-ifs/hypervisor-if.h>
   11.25 -
   11.26 -/******************************************************************/
   11.27 -
   11.28 -static struct proc_dir_entry *bdt;
   11.29 -static blk_ring_req_entry_t meta;
   11.30 -static char * data;
   11.31 -
   11.32 -static int proc_read_bdt(char *page, char **start, off_t off,
   11.33 -			 int count, int *eof, void *data)
   11.34 -{
   11.35 -  switch (meta.operation)
   11.36 -  {
   11.37 -    case XEN_BLOCK_READ :
   11.38 -    case XEN_BLOCK_WRITE :
   11.39 -    {
   11.40 -      return proc_dump_block(page, start, off, count, eof, data);
   11.41 -    }
   11.42 -    case XEN_BLOCK_DEBUG :
   11.43 -    {
   11.44 -      return proc_dump_debug(page, start, off, count, eof, data);
   11.45 -    }
   11.46 -    default :
   11.47 -    {
   11.48 -      printk(KERN_ALERT 
   11.49 -	     "block device test error: unknown operation [%c]\n",
   11.50 -	     meta.operation);
   11.51 -      return -EINVAL;
   11.52 -    }
   11.53 -  }
   11.54 -}
   11.55 -
   11.56 -int proc_dump_debug(char *page, char **start, off_t off,
   11.57 -		    int count, int *eof, void *data)
   11.58 -{
   11.59 -  char header[100];
   11.60 -  char dump[1024];
   11.61 -
   11.62 -  sprintf (header, "Block Device Test: Debug Dump\n\n");
   11.63 -  
   11.64 -  sprintf (dump, "%s\n", meta.buffer);
   11.65 -  
   11.66 -  if (data)
   11.67 -  {
   11.68 -    kfree(data);
   11.69 -  }
   11.70 -
   11.71 -  strncpy (page, dump, count);
   11.72 -  return strlen(page);
   11.73 -}
   11.74 -
   11.75 -int proc_dump_block(char *page, char **start, off_t off,
   11.76 -		    int count, int *eof, void *data)
   11.77 -{
   11.78 -  char header[100];
   11.79 -  char dump[1024];
   11.80 -  char temp[100];
   11.81 -  int loop;
   11.82 -
   11.83 -  sprintf (header, "Block Device Test\n\n%s  blk num: %ld 0x%lx;  size: %d 0x%x;  device: 0x%x\n",
   11.84 -	   meta.operation == XEN_BLOCK_WRITE ? "write" : "read",
   11.85 -	   meta.block_number, meta.block_number,
   11.86 -	   meta.block_size, meta.block_size,
   11.87 -	   meta.device);
   11.88 -  
   11.89 -  sprintf (dump, "%s", header);
   11.90 -
   11.91 -  if (meta.buffer)
   11.92 -  {
   11.93 -    for (loop = 0; loop < 100; loop++)
   11.94 -    {
   11.95 -      int i = meta.buffer[loop];
   11.96 -    
   11.97 -      if (loop % 8 == 0)
   11.98 -      {
   11.99 -	sprintf (temp, "[%2d] ", loop);
  11.100 -	strcat(dump, temp);
  11.101 -      }
  11.102 -      else if (loop % 2 == 0)
  11.103 -      {
  11.104 -	strcat(dump, " ");
  11.105 -      }
  11.106 -
  11.107 -      sprintf (temp, " 0x%02x", i & 255);
  11.108 -      strcat(dump, temp);
  11.109 -      if ((loop + 1) % 8 == 0)
  11.110 -      {
  11.111 -	strcat(dump, "\n");
  11.112 -      }
  11.113 -    }
  11.114 -    strcat(dump, "\n\n");
  11.115 -  }
  11.116 -  
  11.117 -  if (data)
  11.118 -  {
  11.119 -    kfree(data);
  11.120 -  }
  11.121 -
  11.122 -  strncpy (page, dump, count);
  11.123 -  return strlen(page);
  11.124 -}
  11.125 -
  11.126 -int proc_write_bdt(struct file *file, const char *buffer,
  11.127 -		   unsigned long count, void *data)
  11.128 -{
  11.129 -  char *local = kmalloc((count + 1) * sizeof(char), GFP_KERNEL);
  11.130 -  char  opcode;
  11.131 -  int  block_number = 0;
  11.132 -  int  block_size = 0;
  11.133 -  int  device = 0;
  11.134 -
  11.135 -  if (copy_from_user(local, buffer, count))
  11.136 -  {
  11.137 -    return -EFAULT;
  11.138 -  }
  11.139 -  local[count] = '\0';
  11.140 -
  11.141 -  sscanf(local, "%c %i %i %i", 
  11.142 -	 &opcode, &block_number, &block_size, &device);
  11.143 -
  11.144 -  if (opcode == 'r' || opcode == 'R')
  11.145 -  {
  11.146 -    meta.operation = XEN_BLOCK_READ;
  11.147 -  }
  11.148 -  else if (opcode == 'w' || opcode == 'W')
  11.149 -  {
  11.150 -    meta.operation = XEN_BLOCK_WRITE;
  11.151 -  }
  11.152 -  else if (opcode == 'd' || opcode == 'D')
  11.153 -  {
  11.154 -    meta.operation = XEN_BLOCK_DEBUG;
  11.155 -    block_size = 10000;
  11.156 -  }
  11.157 -  else
  11.158 -  {
  11.159 -    printk(KERN_ALERT 
  11.160 -	   "block device test error: unknown opcode [%c]\n", opcode);
  11.161 -    return -EINVAL;
  11.162 -  }
  11.163 -
  11.164 -  if (data)
  11.165 -  {
  11.166 -    kfree(data);
  11.167 -  }
  11.168 -  data = kmalloc(block_size * sizeof(char), GFP_KERNEL);
  11.169 -  if (data == NULL)
  11.170 -  {
  11.171 -    kfree(local);
  11.172 -    return -ENOMEM;
  11.173 -  }
  11.174 -
  11.175 -  meta.block_number = block_number;
  11.176 -  meta.block_size   = block_size;
  11.177 -  meta.device       = device;
  11.178 -  meta.buffer       = data;
  11.179 -
  11.180 -  /* submit request */
  11.181 -  hypervisor_request(0, meta.operation, meta.buffer, 
  11.182 -		     meta.block_number, meta.block_size,
  11.183 -		     meta.device);
  11.184 -  HYPERVISOR_block_io_op();
  11.185 -  mdelay(1000); /* should wait for a proper acknowledgement/response. */
  11.186 -
  11.187 -  kfree(local);
  11.188 -  return count;
  11.189 -}
  11.190 -			 
  11.191 -
  11.192 -static int __init init_module(void)
  11.193 -{
  11.194 -  int return_value = 0;
  11.195 -
  11.196 -  /* create proc entry */
  11.197 -  bdt = create_proc_entry("bdt", 0644, NULL);
  11.198 -  if (bdt == NULL)
  11.199 -  {
  11.200 -    return_value = -ENOMEM;
  11.201 -    goto error;
  11.202 -  }
  11.203 -  bdt->data       = NULL;
  11.204 -  bdt->read_proc  = proc_read_bdt;
  11.205 -  bdt->write_proc = proc_write_bdt;
  11.206 -  bdt->owner      = THIS_MODULE;
  11.207 -
  11.208 -  memset(&meta, 0, sizeof(meta));
  11.209 -  
  11.210 -  /* success */
  11.211 -  printk(KERN_ALERT "XenoLinux Block Device Test installed\n");
  11.212 -  return 0;
  11.213 -
  11.214 - error:
  11.215 -  return return_value;
  11.216 -}
  11.217 -
  11.218 -static void __exit cleanup_module(void)
  11.219 -{
  11.220 -  if (data)
  11.221 -  {
  11.222 -    kfree(data);
  11.223 -  }
  11.224 -  printk(KERN_ALERT "XenoLinux Block Device Test uninstalled\n");
  11.225 -}
  11.226 -
  11.227 -module_init(init_module);
  11.228 -module_exit(cleanup_module);
    12.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/drivers/console/Makefile	Tue Mar 25 11:15:01 2003 +0000
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,3 +0,0 @@
    12.4 -O_TARGET := con.o
    12.5 -obj-y := console.o
    12.6 -include $(TOPDIR)/Rules.make
    13.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/drivers/console/console.c	Tue Mar 25 11:15:01 2003 +0000
    13.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.3 @@ -1,204 +0,0 @@
    13.4 -/******************************************************************************
    13.5 - * console.c
    13.6 - */
    13.7 -
    13.8 -#include <linux/config.h>
    13.9 -#include <linux/module.h>
   13.10 -#include <linux/errno.h>
   13.11 -#include <linux/signal.h>
   13.12 -#include <linux/sched.h>
   13.13 -#include <linux/interrupt.h>
   13.14 -#include <linux/tty.h>
   13.15 -#include <linux/tty_flip.h>
   13.16 -#include <linux/serial.h>
   13.17 -#include <linux/major.h>
   13.18 -#include <linux/ptrace.h>
   13.19 -#include <linux/ioport.h>
   13.20 -#include <linux/mm.h>
   13.21 -#include <linux/slab.h>
   13.22 -#include <linux/init.h>
   13.23 -#include <linux/console.h>
   13.24 -
   13.25 -#include <asm/io.h>
   13.26 -#include <asm/irq.h>
   13.27 -#include <asm/uaccess.h>
   13.28 -#include <asm/hypervisor.h>
   13.29 -
   13.30 -/******************** Kernel console driver ********************************/
   13.31 -
   13.32 -static void kconsole_write(struct console *co, const char *s, unsigned count)
   13.33 -{
   13.34 -#define STRLEN 256
   13.35 -    static char str[STRLEN];
   13.36 -    static int pos = 0;
   13.37 -    int len;
   13.38 -    
   13.39 -    /* We buffer output until we see a newline, or until the buffer is full. */
   13.40 -    while ( count != 0 )
   13.41 -    {
   13.42 -        len = ((STRLEN - pos) > count) ? count : STRLEN - pos;
   13.43 -        memcpy(str + pos, s, len);
   13.44 -        pos   += len;
   13.45 -        s     += len;
   13.46 -        count -= len;
   13.47 -        if ( (pos == STRLEN) || (str[pos-1] == '\n') )
   13.48 -        {
   13.49 -            (void)HYPERVISOR_console_write(str, pos);
   13.50 -            pos = 0;
   13.51 -        }
   13.52 -    }
   13.53 -}
   13.54 -
   13.55 -static kdev_t kconsole_device(struct console *c)
   13.56 -{
   13.57 -    /*
   13.58 -     * This is the magic that binds our "struct console" to our
   13.59 -     * "tty_struct", defined below.
   13.60 -     */
   13.61 -    return MKDEV(TTY_MAJOR, 0);
   13.62 -}
   13.63 -
   13.64 -static struct console kconsole_info = {
   13.65 -    name:		"xenocon",
   13.66 -    write:		kconsole_write,
   13.67 -    device:             kconsole_device,
   13.68 -    flags:		CON_PRINTBUFFER,
   13.69 -    index:		-1,
   13.70 -};
   13.71 -
   13.72 -void xeno_console_init(void)
   13.73 -{
   13.74 -    register_console(&kconsole_info);
   13.75 -}
   13.76 -
   13.77 -
   13.78 -/******************** Initial /dev/console *********************************/
   13.79 -
   13.80 -
   13.81 -static struct tty_driver console_driver;
   13.82 -static int console_refcount;
   13.83 -static struct tty_struct *console_table[1];
   13.84 -static struct termios *console_termios[1];
   13.85 -static struct termios *console_termios_locked[1];
   13.86 -
   13.87 -static int console_write_room(struct tty_struct *tty)
   13.88 -{
   13.89 -    return INT_MAX;
   13.90 -}
   13.91 -
   13.92 -static int console_chars_in_buffer(struct tty_struct *tty)
   13.93 -{
   13.94 -    return 0;
   13.95 -}
   13.96 -
   13.97 -static inline int console_xmit(int ch)
   13.98 -{
   13.99 -    char _ch = ch;
  13.100 -    kconsole_write(NULL, &_ch, 1);
  13.101 -    return 1;
  13.102 -}
  13.103 -
  13.104 -static int console_write(struct tty_struct *tty, int from_user,
  13.105 -                       const u_char * buf, int count)
  13.106 -{
  13.107 -    int i;
  13.108 -
  13.109 -    if ( from_user && verify_area(VERIFY_READ, buf, count) )
  13.110 -    {
  13.111 -        return -EINVAL;
  13.112 -    }
  13.113 -
  13.114 -    for ( i = 0; i < count; i++ )
  13.115 -    {
  13.116 -        char ch;
  13.117 -        if ( from_user )
  13.118 -        {
  13.119 -            __get_user(ch, buf + i);
  13.120 -        }
  13.121 -        else
  13.122 -        {
  13.123 -            ch = buf[i];
  13.124 -        }
  13.125 -        console_xmit(ch);
  13.126 -    }
  13.127 -    return i;
  13.128 -}
  13.129 -
  13.130 -static void console_put_char(struct tty_struct *tty, u_char ch)
  13.131 -{
  13.132 -    console_xmit(ch);
  13.133 -}
  13.134 -
  13.135 -static int console_open(struct tty_struct *tty, struct file *filp)
  13.136 -{
  13.137 -    int line;
  13.138 -
  13.139 -    MOD_INC_USE_COUNT;
  13.140 -    line = MINOR(tty->device) - tty->driver.minor_start;
  13.141 -    if ( line )
  13.142 -    {
  13.143 -        MOD_DEC_USE_COUNT;
  13.144 -        return -ENODEV;
  13.145 -    }
  13.146 -
  13.147 -    tty->driver_data = NULL;
  13.148 -
  13.149 -    return 0;
  13.150 -}
  13.151 -
  13.152 -static void console_close(struct tty_struct *tty, struct file *filp)
  13.153 -{
  13.154 -    MOD_DEC_USE_COUNT;
  13.155 -}
  13.156 -
  13.157 -static int __init console_ini(void)
  13.158 -{
  13.159 -    memset(&console_driver, 0, sizeof(struct tty_driver));
  13.160 -    console_driver.magic           = TTY_DRIVER_MAGIC;
  13.161 -    console_driver.driver_name     = "xeno_console";
  13.162 -    console_driver.name            = "console";
  13.163 -    console_driver.major           = TTY_MAJOR;
  13.164 -    console_driver.minor_start     = 0;
  13.165 -    console_driver.num             = 1;
  13.166 -    console_driver.type            = TTY_DRIVER_TYPE_SERIAL;
  13.167 -    console_driver.subtype         = SERIAL_TYPE_NORMAL;
  13.168 -    console_driver.init_termios    = tty_std_termios;
  13.169 -    console_driver.flags           = TTY_DRIVER_REAL_RAW;
  13.170 -    console_driver.refcount        = &console_refcount;
  13.171 -    console_driver.table           = console_table;
  13.172 -    console_driver.termios         = console_termios;
  13.173 -    console_driver.termios_locked  = console_termios_locked;
  13.174 -    /* Functions */
  13.175 -    console_driver.open            = console_open;
  13.176 -    console_driver.close           = console_close;
  13.177 -    console_driver.write           = console_write;
  13.178 -    console_driver.write_room      = console_write_room;
  13.179 -    console_driver.put_char        = console_put_char;
  13.180 -    console_driver.chars_in_buffer = console_chars_in_buffer;
  13.181 -
  13.182 -    if ( tty_register_driver(&console_driver) )
  13.183 -    {
  13.184 -        printk(KERN_ERR "Couldn't register Xeno console driver\n");
  13.185 -    }
  13.186 -    else
  13.187 -    {
  13.188 -        printk("Xeno console successfully installed\n");
  13.189 -    }
  13.190 -
  13.191 -    return 0;
  13.192 -}
  13.193 -
  13.194 -static void __exit console_fin(void)
  13.195 -{
  13.196 -    int ret;
  13.197 -
  13.198 -    ret = tty_unregister_driver(&console_driver);
  13.199 -    if ( ret != 0 )
  13.200 -    {
  13.201 -        printk(KERN_ERR "Unable to unregister Xeno console driver: %d\n", ret);
  13.202 -    }
  13.203 -}
  13.204 -
  13.205 -module_init(console_ini);
  13.206 -module_exit(console_fin);
  13.207 -
    14.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/Makefile	Tue Mar 25 11:15:01 2003 +0000
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,3 +0,0 @@
    14.4 -O_TARGET := dom0.o
    14.5 -obj-y := dom0_memory.o dom0_core.o vfr.o
    14.6 -include $(TOPDIR)/Rules.make
    15.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_block.c	Tue Mar 25 11:15:01 2003 +0000
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,27 +0,0 @@
    15.4 -/*
    15.5 - * domain 0 block driver interface
    15.6 - *
    15.7 - */
    15.8 -
    15.9 -#include <linux/config.h>
   15.10 -#include <linux/module.h>
   15.11 -#include <linux/kernel.h>
   15.12 -#include <linux/sched.h>
   15.13 -
   15.14 -static int __init init_module(void)
   15.15 -{
   15.16 -  request_module("xl_block");
   15.17 -  printk("Successfully installed domain 0 block interface\n");
   15.18 -
   15.19 -
   15.20 -  return 0;
   15.21 -}
   15.22 -
   15.23 -static void __exit cleanup_module(void)
   15.24 -{
   15.25 -  printk("Successfully de-installed domain-0 block interface\n");
   15.26 -  return 0;
   15.27 -}
   15.28 -
   15.29 -module_init(init_module);
   15.30 -module_exit(cleanup_module);
    16.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_core.c	Tue Mar 25 11:15:01 2003 +0000
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,334 +0,0 @@
    16.4 -/******************************************************************************
    16.5 - * dom0_core.c
    16.6 - * 
    16.7 - * Interface to privileged domain-0 commands.
    16.8 - * 
    16.9 - * Copyright (c) 2002, K A Fraser, B Dragovic
   16.10 - */
   16.11 -
   16.12 -#include <linux/config.h>
   16.13 -#include <linux/module.h>
   16.14 -#include <linux/kernel.h>
   16.15 -#include <linux/sched.h>
   16.16 -#include <linux/slab.h>
   16.17 -#include <linux/string.h>
   16.18 -#include <linux/errno.h>
   16.19 -#include <linux/proc_fs.h>
   16.20 -
   16.21 -#include <linux/mm.h>
   16.22 -#include <linux/mman.h>
   16.23 -#include <linux/swap.h>
   16.24 -#include <linux/smp_lock.h>
   16.25 -#include <linux/swapctl.h>
   16.26 -#include <linux/iobuf.h>
   16.27 -#include <linux/highmem.h>
   16.28 -#include <linux/pagemap.h>
   16.29 -
   16.30 -#include <asm/pgalloc.h>
   16.31 -#include <asm/pgtable.h>
   16.32 -#include <asm/uaccess.h>
   16.33 -#include <asm/tlb.h>
   16.34 -
   16.35 -#include "dom0_ops.h"
   16.36 -
   16.37 -/* Private proc-file data structures. */
   16.38 -typedef struct proc_data {
   16.39 -    unsigned int domain;
   16.40 -    unsigned long map_size;
   16.41 -} dom_procdata_t;
   16.42 -
   16.43 -typedef struct proc_mem_data {
   16.44 -    unsigned long pfn;
   16.45 -    int tot_pages;
   16.46 -} proc_memdata_t;
   16.47 -
   16.48 -#define XENO_BASE       "xeno"
   16.49 -#define DOM0_CMD_INTF   "dom0_cmd"
   16.50 -#define DOM0_NEWDOM     "new_dom_data"
   16.51 -
   16.52 -#define MAX_LEN         16
   16.53 -#define DOM_DIR         "dom"
   16.54 -#define DOM_MEM         "mem"
   16.55 -#define DOM_VIF         "vif"
   16.56 -
   16.57 -#define MAP_DISCONT     1
   16.58 -
   16.59 -static struct proc_dir_entry *xeno_base;
   16.60 -static struct proc_dir_entry *dom0_cmd_intf;
   16.61 -static struct proc_dir_entry *proc_ft;
   16.62 -
   16.63 -unsigned long direct_mmap(unsigned long, unsigned long, pgprot_t, int, int);
   16.64 -int direct_unmap(unsigned long, unsigned long);
   16.65 -int direct_disc_unmap(unsigned long, unsigned long, int);
   16.66 -
   16.67 -static unsigned char readbuf[1204];
   16.68 -
   16.69 -static int cmd_read_proc(char *page, char **start, off_t off,
   16.70 -                          int count, int *eof, void *data)
   16.71 -{
   16.72 -    strcpy(page, readbuf);
   16.73 -    *readbuf = '\0';
   16.74 -    *eof = 1;
   16.75 -    *start = page;
   16.76 -    return strlen(page);
   16.77 -}
   16.78 -
   16.79 -static ssize_t dom_vif_read(struct file * file, char * buff, size_t size, loff_t * off)
   16.80 -{
   16.81 -    char hyp_buf[128]; // Hypervisor is going to write its reply here.
   16.82 -    network_op_t op;
   16.83 -    static int finished = 0;
   16.84 -
   16.85 -    // This seems to be the only way to make the OS stop making read requests
   16.86 -    // to the file.  When we use the fileoperations version of read, offset 
   16.87 -    // seems to be ignored altogether.
   16.88 -    
   16.89 -    if (finished) 
   16.90 -    {
   16.91 -        finished = 0;
   16.92 -        return 0;
   16.93 -    }
   16.94 -    
   16.95 -    op.cmd = NETWORK_OP_VIFQUERY;
   16.96 -    op.u.vif_query.domain = (unsigned int) ((struct proc_dir_entry *)file->f_dentry->d_inode->u.generic_ip)->data;
   16.97 -    op.u.vif_query.buf = hyp_buf;
   16.98 -
   16.99 -    strcpy(hyp_buf, "Error getting domain's vif list from hypervisor.\n"); // This will be replaced if everything works.
  16.100 -
  16.101 -    (void)HYPERVISOR_network_op(&op);
  16.102 -
  16.103 -    if (*off >= (strlen(hyp_buf)+1)) return 0;
  16.104 -    
  16.105 -    copy_to_user(buff, hyp_buf, strlen(hyp_buf));
  16.106 -    
  16.107 -    finished = 1;
  16.108 -    
  16.109 -    return strlen(hyp_buf)+1;
  16.110 -}
  16.111 -
  16.112 -struct file_operations dom_vif_ops = {
  16.113 -    read:    dom_vif_read
  16.114 -};
  16.115 -
  16.116 -
  16.117 -static void create_proc_dom_entries(int dom)
  16.118 -{
  16.119 -    struct proc_dir_entry * dir;
  16.120 -    dom_procdata_t * dom_data;
  16.121 -    char dir_name[MAX_LEN];
  16.122 -    struct proc_dir_entry * file;
  16.123 -
  16.124 -    snprintf(dir_name, MAX_LEN, "%s%d", DOM_DIR, dom);
  16.125 -
  16.126 -    dom_data = (dom_procdata_t *)kmalloc(sizeof(dom_procdata_t), GFP_KERNEL);
  16.127 -    dom_data->domain = dom;
  16.128 -
  16.129 -    dir = proc_mkdir(dir_name, xeno_base);
  16.130 -    dir->data = dom_data;
  16.131 -    
  16.132 -    file = create_proc_entry(DOM_VIF, 0600, dir);
  16.133 -    if (file != NULL)
  16.134 -    {
  16.135 -        file->owner         = THIS_MODULE;
  16.136 -        file->nlink         = 1;
  16.137 -        file->proc_fops     = &dom_vif_ops;
  16.138 -        file->data          = (void *) dom;
  16.139 -    }
  16.140 -}
  16.141 -
  16.142 -static ssize_t dom_mem_write(struct file * file, const char * buff, 
  16.143 -	size_t size , loff_t * off)
  16.144 -{
  16.145 -    dom_mem_t mem_data;
  16.146 -    
  16.147 -    copy_from_user(&mem_data, (dom_mem_t *)buff, sizeof(dom_mem_t));
  16.148 -    
  16.149 -    if(direct_disc_unmap(mem_data.vaddr, mem_data.start_pfn, 
  16.150 -        mem_data.tot_pages) == 0){
  16.151 -        return sizeof(sizeof(dom_mem_t));
  16.152 -    } else {
  16.153 -        return -1;
  16.154 -    }
  16.155 -}
  16.156 -
  16.157 -static ssize_t dom_mem_read(struct file * file, char * buff, size_t size, loff_t * off)
  16.158 -{
  16.159 -    unsigned long addr;
  16.160 -    pgprot_t prot;
  16.161 -
  16.162 -    proc_memdata_t * mem_data = (proc_memdata_t *)((struct proc_dir_entry *)file->f_dentry->d_inode->u.generic_ip)->data;
  16.163 -
  16.164 -    prot = PAGE_SHARED; 
  16.165 -
  16.166 -    /* remap the range using xen specific routines */
  16.167 -
  16.168 -    addr = direct_mmap(mem_data->pfn << PAGE_SHIFT, mem_data->tot_pages << PAGE_SHIFT, prot, MAP_DISCONT, mem_data->tot_pages);
  16.169 -    
  16.170 -    copy_to_user((unsigned long *)buff, &addr, sizeof(addr));
  16.171 -
  16.172 -    return sizeof(addr);
  16.173 -}
  16.174 -
  16.175 -struct file_operations dom_mem_ops = {
  16.176 -    read:    dom_mem_read,
  16.177 -    write:   dom_mem_write,
  16.178 -};
  16.179 -
  16.180 -static int dom_map_mem(unsigned int dom, unsigned long pfn, int tot_pages)
  16.181 -{
  16.182 -    int ret = -ENOENT;
  16.183 -    struct proc_dir_entry * pd = xeno_base->subdir;
  16.184 -    struct proc_dir_entry * file;
  16.185 -    proc_memdata_t * memdata;
  16.186 -
  16.187 -    while(pd != NULL){
  16.188 -
  16.189 -        if((pd->mode & S_IFDIR) && ((dom_procdata_t *)pd->data)->domain == dom){
  16.190 -
  16.191 -            /* check if there is already an entry for mem and if so
  16.192 -             * remove it.
  16.193 -             */
  16.194 -            remove_proc_entry(DOM_MEM, pd);
  16.195 -
  16.196 -            /* create new entry with parameters describing what to do
  16.197 -             * when it is mmaped.
  16.198 -             */
  16.199 -            file = create_proc_entry(DOM_MEM, 0600, pd);
  16.200 -            if(file != NULL)
  16.201 -            {
  16.202 -                file->owner = THIS_MODULE;
  16.203 -                file->nlink = 1;
  16.204 -                file->proc_fops = &dom_mem_ops;
  16.205 -
  16.206 -                memdata = (proc_memdata_t *)kmalloc(sizeof(proc_memdata_t), GFP_KERNEL);
  16.207 -                memdata->pfn = pfn;
  16.208 -                memdata->tot_pages = tot_pages;
  16.209 -                file->data = memdata;
  16.210 -
  16.211 -                ret = 0;
  16.212 -                break;
  16.213 -            }
  16.214 -
  16.215 -            ret = -EAGAIN;
  16.216 -            break;
  16.217 -        }                    
  16.218 -        pd = pd->next;
  16.219 -    }
  16.220 -
  16.221 -    return ret;
  16.222 -}
  16.223 -
  16.224 -/* function used to retrieve data associated with new domain */
  16.225 -static ssize_t dom_data_read(struct file * file, char * buff, size_t size, loff_t * off)
  16.226 -{
  16.227 -    dom0_newdomain_t * dom_data = (dom0_newdomain_t *)
  16.228 -        ((struct proc_dir_entry *)file->f_dentry->d_inode->u.generic_ip)->data;
  16.229 -
  16.230 -    copy_to_user((dom0_newdomain_t *)buff, dom_data, sizeof(dom0_newdomain_t));
  16.231 -
  16.232 -    remove_proc_entry(DOM0_NEWDOM, xeno_base);
  16.233 -
  16.234 -    kfree(dom_data);
  16.235 -
  16.236 -    return sizeof(dom0_newdomain_t);
  16.237 -}
  16.238 -
  16.239 -struct file_operations newdom_data_fops = {
  16.240 -    read:    dom_data_read,
  16.241 -};
  16.242 -
  16.243 -static int cmd_write_proc(struct file *file, const char *buffer, 
  16.244 -                           u_long count, void *data)
  16.245 -{
  16.246 -    dom0_op_t op;
  16.247 -    int ret = 0;
  16.248 -    struct proc_dir_entry * new_dom_id;
  16.249 -    dom0_newdomain_t * params;
  16.250 -    int i;
  16.251 -    unsigned long p;
  16.252 -    
  16.253 -    copy_from_user(&op, buffer, sizeof(dom0_op_t));
  16.254 -
  16.255 -    /* do some sanity checks */
  16.256 -    if(op.cmd > MAX_CMD){
  16.257 -        ret = -ENOSYS;
  16.258 -        goto out;
  16.259 -    }
  16.260 -
  16.261 -    if ( op.cmd == MAP_DOM_MEM )
  16.262 -    {
  16.263 -        ret = dom_map_mem(op.u.dommem.domain, op.u.dommem.start_pfn, 
  16.264 -                        op.u.dommem.tot_pages); 
  16.265 -    }
  16.266 -    else if ( op.cmd == DO_PGUPDATES )
  16.267 -    {
  16.268 -        ret = HYPERVISOR_pt_update(op.u.pgupdate.pgt_update_arr,
  16.269 -                                   op.u.pgupdate.num_pgt_updates);
  16.270 -    }
  16.271 -    else
  16.272 -    {
  16.273 -        ret = HYPERVISOR_dom0_op(&op);
  16.274 -
  16.275 -        /* if new domain created, create proc entries */
  16.276 -        if(op.cmd == DOM0_NEWDOMAIN){
  16.277 -            create_proc_dom_entries(ret);
  16.278 -
  16.279 -            params = (dom0_newdomain_t *)kmalloc(sizeof(dom0_newdomain_t),
  16.280 -                GFP_KERNEL);
  16.281 -            params->memory_kb = op.u.newdomain.memory_kb;
  16.282 -            params->pg_head = op.u.newdomain.pg_head;
  16.283 -            params->num_vifs = op.u.newdomain.num_vifs;
  16.284 -            params->domain = op.u.newdomain.domain;
  16.285 -
  16.286 -            /* now notify user space of the new domain's id */
  16.287 -            new_dom_id = create_proc_entry(DOM0_NEWDOM, 0600, xeno_base);
  16.288 -            if ( new_dom_id != NULL )
  16.289 -            {
  16.290 -                new_dom_id->owner      = THIS_MODULE;
  16.291 -                new_dom_id->nlink      = 1;
  16.292 -                new_dom_id->proc_fops  = &newdom_data_fops; 
  16.293 -                new_dom_id->data       = (void *)params; 
  16.294 -            }
  16.295 -
  16.296 -        }
  16.297 -
  16.298 -    }
  16.299 -    
  16.300 -out:
  16.301 -    return ret;
  16.302 -    
  16.303 -}
  16.304 -
  16.305 -static int __init init_module(void)
  16.306 -{
  16.307 -    /* xeno proc root setup */
  16.308 -    xeno_base = proc_mkdir(XENO_BASE, &proc_root); 
  16.309 -
  16.310 -    /* xeno control interface */
  16.311 -    *readbuf = '\0';
  16.312 -    dom0_cmd_intf = create_proc_entry (DOM0_CMD_INTF, 0600, xeno_base);
  16.313 -    if ( dom0_cmd_intf != NULL )
  16.314 -    {
  16.315 -        dom0_cmd_intf->owner      = THIS_MODULE;
  16.316 -        dom0_cmd_intf->nlink      = 1;
  16.317 -        dom0_cmd_intf->read_proc  = cmd_read_proc;
  16.318 -        dom0_cmd_intf->write_proc = cmd_write_proc;
  16.319 -    }
  16.320 -
  16.321 -    /* set up /proc entries for dom 0 */
  16.322 -    create_proc_dom_entries(0);
  16.323 -
  16.324 -    return 0;
  16.325 -}
  16.326 -
  16.327 -
  16.328 -static void __exit cleanup_module(void)
  16.329 -{
  16.330 -    if ( dom0_cmd_intf == NULL ) return;
  16.331 -    remove_proc_entry("dom0", &proc_root);
  16.332 -    dom0_cmd_intf = NULL;
  16.333 -}
  16.334 -
  16.335 -
  16.336 -module_init(init_module);
  16.337 -module_exit(cleanup_module);
    17.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_memory.c	Tue Mar 25 11:15:01 2003 +0000
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,368 +0,0 @@
    17.4 -#include <linux/slab.h>
    17.5 -#include <linux/mm.h>
    17.6 -#include <linux/mman.h>
    17.7 -#include <linux/swap.h>
    17.8 -#include <linux/smp_lock.h>
    17.9 -#include <linux/swapctl.h>
   17.10 -#include <linux/iobuf.h>
   17.11 -#include <linux/highmem.h>
   17.12 -#include <linux/pagemap.h>
   17.13 -#include <linux/list.h>
   17.14 -
   17.15 -#include <asm/pgalloc.h>
   17.16 -#include <asm/uaccess.h>
   17.17 -#include <asm/tlb.h>
   17.18 -#include <asm/mmu.h>
   17.19 -
   17.20 -#include "dom0_ops.h"
   17.21 -
   17.22 -#define MAP_CONT    0
   17.23 -#define MAP_DISCONT 1
   17.24 -
   17.25 -extern struct list_head * find_direct(struct list_head *, unsigned long);
   17.26 -
   17.27 -/*
   17.28 - * bd240: functions below perform direct mapping to the real physical pages
   17.29 - * needed for mapping various hypervisor specific structures needed in dom0
   17.30 - * userspace by various management applications such as domain builder etc.
   17.31 - */
   17.32 -
   17.33 -#define direct_set_pte(pteptr, pteval) queue_l1_entry_update(__pa(pteptr)|PGREQ_UNCHECKED_UPDATE, (pteval).pte_low)
   17.34 -
   17.35 -#define direct_pte_clear(pteptr) queue_l1_entry_update(__pa(pteptr)|PGREQ_UNCHECKED_UPDATE, 0)
   17.36 -
   17.37 -#define __direct_pte(x) ((pte_t) { (x) } )
   17.38 -#define __direct_mk_pte(page_nr,pgprot) __direct_pte(((page_nr) << PAGE_SHIFT) | pgprot_val(pgprot))
   17.39 -#define direct_mk_pte_phys(physpage, pgprot)   __direct_mk_pte((physpage) >> PAGE_SHIFT, pgprot)
   17.40 -
   17.41 -static inline void forget_pte(pte_t page)
   17.42 -{
   17.43 -    if (!pte_none(page)) {
   17.44 -        printk("forget_pte: old mapping existed!\n");
   17.45 -        BUG();
   17.46 -    }
   17.47 -}
   17.48 -
   17.49 -static inline void direct_remappte_range(pte_t * pte, unsigned long address, unsigned long size,
   17.50 -	unsigned long phys_addr, pgprot_t prot)
   17.51 -{
   17.52 -	unsigned long end;
   17.53 -
   17.54 -	address &= ~PMD_MASK;
   17.55 -	end = address + size;
   17.56 -	if (end > PMD_SIZE)
   17.57 -		end = PMD_SIZE;
   17.58 -	do {
   17.59 -		pte_t oldpage;
   17.60 -		oldpage = ptep_get_and_clear(pte);
   17.61 -
   17.62 - 		direct_set_pte(pte, direct_mk_pte_phys(phys_addr, prot));
   17.63 -
   17.64 -		forget_pte(oldpage);
   17.65 -		address += PAGE_SIZE;
   17.66 -		phys_addr += PAGE_SIZE;
   17.67 -		pte++;
   17.68 -	} while (address && (address < end));
   17.69 -
   17.70 -}
   17.71 -
   17.72 -static inline int direct_remappmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned long address, unsigned long size,
   17.73 -	unsigned long phys_addr, pgprot_t prot)
   17.74 -{
   17.75 -	unsigned long end;
   17.76 -
   17.77 -	address &= ~PGDIR_MASK;
   17.78 -	end = address + size;
   17.79 -	if (end > PGDIR_SIZE)
   17.80 -		end = PGDIR_SIZE;
   17.81 -	phys_addr -= address;
   17.82 -	do {
   17.83 -		pte_t * pte = pte_alloc(mm, pmd, address);
   17.84 -		if (!pte)
   17.85 -			return -ENOMEM;
   17.86 -		direct_remappte_range(pte, address, end - address, address + phys_addr, prot);
   17.87 -		address = (address + PMD_SIZE) & PMD_MASK;
   17.88 -		pmd++;
   17.89 -	} while (address && (address < end));
   17.90 -	return 0;
   17.91 -}
   17.92 -
   17.93 -/*  Note: this is only safe if the mm semaphore is held when called. */
   17.94 -int direct_remap_page_range(unsigned long from, unsigned long phys_addr, unsigned long size, pgprot_t prot)
   17.95 -{
   17.96 -	int error = 0;
   17.97 -	pgd_t * dir;
   17.98 -	unsigned long beg = from;
   17.99 -	unsigned long end = from + size;
  17.100 -	struct mm_struct *mm = current->mm;
  17.101 -
  17.102 -	phys_addr -= from;
  17.103 -	dir = pgd_offset(mm, from);
  17.104 -	flush_cache_range(mm, beg, end);
  17.105 -	if (from >= end)
  17.106 -		BUG();
  17.107 -
  17.108 -	spin_lock(&mm->page_table_lock);
  17.109 -	do {
  17.110 -		pmd_t *pmd = pmd_alloc(mm, dir, from);
  17.111 -		error = -ENOMEM;
  17.112 -		if (!pmd)
  17.113 -			break;
  17.114 -		error = direct_remappmd_range(mm, pmd, from, end - from, phys_addr + from, prot);
  17.115 -		if (error)
  17.116 -			break;
  17.117 -		from = (from + PGDIR_SIZE) & PGDIR_MASK;
  17.118 -		dir++;
  17.119 -	} while (from && (from < end));
  17.120 -	spin_unlock(&mm->page_table_lock);
  17.121 -	flush_tlb_range(mm, beg, end);
  17.122 -	return error;
  17.123 -}
  17.124 -
  17.125 -/* 
  17.126 - * used for remapping discontiguous bits of domain's memory, pages to map are
  17.127 - * found from frame table beginning at the given first_pg index
  17.128 - */ 
  17.129 -int direct_remap_disc_page_range(unsigned long from, 
  17.130 -                unsigned long first_pg, int tot_pages, pgprot_t prot)
  17.131 -{
  17.132 -    dom0_op_t dom0_op;
  17.133 -    unsigned long *pfns = get_free_page(GFP_KERNEL);
  17.134 -    unsigned long start = from;
  17.135 -    int pages, i;
  17.136 -
  17.137 -    while ( tot_pages != 0 )
  17.138 -    {
  17.139 -        dom0_op.cmd = DOM0_GETMEMLIST;
  17.140 -        dom0_op.u.getmemlist.start_pfn = first_pg;
  17.141 -        pages = 1023;
  17.142 -        dom0_op.u.getmemlist.num_pfns = 1024;
  17.143 -        if ( tot_pages < 1024 )
  17.144 -            dom0_op.u.getmemlist.num_pfns = pages = tot_pages;
  17.145 -        dom0_op.u.getmemlist.buffer = pfns;
  17.146 -        (void)HYPERVISOR_dom0_op(&dom0_op);
  17.147 -        first_pg = pfns[1023]; 
  17.148 -
  17.149 -        for ( i = 0; i < pages; i++ )
  17.150 -        {
  17.151 -            if(direct_remap_page_range(start, pfns[i] << PAGE_SHIFT, 
  17.152 -                                       PAGE_SIZE, prot))
  17.153 -                goto out;
  17.154 -            start += PAGE_SIZE;
  17.155 -            tot_pages--;
  17.156 -        }
  17.157 -    }
  17.158 -
  17.159 -out:
  17.160 -    free_page(pfns);
  17.161 -    return tot_pages;
  17.162 -} 
  17.163 -           
  17.164 -/* below functions replace standard sys_mmap and sys_munmap which are absolutely useless
  17.165 - * for direct memory mapping. direct_zap* functions are minor ammendments to the 
  17.166 - * original versions in mm/memory.c. the changes are to enable unmapping of real physical
  17.167 - * addresses.
  17.168 - */
  17.169 -
  17.170 -unsigned long direct_mmap(unsigned long phys_addr, unsigned long size, 
  17.171 -                pgprot_t prot, int flag, int tot_pages)
  17.172 -{
  17.173 -    direct_mmap_node_t * dmmap;
  17.174 -    struct list_head * entry;
  17.175 -    unsigned long addr;
  17.176 -    int ret = 0;
  17.177 -    
  17.178 -    if(!capable(CAP_SYS_ADMIN)){
  17.179 -        ret = -EPERM;
  17.180 -        goto out;
  17.181 -    }
  17.182 -
  17.183 -    /* get unmapped area invokes xen specific arch_get_unmapped_area */
  17.184 -    addr = get_unmapped_area(NULL, 0, size, 0, 0);
  17.185 -    if(addr & ~PAGE_MASK){
  17.186 -        ret = -ENOMEM;
  17.187 -        goto out;
  17.188 -    }
  17.189 -
  17.190 -    /* add node on the list of directly mapped areas, make sure the
  17.191 -     * list remains sorted.
  17.192 -     */ 
  17.193 -    dmmap = (direct_mmap_node_t *)kmalloc(sizeof(direct_mmap_node_t), GFP_KERNEL);
  17.194 -    dmmap->vm_start = addr;
  17.195 -    dmmap->vm_end = addr + size;
  17.196 -	entry = find_direct(&current->mm->context.direct_list, addr);
  17.197 -	if(entry != &current->mm->context.direct_list){
  17.198 -		list_add_tail(&dmmap->list, entry);
  17.199 -	} else {
  17.200 -    	list_add_tail(&dmmap->list, &current->mm->context.direct_list);
  17.201 -	}
  17.202 -
  17.203 -    /* and perform the mapping */
  17.204 -    if(flag == MAP_DISCONT){
  17.205 -        ret = direct_remap_disc_page_range(addr, phys_addr >> PAGE_SHIFT, 
  17.206 -            tot_pages, prot);
  17.207 -    } else {
  17.208 -        ret = direct_remap_page_range(addr, phys_addr, size, prot);
  17.209 -    }
  17.210 -
  17.211 -    if(ret == 0)
  17.212 -        ret = addr;
  17.213 -
  17.214 -out: 
  17.215 -    return ret;
  17.216 -}
  17.217 -
  17.218 -/* most of the checks, refcnt updates, cache stuff have been thrown out as they are not
  17.219 - * needed
  17.220 - */
  17.221 -static inline int direct_zap_pte_range(mmu_gather_t *tlb, pmd_t * pmd, unsigned long address, 
  17.222 -                unsigned long size)
  17.223 -{
  17.224 -	unsigned long offset;
  17.225 -	pte_t * ptep;
  17.226 -	int freed = 0;
  17.227 -
  17.228 -	if (pmd_none(*pmd))
  17.229 -		return 0;
  17.230 -	if (pmd_bad(*pmd)) {
  17.231 -		pmd_ERROR(*pmd);
  17.232 -		pmd_clear(pmd);
  17.233 -		return 0;
  17.234 -	}
  17.235 -	ptep = pte_offset(pmd, address);
  17.236 -	offset = address & ~PMD_MASK;
  17.237 -	if (offset + size > PMD_SIZE)
  17.238 -		size = PMD_SIZE - offset;
  17.239 -	size &= PAGE_MASK;
  17.240 -	for (offset=0; offset < size; ptep++, offset += PAGE_SIZE) {
  17.241 -		pte_t pte = *ptep;
  17.242 -		if (pte_none(pte))
  17.243 -			continue;
  17.244 -		freed ++;
  17.245 -		direct_pte_clear(ptep);
  17.246 -	}
  17.247 -
  17.248 -	return freed;
  17.249 -}
  17.250 -
  17.251 -static inline int direct_zap_pmd_range(mmu_gather_t *tlb, pgd_t * dir, 
  17.252 -                unsigned long address, unsigned long size)
  17.253 -{
  17.254 -	pmd_t * pmd;
  17.255 -	unsigned long end;
  17.256 -	int freed;
  17.257 -
  17.258 -	if (pgd_none(*dir))
  17.259 -		return 0;
  17.260 -	if (pgd_bad(*dir)) {
  17.261 -		pgd_ERROR(*dir);
  17.262 -		pgd_clear(dir);
  17.263 -		return 0;
  17.264 -	}
  17.265 -	pmd = pmd_offset(dir, address);
  17.266 -	end = address + size;
  17.267 -	if (end > ((address + PGDIR_SIZE) & PGDIR_MASK))
  17.268 -		end = ((address + PGDIR_SIZE) & PGDIR_MASK);
  17.269 -	freed = 0;
  17.270 -	do {
  17.271 -		freed += direct_zap_pte_range(tlb, pmd, address, end - address);
  17.272 -		address = (address + PMD_SIZE) & PMD_MASK; 
  17.273 -		pmd++;
  17.274 -	} while (address < end);
  17.275 -	return freed;
  17.276 -}
  17.277 -
  17.278 -/*
  17.279 - * remove user pages in a given range.
  17.280 - */
  17.281 -void direct_zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long size)
  17.282 -{
  17.283 -	mmu_gather_t *tlb;
  17.284 -	pgd_t * dir;
  17.285 -	unsigned long start = address, end = address + size;
  17.286 -	int freed = 0;
  17.287 -
  17.288 -	dir = pgd_offset(mm, address);
  17.289 -
  17.290 -	/*
  17.291 -	 * This is a long-lived spinlock. That's fine.
  17.292 -	 * There's no contention, because the page table
  17.293 -	 * lock only protects against kswapd anyway, and
  17.294 -	 * even if kswapd happened to be looking at this
  17.295 -	 * process we _want_ it to get stuck.
  17.296 -	 */
  17.297 -	if (address >= end)
  17.298 -		BUG();
  17.299 -	spin_lock(&mm->page_table_lock);
  17.300 -	flush_cache_range(mm, address, end);
  17.301 -	tlb = tlb_gather_mmu(mm);
  17.302 -
  17.303 -	do {
  17.304 -		freed += direct_zap_pmd_range(tlb, dir, address, end - address);
  17.305 -		address = (address + PGDIR_SIZE) & PGDIR_MASK;
  17.306 -		dir++;
  17.307 -	} while (address && (address < end));
  17.308 -
  17.309 -	/* this will flush any remaining tlb entries */
  17.310 -	tlb_finish_mmu(tlb, start, end);
  17.311 -
  17.312 -    /* decrementing rss removed */
  17.313 -
  17.314 -	spin_unlock(&mm->page_table_lock);
  17.315 -}
  17.316 -
  17.317 -int direct_unmap(unsigned long addr, unsigned long size)
  17.318 -{
  17.319 -    direct_mmap_node_t * node;
  17.320 -    struct list_head * curr;
  17.321 -    struct list_head * direct_list = &current->mm->context.direct_list;    
  17.322 -
  17.323 -    curr = direct_list->next;
  17.324 -    while(curr != direct_list){
  17.325 -        node = list_entry(curr, direct_mmap_node_t, list);
  17.326 -        if(node->vm_start == addr)
  17.327 -            break;
  17.328 -        curr = curr->next;
  17.329 -    }
  17.330 -
  17.331 -    if(curr == direct_list)
  17.332 -        return -1;
  17.333 -
  17.334 -    list_del(&node->list);
  17.335 -    kfree(node);
  17.336 -
  17.337 -    direct_zap_page_range(current->mm, addr, size);
  17.338 - 
  17.339 -    return 0;
  17.340 -}
  17.341 -
  17.342 -int direct_disc_unmap(unsigned long from, unsigned long first_pg, int tot_pages)
  17.343 -{
  17.344 -    int count = 0;
  17.345 -    direct_mmap_node_t * node;
  17.346 -    struct list_head * curr;
  17.347 -    struct list_head * direct_list = &current->mm->context.direct_list;    
  17.348 -
  17.349 -    curr = direct_list->next;
  17.350 -    while(curr != direct_list){
  17.351 -        node = list_entry(curr, direct_mmap_node_t, list);
  17.352 -
  17.353 -        if(node->vm_start == from)
  17.354 -            break;
  17.355 -        curr = curr->next;
  17.356 -    }
  17.357 -
  17.358 -    if(curr == direct_list)
  17.359 -        return -1;
  17.360 -
  17.361 -    list_del(&node->list);
  17.362 -    kfree(node);
  17.363 -
  17.364 -    while(count < tot_pages){
  17.365 -            direct_zap_page_range(current->mm, from, PAGE_SIZE);
  17.366 -            from += PAGE_SIZE;
  17.367 -            count++;
  17.368 -    }
  17.369 -
  17.370 -    return 0;
  17.371 -} 
    18.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/dom0_ops.h	Tue Mar 25 11:15:01 2003 +0000
    18.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.3 @@ -1,80 +0,0 @@
    18.4 -/******************************************************************************
    18.5 - * dom0_ops.h
    18.6 - * 
    18.7 - * Process command requests from domain-0 guest OS.
    18.8 - * 
    18.9 - * Copyright (c) 2002, K A Fraser, B Dragovic
   18.10 - */
   18.11 -
   18.12 -#define DOM0_NEWDOMAIN   0
   18.13 -#define DOM0_KILLDOMAIN  1
   18.14 -#define DOM0_GETMEMLIST  2
   18.15 -#define DOM0_STARTDOM    4
   18.16 -#define MAP_DOM_MEM      6 /* Not passed down to Xen */
   18.17 -#define DO_PGUPDATES     7 /* Not passed down to Xen */
   18.18 -#define MAX_CMD          8
   18.19 -
   18.20 -#define MAX_CMD_LEN     256
   18.21 -
   18.22 -typedef struct dom0_newdomain_st
   18.23 -{
   18.24 -    unsigned int domain;
   18.25 -    unsigned int memory_kb;
   18.26 -    unsigned int num_vifs;  // temporary
   18.27 -    unsigned long pg_head;  // return parameter
   18.28 -} dom0_newdomain_t;
   18.29 -
   18.30 -typedef struct dom0_killdomain_st
   18.31 -{
   18.32 -    unsigned int domain;
   18.33 -} dom0_killdomain_t;
   18.34 -
   18.35 -typedef struct dom0_getmemlist_st
   18.36 -{
   18.37 -    unsigned long start_pfn;
   18.38 -    unsigned long num_pfns;
   18.39 -    void *buffer;
   18.40 -} dom0_getmemlist_t;
   18.41 -
   18.42 -/* This is entirely processed by XenoLinux */
   18.43 -typedef struct dom_mem 
   18.44 -{
   18.45 -    unsigned int domain;
   18.46 -    unsigned long vaddr;
   18.47 -    unsigned long start_pfn;
   18.48 -    int tot_pages;
   18.49 -} dom_mem_t;
   18.50 -
   18.51 -/* This is entirely processed by XenoLinux */
   18.52 -typedef struct dom_pgupdate
   18.53 -{
   18.54 -    unsigned long pgt_update_arr;
   18.55 -    unsigned long num_pgt_updates;
   18.56 -} dom_pgupdate_t;
   18.57 -
   18.58 -typedef struct domain_launch
   18.59 -{
   18.60 -    unsigned int domain;
   18.61 -    unsigned long l2_pgt_addr;
   18.62 -    unsigned long virt_load_addr;
   18.63 -    unsigned long virt_shinfo_addr;
   18.64 -    unsigned long virt_startinfo_addr;
   18.65 -    unsigned int num_vifs;
   18.66 -    char cmd_line[MAX_CMD_LEN];
   18.67 -} dom_meminfo_t;
   18.68 -
   18.69 -typedef struct dom0_op_st
   18.70 -{
   18.71 -    unsigned long cmd;
   18.72 -    union
   18.73 -    {
   18.74 -        dom0_newdomain_t newdomain;
   18.75 -        dom0_killdomain_t killdomain;
   18.76 -        dom0_getmemlist_t getmemlist;
   18.77 -        dom_mem_t dommem;
   18.78 -        dom_pgupdate_t pgupdate;
   18.79 -        dom_meminfo_t meminfo;
   18.80 -    }
   18.81 -    u;
   18.82 -} dom0_op_t;
   18.83 -
    19.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/drivers/dom0/vfr.c	Tue Mar 25 11:15:01 2003 +0000
    19.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.3 @@ -1,306 +0,0 @@
    19.4 -/******************************************************************************
    19.5 - * vfr.c
    19.6 - *
    19.7 - * Interface to the virtual firewall/router.
    19.8 - *
    19.9 - */
   19.10 -
   19.11 -#include <linux/config.h>
   19.12 -#include <linux/module.h>
   19.13 -#include <linux/kernel.h>
   19.14 -#include <linux/sched.h>
   19.15 -#include <linux/slab.h>
   19.16 -#include <linux/string.h>
   19.17 -#include <linux/errno.h>
   19.18 -#include <linux/proc_fs.h>
   19.19 -
   19.20 -#include <asm/hypervisor-ifs/network.h>
   19.21 -
   19.22 -static struct proc_dir_entry *proc_vfr;
   19.23 -
   19.24 -static unsigned char readbuf[1024];
   19.25 -
   19.26 -/* Helpers, implemented at the bottom. */
   19.27 -u32 getipaddr(const char *buff, unsigned int len);
   19.28 -u16 antous(const char *buff, int len);
   19.29 -int anton(const char *buff, int len);
   19.30 -
   19.31 -static int vfr_read_proc(char *page, char **start, off_t off,
   19.32 -                                          int count, int *eof, void *data)
   19.33 -{   
   19.34 -    strcpy(page, readbuf);
   19.35 -    *readbuf = '\0';
   19.36 -    *eof = 1;
   19.37 -    *start = page;
   19.38 -    return strlen(page);
   19.39 -}
   19.40 -
   19.41 -/* The format for the vfr interface is as follows:
   19.42 - *
   19.43 - *  COMMAND <field>=<val> [<field>=<val> [...]]
   19.44 - *
   19.45 - *  where:
   19.46 - *
   19.47 - *  COMMAND = { ACCEPT | COUNT }
   19.48 - *
   19.49 - *  field=val pairs are as follows:
   19.50 - *
   19.51 - *  field = { srcaddr | dstaddr }
   19.52 - *      val is a dot seperated, numeric IP address.
   19.53 - *
   19.54 - *  field = { srcport | dstport }
   19.55 - *      val is a (16-bit) unsigned int
   19.56 - *
   19.57 - *  field = { proto }
   19.58 - *      val = { IP | TCP | UDP | ARP }
   19.59 - *
   19.60 - */
   19.61 -
   19.62 -#define isspace(_x) ( ((_x)==' ')  || ((_x)=='\t') || ((_x)=='\v') || \
   19.63 -		      ((_x)=='\f') || ((_x)=='\r') || ((_x)=='\n') )
   19.64 -
   19.65 -static int vfr_write_proc(struct file *file, const char *buffer,
   19.66 -                                           u_long count, void *data)
   19.67 -{
   19.68 -  network_op_t op;
   19.69 -  int ret, len;
   19.70 -  int ts, te, tl; // token start, end, and length
   19.71 -  int fs, fe, fl; // field.
   19.72 -
   19.73 -  len = count;
   19.74 -  ts = te = 0;
   19.75 -
   19.76 -  memset(&op, 0, sizeof(network_op_t));
   19.77 -
   19.78 -  // get the command:
   19.79 -  while ( count && isspace(buffer[ts]) ) { ts++; count--; } // skip spaces.
   19.80 -  te = ts;
   19.81 -  while ( count && !isspace(buffer[te]) ) { te++; count--; } // command end
   19.82 -  if ( te <= ts ) goto bad;
   19.83 -  tl = te - ts;
   19.84 -  
   19.85 -  if ( strncmp(&buffer[ts], "ADD", tl) == 0 )
   19.86 -  {
   19.87 -     op.cmd = NETWORK_OP_ADDRULE;
   19.88 -  }
   19.89 -  else if ( strncmp(&buffer[ts], "DELETE", tl) == 0 )
   19.90 -  {
   19.91 -     op.cmd = NETWORK_OP_DELETERULE;
   19.92 -  }
   19.93 -  else if ( strncmp(&buffer[ts], "PRINT", tl) == 0 )
   19.94 -  {
   19.95 -     op.cmd = NETWORK_OP_GETRULELIST;
   19.96 -     goto doneparsing;
   19.97 -  }
   19.98 -        
   19.99 -  ts = te;
  19.100 -  
  19.101 -  // get the action
  19.102 -  while ( count && (buffer[ts] == ' ') ) { ts++; count--; } // skip spaces.
  19.103 -  te = ts;
  19.104 -  while ( count && (buffer[te] != ' ') ) { te++; count--; } // command end
  19.105 -  if ( te <= ts ) goto bad;
  19.106 -  tl = te - ts;
  19.107 -
  19.108 -  if ( strncmp(&buffer[ts], "ACCEPT", tl) == 0 ) 
  19.109 -  {
  19.110 -    op.u.net_rule.action = NETWORK_ACTION_ACCEPT;
  19.111 -    goto keyval;
  19.112 -  }
  19.113 -  if ( strncmp(&buffer[ts], "COUNT", tl) == 0 ) 
  19.114 -  {
  19.115 -    op.u.net_rule.action = NETWORK_ACTION_COUNT;
  19.116 -    goto keyval;
  19.117 -  }
  19.118 -   
  19.119 -  // default case;
  19.120 -  return (len);
  19.121 -  
  19.122 -
  19.123 -  // get the key=val pairs.
  19.124 - keyval:
  19.125 -  while (count)
  19.126 -  {
  19.127 -    //get field
  19.128 -    ts = te; while ( count && isspace(buffer[ts]) ) { ts++; count--; }
  19.129 -    te = ts;
  19.130 -    while ( count && !isspace(buffer[te]) && (buffer[te] != '=') ) 
  19.131 -      { te++; count--; }
  19.132 -    if ( te <= ts )
  19.133 -	goto doneparsing;
  19.134 -    tl = te - ts;
  19.135 -    fs = ts; fe = te; fl = tl; // save the field markers.
  19.136 -    // skip "   =   " (ignores extra equals.)
  19.137 -    while ( count && (isspace(buffer[te]) || (buffer[te] == '=')) ) 
  19.138 -      { te++; count--; }
  19.139 -    ts = te;
  19.140 -    while ( count && !isspace(buffer[te]) ) { te++; count--; }
  19.141 -    tl = te - ts;
  19.142 -
  19.143 -    if ( (fl <= 0) || (tl <= 0) ) goto bad;
  19.144 -
  19.145 -    if (strncmp(&buffer[fs], "srcaddr", fl) == 0) 
  19.146 -    {  
  19.147 -      op.u.net_rule.src_addr = getipaddr(&buffer[ts], tl);
  19.148 -    }
  19.149 -    else if (strncmp(&buffer[fs], "dstaddr", fl) == 0)
  19.150 -    {    
  19.151 -      op.u.net_rule.dst_addr = getipaddr(&buffer[ts], tl);
  19.152 -    }
  19.153 -    else if (strncmp(&buffer[fs], "srcaddrmask", fl) == 0) 
  19.154 -    {
  19.155 -      op.u.net_rule.src_addr_mask = getipaddr(&buffer[ts], tl);
  19.156 -    }
  19.157 -    else if (strncmp(&buffer[fs], "dstaddrmask", fl) == 0)
  19.158 -    {
  19.159 -      op.u.net_rule.dst_addr_mask = getipaddr(&buffer[ts], tl);
  19.160 -    }
  19.161 -    else if (strncmp(&buffer[fs], "srcport", fl) == 0)
  19.162 -    {
  19.163 -      op.u.net_rule.src_port = antous(&buffer[ts], tl);
  19.164 -    }
  19.165 -    else if (strncmp(&buffer[fs], "dstport", fl) == 0)
  19.166 -    {
  19.167 -      op.u.net_rule.dst_port = antous(&buffer[ts], tl);
  19.168 -    }
  19.169 -    else if (strncmp(&buffer[fs], "srcportmask", fl) == 0)
  19.170 -    {
  19.171 -      op.u.net_rule.src_port_mask = antous(&buffer[ts], tl);
  19.172 -    }
  19.173 -    else if (strncmp(&buffer[fs], "dstportmask", fl) == 0)
  19.174 -    {
  19.175 -      op.u.net_rule.dst_port_mask = antous(&buffer[ts], tl);
  19.176 -    }
  19.177 -    else if (strncmp(&buffer[fs], "srcint", fl) == 0)
  19.178 -    {
  19.179 -      op.u.net_rule.src_interface = anton(&buffer[ts], tl);
  19.180 -    }
  19.181 -    else if (strncmp(&buffer[fs], "dstint", fl) == 0)
  19.182 -    {
  19.183 -      op.u.net_rule.dst_interface = anton(&buffer[ts], tl);
  19.184 -    }
  19.185 -    else if ( (strncmp(&buffer[fs], "proto", fl) == 0))
  19.186 -    {	
  19.187 -      if (strncmp(&buffer[ts], "any", tl) == 0) 
  19.188 -	  op.u.net_rule.proto = NETWORK_PROTO_ANY; 
  19.189 -      if (strncmp(&buffer[ts], "ip", tl) == 0)
  19.190 -	  op.u.net_rule.proto = NETWORK_PROTO_IP;
  19.191 -      if (strncmp(&buffer[ts], "tcp", tl) == 0) 
  19.192 -	  op.u.net_rule.proto = NETWORK_PROTO_TCP;
  19.193 -      if (strncmp(&buffer[ts], "udp", tl) == 0)
  19.194 -	  op.u.net_rule.proto = NETWORK_PROTO_UDP;
  19.195 -      if (strncmp(&buffer[ts], "arp", tl) == 0)
  19.196 -	  op.u.net_rule.proto = NETWORK_PROTO_ARP;
  19.197 -      
  19.198 -    }
  19.199 -  }
  19.200 -
  19.201 - doneparsing:  
  19.202 -  ret = HYPERVISOR_network_op(&op);
  19.203 -  return(len);
  19.204 -
  19.205 - bad:
  19.206 -  return(len);
  19.207 -    
  19.208 -    
  19.209 -}
  19.210 -
  19.211 -static int __init init_module(void)
  19.212 -{
  19.213 -    *readbuf = '\0';
  19.214 -    proc_vfr = create_proc_entry ("vfr", 0600, &proc_root);
  19.215 -    if ( proc_vfr != NULL )
  19.216 -    {
  19.217 -        proc_vfr->owner      = THIS_MODULE;
  19.218 -        proc_vfr->nlink      = 1;
  19.219 -        proc_vfr->read_proc  = vfr_read_proc;
  19.220 -        proc_vfr->write_proc = vfr_write_proc;
  19.221 -        printk("Successfully installed virtual firewall/router interface\n");
  19.222 -    }
  19.223 -    return 0;
  19.224 -}
  19.225 -
  19.226 -static void __exit cleanup_module(void)
  19.227 -{
  19.228 -    if ( proc_vfr == NULL ) return;
  19.229 -    remove_proc_entry("vfr", &proc_root);
  19.230 -    proc_vfr = NULL;
  19.231 -}
  19.232 -
  19.233 -module_init(init_module);
  19.234 -module_exit(cleanup_module);
  19.235 -
  19.236 -/* Helper functions start here: */
  19.237 -
  19.238 -int anton(const char *buff, int len)
  19.239 -{
  19.240 -    int ret;
  19.241 -    char c;
  19.242 -    int sign = 1;
  19.243 -    
  19.244 -    ret = 0;
  19.245 -
  19.246 -    if (len == 0) return 0;
  19.247 -    if (*buff == '-') { sign = -1; buff++; len--; }
  19.248 -
  19.249 -    while ( (len) && ((c = *buff) >= '0') && (c <= '9') )
  19.250 -    {
  19.251 -        ret *= 10;
  19.252 -        ret += c - '0';
  19.253 -        buff++; len--;
  19.254 -    }
  19.255 -
  19.256 -    ret *= sign;
  19.257 -    return ret;
  19.258 -}
  19.259 -    
  19.260 -u16 antous(const char *buff, int len)
  19.261 -{
  19.262 -  u16 ret;
  19.263 -  char c;
  19.264 -
  19.265 -  ret = 0;
  19.266 -
  19.267 -  while ( (len) && ((c = *buff) >= '0') && (c <= '9') )
  19.268 -  {
  19.269 -    ret *= 10;
  19.270 -    ret += c - '0';
  19.271 -    buff++; len--;
  19.272 -  }
  19.273 -
  19.274 -  return ret;
  19.275 -}
  19.276 -
  19.277 -u32 getipaddr(const char *buff, unsigned int len)
  19.278 -{
  19.279 -  int i; 
  19.280 -  char c;
  19.281 -  u32 ret, val;
  19.282 -
  19.283 -  ret = 0; val = 0;
  19.284 -
  19.285 -  while ( len )
  19.286 -  {
  19.287 -    if (!((((c = *buff) >= '0') && ( c <= '9')) || ( c == '.' ) ) ) 
  19.288 -    {
  19.289 -      return(0); // malformed.
  19.290 -    }
  19.291 -
  19.292 -    if ( c == '.' ) {
  19.293 -      if (val > 255) return (0); //malformed.
  19.294 -      ret = ret << 8; 
  19.295 -      ret += val;
  19.296 -      val = 0;
  19.297 -      len--; buff++;
  19.298 -      continue;
  19.299 -    }
  19.300 -    val *= 10;
  19.301 -    val += c - '0';
  19.302 -    buff++; len--;
  19.303 -  }
  19.304 -  ret = ret << 8;
  19.305 -  ret += val;
  19.306 -
  19.307 -  return (ret);
  19.308 -}
  19.309 -
    20.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/drivers/network/Makefile	Tue Mar 25 11:15:01 2003 +0000
    20.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.3 @@ -1,3 +0,0 @@
    20.4 -O_TARGET := net.o
    20.5 -obj-y := network.o
    20.6 -include $(TOPDIR)/Rules.make
    21.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/drivers/network/network.c	Tue Mar 25 11:15:01 2003 +0000
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,443 +0,0 @@
    21.4 -/******************************************************************************
    21.5 - * network.c
    21.6 - * 
    21.7 - * Virtual network driver for XenoLinux.
    21.8 - * 
    21.9 - * Copyright (c) 2002, K A Fraser
   21.10 - */
   21.11 -
   21.12 -#include <linux/config.h>
   21.13 -#include <linux/module.h>
   21.14 -
   21.15 -#include <linux/kernel.h>
   21.16 -#include <linux/sched.h>
   21.17 -#include <linux/slab.h>
   21.18 -#include <linux/string.h>
   21.19 -#include <linux/errno.h>
   21.20 -
   21.21 -#include <linux/netdevice.h>
   21.22 -#include <linux/inetdevice.h>
   21.23 -#include <linux/etherdevice.h>
   21.24 -#include <linux/skbuff.h>
   21.25 -#include <linux/init.h>
   21.26 -
   21.27 -#include <asm/io.h>
   21.28 -#include <net/sock.h>
   21.29 -
   21.30 -#define NET_TX_IRQ _EVENT_NET_TX
   21.31 -#define NET_RX_IRQ _EVENT_NET_RX
   21.32 -
   21.33 -#define TX_MAX_ENTRIES (TX_RING_SIZE - 2)
   21.34 -#define RX_MAX_ENTRIES (RX_RING_SIZE - 2)
   21.35 -
   21.36 -#define TX_RING_INC(_i)    (((_i)+1) & (TX_RING_SIZE-1))
   21.37 -#define RX_RING_INC(_i)    (((_i)+1) & (RX_RING_SIZE-1))
   21.38 -#define TX_RING_ADD(_i,_j) (((_i)+(_j)) & (TX_RING_SIZE-1))
   21.39 -#define RX_RING_ADD(_i,_j) (((_i)+(_j)) & (RX_RING_SIZE-1))
   21.40 -
   21.41 -#define RX_BUF_SIZE ((PAGE_SIZE/2)+1) /* Fool the slab allocator :-) */
   21.42 -
   21.43 -static void network_rx_int(int irq, void *dev_id, struct pt_regs *ptregs);
   21.44 -static void network_tx_int(int irq, void *dev_id, struct pt_regs *ptregs);
   21.45 -static void network_tx_buf_gc(struct net_device *dev);
   21.46 -static void network_alloc_rx_buffers(struct net_device *dev);
   21.47 -static void network_free_rx_buffers(struct net_device *dev);
   21.48 -static void cleanup_module(void);
   21.49 -
   21.50 -static struct list_head dev_list;
   21.51 -
   21.52 -/*
   21.53 - * RX RING:   RX_IDX <= rx_cons <= rx_prod
   21.54 - * TX RING:   TX_IDX <= tx_cons <= tx_prod
   21.55 - * (*_IDX allocated privately here, *_cons & *_prod shared with hypervisor)
   21.56 - */
   21.57 -struct net_private
   21.58 -{
   21.59 -    struct list_head list;
   21.60 -    struct net_device *dev;
   21.61 -
   21.62 -    struct net_device_stats stats;
   21.63 -    struct sk_buff **tx_skb_ring;
   21.64 -    struct sk_buff **rx_skb_ring;
   21.65 -    atomic_t tx_entries;
   21.66 -    unsigned int rx_idx, tx_idx, tx_full;
   21.67 -    net_ring_t *net_ring;
   21.68 -    spinlock_t tx_lock;
   21.69 -};
   21.70 -
   21.71 - 
   21.72 -static int network_open(struct net_device *dev)
   21.73 -{
   21.74 -    struct net_private *np = dev->priv;
   21.75 -    int error = 0;
   21.76 -
   21.77 -    np->rx_idx = np->tx_idx = np->tx_full = 0;
   21.78 -
   21.79 -    memset(&np->stats, 0, sizeof(np->stats));
   21.80 -
   21.81 -    spin_lock_init(&np->tx_lock);
   21.82 -
   21.83 -    atomic_set(&np->tx_entries, 0);
   21.84 -
   21.85 -    np->net_ring->tx_prod = np->net_ring->tx_cons = np->net_ring->tx_event = 0;
   21.86 -    np->net_ring->rx_prod = np->net_ring->rx_cons = np->net_ring->rx_event = 0;
   21.87 -    np->net_ring->tx_ring = NULL;
   21.88 -    np->net_ring->rx_ring = NULL;
   21.89 -
   21.90 -    np->tx_skb_ring = kmalloc(TX_RING_SIZE * sizeof(struct sk_buff *),
   21.91 -                              GFP_KERNEL);
   21.92 -    np->rx_skb_ring = kmalloc(RX_RING_SIZE * sizeof(struct sk_buff *),
   21.93 -                              GFP_KERNEL);
   21.94 -    np->net_ring->tx_ring = kmalloc(TX_RING_SIZE * sizeof(tx_entry_t), 
   21.95 -                                    GFP_KERNEL);
   21.96 -    np->net_ring->rx_ring = kmalloc(RX_RING_SIZE * sizeof(rx_entry_t), 
   21.97 -                                    GFP_KERNEL);
   21.98 -    if ( (np->tx_skb_ring == NULL) || (np->rx_skb_ring == NULL) ||
   21.99 -         (np->net_ring->tx_ring == NULL) || (np->net_ring->rx_ring == NULL) )
  21.100 -    {
  21.101 -        printk(KERN_WARNING "%s; Could not allocate ring memory\n", dev->name);
  21.102 -        error = -ENOBUFS;
  21.103 -        goto fail;
  21.104 -    }
  21.105 -
  21.106 -    network_alloc_rx_buffers(dev);
  21.107 -
  21.108 -    error = request_irq(NET_RX_IRQ, network_rx_int, 0, 
  21.109 -                        "net-rx", dev);
  21.110 -    if ( error )
  21.111 -    {
  21.112 -        printk(KERN_WARNING "%s: Could not allocate receive interrupt\n",
  21.113 -               dev->name);
  21.114 -        network_free_rx_buffers(dev);
  21.115 -        goto fail;
  21.116 -    }
  21.117 -
  21.118 -    error = request_irq(NET_TX_IRQ, network_tx_int, 0, 
  21.119 -                        "net-tx", dev);
  21.120 -    if ( error )
  21.121 -    {
  21.122 -        printk(KERN_WARNING "%s: Could not allocate transmit interrupt\n",
  21.123 -               dev->name);
  21.124 -        free_irq(NET_RX_IRQ, dev);
  21.125 -        network_free_rx_buffers(dev);
  21.126 -        goto fail;
  21.127 -    }
  21.128 -
  21.129 -    printk("XenoLinux Virtual Network Driver installed as %s\n", dev->name);
  21.130 -
  21.131 -    netif_start_queue(dev);
  21.132 -
  21.133 -    MOD_INC_USE_COUNT;
  21.134 -
  21.135 -    return 0;
  21.136 -
  21.137 - fail:
  21.138 -    if ( np->net_ring->rx_ring ) kfree(np->net_ring->rx_ring);
  21.139 -    if ( np->net_ring->tx_ring ) kfree(np->net_ring->tx_ring);
  21.140 -    if ( np->rx_skb_ring ) kfree(np->rx_skb_ring);
  21.141 -    if ( np->tx_skb_ring ) kfree(np->tx_skb_ring);
  21.142 -    kfree(np);
  21.143 -    return error;
  21.144 -}
  21.145 -
  21.146 -
  21.147 -static void network_tx_buf_gc(struct net_device *dev)
  21.148 -{
  21.149 -    unsigned int i;
  21.150 -    struct net_private *np = dev->priv;
  21.151 -    struct sk_buff *skb;
  21.152 -    unsigned long flags;
  21.153 -
  21.154 -    spin_lock_irqsave(&np->tx_lock, flags);
  21.155 -
  21.156 -    for ( i = np->tx_idx; i != np->net_ring->tx_cons; i = TX_RING_INC(i) )
  21.157 -    {
  21.158 -        skb = np->tx_skb_ring[i];
  21.159 -        dev_kfree_skb_any(skb);
  21.160 -        atomic_dec(&np->tx_entries);
  21.161 -    }
  21.162 -
  21.163 -    np->tx_idx = i;
  21.164 -
  21.165 -    if ( np->tx_full && (atomic_read(&np->tx_entries) < TX_MAX_ENTRIES) )
  21.166 -    {
  21.167 -        np->tx_full = 0;
  21.168 -        netif_wake_queue(dev);
  21.169 -    }
  21.170 -
  21.171 -    spin_unlock_irqrestore(&np->tx_lock, flags);
  21.172 -}
  21.173 -
  21.174 -inline unsigned long get_ppte(unsigned long addr)
  21.175 -{
  21.176 -    unsigned long ppte;
  21.177 -    pgd_t *pgd; pmd_t *pmd; pte_t *ptep;
  21.178 -    pgd = pgd_offset_k(addr);
  21.179 -
  21.180 -    if ( pgd_none(*pgd) || pgd_bad(*pgd) ) BUG();
  21.181 -        
  21.182 -    pmd = pmd_offset(pgd, addr);
  21.183 -    if ( pmd_none(*pmd) || pmd_bad(*pmd) ) BUG(); 
  21.184 -        
  21.185 -    ptep = pte_offset(pmd, addr);
  21.186 -    ppte = (unsigned long)phys_to_machine(virt_to_phys(ptep));
  21.187 -
  21.188 -    return ppte;
  21.189 -}
  21.190 -
  21.191 -static void network_alloc_rx_buffers(struct net_device *dev)
  21.192 -{
  21.193 -    unsigned int i;
  21.194 -    struct net_private *np = dev->priv;
  21.195 -    struct sk_buff *skb;
  21.196 -    unsigned int end = RX_RING_ADD(np->rx_idx, RX_MAX_ENTRIES);    
  21.197 -
  21.198 -    for ( i = np->net_ring->rx_prod; i != end; i = RX_RING_INC(i) )
  21.199 -    {
  21.200 -        skb = dev_alloc_skb(RX_BUF_SIZE);
  21.201 -        if ( skb == NULL ) break;
  21.202 -        skb->dev = dev;
  21.203 -        skb_reserve(skb, 2); /* word align the IP header */
  21.204 -        np->rx_skb_ring[i] = skb;
  21.205 -        np->net_ring->rx_ring[i].addr = get_ppte((unsigned long)skb->head); 
  21.206 -        np->net_ring->rx_ring[i].size = RX_BUF_SIZE - 16; /* arbitrary */
  21.207 -    }
  21.208 -
  21.209 -    np->net_ring->rx_prod = i;
  21.210 -
  21.211 -    np->net_ring->rx_event = RX_RING_INC(np->rx_idx);
  21.212 -
  21.213 -    HYPERVISOR_net_update();
  21.214 -}
  21.215 -
  21.216 -
  21.217 -static void network_free_rx_buffers(struct net_device *dev)
  21.218 -{
  21.219 -    unsigned int i;
  21.220 -    struct net_private *np = dev->priv;
  21.221 -    struct sk_buff *skb;    
  21.222 -
  21.223 -    for ( i = np->rx_idx; i != np->net_ring->rx_prod; i = RX_RING_INC(i) )
  21.224 -    {
  21.225 -        skb = np->rx_skb_ring[i];
  21.226 -        dev_kfree_skb(skb);
  21.227 -    }
  21.228 -}
  21.229 -
  21.230 -static int network_start_xmit(struct sk_buff *skb, struct net_device *dev)
  21.231 -{
  21.232 -    unsigned int i;
  21.233 -    struct net_private *np = (struct net_private *)dev->priv;
  21.234 -    
  21.235 -    if ( np->tx_full )
  21.236 -    {
  21.237 -        printk(KERN_WARNING "%s: full queue wasn't stopped!\n", dev->name);
  21.238 -        netif_stop_queue(dev);
  21.239 -        return -ENOBUFS;
  21.240 -    }
  21.241 -    i = np->net_ring->tx_prod;
  21.242 -
  21.243 -    if ( (((unsigned long)skb->data & ~PAGE_MASK) + skb->len) >= PAGE_SIZE )
  21.244 -    {
  21.245 -        struct sk_buff *new_skb = alloc_skb(RX_BUF_SIZE, GFP_KERNEL);
  21.246 -        skb_put(new_skb, skb->len);
  21.247 -        memcpy(new_skb->data, skb->data, skb->len);
  21.248 -        kfree_skb(skb);
  21.249 -        skb = new_skb;
  21.250 -    }   
  21.251 -    
  21.252 -    np->tx_skb_ring[i] = skb;
  21.253 -    np->net_ring->tx_ring[i].addr =
  21.254 -        (unsigned long)phys_to_machine(virt_to_phys(skb->data));
  21.255 -    np->net_ring->tx_ring[i].size = skb->len;
  21.256 -    np->net_ring->tx_prod = TX_RING_INC(i);
  21.257 -    atomic_inc(&np->tx_entries);
  21.258 -
  21.259 -    np->stats.tx_bytes += skb->len;
  21.260 -    np->stats.tx_packets++;
  21.261 -
  21.262 -    spin_lock_irq(&np->tx_lock);
  21.263 -    if ( atomic_read(&np->tx_entries) >= TX_MAX_ENTRIES )
  21.264 -    {
  21.265 -        np->tx_full = 1;
  21.266 -        netif_stop_queue(dev);
  21.267 -        np->net_ring->tx_event = 
  21.268 -            TX_RING_ADD(np->tx_idx, atomic_read(&np->tx_entries) >> 1);
  21.269 -    }
  21.270 -    else
  21.271 -    {
  21.272 -        /* Avoid unnecessary tx interrupts. */
  21.273 -        np->net_ring->tx_event = TX_RING_INC(np->net_ring->tx_prod);
  21.274 -    }
  21.275 -    spin_unlock_irq(&np->tx_lock);
  21.276 -
  21.277 -    /* Must do this after setting tx_event: race with updates of tx_cons. */
  21.278 -    network_tx_buf_gc(dev);
  21.279 -
  21.280 -    HYPERVISOR_net_update();
  21.281 -
  21.282 -    return 0;
  21.283 -}
  21.284 -
  21.285 -
  21.286 -static void network_rx_int(int irq, void *dev_id, struct pt_regs *ptregs)
  21.287 -{
  21.288 -    unsigned int i;
  21.289 -    struct net_device *dev = (struct net_device *)dev_id;
  21.290 -    struct net_private *np = dev->priv;
  21.291 -    struct sk_buff *skb;
  21.292 -    
  21.293 - again:
  21.294 -    for ( i = np->rx_idx; i != np->net_ring->rx_cons; i = RX_RING_INC(i) )
  21.295 -    {
  21.296 -        if (np->net_ring->rx_ring[i].status != RING_STATUS_OK)
  21.297 -        {
  21.298 -            printk("bad buffer on RX ring!(%d)\n", 
  21.299 -                   np->net_ring->rx_ring[i].status);
  21.300 -            continue;
  21.301 -        }
  21.302 -        skb = np->rx_skb_ring[i];
  21.303 -
  21.304 -        phys_to_machine_mapping[virt_to_phys(skb->head) >> PAGE_SHIFT] =
  21.305 -            (*(unsigned long *)phys_to_virt(
  21.306 -                machine_to_phys(np->net_ring->rx_ring[i].addr))
  21.307 -                ) >> PAGE_SHIFT;
  21.308 -
  21.309 -        skb_put(skb, np->net_ring->rx_ring[i].size);
  21.310 -        skb->protocol = eth_type_trans(skb, dev);
  21.311 -
  21.312 -        /*
  21.313 -         * Set up shinfo -- from alloc_skb This was particularily nasty:  the
  21.314 -         * shared info is hidden at the back of the data area (presumably so it
  21.315 -         * can be shared), but on page flip it gets very spunked.
  21.316 -         */
  21.317 -        atomic_set(&(skb_shinfo(skb)->dataref), 1);
  21.318 -        skb_shinfo(skb)->nr_frags = 0;
  21.319 -        skb_shinfo(skb)->frag_list = NULL;
  21.320 -                                
  21.321 -        np->stats.rx_packets++;
  21.322 -
  21.323 -        np->stats.rx_bytes += np->net_ring->rx_ring[i].size;
  21.324 -        netif_rx(skb);
  21.325 -        dev->last_rx = jiffies;
  21.326 -    }
  21.327 -
  21.328 -    np->rx_idx = i;
  21.329 -
  21.330 -    network_alloc_rx_buffers(dev);
  21.331 -    
  21.332 -    /* Deal with hypervisor racing our resetting of rx_event. */
  21.333 -    smp_mb();
  21.334 -    if ( np->net_ring->rx_cons != i ) goto again;
  21.335 -}
  21.336 -
  21.337 -
  21.338 -static void network_tx_int(int irq, void *dev_id, struct pt_regs *ptregs)
  21.339 -{
  21.340 -    struct net_device *dev = (struct net_device *)dev_id;
  21.341 -    network_tx_buf_gc(dev);
  21.342 -}
  21.343 -
  21.344 -
  21.345 -int network_close(struct net_device *dev)
  21.346 -{
  21.347 -    struct net_private *np = dev->priv;
  21.348 -
  21.349 -    netif_stop_queue(dev);
  21.350 -
  21.351 -    free_irq(NET_RX_IRQ, dev);
  21.352 -    free_irq(NET_TX_IRQ, dev);
  21.353 -
  21.354 -    /*
  21.355 -     * XXXX This cannot be done safely until be have a proper interface
  21.356 -     * for setting up and tearing down virtual interfaces on the fly.
  21.357 -     * Currently the receive buffers are locked down by Xen and we have
  21.358 -     * no sensible way of retrieving them.
  21.359 -     */
  21.360 -#if 0
  21.361 -    network_free_rx_buffers(dev);
  21.362 -    kfree(np->net_ring->rx_ring);
  21.363 -    kfree(np->net_ring->tx_ring);
  21.364 -#endif
  21.365 -
  21.366 -    kfree(np->rx_skb_ring);
  21.367 -    kfree(np->tx_skb_ring);
  21.368 -
  21.369 -    MOD_DEC_USE_COUNT;
  21.370 -
  21.371 -    return 0;
  21.372 -}
  21.373 -
  21.374 -
  21.375 -static struct net_device_stats *network_get_stats(struct net_device *dev)
  21.376 -{
  21.377 -    struct net_private *np = (struct net_private *)dev->priv;
  21.378 -    return &np->stats;
  21.379 -}
  21.380 -
  21.381 -
  21.382 -int __init init_module(void)
  21.383 -{
  21.384 -    int i, err;
  21.385 -    struct net_device *dev;
  21.386 -    struct net_private *np;
  21.387 -
  21.388 -    INIT_LIST_HEAD(&dev_list);
  21.389 -
  21.390 -    for ( i = 0; i < start_info.num_net_rings; i++ )
  21.391 -    {
  21.392 -        dev = alloc_etherdev(sizeof(struct net_private));
  21.393 -        if ( dev == NULL )
  21.394 -        {
  21.395 -            err = -ENOMEM;
  21.396 -            goto fail;
  21.397 -        }
  21.398 -
  21.399 -        np = dev->priv;
  21.400 -        np->net_ring = start_info.net_rings + i;
  21.401 -
  21.402 -        SET_MODULE_OWNER(dev);
  21.403 -        dev->open            = network_open;
  21.404 -        dev->hard_start_xmit = network_start_xmit;
  21.405 -        dev->stop            = network_close;
  21.406 -        dev->get_stats       = network_get_stats;
  21.407 -
  21.408 -        memset(dev->dev_addr, 0, ETH_ALEN);
  21.409 -        *(unsigned int *)(dev->dev_addr + 1) = i;
  21.410 -
  21.411 -        if ( (err = register_netdev(dev)) != 0 )
  21.412 -        {
  21.413 -            kfree(dev);
  21.414 -            goto fail;
  21.415 -        }
  21.416 -
  21.417 -        np->dev = dev;
  21.418 -        list_add(&np->list, &dev_list);
  21.419 -    }
  21.420 -
  21.421 -    return 0;
  21.422 -
  21.423 - fail:
  21.424 -    cleanup_module();
  21.425 -    return err;
  21.426 -}
  21.427 -
  21.428 -
  21.429 -static void cleanup_module(void)
  21.430 -{
  21.431 -    struct net_private *np;
  21.432 -    struct net_device *dev;
  21.433 -
  21.434 -    while ( !list_empty(&dev_list) )
  21.435 -    {
  21.436 -        np = list_entry(dev_list.next, struct net_private, list);
  21.437 -        list_del(&np->list);
  21.438 -        dev = np->dev;
  21.439 -        unregister_netdev(dev);
  21.440 -        kfree(dev);
  21.441 -    }
  21.442 -}
  21.443 -
  21.444 -
  21.445 -module_init(init_module);
  21.446 -module_exit(cleanup_module);
    22.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/Makefile	Tue Mar 25 11:15:01 2003 +0000
    22.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.3 @@ -1,15 +0,0 @@
    22.4 -
    22.5 -.S.o:
    22.6 -	$(CC) $(AFLAGS) -traditional -c $< -o $*.o
    22.7 -
    22.8 -all: kernel.o head.o init_task.o
    22.9 -
   22.10 -O_TARGET := kernel.o
   22.11 -
   22.12 -export-objs := i386_ksyms.o
   22.13 -
   22.14 -obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \
   22.15 -	ptrace.o ioport.o ldt.o setup.o time.o sys_i386.o \
   22.16 -	i386_ksyms.o i387.o hypervisor.o
   22.17 -
   22.18 -include $(TOPDIR)/Rules.make
    23.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/entry.S	Tue Mar 25 11:15:01 2003 +0000
    23.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.3 @@ -1,717 +0,0 @@
    23.4 -/*
    23.5 - *  linux/arch/i386/entry.S
    23.6 - *
    23.7 - *  Copyright (C) 1991, 1992  Linus Torvalds
    23.8 - */
    23.9 -
   23.10 -/*
   23.11 - * entry.S contains the system-call and fault low-level handling routines.
   23.12 - * This also contains the timer-interrupt handler, as well as all interrupts
   23.13 - * and faults that can result in a task-switch.
   23.14 - *
   23.15 - * NOTE: This code handles signal-recognition, which happens every time
   23.16 - * after a timer-interrupt and after each system call.
   23.17 - *
   23.18 - * I changed all the .align's to 4 (16 byte alignment), as that's faster
   23.19 - * on a 486.
   23.20 - *
   23.21 - * Stack layout in 'ret_from_system_call':
   23.22 - * 	ptrace needs to have all regs on the stack.
   23.23 - *	if the order here is changed, it needs to be
   23.24 - *	updated in fork.c:copy_process, signal.c:do_signal,
   23.25 - *	ptrace.c and ptrace.h
   23.26 - *
   23.27 - *	 0(%esp) - %ebx
   23.28 - *	 4(%esp) - %ecx
   23.29 - *	 8(%esp) - %edx
   23.30 - *       C(%esp) - %esi
   23.31 - *	10(%esp) - %edi
   23.32 - *	14(%esp) - %ebp
   23.33 - *	18(%esp) - %eax
   23.34 - *	1C(%esp) - %ds
   23.35 - *	20(%esp) - %es
   23.36 - *	24(%esp) - orig_eax
   23.37 - *	28(%esp) - %eip
   23.38 - *	2C(%esp) - %cs
   23.39 - *	30(%esp) - %eflags
   23.40 - *	34(%esp) - %oldesp
   23.41 - *	38(%esp) - %oldss
   23.42 - *
   23.43 - * "current" is in register %ebx during any slow entries.
   23.44 - */
   23.45 -
   23.46 -#include <linux/config.h>
   23.47 -#include <linux/sys.h>
   23.48 -#include <linux/linkage.h>
   23.49 -#include <asm/segment.h>
   23.50 -#include <asm/smp.h>
   23.51 -
   23.52 -EBX		= 0x00
   23.53 -ECX		= 0x04
   23.54 -EDX		= 0x08
   23.55 -ESI		= 0x0C
   23.56 -EDI		= 0x10
   23.57 -EBP		= 0x14
   23.58 -EAX		= 0x18
   23.59 -DS		= 0x1C
   23.60 -ES		= 0x20
   23.61 -ORIG_EAX	= 0x24
   23.62 -EIP		= 0x28
   23.63 -CS		= 0x2C
   23.64 -EFLAGS		= 0x30
   23.65 -OLDESP		= 0x34
   23.66 -OLDSS		= 0x38
   23.67 -
   23.68 -CF_MASK		= 0x00000001
   23.69 -IF_MASK		= 0x00000200
   23.70 -NT_MASK		= 0x00004000
   23.71 -
   23.72 -/*
   23.73 - * these are offsets into the task-struct.
   23.74 - */
   23.75 -state		=  0
   23.76 -flags		=  4
   23.77 -sigpending	=  8
   23.78 -addr_limit	= 12
   23.79 -exec_domain	= 16
   23.80 -need_resched	= 20
   23.81 -tsk_ptrace	= 24
   23.82 -processor	= 52
   23.83 -
   23.84 -ENOSYS = 38
   23.85 -
   23.86 -
   23.87 -#define SAVE_ALL \
   23.88 -	cld; \
   23.89 -	pushl %es; \
   23.90 -	pushl %ds; \
   23.91 -	pushl %eax; \
   23.92 -	pushl %ebp; \
   23.93 -	pushl %edi; \
   23.94 -	pushl %esi; \
   23.95 -	pushl %edx; \
   23.96 -	pushl %ecx; \
   23.97 -	pushl %ebx; \
   23.98 -	movl $(__KERNEL_DS),%edx; \
   23.99 -	movl %edx,%ds; \
  23.100 -	movl %edx,%es;
  23.101 -
  23.102 -#define RESTORE_ALL	\
  23.103 -	popl %ebx;	\
  23.104 -	popl %ecx;	\
  23.105 -	popl %edx;	\
  23.106 -	popl %esi;	\
  23.107 -	popl %edi;	\
  23.108 -	popl %ebp;	\
  23.109 -	popl %eax;	\
  23.110 -1:	popl %ds;	\
  23.111 -2:	popl %es;	\
  23.112 -	addl $4,%esp;	\
  23.113 -3:	iret;		\
  23.114 -.section .fixup,"ax";	\
  23.115 -4:	movl $0,(%esp);	\
  23.116 -	jmp 1b;		\
  23.117 -5:	movl $0,(%esp);	\
  23.118 -	jmp 2b;		\
  23.119 -6:	pushl %ss;	\
  23.120 -	popl %ds;	\
  23.121 -	pushl %ss;	\
  23.122 -	popl %es;	\
  23.123 -	pushl $11;	\
  23.124 -        call do_exit;	\
  23.125 -.previous;		\
  23.126 -.section __ex_table,"a";\
  23.127 -	.align 4;	\
  23.128 -	.long 1b,4b;	\
  23.129 -	.long 2b,5b;	\
  23.130 -	.long 3b,6b;	\
  23.131 -.previous
  23.132 -
  23.133 -#define GET_CURRENT(reg) \
  23.134 -	movl $-8192, reg; \
  23.135 -	andl %esp, reg
  23.136 -
  23.137 -
  23.138 -ENTRY(ret_from_fork)
  23.139 -	pushl %ebx
  23.140 -	call SYMBOL_NAME(schedule_tail)
  23.141 -	addl $4, %esp
  23.142 -	GET_CURRENT(%ebx)
  23.143 -	testb $0x02,tsk_ptrace(%ebx)	# PT_TRACESYS
  23.144 -	jne tracesys_exit
  23.145 -	jmp	ret_from_sys_call
  23.146 -
  23.147 -#if defined(CONFIG_KDB)
  23.148 -ENTRY(kdb_call)
  23.149 -	pushl %eax              # save orig EAX
  23.150 -	SAVE_ALL
  23.151 -	pushl %esp              # struct pt_regs
  23.152 -	pushl $0                # error_code
  23.153 -	pushl $7                # KDB_REASON_ENTRY
  23.154 -	call  SYMBOL_NAME(kdb)
  23.155 -	addl  $12,%esp          # remove args
  23.156 -	RESTORE_ALL
  23.157 -#endif
  23.158 -
  23.159 -/*
  23.160 - * Return to user mode is not as complex as all this looks,
  23.161 - * but we want the default path for a system call return to
  23.162 - * go as quickly as possible which is why some of this is
  23.163 - * less clear than it otherwise should be.
  23.164 - */
  23.165 -
  23.166 -ENTRY(system_call)
  23.167 -	pushl %eax			# save orig_eax
  23.168 -	SAVE_ALL
  23.169 -	GET_CURRENT(%ebx)
  23.170 -        testb $0x02,tsk_ptrace(%ebx)	# PT_TRACESYS
  23.171 -	jne tracesys
  23.172 -	cmpl $(NR_syscalls),%eax
  23.173 -	jae badsys        
  23.174 -        call *SYMBOL_NAME(sys_call_table)(,%eax,4)
  23.175 -	movl %eax,EAX(%esp)		# save the return value
  23.176 -ENTRY(ret_from_sys_call)
  23.177 -        movl SYMBOL_NAME(HYPERVISOR_shared_info),%esi
  23.178 -        xorl %eax,%eax
  23.179 -        movl %eax,4(%esi)               # need_resched and signals atomic test
  23.180 -ret_syscall_tests:      
  23.181 -        cmpl $0,need_resched(%ebx)
  23.182 -	jne reschedule
  23.183 -	cmpl $0,sigpending(%ebx)
  23.184 -	je   safesti                    # ensure need_resched updates are seen
  23.185 -signal_return:
  23.186 -	btsl %eax,4(%esi)               # reenable event callbacks
  23.187 -	movl %esp,%eax
  23.188 -	xorl %edx,%edx
  23.189 -	call SYMBOL_NAME(do_signal)
  23.190 -	jmp  ret_from_sys_call
  23.191 -
  23.192 -        ALIGN
  23.193 -restore_all:
  23.194 -	RESTORE_ALL
  23.195 -
  23.196 -	ALIGN
  23.197 -tracesys:
  23.198 -	movl $-ENOSYS,EAX(%esp)
  23.199 -	call SYMBOL_NAME(syscall_trace)
  23.200 -	movl ORIG_EAX(%esp),%eax
  23.201 -	cmpl $(NR_syscalls),%eax
  23.202 -	jae tracesys_exit
  23.203 -	call *SYMBOL_NAME(sys_call_table)(,%eax,4)
  23.204 -	movl %eax,EAX(%esp)		# save the return value
  23.205 -tracesys_exit:
  23.206 -	call SYMBOL_NAME(syscall_trace)
  23.207 -	jmp ret_from_sys_call
  23.208 -badsys:
  23.209 -	movl $-ENOSYS,EAX(%esp)
  23.210 -	jmp ret_from_sys_call
  23.211 -
  23.212 -	ALIGN
  23.213 -ENTRY(ret_from_intr)
  23.214 -	GET_CURRENT(%ebx)
  23.215 -ret_from_exception:
  23.216 -	movb CS(%esp),%al
  23.217 -	testl $2,%eax
  23.218 -	jne ret_from_sys_call
  23.219 -	jmp restore_all
  23.220 -
  23.221 -	ALIGN
  23.222 -reschedule:
  23.223 -        btsl %eax,4(%esi)             # reenable event callbacks
  23.224 -	call SYMBOL_NAME(schedule)    # test
  23.225 -	jmp ret_from_sys_call
  23.226 -
  23.227 -ENTRY(divide_error)
  23.228 -	pushl $0		# no error code
  23.229 -	pushl $ SYMBOL_NAME(do_divide_error)
  23.230 -	ALIGN
  23.231 -error_code:
  23.232 -	pushl %ds
  23.233 -	pushl %eax
  23.234 -	xorl %eax,%eax
  23.235 -	pushl %ebp
  23.236 -	pushl %edi
  23.237 -	pushl %esi
  23.238 -	pushl %edx
  23.239 -	decl %eax			# eax = -1
  23.240 -	pushl %ecx
  23.241 -	pushl %ebx
  23.242 -	GET_CURRENT(%ebx)
  23.243 -	cld
  23.244 -	movl %es,%ecx
  23.245 -	movl ORIG_EAX(%esp), %esi	# get the error code
  23.246 -	movl ES(%esp), %edi		# get the function address
  23.247 -	movl %eax, ORIG_EAX(%esp)
  23.248 -	movl %ecx, ES(%esp)
  23.249 -	movl %esp,%edx
  23.250 -	pushl %esi			# push the error code
  23.251 -	pushl %edx			# push the pt_regs pointer
  23.252 -	movl $(__KERNEL_DS),%edx
  23.253 -	movl %edx,%ds
  23.254 -	movl %edx,%es
  23.255 -	call *%edi
  23.256 -	addl $8,%esp
  23.257 -	jmp ret_from_exception
  23.258 -
  23.259 -# A note on the "critical region" in our callback handler.
  23.260 -# We want to avoid stacking callback handlers due to events occurring
  23.261 -# during handling of the last event. To do this, we keep events disabled
  23.262 -# until we've done all processing. HOWEVER, we must enable events before
  23.263 -# popping the stack frame (can't be done atomically) and so it would still
  23.264 -# be possible to get enough handler activations to overflow the stack.
  23.265 -# Although unlikely, bugs of that kind are hard to track down, so we'd
  23.266 -# like to avoid the possibility.
  23.267 -# So, on entry to the handler we detect whether we interrupted an
  23.268 -# existing activation in its critical region -- if so, we pop the current
  23.269 -# activation and restart the handler using the previous one.
  23.270 -ENTRY(hypervisor_callback)
  23.271 -        pushl %eax
  23.272 -        SAVE_ALL
  23.273 -        GET_CURRENT(%ebx)
  23.274 -        movl EIP(%esp),%eax
  23.275 -        cmpl $scrit,%eax
  23.276 -        jb   11f
  23.277 -        cmpl $ecrit,%eax
  23.278 -        jb   critical_region_fixup
  23.279 -11:     push %esp
  23.280 -        call do_hypervisor_callback
  23.281 -        add  $4,%esp
  23.282 -        movl SYMBOL_NAME(HYPERVISOR_shared_info),%esi
  23.283 -        xorl %eax,%eax
  23.284 -        movb CS(%esp),%cl
  23.285 -	test $2,%cl          # slow return to ring 2 or 3
  23.286 -	jne  ret_syscall_tests
  23.287 -safesti:btsl %eax,4(%esi)     # reenable event callbacks
  23.288 -scrit:  /**** START OF CRITICAL REGION ****/
  23.289 -        cmpl %eax,(%esi)
  23.290 -        jne  14f              # process more events if necessary...
  23.291 -        RESTORE_ALL
  23.292 -14:     btrl %eax,4(%esi)
  23.293 -        jmp  11b
  23.294 -ecrit:  /**** END OF CRITICAL REGION ****/
  23.295 -# [How we do the fixup]. We want to merge the current stack frame with the
  23.296 -# just-interrupted frame. How we do this depends on where in the critical
  23.297 -# region the interrupted handler was executing, and so how many saved
  23.298 -# registers are in each frame. We do this quickly using the lookup table
  23.299 -# 'critical_fixup_table'. For each byte offset in the critical region, it
  23.300 -# provides the number of bytes which have already been popped from the
  23.301 -# interrupted stack frame. 
  23.302 -critical_region_fixup:
  23.303 -        addl $critical_fixup_table-scrit,%eax
  23.304 -        movzbl (%eax),%eax    # %eax contains num bytes popped
  23.305 -        mov  %esp,%esi
  23.306 -        add  %eax,%esi        # %esi points at end of src region
  23.307 -        mov  %esp,%edi
  23.308 -        add  $0x34,%edi       # %edi points at end of dst region
  23.309 -        mov  %eax,%ecx
  23.310 -        shr  $2,%ecx          # convert words to bytes
  23.311 -        je   16f              # skip loop if nothing to copy
  23.312 -15:     subl $4,%esi          # pre-decrementing copy loop
  23.313 -        subl $4,%edi
  23.314 -        movl (%esi),%eax
  23.315 -        movl %eax,(%edi)
  23.316 -        loop 15b
  23.317 -16:     movl %edi,%esp        # final %edi is top of merged stack
  23.318 -        jmp  11b
  23.319 -        
  23.320 -critical_fixup_table:        
  23.321 -        .byte 0x00,0x00                       # cmpl %eax,(%esi)
  23.322 -        .byte 0x00,0x00                       # jne  14f
  23.323 -        .byte 0x00                            # pop  %ebx
  23.324 -        .byte 0x04                            # pop  %ecx
  23.325 -        .byte 0x08                            # pop  %edx
  23.326 -        .byte 0x0c                            # pop  %esi
  23.327 -        .byte 0x10                            # pop  %edi
  23.328 -        .byte 0x14                            # pop  %ebp
  23.329 -        .byte 0x18                            # pop  %eax
  23.330 -        .byte 0x1c                            # pop  %ds
  23.331 -        .byte 0x20                            # pop  %es
  23.332 -        .byte 0x24,0x24,0x24                  # add  $4,%esp
  23.333 -        .byte 0x28                            # iret
  23.334 -        .byte 0x00,0x00,0x00,0x00             # btrl %eax,4(%esi)
  23.335 -        .byte 0x00,0x00                       # jmp  11b
  23.336 -
  23.337 -# Hypervisor uses this for application faults while it executes.
  23.338 -ENTRY(failsafe_callback)
  23.339 -1:      pop  %ds
  23.340 -2:      pop  %es
  23.341 -3:      iret
  23.342 -.section .fixup,"ax";	\
  23.343 -4:	movl $0,(%esp);	\
  23.344 -	jmp 1b;		\
  23.345 -5:	movl $0,(%esp);	\
  23.346 -	jmp 2b;		\
  23.347 -6:	pushl %ss;	\
  23.348 -	popl %ds;	\
  23.349 -	pushl %ss;	\
  23.350 -	popl %es;	\
  23.351 -	pushl $11;	\
  23.352 -	call do_exit;	\
  23.353 -.previous;		\
  23.354 -.section __ex_table,"a";\
  23.355 -	.align 4;	\
  23.356 -	.long 1b,4b;	\
  23.357 -	.long 2b,5b;	\
  23.358 -	.long 3b,6b;	\
  23.359 -.previous
  23.360 -        
  23.361 -ENTRY(coprocessor_error)
  23.362 -	pushl $0
  23.363 -	pushl $ SYMBOL_NAME(do_coprocessor_error)
  23.364 -	jmp error_code
  23.365 -
  23.366 -ENTRY(simd_coprocessor_error)
  23.367 -	pushl $0
  23.368 -	pushl $ SYMBOL_NAME(do_simd_coprocessor_error)
  23.369 -	jmp error_code
  23.370 -
  23.371 -ENTRY(device_not_available)
  23.372 -	pushl $-1		# mark this as an int
  23.373 -	SAVE_ALL
  23.374 -	GET_CURRENT(%ebx)
  23.375 -	call SYMBOL_NAME(math_state_restore)
  23.376 -	jmp ret_from_exception
  23.377 -
  23.378 -ENTRY(debug)
  23.379 -	pushl $0
  23.380 -	pushl $ SYMBOL_NAME(do_debug)
  23.381 -	jmp error_code
  23.382 -
  23.383 -ENTRY(int3)
  23.384 -	pushl $0
  23.385 -	pushl $ SYMBOL_NAME(do_int3)
  23.386 -	jmp error_code
  23.387 -
  23.388 -ENTRY(overflow)
  23.389 -	pushl $0
  23.390 -	pushl $ SYMBOL_NAME(do_overflow)
  23.391 -	jmp error_code
  23.392 -
  23.393 -ENTRY(bounds)
  23.394 -	pushl $0
  23.395 -	pushl $ SYMBOL_NAME(do_bounds)
  23.396 -	jmp error_code
  23.397 -
  23.398 -ENTRY(invalid_op)
  23.399 -	pushl $0
  23.400 -	pushl $ SYMBOL_NAME(do_invalid_op)
  23.401 -	jmp error_code
  23.402 -
  23.403 -ENTRY(coprocessor_segment_overrun)
  23.404 -	pushl $0
  23.405 -	pushl $ SYMBOL_NAME(do_coprocessor_segment_overrun)
  23.406 -	jmp error_code
  23.407 -
  23.408 -ENTRY(double_fault)
  23.409 -	pushl $ SYMBOL_NAME(do_double_fault)
  23.410 -	jmp error_code
  23.411 -
  23.412 -ENTRY(invalid_TSS)
  23.413 -	pushl $ SYMBOL_NAME(do_invalid_TSS)
  23.414 -	jmp error_code
  23.415 -
  23.416 -ENTRY(segment_not_present)
  23.417 -	pushl $ SYMBOL_NAME(do_segment_not_present)
  23.418 -	jmp error_code
  23.419 -
  23.420 -ENTRY(stack_segment)
  23.421 -	pushl $ SYMBOL_NAME(do_stack_segment)
  23.422 -	jmp error_code
  23.423 -
  23.424 -ENTRY(general_protection)
  23.425 -	pushl $ SYMBOL_NAME(do_general_protection)
  23.426 -	jmp error_code
  23.427 -
  23.428 -ENTRY(alignment_check)
  23.429 -	pushl $ SYMBOL_NAME(do_alignment_check)
  23.430 -	jmp error_code
  23.431 -
  23.432 -#if defined(CONFIG_KDB)
  23.433 -ENTRY(page_fault_mca)
  23.434 -	pushl %ecx
  23.435 -	pushl %edx
  23.436 -	pushl %eax
  23.437 -	movl  $473,%ecx
  23.438 -	rdmsr
  23.439 -	andl  $0xfffffffe,%eax		/* Disable last branch recording */
  23.440 -	wrmsr
  23.441 -	popl  %eax
  23.442 -	popl  %edx
  23.443 -	popl  %ecx
  23.444 -	pushl $ SYMBOL_NAME(do_page_fault)
  23.445 -	jmp error_code
  23.446 -#endif
  23.447 -
  23.448 -# This handler is special, because it gets an extra value on its stack,
  23.449 -# which is the linear faulting address.
  23.450 -ENTRY(page_fault)
  23.451 -	pushl %ds
  23.452 -	pushl %eax
  23.453 -	xorl %eax,%eax
  23.454 -	pushl %ebp
  23.455 -	pushl %edi
  23.456 -	pushl %esi
  23.457 -	pushl %edx
  23.458 -	decl %eax			# eax = -1
  23.459 -	pushl %ecx
  23.460 -	pushl %ebx
  23.461 -	GET_CURRENT(%ebx)
  23.462 -	cld
  23.463 -	movl %es,%ecx
  23.464 -	movl ORIG_EAX(%esp), %esi	# get the error code
  23.465 -	movl ES(%esp), %edi		# get the faulting address
  23.466 -	movl %eax, ORIG_EAX(%esp)
  23.467 -	movl %ecx, ES(%esp)
  23.468 -	movl %esp,%edx
  23.469 -        pushl %edi                      # push the faulting address
  23.470 -	pushl %esi			# push the error code
  23.471 -	pushl %edx			# push the pt_regs pointer
  23.472 -	movl $(__KERNEL_DS),%edx
  23.473 -	movl %edx,%ds
  23.474 -	movl %edx,%es
  23.475 -	call SYMBOL_NAME(do_page_fault)
  23.476 -	addl $12,%esp
  23.477 -	jmp ret_from_exception
  23.478 -
  23.479 -ENTRY(machine_check)
  23.480 -	pushl $0
  23.481 -	pushl $ SYMBOL_NAME(do_machine_check)
  23.482 -	jmp error_code
  23.483 -
  23.484 -ENTRY(spurious_interrupt_bug)
  23.485 -	pushl $0
  23.486 -	pushl $ SYMBOL_NAME(do_spurious_interrupt_bug)
  23.487 -	jmp error_code
  23.488 -
  23.489 -.data
  23.490 -ENTRY(sys_call_table)
  23.491 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 0  -  old "setup()" system call*/
  23.492 -	.long SYMBOL_NAME(sys_exit)
  23.493 -	.long SYMBOL_NAME(sys_fork)
  23.494 -	.long SYMBOL_NAME(sys_read)
  23.495 -	.long SYMBOL_NAME(sys_write)
  23.496 -	.long SYMBOL_NAME(sys_open)		/* 5 */
  23.497 -	.long SYMBOL_NAME(sys_close)
  23.498 -	.long SYMBOL_NAME(sys_waitpid)
  23.499 -	.long SYMBOL_NAME(sys_creat)
  23.500 -	.long SYMBOL_NAME(sys_link)
  23.501 -	.long SYMBOL_NAME(sys_unlink)		/* 10 */
  23.502 -	.long SYMBOL_NAME(sys_execve)
  23.503 -	.long SYMBOL_NAME(sys_chdir)
  23.504 -	.long SYMBOL_NAME(sys_time)
  23.505 -	.long SYMBOL_NAME(sys_mknod)
  23.506 -	.long SYMBOL_NAME(sys_chmod)		/* 15 */
  23.507 -	.long SYMBOL_NAME(sys_lchown16)
  23.508 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old break syscall holder */
  23.509 -	.long SYMBOL_NAME(sys_stat)
  23.510 -	.long SYMBOL_NAME(sys_lseek)
  23.511 -	.long SYMBOL_NAME(sys_getpid)		/* 20 */
  23.512 -	.long SYMBOL_NAME(sys_mount)
  23.513 -	.long SYMBOL_NAME(sys_oldumount)
  23.514 -	.long SYMBOL_NAME(sys_setuid16)
  23.515 -	.long SYMBOL_NAME(sys_getuid16)
  23.516 -	.long SYMBOL_NAME(sys_stime)		/* 25 */
  23.517 -	.long SYMBOL_NAME(sys_ptrace)
  23.518 -	.long SYMBOL_NAME(sys_alarm)
  23.519 -	.long SYMBOL_NAME(sys_fstat)
  23.520 -	.long SYMBOL_NAME(sys_pause)
  23.521 -	.long SYMBOL_NAME(sys_utime)		/* 30 */
  23.522 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old stty syscall holder */
  23.523 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old gtty syscall holder */
  23.524 -	.long SYMBOL_NAME(sys_access)
  23.525 -	.long SYMBOL_NAME(sys_nice)
  23.526 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 35 */		/* old ftime syscall holder */
  23.527 -	.long SYMBOL_NAME(sys_sync)
  23.528 -	.long SYMBOL_NAME(sys_kill)
  23.529 -	.long SYMBOL_NAME(sys_rename)
  23.530 -	.long SYMBOL_NAME(sys_mkdir)
  23.531 -	.long SYMBOL_NAME(sys_rmdir)		/* 40 */
  23.532 -	.long SYMBOL_NAME(sys_dup)
  23.533 -	.long SYMBOL_NAME(sys_pipe)
  23.534 -	.long SYMBOL_NAME(sys_times)
  23.535 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old prof syscall holder */
  23.536 -	.long SYMBOL_NAME(sys_brk)		/* 45 */
  23.537 -	.long SYMBOL_NAME(sys_setgid16)
  23.538 -	.long SYMBOL_NAME(sys_getgid16)
  23.539 -	.long SYMBOL_NAME(sys_signal)
  23.540 -	.long SYMBOL_NAME(sys_geteuid16)
  23.541 -	.long SYMBOL_NAME(sys_getegid16)	/* 50 */
  23.542 -	.long SYMBOL_NAME(sys_acct)
  23.543 -	.long SYMBOL_NAME(sys_umount)					/* recycled never used phys() */
  23.544 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old lock syscall holder */
  23.545 -	.long SYMBOL_NAME(sys_ioctl)
  23.546 -	.long SYMBOL_NAME(sys_fcntl)		/* 55 */
  23.547 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old mpx syscall holder */
  23.548 -	.long SYMBOL_NAME(sys_setpgid)
  23.549 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old ulimit syscall holder */
  23.550 -	.long SYMBOL_NAME(sys_olduname)
  23.551 -	.long SYMBOL_NAME(sys_umask)		/* 60 */
  23.552 -	.long SYMBOL_NAME(sys_chroot)
  23.553 -	.long SYMBOL_NAME(sys_ustat)
  23.554 -	.long SYMBOL_NAME(sys_dup2)
  23.555 -	.long SYMBOL_NAME(sys_getppid)
  23.556 -	.long SYMBOL_NAME(sys_getpgrp)		/* 65 */
  23.557 -	.long SYMBOL_NAME(sys_setsid)
  23.558 -	.long SYMBOL_NAME(sys_sigaction)
  23.559 -	.long SYMBOL_NAME(sys_sgetmask)
  23.560 -	.long SYMBOL_NAME(sys_ssetmask)
  23.561 -	.long SYMBOL_NAME(sys_setreuid16)	/* 70 */
  23.562 -	.long SYMBOL_NAME(sys_setregid16)
  23.563 -	.long SYMBOL_NAME(sys_sigsuspend)
  23.564 -	.long SYMBOL_NAME(sys_sigpending)
  23.565 -	.long SYMBOL_NAME(sys_sethostname)
  23.566 -	.long SYMBOL_NAME(sys_setrlimit)	/* 75 */
  23.567 -	.long SYMBOL_NAME(sys_old_getrlimit)
  23.568 -	.long SYMBOL_NAME(sys_getrusage)
  23.569 -	.long SYMBOL_NAME(sys_gettimeofday)
  23.570 -	.long SYMBOL_NAME(sys_settimeofday)
  23.571 -	.long SYMBOL_NAME(sys_getgroups16)	/* 80 */
  23.572 -	.long SYMBOL_NAME(sys_setgroups16)
  23.573 -	.long SYMBOL_NAME(old_select)
  23.574 -	.long SYMBOL_NAME(sys_symlink)
  23.575 -	.long SYMBOL_NAME(sys_lstat)
  23.576 -	.long SYMBOL_NAME(sys_readlink)		/* 85 */
  23.577 -	.long SYMBOL_NAME(sys_uselib)
  23.578 -	.long SYMBOL_NAME(sys_swapon)
  23.579 -	.long SYMBOL_NAME(sys_reboot)
  23.580 -	.long SYMBOL_NAME(old_readdir)
  23.581 -	.long SYMBOL_NAME(old_mmap)		/* 90 */
  23.582 -	.long SYMBOL_NAME(sys_munmap)
  23.583 -	.long SYMBOL_NAME(sys_truncate)
  23.584 -	.long SYMBOL_NAME(sys_ftruncate)
  23.585 -	.long SYMBOL_NAME(sys_fchmod)
  23.586 -	.long SYMBOL_NAME(sys_fchown16)		/* 95 */
  23.587 -	.long SYMBOL_NAME(sys_getpriority)
  23.588 -	.long SYMBOL_NAME(sys_setpriority)
  23.589 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old profil syscall holder */
  23.590 -	.long SYMBOL_NAME(sys_statfs)
  23.591 -	.long SYMBOL_NAME(sys_fstatfs)		/* 100 */
  23.592 -	.long SYMBOL_NAME(sys_ioperm)
  23.593 -	.long SYMBOL_NAME(sys_socketcall)
  23.594 -	.long SYMBOL_NAME(sys_syslog)
  23.595 -	.long SYMBOL_NAME(sys_setitimer)
  23.596 -	.long SYMBOL_NAME(sys_getitimer)	/* 105 */
  23.597 -	.long SYMBOL_NAME(sys_newstat)
  23.598 -	.long SYMBOL_NAME(sys_newlstat)
  23.599 -	.long SYMBOL_NAME(sys_newfstat)
  23.600 -	.long SYMBOL_NAME(sys_uname)
  23.601 -	.long SYMBOL_NAME(sys_iopl)		/* 110 */
  23.602 -	.long SYMBOL_NAME(sys_vhangup)
  23.603 -	.long SYMBOL_NAME(sys_ni_syscall)	/* old "idle" system call */
  23.604 -	.long SYMBOL_NAME(sys_ni_syscall) /* was VM86 */
  23.605 -	.long SYMBOL_NAME(sys_wait4)
  23.606 -	.long SYMBOL_NAME(sys_swapoff)		/* 115 */
  23.607 -	.long SYMBOL_NAME(sys_sysinfo)
  23.608 -	.long SYMBOL_NAME(sys_ipc)
  23.609 -	.long SYMBOL_NAME(sys_fsync)
  23.610 -	.long SYMBOL_NAME(sys_sigreturn)
  23.611 -	.long SYMBOL_NAME(sys_clone)		/* 120 */
  23.612 -	.long SYMBOL_NAME(sys_setdomainname)
  23.613 -	.long SYMBOL_NAME(sys_newuname)
  23.614 -	.long SYMBOL_NAME(sys_modify_ldt)
  23.615 -	.long SYMBOL_NAME(sys_adjtimex)
  23.616 -	.long SYMBOL_NAME(sys_mprotect)		/* 125 */
  23.617 -	.long SYMBOL_NAME(sys_sigprocmask)
  23.618 -	.long SYMBOL_NAME(sys_create_module)
  23.619 -	.long SYMBOL_NAME(sys_init_module)
  23.620 -	.long SYMBOL_NAME(sys_delete_module)
  23.621 -	.long SYMBOL_NAME(sys_get_kernel_syms)	/* 130 */
  23.622 -	.long SYMBOL_NAME(sys_quotactl)
  23.623 -	.long SYMBOL_NAME(sys_getpgid)
  23.624 -	.long SYMBOL_NAME(sys_fchdir)
  23.625 -	.long SYMBOL_NAME(sys_bdflush)
  23.626 -	.long SYMBOL_NAME(sys_sysfs)		/* 135 */
  23.627 -	.long SYMBOL_NAME(sys_personality)
  23.628 -	.long SYMBOL_NAME(sys_ni_syscall)	/* for afs_syscall */
  23.629 -	.long SYMBOL_NAME(sys_setfsuid16)
  23.630 -	.long SYMBOL_NAME(sys_setfsgid16)
  23.631 -	.long SYMBOL_NAME(sys_llseek)		/* 140 */
  23.632 -	.long SYMBOL_NAME(sys_getdents)
  23.633 -	.long SYMBOL_NAME(sys_select)
  23.634 -	.long SYMBOL_NAME(sys_flock)
  23.635 -	.long SYMBOL_NAME(sys_msync)
  23.636 -	.long SYMBOL_NAME(sys_readv)		/* 145 */
  23.637 -	.long SYMBOL_NAME(sys_writev)
  23.638 -	.long SYMBOL_NAME(sys_getsid)
  23.639 -	.long SYMBOL_NAME(sys_fdatasync)
  23.640 -	.long SYMBOL_NAME(sys_sysctl)
  23.641 -	.long SYMBOL_NAME(sys_mlock)		/* 150 */
  23.642 -	.long SYMBOL_NAME(sys_munlock)
  23.643 -	.long SYMBOL_NAME(sys_mlockall)
  23.644 -	.long SYMBOL_NAME(sys_munlockall)
  23.645 -	.long SYMBOL_NAME(sys_sched_setparam)
  23.646 -	.long SYMBOL_NAME(sys_sched_getparam)   /* 155 */
  23.647 -	.long SYMBOL_NAME(sys_sched_setscheduler)
  23.648 -	.long SYMBOL_NAME(sys_sched_getscheduler)
  23.649 -	.long SYMBOL_NAME(sys_sched_yield)
  23.650 -	.long SYMBOL_NAME(sys_sched_get_priority_max)
  23.651 -	.long SYMBOL_NAME(sys_sched_get_priority_min)  /* 160 */
  23.652 -	.long SYMBOL_NAME(sys_sched_rr_get_interval)
  23.653 -	.long SYMBOL_NAME(sys_nanosleep)
  23.654 -	.long SYMBOL_NAME(sys_mremap)
  23.655 -	.long SYMBOL_NAME(sys_setresuid16)
  23.656 -	.long SYMBOL_NAME(sys_getresuid16)	/* 165 */
  23.657 -	.long SYMBOL_NAME(sys_ni_syscall) /* was VM86 */
  23.658 -	.long SYMBOL_NAME(sys_query_module)
  23.659 -	.long SYMBOL_NAME(sys_poll)
  23.660 -	.long SYMBOL_NAME(sys_nfsservctl)
  23.661 -	.long SYMBOL_NAME(sys_setresgid16)	/* 170 */
  23.662 -	.long SYMBOL_NAME(sys_getresgid16)
  23.663 -	.long SYMBOL_NAME(sys_prctl)
  23.664 -	.long SYMBOL_NAME(sys_rt_sigreturn)
  23.665 -	.long SYMBOL_NAME(sys_rt_sigaction)
  23.666 -	.long SYMBOL_NAME(sys_rt_sigprocmask)	/* 175 */
  23.667 -	.long SYMBOL_NAME(sys_rt_sigpending)
  23.668 -	.long SYMBOL_NAME(sys_rt_sigtimedwait)
  23.669 -	.long SYMBOL_NAME(sys_rt_sigqueueinfo)
  23.670 -	.long SYMBOL_NAME(sys_rt_sigsuspend)
  23.671 -	.long SYMBOL_NAME(sys_pread)		/* 180 */
  23.672 -	.long SYMBOL_NAME(sys_pwrite)
  23.673 -	.long SYMBOL_NAME(sys_chown16)
  23.674 -	.long SYMBOL_NAME(sys_getcwd)
  23.675 -	.long SYMBOL_NAME(sys_capget)
  23.676 -	.long SYMBOL_NAME(sys_capset)           /* 185 */
  23.677 -	.long SYMBOL_NAME(sys_sigaltstack)
  23.678 -	.long SYMBOL_NAME(sys_sendfile)
  23.679 -	.long SYMBOL_NAME(sys_ni_syscall)		/* streams1 */
  23.680 -	.long SYMBOL_NAME(sys_ni_syscall)		/* streams2 */
  23.681 -	.long SYMBOL_NAME(sys_vfork)            /* 190 */
  23.682 -	.long SYMBOL_NAME(sys_getrlimit)
  23.683 -	.long SYMBOL_NAME(sys_mmap2)
  23.684 -	.long SYMBOL_NAME(sys_truncate64)
  23.685 -	.long SYMBOL_NAME(sys_ftruncate64)
  23.686 -	.long SYMBOL_NAME(sys_stat64)		/* 195 */
  23.687 -	.long SYMBOL_NAME(sys_lstat64)
  23.688 -	.long SYMBOL_NAME(sys_fstat64)
  23.689 -	.long SYMBOL_NAME(sys_lchown)
  23.690 -	.long SYMBOL_NAME(sys_getuid)
  23.691 -	.long SYMBOL_NAME(sys_getgid)		/* 200 */
  23.692 -	.long SYMBOL_NAME(sys_geteuid)
  23.693 -	.long SYMBOL_NAME(sys_getegid)
  23.694 -	.long SYMBOL_NAME(sys_setreuid)
  23.695 -	.long SYMBOL_NAME(sys_setregid)
  23.696 -	.long SYMBOL_NAME(sys_getgroups)	/* 205 */
  23.697 -	.long SYMBOL_NAME(sys_setgroups)
  23.698 -	.long SYMBOL_NAME(sys_fchown)
  23.699 -	.long SYMBOL_NAME(sys_setresuid)
  23.700 -	.long SYMBOL_NAME(sys_getresuid)
  23.701 -	.long SYMBOL_NAME(sys_setresgid)	/* 210 */
  23.702 -	.long SYMBOL_NAME(sys_getresgid)
  23.703 -	.long SYMBOL_NAME(sys_chown)
  23.704 -	.long SYMBOL_NAME(sys_setuid)
  23.705 -	.long SYMBOL_NAME(sys_setgid)
  23.706 -	.long SYMBOL_NAME(sys_setfsuid)		/* 215 */
  23.707 -	.long SYMBOL_NAME(sys_setfsgid)
  23.708 -	.long SYMBOL_NAME(sys_pivot_root)
  23.709 -	.long SYMBOL_NAME(sys_mincore)
  23.710 -	.long SYMBOL_NAME(sys_madvise)
  23.711 -	.long SYMBOL_NAME(sys_getdents64)	/* 220 */
  23.712 -	.long SYMBOL_NAME(sys_fcntl64)
  23.713 -	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for TUX */
  23.714 -	.long SYMBOL_NAME(sys_ni_syscall)	/* Reserved for Security */
  23.715 -	.long SYMBOL_NAME(sys_gettid)
  23.716 -	.long SYMBOL_NAME(sys_readahead)	/* 225 */
  23.717 -
  23.718 -	.rept NR_syscalls-(.-sys_call_table)/4
  23.719 -		.long SYMBOL_NAME(sys_ni_syscall)
  23.720 -	.endr
    24.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/head.S	Tue Mar 25 11:15:01 2003 +0000
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,67 +0,0 @@
    24.4 -
    24.5 -.text
    24.6 -#include <linux/config.h>
    24.7 -#include <linux/threads.h>
    24.8 -#include <linux/linkage.h>
    24.9 -#include <asm/segment.h>
   24.10 -#include <asm/page.h>
   24.11 -#include <asm/pgtable.h>
   24.12 -#include <asm/desc.h>
   24.13 -
   24.14 -/* Offsets in start_info structure */
   24.15 -#define SHARED_INFO  4
   24.16 -#define MOD_START   12
   24.17 -#define MOD_LEN     16
   24.18 -                
   24.19 -startup_32:
   24.20 -        cld
   24.21 -        
   24.22 -        lss stack_start,%esp
   24.23 -
   24.24 -        /* Copy initrd somewhere safe before it's clobbered by BSS. */
   24.25 -        mov  MOD_LEN(%esi),%ecx
   24.26 -        shr  $2,%ecx
   24.27 -        jz   2f        /* bail from copy loop if no initrd */
   24.28 -        mov  $SYMBOL_NAME(_end),%edi
   24.29 -        add  MOD_LEN(%esi),%edi
   24.30 -        mov  MOD_START(%esi),%eax
   24.31 -        add  MOD_LEN(%esi),%eax
   24.32 -1:      sub  $4,%eax
   24.33 -        sub  $4,%edi
   24.34 -        mov  (%eax),%ebx
   24.35 -        mov  %ebx,(%edi)
   24.36 -        loop 1b
   24.37 -        mov  %edi,MOD_START(%esi)
   24.38 -                
   24.39 -        /* Clear BSS first so that there are no surprises... */
   24.40 -2:      xorl %eax,%eax
   24.41 -	movl $SYMBOL_NAME(__bss_start),%edi
   24.42 -	movl $SYMBOL_NAME(_end),%ecx
   24.43 -	subl %edi,%ecx
   24.44 -	rep stosb
   24.45 -
   24.46 -        /* Copy the necessary stuff from start_info structure. */
   24.47 -        /* We need to copy shared_info early, so that sti/cli work */
   24.48 -        mov  SHARED_INFO(%esi),%eax
   24.49 -        mov  %eax,SYMBOL_NAME(HYPERVISOR_shared_info)
   24.50 -        mov  $SYMBOL_NAME(start_info_union),%edi
   24.51 -        mov  $128,%ecx
   24.52 -        rep movsl
   24.53 -                
   24.54 -        jmp SYMBOL_NAME(start_kernel)
   24.55 -
   24.56 -ENTRY(stack_start)
   24.57 -	.long SYMBOL_NAME(init_task_union)+8192, __KERNEL_DS
   24.58 -
   24.59 -.org 0x1000
   24.60 -ENTRY(empty_zero_page)
   24.61 -
   24.62 -.org 0x2000
   24.63 -ENTRY(cpu0_pte_quicklist)
   24.64 -
   24.65 -.org 0x2400
   24.66 -ENTRY(cpu0_pgd_quicklist)
   24.67 -        
   24.68 -.org 0x2800
   24.69 -ENTRY(stext)
   24.70 -ENTRY(_stext)
    25.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/hypervisor.c	Tue Mar 25 11:15:01 2003 +0000
    25.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.3 @@ -1,118 +0,0 @@
    25.4 -/******************************************************************************
    25.5 - * hypervisor.c
    25.6 - * 
    25.7 - * Communication to/from hypervisor.
    25.8 - * 
    25.9 - * Copyright (c) 2002, K A Fraser
   25.10 - */
   25.11 -
   25.12 -#include <linux/config.h>
   25.13 -#include <asm/atomic.h>
   25.14 -#include <linux/irq.h>
   25.15 -#include <asm/hypervisor.h>
   25.16 -#include <asm/system.h>
   25.17 -#include <asm/ptrace.h>
   25.18 -
   25.19 -static unsigned long event_mask = 0;
   25.20 -
   25.21 -void frobb(void) {}
   25.22 -
   25.23 -void do_hypervisor_callback(struct pt_regs *regs)
   25.24 -{
   25.25 -    unsigned long events, flags;
   25.26 -    shared_info_t *shared = HYPERVISOR_shared_info;
   25.27 -
   25.28 -    do {
   25.29 -        /* Specialised local_irq_save(). */
   25.30 -        flags = shared->events_enable;
   25.31 -        shared->events_enable = 0;
   25.32 -        barrier();
   25.33 -
   25.34 -        events  = xchg(&shared->events, 0);
   25.35 -        events &= event_mask;
   25.36 -
   25.37 -        __asm__ __volatile__ (
   25.38 -            "   push %1                            ;"
   25.39 -            "   sub  $4,%%esp                      ;"
   25.40 -            "   jmp  2f                            ;"
   25.41 -            "1: btrl %%eax,%0                      ;" /* clear bit     */
   25.42 -            "   mov  %%eax,(%%esp)                 ;"
   25.43 -            "   call do_IRQ                        ;" /* do_IRQ(event) */
   25.44 -            "2: bsfl %0,%%eax                      ;" /* %eax == bit # */
   25.45 -            "   jnz  1b                            ;"
   25.46 -            "   add  $8,%%esp                      ;"
   25.47 -            /* we use %ebx because it is callee-saved */
   25.48 -            : : "b" (events), "r" (regs)
   25.49 -            /* clobbered by callback function calls */
   25.50 -            : "eax", "ecx", "edx", "memory" ); 
   25.51 -
   25.52 -        /* Specialised local_irq_restore(). */
   25.53 -        shared->events_enable = flags;
   25.54 -        barrier();
   25.55 -    }
   25.56 -    while ( shared->events );
   25.57 -}
   25.58 -
   25.59 -
   25.60 -
   25.61 -/*
   25.62 - * Define interface to generic handling in irq.c
   25.63 - */
   25.64 -
   25.65 -static unsigned int startup_hypervisor_event(unsigned int irq)
   25.66 -{
   25.67 -    set_bit(irq, &event_mask);
   25.68 -    return 0;
   25.69 -}
   25.70 -
   25.71 -static void shutdown_hypervisor_event(unsigned int irq)
   25.72 -{
   25.73 -    clear_bit(irq, &event_mask);
   25.74 -}
   25.75 -
   25.76 -static void enable_hypervisor_event(unsigned int irq)
   25.77 -{
   25.78 -    set_bit(irq, &event_mask);
   25.79 -}
   25.80 -
   25.81 -static void disable_hypervisor_event(unsigned int irq)
   25.82 -{
   25.83 -    clear_bit(irq, &event_mask);
   25.84 -}
   25.85 -
   25.86 -static void ack_hypervisor_event(unsigned int irq)
   25.87 -{
   25.88 -    if ( !(event_mask & (1<<irq)) )
   25.89 -    {
   25.90 -        printk("Unexpected hypervisor event %d\n", irq);
   25.91 -        atomic_inc(&irq_err_count);
   25.92 -    }
   25.93 -}
   25.94 -
   25.95 -static void end_hypervisor_event(unsigned int irq)
   25.96 -{
   25.97 -}
   25.98 -
   25.99 -static struct hw_interrupt_type hypervisor_irq_type = {
  25.100 -    "Hypervisor-event",
  25.101 -    startup_hypervisor_event,
  25.102 -    shutdown_hypervisor_event,
  25.103 -    enable_hypervisor_event,
  25.104 -    disable_hypervisor_event,
  25.105 -    ack_hypervisor_event,
  25.106 -    end_hypervisor_event,
  25.107 -    NULL
  25.108 -};
  25.109 -
  25.110 -void __init init_IRQ(void)
  25.111 -{
  25.112 -    int i;
  25.113 -
  25.114 -    for ( i = 0; i < NR_IRQS; i++ )
  25.115 -    {
  25.116 -        irq_desc[i].status  = IRQ_DISABLED;
  25.117 -        irq_desc[i].action  = 0;
  25.118 -        irq_desc[i].depth   = 1;
  25.119 -        irq_desc[i].handler = &hypervisor_irq_type;
  25.120 -    }
  25.121 -}
    26.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/i386_ksyms.c	Tue Mar 25 11:15:01 2003 +0000
    26.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.3 @@ -1,144 +0,0 @@
    26.4 -#include <linux/config.h>
    26.5 -#include <linux/module.h>
    26.6 -#include <linux/smp.h>
    26.7 -#include <linux/user.h>
    26.8 -#include <linux/elfcore.h>
    26.9 -#include <linux/mca.h>
   26.10 -#include <linux/sched.h>
   26.11 -#include <linux/in6.h>
   26.12 -#include <linux/interrupt.h>
   26.13 -#include <linux/smp_lock.h>
   26.14 -#include <linux/pm.h>
   26.15 -#include <linux/pci.h>
   26.16 -#include <linux/apm_bios.h>
   26.17 -#include <linux/kernel.h>
   26.18 -#include <linux/string.h>
   26.19 -#include <linux/tty.h>
   26.20 -
   26.21 -#include <asm/semaphore.h>
   26.22 -#include <asm/processor.h>
   26.23 -#include <asm/i387.h>
   26.24 -#include <asm/uaccess.h>
   26.25 -#include <asm/checksum.h>
   26.26 -#include <asm/io.h>
   26.27 -#include <asm/hardirq.h>
   26.28 -#include <asm/delay.h>
   26.29 -#include <asm/irq.h>
   26.30 -#include <asm/mmx.h>
   26.31 -#include <asm/desc.h>
   26.32 -#include <asm/pgtable.h>
   26.33 -#include <asm/pgalloc.h>
   26.34 -
   26.35 -extern void dump_thread(struct pt_regs *, struct user *);
   26.36 -extern spinlock_t rtc_lock;
   26.37 -
   26.38 -#ifdef CONFIG_SMP
   26.39 -extern void FASTCALL( __write_lock_failed(rwlock_t *rw));
   26.40 -extern void FASTCALL( __read_lock_failed(rwlock_t *rw));
   26.41 -#endif
   26.42 -
   26.43 -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
   26.44 -extern struct drive_info_struct drive_info;
   26.45 -EXPORT_SYMBOL(drive_info);
   26.46 -#endif
   26.47 -
   26.48 -//extern unsigned long get_cmos_time(void);
   26.49 -
   26.50 -/* platform dependent support */
   26.51 -EXPORT_SYMBOL(boot_cpu_data);
   26.52 -EXPORT_SYMBOL(MCA_bus);
   26.53 -EXPORT_SYMBOL(__verify_write);
   26.54 -EXPORT_SYMBOL(dump_thread);
   26.55 -EXPORT_SYMBOL(dump_fpu);
   26.56 -EXPORT_SYMBOL(dump_extended_fpu);
   26.57 -EXPORT_SYMBOL(enable_irq);
   26.58 -EXPORT_SYMBOL(disable_irq);
   26.59 -EXPORT_SYMBOL(disable_irq_nosync);
   26.60 -EXPORT_SYMBOL(probe_irq_mask);
   26.61 -EXPORT_SYMBOL(kernel_thread);
   26.62 -EXPORT_SYMBOL(pm_idle);
   26.63 -EXPORT_SYMBOL(pm_power_off);
   26.64 -//EXPORT_SYMBOL(get_cmos_time);
   26.65 -EXPORT_SYMBOL(apm_info);
   26.66 -
   26.67 -#ifdef CONFIG_DEBUG_IOVIRT
   26.68 -EXPORT_SYMBOL(__io_virt_debug);
   26.69 -#endif
   26.70 -
   26.71 -EXPORT_SYMBOL_NOVERS(__down_failed);
   26.72 -EXPORT_SYMBOL_NOVERS(__down_failed_interruptible);
   26.73 -EXPORT_SYMBOL_NOVERS(__down_failed_trylock);
   26.74 -EXPORT_SYMBOL_NOVERS(__up_wakeup);
   26.75 -/* Networking helper routines. */
   26.76 -EXPORT_SYMBOL(csum_partial_copy_generic);
   26.77 -/* Delay loops */
   26.78 -EXPORT_SYMBOL(__udelay);
   26.79 -EXPORT_SYMBOL(__delay);
   26.80 -EXPORT_SYMBOL(__const_udelay);
   26.81 -
   26.82 -EXPORT_SYMBOL_NOVERS(__get_user_1);
   26.83 -EXPORT_SYMBOL_NOVERS(__get_user_2);
   26.84 -EXPORT_SYMBOL_NOVERS(__get_user_4);
   26.85 -
   26.86 -EXPORT_SYMBOL(strtok);
   26.87 -EXPORT_SYMBOL(strpbrk);
   26.88 -EXPORT_SYMBOL(simple_strtol);
   26.89 -EXPORT_SYMBOL(strstr);
   26.90 -
   26.91 -EXPORT_SYMBOL(strncpy_from_user);
   26.92 -EXPORT_SYMBOL(__strncpy_from_user);
   26.93 -EXPORT_SYMBOL(clear_user);
   26.94 -EXPORT_SYMBOL(__clear_user);
   26.95 -EXPORT_SYMBOL(__generic_copy_from_user);
   26.96 -EXPORT_SYMBOL(__generic_copy_to_user);
   26.97 -EXPORT_SYMBOL(strnlen_user);
   26.98 -
   26.99 -#ifdef CONFIG_X86_USE_3DNOW
  26.100 -EXPORT_SYMBOL(_mmx_memcpy);
  26.101 -EXPORT_SYMBOL(mmx_clear_page);
  26.102 -EXPORT_SYMBOL(mmx_copy_page);
  26.103 -#endif
  26.104 -
  26.105 -#ifdef CONFIG_SMP
  26.106 -EXPORT_SYMBOL(cpu_data);
  26.107 -EXPORT_SYMBOL(kernel_flag);
  26.108 -EXPORT_SYMBOL(smp_num_cpus);
  26.109 -EXPORT_SYMBOL(cpu_online_map);
  26.110 -EXPORT_SYMBOL_NOVERS(__write_lock_failed);
  26.111 -EXPORT_SYMBOL_NOVERS(__read_lock_failed);
  26.112 -
  26.113 -/* Global SMP irq stuff */
  26.114 -EXPORT_SYMBOL(synchronize_irq);
  26.115 -EXPORT_SYMBOL(global_irq_holder);
  26.116 -EXPORT_SYMBOL(__global_cli);
  26.117 -EXPORT_SYMBOL(__global_sti);
  26.118 -EXPORT_SYMBOL(__global_save_flags);
  26.119 -EXPORT_SYMBOL(__global_restore_flags);
  26.120 -EXPORT_SYMBOL(smp_call_function);
  26.121 -
  26.122 -/* TLB flushing */
  26.123 -EXPORT_SYMBOL(flush_tlb_page);
  26.124 -#endif
  26.125 -
  26.126 -#ifdef CONFIG_VT
  26.127 -EXPORT_SYMBOL(screen_info);
  26.128 -#endif
  26.129 -
  26.130 -EXPORT_SYMBOL(get_wchan);
  26.131 -
  26.132 -EXPORT_SYMBOL(rtc_lock);
  26.133 -
  26.134 -#undef memcpy
  26.135 -#undef memset
  26.136 -extern void * memset(void *,int,__kernel_size_t);
  26.137 -extern void * memcpy(void *,const void *,__kernel_size_t);
  26.138 -EXPORT_SYMBOL_NOVERS(memcpy);
  26.139 -EXPORT_SYMBOL_NOVERS(memset);
  26.140 -
  26.141 -#ifdef CONFIG_HAVE_DEC_LOCK
  26.142 -EXPORT_SYMBOL(atomic_dec_and_lock);
  26.143 -#endif
  26.144 -
  26.145 -#ifdef CONFIG_DEBUG_BUGVERBOSE
  26.146 -EXPORT_SYMBOL(do_BUG);
  26.147 -#endif
    27.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/i387.c	Tue Mar 25 11:15:01 2003 +0000
    27.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.3 @@ -1,518 +0,0 @@
    27.4 -/*
    27.5 - *  linux/arch/i386/kernel/i387.c
    27.6 - *
    27.7 - *  Copyright (C) 1994 Linus Torvalds
    27.8 - *
    27.9 - *  Pentium III FXSR, SSE support
   27.10 - *  General FPU state handling cleanups
   27.11 - *	Gareth Hughes <gareth@valinux.com>, May 2000
   27.12 - */
   27.13 -
   27.14 -#include <linux/config.h>
   27.15 -#include <linux/sched.h>
   27.16 -#include <asm/processor.h>
   27.17 -#include <asm/i387.h>
   27.18 -#include <asm/math_emu.h>
   27.19 -#include <asm/sigcontext.h>
   27.20 -#include <asm/user.h>
   27.21 -#include <asm/ptrace.h>
   27.22 -#include <asm/uaccess.h>
   27.23 -
   27.24 -#define HAVE_HWFP 1
   27.25 -
   27.26 -/*
   27.27 - * The _current_ task is using the FPU for the first time
   27.28 - * so initialize it and set the mxcsr to its default
   27.29 - * value at reset if we support XMM instructions and then
   27.30 - * remeber the current task has used the FPU.
   27.31 - */
   27.32 -void init_fpu(void)
   27.33 -{
   27.34 -	__asm__("fninit");
   27.35 -	if ( cpu_has_xmm )
   27.36 -		load_mxcsr(0x1f80);
   27.37 -		
   27.38 -	current->used_math = 1;
   27.39 -}
   27.40 -
   27.41 -/*
   27.42 - * FPU lazy state save handling.
   27.43 - */
   27.44 -
   27.45 -static inline void __save_init_fpu( struct task_struct *tsk )
   27.46 -{
   27.47 -	if ( cpu_has_fxsr ) {
   27.48 -		asm volatile( "fxsave %0 ; fnclex"
   27.49 -			      : "=m" (tsk->thread.i387.fxsave) );
   27.50 -	} else {
   27.51 -		asm volatile( "fnsave %0 ; fwait"
   27.52 -			      : "=m" (tsk->thread.i387.fsave) );
   27.53 -	}
   27.54 -	tsk->flags &= ~PF_USEDFPU;
   27.55 -}
   27.56 -
   27.57 -void save_init_fpu( struct task_struct *tsk )
   27.58 -{
   27.59 -	__save_init_fpu(tsk);
   27.60 -	stts();
   27.61 -}
   27.62 -
   27.63 -void kernel_fpu_begin(void)
   27.64 -{
   27.65 -	struct task_struct *tsk = current;
   27.66 -
   27.67 -	if (tsk->flags & PF_USEDFPU) {
   27.68 -		__save_init_fpu(tsk);
   27.69 -		return;
   27.70 -	}
   27.71 -	clts();
   27.72 -}
   27.73 -
   27.74 -void restore_fpu( struct task_struct *tsk )
   27.75 -{
   27.76 -	if ( cpu_has_fxsr ) {
   27.77 -		asm volatile( "fxrstor %0"
   27.78 -			      : : "m" (tsk->thread.i387.fxsave) );
   27.79 -	} else {
   27.80 -		asm volatile( "frstor %0"
   27.81 -			      : : "m" (tsk->thread.i387.fsave) );
   27.82 -	}
   27.83 -}
   27.84 -
   27.85 -/*
   27.86 - * FPU tag word conversions.
   27.87 - */
   27.88 -
   27.89 -static inline unsigned short twd_i387_to_fxsr( unsigned short twd )
   27.90 -{
   27.91 -	unsigned int tmp; /* to avoid 16 bit prefixes in the code */
   27.92 - 
   27.93 -	/* Transform each pair of bits into 01 (valid) or 00 (empty) */
   27.94 -        tmp = ~twd;
   27.95 -        tmp = (tmp | (tmp>>1)) & 0x5555; /* 0V0V0V0V0V0V0V0V */
   27.96 -        /* and move the valid bits to the lower byte. */
   27.97 -        tmp = (tmp | (tmp >> 1)) & 0x3333; /* 00VV00VV00VV00VV */
   27.98 -        tmp = (tmp | (tmp >> 2)) & 0x0f0f; /* 0000VVVV0000VVVV */
   27.99 -        tmp = (tmp | (tmp >> 4)) & 0x00ff; /* 00000000VVVVVVVV */
  27.100 -        return tmp;
  27.101 -}
  27.102 -
  27.103 -static inline unsigned long twd_fxsr_to_i387( struct i387_fxsave_struct *fxsave )
  27.104 -{
  27.105 -	struct _fpxreg *st = NULL;
  27.106 -	unsigned long twd = (unsigned long) fxsave->twd;
  27.107 -	unsigned long tag;
  27.108 -	unsigned long ret = 0xffff0000;
  27.109 -	int i;
  27.110 -
  27.111 -#define FPREG_ADDR(f, n)	((char *)&(f)->st_space + (n) * 16);
  27.112 -
  27.113 -	for ( i = 0 ; i < 8 ; i++ ) {
  27.114 -		if ( twd & 0x1 ) {
  27.115 -			st = (struct _fpxreg *) FPREG_ADDR( fxsave, i );
  27.116 -
  27.117 -			switch ( st->exponent & 0x7fff ) {
  27.118 -			case 0x7fff:
  27.119 -				tag = 2;		/* Special */
  27.120 -				break;
  27.121 -			case 0x0000:
  27.122 -				if ( !st->significand[0] &&
  27.123 -				     !st->significand[1] &&
  27.124 -				     !st->significand[2] &&
  27.125 -				     !st->significand[3] ) {
  27.126 -					tag = 1;	/* Zero */
  27.127 -				} else {
  27.128 -					tag = 2;	/* Special */
  27.129 -				}
  27.130 -				break;
  27.131 -			default:
  27.132 -				if ( st->significand[3] & 0x8000 ) {
  27.133 -					tag = 0;	/* Valid */
  27.134 -				} else {
  27.135 -					tag = 2;	/* Special */
  27.136 -				}
  27.137 -				break;
  27.138 -			}
  27.139 -		} else {
  27.140 -			tag = 3;			/* Empty */
  27.141 -		}
  27.142 -		ret |= (tag << (2 * i));
  27.143 -		twd = twd >> 1;
  27.144 -	}
  27.145 -	return ret;
  27.146 -}
  27.147 -
  27.148 -/*
  27.149 - * FPU state interaction.
  27.150 - */
  27.151 -
  27.152 -unsigned short get_fpu_cwd( struct task_struct *tsk )
  27.153 -{
  27.154 -	if ( cpu_has_fxsr ) {
  27.155 -		return tsk->thread.i387.fxsave.cwd;
  27.156 -	} else {
  27.157 -		return (unsigned short)tsk->thread.i387.fsave.cwd;
  27.158 -	}
  27.159 -}
  27.160 -
  27.161 -unsigned short get_fpu_swd( struct task_struct *tsk )
  27.162 -{
  27.163 -	if ( cpu_has_fxsr ) {
  27.164 -		return tsk->thread.i387.fxsave.swd;
  27.165 -	} else {
  27.166 -		return (unsigned short)tsk->thread.i387.fsave.swd;
  27.167 -	}
  27.168 -}
  27.169 -
  27.170 -unsigned short get_fpu_twd( struct task_struct *tsk )
  27.171 -{
  27.172 -	if ( cpu_has_fxsr ) {
  27.173 -		return tsk->thread.i387.fxsave.twd;
  27.174 -	} else {
  27.175 -		return (unsigned short)tsk->thread.i387.fsave.twd;
  27.176 -	}
  27.177 -}
  27.178 -
  27.179 -unsigned short get_fpu_mxcsr( struct task_struct *tsk )
  27.180 -{
  27.181 -	if ( cpu_has_xmm ) {
  27.182 -		return tsk->thread.i387.fxsave.mxcsr;
  27.183 -	} else {
  27.184 -		return 0x1f80;
  27.185 -	}
  27.186 -}
  27.187 -
  27.188 -void set_fpu_cwd( struct task_struct *tsk, unsigned short cwd )
  27.189 -{
  27.190 -	if ( cpu_has_fxsr ) {
  27.191 -		tsk->thread.i387.fxsave.cwd = cwd;
  27.192 -	} else {
  27.193 -		tsk->thread.i387.fsave.cwd = ((long)cwd | 0xffff0000);
  27.194 -	}
  27.195 -}
  27.196 -
  27.197 -void set_fpu_swd( struct task_struct *tsk, unsigned short swd )
  27.198 -{
  27.199 -	if ( cpu_has_fxsr ) {
  27.200 -		tsk->thread.i387.fxsave.swd = swd;
  27.201 -	} else {
  27.202 -		tsk->thread.i387.fsave.swd = ((long)swd | 0xffff0000);
  27.203 -	}
  27.204 -}
  27.205 -
  27.206 -void set_fpu_twd( struct task_struct *tsk, unsigned short twd )
  27.207 -{
  27.208 -	if ( cpu_has_fxsr ) {
  27.209 -		tsk->thread.i387.fxsave.twd = twd_i387_to_fxsr(twd);
  27.210 -	} else {
  27.211 -		tsk->thread.i387.fsave.twd = ((long)twd | 0xffff0000);
  27.212 -	}
  27.213 -}
  27.214 -
  27.215 -void set_fpu_mxcsr( struct task_struct *tsk, unsigned short mxcsr )
  27.216 -{
  27.217 -	if ( cpu_has_xmm ) {
  27.218 -		tsk->thread.i387.fxsave.mxcsr = (mxcsr & 0xffbf);
  27.219 -	}
  27.220 -}
  27.221 -
  27.222 -/*
  27.223 - * FXSR floating point environment conversions.
  27.224 - */
  27.225 -
  27.226 -static inline int convert_fxsr_to_user( struct _fpstate *buf,
  27.227 -					struct i387_fxsave_struct *fxsave )
  27.228 -{
  27.229 -	unsigned long env[7];
  27.230 -	struct _fpreg *to;
  27.231 -	struct _fpxreg *from;
  27.232 -	int i;
  27.233 -
  27.234 -	env[0] = (unsigned long)fxsave->cwd | 0xffff0000;
  27.235 -	env[1] = (unsigned long)fxsave->swd | 0xffff0000;
  27.236 -	env[2] = twd_fxsr_to_i387(fxsave);
  27.237 -	env[3] = fxsave->fip;
  27.238 -	env[4] = fxsave->fcs | ((unsigned long)fxsave->fop << 16);
  27.239 -	env[5] = fxsave->foo;
  27.240 -	env[6] = fxsave->fos;
  27.241 -
  27.242 -	if ( __copy_to_user( buf, env, 7 * sizeof(unsigned long) ) )
  27.243 -		return 1;
  27.244 -
  27.245 -	to = &buf->_st[0];
  27.246 -	from = (struct _fpxreg *) &fxsave->st_space[0];
  27.247 -	for ( i = 0 ; i < 8 ; i++, to++, from++ ) {
  27.248 -		if ( __copy_to_user( to, from, sizeof(*to) ) )
  27.249 -			return 1;
  27.250 -	}
  27.251 -	return 0;
  27.252 -}
  27.253 -
  27.254 -static inline int convert_fxsr_from_user( struct i387_fxsave_struct *fxsave,
  27.255 -					  struct _fpstate *buf )
  27.256 -{
  27.257 -	unsigned long env[7];
  27.258 -	struct _fpxreg *to;
  27.259 -	struct _fpreg *from;
  27.260 -	int i;
  27.261 -
  27.262 -	if ( __copy_from_user( env, buf, 7 * sizeof(long) ) )
  27.263 -		return 1;
  27.264 -
  27.265 -	fxsave->cwd = (unsigned short)(env[0] & 0xffff);
  27.266 -	fxsave->swd = (unsigned short)(env[1] & 0xffff);
  27.267 -	fxsave->twd = twd_i387_to_fxsr((unsigned short)(env[2] & 0xffff));
  27.268 -	fxsave->fip = env[3];
  27.269 -	fxsave->fop = (unsigned short)((env[4] & 0xffff0000) >> 16);
  27.270 -	fxsave->fcs = (env[4] & 0xffff);
  27.271 -	fxsave->foo = env[5];
  27.272 -	fxsave->fos = env[6];
  27.273 -
  27.274 -	to = (struct _fpxreg *) &fxsave->st_space[0];
  27.275 -	from = &buf->_st[0];
  27.276 -	for ( i = 0 ; i < 8 ; i++, to++, from++ ) {
  27.277 -		if ( __copy_from_user( to, from, sizeof(*from) ) )
  27.278 -			return 1;
  27.279 -	}
  27.280 -	return 0;
  27.281 -}
  27.282 -
  27.283 -/*
  27.284 - * Signal frame handlers.
  27.285 - */
  27.286 -
  27.287 -static inline int save_i387_fsave( struct _fpstate *buf )
  27.288 -{
  27.289 -	struct task_struct *tsk = current;
  27.290 -
  27.291 -	unlazy_fpu( tsk );
  27.292 -	tsk->thread.i387.fsave.status = tsk->thread.i387.fsave.swd;
  27.293 -	if ( __copy_to_user( buf, &tsk->thread.i387.fsave,
  27.294 -			     sizeof(struct i387_fsave_struct) ) )
  27.295 -		return -1;
  27.296 -	return 1;
  27.297 -}
  27.298 -
  27.299 -static inline int save_i387_fxsave( struct _fpstate *buf )
  27.300 -{
  27.301 -	struct task_struct *tsk = current;
  27.302 -	int err = 0;
  27.303 -
  27.304 -	unlazy_fpu( tsk );
  27.305 -
  27.306 -	if ( convert_fxsr_to_user( buf, &tsk->thread.i387.fxsave ) )
  27.307 -		return -1;
  27.308 -
  27.309 -	err |= __put_user( tsk->thread.i387.fxsave.swd, &buf->status );
  27.310 -	err |= __put_user( X86_FXSR_MAGIC, &buf->magic );
  27.311 -	if ( err )
  27.312 -		return -1;
  27.313 -
  27.314 -	if ( __copy_to_user( &buf->_fxsr_env[0], &tsk->thread.i387.fxsave,
  27.315 -			     sizeof(struct i387_fxsave_struct) ) )
  27.316 -		return -1;
  27.317 -	return 1;
  27.318 -}
  27.319 -
  27.320 -int save_i387( struct _fpstate *buf )
  27.321 -{
  27.322 -	if ( !current->used_math )
  27.323 -		return 0;
  27.324 -
  27.325 -	/* This will cause a "finit" to be triggered by the next
  27.326 -	 * attempted FPU operation by the 'current' process.
  27.327 -	 */
  27.328 -	current->used_math = 0;
  27.329 -
  27.330 -	if ( HAVE_HWFP ) {
  27.331 -		if ( cpu_has_fxsr ) {
  27.332 -			return save_i387_fxsave( buf );
  27.333 -		} else {
  27.334 -			return save_i387_fsave( buf );
  27.335 -		}
  27.336 -	} else {
  27.337 -		return save_i387_soft( &current->thread.i387.soft, buf );
  27.338 -	}
  27.339 -}
  27.340 -
  27.341 -static inline int restore_i387_fsave( struct _fpstate *buf )
  27.342 -{
  27.343 -	struct task_struct *tsk = current;
  27.344 -	clear_fpu( tsk );
  27.345 -	return __copy_from_user( &tsk->thread.i387.fsave, buf,
  27.346 -				 sizeof(struct i387_fsave_struct) );
  27.347 -}
  27.348 -
  27.349 -static inline int restore_i387_fxsave( struct _fpstate *buf )
  27.350 -{
  27.351 -	struct task_struct *tsk = current;
  27.352 -	clear_fpu( tsk );
  27.353 -	if ( __copy_from_user( &tsk->thread.i387.fxsave, &buf->_fxsr_env[0],
  27.354 -			       sizeof(struct i387_fxsave_struct) ) )
  27.355 -		return 1;
  27.356 -	/* mxcsr bit 6 and 31-16 must be zero for security reasons */
  27.357 -	tsk->thread.i387.fxsave.mxcsr &= 0xffbf;
  27.358 -	return convert_fxsr_from_user( &tsk->thread.i387.fxsave, buf );
  27.359 -}
  27.360 -
  27.361 -int restore_i387( struct _fpstate *buf )
  27.362 -{
  27.363 -	int err;
  27.364 -
  27.365 -	if ( HAVE_HWFP ) {
  27.366 -		if ( cpu_has_fxsr ) {
  27.367 -			err =  restore_i387_fxsave( buf );
  27.368 -		} else {
  27.369 -			err = restore_i387_fsave( buf );
  27.370 -		}
  27.371 -	} else {
  27.372 -		err = restore_i387_soft( &current->thread.i387.soft, buf );
  27.373 -	}
  27.374 -	current->used_math = 1;
  27.375 -	return err;
  27.376 -}
  27.377 -
  27.378 -/*
  27.379 - * ptrace request handlers.
  27.380 - */
  27.381 -
  27.382 -static inline int get_fpregs_fsave( struct user_i387_struct *buf,
  27.383 -				    struct task_struct *tsk )
  27.384 -{
  27.385 -	return __copy_to_user( buf, &tsk->thread.i387.fsave,
  27.386 -			       sizeof(struct user_i387_struct) );
  27.387 -}
  27.388 -
  27.389 -static inline int get_fpregs_fxsave( struct user_i387_struct *buf,
  27.390 -				     struct task_struct *tsk )
  27.391 -{
  27.392 -	return convert_fxsr_to_user( (struct _fpstate *)buf,
  27.393 -				     &tsk->thread.i387.fxsave );
  27.394 -}
  27.395 -
  27.396 -int get_fpregs( struct user_i387_struct *buf, struct task_struct *tsk )
  27.397 -{
  27.398 -	if ( HAVE_HWFP ) {
  27.399 -		if ( cpu_has_fxsr ) {
  27.400 -			return get_fpregs_fxsave( buf, tsk );
  27.401 -		} else {
  27.402 -			return get_fpregs_fsave( buf, tsk );
  27.403 -		}
  27.404 -	} else {
  27.405 -		return save_i387_soft( &tsk->thread.i387.soft,
  27.406 -				       (struct _fpstate *)buf );
  27.407 -	}
  27.408 -}
  27.409 -
  27.410 -static inline int set_fpregs_fsave( struct task_struct *tsk,
  27.411 -				    struct user_i387_struct *buf )
  27.412 -{
  27.413 -	return __copy_from_user( &tsk->thread.i387.fsave, buf,
  27.414 -				 sizeof(struct user_i387_struct) );
  27.415 -}
  27.416 -
  27.417 -static inline int set_fpregs_fxsave( struct task_struct *tsk,
  27.418 -				     struct user_i387_struct *buf )
  27.419 -{
  27.420 -	return convert_fxsr_from_user( &tsk->thread.i387.fxsave,
  27.421 -				       (struct _fpstate *)buf );
  27.422 -}
  27.423 -
  27.424 -int set_fpregs( struct task_struct *tsk, struct user_i387_struct *buf )
  27.425 -{
  27.426 -	if ( HAVE_HWFP ) {
  27.427 -		if ( cpu_has_fxsr ) {
  27.428 -			return set_fpregs_fxsave( tsk, buf );
  27.429 -		} else {
  27.430 -			return set_fpregs_fsave( tsk, buf );
  27.431 -		}
  27.432 -	} else {
  27.433 -		return restore_i387_soft( &tsk->thread.i387.soft,
  27.434 -					  (struct _fpstate *)buf );
  27.435 -	}
  27.436 -}
  27.437 -
  27.438 -int get_fpxregs( struct user_fxsr_struct *buf, struct task_struct *tsk )
  27.439 -{
  27.440 -	if ( cpu_has_fxsr ) {
  27.441 -		if (__copy_to_user( (void *)buf, &tsk->thread.i387.fxsave,
  27.442 -				    sizeof(struct user_fxsr_struct) ))
  27.443 -			return -EFAULT;
  27.444 -		return 0;
  27.445 -	} else {
  27.446 -		return -EIO;
  27.447 -	}
  27.448 -}
  27.449 -
  27.450 -int set_fpxregs( struct task_struct *tsk, struct user_fxsr_struct *buf )
  27.451 -{
  27.452 -	if ( cpu_has_fxsr ) {
  27.453 -		__copy_from_user( &tsk->thread.i387.fxsave, (void *)buf,
  27.454 -				  sizeof(struct user_fxsr_struct) );
  27.455 -		/* mxcsr bit 6 and 31-16 must be zero for security reasons */
  27.456 -		tsk->thread.i387.fxsave.mxcsr &= 0xffbf;
  27.457 -		return 0;
  27.458 -	} else {
  27.459 -		return -EIO;
  27.460 -	}
  27.461 -}
  27.462 -
  27.463 -/*
  27.464 - * FPU state for core dumps.
  27.465 - */
  27.466 -
  27.467 -static inline void copy_fpu_fsave( struct task_struct *tsk,
  27.468 -				   struct user_i387_struct *fpu )
  27.469 -{
  27.470 -	memcpy( fpu, &tsk->thread.i387.fsave,
  27.471 -		sizeof(struct user_i387_struct) );
  27.472 -}
  27.473 -
  27.474 -static inline void copy_fpu_fxsave( struct task_struct *tsk,
  27.475 -				   struct user_i387_struct *fpu )
  27.476 -{
  27.477 -	unsigned short *to;
  27.478 -	unsigned short *from;
  27.479 -	int i;
  27.480 -
  27.481 -	memcpy( fpu, &tsk->thread.i387.fxsave, 7 * sizeof(long) );
  27.482 -
  27.483 -	to = (unsigned short *)&fpu->st_space[0];
  27.484 -	from = (unsigned short *)&tsk->thread.i387.fxsave.st_space[0];
  27.485 -	for ( i = 0 ; i < 8 ; i++, to += 5, from += 8 ) {
  27.486 -		memcpy( to, from, 5 * sizeof(unsigned short) );
  27.487 -	}
  27.488 -}
  27.489 -
  27.490 -int dump_fpu( struct pt_regs *regs, struct user_i387_struct *fpu )
  27.491 -{
  27.492 -	int fpvalid;
  27.493 -	struct task_struct *tsk = current;
  27.494 -
  27.495 -	fpvalid = tsk->used_math;
  27.496 -	if ( fpvalid ) {
  27.497 -		unlazy_fpu( tsk );
  27.498 -		if ( cpu_has_fxsr ) {
  27.499 -			copy_fpu_fxsave( tsk, fpu );
  27.500 -		} else {
  27.501 -			copy_fpu_fsave( tsk, fpu );
  27.502 -		}
  27.503 -	}
  27.504 -
  27.505 -	return fpvalid;
  27.506 -}
  27.507 -
  27.508 -int dump_extended_fpu( struct pt_regs *regs, struct user_fxsr_struct *fpu )
  27.509 -{
  27.510 -	int fpvalid;
  27.511 -	struct task_struct *tsk = current;
  27.512 -
  27.513 -	fpvalid = tsk->used_math && cpu_has_fxsr;
  27.514 -	if ( fpvalid ) {
  27.515 -		unlazy_fpu( tsk );
  27.516 -		memcpy( fpu, &tsk->thread.i387.fxsave,
  27.517 -			sizeof(struct user_fxsr_struct) );
  27.518 -	}
  27.519 -
  27.520 -	return fpvalid;
  27.521 -}
    28.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/init_task.c	Tue Mar 25 11:15:01 2003 +0000
    28.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.3 @@ -1,33 +0,0 @@
    28.4 -#include <linux/mm.h>
    28.5 -#include <linux/sched.h>
    28.6 -#include <linux/init.h>
    28.7 -
    28.8 -#include <asm/uaccess.h>
    28.9 -#include <asm/pgtable.h>
   28.10 -#include <asm/desc.h>
   28.11 -
   28.12 -static struct fs_struct init_fs = INIT_FS;
   28.13 -static struct files_struct init_files = INIT_FILES;
   28.14 -static struct signal_struct init_signals = INIT_SIGNALS;
   28.15 -struct mm_struct init_mm = INIT_MM(init_mm);
   28.16 -
   28.17 -/*
   28.18 - * Initial task structure.
   28.19 - *
   28.20 - * We need to make sure that this is 8192-byte aligned due to the
   28.21 - * way process stacks are handled. This is done by having a special
   28.22 - * "init_task" linker map entry..
   28.23 - */
   28.24 -union task_union init_task_union 
   28.25 -	__attribute__((__section__(".data.init_task"))) =
   28.26 -		{ INIT_TASK(init_task_union.task) };
   28.27 -
   28.28 -/*
   28.29 - * per-CPU TSS segments. Threads are completely 'soft' on Linux,
   28.30 - * no more per-task TSS's. The TSS size is kept cacheline-aligned
   28.31 - * so they are allowed to end up in the .data.cacheline_aligned
   28.32 - * section. Since TSS's are completely CPU-local, we want them
   28.33 - * on exact cacheline boundaries, to eliminate cacheline ping-pong.
   28.34 - */ 
   28.35 -struct tss_struct init_tss[NR_CPUS] __cacheline_aligned = { [0 ... NR_CPUS-1] = INIT_TSS };
   28.36 -
    29.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/ioport.c	Tue Mar 25 11:15:01 2003 +0000
    29.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.3 @@ -1,19 +0,0 @@
    29.4 -#include <linux/sched.h>
    29.5 -#include <linux/kernel.h>
    29.6 -#include <linux/errno.h>
    29.7 -#include <linux/types.h>
    29.8 -#include <linux/stddef.h>
    29.9 -
   29.10 -
   29.11 -asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int turn_on)
   29.12 -{
   29.13 -    /* No IO permission! */
   29.14 -    return -EPERM;
   29.15 -}
   29.16 -
   29.17 -
   29.18 -asmlinkage int sys_iopl(unsigned long unused)
   29.19 -{
   29.20 -    /* The hypervisor won't allow it! */
   29.21 -    return -EPERM;
   29.22 -}
    30.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/irq.c	Tue Mar 25 11:15:01 2003 +0000
    30.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.3 @@ -1,1129 +0,0 @@
    30.4 -/*
    30.5 - *	linux/arch/i386/kernel/irq.c
    30.6 - *
    30.7 - *	Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
    30.8 - *
    30.9 - * This file contains the code used by various IRQ handling routines:
   30.10 - * asking for different IRQ's should be done through these routines
   30.11 - * instead of just grabbing them. Thus setups with different IRQ numbers
   30.12 - * shouldn't result in any weird surprises, and installing new handlers
   30.13 - * should be easier.
   30.14 - */
   30.15 -
   30.16 -/*
   30.17 - * (mostly architecture independent, will move to kernel/irq.c in 2.5.)
   30.18 - *
   30.19 - * IRQs are in fact implemented a bit like signal handlers for the kernel.
   30.20 - * Naturally it's not a 1:1 relation, but there are similarities.
   30.21 - */
   30.22 -
   30.23 -#include <linux/config.h>
   30.24 -#include <linux/ptrace.h>
   30.25 -#include <linux/errno.h>
   30.26 -#include <linux/signal.h>
   30.27 -#include <linux/sched.h>
   30.28 -#include <linux/ioport.h>
   30.29 -#include <linux/interrupt.h>
   30.30 -#include <linux/timex.h>
   30.31 -#include <linux/slab.h>
   30.32 -#include <linux/random.h>
   30.33 -#include <linux/smp_lock.h>
   30.34 -#include <linux/init.h>
   30.35 -#include <linux/kernel_stat.h>
   30.36 -#include <linux/irq.h>
   30.37 -#include <linux/proc_fs.h>
   30.38 -#include <linux/kdb.h>
   30.39 -
   30.40 -#include <asm/atomic.h>
   30.41 -#include <asm/io.h>
   30.42 -#include <asm/smp.h>
   30.43 -#include <asm/system.h>
   30.44 -#include <asm/bitops.h>
   30.45 -#include <asm/uaccess.h>
   30.46 -#include <asm/pgalloc.h>
   30.47 -#include <asm/delay.h>
   30.48 -#include <asm/desc.h>
   30.49 -#include <asm/irq.h>
   30.50 -
   30.51 -
   30.52 -
   30.53 -/*
   30.54 - * Linux has a controller-independent x86 interrupt architecture.
   30.55 - * every controller has a 'controller-template', that is used
   30.56 - * by the main code to do the right thing. Each driver-visible
   30.57 - * interrupt source is transparently wired to the apropriate
   30.58 - * controller. Thus drivers need not be aware of the
   30.59 - * interrupt-controller.
   30.60 - *
   30.61 - * Various interrupt controllers we handle: 8259 PIC, SMP IO-APIC,
   30.62 - * PIIX4's internal 8259 PIC and SGI's Visual Workstation Cobalt (IO-)APIC.
   30.63 - * (IO-APICs assumed to be messaging to Pentium local-APICs)
   30.64 - *
   30.65 - * the code is designed to be easily extended with new/different
   30.66 - * interrupt controllers, without having to do assembly magic.
   30.67 - */
   30.68 -
   30.69 -/*
   30.70 - * Controller mappings for all interrupt sources:
   30.71 - */
   30.72 -irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned =
   30.73 -	{ [0 ... NR_IRQS-1] = { 0, &no_irq_type, NULL, 0, SPIN_LOCK_UNLOCKED}};
   30.74 -
   30.75 -static void register_irq_proc (unsigned int irq);
   30.76 -
   30.77 -/*
   30.78 - * Special irq handlers.
   30.79 - */
   30.80 -
   30.81 -void no_action(int cpl, void *dev_id, struct pt_regs *regs) { }
   30.82 -
   30.83 -/*
   30.84 - * Generic no controller code
   30.85 - */
   30.86 -
   30.87 -static void enable_none(unsigned int irq) { }
   30.88 -static unsigned int startup_none(unsigned int irq) { return 0; }
   30.89 -static void disable_none(unsigned int irq) { }
   30.90 -static void ack_none(unsigned int irq)
   30.91 -{
   30.92 -    printk("unexpected IRQ trap at vector %02x\n", irq);
   30.93 -}
   30.94 -
   30.95 -/* startup is the same as "enable", shutdown is same as "disable" */
   30.96 -#define shutdown_none	disable_none
   30.97 -#define end_none	enable_none
   30.98 -
   30.99 -struct hw_interrupt_type no_irq_type = {
  30.100 -	"none",
  30.101 -	startup_none,
  30.102 -	shutdown_none,
  30.103 -	enable_none,
  30.104 -	disable_none,
  30.105 -	ack_none,
  30.106 -	end_none
  30.107 -};
  30.108 -
  30.109 -atomic_t irq_err_count;
  30.110 -#ifdef CONFIG_X86_IO_APIC
  30.111 -#ifdef APIC_MISMATCH_DEBUG
  30.112 -atomic_t irq_mis_count;
  30.113 -#endif
  30.114 -#endif
  30.115 -
  30.116 -/*
  30.117 - * Generic, controller-independent functions:
  30.118 - */
  30.119 -
  30.120 -int get_irq_list(char *buf)
  30.121 -{
  30.122 -	int i, j;
  30.123 -	struct irqaction * action;
  30.124 -	char *p = buf;
  30.125 -
  30.126 -	p += sprintf(p, "           ");
  30.127 -	for (j=0; j<smp_num_cpus; j++)
  30.128 -		p += sprintf(p, "CPU%d       ",j);
  30.129 -	*p++ = '\n';
  30.130 -
  30.131 -	for (i = 0 ; i < NR_IRQS ; i++) {
  30.132 -		action = irq_desc[i].action;
  30.133 -		if (!action) 
  30.134 -			continue;
  30.135 -		p += sprintf(p, "%3d: ",i);
  30.136 -#ifndef CONFIG_SMP
  30.137 -		p += sprintf(p, "%10u ", kstat_irqs(i));
  30.138 -#else
  30.139 -		for (j = 0; j < smp_num_cpus; j++)
  30.140 -			p += sprintf(p, "%10u ",
  30.141 -				kstat.irqs[cpu_logical_map(j)][i]);
  30.142 -#endif
  30.143 -		p += sprintf(p, " %14s", irq_desc[i].handler->typename);
  30.144 -		p += sprintf(p, "  %s", action->name);
  30.145 -
  30.146 -		for (action=action->next; action; action = action->next)
  30.147 -			p += sprintf(p, ", %s", action->name);
  30.148 -		*p++ = '\n';
  30.149 -	}
  30.150 -	p += sprintf(p, "NMI: ");
  30.151 -	for (j = 0; j < smp_num_cpus; j++)
  30.152 -		p += sprintf(p, "%10u ",
  30.153 -			nmi_count(cpu_logical_map(j)));
  30.154 -	p += sprintf(p, "\n");
  30.155 -#if CONFIG_X86_LOCAL_APIC
  30.156 -	p += sprintf(p, "LOC: ");
  30.157 -	for (j = 0; j < smp_num_cpus; j++)
  30.158 -		p += sprintf(p, "%10u ",
  30.159 -			apic_timer_irqs[cpu_logical_map(j)]);
  30.160 -	p += sprintf(p, "\n");
  30.161 -#endif
  30.162 -	p += sprintf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
  30.163 -#ifdef CONFIG_X86_IO_APIC
  30.164 -#ifdef APIC_MISMATCH_DEBUG
  30.165 -	p += sprintf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
  30.166 -#endif
  30.167 -#endif
  30.168 -	return p - buf;
  30.169 -}
  30.170 -
  30.171 -
  30.172 -/*
  30.173 - * Global interrupt locks for SMP. Allow interrupts to come in on any
  30.174 - * CPU, yet make cli/sti act globally to protect critical regions..
  30.175 - */
  30.176 -
  30.177 -#ifdef CONFIG_SMP
  30.178 -unsigned char global_irq_holder = NO_PROC_ID;
  30.179 -unsigned volatile long global_irq_lock; /* pendantic: long for set_bit --RR */
  30.180 -
  30.181 -extern void show_stack(unsigned long* esp);
  30.182 -
  30.183 -static void show(char * str)
  30.184 -{
  30.185 -	int i;
  30.186 -	int cpu = smp_processor_id();
  30.187 -
  30.188 -	printk("\n%s, CPU %d:\n", str, cpu);
  30.189 -	printk("irq:  %d [",irqs_running());
  30.190 -	for(i=0;i < smp_num_cpus;i++)
  30.191 -		printk(" %d",local_irq_count(i));
  30.192 -	printk(" ]\nbh:   %d [",spin_is_locked(&global_bh_lock) ? 1 : 0);
  30.193 -	for(i=0;i < smp_num_cpus;i++)
  30.194 -		printk(" %d",local_bh_count(i));
  30.195 -
  30.196 -	printk(" ]\nStack dumps:");
  30.197 -	for(i = 0; i < smp_num_cpus; i++) {
  30.198 -		unsigned long esp;
  30.199 -		if (i == cpu)
  30.200 -			continue;
  30.201 -		printk("\nCPU %d:",i);
  30.202 -		esp = init_tss[i].esp0;
  30.203 -		if (!esp) {
  30.204 -			/* tss->esp0 is set to NULL in cpu_init(),
  30.205 -			 * it's initialized when the cpu returns to user
  30.206 -			 * space. -- manfreds
  30.207 -			 */
  30.208 -			printk(" <unknown> ");
  30.209 -			continue;
  30.210 -		}
  30.211 -		esp &= ~(THREAD_SIZE-1);
  30.212 -		esp += sizeof(struct task_struct);
  30.213 -		show_stack((void*)esp);
  30.214 - 	}
  30.215 -	printk("\nCPU %d:",cpu);
  30.216 -	show_stack(NULL);
  30.217 -	printk("\n");
  30.218 -}
  30.219 -	
  30.220 -#define MAXCOUNT 100000000
  30.221 -
  30.222 -/*
  30.223 - * I had a lockup scenario where a tight loop doing
  30.224 - * spin_unlock()/spin_lock() on CPU#1 was racing with
  30.225 - * spin_lock() on CPU#0. CPU#0 should have noticed spin_unlock(), but
  30.226 - * apparently the spin_unlock() information did not make it
  30.227 - * through to CPU#0 ... nasty, is this by design, do we have to limit
  30.228 - * 'memory update oscillation frequency' artificially like here?
  30.229 - *
  30.230 - * Such 'high frequency update' races can be avoided by careful design, but
  30.231 - * some of our major constructs like spinlocks use similar techniques,
  30.232 - * it would be nice to clarify this issue. Set this define to 0 if you
  30.233 - * want to check whether your system freezes.  I suspect the delay done
  30.234 - * by SYNC_OTHER_CORES() is in correlation with 'snooping latency', but
  30.235 - * i thought that such things are guaranteed by design, since we use
  30.236 - * the 'LOCK' prefix.
  30.237 - */
  30.238 -#define SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND 0
  30.239 -
  30.240 -#if SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND
  30.241 -# define SYNC_OTHER_CORES(x) udelay(x+1)
  30.242 -#else
  30.243 -/*
  30.244 - * We have to allow irqs to arrive between __sti and __cli
  30.245 - */
  30.246 -# define SYNC_OTHER_CORES(x) __asm__ __volatile__ ("nop")
  30.247 -#endif
  30.248 -
  30.249 -static inline void wait_on_irq(int cpu)
  30.250 -{
  30.251 -	int count = MAXCOUNT;
  30.252 -
  30.253 -	for (;;) {
  30.254 -
  30.255 -		/*
  30.256 -		 * Wait until all interrupts are gone. Wait
  30.257 -		 * for bottom half handlers unless we're
  30.258 -		 * already executing in one..
  30.259 -		 */
  30.260 -		if (!irqs_running())
  30.261 -			if (local_bh_count(cpu) || !spin_is_locked(&global_bh_lock))
  30.262 -				break;
  30.263 -
  30.264 -		/* Duh, we have to loop. Release the lock to avoid deadlocks */
  30.265 -		clear_bit(0,&global_irq_lock);
  30.266 -
  30.267 -		for (;;) {
  30.268 -			if (!--count) {
  30.269 -				show("wait_on_irq");
  30.270 -				count = ~0;
  30.271 -			}
  30.272 -			__sti();
  30.273 -			SYNC_OTHER_CORES(cpu);
  30.274 -			__cli();
  30.275 -			if (irqs_running())
  30.276 -				continue;
  30.277 -			if (global_irq_lock)
  30.278 -				continue;
  30.279 -			if (!local_bh_count(cpu) && spin_is_locked(&global_bh_lock))
  30.280 -				continue;
  30.281 -			if (!test_and_set_bit(0,&global_irq_lock))
  30.282 -				break;
  30.283 -		}
  30.284 -	}
  30.285 -}
  30.286 -
  30.287 -/*
  30.288 - * This is called when we want to synchronize with
  30.289 - * interrupts. We may for example tell a device to
  30.290 - * stop sending interrupts: but to make sure there
  30.291 - * are no interrupts that are executing on another
  30.292 - * CPU we need to call this function.
  30.293 - */
  30.294 -void synchronize_irq(void)
  30.295 -{
  30.296 -	if (irqs_running()) {
  30.297 -		/* Stupid approach */
  30.298 -		cli();
  30.299 -		sti();
  30.300 -	}
  30.301 -}
  30.302 -
  30.303 -static inline void get_irqlock(int cpu)
  30.304 -{
  30.305 -#ifdef	CONFIG_KDB
  30.306 -	static int kdb_rate;
  30.307 -	if (KDB_IS_RUNNING() && kdb_rate++ < 10)
  30.308 -		kdb_printf("Warning: get_irqlock on cpu %d while kdb is running, may hang\n", smp_processor_id());
  30.309 -#endif	/* CONFIG_KDB */
  30.310 -	if (test_and_set_bit(0,&global_irq_lock)) {
  30.311 -		/* do we already hold the lock? */
  30.312 -		if ((unsigned char) cpu == global_irq_holder)
  30.313 -			return;
  30.314 -		/* Uhhuh.. Somebody else got it. Wait.. */
  30.315 -		do {
  30.316 -			do {
  30.317 -				rep_nop();
  30.318 -			} while (test_bit(0,&global_irq_lock));
  30.319 -		} while (test_and_set_bit(0,&global_irq_lock));		
  30.320 -	}
  30.321 -	/* 
  30.322 -	 * We also to make sure that nobody else is running
  30.323 -	 * in an interrupt context. 
  30.324 -	 */
  30.325 -	wait_on_irq(cpu);
  30.326 -
  30.327 -	/*
  30.328 -	 * Ok, finally..
  30.329 -	 */
  30.330 -	global_irq_holder = cpu;
  30.331 -}
  30.332 -
  30.333 -void __global_cli(void)
  30.334 -{
  30.335 -    panic("__global_cli");
  30.336 -}
  30.337 -
  30.338 -void __global_sti(void)
  30.339 -{
  30.340 -    panic("__global_sti");
  30.341 -}
  30.342 -
  30.343 -/*
  30.344 - * SMP flags value to restore to:
  30.345 - * 0 - global cli
  30.346 - * 1 - global sti
  30.347 - * 2 - local cli
  30.348 - * 3 - local sti
  30.349 - */
  30.350 -unsigned long __global_save_flags(void)
  30.351 -{
  30.352 -    panic("__global_save_flags");
  30.353 -}
  30.354 -
  30.355 -void __global_restore_flags(unsigned long flags)
  30.356 -{
  30.357 -    panic("__global_restore_flags");
  30.358 -}
  30.359 -
  30.360 -#endif
  30.361 -
  30.362 -/*
  30.363 - * This should really return information about whether
  30.364 - * we should do bottom half handling etc. Right now we
  30.365 - * end up _always_ checking the bottom half, which is a
  30.366 - * waste of time and is not what some drivers would
  30.367 - * prefer.
  30.368 - */
  30.369 -int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action)
  30.370 -{
  30.371 -	int status;
  30.372 -	int cpu = smp_processor_id();
  30.373 -
  30.374 -	irq_enter(cpu, irq);
  30.375 -
  30.376 -	status = 1;	/* Force the "do bottom halves" bit */
  30.377 -
  30.378 -	if (!(action->flags & SA_INTERRUPT))
  30.379 -		__sti();
  30.380 -
  30.381 -	do {
  30.382 -		status |= action->flags;
  30.383 -		action->handler(irq, action->dev_id, regs);
  30.384 -		action = action->next;
  30.385 -	} while (action);
  30.386 -	if (status & SA_SAMPLE_RANDOM)
  30.387 -		add_interrupt_randomness(irq);
  30.388 -	__cli();
  30.389 -
  30.390 -	irq_exit(cpu, irq);
  30.391 -
  30.392 -	return status;
  30.393 -}
  30.394 -
  30.395 -/*
  30.396 - * Generic enable/disable code: this just calls
  30.397 - * down into the PIC-specific version for the actual
  30.398 - * hardware disable after having gotten the irq
  30.399 - * controller lock. 
  30.400 - */
  30.401 - 
  30.402 -/**
  30.403 - *	disable_irq_nosync - disable an irq without waiting
  30.404 - *	@irq: Interrupt to disable
  30.405 - *
  30.406 - *	Disable the selected interrupt line.  Disables and Enables are
  30.407 - *	nested.
  30.408 - *	Unlike disable_irq(), this function does not ensure existing
  30.409 - *	instances of the IRQ handler have completed before returning.
  30.410 - *
  30.411 - *	This function may be called from IRQ context.
  30.412 - */
  30.413 - 
  30.414 -inline void disable_irq_nosync(unsigned int irq)
  30.415 -{
  30.416 -	irq_desc_t *desc = irq_desc + irq;
  30.417 -	unsigned long flags;
  30.418 -
  30.419 -	spin_lock_irqsave(&desc->lock, flags);
  30.420 -	if (!desc->depth++) {
  30.421 -		desc->status |= IRQ_DISABLED;
  30.422 -		desc->handler->disable(irq);
  30.423 -	}
  30.424 -	spin_unlock_irqrestore(&desc->lock, flags);
  30.425 -}
  30.426 -
  30.427 -/**
  30.428 - *	disable_irq - disable an irq and wait for completion
  30.429 - *	@irq: Interrupt to disable
  30.430 - *
  30.431 - *	Disable the selected interrupt line.  Enables and Disables are
  30.432 - *	nested.
  30.433 - *	This function waits for any pending IRQ handlers for this interrupt
  30.434 - *	to complete before returning. If you use this function while
  30.435 - *	holding a resource the IRQ handler may need you will deadlock.
  30.436 - *
  30.437 - *	This function may be called - with care - from IRQ context.
  30.438 - */
  30.439 - 
  30.440 -void disable_irq(unsigned int irq)
  30.441 -{
  30.442 -	disable_irq_nosync(irq);
  30.443 -
  30.444 -	if (!local_irq_count(smp_processor_id())) {
  30.445 -		do {
  30.446 -			barrier();
  30.447 -			cpu_relax();
  30.448 -		} while (irq_desc[irq].status & IRQ_INPROGRESS);
  30.449 -	}
  30.450 -}
  30.451 -
  30.452 -/**
  30.453 - *	enable_irq - enable handling of an irq
  30.454 - *	@irq: Interrupt to enable
  30.455 - *
  30.456 - *	Undoes the effect of one call to disable_irq().  If this
  30.457 - *	matches the last disable, processing of interrupts on this
  30.458 - *	IRQ line is re-enabled.
  30.459 - *
  30.460 - *	This function may be called from IRQ context.
  30.461 - */
  30.462 - 
  30.463 -void enable_irq(unsigned int irq)
  30.464 -{
  30.465 -	irq_desc_t *desc = irq_desc + irq;
  30.466 -	unsigned long flags;
  30.467 -
  30.468 -	spin_lock_irqsave(&desc->lock, flags);
  30.469 -	switch (desc->depth) {
  30.470 -	case 1: {
  30.471 -		unsigned int status = desc->status & ~IRQ_DISABLED;
  30.472 -		desc->status = status;
  30.473 -		if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
  30.474 -			desc->status = status | IRQ_REPLAY;
  30.475 -			hw_resend_irq(desc->handler,irq);
  30.476 -		}
  30.477 -		desc->handler->enable(irq);
  30.478 -		/* fall-through */
  30.479 -	}
  30.480 -	default:
  30.481 -		desc->depth--;
  30.482 -		break;
  30.483 -	case 0:
  30.484 -		printk("enable_irq(%u) unbalanced from %p\n", irq,
  30.485 -		       __builtin_return_address(0));
  30.486 -	}
  30.487 -	spin_unlock_irqrestore(&desc->lock, flags);
  30.488 -}
  30.489 -
  30.490 -/*
  30.491 - * do_IRQ handles all normal device IRQ's (the special
  30.492 - * SMP cross-CPU interrupts have their own specific
  30.493 - * handlers).
  30.494 - */
  30.495 -asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs)
  30.496 -{	
  30.497 -	/* 
  30.498 -	 * We ack quickly, we don't want the irq controller
  30.499 -	 * thinking we're snobs just because some other CPU has
  30.500 -	 * disabled global interrupts (we have already done the
  30.501 -	 * INT_ACK cycles, it's too late to try to pretend to the
  30.502 -	 * controller that we aren't taking the interrupt).
  30.503 -	 *
  30.504 -	 * 0 return value means that this irq is already being
  30.505 -	 * handled by some other CPU. (or is disabled)
  30.506 -	 */
  30.507 -	int cpu = smp_processor_id();
  30.508 -	irq_desc_t *desc = irq_desc + irq;
  30.509 -	struct irqaction * action;
  30.510 -	unsigned int status;
  30.511 -
  30.512 -	kstat.irqs[cpu][irq]++;
  30.513 -	spin_lock(&desc->lock);
  30.514 -	desc->handler->ack(irq);
  30.515 -	/*
  30.516 -	   REPLAY is when Linux resends an IRQ that was dropped earlier
  30.517 -	   WAITING is used by probe to mark irqs that are being tested
  30.518 -	   */
  30.519 -	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
  30.520 -	status |= IRQ_PENDING; /* we _want_ to handle it */
  30.521 -
  30.522 -	/*
  30.523 -	 * If the IRQ is disabled for whatever reason, we cannot
  30.524 -	 * use the action we have.
  30.525 -	 */
  30.526 -	action = NULL;
  30.527 -	if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
  30.528 -		action = desc->action;
  30.529 -		status &= ~IRQ_PENDING; /* we commit to handling */
  30.530 -		status |= IRQ_INPROGRESS; /* we are handling it */
  30.531 -	}
  30.532 -	desc->status = status;
  30.533 -
  30.534 -	/*
  30.535 -	 * If there is no IRQ handler or it was disabled, exit early.
  30.536 -	   Since we set PENDING, if another processor is handling
  30.537 -	   a different instance of this same irq, the other processor
  30.538 -	   will take care of it.
  30.539 -	 */
  30.540 -	if (!action)
  30.541 -		goto out;
  30.542 -
  30.543 -	/*
  30.544 -	 * Edge triggered interrupts need to remember
  30.545 -	 * pending events.
  30.546 -	 * This applies to any hw interrupts that allow a second
  30.547 -	 * instance of the same irq to arrive while we are in do_IRQ
  30.548 -	 * or in the handler. But the code here only handles the _second_
  30.549 -	 * instance of the irq, not the third or fourth. So it is mostly
  30.550 -	 * useful for irq hardware that does not mask cleanly in an
  30.551 -	 * SMP environment.
  30.552 -	 */
  30.553 -	for (;;) {
  30.554 -		spin_unlock(&desc->lock);
  30.555 -		handle_IRQ_event(irq, regs, action);
  30.556 -		spin_lock(&desc->lock);
  30.557 -		
  30.558 -		if (!(desc->status & IRQ_PENDING))
  30.559 -			break;
  30.560 -		desc->status &= ~IRQ_PENDING;
  30.561 -	}
  30.562 -	desc->status &= ~IRQ_INPROGRESS;
  30.563 -out:
  30.564 -	/*
  30.565 -	 * The ->end() handler has to deal with interrupts which got
  30.566 -	 * disabled while the handler was running.
  30.567 -	 */
  30.568 -	desc->handler->end(irq);
  30.569 -	spin_unlock(&desc->lock);
  30.570 -
  30.571 -	if (softirq_pending(cpu))
  30.572 -		do_softirq();
  30.573 -
  30.574 -	return 1;
  30.575 -}
  30.576 -
  30.577 -/**
  30.578 - *	request_irq - allocate an interrupt line
  30.579 - *	@irq: Interrupt line to allocate
  30.580 - *	@handler: Function to be called when the IRQ occurs
  30.581 - *	@irqflags: Interrupt type flags
  30.582 - *	@devname: An ascii name for the claiming device
  30.583 - *	@dev_id: A cookie passed back to the handler function
  30.584 - *
  30.585 - *	This call allocates interrupt resources and enables the
  30.586 - *	interrupt line and IRQ handling. From the point this
  30.587 - *	call is made your handler function may be invoked. Since
  30.588 - *	your handler function must clear any interrupt the board 
  30.589 - *	raises, you must take care both to initialise your hardware
  30.590 - *	and to set up the interrupt handler in the right order.
  30.591 - *
  30.592 - *	Dev_id must be globally unique. Normally the address of the
  30.593 - *	device data structure is used as the cookie. Since the handler
  30.594 - *	receives this value it makes sense to use it.
  30.595 - *
  30.596 - *	If your interrupt is shared you must pass a non NULL dev_id
  30.597 - *	as this is required when freeing the interrupt.
  30.598 - *
  30.599 - *	Flags:
  30.600 - *
  30.601 - *	SA_SHIRQ		Interrupt is shared
  30.602 - *
  30.603 - *	SA_INTERRUPT		Disable local interrupts while processing
  30.604 - *
  30.605 - *	SA_SAMPLE_RANDOM	The interrupt can be used for entropy
  30.606 - *
  30.607 - */
  30.608 - 
  30.609 -int request_irq(unsigned int irq, 
  30.610 -		void (*handler)(int, void *, struct pt_regs *),
  30.611 -		unsigned long irqflags, 
  30.612 -		const char * devname,
  30.613 -		void *dev_id)
  30.614 -{
  30.615 -	int retval;
  30.616 -	struct irqaction * action;
  30.617 -
  30.618 -#if 1
  30.619 -	/*
  30.620 -	 * Sanity-check: shared interrupts should REALLY pass in
  30.621 -	 * a real dev-ID, otherwise we'll have trouble later trying
  30.622 -	 * to figure out which interrupt is which (messes up the
  30.623 -	 * interrupt freeing logic etc).
  30.624 -	 */
  30.625 -	if (irqflags & SA_SHIRQ) {
  30.626 -		if (!dev_id)
  30.627 -			printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", devname, (&irq)[-1]);
  30.628 -	}
  30.629 -#endif
  30.630 -
  30.631 -	if (irq >= NR_IRQS)
  30.632 -		return -EINVAL;
  30.633 -	if (!handler)
  30.634 -		return -EINVAL;
  30.635 -
  30.636 -	action = (struct irqaction *)
  30.637 -			kmalloc(sizeof(struct irqaction), GFP_KERNEL);
  30.638 -	if (!action)
  30.639 -		return -ENOMEM;
  30.640 -
  30.641 -	action->handler = handler;
  30.642 -	action->flags = irqflags;
  30.643 -	action->mask = 0;
  30.644 -	action->name = devname;
  30.645 -	action->next = NULL;
  30.646 -	action->dev_id = dev_id;
  30.647 -
  30.648 -	retval = setup_irq(irq, action);
  30.649 -	if (retval)
  30.650 -		kfree(action);
  30.651 -	return retval;
  30.652 -}
  30.653 -
  30.654 -/**
  30.655 - *	free_irq - free an interrupt
  30.656 - *	@irq: Interrupt line to free
  30.657 - *	@dev_id: Device identity to free
  30.658 - *
  30.659 - *	Remove an interrupt handler. The handler is removed and if the
  30.660 - *	interrupt line is no longer in use by any driver it is disabled.
  30.661 - *	On a shared IRQ the caller must ensure the interrupt is disabled
  30.662 - *	on the card it drives before calling this function. The function
  30.663 - *	does not return until any executing interrupts for this IRQ
  30.664 - *	have completed.
  30.665 - *
  30.666 - *	This function may be called from interrupt context. 
  30.667 - *
  30.668 - *	Bugs: Attempting to free an irq in a handler for the same irq hangs
  30.669 - *	      the machine.
  30.670 - */
  30.671 - 
  30.672 -void free_irq(unsigned int irq, void *dev_id)
  30.673 -{
  30.674 -	irq_desc_t *desc;
  30.675 -	struct irqaction **p;
  30.676 -	unsigned long flags;
  30.677 -
  30.678 -	if (irq >= NR_IRQS)
  30.679 -		return;
  30.680 -
  30.681 -	desc = irq_desc + irq;
  30.682 -	spin_lock_irqsave(&desc->lock,flags);
  30.683 -	p = &desc->action;
  30.684 -	for (;;) {
  30.685 -		struct irqaction * action = *p;
  30.686 -		if (action) {
  30.687 -			struct irqaction **pp = p;
  30.688 -			p = &action->next;
  30.689 -			if (action->dev_id != dev_id)
  30.690 -				continue;
  30.691 -
  30.692 -			/* Found it - now remove it from the list of entries */
  30.693 -			*pp = action->next;
  30.694 -			if (!desc->action) {
  30.695 -				desc->status |= IRQ_DISABLED;
  30.696 -				desc->handler->shutdown(irq);
  30.697 -			}
  30.698 -			spin_unlock_irqrestore(&desc->lock,flags);
  30.699 -
  30.700 -#ifdef CONFIG_SMP
  30.701 -			/* Wait to make sure it's not being used on another CPU */
  30.702 -			while (desc->status & IRQ_INPROGRESS) {
  30.703 -				barrier();
  30.704 -				cpu_relax();
  30.705 -			}
  30.706 -#endif
  30.707 -			kfree(action);
  30.708 -			return;
  30.709 -		}
  30.710 -		printk("Trying to free free IRQ%d\n",irq);
  30.711 -		spin_unlock_irqrestore(&desc->lock,flags);
  30.712 -		return;
  30.713 -	}
  30.714 -}
  30.715 -
  30.716 -/*
  30.717 - * IRQ autodetection code..
  30.718 - *
  30.719 - * This depends on the fact that any interrupt that
  30.720 - * comes in on to an unassigned handler will get stuck
  30.721 - * with "IRQ_WAITING" cleared and the interrupt
  30.722 - * disabled.
  30.723 - */
  30.724 -
  30.725 -static DECLARE_MUTEX(probe_sem);
  30.726 -
  30.727 -/**
  30.728 - *	probe_irq_on	- begin an interrupt autodetect
  30.729 - *
  30.730 - *	Commence probing for an interrupt. The interrupts are scanned
  30.731 - *	and a mask of potential interrupt lines is returned.
  30.732 - *
  30.733 - */
  30.734 - 
  30.735 -unsigned long probe_irq_on(void)
  30.736 -{
  30.737 -	unsigned int i;
  30.738 -	irq_desc_t *desc;
  30.739 -	unsigned long val;
  30.740 -	unsigned long delay;
  30.741 -
  30.742 -	down(&probe_sem);
  30.743 -	/* 
  30.744 -	 * something may have generated an irq long ago and we want to
  30.745 -	 * flush such a longstanding irq before considering it as spurious. 
  30.746 -	 */
  30.747 -	for (i = NR_IRQS-1; i > 0; i--)  {
  30.748 -		desc = irq_desc + i;
  30.749 -
  30.750 -		spin_lock_irq(&desc->lock);
  30.751 -		if (!irq_desc[i].action) 
  30.752 -			irq_desc[i].handler->startup(i);
  30.753 -		spin_unlock_irq(&desc->lock);
  30.754 -	}
  30.755 -
  30.756 -	/* Wait for longstanding interrupts to trigger. */
  30.757 -	for (delay = jiffies + HZ/50; time_after(delay, jiffies); )
  30.758 -		/* about 20ms delay */ synchronize_irq();
  30.759 -
  30.760 -	/*
  30.761 -	 * enable any unassigned irqs
  30.762 -	 * (we must startup again here because if a longstanding irq
  30.763 -	 * happened in the previous stage, it may have masked itself)
  30.764 -	 */
  30.765 -	for (i = NR_IRQS-1; i > 0; i--) {
  30.766 -		desc = irq_desc + i;
  30.767 -
  30.768 -		spin_lock_irq(&desc->lock);
  30.769 -		if (!desc->action) {
  30.770 -			desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
  30.771 -			if (desc->handler->startup(i))
  30.772 -				desc->status |= IRQ_PENDING;
  30.773 -		}
  30.774 -		spin_unlock_irq(&desc->lock);
  30.775 -	}
  30.776 -
  30.777 -	/*
  30.778 -	 * Wait for spurious interrupts to trigger
  30.779 -	 */
  30.780 -	for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
  30.781 -		/* about 100ms delay */ synchronize_irq();
  30.782 -
  30.783 -	/*
  30.784 -	 * Now filter out any obviously spurious interrupts
  30.785 -	 */
  30.786 -	val = 0;
  30.787 -	for (i = 0; i < NR_IRQS; i++) {
  30.788 -		irq_desc_t *desc = irq_desc + i;
  30.789 -		unsigned int status;
  30.790 -
  30.791 -		spin_lock_irq(&desc->lock);
  30.792 -		status = desc->status;
  30.793 -
  30.794 -		if (status & IRQ_AUTODETECT) {
  30.795 -			/* It triggered already - consider it spurious. */
  30.796 -			if (!(status & IRQ_WAITING)) {
  30.797 -				desc->status = status & ~IRQ_AUTODETECT;
  30.798 -				desc->handler->shutdown(i);
  30.799 -			} else
  30.800 -				if (i < 32)
  30.801 -					val |= 1 << i;
  30.802 -		}
  30.803 -		spin_unlock_irq(&desc->lock);
  30.804 -	}
  30.805 -
  30.806 -	return val;
  30.807 -}
  30.808 -
  30.809 -/*
  30.810 - * Return a mask of triggered interrupts (this
  30.811 - * can handle only legacy ISA interrupts).
  30.812 - */
  30.813 - 
  30.814 -/**
  30.815 - *	probe_irq_mask - scan a bitmap of interrupt lines
  30.816 - *	@val:	mask of interrupts to consider
  30.817 - *
  30.818 - *	Scan the ISA bus interrupt lines and return a bitmap of
  30.819 - *	active interrupts. The interrupt probe logic state is then
  30.820 - *	returned to its previous value.
  30.821 - *
  30.822 - *	Note: we need to scan all the irq's even though we will
  30.823 - *	only return ISA irq numbers - just so that we reset them
  30.824 - *	all to a known state.
  30.825 - */
  30.826 -unsigned int probe_irq_mask(unsigned long val)
  30.827 -{
  30.828 -	int i;
  30.829 -	unsigned int mask;
  30.830 -
  30.831 -	mask = 0;
  30.832 -	for (i = 0; i < NR_IRQS; i++) {
  30.833 -		irq_desc_t *desc = irq_desc + i;
  30.834 -		unsigned int status;
  30.835 -
  30.836 -		spin_lock_irq(&desc->lock);
  30.837 -		status = desc->status;
  30.838 -
  30.839 -		if (status & IRQ_AUTODETECT) {
  30.840 -			if (i < 16 && !(status & IRQ_WAITING))
  30.841 -				mask |= 1 << i;
  30.842 -
  30.843 -			desc->status = status & ~IRQ_AUTODETECT;
  30.844 -			desc->handler->shutdown(i);
  30.845 -		}
  30.846 -		spin_unlock_irq(&desc->lock);
  30.847 -	}
  30.848 -	up(&probe_sem);
  30.849 -
  30.850 -	return mask & val;
  30.851 -}
  30.852 -
  30.853 -/*
  30.854 - * Return the one interrupt that triggered (this can
  30.855 - * handle any interrupt source).
  30.856 - */
  30.857 -
  30.858 -/**
  30.859 - *	probe_irq_off	- end an interrupt autodetect
  30.860 - *	@val: mask of potential interrupts (unused)
  30.861 - *
  30.862 - *	Scans the unused interrupt lines and returns the line which
  30.863 - *	appears to have triggered the interrupt. If no interrupt was
  30.864 - *	found then zero is returned. If more than one interrupt is
  30.865 - *	found then minus the first candidate is returned to indicate
  30.866 - *	their is doubt.
  30.867 - *
  30.868 - *	The interrupt probe logic state is returned to its previous
  30.869 - *	value.
  30.870 - *
  30.871 - *	BUGS: When used in a module (which arguably shouldnt happen)
  30.872 - *	nothing prevents two IRQ probe callers from overlapping. The
  30.873 - *	results of this are non-optimal.
  30.874 - */
  30.875 - 
  30.876 -int probe_irq_off(unsigned long val)
  30.877 -{
  30.878 -	int i, irq_found, nr_irqs;
  30.879 -
  30.880 -	nr_irqs = 0;
  30.881 -	irq_found = 0;
  30.882 -	for (i = 0; i < NR_IRQS; i++) {
  30.883 -		irq_desc_t *desc = irq_desc + i;
  30.884 -		unsigned int status;
  30.885 -
  30.886 -		spin_lock_irq(&desc->lock);
  30.887 -		status = desc->status;
  30.888 -
  30.889 -		if (status & IRQ_AUTODETECT) {
  30.890 -			if (!(status & IRQ_WAITING)) {
  30.891 -				if (!nr_irqs)
  30.892 -					irq_found = i;
  30.893 -				nr_irqs++;
  30.894 -			}
  30.895 -			desc->status = status & ~IRQ_AUTODETECT;
  30.896 -			desc->handler->shutdown(i);
  30.897 -		}
  30.898 -		spin_unlock_irq(&desc->lock);
  30.899 -	}
  30.900 -	up(&probe_sem);
  30.901 -
  30.902 -	if (nr_irqs > 1)
  30.903 -		irq_found = -irq_found;
  30.904 -	return irq_found;
  30.905 -}
  30.906 -
  30.907 -/* this was setup_x86_irq but it seems pretty generic */
  30.908 -int setup_irq(unsigned int irq, struct irqaction * new)
  30.909 -{
  30.910 -	int shared = 0;
  30.911 -	unsigned long flags;
  30.912 -	struct irqaction *old, **p;
  30.913 -	irq_desc_t *desc = irq_desc + irq;
  30.914 -
  30.915 -	/*
  30.916 -	 * Some drivers like serial.c use request_irq() heavily,
  30.917 -	 * so we have to be careful not to interfere with a
  30.918 -	 * running system.
  30.919 -	 */
  30.920 -	if (new->flags & SA_SAMPLE_RANDOM) {
  30.921 -		/*
  30.922 -		 * This function might sleep, we want to call it first,
  30.923 -		 * outside of the atomic block.
  30.924 -		 * Yes, this might clear the entropy pool if the wrong
  30.925 -		 * driver is attempted to be loaded, without actually
  30.926 -		 * installing a new handler, but is this really a problem,
  30.927 -		 * only the sysadmin is able to do this.
  30.928 -		 */
  30.929 -		rand_initialize_irq(irq);
  30.930 -	}
  30.931 -
  30.932 -	/*
  30.933 -	 * The following block of code has to be executed atomically
  30.934 -	 */
  30.935 -	spin_lock_irqsave(&desc->lock,flags);
  30.936 -	p = &desc->action;
  30.937 -	if ((old = *p) != NULL) {
  30.938 -		/* Can't share interrupts unless both agree to */
  30.939 -		if (!(old->flags & new->flags & SA_SHIRQ)) {
  30.940 -			spin_unlock_irqrestore(&desc->lock,flags);
  30.941 -			return -EBUSY;
  30.942 -		}
  30.943 -
  30.944 -		/* add new interrupt at end of irq queue */
  30.945 -		do {
  30.946 -			p = &old->next;
  30.947 -			old = *p;
  30.948 -		} while (old);
  30.949 -		shared = 1;
  30.950 -	}
  30.951 -
  30.952 -	*p = new;
  30.953 -
  30.954 -	if (!shared) {
  30.955 -		desc->depth = 0;
  30.956 -		desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING);
  30.957 -		desc->handler->startup(irq);
  30.958 -	}
  30.959 -	spin_unlock_irqrestore(&desc->lock,flags);
  30.960 -
  30.961 -	register_irq_proc(irq);
  30.962 -	return 0;
  30.963 -}
  30.964 -
  30.965 -static struct proc_dir_entry * root_irq_dir;
  30.966 -static struct proc_dir_entry * irq_dir [NR_IRQS];
  30.967 -
  30.968 -#define HEX_DIGITS 8
  30.969 -
  30.970 -static unsigned int parse_hex_value (const char *buffer,
  30.971 -		unsigned long count, unsigned long *ret)
  30.972 -{
  30.973 -	unsigned char hexnum [HEX_DIGITS];
  30.974 -	unsigned long value;
  30.975 -	int i;
  30.976 -
  30.977 -	if (!count)
  30.978 -		return -EINVAL;
  30.979 -	if (count > HEX_DIGITS)
  30.980 -		count = HEX_DIGITS;
  30.981 -	if (copy_from_user(hexnum, buffer, count))
  30.982 -		return -EFAULT;
  30.983 -
  30.984 -	/*
  30.985 -	 * Parse the first 8 characters as a hex string, any non-hex char
  30.986 -	 * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
  30.987 -	 */
  30.988 -	value = 0;
  30.989 -
  30.990 -	for (i = 0; i < count; i++) {
  30.991 -		unsigned int c = hexnum[i];
  30.992 -
  30.993 -		switch (c) {
  30.994 -			case '0' ... '9': c -= '0'; break;
  30.995 -			case 'a' ... 'f': c -= 'a'-10; break;
  30.996 -			case 'A' ... 'F': c -= 'A'-10; break;
  30.997 -		default:
  30.998 -			goto out;
  30.999 -		}
 30.1000 -		value = (value << 4) | c;
 30.1001 -	}
 30.1002 -out:
 30.1003 -	*ret = value;
 30.1004 -	return 0;
 30.1005 -}
 30.1006 -
 30.1007 -#if CONFIG_SMP
 30.1008 -
 30.1009 -static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
 30.1010 -
 30.1011 -static unsigned long irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = ~0UL };
 30.1012 -static int irq_affinity_read_proc (char *page, char **start, off_t off,
 30.1013 -			int count, int *eof, void *data)
 30.1014 -{
 30.1015 -	if (count < HEX_DIGITS+1)
 30.1016 -		return -EINVAL;
 30.1017 -	return sprintf (page, "%08lx\n", irq_affinity[(long)data]);
 30.1018 -}
 30.1019 -
 30.1020 -static int irq_affinity_write_proc (struct file *file, const char *buffer,
 30.1021 -					unsigned long count, void *data)
 30.1022 -{
 30.1023 -	int irq = (long) data, full_count = count, err;
 30.1024 -	unsigned long new_value;
 30.1025 -
 30.1026 -	if (!irq_desc[irq].handler->set_affinity)
 30.1027 -		return -EIO;
 30.1028 -
 30.1029 -	err = parse_hex_value(buffer, count, &new_value);
 30.1030 -
 30.1031 -	/*
 30.1032 -	 * Do not allow disabling IRQs completely - it's a too easy
 30.1033 -	 * way to make the system unusable accidentally :-) At least
 30.1034 -	 * one online CPU still has to be targeted.
 30.1035 -	 */
 30.1036 -	if (!(new_value & cpu_online_map))
 30.1037 -		return -EINVAL;
 30.1038 -
 30.1039 -	irq_affinity[irq] = new_value;
 30.1040 -	irq_desc[irq].handler->set_affinity(irq, new_value);
 30.1041 -
 30.1042 -	return full_count;
 30.1043 -}
 30.1044 -
 30.1045 -#endif
 30.1046 -
 30.1047 -static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
 30.1048 -			int count, int *eof, void *data)
 30.1049 -{
 30.1050 -	unsigned long *mask = (unsigned long *) data;
 30.1051 -	if (count < HEX_DIGITS+1)
 30.1052 -		return -EINVAL;
 30.1053 -	return sprintf (page, "%08lx\n", *mask);
 30.1054 -}
 30.1055 -
 30.1056 -static int prof_cpu_mask_write_proc (struct file *file, const char *buffer,
 30.1057 -					unsigned long count, void *data)
 30.1058 -{
 30.1059 -	unsigned long *mask = (unsigned long *) data, full_count = count, err;
 30.1060 -	unsigned long new_value;
 30.1061 -
 30.1062 -	err = parse_hex_value(buffer, count, &new_value);
 30.1063 -	if (err)
 30.1064 -		return err;
 30.1065 -
 30.1066 -	*mask = new_value;
 30.1067 -	return full_count;
 30.1068 -}
 30.1069 -
 30.1070 -#define MAX_NAMELEN 10
 30.1071 -
 30.1072 -static void register_irq_proc (unsigned int irq)
 30.1073 -{
 30.1074 -	char name [MAX_NAMELEN];
 30.1075 -
 30.1076 -	if (!root_irq_dir || (irq_desc[irq].handler == &no_irq_type) ||
 30.1077 -			irq_dir[irq])
 30.1078 -		return;
 30.1079 -
 30.1080 -	memset(name, 0, MAX_NAMELEN);
 30.1081 -	sprintf(name, "%d", irq);
 30.1082 -
 30.1083 -	/* create /proc/irq/1234 */
 30.1084 -	irq_dir[irq] = proc_mkdir(name, root_irq_dir);
 30.1085 -
 30.1086 -#if CONFIG_SMP
 30.1087 -	{
 30.1088 -		struct proc_dir_entry *entry;
 30.1089 -
 30.1090 -		/* create /proc/irq/1234/smp_affinity */
 30.1091 -		entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]);
 30.1092 -
 30.1093 -		if (entry) {
 30.1094 -			entry->nlink = 1;
 30.1095 -			entry->data = (void *)(long)irq;
 30.1096 -			entry->read_proc = irq_affinity_read_proc;
 30.1097 -			entry->write_proc = irq_affinity_write_proc;
 30.1098 -		}
 30.1099 -
 30.1100 -		smp_affinity_entry[irq] = entry;
 30.1101 -	}
 30.1102 -#endif
 30.1103 -}
 30.1104 -
 30.1105 -unsigned long prof_cpu_mask = -1;
 30.1106 -
 30.1107 -void init_irq_proc (void)
 30.1108 -{
 30.1109 -	struct proc_dir_entry *entry;
 30.1110 -	int i;
 30.1111 -
 30.1112 -	/* create /proc/irq */
 30.1113 -	root_irq_dir = proc_mkdir("irq", 0);
 30.1114 -
 30.1115 -	/* create /proc/irq/prof_cpu_mask */
 30.1116 -	entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir);
 30.1117 -
 30.1118 -	if (!entry)
 30.1119 -	    return;
 30.1120 -
 30.1121 -	entry->nlink = 1;
 30.1122 -	entry->data = (void *)&prof_cpu_mask;
 30.1123 -	entry->read_proc = prof_cpu_mask_read_proc;
 30.1124 -	entry->write_proc = prof_cpu_mask_write_proc;
 30.1125 -
 30.1126 -	/*
 30.1127 -	 * Create entries for all existing IRQs.
 30.1128 -	 */
 30.1129 -	for (i = 0; i < NR_IRQS; i++)
 30.1130 -		register_irq_proc(i);
 30.1131 -}
 30.1132 -
    31.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/ldt.c	Tue Mar 25 11:15:01 2003 +0000
    31.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.3 @@ -1,26 +0,0 @@
    31.4 -/*
    31.5 - * linux/kernel/ldt.c
    31.6 - *
    31.7 - * Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
    31.8 - * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
    31.9 - */
   31.10 -
   31.11 -#include <linux/errno.h>
   31.12 -#include <linux/sched.h>
   31.13 -#include <linux/string.h>
   31.14 -#include <linux/mm.h>
   31.15 -
   31.16 -/*
   31.17 - * XXX KAF (28/7/02): This stuff is only used for DOS emulation, and is
   31.18 - * the default way of finding current TCB in linuxthreads. Supporting
   31.19 - * table update svia the hypervisor is feasible, but a hassle: for now,
   31.20 - * recompiling linuxthreads is the most sensible option.
   31.21 - * 
   31.22 - * Oh, this may become an issue depending on what JVM we use for
   31.23 - * running the xeno-daemon.
   31.24 - */
   31.25 -
   31.26 -asmlinkage int sys_modify_ldt(int func, void *ptr, unsigned long bytecount)
   31.27 -{
   31.28 -    return -ENOSYS;
   31.29 -}
    32.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/process.c	Tue Mar 25 11:15:01 2003 +0000
    32.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.3 @@ -1,454 +0,0 @@
    32.4 -/*
    32.5 - *  linux/arch/i386/kernel/process.c
    32.6 - *
    32.7 - *  Copyright (C) 1995  Linus Torvalds
    32.8 - *
    32.9 - *  Pentium III FXSR, SSE support
   32.10 - *	Gareth Hughes <gareth@valinux.com>, May 2000
   32.11 - */
   32.12 -
   32.13 -/*
   32.14 - * This file handles the architecture-dependent parts of process handling..
   32.15 - */
   32.16 -
   32.17 -#define __KERNEL_SYSCALLS__
   32.18 -#include <stdarg.h>
   32.19 -
   32.20 -#include <linux/errno.h>
   32.21 -#include <linux/sched.h>
   32.22 -#include <linux/kernel.h>
   32.23 -#include <linux/mm.h>
   32.24 -#include <linux/smp.h>
   32.25 -#include <linux/smp_lock.h>
   32.26 -#include <linux/stddef.h>
   32.27 -#include <linux/unistd.h>
   32.28 -#include <linux/ptrace.h>
   32.29 -#include <linux/slab.h>
   32.30 -#include <linux/vmalloc.h>
   32.31 -#include <linux/user.h>
   32.32 -#include <linux/a.out.h>
   32.33 -#include <linux/interrupt.h>
   32.34 -#include <linux/config.h>
   32.35 -#include <linux/delay.h>
   32.36 -#include <linux/reboot.h>
   32.37 -#include <linux/init.h>
   32.38 -#include <linux/mc146818rtc.h>
   32.39 -#include <linux/kdb.h>
   32.40 -
   32.41 -#include <asm/uaccess.h>
   32.42 -#include <asm/pgtable.h>
   32.43 -#include <asm/system.h>
   32.44 -#include <asm/io.h>
   32.45 -#include <asm/ldt.h>
   32.46 -#include <asm/processor.h>
   32.47 -#include <asm/i387.h>
   32.48 -#include <asm/desc.h>
   32.49 -#include <asm/mmu_context.h>
   32.50 -
   32.51 -#include <linux/irq.h>
   32.52 -
   32.53 -asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
   32.54 -
   32.55 -int hlt_counter;
   32.56 -
   32.57 -/*
   32.58 - * Powermanagement idle function, if any..
   32.59 - */
   32.60 -void (*pm_idle)(void);
   32.61 -
   32.62 -/*
   32.63 - * Power off function, if any
   32.64 - */
   32.65 -void (*pm_power_off)(void);
   32.66 -
   32.67 -void disable_hlt(void)
   32.68 -{
   32.69 -    hlt_counter++;
   32.70 -}
   32.71 -
   32.72 -void enable_hlt(void)
   32.73 -{
   32.74 -    hlt_counter--;
   32.75 -}
   32.76 -
   32.77 -/*
   32.78 - * The idle thread. There's no useful work to be
   32.79 - * done, so just try to conserve power and have a
   32.80 - * low exit latency (ie sit in a loop waiting for
   32.81 - * somebody to say that they'd like to reschedule)
   32.82 - */
   32.83 -void cpu_idle (void)
   32.84 -{
   32.85 -    /* endless idle loop with no priority at all */
   32.86 -    init_idle();
   32.87 -    current->nice = 20;
   32.88 -    current->counter = -100;
   32.89 -
   32.90 -    while (1) {
   32.91 -        while (!current->need_resched)
   32.92 -            HYPERVISOR_do_sched_op(NULL);
   32.93 -        schedule();
   32.94 -        check_pgt_cache();
   32.95 -    }
   32.96 -}
   32.97 -
   32.98 -void machine_restart(char * __unused)
   32.99 -{
  32.100 -    HYPERVISOR_exit();
  32.101 -}
  32.102 -
  32.103 -void machine_halt(void)
  32.104 -{
  32.105 -    HYPERVISOR_exit();
  32.106 -}
  32.107 -
  32.108 -void machine_power_off(void)
  32.109 -{
  32.110 -    HYPERVISOR_exit();
  32.111 -}
  32.112 -
  32.113 -extern void show_trace(unsigned long* esp);
  32.114 -
  32.115 -void show_regs(struct pt_regs * regs)
  32.116 -{
  32.117 -    printk("\n");
  32.118 -    printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
  32.119 -    printk("EIP: %04x:[<%08lx>] CPU: %d",0xffff & regs->xcs,regs->eip, smp_processor_id());
  32.120 -    if (regs->xcs & 2)
  32.121 -        printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
  32.122 -    printk(" EFLAGS: %08lx    %s\n",regs->eflags, print_tainted());
  32.123 -    printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
  32.124 -           regs->eax,regs->ebx,regs->ecx,regs->edx);
  32.125 -    printk("ESI: %08lx EDI: %08lx EBP: %08lx",
  32.126 -           regs->esi, regs->edi, regs->ebp);
  32.127 -    printk(" DS: %04x ES: %04x\n",
  32.128 -           0xffff & regs->xds,0xffff & regs->xes);
  32.129 -
  32.130 -    show_trace(&regs->esp);
  32.131 -}
  32.132 -
  32.133 -/*
  32.134 - * No need to lock the MM as we are the last user
  32.135 - */
  32.136 -void release_segments(struct mm_struct *mm)
  32.137 -{
  32.138 -    void * ldt = mm->context.segments;
  32.139 -
  32.140 -    /*
  32.141 -     * free the LDT
  32.142 -     */
  32.143 -    if (ldt) {
  32.144 -        mm->context.segments = NULL;
  32.145 -        clear_LDT();
  32.146 -        vfree(ldt);
  32.147 -    }
  32.148 -}
  32.149 -
  32.150 -/*
  32.151 - * Create a kernel thread
  32.152 - */
  32.153 -int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
  32.154 -{
  32.155 -    long retval, d0;
  32.156 -
  32.157 -    __asm__ __volatile__(
  32.158 -        "movl %%esp,%%esi\n\t"
  32.159 -        "int $0x80\n\t"		/* Linux/i386 system call */
  32.160 -        "cmpl %%esp,%%esi\n\t"	/* child or parent? */
  32.161 -        "je 1f\n\t"		/* parent - jump */
  32.162 -        /* Load the argument into eax, and push it.  That way, it does
  32.163 -         * not matter whether the called function is compiled with
  32.164 -         * -mregparm or not.  */
  32.165 -        "movl %4,%%eax\n\t"
  32.166 -        "pushl %%eax\n\t"		
  32.167 -        "call *%5\n\t"		/* call fn */
  32.168 -        "movl %3,%0\n\t"	/* exit */
  32.169 -        "int $0x80\n"
  32.170 -        "1:\t"
  32.171 -        :"=&a" (retval), "=&S" (d0)
  32.172 -        :"0" (__NR_clone), "i" (__NR_exit),
  32.173 -        "r" (arg), "r" (fn),
  32.174 -        "b" (flags | CLONE_VM)
  32.175 -        : "memory");
  32.176 -
  32.177 -    return retval;
  32.178 -}
  32.179 -
  32.180 -/*
  32.181 - * Free current thread data structures etc..
  32.182 - */
  32.183 -void exit_thread(void)
  32.184 -{
  32.185 -    /* nothing to do ... */
  32.186 -}
  32.187 -
  32.188 -void flush_thread(void)
  32.189 -{
  32.190 -    struct task_struct *tsk = current;
  32.191 -
  32.192 -    memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8);
  32.193 -
  32.194 -    /*
  32.195 -     * Forget coprocessor state..
  32.196 -     */
  32.197 -    clear_fpu(tsk);
  32.198 -    tsk->used_math = 0;
  32.199 -}
  32.200 -
  32.201 -void release_thread(struct task_struct *dead_task)
  32.202 -{
  32.203 -    if (dead_task->mm) {
  32.204 -        void * ldt = dead_task->mm->context.segments;
  32.205 -
  32.206 -        // temporary debugging check
  32.207 -        if (ldt) {
  32.208 -            printk("WARNING: dead process %8s still has LDT? <%p>\n",
  32.209 -                   dead_task->comm, ldt);
  32.210 -            BUG();
  32.211 -        }
  32.212 -    }
  32.213 -}
  32.214 -
  32.215 -/*
  32.216 - * we do not have to muck with descriptors here, that is
  32.217 - * done in switch_mm() as needed.
  32.218 - */
  32.219 -void copy_segments(struct task_struct *p, struct mm_struct *new_mm)
  32.220 -{
  32.221 -    struct mm_struct * old_mm;
  32.222 -    void *old_ldt, *ldt;
  32.223 -
  32.224 -    ldt = NULL;
  32.225 -    old_mm = current->mm;
  32.226 -    if (old_mm && (old_ldt = old_mm->context.segments) != NULL) {
  32.227 -        /*
  32.228 -         * Completely new LDT, we initialize it from the parent:
  32.229 -         */
  32.230 -        ldt = vmalloc(LDT_ENTRIES*LDT_ENTRY_SIZE);
  32.231 -        if (!ldt)
  32.232 -            printk(KERN_WARNING "ldt allocation failed\n");
  32.233 -        else
  32.234 -            memcpy(ldt, old_ldt, LDT_ENTRIES*LDT_ENTRY_SIZE);
  32.235 -    }
  32.236 -    new_mm->context.segments = ldt;
  32.237 -    new_mm->context.cpuvalid = ~0UL;	/* valid on all CPU's - they can't have stale data */
  32.238 -}
  32.239 -
  32.240 -/*
  32.241 - * Save a segment.
  32.242 - */
  32.243 -#define savesegment(seg,value) \
  32.244 -	asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value)))
  32.245 -
  32.246 -int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
  32.247 -                unsigned long unused,
  32.248 -                struct task_struct * p, struct pt_regs * regs)
  32.249 -{
  32.250 -    struct pt_regs * childregs;
  32.251 -
  32.252 -    childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p)) - 1;
  32.253 -    struct_cpy(childregs, regs);
  32.254 -    childregs->eax = 0;
  32.255 -    childregs->esp = esp;
  32.256 -
  32.257 -    p->thread.esp = (unsigned long) childregs;
  32.258 -    p->thread.esp0 = (unsigned long) (childregs+1);
  32.259 -
  32.260 -    p->thread.eip = (unsigned long) ret_from_fork;
  32.261 -
  32.262 -    savesegment(fs,p->thread.fs);
  32.263 -    savesegment(gs,p->thread.gs);
  32.264 -
  32.265 -    unlazy_fpu(current);
  32.266 -    struct_cpy(&p->thread.i387, &current->thread.i387);
  32.267 -
  32.268 -    return 0;
  32.269 -}
  32.270 -
  32.271 -/*
  32.272 - * fill in the user structure for a core dump..
  32.273 - */
  32.274 -void dump_thread(struct pt_regs * regs, struct user * dump)
  32.275 -{
  32.276 -    int i;
  32.277 -
  32.278 -/* changed the size calculations - should hopefully work better. lbt */
  32.279 -    dump->magic = CMAGIC;
  32.280 -    dump->start_code = 0;
  32.281 -    dump->start_stack = regs->esp & ~(PAGE_SIZE - 1);
  32.282 -    dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
  32.283 -    dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> PAGE_SHIFT;
  32.284 -    dump->u_dsize -= dump->u_tsize;
  32.285 -    dump->u_ssize = 0;
  32.286 -    for (i = 0; i < 8; i++)
  32.287 -        dump->u_debugreg[i] = current->thread.debugreg[i];  
  32.288 -
  32.289 -    if (dump->start_stack < TASK_SIZE)
  32.290 -        dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
  32.291 -
  32.292 -    dump->regs.ebx = regs->ebx;
  32.293 -    dump->regs.ecx = regs->ecx;
  32.294 -    dump->regs.edx = regs->edx;
  32.295 -    dump->regs.esi = regs->esi;
  32.296 -    dump->regs.edi = regs->edi;
  32.297 -    dump->regs.ebp = regs->ebp;
  32.298 -    dump->regs.eax = regs->eax;
  32.299 -    dump->regs.ds = regs->xds;
  32.300 -    dump->regs.es = regs->xes;
  32.301 -    savesegment(fs,dump->regs.fs);
  32.302 -    savesegment(gs,dump->regs.gs);
  32.303 -    dump->regs.orig_eax = regs->orig_eax;
  32.304 -    dump->regs.eip = regs->eip;
  32.305 -    dump->regs.cs = regs->xcs;
  32.306 -    dump->regs.eflags = regs->eflags;
  32.307 -    dump->regs.esp = regs->esp;
  32.308 -    dump->regs.ss = regs->xss;
  32.309 -
  32.310 -    dump->u_fpvalid = dump_fpu (regs, &dump->i387);
  32.311 -}
  32.312 -
  32.313 -/*
  32.314 - *	switch_to(x,yn) should switch tasks from x to y.
  32.315 - *
  32.316 - * We fsave/fwait so that an exception goes off at the right time
  32.317 - * (as a call from the fsave or fwait in effect) rather than to
  32.318 - * the wrong process. Lazy FP saving no longer makes any sense
  32.319 - * with modern CPU's, and this simplifies a lot of things (SMP
  32.320 - * and UP become the same).
  32.321 - *
  32.322 - * NOTE! We used to use the x86 hardware context switching. The
  32.323 - * reason for not using it any more becomes apparent when you
  32.324 - * try to recover gracefully from saved state that is no longer
  32.325 - * valid (stale segment register values in particular). With the
  32.326 - * hardware task-switch, there is no way to fix up bad state in
  32.327 - * a reasonable manner.
  32.328 - *
  32.329 - * The fact that Intel documents the hardware task-switching to
  32.330 - * be slow is a fairly red herring - this code is not noticeably
  32.331 - * faster. However, there _is_ some room for improvement here,
  32.332 - * so the performance issues may eventually be a valid point.
  32.333 - * More important, however, is the fact that this allows us much
  32.334 - * more flexibility.
  32.335 - */
  32.336 -void __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
  32.337 -{
  32.338 -    struct thread_struct *prev = &prev_p->thread,
  32.339 -        *next = &next_p->thread;
  32.340 -
  32.341 -    unlazy_fpu(prev_p);
  32.342 -
  32.343 -    HYPERVISOR_stack_and_ldt_switch(__KERNEL_DS, next->esp0, 0);
  32.344 -
  32.345 -    /*
  32.346 -     * Save away %fs and %gs. No need to save %es and %ds, as
  32.347 -     * those are always kernel segments while inside the kernel.
  32.348 -     */
  32.349 -    asm volatile("movl %%fs,%0":"=m" (*(int *)&prev->fs));
  32.350 -    asm volatile("movl %%gs,%0":"=m" (*(int *)&prev->gs));
  32.351 -
  32.352 -    /*
  32.353 -     * Restore %fs and %gs.
  32.354 -     */
  32.355 -    loadsegment(fs, next->fs);
  32.356 -    loadsegment(gs, next->gs);
  32.357 -
  32.358 -    /*
  32.359 -     * Now maybe reload the debug registers
  32.360 -     */
  32.361 -    if ( next->debugreg[7] != 0 )
  32.362 -    {
  32.363 -        HYPERVISOR_set_debugreg(0, next->debugreg[0]);
  32.364 -        HYPERVISOR_set_debugreg(1, next->debugreg[1]);
  32.365 -        HYPERVISOR_set_debugreg(2, next->debugreg[2]);
  32.366 -        HYPERVISOR_set_debugreg(3, next->debugreg[3]);
  32.367 -        /* no 4 and 5 */
  32.368 -        HYPERVISOR_set_debugreg(6, next->debugreg[6]);
  32.369 -        HYPERVISOR_set_debugreg(7, next->debugreg[7]);
  32.370 -    }
  32.371 -}
  32.372 -
  32.373 -asmlinkage int sys_fork(struct pt_regs regs)
  32.374 -{
  32.375 -    return do_fork(SIGCHLD, regs.esp, &regs, 0);
  32.376 -}
  32.377 -
  32.378 -asmlinkage int sys_clone(struct pt_regs regs)
  32.379 -{
  32.380 -    unsigned long clone_flags;
  32.381 -    unsigned long newsp;
  32.382 -
  32.383 -    clone_flags = regs.ebx;
  32.384 -    newsp = regs.ecx;
  32.385 -    if (!newsp)
  32.386 -        newsp = regs.esp;
  32.387 -    return do_fork(clone_flags, newsp, &regs, 0);
  32.388 -}
  32.389 -
  32.390 -/*
  32.391 - * This is trivial, and on the face of it looks like it
  32.392 - * could equally well be done in user mode.
  32.393 - *
  32.394 - * Not so, for quite unobvious reasons - register pressure.
  32.395 - * In user mode vfork() cannot have a stack frame, and if
  32.396 - * done by calling the "clone()" system call directly, you
  32.397 - * do not have enough call-clobbered registers to hold all
  32.398 - * the information you need.
  32.399 - */
  32.400 -asmlinkage int sys_vfork(struct pt_regs regs)
  32.401 -{
  32.402 -    return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, &regs, 0);
  32.403 -}
  32.404 -
  32.405 -/*
  32.406 - * sys_execve() executes a new program.
  32.407 - */
  32.408 -asmlinkage int sys_execve(struct pt_regs regs)
  32.409 -{
  32.410 -    int error;
  32.411 -    char * filename;
  32.412 -
  32.413 -    filename = getname((char *) regs.ebx);
  32.414 -    error = PTR_ERR(filename);
  32.415 -    if (IS_ERR(filename))
  32.416 -        goto out;
  32.417 -    error = do_execve(filename, (char **) regs.ecx, (char **) regs.edx, &regs);
  32.418 -    if (error == 0)
  32.419 -        current->ptrace &= ~PT_DTRACE;
  32.420 -    putname(filename);
  32.421 - out:
  32.422 -    return error;
  32.423 -}
  32.424 -
  32.425 -/*
  32.426 - * These bracket the sleeping functions..
  32.427 - */
  32.428 -extern void scheduling_functions_start_here(void);
  32.429 -extern void scheduling_functions_end_here(void);
  32.430 -#define first_sched	((unsigned long) scheduling_functions_start_here)
  32.431 -#define last_sched	((unsigned long) scheduling_functions_end_here)
  32.432 -
  32.433 -unsigned long get_wchan(struct task_struct *p)
  32.434 -{
  32.435 -    unsigned long ebp, esp, eip;
  32.436 -    unsigned long stack_page;
  32.437 -    int count = 0;
  32.438 -    if (!p || p == current || p->state == TASK_RUNNING)
  32.439 -        return 0;
  32.440 -    stack_page = (unsigned long)p;
  32.441 -    esp = p->thread.esp;
  32.442 -    if (!stack_page || esp < stack_page || esp > 8188+stack_page)
  32.443 -        return 0;
  32.444 -    /* include/asm-i386/system.h:switch_to() pushes ebp last. */
  32.445 -    ebp = *(unsigned long *) esp;
  32.446 -    do {
  32.447 -        if (ebp < stack_page || ebp > 8184+stack_page)
  32.448 -            return 0;
  32.449 -        eip = *(unsigned long *) (ebp+4);
  32.450 -        if (eip < first_sched || eip >= last_sched)
  32.451 -            return eip;
  32.452 -        ebp = *(unsigned long *) ebp;
  32.453 -    } while (count++ < 16);
  32.454 -    return 0;
  32.455 -}
  32.456 -#undef last_sched
  32.457 -#undef first_sched
    33.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/ptrace.c	Tue Mar 25 11:15:01 2003 +0000
    33.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.3 @@ -1,463 +0,0 @@
    33.4 -/* ptrace.c */
    33.5 -/* By Ross Biro 1/23/92 */
    33.6 -/*
    33.7 - * Pentium III FXSR, SSE support
    33.8 - *	Gareth Hughes <gareth@valinux.com>, May 2000
    33.9 - */
   33.10 -
   33.11 -#include <linux/kernel.h>
   33.12 -#include <linux/sched.h>
   33.13 -#include <linux/mm.h>
   33.14 -#include <linux/smp.h>
   33.15 -#include <linux/smp_lock.h>
   33.16 -#include <linux/errno.h>
   33.17 -#include <linux/ptrace.h>
   33.18 -#include <linux/user.h>
   33.19 -
   33.20 -#include <asm/uaccess.h>
   33.21 -#include <asm/pgtable.h>
   33.22 -#include <asm/system.h>
   33.23 -#include <asm/processor.h>
   33.24 -#include <asm/i387.h>
   33.25 -#include <asm/debugreg.h>
   33.26 -
   33.27 -/*
   33.28 - * does not yet catch signals sent when the child dies.
   33.29 - * in exit.c or in signal.c.
   33.30 - */
   33.31 -
   33.32 -/* determines which flags the user has access to. */
   33.33 -/* 1 = access 0 = no access */
   33.34 -#define FLAG_MASK 0x00044dd5
   33.35 -
   33.36 -/* set's the trap flag. */
   33.37 -#define TRAP_FLAG 0x100
   33.38 -
   33.39 -/*
   33.40 - * Offset of eflags on child stack..
   33.41 - */
   33.42 -#define EFL_OFFSET ((EFL-2)*4-sizeof(struct pt_regs))
   33.43 -
   33.44 -/*
   33.45 - * this routine will get a word off of the processes privileged stack. 
   33.46 - * the offset is how far from the base addr as stored in the TSS.  
   33.47 - * this routine assumes that all the privileged stacks are in our
   33.48 - * data space.
   33.49 - */   
   33.50 -static inline int get_stack_long(struct task_struct *task, int offset)
   33.51 -{
   33.52 -	unsigned char *stack;
   33.53 -
   33.54 -	stack = (unsigned char *)task->thread.esp0;
   33.55 -	stack += offset;
   33.56 -	return (*((int *)stack));
   33.57 -}
   33.58 -
   33.59 -/*
   33.60 - * this routine will put a word on the processes privileged stack. 
   33.61 - * the offset is how far from the base addr as stored in the TSS.  
   33.62 - * this routine assumes that all the privileged stacks are in our
   33.63 - * data space.
   33.64 - */
   33.65 -static inline int put_stack_long(struct task_struct *task, int offset,
   33.66 -	unsigned long data)
   33.67 -{
   33.68 -	unsigned char * stack;
   33.69 -
   33.70 -	stack = (unsigned char *) task->thread.esp0;
   33.71 -	stack += offset;
   33.72 -	*(unsigned long *) stack = data;
   33.73 -	return 0;
   33.74 -}
   33.75 -
   33.76 -static int putreg(struct task_struct *child,
   33.77 -	unsigned long regno, unsigned long value)
   33.78 -{
   33.79 -	switch (regno >> 2) {
   33.80 -		case FS:
   33.81 -			if (value && (value & 3) != 3)
   33.82 -				return -EIO;
   33.83 -			child->thread.fs = value;
   33.84 -			return 0;
   33.85 -		case GS:
   33.86 -			if (value && (value & 3) != 3)
   33.87 -				return -EIO;
   33.88 -			child->thread.gs = value;
   33.89 -			return 0;
   33.90 -		case DS:
   33.91 -		case ES:
   33.92 -			if (value && (value & 3) != 3)
   33.93 -				return -EIO;
   33.94 -			value &= 0xffff;
   33.95 -			break;
   33.96 -		case SS:
   33.97 -		case CS:
   33.98 -			if ((value & 3) != 3)
   33.99 -				return -EIO;
  33.100 -			value &= 0xffff;
  33.101 -			break;
  33.102 -		case EFL:
  33.103 -			value &= FLAG_MASK;
  33.104 -			value |= get_stack_long(child, EFL_OFFSET) & ~FLAG_MASK;
  33.105 -			break;
  33.106 -	}
  33.107 -	if (regno > GS*4)
  33.108 -		regno -= 2*4;
  33.109 -	put_stack_long(child, regno - sizeof(struct pt_regs), value);
  33.110 -	return 0;
  33.111 -}
  33.112 -
  33.113 -static unsigned long getreg(struct task_struct *child,
  33.114 -	unsigned long regno)
  33.115 -{
  33.116 -	unsigned long retval = ~0UL;
  33.117 -
  33.118 -	switch (regno >> 2) {
  33.119 -		case FS:
  33.120 -			retval = child->thread.fs;
  33.121 -			break;
  33.122 -		case GS:
  33.123 -			retval = child->thread.gs;
  33.124 -			break;
  33.125 -		case DS:
  33.126 -		case ES:
  33.127 -		case SS:
  33.128 -		case CS:
  33.129 -			retval = 0xffff;
  33.130 -			/* fall through */
  33.131 -		default:
  33.132 -			if (regno > GS*4)
  33.133 -				regno -= 2*4;
  33.134 -			regno = regno - sizeof(struct pt_regs);
  33.135 -			retval &= get_stack_long(child, regno);
  33.136 -	}
  33.137 -	return retval;
  33.138 -}
  33.139 -
  33.140 -/*
  33.141 - * Called by kernel/ptrace.c when detaching..
  33.142 - *
  33.143 - * Make sure the single step bit is not set.
  33.144 - */
  33.145 -void ptrace_disable(struct task_struct *child)
  33.146 -{ 
  33.147 -	long tmp;
  33.148 -
  33.149 -	tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG;
  33.150 -	put_stack_long(child, EFL_OFFSET, tmp);
  33.151 -}
  33.152 -
  33.153 -asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
  33.154 -{
  33.155 -	struct task_struct *child;
  33.156 -	struct user * dummy = NULL;
  33.157 -	int i, ret;
  33.158 -
  33.159 -	lock_kernel();
  33.160 -	ret = -EPERM;
  33.161 -	if (request == PTRACE_TRACEME) {
  33.162 -		/* are we already being traced? */
  33.163 -		if (current->ptrace & PT_PTRACED)
  33.164 -			goto out;
  33.165 -		/* set the ptrace bit in the process flags. */
  33.166 -		current->ptrace |= PT_PTRACED;
  33.167 -		ret = 0;
  33.168 -		goto out;
  33.169 -	}
  33.170 -	ret = -ESRCH;
  33.171 -	read_lock(&tasklist_lock);
  33.172 -	child = find_task_by_pid(pid);
  33.173 -	if (child)
  33.174 -		get_task_struct(child);
  33.175 -	read_unlock(&tasklist_lock);
  33.176 -	if (!child)
  33.177 -		goto out;
  33.178 -
  33.179 -	ret = -EPERM;
  33.180 -	if (pid == 1)		/* you may not mess with init */
  33.181 -		goto out_tsk;
  33.182 -
  33.183 -	if (request == PTRACE_ATTACH) {
  33.184 -		ret = ptrace_attach(child);
  33.185 -		goto out_tsk;
  33.186 -	}
  33.187 -
  33.188 -	ret = ptrace_check_attach(child, request == PTRACE_KILL);
  33.189 -	if (ret < 0)
  33.190 -		goto out_tsk;
  33.191 -
  33.192 -	switch (request) {
  33.193 -	/* when I and D space are separate, these will need to be fixed. */
  33.194 -	case PTRACE_PEEKTEXT: /* read word at location addr. */ 
  33.195 -	case PTRACE_PEEKDATA: {
  33.196 -		unsigned long tmp;
  33.197 -		int copied;
  33.198 -
  33.199 -		copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
  33.200 -		ret = -EIO;
  33.201 -		if (copied != sizeof(tmp))
  33.202 -			break;
  33.203 -		ret = put_user(tmp,(unsigned long *) data);
  33.204 -		break;
  33.205 -	}
  33.206 -
  33.207 -	/* read the word at location addr in the USER area. */
  33.208 -	case PTRACE_PEEKUSR: {
  33.209 -		unsigned long tmp;
  33.210 -
  33.211 -		ret = -EIO;
  33.212 -		if ((addr & 3) || addr < 0 || 
  33.213 -		    addr > sizeof(struct user) - 3)
  33.214 -			break;
  33.215 -
  33.216 -		tmp = 0;  /* Default return condition */
  33.217 -		if(addr < FRAME_SIZE*sizeof(long))
  33.218 -			tmp = getreg(child, addr);
  33.219 -		if(addr >= (long) &dummy->u_debugreg[0] &&
  33.220 -		   addr <= (long) &dummy->u_debugreg[7]){
  33.221 -			addr -= (long) &dummy->u_debugreg[0];
  33.222 -			addr = addr >> 2;
  33.223 -			tmp = child->thread.debugreg[addr];
  33.224 -		}
  33.225 -		ret = put_user(tmp,(unsigned long *) data);
  33.226 -		break;
  33.227 -	}
  33.228 -
  33.229 -	/* when I and D space are separate, this will have to be fixed. */
  33.230 -	case PTRACE_POKETEXT: /* write the word at location addr. */
  33.231 -	case PTRACE_POKEDATA:
  33.232 -		ret = 0;
  33.233 -		if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
  33.234 -			break;
  33.235 -		ret = -EIO;
  33.236 -		break;
  33.237 -
  33.238 -	case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
  33.239 -		ret = -EIO;
  33.240 -		if ((addr & 3) || addr < 0 || 
  33.241 -		    addr > sizeof(struct user) - 3)
  33.242 -			break;
  33.243 -
  33.244 -		if (addr < FRAME_SIZE*sizeof(long)) {
  33.245 -			ret = putreg(child, addr, data);
  33.246 -			break;
  33.247 -		}
  33.248 -		/* We need to be very careful here.  We implicitly
  33.249 -		   want to modify a portion of the task_struct, and we
  33.250 -		   have to be selective about what portions we allow someone
  33.251 -		   to modify. */
  33.252 -
  33.253 -		  ret = -EIO;
  33.254 -		  if(addr >= (long) &dummy->u_debugreg[0] &&
  33.255 -		     addr <= (long) &dummy->u_debugreg[7]){
  33.256 -
  33.257 -			  if(addr == (long) &dummy->u_debugreg[4]) break;
  33.258 -			  if(addr == (long) &dummy->u_debugreg[5]) break;
  33.259 -			  if(addr < (long) &dummy->u_debugreg[4] &&
  33.260 -			     ((unsigned long) data) >= TASK_SIZE-3) break;
  33.261 -			  
  33.262 -			  if(addr == (long) &dummy->u_debugreg[7]) {
  33.263 -				  data &= ~DR_CONTROL_RESERVED;
  33.264 -				  for(i=0; i<4; i++)
  33.265 -					  if ((0x5f54 >> ((data >> (16 + 4*i)) & 0xf)) & 1)
  33.266 -						  goto out_tsk;
  33.267 -			  }
  33.268 -
  33.269 -			  addr -= (long) &dummy->u_debugreg;
  33.270 -			  addr = addr >> 2;
  33.271 -			  child->thread.debugreg[addr] = data;
  33.272 -			  ret = 0;
  33.273 -		  }
  33.274 -		  break;
  33.275 -
  33.276 -	case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
  33.277 -	case PTRACE_CONT: { /* restart after signal. */
  33.278 -		long tmp;
  33.279 -
  33.280 -		ret = -EIO;
  33.281 -		if ((unsigned long) data > _NSIG)
  33.282 -			break;
  33.283 -		if (request == PTRACE_SYSCALL)
  33.284 -			child->ptrace |= PT_TRACESYS;
  33.285 -		else
  33.286 -			child->ptrace &= ~PT_TRACESYS;
  33.287 -		child->exit_code = data;
  33.288 -	/* make sure the single step bit is not set. */
  33.289 -		tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG;
  33.290 -		put_stack_long(child, EFL_OFFSET,tmp);
  33.291 -		wake_up_process(child);
  33.292 -		ret = 0;
  33.293 -		break;
  33.294 -	}
  33.295 -
  33.296 -/*
  33.297 - * make the child exit.  Best I can do is send it a sigkill. 
  33.298 - * perhaps it should be put in the status that it wants to 
  33.299 - * exit.
  33.300 - */
  33.301 -	case PTRACE_KILL: {
  33.302 -		long tmp;
  33.303 -
  33.304 -		ret = 0;
  33.305 -		if (child->state == TASK_ZOMBIE)	/* already dead */
  33.306 -			break;
  33.307 -		child->exit_code = SIGKILL;
  33.308 -		/* make sure the single step bit is not set. */
  33.309 -		tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG;
  33.310 -		put_stack_long(child, EFL_OFFSET, tmp);
  33.311 -		wake_up_process(child);
  33.312 -		break;
  33.313 -	}
  33.314 -
  33.315 -	case PTRACE_SINGLESTEP: {  /* set the trap flag. */
  33.316 -		long tmp;
  33.317 -
  33.318 -		ret = -EIO;
  33.319 -		if ((unsigned long) data > _NSIG)
  33.320 -			break;
  33.321 -		child->ptrace &= ~PT_TRACESYS;
  33.322 -		if ((child->ptrace & PT_DTRACE) == 0) {
  33.323 -			/* Spurious delayed TF traps may occur */
  33.324 -			child->ptrace |= PT_DTRACE;
  33.325 -		}
  33.326 -		tmp = get_stack_long(child, EFL_OFFSET) | TRAP_FLAG;
  33.327 -		put_stack_long(child, EFL_OFFSET, tmp);
  33.328 -		child->exit_code = data;
  33.329 -		/* give it a chance to run. */
  33.330 -		wake_up_process(child);
  33.331 -		ret = 0;
  33.332 -		break;
  33.333 -	}
  33.334 -
  33.335 -	case PTRACE_DETACH:
  33.336 -		/* detach a process that was attached. */
  33.337 -		ret = ptrace_detach(child, data);
  33.338 -		break;
  33.339 -
  33.340 -	case PTRACE_GETREGS: { /* Get all gp regs from the child. */
  33.341 -	  	if (!access_ok(VERIFY_WRITE, (unsigned *)data, FRAME_SIZE*sizeof(long))) {
  33.342 -			ret = -EIO;
  33.343 -			break;
  33.344 -		}
  33.345 -		for ( i = 0; i < FRAME_SIZE*sizeof(long); i += sizeof(long) ) {
  33.346 -			__put_user(getreg(child, i),(unsigned long *) data);
  33.347 -			data += sizeof(long);
  33.348 -		}
  33.349 -		ret = 0;
  33.350 -		break;
  33.351 -	}
  33.352 -
  33.353 -	case PTRACE_SETREGS: { /* Set all gp regs in the child. */
  33.354 -		unsigned long tmp;
  33.355 -	  	if (!access_ok(VERIFY_READ, (unsigned *)data, FRAME_SIZE*sizeof(long))) {
  33.356 -			ret = -EIO;
  33.357 -			break;
  33.358 -		}
  33.359 -		for ( i = 0; i < FRAME_SIZE*sizeof(long); i += sizeof(long) ) {
  33.360 -			__get_user(tmp, (unsigned long *) data);
  33.361 -			putreg(child, i, tmp);
  33.362 -			data += sizeof(long);
  33.363 -		}
  33.364 -		ret = 0;
  33.365 -		break;
  33.366 -	}
  33.367 -
  33.368 -	case PTRACE_GETFPREGS: { /* Get the child FPU state. */
  33.369 -		if (!access_ok(VERIFY_WRITE, (unsigned *)data,
  33.370 -			       sizeof(struct user_i387_struct))) {
  33.371 -			ret = -EIO;
  33.372 -			break;
  33.373 -		}
  33.374 -		ret = 0;
  33.375 -		if ( !child->used_math ) {
  33.376 -			/* Simulate an empty FPU. */
  33.377 -			set_fpu_cwd(child, 0x037f);
  33.378 -			set_fpu_swd(child, 0x0000);
  33.379 -			set_fpu_twd(child, 0xffff);
  33.380 -		}
  33.381 -		get_fpregs((struct user_i387_struct *)data, child);
  33.382 -		break;
  33.383 -	}
  33.384 -
  33.385 -	case PTRACE_SETFPREGS: { /* Set the child FPU state. */
  33.386 -		if (!access_ok(VERIFY_READ, (unsigned *)data,
  33.387 -			       sizeof(struct user_i387_struct))) {
  33.388 -			ret = -EIO;
  33.389 -			break;
  33.390 -		}
  33.391 -		child->used_math = 1;
  33.392 -		set_fpregs(child, (struct user_i387_struct *)data);
  33.393 -		ret = 0;
  33.394 -		break;
  33.395 -	}
  33.396 -
  33.397 -	case PTRACE_GETFPXREGS: { /* Get the child extended FPU state. */
  33.398 -		if (!access_ok(VERIFY_WRITE, (unsigned *)data,
  33.399 -			       sizeof(struct user_fxsr_struct))) {
  33.400 -			ret = -EIO;
  33.401 -			break;
  33.402 -		}
  33.403 -		if ( !child->used_math ) {
  33.404 -			/* Simulate an empty FPU. */
  33.405 -			set_fpu_cwd(child, 0x037f);
  33.406 -			set_fpu_swd(child, 0x0000);
  33.407 -			set_fpu_twd(child, 0xffff);
  33.408 -			set_fpu_mxcsr(child, 0x1f80);
  33.409 -		}
  33.410 -		ret = get_fpxregs((struct user_fxsr_struct *)data, child);
  33.411 -		break;
  33.412 -	}
  33.413 -
  33.414 -	case PTRACE_SETFPXREGS: { /* Set the child extended FPU state. */
  33.415 -		if (!access_ok(VERIFY_READ, (unsigned *)data,
  33.416 -			       sizeof(struct user_fxsr_struct))) {
  33.417 -			ret = -EIO;
  33.418 -			break;
  33.419 -		}
  33.420 -		child->used_math = 1;
  33.421 -		ret = set_fpxregs(child, (struct user_fxsr_struct *)data);
  33.422 -		break;
  33.423 -	}
  33.424 -
  33.425 -	case PTRACE_SETOPTIONS: {
  33.426 -		if (data & PTRACE_O_TRACESYSGOOD)
  33.427 -			child->ptrace |= PT_TRACESYSGOOD;
  33.428 -		else
  33.429 -			child->ptrace &= ~PT_TRACESYSGOOD;
  33.430 -		ret = 0;
  33.431 -		break;
  33.432 -	}
  33.433 -
  33.434 -	default:
  33.435 -		ret = -EIO;
  33.436 -		break;
  33.437 -	}
  33.438 -out_tsk:
  33.439 -	free_task_struct(child);
  33.440 -out:
  33.441 -	unlock_kernel();
  33.442 -	return ret;
  33.443 -}
  33.444 -
  33.445 -asmlinkage void syscall_trace(void)
  33.446 -{
  33.447 -	if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) !=
  33.448 -			(PT_PTRACED|PT_TRACESYS))
  33.449 -		return;
  33.450 -	/* the 0x80 provides a way for the tracing parent to distinguish
  33.451 -	   between a syscall stop and SIGTRAP delivery */
  33.452 -	current->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
  33.453 -					? 0x80 : 0);
  33.454 -	current->state = TASK_STOPPED;
  33.455 -	notify_parent(current, SIGCHLD);
  33.456 -	schedule();
  33.457 -	/*
  33.458 -	 * this isn't the same as continuing with a signal, but it will do
  33.459 -	 * for normal use.  strace only continues with a signal if the
  33.460 -	 * stopping signal is not SIGTRAP.  -brl
  33.461 -	 */
  33.462 -	if (current->exit_code) {
  33.463 -		send_sig(current->exit_code, current, 1);
  33.464 -		current->exit_code = 0;
  33.465 -	}
  33.466 -}
    34.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/semaphore.c	Tue Mar 25 11:15:01 2003 +0000
    34.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.3 @@ -1,292 +0,0 @@
    34.4 -/*
    34.5 - * i386 semaphore implementation.
    34.6 - *
    34.7 - * (C) Copyright 1999 Linus Torvalds
    34.8 - *
    34.9 - * Portions Copyright 1999 Red Hat, Inc.
   34.10 - *
   34.11 - *	This program is free software; you can redistribute it and/or
   34.12 - *	modify it under the terms of the GNU General Public License
   34.13 - *	as published by the Free Software Foundation; either version
   34.14 - *	2 of the License, or (at your option) any later version.
   34.15 - *
   34.16 - * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@redhat.com>
   34.17 - */
   34.18 -#include <linux/config.h>
   34.19 -#include <linux/sched.h>
   34.20 -#include <asm/semaphore.h>
   34.21 -
   34.22 -/*
   34.23 - * Semaphores are implemented using a two-way counter:
   34.24 - * The "count" variable is decremented for each process
   34.25 - * that tries to acquire the semaphore, while the "sleeping"
   34.26 - * variable is a count of such acquires.
   34.27 - *
   34.28 - * Notably, the inline "up()" and "down()" functions can
   34.29 - * efficiently test if they need to do any extra work (up
   34.30 - * needs to do something only if count was negative before
   34.31 - * the increment operation.
   34.32 - *
   34.33 - * "sleeping" and the contention routine ordering is
   34.34 - * protected by the semaphore spinlock.
   34.35 - *
   34.36 - * Note that these functions are only called when there is
   34.37 - * contention on the lock, and as such all this is the
   34.38 - * "non-critical" part of the whole semaphore business. The
   34.39 - * critical part is the inline stuff in <asm/semaphore.h>
   34.40 - * where we want to avoid any extra jumps and calls.
   34.41 - */
   34.42 -
   34.43 -/*
   34.44 - * Logic:
   34.45 - *  - only on a boundary condition do we need to care. When we go
   34.46 - *    from a negative count to a non-negative, we wake people up.
   34.47 - *  - when we go from a non-negative count to a negative do we
   34.48 - *    (a) synchronize with the "sleeper" count and (b) make sure
   34.49 - *    that we're on the wakeup list before we synchronize so that
   34.50 - *    we cannot lose wakeup events.
   34.51 - */
   34.52 -
   34.53 -void __up(struct semaphore *sem)
   34.54 -{
   34.55 -	wake_up(&sem->wait);
   34.56 -}
   34.57 -
   34.58 -static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED;
   34.59 -
   34.60 -void __down(struct semaphore * sem)
   34.61 -{
   34.62 -	struct task_struct *tsk = current;
   34.63 -	DECLARE_WAITQUEUE(wait, tsk);
   34.64 -	tsk->state = TASK_UNINTERRUPTIBLE;
   34.65 -	add_wait_queue_exclusive(&sem->wait, &wait);
   34.66 -
   34.67 -	spin_lock_irq(&semaphore_lock);
   34.68 -	sem->sleepers++;
   34.69 -	for (;;) {
   34.70 -		int sleepers = sem->sleepers;
   34.71 -
   34.72 -		/*
   34.73 -		 * Add "everybody else" into it. They aren't
   34.74 -		 * playing, because we own the spinlock.
   34.75 -		 */
   34.76 -		if (!atomic_add_negative(sleepers - 1, &sem->count)) {
   34.77 -			sem->sleepers = 0;
   34.78 -			break;
   34.79 -		}
   34.80 -		sem->sleepers = 1;	/* us - see -1 above */
   34.81 -		spin_unlock_irq(&semaphore_lock);
   34.82 -
   34.83 -		schedule();
   34.84 -		tsk->state = TASK_UNINTERRUPTIBLE;
   34.85 -		spin_lock_irq(&semaphore_lock);
   34.86 -	}
   34.87 -	spin_unlock_irq(&semaphore_lock);
   34.88 -	remove_wait_queue(&sem->wait, &wait);
   34.89 -	tsk->state = TASK_RUNNING;
   34.90 -	wake_up(&sem->wait);
   34.91 -}
   34.92 -
   34.93 -int __down_interruptible(struct semaphore * sem)
   34.94 -{
   34.95 -	int retval = 0;
   34.96 -	struct task_struct *tsk = current;
   34.97 -	DECLARE_WAITQUEUE(wait, tsk);
   34.98 -	tsk->state = TASK_INTERRUPTIBLE;
   34.99 -	add_wait_queue_exclusive(&sem->wait, &wait);
  34.100 -
  34.101 -	spin_lock_irq(&semaphore_lock);
  34.102 -	sem->sleepers ++;
  34.103 -	for (;;) {
  34.104 -		int sleepers = sem->sleepers;
  34.105 -
  34.106 -		/*
  34.107 -		 * With signals pending, this turns into
  34.108 -		 * the trylock failure case - we won't be
  34.109 -		 * sleeping, and we* can't get the lock as
  34.110 -		 * it has contention. Just correct the count
  34.111 -		 * and exit.
  34.112 -		 */
  34.113 -		if (signal_pending(current)) {
  34.114 -			retval = -EINTR;
  34.115 -			sem->sleepers = 0;
  34.116 -			atomic_add(sleepers, &sem->count);
  34.117 -			break;
  34.118 -		}
  34.119 -
  34.120 -		/*
  34.121 -		 * Add "everybody else" into it. They aren't
  34.122 -		 * playing, because we own the spinlock. The
  34.123 -		 * "-1" is because we're still hoping to get
  34.124 -		 * the lock.
  34.125 -		 */
  34.126 -		if (!atomic_add_negative(sleepers - 1, &sem->count)) {
  34.127 -			sem->sleepers = 0;
  34.128 -			break;
  34.129 -		}
  34.130 -		sem->sleepers = 1;	/* us - see -1 above */
  34.131 -		spin_unlock_irq(&semaphore_lock);
  34.132 -
  34.133 -		schedule();
  34.134 -		tsk->state = TASK_INTERRUPTIBLE;
  34.135 -		spin_lock_irq(&semaphore_lock);
  34.136 -	}
  34.137 -	spin_unlock_irq(&semaphore_lock);
  34.138 -	tsk->state = TASK_RUNNING;
  34.139 -	remove_wait_queue(&sem->wait, &wait);
  34.140 -	wake_up(&sem->wait);
  34.141 -	return retval;
  34.142 -}
  34.143 -
  34.144 -/*
  34.145 - * Trylock failed - make sure we correct for
  34.146 - * having decremented the count.
  34.147 - *
  34.148 - * We could have done the trylock with a
  34.149 - * single "cmpxchg" without failure cases,
  34.150 - * but then it wouldn't work on a 386.
  34.151 - */
  34.152 -int __down_trylock(struct semaphore * sem)
  34.153 -{
  34.154 -	int sleepers;
  34.155 -	unsigned long flags;
  34.156 -
  34.157 -	spin_lock_irqsave(&semaphore_lock, flags);
  34.158 -	sleepers = sem->sleepers + 1;
  34.159 -	sem->sleepers = 0;
  34.160 -
  34.161 -	/*
  34.162 -	 * Add "everybody else" and us into it. They aren't
  34.163 -	 * playing, because we own the spinlock.
  34.164 -	 */
  34.165 -	if (!atomic_add_negative(sleepers, &sem->count))
  34.166 -		wake_up(&sem->wait);
  34.167 -
  34.168 -	spin_unlock_irqrestore(&semaphore_lock, flags);
  34.169 -	return 1;
  34.170 -}
  34.171 -
  34.172 -
  34.173 -/*
  34.174 - * The semaphore operations have a special calling sequence that
  34.175 - * allow us to do a simpler in-line version of them. These routines
  34.176 - * need to convert that sequence back into the C sequence when
  34.177 - * there is contention on the semaphore.
  34.178 - *
  34.179 - * %ecx contains the semaphore pointer on entry. Save the C-clobbered
  34.180 - * registers (%eax, %edx and %ecx) except %eax when used as a return
  34.181 - * value..
  34.182 - */
  34.183 -asm(
  34.184 -".text\n"
  34.185 -".align 4\n"
  34.186 -".globl __down_failed\n"
  34.187 -"__down_failed:\n\t"
  34.188 -#if defined(CONFIG_FRAME_POINTER)
  34.189 -	"pushl %ebp\n\t"
  34.190 -	"movl  %esp,%ebp\n\t"
  34.191 -#endif
  34.192 -	"pushl %eax\n\t"
  34.193 -	"pushl %edx\n\t"
  34.194 -	"pushl %ecx\n\t"
  34.195 -	"call __down\n\t"
  34.196 -	"popl %ecx\n\t"
  34.197 -	"popl %edx\n\t"
  34.198 -	"popl %eax\n\t"
  34.199 -#if defined(CONFIG_FRAME_POINTER)
  34.200 -	"movl %ebp,%esp\n\t"
  34.201 -	"popl %ebp\n\t"
  34.202 -#endif
  34.203 -	"ret"
  34.204 -);
  34.205 -
  34.206 -asm(
  34.207 -".text\n"
  34.208 -".align 4\n"
  34.209 -".globl __down_failed_interruptible\n"
  34.210 -"__down_failed_interruptible:\n\t"
  34.211 -#if defined(CONFIG_FRAME_POINTER)
  34.212 -	"pushl %ebp\n\t"
  34.213 -	"movl  %esp,%ebp\n\t"
  34.214 -#endif
  34.215 -	"pushl %edx\n\t"
  34.216 -	"pushl %ecx\n\t"
  34.217 -	"call __down_interruptible\n\t"
  34.218 -	"popl %ecx\n\t"
  34.219 -	"popl %edx\n\t"
  34.220 -#if defined(CONFIG_FRAME_POINTER)
  34.221 -	"movl %ebp,%esp\n\t"
  34.222 -	"popl %ebp\n\t"
  34.223 -#endif
  34.224 -	"ret"
  34.225 -);
  34.226 -
  34.227 -asm(
  34.228 -".text\n"
  34.229 -".align 4\n"
  34.230 -".globl __down_failed_trylock\n"
  34.231 -"__down_failed_trylock:\n\t"
  34.232 -#if defined(CONFIG_FRAME_POINTER)
  34.233 -	"pushl %ebp\n\t"
  34.234 -	"movl  %esp,%ebp\n\t"
  34.235 -#endif
  34.236 -	"pushl %edx\n\t"
  34.237 -	"pushl %ecx\n\t"
  34.238 -	"call __down_trylock\n\t"
  34.239 -	"popl %ecx\n\t"
  34.240 -	"popl %edx\n\t"
  34.241 -#if defined(CONFIG_FRAME_POINTER)
  34.242 -	"movl %ebp,%esp\n\t"
  34.243 -	"popl %ebp\n\t"
  34.244 -#endif
  34.245 -	"ret"
  34.246 -);
  34.247 -
  34.248 -asm(
  34.249 -".text\n"
  34.250 -".align 4\n"
  34.251 -".globl __up_wakeup\n"
  34.252 -"__up_wakeup:\n\t"
  34.253 -	"pushl %eax\n\t"
  34.254 -	"pushl %edx\n\t"
  34.255 -	"pushl %ecx\n\t"
  34.256 -	"call __up\n\t"
  34.257 -	"popl %ecx\n\t"
  34.258 -	"popl %edx\n\t"
  34.259 -	"popl %eax\n\t"
  34.260 -	"ret"
  34.261 -);
  34.262 -
  34.263 -/*
  34.264 - * rw spinlock fallbacks
  34.265 - */
  34.266 -#if defined(CONFIG_SMP)
  34.267 -asm(
  34.268 -"
  34.269 -.align	4
  34.270 -.globl	__write_lock_failed
  34.271 -__write_lock_failed:
  34.272 -	" LOCK "addl	$" RW_LOCK_BIAS_STR ",(%eax)
  34.273 -1:	rep; nop
  34.274 -	cmpl	$" RW_LOCK_BIAS_STR ",(%eax)
  34.275 -	jne	1b
  34.276 -
  34.277 -	" LOCK "subl	$" RW_LOCK_BIAS_STR ",(%eax)
  34.278 -	jnz	__write_lock_failed
  34.279 -	ret
  34.280 -
  34.281 -
  34.282 -.align	4
  34.283 -.globl	__read_lock_failed
  34.284 -__read_lock_failed:
  34.285 -	lock ; incl	(%eax)
  34.286 -1:	rep; nop
  34.287 -	cmpl	$1,(%eax)
  34.288 -	js	1b
  34.289 -
  34.290 -	lock ; decl	(%eax)
  34.291 -	js	__read_lock_failed
  34.292 -	ret
  34.293 -"
  34.294 -);
  34.295 -#endif
    35.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/setup.c	Tue Mar 25 11:15:01 2003 +0000
    35.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.3 @@ -1,996 +0,0 @@
    35.4 -/*
    35.5 - *  linux/arch/i386/kernel/setup.c
    35.6 - *
    35.7 - *  Copyright (C) 1995  Linus Torvalds
    35.8 - */
    35.9 -
   35.10 -/*
   35.11 - * This file handles the architecture-dependent parts of initialization
   35.12 - */
   35.13 -
   35.14 -#include <linux/errno.h>
   35.15 -#include <linux/sched.h>
   35.16 -#include <linux/kernel.h>
   35.17 -#include <linux/mm.h>
   35.18 -#include <linux/stddef.h>
   35.19 -#include <linux/unistd.h>
   35.20 -#include <linux/ptrace.h>
   35.21 -#include <linux/slab.h>
   35.22 -#include <linux/user.h>
   35.23 -#include <linux/a.out.h>
   35.24 -#include <linux/tty.h>
   35.25 -#include <linux/ioport.h>
   35.26 -#include <linux/delay.h>
   35.27 -#include <linux/config.h>
   35.28 -#include <linux/init.h>
   35.29 -#include <linux/apm_bios.h>
   35.30 -#ifdef CONFIG_BLK_DEV_RAM
   35.31 -#include <linux/blk.h>
   35.32 -#endif
   35.33 -#include <linux/highmem.h>
   35.34 -#include <linux/bootmem.h>
   35.35 -#include <linux/seq_file.h>
   35.36 -#include <asm/processor.h>
   35.37 -#include <linux/console.h>
   35.38 -#include <asm/mtrr.h>
   35.39 -#include <asm/uaccess.h>
   35.40 -#include <asm/system.h>
   35.41 -#include <asm/io.h>
   35.42 -#include <asm/smp.h>
   35.43 -#include <asm/msr.h>
   35.44 -#include <asm/desc.h>
   35.45 -#include <asm/dma.h>
   35.46 -#include <asm/mpspec.h>
   35.47 -#include <asm/mmu_context.h>
   35.48 -#include <asm/hypervisor.h>
   35.49 -
   35.50 -shared_info_t *HYPERVISOR_shared_info;
   35.51 -
   35.52 -unsigned long *phys_to_machine_mapping;
   35.53 -
   35.54 -/*
   35.55 - * Machine setup..
   35.56 - */
   35.57 -
   35.58 -char ignore_irq13;		/* set if exception 16 works */
   35.59 -struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
   35.60 -
   35.61 -unsigned long mmu_cr4_features;
   35.62 -
   35.63 -/*
   35.64 - * Bus types ..
   35.65 - */
   35.66 -#ifdef CONFIG_EISA
   35.67 -int EISA_bus;
   35.68 -#endif
   35.69 -int MCA_bus;
   35.70 -
   35.71 -/* for MCA, but anyone else can use it if they want */
   35.72 -unsigned int machine_id;
   35.73 -unsigned int machine_submodel_id;
   35.74 -unsigned int BIOS_revision;
   35.75 -unsigned int mca_pentium_flag;
   35.76 -
   35.77 -/* For PCI or other memory-mapped resources */
   35.78 -unsigned long pci_mem_start = 0x10000000;
   35.79 -
   35.80 -/*
   35.81 - * Setup options
   35.82 - */
   35.83 -struct drive_info_struct { char dummy[32]; } drive_info;
   35.84 -struct screen_info screen_info;
   35.85 -struct apm_info apm_info;
   35.86 -struct sys_desc_table_struct {
   35.87 -    unsigned short length;
   35.88 -    unsigned char table[0];
   35.89 -};
   35.90 -
   35.91 -unsigned char aux_device_present;
   35.92 -
   35.93 -extern int root_mountflags;
   35.94 -extern char _text, _etext, _edata, _end;
   35.95 -
   35.96 -int enable_acpi_smp_table;
   35.97 -
   35.98 -/* Raw start-of-day parameters from the hypervisor. */
   35.99 -union start_info_union start_info_union;
  35.100 -
  35.101 -#define COMMAND_LINE_SIZE 256
  35.102 -static char command_line[COMMAND_LINE_SIZE];
  35.103 -char saved_command_line[COMMAND_LINE_SIZE];
  35.104 -
  35.105 -static void __init parse_mem_cmdline (char ** cmdline_p)
  35.106 -{
  35.107 -    char c = ' ', *to = command_line, *from = saved_command_line;
  35.108 -    int len = 0;
  35.109 -
  35.110 -    /* Save unparsed command line copy for /proc/cmdline */
  35.111 -    memcpy(saved_command_line, start_info.cmd_line, COMMAND_LINE_SIZE);
  35.112 -    saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
  35.113 -
  35.114 -    for (;;) {
  35.115 -        /*
  35.116 -         * "mem=nopentium" disables the 4MB page tables.
  35.117 -         * "mem=XXX[kKmM]" defines a memory region from HIGH_MEM
  35.118 -         * to <mem>, overriding the bios size.
  35.119 -         * "mem=XXX[KkmM]@XXX[KkmM]" defines a memory region from
  35.120 -         * <start> to <start>+<mem>, overriding the bios size.
  35.121 -         */
  35.122 -        if (c == ' ' && !memcmp(from, "mem=", 4)) {
  35.123 -            if (to != command_line)
  35.124 -                to--;
  35.125 -            if (!memcmp(from+4, "nopentium", 9)) {
  35.126 -                from += 9+4;
  35.127 -            } else if (!memcmp(from+4, "exactmap", 8)) {
  35.128 -                from += 8+4;
  35.129 -            } else {
  35.130 -                (void)memparse(from+4, &from);
  35.131 -                if (*from == '@')
  35.132 -                    (void)memparse(from+1, &from);
  35.133 -            }
  35.134 -        }
  35.135 -
  35.136 -        c = *(from++);
  35.137 -        if (!c)
  35.138 -            break;
  35.139 -        if (COMMAND_LINE_SIZE <= ++len)
  35.140 -            break;
  35.141 -        *(to++) = c;
  35.142 -    }
  35.143 -    *to = '\0';
  35.144 -    *cmdline_p = command_line;
  35.145 -}
  35.146 -
  35.147 -void __init setup_arch(char **cmdline_p)
  35.148 -{
  35.149 -    unsigned long start_pfn, max_pfn, max_low_pfn;
  35.150 -    unsigned long bootmap_size;
  35.151 -    unsigned long i;
  35.152 -
  35.153 -    extern void hypervisor_callback(void);
  35.154 -    extern void failsafe_callback(void);
  35.155 -
  35.156 -    extern unsigned long cpu0_pte_quicklist[];
  35.157 -    extern unsigned long cpu0_pgd_quicklist[];
  35.158 -
  35.159 -    HYPERVISOR_shared_info->event_address    = 
  35.160 -        (unsigned long)hypervisor_callback;
  35.161 -    HYPERVISOR_shared_info->failsafe_address =
  35.162 -        (unsigned long)failsafe_callback;
  35.163 -
  35.164 -    boot_cpu_data.pgd_quick = cpu0_pgd_quicklist;
  35.165 -    boot_cpu_data.pte_quick = cpu0_pte_quicklist;
  35.166 -
  35.167 -    ROOT_DEV = MKDEV(RAMDISK_MAJOR,0);
  35.168 -    memset(&drive_info, 0, sizeof(drive_info));
  35.169 -    memset(&screen_info, 0, sizeof(screen_info));
  35.170 -    memset(&apm_info.bios, 0, sizeof(apm_info.bios));
  35.171 -    aux_device_present = 0;
  35.172 -
  35.173 -#ifdef CONFIG_BLK_DEV_RAM
  35.174 -    rd_image_start = 0;
  35.175 -    rd_prompt = 0;
  35.176 -    rd_doload = 0;
  35.177 -#endif
  35.178 -
  35.179 -    root_mountflags &= ~MS_RDONLY;
  35.180 -    init_mm.start_code = (unsigned long) &_text;
  35.181 -    init_mm.end_code = (unsigned long) &_etext;
  35.182 -    init_mm.end_data = (unsigned long) &_edata;
  35.183 -    init_mm.brk = (unsigned long) &_end;
  35.184 -
  35.185 -    parse_mem_cmdline(cmdline_p);
  35.186 -
  35.187 -#define PFN_UP(x)	(((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
  35.188 -#define PFN_DOWN(x)	((x) >> PAGE_SHIFT)
  35.189 -#define PFN_PHYS(x)	((x) << PAGE_SHIFT)
  35.190 -
  35.191 -/*
  35.192 - * 128MB for vmalloc and initrd
  35.193 - */
  35.194 -#define VMALLOC_RESERVE	(unsigned long)(128 << 20)
  35.195 -#define MAXMEM		(unsigned long)(HYPERVISOR_VIRT_START-PAGE_OFFSET-VMALLOC_RESERVE)
  35.196 -#define MAXMEM_PFN	PFN_DOWN(MAXMEM)
  35.197 -#define MAX_NONPAE_PFN	(1 << 20)
  35.198 -
  35.199 -    /*
  35.200 -     * partially used pages are not usable - thus
  35.201 -     * we are rounding upwards:
  35.202 -     */
  35.203 -#ifdef CONFIG_BLK_DEV_INITRD
  35.204 -    if ( start_info.mod_start )
  35.205 -        start_pfn = PFN_UP(__pa(start_info.mod_start + start_info.mod_len));
  35.206 -    else
  35.207 -#endif
  35.208 -    start_pfn = PFN_UP(__pa(&_end));
  35.209 -    max_pfn = start_info.nr_pages;
  35.210 -
  35.211 -    /*
  35.212 -     * Determine low and high memory ranges:
  35.213 -     */
  35.214 -    max_low_pfn = max_pfn;
  35.215 -    if (max_low_pfn > MAXMEM_PFN) {
  35.216 -        max_low_pfn = MAXMEM_PFN;
  35.217 -#ifndef CONFIG_HIGHMEM
  35.218 -        /* Maximum memory usable is what is directly addressable */
  35.219 -        printk(KERN_WARNING "Warning only %ldMB will be used.\n",
  35.220 -               MAXMEM>>20);
  35.221 -        if (max_pfn > MAX_NONPAE_PFN)
  35.222 -            printk(KERN_WARNING "Use a PAE enabled kernel.\n");
  35.223 -        else
  35.224 -            printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");
  35.225 -#else /* !CONFIG_HIGHMEM */
  35.226 -#ifndef CONFIG_X86_PAE
  35.227 -        if (max_pfn > MAX_NONPAE_PFN) {
  35.228 -            max_pfn = MAX_NONPAE_PFN;
  35.229 -            printk(KERN_WARNING "Warning only 4GB will be used.\n");
  35.230 -            printk(KERN_WARNING "Use a PAE enabled kernel.\n");
  35.231 -        }
  35.232 -#endif /* !CONFIG_X86_PAE */
  35.233 -#endif /* !CONFIG_HIGHMEM */
  35.234 -    }
  35.235 -
  35.236 -#ifdef CONFIG_HIGHMEM
  35.237 -    highstart_pfn = highend_pfn = max_pfn;
  35.238 -    if (max_pfn > MAXMEM_PFN) {
  35.239 -        highstart_pfn = MAXMEM_PFN;
  35.240 -        printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
  35.241 -               pages_to_mb(highend_pfn - highstart_pfn));
  35.242 -    }
  35.243 -#endif
  35.244 -
  35.245 -    /*
  35.246 -     * Initialize the boot-time allocator, and free up all RAM.
  35.247 -     * Then reserve space for OS image, and the bootmem bitmap.
  35.248 -     */
  35.249 -    bootmap_size = init_bootmem(start_pfn, max_low_pfn);
  35.250 -    free_bootmem(0, PFN_PHYS(max_low_pfn));
  35.251 -    reserve_bootmem(0, PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1);
  35.252 -
  35.253 -    /* Now reserve space for the hypervisor-provided page tables. */
  35.254 -    {
  35.255 -        unsigned long *pgd = (unsigned long *)start_info.pt_base;
  35.256 -        unsigned long  pte;
  35.257 -        int i;
  35.258 -        reserve_bootmem(__pa(pgd), PAGE_SIZE);
  35.259 -        for ( i = 0; i < (HYPERVISOR_VIRT_START>>22); i++ )
  35.260 -        {
  35.261 -            unsigned long pgde = *pgd++;
  35.262 -            if ( !(pgde & 1) ) continue;
  35.263 -            pte = machine_to_phys(pgde & PAGE_MASK);
  35.264 -            reserve_bootmem(pte, PAGE_SIZE);
  35.265 -        }
  35.266 -    }
  35.267 -    cur_pgd = init_mm.pgd = (pgd_t *)start_info.pt_base;
  35.268 -
  35.269 -    /* Now initialise the physical->machine mapping table. */
  35.270 -    phys_to_machine_mapping = alloc_bootmem(max_pfn * sizeof(unsigned long));
  35.271 -    for ( i = 0; i < max_pfn; i++ )
  35.272 -    {
  35.273 -        unsigned long pgde, *ppte;
  35.274 -        unsigned long pfn = i + (PAGE_OFFSET >> PAGE_SHIFT);
  35.275 -        pgde = *((unsigned long *)start_info.pt_base + (pfn >> 10));
  35.276 -        ppte = (unsigned long *)machine_to_phys(pgde & PAGE_MASK) + (pfn&1023);
  35.277 -        phys_to_machine_mapping[i] = 
  35.278 -            (*(unsigned long *)__va(ppte)) >> PAGE_SHIFT;
  35.279 -    }
  35.280 -
  35.281 -#ifdef CONFIG_BLK_DEV_INITRD
  35.282 -    if (start_info.mod_start) {
  35.283 -        if ((__pa(start_info.mod_start) + start_info.mod_len) <= 
  35.284 -            (max_low_pfn << PAGE_SHIFT)) {
  35.285 -            initrd_start = start_info.mod_start;
  35.286 -            initrd_end   = initrd_start + start_info.mod_len;
  35.287 -            initrd_below_start_ok = 1;
  35.288 -        }
  35.289 -        else {
  35.290 -            printk(KERN_ERR "initrd extends beyond end of memory "
  35.291 -                   "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
  35.292 -                   __pa(start_info.mod_start) + start_info.mod_len,
  35.293 -                   max_low_pfn << PAGE_SHIFT);
  35.294 -            initrd_start = 0;
  35.295 -        }
  35.296 -    }
  35.297 -#endif
  35.298 -
  35.299 -    paging_init();
  35.300 -}
  35.301 -
  35.302 -static int cachesize_override __initdata = -1;
  35.303 -static int __init cachesize_setup(char *str)
  35.304 -{
  35.305 -    get_option (&str, &cachesize_override);
  35.306 -    return 1;
  35.307 -}
  35.308 -__setup("cachesize=", cachesize_setup);
  35.309 -
  35.310 -
  35.311 -static int __init get_model_name(struct cpuinfo_x86 *c)
  35.312 -{
  35.313 -    unsigned int *v;
  35.314 -    char *p, *q;
  35.315 -
  35.316 -    if (cpuid_eax(0x80000000) < 0x80000004)
  35.317 -        return 0;
  35.318 -
  35.319 -    v = (unsigned int *) c->x86_model_id;
  35.320 -    cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]);
  35.321 -    cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]);
  35.322 -    cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]);
  35.323 -    c->x86_model_id[48] = 0;
  35.324 -
  35.325 -    /* Intel chips right-justify this string for some dumb reason;
  35.326 -       undo that brain damage */
  35.327 -    p = q = &c->x86_model_id[0];
  35.328 -    while ( *p == ' ' )
  35.329 -        p++;
  35.330 -    if ( p != q ) {
  35.331 -        while ( *p )
  35.332 -            *q++ = *p++;
  35.333 -        while ( q <= &c->x86_model_id[48] )
  35.334 -            *q++ = '\0';	/* Zero-pad the rest */
  35.335 -    }
  35.336 -
  35.337 -    return 1;
  35.338 -}
  35.339 -
  35.340 -
  35.341 -static void __init display_cacheinfo(struct cpuinfo_x86 *c)
  35.342 -{
  35.343 -    unsigned int n, dummy, ecx, edx, l2size;
  35.344 -
  35.345 -    n = cpuid_eax(0x80000000);
  35.346 -
  35.347 -    if (n >= 0x80000005) {
  35.348 -        cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
  35.349 -        printk(KERN_INFO "CPU: L1 I Cache: %dK (%d bytes/line), D cache %dK (%d bytes/line)\n",
  35.350 -               edx>>24, edx&0xFF, ecx>>24, ecx&0xFF);
  35.351 -        c->x86_cache_size=(ecx>>24)+(edx>>24);	
  35.352 -    }
  35.353 -
  35.354 -    if (n < 0x80000006)	/* Some chips just has a large L1. */
  35.355 -        return;
  35.356 -
  35.357 -    ecx = cpuid_ecx(0x80000006);
  35.358 -    l2size = ecx >> 16;
  35.359 -
  35.360 -    /* AMD errata T13 (order #21922) */
  35.361 -    if ((c->x86_vendor == X86_VENDOR_AMD) && (c->x86 == 6)) {
  35.362 -        if (c->x86_model == 3 && c->x86_mask == 0)	/* Duron Rev A0 */
  35.363 -            l2size = 64;
  35.364 -        if (c->x86_model == 4 &&
  35.365 -            (c->x86_mask==0 || c->x86_mask==1))	/* Tbird rev A1/A2 */
  35.366 -            l2size = 256;
  35.367 -    }
  35.368 -
  35.369 -    /* Intel PIII Tualatin. This comes in two flavours.
  35.370 -     * One has 256kb of cache, the other 512. We have no way
  35.371 -     * to determine which, so we use a boottime override
  35.372 -     * for the 512kb model, and assume 256 otherwise.
  35.373 -     */
  35.374 -    if ((c->x86_vendor == X86_VENDOR_INTEL) && (c->x86 == 6) &&
  35.375 -        (c->x86_model == 11) && (l2size == 0))
  35.376 -        l2size = 256;
  35.377 -
  35.378 -    /* VIA C3 CPUs (670-68F) need further shifting. */
  35.379 -    if (c->x86_vendor == X86_VENDOR_CENTAUR && (c->x86 == 6) &&
  35.380 -        ((c->x86_model == 7) || (c->x86_model == 8))) {
  35.381 -        l2size = l2size >> 8;
  35.382 -    }
  35.383 -
  35.384 -    /* Allow user to override all this if necessary. */
  35.385 -    if (cachesize_override != -1)
  35.386 -        l2size = cachesize_override;
  35.387 -
  35.388 -    if ( l2size == 0 )
  35.389 -        return;		/* Again, no L2 cache is possible */
  35.390 -
  35.391 -    c->x86_cache_size = l2size;
  35.392 -
  35.393 -    printk(KERN_INFO "CPU: L2 Cache: %dK (%d bytes/line)\n",
  35.394 -           l2size, ecx & 0xFF);
  35.395 -}
  35.396 -
  35.397 -
  35.398 -static int __init init_amd(struct cpuinfo_x86 *c)
  35.399 -{
  35.400 -    int r;
  35.401 -
  35.402 -    /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
  35.403 -       3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
  35.404 -    clear_bit(0*32+31, &c->x86_capability);
  35.405 -	
  35.406 -    r = get_model_name(c);
  35.407 -
  35.408 -    switch(c->x86)
  35.409 -    {
  35.410 -    case 6:	/* An Athlon/Duron. We can trust the BIOS probably */
  35.411 -        break;		
  35.412 -    default:
  35.413 -        panic("Unsupported AMD processor\n");
  35.414 -    }
  35.415 -
  35.416 -    display_cacheinfo(c);
  35.417 -    return r;
  35.418 -}
  35.419 -
  35.420 -
  35.421 -static void __init init_intel(struct cpuinfo_x86 *c)
  35.422 -{
  35.423 -    char *p = NULL;
  35.424 -    unsigned int l1i = 0, l1d = 0, l2 = 0, l3 = 0; /* Cache sizes */
  35.425 -
  35.426 -    if (c->cpuid_level > 1) {
  35.427 -        /* supports eax=2  call */
  35.428 -        int i, j, n;
  35.429 -        int regs[4];
  35.430 -        unsigned char *dp = (unsigned char *)regs;
  35.431 -
  35.432 -        /* Number of times to iterate */
  35.433 -        n = cpuid_eax(2) & 0xFF;
  35.434 -
  35.435 -        for ( i = 0 ; i < n ; i++ ) {
  35.436 -            cpuid(2, &regs[0], &regs[1], &regs[2], &regs[3]);
  35.437 -			
  35.438 -            /* If bit 31 is set, this is an unknown format */
  35.439 -            for ( j = 0 ; j < 3 ; j++ ) {
  35.440 -                if ( regs[j] < 0 ) regs[j] = 0;
  35.441 -            }
  35.442 -
  35.443 -            /* Byte 0 is level count, not a descriptor */
  35.444 -            for ( j = 1 ; j < 16 ; j++ ) {
  35.445 -                unsigned char des = dp[j];
  35.446 -                unsigned char dl, dh;
  35.447 -                unsigned int cs;
  35.448 -
  35.449 -                dh = des >> 4;
  35.450 -                dl = des & 0x0F;
  35.451 -
  35.452 -				/* Black magic... */
  35.453 -
  35.454 -                switch ( dh )
  35.455 -                {
  35.456 -                case 0:
  35.457 -                    switch ( dl ) {
  35.458 -                    case 6:
  35.459 -                        /* L1 I cache */
  35.460 -                        l1i += 8;
  35.461 -                        break;
  35.462 -                    case 8:
  35.463 -                        /* L1 I cache */
  35.464 -                        l1i += 16;
  35.465 -                        break;
  35.466 -                    case 10:
  35.467 -                        /* L1 D cache */
  35.468 -                        l1d += 8;
  35.469 -                        break;
  35.470 -                    case 12:
  35.471 -                        /* L1 D cache */
  35.472 -                        l1d += 16;
  35.473 -                        break;
  35.474 -                    default:;
  35.475 -                        /* TLB, or unknown */
  35.476 -                    }
  35.477 -                    break;
  35.478 -                case 2:
  35.479 -                    if ( dl ) {
  35.480 -                        /* L3 cache */
  35.481 -                        cs = (dl-1) << 9;
  35.482 -                        l3 += cs;
  35.483 -                    }
  35.484 -                    break;
  35.485 -                case 4:
  35.486 -                    if ( c->x86 > 6 && dl ) {
  35.487 -                        /* P4 family */
  35.488 -                        /* L3 cache */
  35.489 -                        cs = 128 << (dl-1);
  35.490 -                        l3 += cs;
  35.491 -                        break;
  35.492 -                    }
  35.493 -                    /* else same as 8 - fall through */
  35.494 -                case 8:
  35.495 -                    if ( dl ) {
  35.496 -                        /* L2 cache */
  35.497 -                        cs = 128 << (dl-1);
  35.498 -                        l2 += cs;
  35.499 -                    }
  35.500 -                    break;
  35.501 -                case 6:
  35.502 -                    if (dl > 5) {
  35.503 -                        /* L1 D cache */
  35.504 -                        cs = 8<<(dl-6);
  35.505 -                        l1d += cs;
  35.506 -                    }
  35.507 -                    break;
  35.508 -                case 7:
  35.509 -                    if ( dl >= 8 ) 
  35.510 -                    {
  35.511 -                        /* L2 cache */
  35.512 -                        cs = 64<<(dl-8);
  35.513 -                        l2 += cs;
  35.514 -                    } else {
  35.515 -                        /* L0 I cache, count as L1 */
  35.516 -                        cs = dl ? (16 << (dl-1)) : 12;
  35.517 -                        l1i += cs;
  35.518 -                    }
  35.519 -                    break;
  35.520 -                default:
  35.521 -                    /* TLB, or something else we don't know about */
  35.522 -                    break;
  35.523 -                }
  35.524 -            }
  35.525 -        }
  35.526 -        if ( l1i || l1d )
  35.527 -            printk(KERN_INFO "CPU: L1 I cache: %dK, L1 D cache: %dK\n",
  35.528 -                   l1i, l1d);
  35.529 -        if ( l2 )
  35.530 -            printk(KERN_INFO "CPU: L2 cache: %dK\n", l2);
  35.531 -        if ( l3 )
  35.532 -            printk(KERN_INFO "CPU: L3 cache: %dK\n", l3);
  35.533 -
  35.534 -        /*
  35.535 -         * This assumes the L3 cache is shared; it typically lives in
  35.536 -         * the northbridge.  The L1 caches are included by the L2
  35.537 -         * cache, and so should not be included for the purpose of
  35.538 -         * SMP switching weights.
  35.539 -         */
  35.540 -        c->x86_cache_size = l2 ? l2 : (l1i+l1d);
  35.541 -    }
  35.542 -
  35.543 -    /* SEP CPUID bug: Pentium Pro reports SEP but doesn't have it */
  35.544 -    if ( c->x86 == 6 && c->x86_model < 3 && c->x86_mask < 3 )
  35.545 -        clear_bit(X86_FEATURE_SEP, &c->x86_capability);
  35.546 -	
  35.547 -    /* Names for the Pentium II/Celeron processors 
  35.548 -       detectable only by also checking the cache size.
  35.549 -       Dixon is NOT a Celeron. */
  35.550 -    if (c->x86 == 6) {
  35.551 -        switch (c->x86_model) {
  35.552 -        case 5:
  35.553 -            if (l2 == 0)
  35.554 -                p = "Celeron (Covington)";
  35.555 -            if (l2 == 256)
  35.556 -                p = "Mobile Pentium II (Dixon)";
  35.557 -            break;
  35.558 -			
  35.559 -        case 6:
  35.560 -            if (l2 == 128)
  35.561 -                p = "Celeron (Mendocino)";
  35.562 -            break;
  35.563 -			
  35.564 -        case 8:
  35.565 -            if (l2 == 128)
  35.566 -                p = "Celeron (Coppermine)";
  35.567 -            break;
  35.568 -        }
  35.569 -    }
  35.570 -
  35.571 -    if ( p )
  35.572 -        strcpy(c->x86_model_id, p);
  35.573 -}
  35.574 -
  35.575 -void __init get_cpu_vendor(struct cpuinfo_x86 *c)
  35.576 -{
  35.577 -    char *v = c->x86_vendor_id;
  35.578 -
  35.579 -    if (!strcmp(v, "GenuineIntel"))
  35.580 -        c->x86_vendor = X86_VENDOR_INTEL;
  35.581 -    else if (!strcmp(v, "AuthenticAMD"))
  35.582 -        c->x86_vendor = X86_VENDOR_AMD;
  35.583 -    else
  35.584 -        c->x86_vendor = X86_VENDOR_UNKNOWN;
  35.585 -}
  35.586 -
  35.587 -struct cpu_model_info {
  35.588 -    int vendor;
  35.589 -    int family;
  35.590 -    char *model_names[16];
  35.591 -};
  35.592 -
  35.593 -/* Naming convention should be: <Name> [(<Codename>)] */
  35.594 -/* This table only is used unless init_<vendor>() below doesn't set it; */
  35.595 -/* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */
  35.596 -static struct cpu_model_info cpu_models[] __initdata = {
  35.597 -    { X86_VENDOR_INTEL,	6,
  35.598 -      { "Pentium Pro A-step", "Pentium Pro", NULL, "Pentium II (Klamath)", 
  35.599 -        NULL, "Pentium II (Deschutes)", "Mobile Pentium II",
  35.600 -        "Pentium III (Katmai)", "Pentium III (Coppermine)", NULL,
  35.601 -        "Pentium III (Cascades)", NULL, NULL, NULL, NULL }},
  35.602 -    { X86_VENDOR_AMD,	6, /* Is this this really necessary?? */
  35.603 -      { "Athlon", "Athlon",
  35.604 -        "Athlon", NULL, "Athlon", NULL,
  35.605 -        NULL, NULL, NULL,
  35.606 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL }}
  35.607 -};
  35.608 -
  35.609 -/* Look up CPU names by table lookup. */
  35.610 -static char __init *table_lookup_model(struct cpuinfo_x86 *c)
  35.611 -{
  35.612 -    struct cpu_model_info *info = cpu_models;
  35.613 -    int i;
  35.614 -
  35.615 -    if ( c->x86_model >= 16 )
  35.616 -        return NULL;	/* Range check */
  35.617 -
  35.618 -    for ( i = 0 ; i < sizeof(cpu_models)/sizeof(struct cpu_model_info) ; i++ ) {
  35.619 -        if ( info->vendor == c->x86_vendor &&
  35.620 -             info->family == c->x86 ) {
  35.621 -            return info->model_names[c->x86_model];
  35.622 -        }
  35.623 -        info++;
  35.624 -    }
  35.625 -    return NULL;		/* Not found */
  35.626 -}
  35.627 -
  35.628 -
  35.629 -
  35.630 -/* Standard macro to see if a specific flag is changeable */
  35.631 -static inline int flag_is_changeable_p(u32 flag)
  35.632 -{
  35.633 -    u32 f1, f2;
  35.634 -
  35.635 -    asm("pushfl\n\t"
  35.636 -        "pushfl\n\t"
  35.637 -        "popl %0\n\t"
  35.638 -        "movl %0,%1\n\t"
  35.639 -        "xorl %2,%0\n\t"
  35.640 -        "pushl %0\n\t"
  35.641 -        "popfl\n\t"
  35.642 -        "pushfl\n\t"
  35.643 -        "popl %0\n\t"
  35.644 -        "popfl\n\t"
  35.645 -        : "=&r" (f1), "=&r" (f2)
  35.646 -        : "ir" (flag));
  35.647 -
  35.648 -    return ((f1^f2) & flag) != 0;
  35.649 -}
  35.650 -
  35.651 -
  35.652 -/* Probe for the CPUID instruction */
  35.653 -static int __init have_cpuid_p(void)
  35.654 -{
  35.655 -    return flag_is_changeable_p(X86_EFLAGS_ID);
  35.656 -}
  35.657 -
  35.658 -
  35.659 -
  35.660 -/*
  35.661 - * This does the hard work of actually picking apart the CPU stuff...
  35.662 - */
  35.663 -void __init identify_cpu(struct cpuinfo_x86 *c)
  35.664 -{
  35.665 -    int junk, i;
  35.666 -    u32 xlvl, tfms;
  35.667 -
  35.668 -    c->loops_per_jiffy = loops_per_jiffy;
  35.669 -    c->x86_cache_size = -1;
  35.670 -    c->x86_vendor = X86_VENDOR_UNKNOWN;
  35.671 -    c->cpuid_level = -1;	/* CPUID not detected */
  35.672 -    c->x86_model = c->x86_mask = 0;	/* So far unknown... */
  35.673 -    c->x86_vendor_id[0] = '\0'; /* Unset */
  35.674 -    c->x86_model_id[0] = '\0';  /* Unset */
  35.675 -    memset(&c->x86_capability, 0, sizeof c->x86_capability);
  35.676 -    c->hard_math = 1;
  35.677 -
  35.678 -    if ( !have_cpuid_p() ) {
  35.679 -        panic("Processor must support CPUID\n");
  35.680 -    } else {
  35.681 -        /* CPU does have CPUID */
  35.682 -
  35.683 -        /* Get vendor name */
  35.684 -        cpuid(0x00000000, &c->cpuid_level,
  35.685 -              (int *)&c->x86_vendor_id[0],
  35.686 -              (int *)&c->x86_vendor_id[8],
  35.687 -              (int *)&c->x86_vendor_id[4]);
  35.688 -		
  35.689 -        get_cpu_vendor(c);
  35.690 -        /* Initialize the standard set of capabilities */
  35.691 -        /* Note that the vendor-specific code below might override */
  35.692 -
  35.693 -        /* Intel-defined flags: level 0x00000001 */
  35.694 -        if ( c->cpuid_level >= 0x00000001 ) {
  35.695 -            cpuid(0x00000001, &tfms, &junk, &junk,
  35.696 -                  &c->x86_capability[0]);
  35.697 -            c->x86 = (tfms >> 8) & 15;
  35.698 -            c->x86_model = (tfms >> 4) & 15;
  35.699 -            c->x86_mask = tfms & 15;
  35.700 -        } else {
  35.701 -            /* Have CPUID level 0 only - unheard of */
  35.702 -            c->x86 = 4;
  35.703 -        }
  35.704 -
  35.705 -        /* AMD-defined flags: level 0x80000001 */
  35.706 -        xlvl = cpuid_eax(0x80000000);
  35.707 -        if ( (xlvl & 0xffff0000) == 0x80000000 ) {
  35.708 -            if ( xlvl >= 0x80000001 )
  35.709 -                c->x86_capability[1] = cpuid_edx(0x80000001);
  35.710 -            if ( xlvl >= 0x80000004 )
  35.711 -                get_model_name(c); /* Default name */
  35.712 -        }
  35.713 -
  35.714 -        /* Transmeta-defined flags: level 0x80860001 */
  35.715 -        xlvl = cpuid_eax(0x80860000);
  35.716 -        if ( (xlvl & 0xffff0000) == 0x80860000 ) {
  35.717 -            if (  xlvl >= 0x80860001 )
  35.718 -                c->x86_capability[2] = cpuid_edx(0x80860001);
  35.719 -        }
  35.720 -    }
  35.721 -
  35.722 -    printk(KERN_DEBUG "CPU: Before vendor init, caps: %08x %08x %08x, vendor = %d\n",
  35.723 -           c->x86_capability[0],
  35.724 -           c->x86_capability[1],
  35.725 -           c->x86_capability[2],
  35.726 -           c->x86_vendor);
  35.727 -
  35.728 -    /*
  35.729 -     * Vendor-specific initialization.  In this section we
  35.730 -     * canonicalize the feature flags, meaning if there are
  35.731 -     * features a certain CPU supports which CPUID doesn't
  35.732 -     * tell us, CPUID claiming incorrect flags, or other bugs,
  35.733 -     * we handle them here.
  35.734 -     *
  35.735 -     * At the end of this section, c->x86_capability better
  35.736 -     * indicate the features this CPU genuinely supports!
  35.737 -     */
  35.738 -    switch ( c->x86_vendor ) {
  35.739 -    case X86_VENDOR_AMD:
  35.740 -        init_amd(c);
  35.741 -        break;
  35.742 -
  35.743 -    case X86_VENDOR_INTEL:
  35.744 -        init_intel(c);
  35.745 -        break;
  35.746 -
  35.747 -    default:
  35.748 -        panic("Unsupported CPU vendor\n");
  35.749 -    }
  35.750 -	
  35.751 -    printk(KERN_DEBUG "CPU: After vendor init, caps: %08x %08x %08x %08x\n",
  35.752 -           c->x86_capability[0],
  35.753 -           c->x86_capability[1],
  35.754 -           c->x86_capability[2],
  35.755 -           c->x86_capability[3]);
  35.756 -
  35.757 -
  35.758 -    /* If the model name is still unset, do table lookup. */
  35.759 -    if ( !c->x86_model_id[0] ) {
  35.760 -        char *p;
  35.761 -        p = table_lookup_model(c);
  35.762 -        if ( p )
  35.763 -            strcpy(c->x86_model_id, p);
  35.764 -        else
  35.765 -            /* Last resort... */
  35.766 -            sprintf(c->x86_model_id, "%02x/%02x",
  35.767 -                    c->x86_vendor, c->x86_model);
  35.768 -    }
  35.769 -
  35.770 -    /* Now the feature flags better reflect actual CPU features! */
  35.771 -
  35.772 -    printk(KERN_DEBUG "CPU:     After generic, caps: %08x %08x %08x %08x\n",
  35.773 -           c->x86_capability[0],
  35.774 -           c->x86_capability[1],
  35.775 -           c->x86_capability[2],
  35.776 -           c->x86_capability[3]);
  35.777 -
  35.778 -    /*
  35.779 -     * On SMP, boot_cpu_data holds the common feature set between
  35.780 -     * all CPUs; so make sure that we indicate which features are
  35.781 -     * common between the CPUs.  The first time this routine gets
  35.782 -     * executed, c == &boot_cpu_data.
  35.783 -     */
  35.784 -    if ( c != &boot_cpu_data ) {
  35.785 -        /* AND the already accumulated flags with these */
  35.786 -        for ( i = 0 ; i < NCAPINTS ; i++ )
  35.787 -            boot_cpu_data.x86_capability[i] &= c->x86_capability[i];
  35.788 -    }
  35.789 -
  35.790 -    printk(KERN_DEBUG "CPU:             Common caps: %08x %08x %08x %08x\n",
  35.791 -           boot_cpu_data.x86_capability[0],
  35.792 -           boot_cpu_data.x86_capability[1],
  35.793 -           boot_cpu_data.x86_capability[2],
  35.794 -           boot_cpu_data.x86_capability[3]);
  35.795 -}
  35.796 -
  35.797 -
  35.798 -/* These need to match <asm/processor.h> */
  35.799 -static char *cpu_vendor_names[] __initdata = {
  35.800 -    "Intel", "Cyrix", "AMD", "UMC", "NexGen", "Centaur", "Rise", "Transmeta" };
  35.801 -
  35.802 -
  35.803 -void __init print_cpu_info(struct cpuinfo_x86 *c)
  35.804 -{
  35.805 -    char *vendor = NULL;
  35.806 -
  35.807 -    if (c->x86_vendor < sizeof(cpu_vendor_names)/sizeof(char *))
  35.808 -        vendor = cpu_vendor_names[c->x86_vendor];
  35.809 -    else if (c->cpuid_level >= 0)
  35.810 -        vendor = c->x86_vendor_id;
  35.811 -
  35.812 -    if (vendor && strncmp(c->x86_model_id, vendor, strlen(vendor)))
  35.813 -        printk("%s ", vendor);
  35.814 -
  35.815 -    if (!c->x86_model_id[0])
  35.816 -        printk("%d86", c->x86);
  35.817 -    else
  35.818 -        printk("%s", c->x86_model_id);
  35.819 -
  35.820 -    if (c->x86_mask || c->cpuid_level >= 0) 
  35.821 -        printk(" stepping %02x\n", c->x86_mask);
  35.822 -    else
  35.823 -        printk("\n");
  35.824 -}
  35.825 -
  35.826 -/*
  35.827 - *	Get CPU information for use by the procfs.
  35.828 - */
  35.829 -static int show_cpuinfo(struct seq_file *m, void *v)
  35.830 -{
  35.831 -    /* 
  35.832 -     * These flag bits must match the definitions in <asm/cpufeature.h>.
  35.833 -     * NULL means this bit is undefined or reserved; either way it doesn't
  35.834 -     * have meaning as far as Linux is concerned.  Note that it's important
  35.835 -     * to realize there is a difference between this table and CPUID -- if
  35.836 -     * applications want to get the raw CPUID data, they should access
  35.837 -     * /dev/cpu/<cpu_nr>/cpuid instead.
  35.838 -	 */
  35.839 -    static char *x86_cap_flags[] = {
  35.840 -        /* Intel-defined */
  35.841 -        "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce",
  35.842 -        "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov",
  35.843 -        "pat", "pse36", "pn", "clflush", NULL, "dts", "acpi", "mmx",
  35.844 -        "fxsr", "sse", "sse2", "ss", NULL, "tm", "ia64", NULL,
  35.845 -
  35.846 -        /* AMD-defined */
  35.847 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  35.848 -        NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL,
  35.849 -        NULL, NULL, NULL, NULL, NULL, NULL, "mmxext", NULL,
  35.850 -        NULL, NULL, NULL, NULL, NULL, "lm", "3dnowext", "3dnow",
  35.851 -
  35.852 -        /* Transmeta-defined */
  35.853 -        "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL,
  35.854 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  35.855 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  35.856 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  35.857 -
  35.858 -        /* Other (Linux-defined) */
  35.859 -        "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", NULL, NULL, NULL, NULL,
  35.860 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  35.861 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  35.862 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
  35.863 -    };
  35.864 -    struct cpuinfo_x86 *c = v;
  35.865 -    int i, n = c - cpu_data;
  35.866 -    int fpu_exception;
  35.867 -
  35.868 -#ifdef CONFIG_SMP
  35.869 -    if (!(cpu_online_map & (1<<n)))
  35.870 -        return 0;
  35.871 -#endif
  35.872 -    seq_printf(m, "processor\t: %d\n"
  35.873 -               "vendor_id\t: %s\n"
  35.874 -               "cpu family\t: %d\n"
  35.875 -               "model\t\t: %d\n"
  35.876 -               "model name\t: %s\n",
  35.877 -               n,
  35.878 -               c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown",
  35.879 -               c->x86,
  35.880 -               c->x86_model,
  35.881 -               c->x86_model_id[0] ? c->x86_model_id : "unknown");
  35.882 -
  35.883 -    if (c->x86_mask || c->cpuid_level >= 0)
  35.884 -        seq_printf(m, "stepping\t: %d\n", c->x86_mask);
  35.885 -    else
  35.886 -        seq_printf(m, "stepping\t: unknown\n");
  35.887 -
  35.888 -    if ( test_bit(X86_FEATURE_TSC, &c->x86_capability) ) {
  35.889 -        seq_printf(m, "cpu MHz\t\t: %lu.%03lu\n",
  35.890 -                   cpu_khz / 1000, (cpu_khz % 1000));
  35.891 -    }
  35.892 -
  35.893 -    /* Cache size */
  35.894 -    if (c->x86_cache_size >= 0)
  35.895 -        seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
  35.896 -	
  35.897 -	/* We use exception 16 if we have hardware math and we've either seen it or the CPU claims it is internal */
  35.898 -    fpu_exception = c->hard_math && (ignore_irq13 || cpu_has_fpu);
  35.899 -    seq_printf(m, "fdiv_bug\t: %s\n"
  35.900 -               "hlt_bug\t\t: %s\n"
  35.901 -               "f00f_bug\t: %s\n"
  35.902 -               "coma_bug\t: %s\n"
  35.903 -               "fpu\t\t: %s\n"
  35.904 -               "fpu_exception\t: %s\n"
  35.905 -               "cpuid level\t: %d\n"
  35.906 -               "wp\t\t: %s\n"
  35.907 -               "flags\t\t:",
  35.908 -               c->fdiv_bug ? "yes" : "no",
  35.909 -               c->hlt_works_ok ? "no" : "yes",
  35.910 -               c->f00f_bug ? "yes" : "no",
  35.911 -               c->coma_bug ? "yes" : "no",
  35.912 -               c->hard_math ? "yes" : "no",
  35.913 -               fpu_exception ? "yes" : "no",
  35.914 -               c->cpuid_level,
  35.915 -               c->wp_works_ok ? "yes" : "no");
  35.916 -
  35.917 -    for ( i = 0 ; i < 32*NCAPINTS ; i++ )
  35.918 -        if ( test_bit(i, &c->x86_capability) &&
  35.919 -             x86_cap_flags[i] != NULL )
  35.920 -            seq_printf(m, " %s", x86_cap_flags[i]);
  35.921 -
  35.922 -    seq_printf(m, "\nbogomips\t: %lu.%02lu\n\n",
  35.923 -               c->loops_per_jiffy/(500000/HZ),
  35.924 -               (c->loops_per_jiffy/(5000/HZ)) % 100);
  35.925 -    return 0;
  35.926 -}
  35.927 -
  35.928 -static void *c_start(struct seq_file *m, loff_t *pos)
  35.929 -{
  35.930 -    return *pos < NR_CPUS ? cpu_data + *pos : NULL;
  35.931 -}
  35.932 -static void *c_next(struct seq_file *m, void *v, loff_t *pos)
  35.933 -{
  35.934 -    ++*pos;
  35.935 -    return c_start(m, pos);
  35.936 -}
  35.937 -static void c_stop(struct seq_file *m, void *v)
  35.938 -{
  35.939 -}
  35.940 -struct seq_operations cpuinfo_op = {
  35.941 -    start:	c_start,
  35.942 -    next:	c_next,
  35.943 -    stop:	c_stop,
  35.944 -    show:	show_cpuinfo,
  35.945 -};
  35.946 -
  35.947 -unsigned long cpu_initialized __initdata = 0;
  35.948 -
  35.949 -/*
  35.950 - * cpu_init() initializes state that is per-CPU. Some data is already
  35.951 - * initialized (naturally) in the bootstrap process, such as the GDT
  35.952 - * and IDT. We reload them nevertheless, this function acts as a
  35.953 - * 'CPU state barrier', nothing should get across.
  35.954 - */
  35.955 -void __init cpu_init (void)
  35.956 -{
  35.957 -    int nr = smp_processor_id();
  35.958 -
  35.959 -    if (test_and_set_bit(nr, &cpu_initialized)) {
  35.960 -        printk(KERN_WARNING "CPU#%d already initialized!\n", nr);
  35.961 -        for (;;) __sti();
  35.962 -    }
  35.963 -    printk(KERN_INFO "Initializing CPU#%d\n", nr);
  35.964 -
  35.965 -    /*
  35.966 -     * set up and load the per-CPU TSS and LDT
  35.967 -     */
  35.968 -    atomic_inc(&init_mm.mm_count);
  35.969 -    current->active_mm = &init_mm;
  35.970 -    if(current->mm)
  35.971 -        BUG();
  35.972 -    enter_lazy_tlb(&init_mm, current, nr);
  35.973 -
  35.974 -    HYPERVISOR_stack_and_ldt_switch(__KERNEL_DS, current->thread.esp0, 0);
  35.975 -
  35.976 -    /* Force FPU initialization. */
  35.977 -    current->flags &= ~PF_USEDFPU;
  35.978 -    current->used_math = 0;
  35.979 -    stts();
  35.980 -}
  35.981 -
  35.982 -
  35.983 -/******************************************************************************
  35.984 - * Time-to-die callback handling.
  35.985 - */
  35.986 -
  35.987 -static void time_to_die(int irq, void *unused, struct pt_regs *regs)
  35.988 -{
  35.989 -    extern void ctrl_alt_del(void);
  35.990 -    ctrl_alt_del();
  35.991 -}
  35.992 -
  35.993 -static int __init setup_death_event(void)
  35.994 -{
  35.995 -    (void)request_irq(_EVENT_DIE, time_to_die, 0, "die", NULL);
  35.996 -    return 0;
  35.997 -}
  35.998 -
  35.999 -__initcall(setup_death_event);
    36.1 --- a/old/xenolinux-2.4.16-sparse/arch/xeno/kernel/signal.c	Tue Mar 25 11:15:01 2003 +0000
    36.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.3 @@ -1,720 +0,0 @@
    36.4 -/*
    36.5 - *  linux/arch/i386/kernel/signal.c
    36.6 - *
    36.7 - *  Copyright (C) 1991, 1992  Linus Torvalds
    36.8 - *
    36.9 - *  1997-11-28  Modified for POSIX.1b signals by Richard Henderson
   36.10 - *  2000-06-20  Pentium III FXSR, SSE support by Gareth Hughes
   36.11 - */
   36.12 -
   36.13 -#include <linux/sched.h>
   36.14 -#include <linux/mm.h>
   36.15 -#include <linux/smp.h>
   36.16 -#include <linux/smp_lock.h>
   36.17 -#include <linux/kernel.h>
   36.18 -#include <linux/signal.h>
   36.19 -#include <linux/errno.h>
   36.20 -#include <linux/wait.h>
   36.21 -#include <linux/ptrace.h>
   36.22 -#include <linux/unistd.h>
   36.23 -#include <linux/stddef.h>
   36.24 -#include <linux/tty.h>
   36.25 -#include <linux/personality.h>
   36.26 -#include <asm/ucontext.h>
   36.27 -#include <asm/uaccess.h>
   36.28 -#include <asm/i387.h>
   36.29 -
   36.30 -#define DEBUG_SIG 0
   36.31 -
   36.32 -#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
   36.33 -
   36.34 -int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset));
   36.35 -
   36.36 -int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
   36.37 -{
   36.38 -	if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t)))
   36.39 -		return -EFAULT;
   36.40 -	if (from->si_code < 0)
   36.41 -		return __copy_to_user(to, from, sizeof(siginfo_t));
   36.42 -	else {
   36.43 -		int err;
   36.44 -
   36.45 -		/* If you change siginfo_t structure, please be sure
   36.46 -		   this code is fixed accordingly.
   36.47 -		   It should never copy any pad contained in the structure
   36.48 -		   to avoid security leaks, but must copy the generic
   36.49 -		   3 ints plus the relevant union member.  */
   36.50 -		err = __put_user(from->si_signo, &to->si_signo);
   36.51 -		err |= __put_user(from->si_errno, &to->si_errno);
   36.52 -		err |= __put_user((short)from->si_code, &to->si_code);
   36.53 -		/* First 32bits of unions are always present.  */
   36.54 -		err |= __put_user(from->si_pid, &to->si_pid);
   36.55 -		switch (from->si_code >> 16) {
   36.56 -		case __SI_FAULT >> 16:
   36.57 -			break;
   36.58 -		case __SI_CHLD >> 16:
   36.59 -			err |= __put_user(from->si_utime, &to->si_utime);
   36.60 -			err |= __put_user(from->si_stime, &to->si_stime);
   36.61 -			err |= __put_user(from->si_status, &to->si_status);
   36.62 -		default:
   36.63 -			err |= __put_user(from->si_uid, &to->si_uid);
   36.64 -			break;
   36.65 -		/* case __SI_RT: This is not generated by the kernel as of now.  */
   36.66 -		}
   36.67 -		return err;
   36.68 -	}
   36.69 -}
   36.70 -
   36.71 -/*
   36.72 - * Atomically swap in the new signal mask, and wait for a signal.
   36.73 - */
   36.74 -asmlinkage int
   36.75 -sys_sigsuspend(int history0, int history1, old_sigset_t mask)
   36.76 -{
   36.77 -	struct pt_regs * regs = (struct pt_regs *) &history0;
   36.78 -	sigset_t saveset;
   36.79 -
   36.80 -	mask &= _BLOCKABLE;
   36.81 -	spin_lock_irq(&current->sigmask_lock);
   36.82 -	saveset = current->blocked;
   36.83 -	siginitset(&current->blocked, mask);
   36.84 -	recalc_sigpending(current);
   36.85 -	spin_unlock_irq(&current->sigmask_lock);
   36.86 -
   36.87 -	regs->eax = -EINTR;
   36.88 -	while (1) {
   36.89 -		current->state = TASK_INTERRUPTIBLE;
   36.90 -		schedule();
   36.91 -		if (do_signal(regs, &saveset))
   36.92 -			return -EINTR;
   36.93 -	}
   36.94 -}
   36.95 -
   36.96 -asmlinkage int
   36.97 -sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize)
   36.98 -{
   36.99 -	struct pt_regs * regs = (struct pt_regs *) &unewset;
  36.100 -	sigset_t saveset, newset;
  36.101 -
  36.102 -	/* XXX: Don't preclude handling different sized sigset_t's.  */
  36.103 -	if (sigsetsize != sizeof(sigset_t))
  36.104 -		return -EINVAL;
  36.105 -
  36.106 -	if (copy_from_user(&newset, unewset, sizeof(newset)))
  36.107 -		return -EFAULT;
  36.108 -	sigdelsetmask(&newset, ~_BLOCKABLE);
  36.109 -
  36.110 -	spin_lock_irq(&current->sigmask_lock);
  36.111 -	saveset = current->blocked;
  36.112 -	current->blocked = newset;
  36.113 -	recalc_sigpending(current);
  36.114 -	spin_unlock_irq(&current->sigmask_lock);
  36.115 -
  36.116 -	regs->eax = -EINTR;
  36.117 -	while (1) {
  36.118 -		current->state = TASK_INTERRUPTIBLE;
  36.119 -		schedule();
  36.120 -		if (do_signal(regs, &saveset))
  36.121 -			return -EINTR;
  36.122 -	}
  36.123 -}
  36.124 -
  36.125 -asmlinkage int 
  36.126 -sys_sigaction(int sig, const struct old_sigaction *act,
  36.127 -	      struct old_sigaction *oact)
  36.128 -{
  36.129 -	struct k_sigaction new_ka, old_ka;
  36.130 -	int ret;
  36.131 -
  36.132 -	if (act) {
  36.133 -		old_sigset_t mask;
  36.134 -		if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
  36.135 -		    __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
  36.136 -		    __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
  36.137 -			return -EFAULT;
  36.138 -		__get_user(new_ka.sa.sa_flags, &act->sa_flags);
  36.139 -		__get_user(mask, &act->sa_mask);
  36.140 -		siginitset(&new_ka.sa.sa_mask, mask);
  36.141 -	}
  36.142 -
  36.143 -	ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
  36.144 -
  36.145 -	if (!ret && oact) {
  36.146 -		if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
  36.147 -		    __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
  36.148 -		    __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
  36.149 -			return -EFAULT;
  36.150 -		__put_user(old_ka.sa.sa_flags, &oact->sa_flags);
  36.151 -		__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
  36.152 -	}
  36.153 -
  36.154 -	return ret;
  36.155 -}
  36.156 -
  36.157 -asmlinkage int
  36.158 -sys_sigaltstack(const stack_t *uss, stack_t *uoss)
  36.159 -{
  36.160 -	struct pt_regs *regs = (struct pt_regs *) &uss;
  36.161 -	return do_sigaltstack(uss, uoss, regs->esp);
  36.162 -}
  36.163 -
  36.164 -
  36.165 -/*
  36.166 - * Do a signal return; undo the signal stack.
  36.167 - */
  36.168 -
  36.169 -struct sigframe
  36.170 -{
  36.171 -	char *pretcode;
  36.172 -	int sig;
  36.173 -	struct sigcontext sc;
  36.174 -	struct _fpstate fpstate;
  36.175 -	unsigned long extramask[_NSIG_WORDS-1];
  36.176 -	char retcode[8];
  36.177 -};
  36.178 -
  36.179 -struct rt_sigframe
  36.180 -{
  36.181 -	char *pretcode;
  36.182 -	int sig;
  36.183 -	struct siginfo *pinfo;
  36.184 -	void *puc;
  36.185 -	struct siginfo info;
  36.186 -	struct ucontext uc;
  36.187 -	struct _fpstate fpstate;
  36.188 -	char retcode[8];
  36.189 -};
  36.190 -
  36.191 -static int
  36.192 -restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *peax)
  36.193 -{
  36.194 -	unsigned int err = 0;
  36.195 -
  36.196 -#define COPY(x)		err |= __get_user(regs->x, &sc->x)
  36.197 -
  36.198 -#define COPY_SEG(seg)							\
  36.199 -	{ unsigned short tmp;						\
  36.200 -	  err |= __get_user(tmp, &sc->seg);				\
  36.201 -	  regs->x##seg = tmp; }
  36.202 -
  36.203 -#define COPY_SEG_STRICT(seg)						\
  36.204 -	{ unsigned short tmp;						\
  36.205 -	  err |= __get_user(tmp, &sc->seg);				\
  36.206 -	  regs->x##seg = tmp|3; }
  36.207 -
  36.208 -#define GET_SEG(seg)							\
  36.209 -	{ unsigned short tmp;						\
  36.210 -	  err |= __get_user(tmp, &sc->seg);				\
  36.211 -	  loadsegment(seg,tmp); }
  36.212 -
  36.213 -	GET_SEG(gs);
  36.214 -	GET_SEG(fs);
  36.215 -	COPY_SEG(es);
  36.216 -	COPY_SEG(ds);
  36.217 -	COPY(edi);
  36.218 -	COPY(esi);
  36.219 -	COPY(ebp);
  36.220 -	COPY(esp);
  36.221 -	COPY(ebx);
  36.222 -	COPY(edx);
  36.223 -	COPY(ecx);
  36.224 -	COPY(eip);
  36.225 -	COPY_SEG_STRICT(cs);
  36.226 -	COPY_SEG_STRICT(ss);
  36.227 -	
  36.228 -	{
  36.229 -		unsigned int tmpflags;
  36.230 -		err |= __get_user(tmpflags, &sc->eflags);
  36.231 -		regs->eflags = (regs->eflags & ~0x40DD5) | (tmpflags & 0x40DD5);
  36.232 -		regs->orig_eax = -1;		/* disable syscall checks */
  36.233 -	}
  36.234 -
  36.235 -	{
  36.236 -		struct _fpstate * buf;
  36.237 -		err |= __get_user(buf, &sc->fpstate);
  36.238 -		if (buf) {
  36.239 -			if (verify_area(VERIFY_READ, buf, sizeof(*buf)))
  36.240 -				goto badframe;
  36.241 -			err |= restore_i387(buf);
  36.242 -		}
  36.243 -	}
  36.244 -
  36.245 -	err |= __get_user(*peax, &sc->eax);
  36.246 -	return err;
  36.247 -
  36.248 -badframe:
  36.249 -	return 1;
  36.250 -}
  36.251 -
  36.252 -asmlinkage int sys_sigreturn(unsigned long __unused)
  36.253 -{
  36.254 -	struct pt_regs *regs = (struct pt_regs *) &__unused;
  36.255 -	struct sigframe *frame = (struct sigframe *)(regs->esp - 8);
  36.256 -	sigset_t set;
  36.257 -	int eax;
  36.258 -
  36.259 -	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
  36.260 -		goto badframe;
  36.261 -	if (__get_user(set.sig[0], &frame->sc.oldmask)
  36.262 -	    || (_NSIG_WORDS > 1
  36.263 -		&& __copy_from_user(&set.sig[1], &frame->extramask,
  36.264 -				    sizeof(frame->extramask))))
  36.265 -		goto badframe;
  36.266 -
  36.267 -	sigdelsetmask(&set, ~_BLOCKABLE);
  36.268 -	spin_lock_irq(&current->sigmask_lock);
  36.269 -	current->blocked = set;
  36.270 -	recalc_sigpending(current);
  36.271 -	spin_unlock_irq(&current->sigmask_lock);
  36.272 -	
  36.273 -	if (restore_sigcontext(regs, &frame->sc, &eax))
  36.274 -		goto badframe;
  36.275 -	return eax;
  36.276 -
  36.277 -badframe:
  36.278 -	force_sig(SIGSEGV, current);
  36.279 -	return 0;
  36.280 -}	
  36.281 -
  36.282 -asmlinkage int sys_rt_sigreturn(unsigned long __unused)
  36.283 -{
  36.284 -	struct pt_regs *regs = (struct pt_regs *) &__unused;
  36.285 -	struct rt_sigframe *frame = (struct rt_sigframe *)(regs->esp - 4);
  36.286 -	sigset_t set;
  36.287 -	stack_t st;
  36.288 -	int eax;
  36.289 -
  36.290 -	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
  36.291 -		goto badframe;
  36.292 -	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
  36.293 -		goto badframe;
  36.294 -
  36.295 -	sigdelsetmask(&set, ~_BLOCKABLE);
  36.296 -	spin_lock_irq(&current->sigmask_lock);
  36.297 -	current->blocked = set;
  36.298 -	recalc_sigpending(current);
  36.299 -	spin_unlock_irq(&current->sigmask_lock);
  36.300 -	
  36.301 -	if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &eax))
  36.302 -		goto badframe;
  36.303 -
  36.304 -	if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st)))
  36.305 -		goto badframe;
  36.306 -	/* It is more difficult to avoid calling this function than to
  36.307 -	   call it and ignore errors.  */
  36.308 -	do_sigaltstack(&st, NULL, regs->esp);
  36.309 -
  36.310 -	return eax;
  36.311 -
  36.312 -badframe:
  36.313 -	force_sig(SIGSEGV, current);
  36.314 -	return 0;
  36.315 -}	
  36.316 -
  36.317 -/*
  36.318 - * Set up a signal frame.
  36.319 - */
  36.320 -
  36.321 -static int
  36.322 -setup_sigcontext(struct sigcontext *sc, struct _fpstate *fpstate,
  36.323 -		 struct pt_regs *regs, unsigned long mask)
  36.324 -{
  36.325 -	int tmp, err = 0;
  36.326 -
  36.327 -	tmp = 0;
  36.328 -	__asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp));
  36.329 -	err |= __put_user(tmp, (unsigned int *)&sc->gs);
  36.330 -	__asm__("movl %%fs,%0" : "=r"(tmp): "0"(tmp));
  36.331 -	err |= __put_user(tmp, (unsigned int *)&sc->fs);
  36.332 -
  36.333 -	err |= __put_user(regs->xes, (unsigned int *)&sc->es);
  36.334 -	err |= __put_user(regs->xds, (unsigned int *)&sc->ds);
  36.335 -	err |= __put_user(regs->edi, &sc->edi);
  36.336 -	err |= __put_user(regs->esi, &sc->esi);
  36.337 -	err |= __put_user(regs->ebp, &sc->ebp);
  36.338 -	err |= __put_user(regs->esp, &sc->esp);
  36.339 -	err |= __put_user(regs->ebx, &sc->ebx);
  36.340 -	err |= __put_user(regs->edx, &sc->edx);
  36.341 -	err |= __put_user(regs->ecx, &sc->ecx);
  36.342 -	err |= __put_user(regs->eax, &sc->eax);
  36.343 -	err |= __put_user(current->thread.trap_no, &sc->trapno);
  36.344 -	err |= __put_user(current->thread.error_code, &sc->err);
  36.345 -	err |= __put_user(regs->eip, &sc->eip);
  36.346 -	err |= __put_user(regs->xcs, (unsigned int *)&sc->cs);
  36.347 -	err |= __put_user(regs->eflags, &sc->eflags);
  36.348 -	err |= __put_user(regs->esp, &sc->esp_at_signal);
  36.349 -	err |= __put_user(regs->xss, (unsigned int *)&sc->ss);
  36.350 -
  36.351 -	tmp = save_i387(fpstate);
  36.352 -	if (tmp < 0)
  36.353 -	  err = 1;
  36.354 -	else
  36.355 -	  err |= __put_user(tmp ? fpstate : NULL, &sc->fpstate);
  36.356 -
  36.357 -	/* non-iBCS2 extensions.. */
  36.358 -	err |= __put_user(mask, &sc->oldmask);
  36.359 -	err |= __put_user(current->thread.cr2, &sc->cr2);
  36.360 -
  36.361 -	return err;
  36.362 -}
  36.363 -
  36.364 -/*
  36.365 - * Determine which stack to use..
  36.366 - */
  36.367 -static inline void *
  36.368 -get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
  36.369 -{
  36.370 -	unsigned long esp;
  36.371 -
  36.372 -	/* Default to using normal stack */
  36.373 -	esp = regs->esp;
  36.374 -
  36.375 -	/* This is the X/Open sanctioned signal stack switching.  */
  36.376 -	if (ka->sa.sa_flags & SA_ONSTACK) {
  36.377 -		if (sas_ss_flags(esp) == 0)
  36.378 -			esp = current->sas_ss_sp + current->sas_ss_size;
  36.379 -	}
  36.380 -
  36.381 -	/* This is the legacy signal stack switching. */
  36.382 -	else if ((regs->xss & 0xffff) != __USER_DS &&
  36.383 -		 !(ka->sa.sa_flags & SA_RESTORER) &&
  36.384 -		 ka->sa.sa_restorer) {
  36.385 -		esp = (unsigned long) ka->sa.sa_restorer;
  36.386 -	}
  36.387 -
  36.388 -	return (void *)((esp - frame_size) & -8ul);
  36.389 -}
  36.390 -
  36.391 -static void setup_frame(int sig, struct k_sigaction *ka,
  36.392 -			sigset_t *set, struct pt_regs * regs)
  36.393 -{
  36.394 -	struct sigframe *frame;
  36.395 -	int err = 0;
  36.396 -
  36.397 -	frame = get_sigframe(ka, regs, sizeof(*frame));
  36.398 -
  36.399 -	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
  36.400 -		goto give_sigsegv;
  36.401 -
  36.402 -	err |= __put_user((current->exec_domain
  36.403 -		           && current->exec_domain->signal_invmap
  36.404 -		           && sig < 32
  36.405 -		           ? current->exec_domain->signal_invmap[sig]
  36.406 -		           : sig),
  36.407 -		          &frame->sig);
  36.408 -	if (err)
  36.409 -		goto give_sigsegv;
  36.410 -
  36.411 -	err |= setup_sigcontext(&frame->sc, &frame->fpstate, regs, set->sig[0]);
  36.412 -	if (err)
  36.413 -		goto give_sigsegv;
  36.414 -
  36.415 -	if (_NSIG_WORDS > 1) {
  36.416 -		err |= __copy_to_user(frame->extramask, &set->sig[1],
  36.417 -				      sizeof(frame->extramask));
  36.418 -	}
  36.419 -	if (err)
  36.420 -		goto give_sigsegv;
  36.421 -
  36.422 -	/* Set up to return from userspace.  If provided, use a stub
  36.423 -	   already in userspace.  */
  36.424 -	if (ka->sa.sa_flags & SA_RESTORER) {
  36.425 -		err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
  36.426 -	} else {
  36.427 -		err |= __put_user(frame->retcode, &frame->pretcode);
  36.428 -		/* This is popl %eax ; movl $,%eax ; int $0x80 */
  36.429 -		err |= __put_user(0xb858, (short *)(frame->retcode+0));
  36.430 -		err |= __put_user(__NR_sigreturn, (int *)(frame->retcode+2));
  36.431 -		err |= __put_user(0x80cd, (short *)(frame->retcode+6));
  36.432 -	}
  36.433 -
  36.434 -	if (err)
  36.435 -		goto give_sigsegv;
  36.436 -
  36.437 -	/* Set up registers for signal handler */
  36.438 -	regs->esp = (unsigned long) frame;
  36.439 -	regs->eip = (unsigned long) ka->sa.sa_handler;
  36.440 -
  36.441 -	set_fs(USER_DS);
  36.442 -	regs->xds = __USER_DS;
  36.443 -	regs->xes = __USER_DS;
  36.444 -	regs->xss = __USER_DS;
  36.445 -	regs->xcs = __USER_CS;
  36.446 -	regs->eflags &= ~TF_MASK;
  36.447 -
  36.448 -#if DEBUG_SIG
  36.449 -	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
  36.450 -		current->comm, current->pid, frame, regs->eip, frame->pretcode);
  36.451 -#endif
  36.452 -
  36.453 -	return;
  36.454 -
  36.455 -give_sigsegv:
  36.456 -	if (sig == SIGSEGV)
  36.457 -		ka->sa.sa_handler = SIG_DFL;
  36.458 -	force_sig(SIGSEGV, current);
  36.459 -}
  36.460 -
  36.461 -static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
  36.462 -			   sigset_t *set, struct pt_regs * regs)
  36.463 -{
  36.464 -	struct rt_sigframe *frame;
  36.465 -	int err = 0;
  36.466 -
  36.467 -	frame = get_sigframe(ka, regs, sizeof(*frame));
  36.468 -
  36.469 -	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
  36.470 -		goto give_sigsegv;
  36.471 -
  36.472 -	err |= __put_user((current->exec_domain
  36.473 -		    	   && current->exec_domain->signal_invmap
  36.474 -		    	   && sig < 32
  36.475 -		    	   ? current->exec_domain->signal_invmap[sig]
  36.476 -			   : sig),
  36.477 -			  &frame->sig);
  36.478 -	err |= __put_user(&frame->info, &frame->pinfo);
  36.479 -	err |= __put_user(&frame->uc, &frame->puc);
  36.480 -	err |= copy_siginfo_to_user(&frame->info, info);
  36.481 -	if (err)
  36.482 -		goto give_sigsegv;
  36.483 -
  36.484 -	/* Create the ucontext.  */
  36.485 -	err |= __put_user(0, &frame->uc.uc_flags);
  36.486 -	err |= __put_user(0, &frame->uc.uc_link);
  36.487 -	err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
  36.488 -	err |= __put_user(sas_ss_flags(regs->esp),
  36.489 -			  &frame->uc.uc_stack.ss_flags);
  36.490 -	err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
  36.491 -	err |= setup_sigcontext(&frame->uc.uc_mcontext, &frame->fpstate,
  36.492 -			        regs, set->sig[0]);
  36.493 -	err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
  36.494 -	if (err)
  36.495 -		goto give_sigsegv;
  36.496 -
  36.497 -	/* Set up to return from userspace.  If provided, use a stub
  36.498 -	   already in userspace.  */
  36.499 -	if (ka->sa.sa_flags & SA_RESTORER) {
  36.500 -		err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
  36.501 -	} else {
  36.502 -		err |= __put_user(frame->retcode, &frame->pretcode);
  36.503 -		/* This is movl $,%eax ; int $0x80 */
  36.504 -		err |= __put_user(0xb8, (char *)(frame->retcode+0));
  36.505 -		err |= __put_user(__NR_rt_sigreturn, (int *)(frame->retcode+1));
  36.506 -		err |= __put_user(0x80cd, (short *)(frame->retcode+5));
  36.507 -	}
  36.508 -
  36.509 -	if (err)
  36.510 -		goto give_sigsegv;
  36.511 -
  36.512 -	/* Set up registers for signal handler */
  36.513 -	regs->esp = (unsigned long) frame;
  36.514 -	regs->eip = (unsigned long) ka->sa.sa_handler;
  36.515 -
  36.516 -	set_fs(USER_DS);
  36.517 -	regs->xds = __USER_DS;
  36.518 -	regs->xes = __USER_DS;
  36.519 -	regs->xss = __USER_DS;
  36.520 -	regs->xcs = __USER_CS;
  36.521 -	regs->eflags &= ~TF_MASK;
  36.522 -
  36.523 -#if DEBUG_SIG
  36.524 -	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
  36.525 -		current->comm, current->pid, frame, regs->eip, frame->pretcode);
  36.526 -#endif
  36.527 -
  36.528 -	return;
  36.529 -
  36.530 -give_sigsegv:
  36.531 -	if (sig == SIGSEGV)
  36.532 -		ka->sa.sa_handler = SIG_DFL;
  36.533 -	force_sig(SIGSEGV, current);
  36.534 -}
  36.535 -
  36.536 -/*
  36.537 - * OK, we're invoking a handler
  36.538 - */	
  36.539 -
  36.540 -static void
  36.541 -handle_signal(unsigned long sig, struct k_sigaction *ka,
  36.542 -	      siginfo_t *info, sigset_t *oldset, struct pt_regs * regs)
  36.543 -{
  36.544 -	/* Are we from a system call? */
  36.545 -	if (regs->orig_eax >= 0) {
  36.546 -		/* If so, check system call restarting.. */
  36.547 -		switch (regs->eax) {
  36.548 -			case -ERESTARTNOHAND:
  36.549 -				regs->eax = -EINTR;
  36.550 -				break;
  36.551 -
  36.552 -			case -ERESTARTSYS:
  36.553 -				if (!(ka->sa.sa_flags & SA_RESTART)) {
  36.554 -					regs->eax = -EINTR;
  36.555 -					break;
  36.556 -				}
  36.557 -			/* fallthrough */
  36.558 -			case -ERESTARTNOINTR:
  36.559 -				regs->eax = regs->orig_eax;
  36.560 -				regs->eip -= 2;
  36.561 -		}
  36.562 -	}
  36.563 -
  36.564 -	/* Set up the stack frame */
  36.565 -	if (ka->sa.sa_flags & SA_SIGINFO)
  36.566 -		setup_rt_frame(sig, ka, info, oldset, regs);
  36.567 -	else
  36.568 -		setup_frame(sig, ka, oldset, regs);
  36.569 -
  36.570 -	if (ka->sa.sa_flags & SA_ONESHOT)
  36.571 -		ka->sa.sa_handler = SIG_DFL;
  36.572 -
  36.573 -	if (!(ka->sa.sa_flags & SA_NODEFER)) {
  36.574 -		spin_lock_irq(&current->sigmask_lock);
  36.575 -		sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
  36.576 -		sigaddset(&current->blocked,sig);
  36.577 -		recalc_sigpending(current);
  36.578 -		spin_unlock_irq(&current->sigmask_lock);
  36.579 -	}
  36.580 -}
  36.581 -
  36.582 -/*
  36.583 - * Note that 'init' is a special process: it doesn't get signals it doesn't
  36.584 - * want to handle. Thus you cannot kill init even with a SIGKILL even by
  36.585 - * mistake.
  36.586 - */
  36.587 -int do_signal(struct pt_regs *regs, sigset_t *oldset)
  36.588 -{
  36.589 -	siginfo_t info;
  36.590 -	struct k_sigaction *ka;
  36.591 -
  36.592 -	/*
  36.593 -	 * We want the common case to go fast, which
  36.594 -	 * is why we may in certain cases get here from
  36.595 -	 * kernel mode. Just return without doing anything
  36.596 -	 * if so.
  36.597 -	 */
  36.598 -	if ((regs->xcs & 2) != 2)
  36.599 -		return 1;
  36.600 -
  36.601 -	if (!oldset)
  36.602 -		oldset = &current->blocked;
  36.603 -
  36.604 -	for (;;) {
  36.605 -		unsigned long signr;
  36.606 -
  36.607 -		spin_lock_irq(&current->sigmask_lock);
  36.608 -		signr = dequeue_signal(&current->blocked, &info);
  36.609 -		spin_unlock_irq(&current->sigmask_lock);
  36.610 -
  36.611 -		if (!signr)
  36.612 -			break;
  36.613 -
  36.614 -		if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
  36.615 -			/* Let the debugger run.  */
  36.616 -			current->exit_code = signr;
  36.617 -			current->state = TASK_STOPPED;
  36.618 -			notify_parent(current, SIGCHLD);
  36.619 -			schedule();
  36.620 -
  36.621 -			/* We're back.  Did the debugger cancel the sig?  */
  36.622 -			if (!(signr = current->exit_code))
  36.623 -				continue;
  36.624 -			current->exit_code = 0;
  36.625 -
  36.626 -			/* The debugger continued.  Ignore SIGSTOP.  */
  36.627 -			if (signr == SIGSTOP)
  36.628 -				continue;
  36.629 -
  36.630 -			/* Update the siginfo structure.  Is this good?  */
  36.631 -			if (signr != info.si_signo) {
  36.632 -				info.si_signo = signr;
  36.633 -				info.si_errno = 0;
  36.634 -				info.si_code = SI_USER;
  36.635 -				info.si_pid = current->p_pptr->pid;
  36.636 -				info.si_uid = current->p_pptr->uid;
  36.637 -			}
  36.638 -
  36.639 -			/* If the (new) signal is now blocked, requeue it.  */
  36.640 -			if (sigismember(&current->blocked, signr)) {
  36.641 -				send_sig_info(signr, &info, current);
  36.642 -				continue;
  36.643 -			}
  36.644 -		}
  36.645 -
  36.646 -		ka = &current->sig->action[signr-1];
  36.647 -		if (ka->sa.sa_handler == SIG_IGN) {
  36.648 -			if (signr != SIGCHLD)
  36.649 -				continue;
  36.650 -			/* Check for SIGCHLD: it's special.  */
  36.651 -			while (sys_wait4(-1, NULL, WNOHANG, NULL) > 0)
  36.652 -				/* nothing */;
  36.653 -			continue;
  36.654 -		}
  36.655 -
  36.656 -		if (ka->sa.sa_handler == SIG_DFL) {
  36.657 -			int exit_code = signr;
  36.658 -
  36.659 -			/* Init gets no signals it doesn't want.  */
  36.660 -			if (current->pid == 1)
  36.661 -				continue;
  36.662 -
  36.663 -			switch (signr) {
  36.664 -			case SIGCONT: case SIGCHLD: case SIGWINCH:
  36.665 -				continue;
  36.666 -
  36.667 -			case SIGTSTP: case SIGTTIN: case SIGTTOU:
  36.668 -				if (is_orphaned_pgrp(current->pgrp))
  36.669 -					continue;
  36.670 -				/* FALLTHRU */
  36.671 -
  36.672 -			case SIGSTOP: {
  36.673 -				struct signal_struct *sig;
  36.674 -				current->state = TASK_STOPPED;
  36.675 -				current->exit_code = signr;
  36.676 -				sig = current->p_pptr->sig;
  36.677 -				if (sig &am