ia64/xen-unstable

changeset 284:fbfd209f962c

bitkeeper revision 1.122.1.5 (3e6e7c23wQxW8Ugs0UKsqigrHkcXQg)

mkbuildtree:
new file
.del-hypervisor-ifs~86b59453fcfcbc0d:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor-ifs
.del-usercopy.c~a4e3819a4723317b:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/usercopy.c
.del-sys_i386.c~ad2d4399a2d28db9:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/sys_i386.c
.del-strstr.c~a59de40cfa231931:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/strstr.c
.del-semaphore.c~e68c48eef7115b45:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/semaphore.c
.del-pageattr.c~f12f3a2d4d9a5533:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/pageattr.c
.del-old-checksum.c~f071ac0bcd5b2d9a:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/old-checksum.c
.del-mmx.c~c322b85572d0e637:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/mmx.c
.del-memcpy.c~40a930c62e045f5:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/memcpy.c
.del-iodebug.c~23f7b78313546ddc:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/iodebug.c
.del-getuser.S~b9140bdb7786f6dc:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/getuser.S
.del-extable.c~d3064107fd4524e5:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/extable.c
.del-dec_and_lock.c~702a868529eefccf:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/dec_and_lock.c
.del-checksum.S~a821c465832e250c:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/checksum.S
.del-xor.h~998f147781a971b7:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/xor.h
.del-vga.h~45c4f65abf0d3704:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/vga.h
.del-user.h~dd2c2e4cf89a81:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/user.h
.del-unistd.h~33920ed4177b943c:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unistd.h
.del-unaligned.h~535ed3d510980f67:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unaligned.h
.del-ucontext.h~217079ee95a5eb94:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ucontext.h
.del-uaccess.h~3681b94ef8d5a0f4:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/uaccess.h
.del-types.h~c4fb05b781c9652c:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/types.h
.del-tlb.h~6ad1bd639fc9d921:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/tlb.h
.del-timex.h~51d9b0c83c732bcc:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/timex.h
.del-termios.h~ccfbd8bcc37ae57d:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termios.h
.del-termbits.h~438385b2cd8fd6b0:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termbits.h
.del-string.h~673ad5d9e7f34adc:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string.h
.del-string-486.h~365fff788bc1adf5:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string-486.h
.del-statfs.h~65d9b1d7c4114f2e:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/statfs.h
.del-stat.h~c1aa8136a8e00c11:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/stat.h
.del-spinlock.h~ec9397b86265414c:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/spinlock.h
.del-softirq.h~587d767979e60f4a:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/softirq.h
.del-sockios.h~30f6e946644b28a4:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sockios.h
.del-socket.h~4b1ff6de54a2e75:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/socket.h
.del-smplock.h~d5ea37028dfc0796:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/smplock.h
.del-signal.h~bff6ca682e48d282:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/signal.h
.del-siginfo.h~6e147c4b81453d48:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/siginfo.h
.del-sigcontext.h~15a1460eea0fc80d:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sigcontext.h
.del-shmparam.h~97d1aa6d272dd55c:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmparam.h
.del-shmbuf.h~d92a8c2e377edd83:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmbuf.h
.del-setup.h~4250896c3e302c1d:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/setup.h
.del-serial.h~584ec6aaea6b0efc:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/serial.h
.del-sembuf.h~4fc6c36d718bc878:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sembuf.h
.del-semaphore.h~90a0e3df1d186e71:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/semaphore.h
.del-ptrace.c~5c3f8d1f817aa462:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ptrace.c
.del-init_task.c~319ec38b798d3c7c:
Delete: xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/init_task.c
.del-scatterlist.h~1988430d982706fb:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/scatterlist.h
.del-rwsem.h~548d272fd25fd023:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwsem.h
.del-rwlock.h~75a3e9a0d5b70d88:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwlock.h
.del-resource.h~4ac2e8ff9316f133:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/resource.h
.del-posix_types.h~14d068cffd4b8776:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/posix_types.h
.del-poll.h~15c1158844d735b:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/poll.h
.del-parport.h~ce6ec6eea26a26f:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/parport.h
.del-param.h~1fcb86dbbfaae433:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/param.h
.del-namei.h~f25c9c58c76cddf4:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/namei.h
.del-mtrr.h~375ef594799aeb34:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mtrr.h
.del-msr.h~cbf3b3e52c9bed91:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msr.h
.del-msgbuf.h~ab21bfe6a970c7d6:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msgbuf.h
.del-mpspec.h~9a3c3e9cda38bf43:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mpspec.h
.del-module.h~e271946131c6cf33:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/module.h
.del-mmx.h~bc63c7c24adb85ea:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmx.h
.del-mman.h~43ec3a0326f0d774:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mman.h
.del-mca_dma.h~a4e495084d965428:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mca_dma.h
.del-mc146818rtc.h~d7e968dbd77bc13a:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mc146818rtc.h
.del-math_emu.h~fba78190435e5abd:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/math_emu.h
.del-locks.h~e022163a8c6f92:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/locks.h
.del-linux_logo.h~2034953cfe415a:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/linux_logo.h
.del-ldt.h~191ca1efbffba82a:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ldt.h
.del-kmap_types.h~517fab0f9758f3b:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/kmap_types.h
.del-keyboard.h~b2a7fe4183f53eb0:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/keyboard.h
.del-ipcbuf.h~cee91af271f4ead9:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipcbuf.h
.del-ipc.h~f6063a09bec6a01e:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipc.h
.del-ioctls.h~cc185671abf46a0a:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctls.h
.del-ioctl.h~8603eb7a7f9acbad:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctl.h
.del-io_apic.h~9f66b09afe289021:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/io_apic.h
.del-init.h~9d30d474b845bc1:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/init.h
.del-ide.h~805c47c1a5ebf196:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ide.h
.del-i387.h~3b360e96fea6fe7:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/i387.h
.del-hdreg.h~c4bbd6ffab3763d6:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hdreg.h
.del-hardirq.h~9b375250fe601395:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hardirq.h
.del-floppy.h~d6f10807cbe15906:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/floppy.h
.del-fcntl.h~ee3e644a21150dde:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/fcntl.h
.del-errno.h~bab55cfe5c4ff883:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/errno.h
.del-elf.h~af645629b45e7fe7:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/elf.h
.del-dma.h~938dff3f930de2e4:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/dma.h
.del-div64.h~aa6562c04bfaf412:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h
.del-delay.h~e3ba89df403d5622:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/delay.h
.del-debugreg.h~b3975b26e222b6c3:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/debugreg.h
.del-current.h~800e8314ee81c074:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/current.h
.del-cpufeature.h~89666e396b49acdd:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cpufeature.h
.del-checksum.h~82af6c19c8cc4ff3:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/checksum.h
.del-cache.h~694ef1ffd8450db4:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cache.h
.del-byteorder.h~f14ceb3575444d8a:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/byteorder.h
.del-boot.h~83206c92a8649e3f:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/boot.h
.del-bitops.h~e3c609f48d6cdb91:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/bitops.h
.del-atomic.h~328669154749bfad:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/atomic.h
.del-apicdef.h~2f13a4cfaa79d855:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apicdef.h
.del-apic.h~2690e76edadb6a8:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apic.h
.del-a.out.h~b638f33fa82e889d:
Delete: xenolinux-2.4.21-pre4-sparse/include/asm-xeno/a.out.h
author kaf24@scramble.cl.cam.ac.uk
date Wed Mar 12 00:15:31 2003 +0000 (2003-03-12)
parents 563edc5c10fe
children 40fdb5bb9044
files .bk-to-hg .hg-to-bk .rootkeys xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/init_task.c xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ptrace.c xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/semaphore.c xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/sys_i386.c xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/checksum.S xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/dec_and_lock.c xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/getuser.S xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/iodebug.c xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/memcpy.c xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/mmx.c xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/old-checksum.c xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/strstr.c xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/usercopy.c xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/extable.c xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/pageattr.c xenolinux-2.4.21-pre4-sparse/include/asm-xeno/a.out.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apic.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apicdef.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/atomic.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/bitops.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/boot.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/byteorder.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cache.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/checksum.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cpufeature.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/current.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/debugreg.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/delay.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/dma.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/elf.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/errno.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/fcntl.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/floppy.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hardirq.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hdreg.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/i387.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ide.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/init.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/io_apic.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctl.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctls.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipc.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipcbuf.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/keyboard.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/kmap_types.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ldt.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/linux_logo.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/locks.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/math_emu.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mc146818rtc.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mca_dma.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mman.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmx.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/module.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mpspec.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msgbuf.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msr.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mtrr.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/namei.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/param.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/parport.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/poll.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/posix_types.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/resource.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwlock.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwsem.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/scatterlist.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/semaphore.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sembuf.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/serial.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/setup.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmbuf.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmparam.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sigcontext.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/siginfo.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/signal.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/smplock.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/socket.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sockios.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/softirq.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/spinlock.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/stat.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/statfs.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string-486.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termbits.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termios.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/timex.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/tlb.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/types.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/uaccess.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ucontext.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unaligned.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unistd.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/user.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/vga.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/xor.h xenolinux-2.4.21-pre4-sparse/mkbuildtree
line diff
     1.1 --- a/.bk-to-hg	Tue Mar 11 14:37:27 2003 +0000
     1.2 +++ b/.bk-to-hg	Wed Mar 12 00:15:31 2003 +0000
     1.3 @@ -2,7 +2,5 @@
     1.4  set -e
     1.5  test -L old/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs
     1.6  rm      old/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs
     1.7 -test -L xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor-ifs
     1.8 -rm      xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor-ifs
     1.9  (find -depth -type d -print | xargs -r rmdir 2>/dev/null) || true
    1.10  exit 0
     2.1 --- a/.hg-to-bk	Tue Mar 11 14:37:27 2003 +0000
     2.2 +++ b/.hg-to-bk	Wed Mar 12 00:15:31 2003 +0000
     2.3 @@ -5,9 +5,5 @@ mkdir -p old/xenolinux-2.4.16-sparse
     2.4  mkdir -p old/xenolinux-2.4.16-sparse/include
     2.5  mkdir -p old/xenolinux-2.4.16-sparse/include/asm-xeno
     2.6  ln -s ../../../xen-2.4.16/include/hypervisor-ifs old/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs
     2.7 -mkdir -p xenolinux-2.4.21-pre4-sparse
     2.8 -mkdir -p xenolinux-2.4.21-pre4-sparse/include
     2.9 -mkdir -p xenolinux-2.4.21-pre4-sparse/include/asm-xeno
    2.10 -ln -s ../../../xen/include/hypervisor-ifs xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor-ifs
    2.11  (find -depth -type d -print | xargs -r rmdir 2>/dev/null) || true
    2.12  exit 0
     3.1 --- a/.rootkeys	Tue Mar 11 14:37:27 2003 +0000
     3.2 +++ b/.rootkeys	Wed Mar 12 00:15:31 2003 +0000
     3.3 @@ -496,150 +496,52 @@ 3e5a4e65Hy_1iUvMTPsNqGNXd9uFpg xenolinux
     3.4  3e5a4e65ibVQmwlOn0j3sVH_j_6hAg xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/hypervisor.c
     3.5  3e5a4e65RMGcuA-HCn3-wNx3fFQwdg xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/i386_ksyms.c
     3.6  3e5a4e65JfSHwduNJO6j-upYnjoWLA xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/i387.c
     3.7 -3e5a4e65tzCYKTX26zdI8rk2m48BDA xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/init_task.c
     3.8  3e5a4e65MEvZhlr070sK5JsfAQlv7Q xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ioport.c
     3.9  3e5a4e653U6cELGv528IxOLHvCq8iA xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/irq.c
    3.10  3e5a4e65muT6SU3ck47IP87Q7Ti5hA xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ldt.c
    3.11  3e5a4e65IGt3WwQDNiL4h-gYWgNTWQ xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c
    3.12 -3e5a4e65vXUggUHe9b_D9q0CNcZmQg xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ptrace.c
    3.13 -3e5a4e66StFP0OPSNngVwPJ4cJDy4g xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/semaphore.c
    3.14  3e5a4e66tR-qJMLj3MppcKqmvuI2XQ xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/setup.c
    3.15  3e5a4e66fWSTagLGU2P8BGFGRjhDiw xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/signal.c
    3.16 -3e5a4e66Id8AWFANwLRFP4mKJgIFQw xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/sys_i386.c
    3.17  3e5a4e66N__lUXNwzQ-eADRzK9LXuQ xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/time.c
    3.18  3e5a4e66aHCbQ_F5QZ8VeyikLmuRZQ xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/traps.c
    3.19  3e5a4e66-9_NczrVMbuQkoSLyXckIw xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/Makefile
    3.20 -3e5a4e66pZtp3RawntDpdofnJEvHIg xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/checksum.S
    3.21 -3e5a4e660Zju423CmC6q_-ZdObYhuA xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/dec_and_lock.c
    3.22  3e5a4e6637ZDk0BvFEC-aFQs599-ng xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/delay.c
    3.23 -3e5a4e66Cf-sjHkzP95oIJ6hBC1pOA xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/getuser.S
    3.24 -3e5a4e66s_LxC8VI5vqmr-TPOdJYsw xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/iodebug.c
    3.25 -3e5a4e667pxnNndXVcVxVNBvZezxhw xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/memcpy.c
    3.26 -3e5a4e66MHYcXyO9DndD8k0DDBovYw xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/mmx.c
    3.27 -3e5a4e669xZJQRPtO8oiRIqMwChrLg xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/old-checksum.c
    3.28 -3e5a4e66RzO4JzKOAraCe2dnQ5m-yw xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/strstr.c
    3.29 -3e5a4e66us6VmRaduHUnWiKcAONyLA xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/usercopy.c
    3.30  3e5a4e66croVgpcJyJuF2ycQw0HuJw xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/Makefile
    3.31 -3e5a4e661LP_6AdxThMuysfcYtOexA xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/extable.c
    3.32  3e5a4e66l8Q5Tv-6B3lQIRmaVbFPzg xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/fault.c
    3.33  3e5a4e66TyNNUEXkr5RxqvQhXK1MQA xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/get_unmapped_area.c
    3.34  3e5a4e668SE9rixq4ahho9rNhLUUFQ xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/hypervisor.c
    3.35  3e5a4e661gLzzff25pJooKIIWe7IWg xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/init.c
    3.36  3e5a4e66U45cAIoHmxg0y1e1XhzVCA xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/mmu_context.c
    3.37 -3e5a4e66_jLCqAOBvqAy5N4mP7hmBA xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/pageattr.c
    3.38  3e5a4e66qRlSTcjafidMB6ulECADvg xenolinux-2.4.21-pre4-sparse/arch/xeno/vmlinux.lds
    3.39  3e5a4e668yELUdtr3HiJZBIqxqUyuA xenolinux-2.4.21-pre4-sparse/drivers/block/Config.in
    3.40  3e5a4e66mrtlmV75L1tjKDg8RaM5gA xenolinux-2.4.21-pre4-sparse/drivers/block/ll_rw_blk.c
    3.41  3e5a4e66rw65CxyolW9PKz4GG42RcA xenolinux-2.4.21-pre4-sparse/drivers/char/tty_io.c
    3.42  3e5a4e669uzIE54VwucPYtGwXLAbzA xenolinux-2.4.21-pre4-sparse/fs/exec.c
    3.43 -3e5a4e66HUJwJfJBBOilIN7LeL0twg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/a.out.h
    3.44 -3e5a4e66nv3Esm5N8FS5r0qs-l7A0w xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apic.h
    3.45 -3e5a4e66BHReK8U7xl4qqZMXvFXihQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apicdef.h
    3.46 -3e5a4e668V7Eo08_6qmVoevzFrlxGQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/atomic.h
    3.47 -3e5a4e66FNm4qKYGsIMdX6DGJ1pI1g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/bitops.h
    3.48 -3e5a4e66zkP-aEQkEtznyyp-e7tUGA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/boot.h
    3.49  3e5a4e66wbeCpsJgVf_U8Jde-CNcsA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/bugs.h
    3.50 -3e5a4e66wTE9HEEjsnOHrijDB8iXrQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/byteorder.h
    3.51 -3e5a4e66VqboK-qHV-HxmSflMh4VqQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cache.h
    3.52 -3e5a4e66bTVzeqJUJQiu67FWoHM5iw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/checksum.h
    3.53 -3e5a4e66JVArkZ-0_pav3AsvKbftdw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cpufeature.h
    3.54 -3e5a4e66cCx28DaXo1U_nKvVX-5Y5w xenolinux-2.4.21-pre4-sparse/include/asm-xeno/current.h
    3.55 -3e5a4e66o7NZjoJZjzJa-Z7XcGmGqg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/debugreg.h
    3.56 -3e5a4e66rpzD2c7pNKF0XLbHzxb24A xenolinux-2.4.21-pre4-sparse/include/asm-xeno/delay.h
    3.57  3e5a4e66HdSkvIV6SJ1evG_xmTmXHA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/desc.h
    3.58 -3e5a4e66GP6AL7wpHyxcsHOH4cJ4BQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h
    3.59 -3e5a4e66wJ9hmUtY2rLWliznHdjWaw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/dma.h
    3.60 -3e5a4e667P_1mO6v1YFRZ-ocfpiyVQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/elf.h
    3.61 -3e5a4e66qeYk1odm2esnGypmiMcxqw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/errno.h
    3.62 -3e5a4e663pDK4oQnfbuT38CR04cXDQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/fcntl.h
    3.63  3e5a4e66SYp_UpAVcF8Lc1wa3Qtgzw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/fixmap.h
    3.64 -3e5a4e67fsayUJFE3A24CKZoUDI88A xenolinux-2.4.21-pre4-sparse/include/asm-xeno/floppy.h
    3.65 -3e5a4e67uPmwPbjvF7YGsG2hX-3oBQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hardirq.h
    3.66 -3e5a4e67P_6RRoCzUiQt_gyx6lmyWw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hdreg.h
    3.67  3e5a4e67w_DWgjIJ17Tlossu1LGujQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/highmem.h
    3.68  3e5a4e67YtcyDLQsShhCfQwPSELfvA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hw_irq.h
    3.69 -3e00b957NB9Iz667rjRZg5YAJqoKCg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor-ifs
    3.70  3e5a4e677VBavzM1UZIEcH1B-RlXMA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor.h
    3.71 -3e5a4e679TYbXAUiURvTeX4cFb1RlQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/i387.h
    3.72 -3e5a4e672eNAzAKUZsefsPdmsH19hA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ide.h
    3.73 -3e5a4e67XHl6b9C1Oqv79FiE1T3ybg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/init.h
    3.74  3e5a4e67Ulv-Ll8Zp4j2GwMwQ8aAXQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/io.h
    3.75 -3e5a4e67cWGE9V1O6DSwvj5KtkY04g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/io_apic.h
    3.76 -3e5a4e67-vXNELtSK-qDSYyK55febg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctl.h
    3.77 -3e5a4e67iqnkteX3g1IFQ-0Hf-vyuA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctls.h
    3.78 -3e5a4e674l2NZF3klG30JX_auXUBgA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipc.h
    3.79 -3e5a4e678dxUg9lvKOXvH1s5a9GNsA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipcbuf.h
    3.80  3e5a4e673p7PEOyHFm3nHkYX6HQYBg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/irq.h
    3.81 -3e5a4e67nfnw10Wsugp5ZeMYFO_Eeg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/keyboard.h
    3.82 -3e5a4e67FbgZ92JO9Vp2CKlW6z7wjA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/kmap_types.h
    3.83 -3e5a4e674VIvXJxlOtz7LjtNAJttAA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ldt.h
    3.84 -3e5a4e67X2GwDXstxQeuIyr65hdOig xenolinux-2.4.21-pre4-sparse/include/asm-xeno/linux_logo.h
    3.85 -3e5a4e67mLXkDcU-aaeMByYb1-3v7Q xenolinux-2.4.21-pre4-sparse/include/asm-xeno/locks.h
    3.86 -3e5a4e67g8B4DjzsIajoy1_mlxlvLg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/math_emu.h
    3.87 -3e5a4e67J6JsiPWb0AwWZzQcOLbKKw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mc146818rtc.h
    3.88 -3e5a4e67otTxTEz6CA4vVHE-CFLGkQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mca_dma.h
    3.89 -3e5a4e67hSfhasW1McVONBMITBY28g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mman.h
    3.90  3e5a4e67zoNch27qYhEBpr2k6SABOg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmu.h
    3.91  3e5a4e678ddsQOpbSiRdy1GRcDc9WA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmu_context.h
    3.92 -3e5a4e67YQ_cLDcJjIsd8XTCk3w4rg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmx.h
    3.93 -3e5a4e67Zv1yObwNLd_9AYbyGTTvSw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/module.h
    3.94 -3e5a4e67C-czbgW6YxgEbJG1e9aPGg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mpspec.h
    3.95 -3e5a4e67swa8teSCnQDQvpV90xYiZQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msgbuf.h
    3.96 -3e5a4e67U1TsB9azleujfFZm3E5i3w xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msr.h
    3.97 -3e5a4e67f6dvHFEisaZ4wCR2t3a0yw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mtrr.h
    3.98 -3e5a4e67Kd-KWcgJON9dfcJEQD9hdg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/namei.h
    3.99  3e5a4e67mnQfh-R8KcQCaVo2Oho6yg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/page.h
   3.100 -3e5a4e67IYaS0RnLo3SntreGd59gMA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/param.h
   3.101 -3e5a4e67nvdHRk38knQeDl-0Z2j6_Q xenolinux-2.4.21-pre4-sparse/include/asm-xeno/parport.h
   3.102  3e5a4e67uTYU5oEnIDjxuaez8njjqg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgalloc.h
   3.103  3e5a4e67X7JyupgdYkgDX19Huj2sAw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgtable-2level.h
   3.104  3e5a4e67w3ckNdrTEgqiSiYYAYMwOQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgtable-3level.h
   3.105  3e5a4e67gr4NLGtQ5CvSLimMYZlkOA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgtable.h
   3.106 -3e5a4e671OnIMxuFE59yynI-qvwKCA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/poll.h
   3.107 -3e5a4e67o7FLcNPHjwyw5vb01EQTCg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/posix_types.h
   3.108  3e5a4e676uK4xErTBDH6XJREn9LSyg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/processor.h
   3.109  3e5a4e67AJPjW-zL7p-xWuA6IVeH1g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ptrace.h
   3.110 -3e5a4e67tIfXJYRQFxfRbcpZ25vqfw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/resource.h
   3.111 -3e5a4e68E-U7HbKdTBaYoo3ZISdxuQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwlock.h
   3.112 -3e5a4e68unR4ktSClycraOPanwxvTg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwsem.h
   3.113 -3e5a4e68DATgqBYbF9W2Pkw5fGZBRg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/scatterlist.h
   3.114  3e5a4e68uJz-xI0IBVMD7xRLQKJDFg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/segment.h
   3.115 -3e5a4e68Ug8hqChUpD2m_IDQSiu8jw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/semaphore.h
   3.116 -3e5a4e68uFNNH3YQvZS1EnL0v_E6ew xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sembuf.h
   3.117 -3e5a4e689R_c0pr8Ycb-w6zveleWEw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/serial.h
   3.118 -3e5a4e682D6yseOVKoJIx6HafkEKJw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/setup.h
   3.119 -3e5a4e680_gLjMSi1Ql0nUnqCoQSyQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmbuf.h
   3.120 -3e5a4e68PFVCbzUszQ4anRN8iZ1DUg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmparam.h
   3.121 -3e5a4e689rAyWPwrwdvtJEkrtVw1rA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sigcontext.h
   3.122 -3e5a4e68D7dXWzciOKbyG1G3l3yt0w xenolinux-2.4.21-pre4-sparse/include/asm-xeno/siginfo.h
   3.123 -3e5a4e68soo0VsYXn1HYv2XeUnlxgw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/signal.h
   3.124  3e5a4e68Nfdh6QcOKUTGCaYkf2LmYA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/smp.h
   3.125 -3e5a4e688pv8zI1Z3wciLUik3c2iEw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/smplock.h
   3.126 -3e5a4e68jaQZMOApQVZiq7T_gGPZhw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/socket.h
   3.127 -3e5a4e68wlnX8Huhsl0gd7VgmiA8uA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sockios.h
   3.128 -3e5a4e68tuqUkZ3kyZGk6BZ1hrkXyw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/softirq.h
   3.129 -3e5a4e68viR5sAz1SvKnPNrpKmlAZA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/spinlock.h
   3.130 -3e5a4e68nUxBYfOOLm0_cZN7XM-3LQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/stat.h
   3.131 -3e5a4e68my8BhpsHYBD63VUrxLXRCg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/statfs.h
   3.132 -3e5a4e68W6piFzx4c4kiqwNB-h8PbQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string-486.h
   3.133 -3e5a4e68gFzDdQZEy91vkcdKWubf2g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string.h
   3.134  3e5a4e68mTr0zcp9SXDbnd-XLrrfxw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/system.h
   3.135 -3e5a4e686Tful7frKeVbjeeWZ4S0nA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termbits.h
   3.136 -3e5a4e68fZcskF52zTGHdiF_yoVBiw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termios.h
   3.137 -3e5a4e68t8oGxTdC3i40nPjFwW00_g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/timex.h
   3.138 -3e5a4e685uCbimBjS_2iGxUqptPYiQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/tlb.h
   3.139 -3e5a4e68Elybq23T6RnEt6vopg3mxg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/types.h
   3.140 -3e5a4e68NeADbbaqoo4emjpU5xcaqA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/uaccess.h
   3.141 -3e5a4e68HMMGyb6iBvG-qVbd9hODaQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ucontext.h
   3.142 -3e5a4e68m2MrAb54gFw8n-ZGNEu-Fw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unaligned.h
   3.143 -3e5a4e68vggReonfTJ1gdzYjFaOSKw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unistd.h
   3.144 -3e5a4e68QPC4T0aOA61QgK2SGDPVVA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/user.h
   3.145 -3e5a4e68g2boOp0d45bjtwugxQ8zNw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/vga.h
   3.146 -3e5a4e68AB-TTHj1oXtqVJvUo9jzIg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/xor.h
   3.147  3e5a4e68WLX3B8owTvktP3HHOtznPQ xenolinux-2.4.21-pre4-sparse/include/linux/major.h
   3.148  3e5a4e686V0nioX2ZpFf056sgvdiQw xenolinux-2.4.21-pre4-sparse/include/linux/sunrpc/debug.h
   3.149  3e5a4e68W_hpMlM3u_-QOKMp3gzcwQ xenolinux-2.4.21-pre4-sparse/init/do_mounts.c
   3.150  3e5a4e68TJJavrunYwTAnLRSBxSYqQ xenolinux-2.4.21-pre4-sparse/kernel/panic.c
   3.151 +3e6e7c1efbQe93xCvOpOVCnXTMmQ5w xenolinux-2.4.21-pre4-sparse/mkbuildtree
   3.152  3e5a4e68GxCIaFH4sy01v1wjapetaA xenolinux-2.4.21-pre4-sparse/mm/memory.c
   3.153  3e5a4e681xMPdF9xCMwpyfuYMySU5g xenolinux-2.4.21-pre4-sparse/mm/mremap.c
   3.154  3e5a4e683HKVU-sxtagrDasRB8eBVw xenolinux-2.4.21-pre4-sparse/mm/swapfile.c
     4.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/init_task.c	Tue Mar 11 14:37:27 2003 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,33 +0,0 @@
     4.4 -#include <linux/mm.h>
     4.5 -#include <linux/sched.h>
     4.6 -#include <linux/init.h>
     4.7 -
     4.8 -#include <asm/uaccess.h>
     4.9 -#include <asm/pgtable.h>
    4.10 -#include <asm/desc.h>
    4.11 -
    4.12 -static struct fs_struct init_fs = INIT_FS;
    4.13 -static struct files_struct init_files = INIT_FILES;
    4.14 -static struct signal_struct init_signals = INIT_SIGNALS;
    4.15 -struct mm_struct init_mm = INIT_MM(init_mm);
    4.16 -
    4.17 -/*
    4.18 - * Initial task structure.
    4.19 - *
    4.20 - * We need to make sure that this is 8192-byte aligned due to the
    4.21 - * way process stacks are handled. This is done by having a special
    4.22 - * "init_task" linker map entry..
    4.23 - */
    4.24 -union task_union init_task_union 
    4.25 -	__attribute__((__section__(".data.init_task"))) =
    4.26 -		{ INIT_TASK(init_task_union.task) };
    4.27 -
    4.28 -/*
    4.29 - * per-CPU TSS segments. Threads are completely 'soft' on Linux,
    4.30 - * no more per-task TSS's. The TSS size is kept cacheline-aligned
    4.31 - * so they are allowed to end up in the .data.cacheline_aligned
    4.32 - * section. Since TSS's are completely CPU-local, we want them
    4.33 - * on exact cacheline boundaries, to eliminate cacheline ping-pong.
    4.34 - */ 
    4.35 -struct tss_struct init_tss[NR_CPUS] __cacheline_aligned = { [0 ... NR_CPUS-1] = INIT_TSS };
    4.36 -
     5.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ptrace.c	Tue Mar 11 14:37:27 2003 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,454 +0,0 @@
     5.4 -/* ptrace.c */
     5.5 -/* By Ross Biro 1/23/92 */
     5.6 -/*
     5.7 - * Pentium III FXSR, SSE support
     5.8 - *	Gareth Hughes <gareth@valinux.com>, May 2000
     5.9 - */
    5.10 -
    5.11 -#include <linux/kernel.h>
    5.12 -#include <linux/sched.h>
    5.13 -#include <linux/mm.h>
    5.14 -#include <linux/smp.h>
    5.15 -#include <linux/smp_lock.h>
    5.16 -#include <linux/errno.h>
    5.17 -#include <linux/ptrace.h>
    5.18 -#include <linux/user.h>
    5.19 -
    5.20 -#include <asm/uaccess.h>
    5.21 -#include <asm/pgtable.h>
    5.22 -#include <asm/system.h>
    5.23 -#include <asm/processor.h>
    5.24 -#include <asm/i387.h>
    5.25 -#include <asm/debugreg.h>
    5.26 -
    5.27 -/*
    5.28 - * does not yet catch signals sent when the child dies.
    5.29 - * in exit.c or in signal.c.
    5.30 - */
    5.31 -
    5.32 -/* determines which flags the user has access to. */
    5.33 -/* 1 = access 0 = no access */
    5.34 -#define FLAG_MASK 0x00044dd5
    5.35 -
    5.36 -/* set's the trap flag. */
    5.37 -#define TRAP_FLAG 0x100
    5.38 -
    5.39 -/*
    5.40 - * Offset of eflags on child stack..
    5.41 - */
    5.42 -#define EFL_OFFSET ((EFL-2)*4-sizeof(struct pt_regs))
    5.43 -
    5.44 -/*
    5.45 - * this routine will get a word off of the processes privileged stack. 
    5.46 - * the offset is how far from the base addr as stored in the TSS.  
    5.47 - * this routine assumes that all the privileged stacks are in our
    5.48 - * data space.
    5.49 - */   
    5.50 -static inline int get_stack_long(struct task_struct *task, int offset)
    5.51 -{
    5.52 -	unsigned char *stack;
    5.53 -
    5.54 -	stack = (unsigned char *)task->thread.esp0;
    5.55 -	stack += offset;
    5.56 -	return (*((int *)stack));
    5.57 -}
    5.58 -
    5.59 -/*
    5.60 - * this routine will put a word on the processes privileged stack. 
    5.61 - * the offset is how far from the base addr as stored in the TSS.  
    5.62 - * this routine assumes that all the privileged stacks are in our
    5.63 - * data space.
    5.64 - */
    5.65 -static inline int put_stack_long(struct task_struct *task, int offset,
    5.66 -	unsigned long data)
    5.67 -{
    5.68 -	unsigned char * stack;
    5.69 -
    5.70 -	stack = (unsigned char *) task->thread.esp0;
    5.71 -	stack += offset;
    5.72 -	*(unsigned long *) stack = data;
    5.73 -	return 0;
    5.74 -}
    5.75 -
    5.76 -static int putreg(struct task_struct *child,
    5.77 -	unsigned long regno, unsigned long value)
    5.78 -{
    5.79 -	switch (regno >> 2) {
    5.80 -		case FS:
    5.81 -			if (value && (value & 3) != 3)
    5.82 -				return -EIO;
    5.83 -			child->thread.fs = value;
    5.84 -			return 0;
    5.85 -		case GS:
    5.86 -			if (value && (value & 3) != 3)
    5.87 -				return -EIO;
    5.88 -			child->thread.gs = value;
    5.89 -			return 0;
    5.90 -		case DS:
    5.91 -		case ES:
    5.92 -			if (value && (value & 3) != 3)
    5.93 -				return -EIO;
    5.94 -			value &= 0xffff;
    5.95 -			break;
    5.96 -		case SS:
    5.97 -		case CS:
    5.98 -			if ((value & 3) != 3)
    5.99 -				return -EIO;
   5.100 -			value &= 0xffff;
   5.101 -			break;
   5.102 -		case EFL:
   5.103 -			value &= FLAG_MASK;
   5.104 -			value |= get_stack_long(child, EFL_OFFSET) & ~FLAG_MASK;
   5.105 -			break;
   5.106 -	}
   5.107 -	if (regno > GS*4)
   5.108 -		regno -= 2*4;
   5.109 -	put_stack_long(child, regno - sizeof(struct pt_regs), value);
   5.110 -	return 0;
   5.111 -}
   5.112 -
   5.113 -static unsigned long getreg(struct task_struct *child,
   5.114 -	unsigned long regno)
   5.115 -{
   5.116 -	unsigned long retval = ~0UL;
   5.117 -
   5.118 -	switch (regno >> 2) {
   5.119 -		case FS:
   5.120 -			retval = child->thread.fs;
   5.121 -			break;
   5.122 -		case GS:
   5.123 -			retval = child->thread.gs;
   5.124 -			break;
   5.125 -		case DS:
   5.126 -		case ES:
   5.127 -		case SS:
   5.128 -		case CS:
   5.129 -			retval = 0xffff;
   5.130 -			/* fall through */
   5.131 -		default:
   5.132 -			if (regno > GS*4)
   5.133 -				regno -= 2*4;
   5.134 -			regno = regno - sizeof(struct pt_regs);
   5.135 -			retval &= get_stack_long(child, regno);
   5.136 -	}
   5.137 -	return retval;
   5.138 -}
   5.139 -
   5.140 -/*
   5.141 - * Called by kernel/ptrace.c when detaching..
   5.142 - *
   5.143 - * Make sure the single step bit is not set.
   5.144 - */
   5.145 -void ptrace_disable(struct task_struct *child)
   5.146 -{ 
   5.147 -	long tmp;
   5.148 -
   5.149 -	tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG;
   5.150 -	put_stack_long(child, EFL_OFFSET, tmp);
   5.151 -}
   5.152 -
   5.153 -asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
   5.154 -{
   5.155 -	struct task_struct *child;
   5.156 -	struct user * dummy = NULL;
   5.157 -	int i, ret;
   5.158 -
   5.159 -	lock_kernel();
   5.160 -	ret = -EPERM;
   5.161 -	if (request == PTRACE_TRACEME) {
   5.162 -		/* are we already being traced? */
   5.163 -		if (current->ptrace & PT_PTRACED)
   5.164 -			goto out;
   5.165 -		/* set the ptrace bit in the process flags. */
   5.166 -		current->ptrace |= PT_PTRACED;
   5.167 -		ret = 0;
   5.168 -		goto out;
   5.169 -	}
   5.170 -	ret = -ESRCH;
   5.171 -	read_lock(&tasklist_lock);
   5.172 -	child = find_task_by_pid(pid);
   5.173 -	if (child)
   5.174 -		get_task_struct(child);
   5.175 -	read_unlock(&tasklist_lock);
   5.176 -	if (!child)
   5.177 -		goto out;
   5.178 -
   5.179 -	ret = -EPERM;
   5.180 -	if (pid == 1)		/* you may not mess with init */
   5.181 -		goto out_tsk;
   5.182 -
   5.183 -	if (request == PTRACE_ATTACH) {
   5.184 -		ret = ptrace_attach(child);
   5.185 -		goto out_tsk;
   5.186 -	}
   5.187 -
   5.188 -	ret = ptrace_check_attach(child, request == PTRACE_KILL);
   5.189 -	if (ret < 0)
   5.190 -		goto out_tsk;
   5.191 -
   5.192 -	switch (request) {
   5.193 -	/* when I and D space are separate, these will need to be fixed. */
   5.194 -	case PTRACE_PEEKTEXT: /* read word at location addr. */ 
   5.195 -	case PTRACE_PEEKDATA: {
   5.196 -		unsigned long tmp;
   5.197 -		int copied;
   5.198 -
   5.199 -		copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
   5.200 -		ret = -EIO;
   5.201 -		if (copied != sizeof(tmp))
   5.202 -			break;
   5.203 -		ret = put_user(tmp,(unsigned long *) data);
   5.204 -		break;
   5.205 -	}
   5.206 -
   5.207 -	/* read the word at location addr in the USER area. */
   5.208 -	case PTRACE_PEEKUSR: {
   5.209 -		unsigned long tmp;
   5.210 -
   5.211 -		ret = -EIO;
   5.212 -		if ((addr & 3) || addr < 0 || 
   5.213 -		    addr > sizeof(struct user) - 3)
   5.214 -			break;
   5.215 -
   5.216 -		tmp = 0;  /* Default return condition */
   5.217 -		if(addr < FRAME_SIZE*sizeof(long))
   5.218 -			tmp = getreg(child, addr);
   5.219 -		if(addr >= (long) &dummy->u_debugreg[0] &&
   5.220 -		   addr <= (long) &dummy->u_debugreg[7]){
   5.221 -			addr -= (long) &dummy->u_debugreg[0];
   5.222 -			addr = addr >> 2;
   5.223 -			tmp = child->thread.debugreg[addr];
   5.224 -		}
   5.225 -		ret = put_user(tmp,(unsigned long *) data);
   5.226 -		break;
   5.227 -	}
   5.228 -
   5.229 -	/* when I and D space are separate, this will have to be fixed. */
   5.230 -	case PTRACE_POKETEXT: /* write the word at location addr. */
   5.231 -	case PTRACE_POKEDATA:
   5.232 -		ret = 0;
   5.233 -		if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
   5.234 -			break;
   5.235 -		ret = -EIO;
   5.236 -		break;
   5.237 -
   5.238 -	case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
   5.239 -		ret = -EIO;
   5.240 -		if ((addr & 3) || addr < 0 || 
   5.241 -		    addr > sizeof(struct user) - 3)
   5.242 -			break;
   5.243 -
   5.244 -		if (addr < FRAME_SIZE*sizeof(long)) {
   5.245 -			ret = putreg(child, addr, data);
   5.246 -			break;
   5.247 -		}
   5.248 -		/* We need to be very careful here.  We implicitly
   5.249 -		   want to modify a portion of the task_struct, and we
   5.250 -		   have to be selective about what portions we allow someone
   5.251 -		   to modify. */
   5.252 -
   5.253 -		  ret = -EIO;
   5.254 -		  if(addr >= (long) &dummy->u_debugreg[0] &&
   5.255 -		     addr <= (long) &dummy->u_debugreg[7]){
   5.256 -
   5.257 -			  if(addr == (long) &dummy->u_debugreg[4]) break;
   5.258 -			  if(addr == (long) &dummy->u_debugreg[5]) break;
   5.259 -			  if(addr < (long) &dummy->u_debugreg[4] &&
   5.260 -			     ((unsigned long) data) >= TASK_SIZE-3) break;
   5.261 -			  
   5.262 -			  if(addr == (long) &dummy->u_debugreg[7]) {
   5.263 -				  data &= ~DR_CONTROL_RESERVED;
   5.264 -				  for(i=0; i<4; i++)
   5.265 -					  if ((0x5f54 >> ((data >> (16 + 4*i)) & 0xf)) & 1)
   5.266 -						  goto out_tsk;
   5.267 -			  }
   5.268 -
   5.269 -			  addr -= (long) &dummy->u_debugreg;
   5.270 -			  addr = addr >> 2;
   5.271 -			  child->thread.debugreg[addr] = data;
   5.272 -			  ret = 0;
   5.273 -		  }
   5.274 -		  break;
   5.275 -
   5.276 -	case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
   5.277 -	case PTRACE_CONT: { /* restart after signal. */
   5.278 -		long tmp;
   5.279 -
   5.280 -		ret = -EIO;
   5.281 -		if ((unsigned long) data > _NSIG)
   5.282 -			break;
   5.283 -		if (request == PTRACE_SYSCALL)
   5.284 -			child->ptrace |= PT_TRACESYS;
   5.285 -		else
   5.286 -			child->ptrace &= ~PT_TRACESYS;
   5.287 -		child->exit_code = data;
   5.288 -	/* make sure the single step bit is not set. */
   5.289 -		tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG;
   5.290 -		put_stack_long(child, EFL_OFFSET,tmp);
   5.291 -		wake_up_process(child);
   5.292 -		ret = 0;
   5.293 -		break;
   5.294 -	}
   5.295 -
   5.296 -/*
   5.297 - * make the child exit.  Best I can do is send it a sigkill. 
   5.298 - * perhaps it should be put in the status that it wants to 
   5.299 - * exit.
   5.300 - */
   5.301 -	case PTRACE_KILL: {
   5.302 -		long tmp;
   5.303 -
   5.304 -		ret = 0;
   5.305 -		if (child->state == TASK_ZOMBIE)	/* already dead */
   5.306 -			break;
   5.307 -		child->exit_code = SIGKILL;
   5.308 -		/* make sure the single step bit is not set. */
   5.309 -		tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG;
   5.310 -		put_stack_long(child, EFL_OFFSET, tmp);
   5.311 -		wake_up_process(child);
   5.312 -		break;
   5.313 -	}
   5.314 -
   5.315 -	case PTRACE_SINGLESTEP: {  /* set the trap flag. */
   5.316 -		long tmp;
   5.317 -
   5.318 -		ret = -EIO;
   5.319 -		if ((unsigned long) data > _NSIG)
   5.320 -			break;
   5.321 -		child->ptrace &= ~PT_TRACESYS;
   5.322 -		if ((child->ptrace & PT_DTRACE) == 0) {
   5.323 -			/* Spurious delayed TF traps may occur */
   5.324 -			child->ptrace |= PT_DTRACE;
   5.325 -		}
   5.326 -		tmp = get_stack_long(child, EFL_OFFSET) | TRAP_FLAG;
   5.327 -		put_stack_long(child, EFL_OFFSET, tmp);
   5.328 -		child->exit_code = data;
   5.329 -		/* give it a chance to run. */
   5.330 -		wake_up_process(child);
   5.331 -		ret = 0;
   5.332 -		break;
   5.333 -	}
   5.334 -
   5.335 -	case PTRACE_DETACH:
   5.336 -		/* detach a process that was attached. */
   5.337 -		ret = ptrace_detach(child, data);
   5.338 -		break;
   5.339 -
   5.340 -	case PTRACE_GETREGS: { /* Get all gp regs from the child. */
   5.341 -	  	if (!access_ok(VERIFY_WRITE, (unsigned *)data, FRAME_SIZE*sizeof(long))) {
   5.342 -			ret = -EIO;
   5.343 -			break;
   5.344 -		}
   5.345 -		for ( i = 0; i < FRAME_SIZE*sizeof(long); i += sizeof(long) ) {
   5.346 -			__put_user(getreg(child, i),(unsigned long *) data);
   5.347 -			data += sizeof(long);
   5.348 -		}
   5.349 -		ret = 0;
   5.350 -		break;
   5.351 -	}
   5.352 -
   5.353 -	case PTRACE_SETREGS: { /* Set all gp regs in the child. */
   5.354 -		unsigned long tmp;
   5.355 -	  	if (!access_ok(VERIFY_READ, (unsigned *)data, FRAME_SIZE*sizeof(long))) {
   5.356 -			ret = -EIO;
   5.357 -			break;
   5.358 -		}
   5.359 -		for ( i = 0; i < FRAME_SIZE*sizeof(long); i += sizeof(long) ) {
   5.360 -			__get_user(tmp, (unsigned long *) data);
   5.361 -			putreg(child, i, tmp);
   5.362 -			data += sizeof(long);
   5.363 -		}
   5.364 -		ret = 0;
   5.365 -		break;
   5.366 -	}
   5.367 -
   5.368 -	case PTRACE_GETFPREGS: { /* Get the child FPU state. */
   5.369 -		if (!access_ok(VERIFY_WRITE, (unsigned *)data,
   5.370 -			       sizeof(struct user_i387_struct))) {
   5.371 -			ret = -EIO;
   5.372 -			break;
   5.373 -		}
   5.374 -		ret = 0;
   5.375 -		if ( !child->used_math )
   5.376 -			load_empty_fpu(child);
   5.377 -		get_fpregs((struct user_i387_struct *)data, child);
   5.378 -		break;
   5.379 -	}
   5.380 -
   5.381 -	case PTRACE_SETFPREGS: { /* Set the child FPU state. */
   5.382 -		if (!access_ok(VERIFY_READ, (unsigned *)data,
   5.383 -			       sizeof(struct user_i387_struct))) {
   5.384 -			ret = -EIO;
   5.385 -			break;
   5.386 -		}
   5.387 -		child->used_math = 1;
   5.388 -		set_fpregs(child, (struct user_i387_struct *)data);
   5.389 -		ret = 0;
   5.390 -		break;
   5.391 -	}
   5.392 -
   5.393 -	case PTRACE_GETFPXREGS: { /* Get the child extended FPU state. */
   5.394 -		if (!access_ok(VERIFY_WRITE, (unsigned *)data,
   5.395 -			       sizeof(struct user_fxsr_struct))) {
   5.396 -			ret = -EIO;
   5.397 -			break;
   5.398 -		}
   5.399 -		if ( !child->used_math )
   5.400 -			load_empty_fpu(child);
   5.401 -		ret = get_fpxregs((struct user_fxsr_struct *)data, child);
   5.402 -		break;
   5.403 -	}
   5.404 -
   5.405 -	case PTRACE_SETFPXREGS: { /* Set the child extended FPU state. */
   5.406 -		if (!access_ok(VERIFY_READ, (unsigned *)data,
   5.407 -			       sizeof(struct user_fxsr_struct))) {
   5.408 -			ret = -EIO;
   5.409 -			break;
   5.410 -		}
   5.411 -		child->used_math = 1;
   5.412 -		ret = set_fpxregs(child, (struct user_fxsr_struct *)data);
   5.413 -		break;
   5.414 -	}
   5.415 -
   5.416 -	case PTRACE_SETOPTIONS: {
   5.417 -		if (data & PTRACE_O_TRACESYSGOOD)
   5.418 -			child->ptrace |= PT_TRACESYSGOOD;
   5.419 -		else
   5.420 -			child->ptrace &= ~PT_TRACESYSGOOD;
   5.421 -		ret = 0;
   5.422 -		break;
   5.423 -	}
   5.424 -
   5.425 -	default:
   5.426 -		ret = -EIO;
   5.427 -		break;
   5.428 -	}
   5.429 -out_tsk:
   5.430 -	free_task_struct(child);
   5.431 -out:
   5.432 -	unlock_kernel();
   5.433 -	return ret;
   5.434 -}
   5.435 -
   5.436 -asmlinkage void syscall_trace(void)
   5.437 -{
   5.438 -	if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) !=
   5.439 -			(PT_PTRACED|PT_TRACESYS))
   5.440 -		return;
   5.441 -	/* the 0x80 provides a way for the tracing parent to distinguish
   5.442 -	   between a syscall stop and SIGTRAP delivery */
   5.443 -	current->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
   5.444 -					? 0x80 : 0);
   5.445 -	current->state = TASK_STOPPED;
   5.446 -	notify_parent(current, SIGCHLD);
   5.447 -	schedule();
   5.448 -	/*
   5.449 -	 * this isn't the same as continuing with a signal, but it will do
   5.450 -	 * for normal use.  strace only continues with a signal if the
   5.451 -	 * stopping signal is not SIGTRAP.  -brl
   5.452 -	 */
   5.453 -	if (current->exit_code) {
   5.454 -		send_sig(current->exit_code, current, 1);
   5.455 -		current->exit_code = 0;
   5.456 -	}
   5.457 -}
     6.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/semaphore.c	Tue Mar 11 14:37:27 2003 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,291 +0,0 @@
     6.4 -/*
     6.5 - * i386 semaphore implementation.
     6.6 - *
     6.7 - * (C) Copyright 1999 Linus Torvalds
     6.8 - *
     6.9 - * Portions Copyright 1999 Red Hat, Inc.
    6.10 - *
    6.11 - *	This program is free software; you can redistribute it and/or
    6.12 - *	modify it under the terms of the GNU General Public License
    6.13 - *	as published by the Free Software Foundation; either version
    6.14 - *	2 of the License, or (at your option) any later version.
    6.15 - *
    6.16 - * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@redhat.com>
    6.17 - */
    6.18 -#include <linux/config.h>
    6.19 -#include <linux/sched.h>
    6.20 -#include <asm/semaphore.h>
    6.21 -
    6.22 -/*
    6.23 - * Semaphores are implemented using a two-way counter:
    6.24 - * The "count" variable is decremented for each process
    6.25 - * that tries to acquire the semaphore, while the "sleeping"
    6.26 - * variable is a count of such acquires.
    6.27 - *
    6.28 - * Notably, the inline "up()" and "down()" functions can
    6.29 - * efficiently test if they need to do any extra work (up
    6.30 - * needs to do something only if count was negative before
    6.31 - * the increment operation.
    6.32 - *
    6.33 - * "sleeping" and the contention routine ordering is
    6.34 - * protected by the semaphore spinlock.
    6.35 - *
    6.36 - * Note that these functions are only called when there is
    6.37 - * contention on the lock, and as such all this is the
    6.38 - * "non-critical" part of the whole semaphore business. The
    6.39 - * critical part is the inline stuff in <asm/semaphore.h>
    6.40 - * where we want to avoid any extra jumps and calls.
    6.41 - */
    6.42 -
    6.43 -/*
    6.44 - * Logic:
    6.45 - *  - only on a boundary condition do we need to care. When we go
    6.46 - *    from a negative count to a non-negative, we wake people up.
    6.47 - *  - when we go from a non-negative count to a negative do we
    6.48 - *    (a) synchronize with the "sleeper" count and (b) make sure
    6.49 - *    that we're on the wakeup list before we synchronize so that
    6.50 - *    we cannot lose wakeup events.
    6.51 - */
    6.52 -
    6.53 -void __up(struct semaphore *sem)
    6.54 -{
    6.55 -	wake_up(&sem->wait);
    6.56 -}
    6.57 -
    6.58 -static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED;
    6.59 -
    6.60 -void __down(struct semaphore * sem)
    6.61 -{
    6.62 -	struct task_struct *tsk = current;
    6.63 -	DECLARE_WAITQUEUE(wait, tsk);
    6.64 -	tsk->state = TASK_UNINTERRUPTIBLE;
    6.65 -	add_wait_queue_exclusive(&sem->wait, &wait);
    6.66 -
    6.67 -	spin_lock_irq(&semaphore_lock);
    6.68 -	sem->sleepers++;
    6.69 -	for (;;) {
    6.70 -		int sleepers = sem->sleepers;
    6.71 -
    6.72 -		/*
    6.73 -		 * Add "everybody else" into it. They aren't
    6.74 -		 * playing, because we own the spinlock.
    6.75 -		 */
    6.76 -		if (!atomic_add_negative(sleepers - 1, &sem->count)) {
    6.77 -			sem->sleepers = 0;
    6.78 -			break;
    6.79 -		}
    6.80 -		sem->sleepers = 1;	/* us - see -1 above */
    6.81 -		spin_unlock_irq(&semaphore_lock);
    6.82 -
    6.83 -		schedule();
    6.84 -		tsk->state = TASK_UNINTERRUPTIBLE;
    6.85 -		spin_lock_irq(&semaphore_lock);
    6.86 -	}
    6.87 -	spin_unlock_irq(&semaphore_lock);
    6.88 -	remove_wait_queue(&sem->wait, &wait);
    6.89 -	tsk->state = TASK_RUNNING;
    6.90 -	wake_up(&sem->wait);
    6.91 -}
    6.92 -
    6.93 -int __down_interruptible(struct semaphore * sem)
    6.94 -{
    6.95 -	int retval = 0;
    6.96 -	struct task_struct *tsk = current;
    6.97 -	DECLARE_WAITQUEUE(wait, tsk);
    6.98 -	tsk->state = TASK_INTERRUPTIBLE;
    6.99 -	add_wait_queue_exclusive(&sem->wait, &wait);
   6.100 -
   6.101 -	spin_lock_irq(&semaphore_lock);
   6.102 -	sem->sleepers ++;
   6.103 -	for (;;) {
   6.104 -		int sleepers = sem->sleepers;
   6.105 -
   6.106 -		/*
   6.107 -		 * With signals pending, this turns into
   6.108 -		 * the trylock failure case - we won't be
   6.109 -		 * sleeping, and we* can't get the lock as
   6.110 -		 * it has contention. Just correct the count
   6.111 -		 * and exit.
   6.112 -		 */
   6.113 -		if (signal_pending(current)) {
   6.114 -			retval = -EINTR;
   6.115 -			sem->sleepers = 0;
   6.116 -			atomic_add(sleepers, &sem->count);
   6.117 -			break;
   6.118 -		}
   6.119 -
   6.120 -		/*
   6.121 -		 * Add "everybody else" into it. They aren't
   6.122 -		 * playing, because we own the spinlock. The
   6.123 -		 * "-1" is because we're still hoping to get
   6.124 -		 * the lock.
   6.125 -		 */
   6.126 -		if (!atomic_add_negative(sleepers - 1, &sem->count)) {
   6.127 -			sem->sleepers = 0;
   6.128 -			break;
   6.129 -		}
   6.130 -		sem->sleepers = 1;	/* us - see -1 above */
   6.131 -		spin_unlock_irq(&semaphore_lock);
   6.132 -
   6.133 -		schedule();
   6.134 -		tsk->state = TASK_INTERRUPTIBLE;
   6.135 -		spin_lock_irq(&semaphore_lock);
   6.136 -	}
   6.137 -	spin_unlock_irq(&semaphore_lock);
   6.138 -	tsk->state = TASK_RUNNING;
   6.139 -	remove_wait_queue(&sem->wait, &wait);
   6.140 -	wake_up(&sem->wait);
   6.141 -	return retval;
   6.142 -}
   6.143 -
   6.144 -/*
   6.145 - * Trylock failed - make sure we correct for
   6.146 - * having decremented the count.
   6.147 - *
   6.148 - * We could have done the trylock with a
   6.149 - * single "cmpxchg" without failure cases,
   6.150 - * but then it wouldn't work on a 386.
   6.151 - */
   6.152 -int __down_trylock(struct semaphore * sem)
   6.153 -{
   6.154 -	int sleepers;
   6.155 -	unsigned long flags;
   6.156 -
   6.157 -	spin_lock_irqsave(&semaphore_lock, flags);
   6.158 -	sleepers = sem->sleepers + 1;
   6.159 -	sem->sleepers = 0;
   6.160 -
   6.161 -	/*
   6.162 -	 * Add "everybody else" and us into it. They aren't
   6.163 -	 * playing, because we own the spinlock.
   6.164 -	 */
   6.165 -	if (!atomic_add_negative(sleepers, &sem->count))
   6.166 -		wake_up(&sem->wait);
   6.167 -
   6.168 -	spin_unlock_irqrestore(&semaphore_lock, flags);
   6.169 -	return 1;
   6.170 -}
   6.171 -
   6.172 -
   6.173 -/*
   6.174 - * The semaphore operations have a special calling sequence that
   6.175 - * allow us to do a simpler in-line version of them. These routines
   6.176 - * need to convert that sequence back into the C sequence when
   6.177 - * there is contention on the semaphore.
   6.178 - *
   6.179 - * %ecx contains the semaphore pointer on entry. Save the C-clobbered
   6.180 - * registers (%eax, %edx and %ecx) except %eax when used as a return
   6.181 - * value..
   6.182 - */
   6.183 -asm(
   6.184 -".text\n"
   6.185 -".align 4\n"
   6.186 -".globl __down_failed\n"
   6.187 -"__down_failed:\n\t"
   6.188 -#if defined(CONFIG_FRAME_POINTER)
   6.189 -	"pushl %ebp\n\t"
   6.190 -	"movl  %esp,%ebp\n\t"
   6.191 -#endif
   6.192 -	"pushl %eax\n\t"
   6.193 -	"pushl %edx\n\t"
   6.194 -	"pushl %ecx\n\t"
   6.195 -	"call __down\n\t"
   6.196 -	"popl %ecx\n\t"
   6.197 -	"popl %edx\n\t"
   6.198 -	"popl %eax\n\t"
   6.199 -#if defined(CONFIG_FRAME_POINTER)
   6.200 -	"movl %ebp,%esp\n\t"
   6.201 -	"popl %ebp\n\t"
   6.202 -#endif
   6.203 -	"ret"
   6.204 -);
   6.205 -
   6.206 -asm(
   6.207 -".text\n"
   6.208 -".align 4\n"
   6.209 -".globl __down_failed_interruptible\n"
   6.210 -"__down_failed_interruptible:\n\t"
   6.211 -#if defined(CONFIG_FRAME_POINTER)
   6.212 -	"pushl %ebp\n\t"
   6.213 -	"movl  %esp,%ebp\n\t"
   6.214 -#endif
   6.215 -	"pushl %edx\n\t"
   6.216 -	"pushl %ecx\n\t"
   6.217 -	"call __down_interruptible\n\t"
   6.218 -	"popl %ecx\n\t"
   6.219 -	"popl %edx\n\t"
   6.220 -#if defined(CONFIG_FRAME_POINTER)
   6.221 -	"movl %ebp,%esp\n\t"
   6.222 -	"popl %ebp\n\t"
   6.223 -#endif
   6.224 -	"ret"
   6.225 -);
   6.226 -
   6.227 -asm(
   6.228 -".text\n"
   6.229 -".align 4\n"
   6.230 -".globl __down_failed_trylock\n"
   6.231 -"__down_failed_trylock:\n\t"
   6.232 -#if defined(CONFIG_FRAME_POINTER)
   6.233 -	"pushl %ebp\n\t"
   6.234 -	"movl  %esp,%ebp\n\t"
   6.235 -#endif
   6.236 -	"pushl %edx\n\t"
   6.237 -	"pushl %ecx\n\t"
   6.238 -	"call __down_trylock\n\t"
   6.239 -	"popl %ecx\n\t"
   6.240 -	"popl %edx\n\t"
   6.241 -#if defined(CONFIG_FRAME_POINTER)
   6.242 -	"movl %ebp,%esp\n\t"
   6.243 -	"popl %ebp\n\t"
   6.244 -#endif
   6.245 -	"ret"
   6.246 -);
   6.247 -
   6.248 -asm(
   6.249 -".text\n"
   6.250 -".align 4\n"
   6.251 -".globl __up_wakeup\n"
   6.252 -"__up_wakeup:\n\t"
   6.253 -	"pushl %eax\n\t"
   6.254 -	"pushl %edx\n\t"
   6.255 -	"pushl %ecx\n\t"
   6.256 -	"call __up\n\t"
   6.257 -	"popl %ecx\n\t"
   6.258 -	"popl %edx\n\t"
   6.259 -	"popl %eax\n\t"
   6.260 -	"ret"
   6.261 -);
   6.262 -
   6.263 -/*
   6.264 - * rw spinlock fallbacks
   6.265 - */
   6.266 -#if defined(CONFIG_SMP)
   6.267 -asm(
   6.268 -".text\n"
   6.269 -".align	4\n"
   6.270 -".globl	__write_lock_failed\n"
   6.271 -"__write_lock_failed:\n\t"
   6.272 -	LOCK "addl	$" RW_LOCK_BIAS_STR ",(%eax)\n"
   6.273 -"1:	rep; nop\n\t"
   6.274 -	"cmpl	$" RW_LOCK_BIAS_STR ",(%eax)\n\t"
   6.275 -	"jne	1b\n\t"
   6.276 -	LOCK "subl	$" RW_LOCK_BIAS_STR ",(%eax)\n\t"
   6.277 -	"jnz	__write_lock_failed\n\t"
   6.278 -	"ret"
   6.279 -);
   6.280 -
   6.281 -asm(
   6.282 -".text\n"
   6.283 -".align	4\n"
   6.284 -".globl	__read_lock_failed\n"
   6.285 -"__read_lock_failed:\n\t"
   6.286 -	LOCK "incl	(%eax)\n"
   6.287 -"1:	rep; nop\n\t"
   6.288 -	"cmpl	$1,(%eax)\n\t"
   6.289 -	"js	1b\n\t"
   6.290 -	LOCK "decl	(%eax)\n\t"
   6.291 -	"js	__read_lock_failed\n\t"
   6.292 -	"ret"
   6.293 -);
   6.294 -#endif
     7.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/sys_i386.c	Tue Mar 11 14:37:27 2003 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,256 +0,0 @@
     7.4 -/*
     7.5 - * linux/arch/i386/kernel/sys_i386.c
     7.6 - *
     7.7 - * This file contains various random system calls that
     7.8 - * have a non-standard calling sequence on the Linux/i386
     7.9 - * platform.
    7.10 - */
    7.11 -
    7.12 -#include <linux/errno.h>
    7.13 -#include <linux/sched.h>
    7.14 -#include <linux/mm.h>
    7.15 -#include <linux/smp.h>
    7.16 -#include <linux/smp_lock.h>
    7.17 -#include <linux/sem.h>
    7.18 -#include <linux/msg.h>
    7.19 -#include <linux/shm.h>
    7.20 -#include <linux/stat.h>
    7.21 -#include <linux/mman.h>
    7.22 -#include <linux/file.h>
    7.23 -#include <linux/utsname.h>
    7.24 -
    7.25 -#include <asm/uaccess.h>
    7.26 -#include <asm/ipc.h>
    7.27 -
    7.28 -/*
    7.29 - * sys_pipe() is the normal C calling standard for creating
    7.30 - * a pipe. It's not the way Unix traditionally does this, though.
    7.31 - */
    7.32 -asmlinkage int sys_pipe(unsigned long * fildes)
    7.33 -{
    7.34 -	int fd[2];
    7.35 -	int error;
    7.36 -
    7.37 -	error = do_pipe(fd);
    7.38 -	if (!error) {
    7.39 -		if (copy_to_user(fildes, fd, 2*sizeof(int)))
    7.40 -			error = -EFAULT;
    7.41 -	}
    7.42 -	return error;
    7.43 -}
    7.44 -
    7.45 -/* common code for old and new mmaps */
    7.46 -static inline long do_mmap2(
    7.47 -	unsigned long addr, unsigned long len,
    7.48 -	unsigned long prot, unsigned long flags,
    7.49 -	unsigned long fd, unsigned long pgoff)
    7.50 -{
    7.51 -	int error = -EBADF;
    7.52 -	struct file * file = NULL;
    7.53 -
    7.54 -	flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
    7.55 -	if (!(flags & MAP_ANONYMOUS)) {
    7.56 -		file = fget(fd);
    7.57 -		if (!file)
    7.58 -			goto out;
    7.59 -	}
    7.60 -
    7.61 -	down_write(&current->mm->mmap_sem);
    7.62 -	error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
    7.63 -	up_write(&current->mm->mmap_sem);
    7.64 -
    7.65 -	if (file)
    7.66 -		fput(file);
    7.67 -out:
    7.68 -	return error;
    7.69 -}
    7.70 -
    7.71 -asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
    7.72 -	unsigned long prot, unsigned long flags,
    7.73 -	unsigned long fd, unsigned long pgoff)
    7.74 -{
    7.75 -	return do_mmap2(addr, len, prot, flags, fd, pgoff);
    7.76 -}
    7.77 -
    7.78 -/*
    7.79 - * Perform the select(nd, in, out, ex, tv) and mmap() system
    7.80 - * calls. Linux/i386 didn't use to be able to handle more than
    7.81 - * 4 system call parameters, so these system calls used a memory
    7.82 - * block for parameter passing..
    7.83 - */
    7.84 -
    7.85 -struct mmap_arg_struct {
    7.86 -	unsigned long addr;
    7.87 -	unsigned long len;
    7.88 -	unsigned long prot;
    7.89 -	unsigned long flags;
    7.90 -	unsigned long fd;
    7.91 -	unsigned long offset;
    7.92 -};
    7.93 -
    7.94 -asmlinkage int old_mmap(struct mmap_arg_struct *arg)
    7.95 -{
    7.96 -	struct mmap_arg_struct a;
    7.97 -	int err = -EFAULT;
    7.98 -
    7.99 -	if (copy_from_user(&a, arg, sizeof(a)))
   7.100 -		goto out;
   7.101 -
   7.102 -	err = -EINVAL;
   7.103 -	if (a.offset & ~PAGE_MASK)
   7.104 -		goto out;
   7.105 -
   7.106 -	err = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT);
   7.107 -out:
   7.108 -	return err;
   7.109 -}
   7.110 -
   7.111 -
   7.112 -extern asmlinkage int sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
   7.113 -
   7.114 -struct sel_arg_struct {
   7.115 -	unsigned long n;
   7.116 -	fd_set *inp, *outp, *exp;
   7.117 -	struct timeval *tvp;
   7.118 -};
   7.119 -
   7.120 -asmlinkage int old_select(struct sel_arg_struct *arg)
   7.121 -{
   7.122 -	struct sel_arg_struct a;
   7.123 -
   7.124 -	if (copy_from_user(&a, arg, sizeof(a)))
   7.125 -		return -EFAULT;
   7.126 -	/* sys_select() does the appropriate kernel locking */
   7.127 -	return sys_select(a.n, a.inp, a.outp, a.exp, a.tvp);
   7.128 -}
   7.129 -
   7.130 -/*
   7.131 - * sys_ipc() is the de-multiplexer for the SysV IPC calls..
   7.132 - *
   7.133 - * This is really horribly ugly.
   7.134 - */
   7.135 -asmlinkage int sys_ipc (uint call, int first, int second,
   7.136 -			int third, void *ptr, long fifth)
   7.137 -{
   7.138 -	int version, ret;
   7.139 -
   7.140 -	version = call >> 16; /* hack for backward compatibility */
   7.141 -	call &= 0xffff;
   7.142 -
   7.143 -	switch (call) {
   7.144 -	case SEMOP:
   7.145 -		return sys_semop (first, (struct sembuf *)ptr, second);
   7.146 -	case SEMGET:
   7.147 -		return sys_semget (first, second, third);
   7.148 -	case SEMCTL: {
   7.149 -		union semun fourth;
   7.150 -		if (!ptr)
   7.151 -			return -EINVAL;
   7.152 -		if (get_user(fourth.__pad, (void **) ptr))
   7.153 -			return -EFAULT;
   7.154 -		return sys_semctl (first, second, third, fourth);
   7.155 -	}
   7.156 -
   7.157 -	case MSGSND:
   7.158 -		return sys_msgsnd (first, (struct msgbuf *) ptr, 
   7.159 -				   second, third);
   7.160 -	case MSGRCV:
   7.161 -		switch (version) {
   7.162 -		case 0: {
   7.163 -			struct ipc_kludge tmp;
   7.164 -			if (!ptr)
   7.165 -				return -EINVAL;
   7.166 -			
   7.167 -			if (copy_from_user(&tmp,
   7.168 -					   (struct ipc_kludge *) ptr, 
   7.169 -					   sizeof (tmp)))
   7.170 -				return -EFAULT;
   7.171 -			return sys_msgrcv (first, tmp.msgp, second,
   7.172 -					   tmp.msgtyp, third);
   7.173 -		}
   7.174 -		default:
   7.175 -			return sys_msgrcv (first,
   7.176 -					   (struct msgbuf *) ptr,
   7.177 -					   second, fifth, third);
   7.178 -		}
   7.179 -	case MSGGET:
   7.180 -		return sys_msgget ((key_t) first, second);
   7.181 -	case MSGCTL:
   7.182 -		return sys_msgctl (first, second, (struct msqid_ds *) ptr);
   7.183 -
   7.184 -	case SHMAT:
   7.185 -		switch (version) {
   7.186 -		default: {
   7.187 -			ulong raddr;
   7.188 -			ret = sys_shmat (first, (char *) ptr, second, &raddr);
   7.189 -			if (ret)
   7.190 -				return ret;
   7.191 -			return put_user (raddr, (ulong *) third);
   7.192 -		}
   7.193 -		case 1:	/* iBCS2 emulator entry point */
   7.194 -			if (!segment_eq(get_fs(), get_ds()))
   7.195 -				return -EINVAL;
   7.196 -			return sys_shmat (first, (char *) ptr, second, (ulong *) third);
   7.197 -		}
   7.198 -	case SHMDT: 
   7.199 -		return sys_shmdt ((char *)ptr);
   7.200 -	case SHMGET:
   7.201 -		return sys_shmget (first, second, third);
   7.202 -	case SHMCTL:
   7.203 -		return sys_shmctl (first, second,
   7.204 -				   (struct shmid_ds *) ptr);
   7.205 -	default:
   7.206 -		return -EINVAL;
   7.207 -	}
   7.208 -}
   7.209 -
   7.210 -/*
   7.211 - * Old cruft
   7.212 - */
   7.213 -asmlinkage int sys_uname(struct old_utsname * name)
   7.214 -{
   7.215 -	int err;
   7.216 -	if (!name)
   7.217 -		return -EFAULT;
   7.218 -	down_read(&uts_sem);
   7.219 -	err=copy_to_user(name, &system_utsname, sizeof (*name));
   7.220 -	up_read(&uts_sem);
   7.221 -	return err?-EFAULT:0;
   7.222 -}
   7.223 -
   7.224 -asmlinkage int sys_olduname(struct oldold_utsname * name)
   7.225 -{
   7.226 -	int error;
   7.227 -
   7.228 -	if (!name)
   7.229 -		return -EFAULT;
   7.230 -	if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname)))
   7.231 -		return -EFAULT;
   7.232 -  
   7.233 -  	down_read(&uts_sem);
   7.234 -	
   7.235 -	error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN);
   7.236 -	error |= __put_user(0,name->sysname+__OLD_UTS_LEN);
   7.237 -	error |= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);
   7.238 -	error |= __put_user(0,name->nodename+__OLD_UTS_LEN);
   7.239 -	error |= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN);
   7.240 -	error |= __put_user(0,name->release+__OLD_UTS_LEN);
   7.241 -	error |= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN);
   7.242 -	error |= __put_user(0,name->version+__OLD_UTS_LEN);
   7.243 -	error |= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);
   7.244 -	error |= __put_user(0,name->machine+__OLD_UTS_LEN);
   7.245 -	
   7.246 -	up_read(&uts_sem);
   7.247 -	
   7.248 -	error = error ? -EFAULT : 0;
   7.249 -
   7.250 -	return error;
   7.251 -}
   7.252 -
   7.253 -asmlinkage int sys_pause(void)
   7.254 -{
   7.255 -	current->state = TASK_INTERRUPTIBLE;
   7.256 -	schedule();
   7.257 -	return -ERESTARTNOHAND;
   7.258 -}
   7.259 -
     8.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/checksum.S	Tue Mar 11 14:37:27 2003 +0000
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,496 +0,0 @@
     8.4 -/*
     8.5 - * INET		An implementation of the TCP/IP protocol suite for the LINUX
     8.6 - *		operating system.  INET is implemented using the  BSD Socket
     8.7 - *		interface as the means of communication with the user level.
     8.8 - *
     8.9 - *		IP/TCP/UDP checksumming routines
    8.10 - *
    8.11 - * Authors:	Jorge Cwik, <jorge@laser.satlink.net>
    8.12 - *		Arnt Gulbrandsen, <agulbra@nvg.unit.no>
    8.13 - *		Tom May, <ftom@netcom.com>
    8.14 - *              Pentium Pro/II routines:
    8.15 - *              Alexander Kjeldaas <astor@guardian.no>
    8.16 - *              Finn Arne Gangstad <finnag@guardian.no>
    8.17 - *		Lots of code moved from tcp.c and ip.c; see those files
    8.18 - *		for more names.
    8.19 - *
    8.20 - * Changes:     Ingo Molnar, converted csum_partial_copy() to 2.1 exception
    8.21 - *			     handling.
    8.22 - *		Andi Kleen,  add zeroing on error
    8.23 - *                   converted to pure assembler
    8.24 - *
    8.25 - *		This program is free software; you can redistribute it and/or
    8.26 - *		modify it under the terms of the GNU General Public License
    8.27 - *		as published by the Free Software Foundation; either version
    8.28 - *		2 of the License, or (at your option) any later version.
    8.29 - */
    8.30 -
    8.31 -#include <linux/config.h>
    8.32 -#include <asm/errno.h>
    8.33 -				
    8.34 -/*
    8.35 - * computes a partial checksum, e.g. for TCP/UDP fragments
    8.36 - */
    8.37 -
    8.38 -/*	
    8.39 -unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum)
    8.40 - */
    8.41 -		
    8.42 -.text
    8.43 -.align 4
    8.44 -.globl csum_partial								
    8.45 -		
    8.46 -#ifndef CONFIG_X86_USE_PPRO_CHECKSUM
    8.47 -
    8.48 -	  /*		
    8.49 -	   * Experiments with Ethernet and SLIP connections show that buff
    8.50 -	   * is aligned on either a 2-byte or 4-byte boundary.  We get at
    8.51 -	   * least a twofold speedup on 486 and Pentium if it is 4-byte aligned.
    8.52 -	   * Fortunately, it is easy to convert 2-byte alignment to 4-byte
    8.53 -	   * alignment for the unrolled loop.
    8.54 -	   */		
    8.55 -csum_partial:	
    8.56 -	pushl %esi
    8.57 -	pushl %ebx
    8.58 -	movl 20(%esp),%eax	# Function arg: unsigned int sum
    8.59 -	movl 16(%esp),%ecx	# Function arg: int len
    8.60 -	movl 12(%esp),%esi	# Function arg: unsigned char *buff
    8.61 -	testl $3, %esi		# Check alignment.
    8.62 -	jz 2f			# Jump if alignment is ok.
    8.63 -	testl $1, %esi		# Check alignment.
    8.64 -	jz 10f			# Jump if alignment is boundary of 2bytes.
    8.65 -
    8.66 -	# buf is odd
    8.67 -	dec %ecx
    8.68 -	jl 8f
    8.69 -	movzbl (%esi), %ebx
    8.70 -	adcl %ebx, %eax
    8.71 -	roll $8, %eax
    8.72 -	inc %esi
    8.73 -	testl $2, %esi
    8.74 -	jz 2f
    8.75 -10:
    8.76 -	subl $2, %ecx		# Alignment uses up two bytes.
    8.77 -	jae 1f			# Jump if we had at least two bytes.
    8.78 -	addl $2, %ecx		# ecx was < 2.  Deal with it.
    8.79 -	jmp 4f
    8.80 -1:	movw (%esi), %bx
    8.81 -	addl $2, %esi
    8.82 -	addw %bx, %ax
    8.83 -	adcl $0, %eax
    8.84 -2:
    8.85 -	movl %ecx, %edx
    8.86 -	shrl $5, %ecx
    8.87 -	jz 2f
    8.88 -	testl %esi, %esi
    8.89 -1:	movl (%esi), %ebx
    8.90 -	adcl %ebx, %eax
    8.91 -	movl 4(%esi), %ebx
    8.92 -	adcl %ebx, %eax
    8.93 -	movl 8(%esi), %ebx
    8.94 -	adcl %ebx, %eax
    8.95 -	movl 12(%esi), %ebx
    8.96 -	adcl %ebx, %eax
    8.97 -	movl 16(%esi), %ebx
    8.98 -	adcl %ebx, %eax
    8.99 -	movl 20(%esi), %ebx
   8.100 -	adcl %ebx, %eax
   8.101 -	movl 24(%esi), %ebx
   8.102 -	adcl %ebx, %eax
   8.103 -	movl 28(%esi), %ebx
   8.104 -	adcl %ebx, %eax
   8.105 -	lea 32(%esi), %esi
   8.106 -	dec %ecx
   8.107 -	jne 1b
   8.108 -	adcl $0, %eax
   8.109 -2:	movl %edx, %ecx
   8.110 -	andl $0x1c, %edx
   8.111 -	je 4f
   8.112 -	shrl $2, %edx		# This clears CF
   8.113 -3:	adcl (%esi), %eax
   8.114 -	lea 4(%esi), %esi
   8.115 -	dec %edx
   8.116 -	jne 3b
   8.117 -	adcl $0, %eax
   8.118 -4:	andl $3, %ecx
   8.119 -	jz 7f
   8.120 -	cmpl $2, %ecx
   8.121 -	jb 5f
   8.122 -	movw (%esi),%cx
   8.123 -	leal 2(%esi),%esi
   8.124 -	je 6f
   8.125 -	shll $16,%ecx
   8.126 -5:	movb (%esi),%cl
   8.127 -6:	addl %ecx,%eax
   8.128 -	adcl $0, %eax 
   8.129 -7:	
   8.130 -	testl $1, 12(%esp)
   8.131 -	jz 8f
   8.132 -	roll $8, %eax
   8.133 -8:
   8.134 -	popl %ebx
   8.135 -	popl %esi
   8.136 -	ret
   8.137 -
   8.138 -#else
   8.139 -
   8.140 -/* Version for PentiumII/PPro */
   8.141 -
   8.142 -csum_partial:
   8.143 -	pushl %esi
   8.144 -	pushl %ebx
   8.145 -	movl 20(%esp),%eax	# Function arg: unsigned int sum
   8.146 -	movl 16(%esp),%ecx	# Function arg: int len
   8.147 -	movl 12(%esp),%esi	# Function arg:	const unsigned char *buf
   8.148 -
   8.149 -	testl $3, %esi         
   8.150 -	jnz 25f                 
   8.151 -10:
   8.152 -	movl %ecx, %edx
   8.153 -	movl %ecx, %ebx
   8.154 -	andl $0x7c, %ebx
   8.155 -	shrl $7, %ecx
   8.156 -	addl %ebx,%esi
   8.157 -	shrl $2, %ebx  
   8.158 -	negl %ebx
   8.159 -	lea 45f(%ebx,%ebx,2), %ebx
   8.160 -	testl %esi, %esi
   8.161 -	jmp *%ebx
   8.162 -
   8.163 -	# Handle 2-byte-aligned regions
   8.164 -20:	addw (%esi), %ax
   8.165 -	lea 2(%esi), %esi
   8.166 -	adcl $0, %eax
   8.167 -	jmp 10b
   8.168 -25:
   8.169 -	testl $1, %esi         
   8.170 -	jz 30f                 
   8.171 -	# buf is odd
   8.172 -	dec %ecx
   8.173 -	jl 90f
   8.174 -	movzbl (%esi), %ebx
   8.175 -	addl %ebx, %eax
   8.176 -	adcl $0, %eax
   8.177 -	roll $8, %eax
   8.178 -	inc %esi
   8.179 -	testl $2, %esi
   8.180 -	jz 10b
   8.181 -
   8.182 -30:	subl $2, %ecx          
   8.183 -	ja 20b                 
   8.184 -	je 32f
   8.185 -	addl $2, %ecx
   8.186 -	jz 80f
   8.187 -	movzbl (%esi),%ebx	# csumming 1 byte, 2-aligned
   8.188 -	addl %ebx, %eax
   8.189 -	adcl $0, %eax
   8.190 -	jmp 80f
   8.191 -32:
   8.192 -	addw (%esi), %ax	# csumming 2 bytes, 2-aligned
   8.193 -	adcl $0, %eax
   8.194 -	jmp 80f
   8.195 -
   8.196 -40: 
   8.197 -	addl -128(%esi), %eax
   8.198 -	adcl -124(%esi), %eax
   8.199 -	adcl -120(%esi), %eax
   8.200 -	adcl -116(%esi), %eax   
   8.201 -	adcl -112(%esi), %eax   
   8.202 -	adcl -108(%esi), %eax
   8.203 -	adcl -104(%esi), %eax
   8.204 -	adcl -100(%esi), %eax
   8.205 -	adcl -96(%esi), %eax
   8.206 -	adcl -92(%esi), %eax
   8.207 -	adcl -88(%esi), %eax
   8.208 -	adcl -84(%esi), %eax
   8.209 -	adcl -80(%esi), %eax
   8.210 -	adcl -76(%esi), %eax
   8.211 -	adcl -72(%esi), %eax
   8.212 -	adcl -68(%esi), %eax
   8.213 -	adcl -64(%esi), %eax     
   8.214 -	adcl -60(%esi), %eax     
   8.215 -	adcl -56(%esi), %eax     
   8.216 -	adcl -52(%esi), %eax   
   8.217 -	adcl -48(%esi), %eax   
   8.218 -	adcl -44(%esi), %eax
   8.219 -	adcl -40(%esi), %eax
   8.220 -	adcl -36(%esi), %eax
   8.221 -	adcl -32(%esi), %eax
   8.222 -	adcl -28(%esi), %eax
   8.223 -	adcl -24(%esi), %eax
   8.224 -	adcl -20(%esi), %eax
   8.225 -	adcl -16(%esi), %eax
   8.226 -	adcl -12(%esi), %eax
   8.227 -	adcl -8(%esi), %eax
   8.228 -	adcl -4(%esi), %eax
   8.229 -45:
   8.230 -	lea 128(%esi), %esi
   8.231 -	adcl $0, %eax
   8.232 -	dec %ecx
   8.233 -	jge 40b
   8.234 -	movl %edx, %ecx
   8.235 -50:	andl $3, %ecx
   8.236 -	jz 80f
   8.237 -
   8.238 -	# Handle the last 1-3 bytes without jumping
   8.239 -	notl %ecx		# 1->2, 2->1, 3->0, higher bits are masked
   8.240 -	movl $0xffffff,%ebx	# by the shll and shrl instructions
   8.241 -	shll $3,%ecx
   8.242 -	shrl %cl,%ebx
   8.243 -	andl -128(%esi),%ebx	# esi is 4-aligned so should be ok
   8.244 -	addl %ebx,%eax
   8.245 -	adcl $0,%eax
   8.246 -80: 
   8.247 -	testl $1, 12(%esp)
   8.248 -	jz 90f
   8.249 -	roll $8, %eax
   8.250 -90: 
   8.251 -	popl %ebx
   8.252 -	popl %esi
   8.253 -	ret
   8.254 -				
   8.255 -#endif
   8.256 -
   8.257 -/*
   8.258 -unsigned int csum_partial_copy_generic (const char *src, char *dst,
   8.259 -				  int len, int sum, int *src_err_ptr, int *dst_err_ptr)
   8.260 - */ 
   8.261 -
   8.262 -/*
   8.263 - * Copy from ds while checksumming, otherwise like csum_partial
   8.264 - *
   8.265 - * The macros SRC and DST specify the type of access for the instruction.
   8.266 - * thus we can call a custom exception handler for all access types.
   8.267 - *
   8.268 - * FIXME: could someone double-check whether I haven't mixed up some SRC and
   8.269 - *	  DST definitions? It's damn hard to trigger all cases.  I hope I got
   8.270 - *	  them all but there's no guarantee.
   8.271 - */
   8.272 -
   8.273 -#define SRC(y...)			\
   8.274 -	9999: y;			\
   8.275 -	.section __ex_table, "a";	\
   8.276 -	.long 9999b, 6001f	;	\
   8.277 -	.previous
   8.278 -
   8.279 -#define DST(y...)			\
   8.280 -	9999: y;			\
   8.281 -	.section __ex_table, "a";	\
   8.282 -	.long 9999b, 6002f	;	\
   8.283 -	.previous
   8.284 -
   8.285 -.align 4
   8.286 -.globl csum_partial_copy_generic
   8.287 -				
   8.288 -#ifndef CONFIG_X86_USE_PPRO_CHECKSUM
   8.289 -
   8.290 -#define ARGBASE 16		
   8.291 -#define FP		12
   8.292 -		
   8.293 -csum_partial_copy_generic:
   8.294 -	subl  $4,%esp	
   8.295 -	pushl %edi
   8.296 -	pushl %esi
   8.297 -	pushl %ebx
   8.298 -	movl ARGBASE+16(%esp),%eax	# sum
   8.299 -	movl ARGBASE+12(%esp),%ecx	# len
   8.300 -	movl ARGBASE+4(%esp),%esi	# src
   8.301 -	movl ARGBASE+8(%esp),%edi	# dst
   8.302 -
   8.303 -	testl $2, %edi			# Check alignment. 
   8.304 -	jz 2f				# Jump if alignment is ok.
   8.305 -	subl $2, %ecx			# Alignment uses up two bytes.
   8.306 -	jae 1f				# Jump if we had at least two bytes.
   8.307 -	addl $2, %ecx			# ecx was < 2.  Deal with it.
   8.308 -	jmp 4f
   8.309 -SRC(1:	movw (%esi), %bx	)
   8.310 -	addl $2, %esi
   8.311 -DST(	movw %bx, (%edi)	)
   8.312 -	addl $2, %edi
   8.313 -	addw %bx, %ax	
   8.314 -	adcl $0, %eax
   8.315 -2:
   8.316 -	movl %ecx, FP(%esp)
   8.317 -	shrl $5, %ecx
   8.318 -	jz 2f
   8.319 -	testl %esi, %esi
   8.320 -SRC(1:	movl (%esi), %ebx	)
   8.321 -SRC(	movl 4(%esi), %edx	)
   8.322 -	adcl %ebx, %eax
   8.323 -DST(	movl %ebx, (%edi)	)
   8.324 -	adcl %edx, %eax
   8.325 -DST(	movl %edx, 4(%edi)	)
   8.326 -
   8.327 -SRC(	movl 8(%esi), %ebx	)
   8.328 -SRC(	movl 12(%esi), %edx	)
   8.329 -	adcl %ebx, %eax
   8.330 -DST(	movl %ebx, 8(%edi)	)
   8.331 -	adcl %edx, %eax
   8.332 -DST(	movl %edx, 12(%edi)	)
   8.333 -
   8.334 -SRC(	movl 16(%esi), %ebx 	)
   8.335 -SRC(	movl 20(%esi), %edx	)
   8.336 -	adcl %ebx, %eax
   8.337 -DST(	movl %ebx, 16(%edi)	)
   8.338 -	adcl %edx, %eax
   8.339 -DST(	movl %edx, 20(%edi)	)
   8.340 -
   8.341 -SRC(	movl 24(%esi), %ebx	)
   8.342 -SRC(	movl 28(%esi), %edx	)
   8.343 -	adcl %ebx, %eax
   8.344 -DST(	movl %ebx, 24(%edi)	)
   8.345 -	adcl %edx, %eax
   8.346 -DST(	movl %edx, 28(%edi)	)
   8.347 -
   8.348 -	lea 32(%esi), %esi
   8.349 -	lea 32(%edi), %edi
   8.350 -	dec %ecx
   8.351 -	jne 1b
   8.352 -	adcl $0, %eax
   8.353 -2:	movl FP(%esp), %edx
   8.354 -	movl %edx, %ecx
   8.355 -	andl $0x1c, %edx
   8.356 -	je 4f
   8.357 -	shrl $2, %edx			# This clears CF
   8.358 -SRC(3:	movl (%esi), %ebx	)
   8.359 -	adcl %ebx, %eax
   8.360 -DST(	movl %ebx, (%edi)	)
   8.361 -	lea 4(%esi), %esi
   8.362 -	lea 4(%edi), %edi
   8.363 -	dec %edx
   8.364 -	jne 3b
   8.365 -	adcl $0, %eax
   8.366 -4:	andl $3, %ecx
   8.367 -	jz 7f
   8.368 -	cmpl $2, %ecx
   8.369 -	jb 5f
   8.370 -SRC(	movw (%esi), %cx	)
   8.371 -	leal 2(%esi), %esi
   8.372 -DST(	movw %cx, (%edi)	)
   8.373 -	leal 2(%edi), %edi
   8.374 -	je 6f
   8.375 -	shll $16,%ecx
   8.376 -SRC(5:	movb (%esi), %cl	)
   8.377 -DST(	movb %cl, (%edi)	)
   8.378 -6:	addl %ecx, %eax
   8.379 -	adcl $0, %eax
   8.380 -7:
   8.381 -5000:
   8.382 -
   8.383 -# Exception handler:
   8.384 -.section .fixup, "ax"							
   8.385 -
   8.386 -6001:
   8.387 -	movl ARGBASE+20(%esp), %ebx	# src_err_ptr
   8.388 -	movl $-EFAULT, (%ebx)
   8.389 -
   8.390 -	# zero the complete destination - computing the rest
   8.391 -	# is too much work 
   8.392 -	movl ARGBASE+8(%esp), %edi	# dst
   8.393 -	movl ARGBASE+12(%esp), %ecx	# len
   8.394 -	xorl %eax,%eax
   8.395 -	rep ; stosb
   8.396 -
   8.397 -	jmp 5000b
   8.398 -
   8.399 -6002:
   8.400 -	movl ARGBASE+24(%esp), %ebx	# dst_err_ptr
   8.401 -	movl $-EFAULT,(%ebx)
   8.402 -	jmp 5000b
   8.403 -
   8.404 -.previous
   8.405 -
   8.406 -	popl %ebx
   8.407 -	popl %esi
   8.408 -	popl %edi
   8.409 -	popl %ecx			# equivalent to addl $4,%esp
   8.410 -	ret	
   8.411 -
   8.412 -#else
   8.413 -
   8.414 -/* Version for PentiumII/PPro */
   8.415 -
   8.416 -#define ROUND1(x) \
   8.417 -	SRC(movl x(%esi), %ebx	)	;	\
   8.418 -	addl %ebx, %eax			;	\
   8.419 -	DST(movl %ebx, x(%edi)	)	; 
   8.420 -
   8.421 -#define ROUND(x) \
   8.422 -	SRC(movl x(%esi), %ebx	)	;	\
   8.423 -	adcl %ebx, %eax			;	\
   8.424 -	DST(movl %ebx, x(%edi)	)	;
   8.425 -
   8.426 -#define ARGBASE 12
   8.427 -		
   8.428 -csum_partial_copy_generic:
   8.429 -	pushl %ebx
   8.430 -	pushl %edi
   8.431 -	pushl %esi
   8.432 -	movl ARGBASE+4(%esp),%esi	#src
   8.433 -	movl ARGBASE+8(%esp),%edi	#dst	
   8.434 -	movl ARGBASE+12(%esp),%ecx	#len
   8.435 -	movl ARGBASE+16(%esp),%eax	#sum
   8.436 -#	movl %ecx, %edx  
   8.437 -	movl %ecx, %ebx  
   8.438 -	movl %esi, %edx
   8.439 -	shrl $6, %ecx     
   8.440 -	andl $0x3c, %ebx  
   8.441 -	negl %ebx
   8.442 -	subl %ebx, %esi  
   8.443 -	subl %ebx, %edi  
   8.444 -	lea  -1(%esi),%edx
   8.445 -	andl $-32,%edx
   8.446 -	lea 3f(%ebx,%ebx), %ebx
   8.447 -	testl %esi, %esi 
   8.448 -	jmp *%ebx
   8.449 -1:	addl $64,%esi
   8.450 -	addl $64,%edi 
   8.451 -	SRC(movb -32(%edx),%bl)	; SRC(movb (%edx),%bl)
   8.452 -	ROUND1(-64) ROUND(-60) ROUND(-56) ROUND(-52)	
   8.453 -	ROUND (-48) ROUND(-44) ROUND(-40) ROUND(-36)	
   8.454 -	ROUND (-32) ROUND(-28) ROUND(-24) ROUND(-20)	
   8.455 -	ROUND (-16) ROUND(-12) ROUND(-8)  ROUND(-4)	
   8.456 -3:	adcl $0,%eax
   8.457 -	addl $64, %edx
   8.458 -	dec %ecx
   8.459 -	jge 1b
   8.460 -4:	movl ARGBASE+12(%esp),%edx	#len
   8.461 -	andl $3, %edx
   8.462 -	jz 7f
   8.463 -	cmpl $2, %edx
   8.464 -	jb 5f
   8.465 -SRC(	movw (%esi), %dx         )
   8.466 -	leal 2(%esi), %esi
   8.467 -DST(	movw %dx, (%edi)         )
   8.468 -	leal 2(%edi), %edi
   8.469 -	je 6f
   8.470 -	shll $16,%edx
   8.471 -5:
   8.472 -SRC(	movb (%esi), %dl         )
   8.473 -DST(	movb %dl, (%edi)         )
   8.474 -6:	addl %edx, %eax
   8.475 -	adcl $0, %eax
   8.476 -7:
   8.477 -.section .fixup, "ax"
   8.478 -6001:	movl	ARGBASE+20(%esp), %ebx	# src_err_ptr	
   8.479 -	movl $-EFAULT, (%ebx)
   8.480 -	# zero the complete destination (computing the rest is too much work)
   8.481 -	movl ARGBASE+8(%esp),%edi	# dst
   8.482 -	movl ARGBASE+12(%esp),%ecx	# len
   8.483 -	xorl %eax,%eax
   8.484 -	rep; stosb
   8.485 -	jmp 7b
   8.486 -6002:	movl ARGBASE+24(%esp), %ebx	# dst_err_ptr
   8.487 -	movl $-EFAULT, (%ebx)
   8.488 -	jmp  7b			
   8.489 -.previous				
   8.490 -
   8.491 -	popl %esi
   8.492 -	popl %edi
   8.493 -	popl %ebx
   8.494 -	ret
   8.495 -				
   8.496 -#undef ROUND
   8.497 -#undef ROUND1		
   8.498 -		
   8.499 -#endif
     9.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/dec_and_lock.c	Tue Mar 11 14:37:27 2003 +0000
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,40 +0,0 @@
     9.4 -/*
     9.5 - * x86 version of "atomic_dec_and_lock()" using
     9.6 - * the atomic "cmpxchg" instruction.
     9.7 - *
     9.8 - * (For CPU's lacking cmpxchg, we use the slow
     9.9 - * generic version, and this one never even gets
    9.10 - * compiled).
    9.11 - */
    9.12 -
    9.13 -#include <linux/spinlock.h>
    9.14 -#include <asm/atomic.h>
    9.15 -
    9.16 -int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock)
    9.17 -{
    9.18 -	int counter;
    9.19 -	int newcount;
    9.20 -
    9.21 -repeat:
    9.22 -	counter = atomic_read(atomic);
    9.23 -	newcount = counter-1;
    9.24 -
    9.25 -	if (!newcount)
    9.26 -		goto slow_path;
    9.27 -
    9.28 -	asm volatile("lock; cmpxchgl %1,%2"
    9.29 -		:"=a" (newcount)
    9.30 -		:"r" (newcount), "m" (atomic->counter), "0" (counter));
    9.31 -
    9.32 -	/* If the above failed, "eax" will have changed */
    9.33 -	if (newcount != counter)
    9.34 -		goto repeat;
    9.35 -	return 0;
    9.36 -
    9.37 -slow_path:
    9.38 -	spin_lock(lock);
    9.39 -	if (atomic_dec_and_test(atomic))
    9.40 -		return 1;
    9.41 -	spin_unlock(lock);
    9.42 -	return 0;
    9.43 -}
    10.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/getuser.S	Tue Mar 11 14:37:27 2003 +0000
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,73 +0,0 @@
    10.4 -/*
    10.5 - * __get_user functions.
    10.6 - *
    10.7 - * (C) Copyright 1998 Linus Torvalds
    10.8 - *
    10.9 - * These functions have a non-standard call interface
   10.10 - * to make them more efficient, especially as they
   10.11 - * return an error value in addition to the "real"
   10.12 - * return value.
   10.13 - */
   10.14 -
   10.15 -/*
   10.16 - * __get_user_X
   10.17 - *
   10.18 - * Inputs:	%eax contains the address
   10.19 - *
   10.20 - * Outputs:	%eax is error code (0 or -EFAULT)
   10.21 - *		%edx contains zero-extended value
   10.22 - *
   10.23 - * These functions should not modify any other registers,
   10.24 - * as they get called from within inline assembly.
   10.25 - */
   10.26 -
   10.27 -addr_limit = 12
   10.28 -
   10.29 -.text
   10.30 -.align 4
   10.31 -.globl __get_user_1
   10.32 -__get_user_1:
   10.33 -	movl %esp,%edx
   10.34 -	andl $0xffffe000,%edx
   10.35 -	cmpl addr_limit(%edx),%eax
   10.36 -	jae bad_get_user
   10.37 -1:	movzbl (%eax),%edx
   10.38 -	xorl %eax,%eax
   10.39 -	ret
   10.40 -
   10.41 -.align 4
   10.42 -.globl __get_user_2
   10.43 -__get_user_2:
   10.44 -	addl $1,%eax
   10.45 -	movl %esp,%edx
   10.46 -	jc bad_get_user
   10.47 -	andl $0xffffe000,%edx
   10.48 -	cmpl addr_limit(%edx),%eax
   10.49 -	jae bad_get_user
   10.50 -2:	movzwl -1(%eax),%edx
   10.51 -	xorl %eax,%eax
   10.52 -	ret
   10.53 -
   10.54 -.align 4
   10.55 -.globl __get_user_4
   10.56 -__get_user_4:
   10.57 -	addl $3,%eax
   10.58 -	movl %esp,%edx
   10.59 -	jc bad_get_user
   10.60 -	andl $0xffffe000,%edx
   10.61 -	cmpl addr_limit(%edx),%eax
   10.62 -	jae bad_get_user
   10.63 -3:	movl -3(%eax),%edx
   10.64 -	xorl %eax,%eax
   10.65 -	ret
   10.66 -
   10.67 -bad_get_user:
   10.68 -	xorl %edx,%edx
   10.69 -	movl $-14,%eax
   10.70 -	ret
   10.71 -
   10.72 -.section __ex_table,"a"
   10.73 -	.long 1b,bad_get_user
   10.74 -	.long 2b,bad_get_user
   10.75 -	.long 3b,bad_get_user
   10.76 -.previous
    11.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/iodebug.c	Tue Mar 11 14:37:27 2003 +0000
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,19 +0,0 @@
    11.4 -#include <asm/io.h>
    11.5 -
    11.6 -void * __io_virt_debug(unsigned long x, const char *file, int line)
    11.7 -{
    11.8 -	if (x < PAGE_OFFSET) {
    11.9 -		printk("io mapaddr 0x%05lx not valid at %s:%d!\n", x, file, line);
   11.10 -		return __va(x);
   11.11 -	}
   11.12 -	return (void *)x;
   11.13 -}
   11.14 -
   11.15 -unsigned long __io_phys_debug(unsigned long x, const char *file, int line)
   11.16 -{
   11.17 -	if (x < PAGE_OFFSET) {
   11.18 -		printk("io mapaddr 0x%05lx not valid at %s:%d!\n", x, file, line);
   11.19 -		return x;
   11.20 -	}
   11.21 -	return __pa(x);
   11.22 -}
    12.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/memcpy.c	Tue Mar 11 14:37:27 2003 +0000
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,19 +0,0 @@
    12.4 -#include <linux/config.h>
    12.5 -#include <linux/string.h>
    12.6 -
    12.7 -#undef memcpy
    12.8 -#undef memset
    12.9 -
   12.10 -void * memcpy(void * to, const void * from, size_t n)
   12.11 -{
   12.12 -#ifdef CONFIG_X86_USE_3DNOW
   12.13 -	return __memcpy3d(to, from, n);
   12.14 -#else
   12.15 -	return __memcpy(to, from, n);
   12.16 -#endif
   12.17 -}
   12.18 -
   12.19 -void * memset(void * s, int c, size_t count)
   12.20 -{
   12.21 -	return __memset(s, c, count);
   12.22 -}
    13.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/mmx.c	Tue Mar 11 14:37:27 2003 +0000
    13.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.3 @@ -1,399 +0,0 @@
    13.4 -#include <linux/config.h>
    13.5 -#include <linux/types.h>
    13.6 -#include <linux/string.h>
    13.7 -#include <linux/sched.h>
    13.8 -
    13.9 -#include <asm/i387.h>
   13.10 -#include <asm/hardirq.h> 
   13.11 -
   13.12 -
   13.13 -/*
   13.14 - *	MMX 3DNow! library helper functions
   13.15 - *
   13.16 - *	To do:
   13.17 - *	We can use MMX just for prefetch in IRQ's. This may be a win. 
   13.18 - *		(reported so on K6-III)
   13.19 - *	We should use a better code neutral filler for the short jump
   13.20 - *		leal ebx. [ebx] is apparently best for K6-2, but Cyrix ??
   13.21 - *	We also want to clobber the filler register so we dont get any
   13.22 - *		register forwarding stalls on the filler. 
   13.23 - *
   13.24 - *	Add *user handling. Checksums are not a win with MMX on any CPU
   13.25 - *	tested so far for any MMX solution figured.
   13.26 - *
   13.27 - *	22/09/2000 - Arjan van de Ven 
   13.28 - *		Improved for non-egineering-sample Athlons 
   13.29 - *
   13.30 - */
   13.31 - 
   13.32 -void *_mmx_memcpy(void *to, const void *from, size_t len)
   13.33 -{
   13.34 -	void *p;
   13.35 -	int i;
   13.36 -
   13.37 -	if (in_interrupt())
   13.38 -		return __memcpy(to, from, len);
   13.39 -
   13.40 -	p = to;
   13.41 -	i = len >> 6; /* len/64 */
   13.42 -
   13.43 -	kernel_fpu_begin();
   13.44 -
   13.45 -	__asm__ __volatile__ (
   13.46 -		"1: prefetch (%0)\n"		/* This set is 28 bytes */
   13.47 -		"   prefetch 64(%0)\n"
   13.48 -		"   prefetch 128(%0)\n"
   13.49 -		"   prefetch 192(%0)\n"
   13.50 -		"   prefetch 256(%0)\n"
   13.51 -		"2:  \n"
   13.52 -		".section .fixup, \"ax\"\n"
   13.53 -		"3: movw $0x1AEB, 1b\n"	/* jmp on 26 bytes */
   13.54 -		"   jmp 2b\n"
   13.55 -		".previous\n"
   13.56 -		".section __ex_table,\"a\"\n"
   13.57 -		"	.align 4\n"
   13.58 -		"	.long 1b, 3b\n"
   13.59 -		".previous"
   13.60 -		: : "r" (from) );
   13.61 -		
   13.62 -	
   13.63 -	for(; i>5; i--)
   13.64 -	{
   13.65 -		__asm__ __volatile__ (
   13.66 -		"1:  prefetch 320(%0)\n"
   13.67 -		"2:  movq (%0), %%mm0\n"
   13.68 -		"  movq 8(%0), %%mm1\n"
   13.69 -		"  movq 16(%0), %%mm2\n"
   13.70 -		"  movq 24(%0), %%mm3\n"
   13.71 -		"  movq %%mm0, (%1)\n"
   13.72 -		"  movq %%mm1, 8(%1)\n"
   13.73 -		"  movq %%mm2, 16(%1)\n"
   13.74 -		"  movq %%mm3, 24(%1)\n"
   13.75 -		"  movq 32(%0), %%mm0\n"
   13.76 -		"  movq 40(%0), %%mm1\n"
   13.77 -		"  movq 48(%0), %%mm2\n"
   13.78 -		"  movq 56(%0), %%mm3\n"
   13.79 -		"  movq %%mm0, 32(%1)\n"
   13.80 -		"  movq %%mm1, 40(%1)\n"
   13.81 -		"  movq %%mm2, 48(%1)\n"
   13.82 -		"  movq %%mm3, 56(%1)\n"
   13.83 -		".section .fixup, \"ax\"\n"
   13.84 -		"3: movw $0x05EB, 1b\n"	/* jmp on 5 bytes */
   13.85 -		"   jmp 2b\n"
   13.86 -		".previous\n"
   13.87 -		".section __ex_table,\"a\"\n"
   13.88 -		"	.align 4\n"
   13.89 -		"	.long 1b, 3b\n"
   13.90 -		".previous"
   13.91 -		: : "r" (from), "r" (to) : "memory");
   13.92 -		from+=64;
   13.93 -		to+=64;
   13.94 -	}
   13.95 -
   13.96 -	for(; i>0; i--)
   13.97 -	{
   13.98 -		__asm__ __volatile__ (
   13.99 -		"  movq (%0), %%mm0\n"
  13.100 -		"  movq 8(%0), %%mm1\n"
  13.101 -		"  movq 16(%0), %%mm2\n"
  13.102 -		"  movq 24(%0), %%mm3\n"
  13.103 -		"  movq %%mm0, (%1)\n"
  13.104 -		"  movq %%mm1, 8(%1)\n"
  13.105 -		"  movq %%mm2, 16(%1)\n"
  13.106 -		"  movq %%mm3, 24(%1)\n"
  13.107 -		"  movq 32(%0), %%mm0\n"
  13.108 -		"  movq 40(%0), %%mm1\n"
  13.109 -		"  movq 48(%0), %%mm2\n"
  13.110 -		"  movq 56(%0), %%mm3\n"
  13.111 -		"  movq %%mm0, 32(%1)\n"
  13.112 -		"  movq %%mm1, 40(%1)\n"
  13.113 -		"  movq %%mm2, 48(%1)\n"
  13.114 -		"  movq %%mm3, 56(%1)\n"
  13.115 -		: : "r" (from), "r" (to) : "memory");
  13.116 -		from+=64;
  13.117 -		to+=64;
  13.118 -	}
  13.119 -	/*
  13.120 -	 *	Now do the tail of the block
  13.121 -	 */
  13.122 -	__memcpy(to, from, len&63);
  13.123 -	kernel_fpu_end();
  13.124 -	return p;
  13.125 -}
  13.126 -
  13.127 -#ifdef CONFIG_MK7
  13.128 -
  13.129 -/*
  13.130 - *	The K7 has streaming cache bypass load/store. The Cyrix III, K6 and
  13.131 - *	other MMX using processors do not.
  13.132 - */
  13.133 -
  13.134 -static void fast_clear_page(void *page)
  13.135 -{
  13.136 -	int i;
  13.137 -
  13.138 -	kernel_fpu_begin();
  13.139 -	
  13.140 -	__asm__ __volatile__ (
  13.141 -		"  pxor %%mm0, %%mm0\n" : :
  13.142 -	);
  13.143 -
  13.144 -	for(i=0;i<4096/64;i++)
  13.145 -	{
  13.146 -		__asm__ __volatile__ (
  13.147 -		"  movntq %%mm0, (%0)\n"
  13.148 -		"  movntq %%mm0, 8(%0)\n"
  13.149 -		"  movntq %%mm0, 16(%0)\n"
  13.150 -		"  movntq %%mm0, 24(%0)\n"
  13.151 -		"  movntq %%mm0, 32(%0)\n"
  13.152 -		"  movntq %%mm0, 40(%0)\n"
  13.153 -		"  movntq %%mm0, 48(%0)\n"
  13.154 -		"  movntq %%mm0, 56(%0)\n"
  13.155 -		: : "r" (page) : "memory");
  13.156 -		page+=64;
  13.157 -	}
  13.158 -	/* since movntq is weakly-ordered, a "sfence" is needed to become
  13.159 -	 * ordered again.
  13.160 -	 */
  13.161 -	__asm__ __volatile__ (
  13.162 -		"  sfence \n" : :
  13.163 -	);
  13.164 -	kernel_fpu_end();
  13.165 -}
  13.166 -
  13.167 -static void fast_copy_page(void *to, void *from)
  13.168 -{
  13.169 -	int i;
  13.170 -
  13.171 -	kernel_fpu_begin();
  13.172 -
  13.173 -	/* maybe the prefetch stuff can go before the expensive fnsave...
  13.174 -	 * but that is for later. -AV
  13.175 -	 */
  13.176 -	__asm__ __volatile__ (
  13.177 -		"1: prefetch (%0)\n"
  13.178 -		"   prefetch 64(%0)\n"
  13.179 -		"   prefetch 128(%0)\n"
  13.180 -		"   prefetch 192(%0)\n"
  13.181 -		"   prefetch 256(%0)\n"
  13.182 -		"2:  \n"
  13.183 -		".section .fixup, \"ax\"\n"
  13.184 -		"3: movw $0x1AEB, 1b\n"	/* jmp on 26 bytes */
  13.185 -		"   jmp 2b\n"
  13.186 -		".previous\n"
  13.187 -		".section __ex_table,\"a\"\n"
  13.188 -		"	.align 4\n"
  13.189 -		"	.long 1b, 3b\n"
  13.190 -		".previous"
  13.191 -		: : "r" (from) );
  13.192 -
  13.193 -	for(i=0; i<(4096-320)/64; i++)
  13.194 -	{
  13.195 -		__asm__ __volatile__ (
  13.196 -		"1: prefetch 320(%0)\n"
  13.197 -		"2: movq (%0), %%mm0\n"
  13.198 -		"   movntq %%mm0, (%1)\n"
  13.199 -		"   movq 8(%0), %%mm1\n"
  13.200 -		"   movntq %%mm1, 8(%1)\n"
  13.201 -		"   movq 16(%0), %%mm2\n"
  13.202 -		"   movntq %%mm2, 16(%1)\n"
  13.203 -		"   movq 24(%0), %%mm3\n"
  13.204 -		"   movntq %%mm3, 24(%1)\n"
  13.205 -		"   movq 32(%0), %%mm4\n"
  13.206 -		"   movntq %%mm4, 32(%1)\n"
  13.207 -		"   movq 40(%0), %%mm5\n"
  13.208 -		"   movntq %%mm5, 40(%1)\n"
  13.209 -		"   movq 48(%0), %%mm6\n"
  13.210 -		"   movntq %%mm6, 48(%1)\n"
  13.211 -		"   movq 56(%0), %%mm7\n"
  13.212 -		"   movntq %%mm7, 56(%1)\n"
  13.213 -		".section .fixup, \"ax\"\n"
  13.214 -		"3: movw $0x05EB, 1b\n"	/* jmp on 5 bytes */
  13.215 -		"   jmp 2b\n"
  13.216 -		".previous\n"
  13.217 -		".section __ex_table,\"a\"\n"
  13.218 -		"	.align 4\n"
  13.219 -		"	.long 1b, 3b\n"
  13.220 -		".previous"
  13.221 -		: : "r" (from), "r" (to) : "memory");
  13.222 -		from+=64;
  13.223 -		to+=64;
  13.224 -	}
  13.225 -	for(i=(4096-320)/64; i<4096/64; i++)
  13.226 -	{
  13.227 -		__asm__ __volatile__ (
  13.228 -		"2: movq (%0), %%mm0\n"
  13.229 -		"   movntq %%mm0, (%1)\n"
  13.230 -		"   movq 8(%0), %%mm1\n"
  13.231 -		"   movntq %%mm1, 8(%1)\n"
  13.232 -		"   movq 16(%0), %%mm2\n"
  13.233 -		"   movntq %%mm2, 16(%1)\n"
  13.234 -		"   movq 24(%0), %%mm3\n"
  13.235 -		"   movntq %%mm3, 24(%1)\n"
  13.236 -		"   movq 32(%0), %%mm4\n"
  13.237 -		"   movntq %%mm4, 32(%1)\n"
  13.238 -		"   movq 40(%0), %%mm5\n"
  13.239 -		"   movntq %%mm5, 40(%1)\n"
  13.240 -		"   movq 48(%0), %%mm6\n"
  13.241 -		"   movntq %%mm6, 48(%1)\n"
  13.242 -		"   movq 56(%0), %%mm7\n"
  13.243 -		"   movntq %%mm7, 56(%1)\n"
  13.244 -		: : "r" (from), "r" (to) : "memory");
  13.245 -		from+=64;
  13.246 -		to+=64;
  13.247 -	}
  13.248 -	/* since movntq is weakly-ordered, a "sfence" is needed to become
  13.249 -	 * ordered again.
  13.250 -	 */
  13.251 -	__asm__ __volatile__ (
  13.252 -		"  sfence \n" : :
  13.253 -	);
  13.254 -	kernel_fpu_end();
  13.255 -}
  13.256 -
  13.257 -#else
  13.258 -
  13.259 -/*
  13.260 - *	Generic MMX implementation without K7 specific streaming
  13.261 - */
  13.262 - 
  13.263 -static void fast_clear_page(void *page)
  13.264 -{
  13.265 -	int i;
  13.266 -	
  13.267 -	kernel_fpu_begin();
  13.268 -	
  13.269 -	__asm__ __volatile__ (
  13.270 -		"  pxor %%mm0, %%mm0\n" : :
  13.271 -	);
  13.272 -
  13.273 -	for(i=0;i<4096/128;i++)
  13.274 -	{
  13.275 -		__asm__ __volatile__ (
  13.276 -		"  movq %%mm0, (%0)\n"
  13.277 -		"  movq %%mm0, 8(%0)\n"
  13.278 -		"  movq %%mm0, 16(%0)\n"
  13.279 -		"  movq %%mm0, 24(%0)\n"
  13.280 -		"  movq %%mm0, 32(%0)\n"
  13.281 -		"  movq %%mm0, 40(%0)\n"
  13.282 -		"  movq %%mm0, 48(%0)\n"
  13.283 -		"  movq %%mm0, 56(%0)\n"
  13.284 -		"  movq %%mm0, 64(%0)\n"
  13.285 -		"  movq %%mm0, 72(%0)\n"
  13.286 -		"  movq %%mm0, 80(%0)\n"
  13.287 -		"  movq %%mm0, 88(%0)\n"
  13.288 -		"  movq %%mm0, 96(%0)\n"
  13.289 -		"  movq %%mm0, 104(%0)\n"
  13.290 -		"  movq %%mm0, 112(%0)\n"
  13.291 -		"  movq %%mm0, 120(%0)\n"
  13.292 -		: : "r" (page) : "memory");
  13.293 -		page+=128;
  13.294 -	}
  13.295 -
  13.296 -	kernel_fpu_end();
  13.297 -}
  13.298 -
  13.299 -static void fast_copy_page(void *to, void *from)
  13.300 -{
  13.301 -	int i;
  13.302 -	
  13.303 -	
  13.304 -	kernel_fpu_begin();
  13.305 -
  13.306 -	__asm__ __volatile__ (
  13.307 -		"1: prefetch (%0)\n"
  13.308 -		"   prefetch 64(%0)\n"
  13.309 -		"   prefetch 128(%0)\n"
  13.310 -		"   prefetch 192(%0)\n"
  13.311 -		"   prefetch 256(%0)\n"
  13.312 -		"2:  \n"
  13.313 -		".section .fixup, \"ax\"\n"
  13.314 -		"3: movw $0x1AEB, 1b\n"	/* jmp on 26 bytes */
  13.315 -		"   jmp 2b\n"
  13.316 -		".previous\n"
  13.317 -		".section __ex_table,\"a\"\n"
  13.318 -		"	.align 4\n"
  13.319 -		"	.long 1b, 3b\n"
  13.320 -		".previous"
  13.321 -		: : "r" (from) );
  13.322 -
  13.323 -	for(i=0; i<4096/64; i++)
  13.324 -	{
  13.325 -		__asm__ __volatile__ (
  13.326 -		"1: prefetch 320(%0)\n"
  13.327 -		"2: movq (%0), %%mm0\n"
  13.328 -		"   movq 8(%0), %%mm1\n"
  13.329 -		"   movq 16(%0), %%mm2\n"
  13.330 -		"   movq 24(%0), %%mm3\n"
  13.331 -		"   movq %%mm0, (%1)\n"
  13.332 -		"   movq %%mm1, 8(%1)\n"
  13.333 -		"   movq %%mm2, 16(%1)\n"
  13.334 -		"   movq %%mm3, 24(%1)\n"
  13.335 -		"   movq 32(%0), %%mm0\n"
  13.336 -		"   movq 40(%0), %%mm1\n"
  13.337 -		"   movq 48(%0), %%mm2\n"
  13.338 -		"   movq 56(%0), %%mm3\n"
  13.339 -		"   movq %%mm0, 32(%1)\n"
  13.340 -		"   movq %%mm1, 40(%1)\n"
  13.341 -		"   movq %%mm2, 48(%1)\n"
  13.342 -		"   movq %%mm3, 56(%1)\n"
  13.343 -		".section .fixup, \"ax\"\n"
  13.344 -		"3: movw $0x05EB, 1b\n"	/* jmp on 5 bytes */
  13.345 -		"   jmp 2b\n"
  13.346 -		".previous\n"
  13.347 -		".section __ex_table,\"a\"\n"
  13.348 -		"	.align 4\n"
  13.349 -		"	.long 1b, 3b\n"
  13.350 -		".previous"
  13.351 -		: : "r" (from), "r" (to) : "memory");
  13.352 -		from+=64;
  13.353 -		to+=64;
  13.354 -	}
  13.355 -	kernel_fpu_end();
  13.356 -}
  13.357 -
  13.358 -
  13.359 -#endif
  13.360 -
  13.361 -/*
  13.362 - *	Favour MMX for page clear and copy. 
  13.363 - */
  13.364 -
  13.365 -static void slow_zero_page(void * page)
  13.366 -{
  13.367 -	int d0, d1;
  13.368 -	__asm__ __volatile__( \
  13.369 -		"cld\n\t" \
  13.370 -		"rep ; stosl" \
  13.371 -		: "=&c" (d0), "=&D" (d1)
  13.372 -		:"a" (0),"1" (page),"0" (1024)
  13.373 -		:"memory");
  13.374 -}
  13.375 - 
  13.376 -void mmx_clear_page(void * page)
  13.377 -{
  13.378 -	if(in_interrupt())
  13.379 -		slow_zero_page(page);
  13.380 -	else
  13.381 -		fast_clear_page(page);
  13.382 -}
  13.383 -
  13.384 -static void slow_copy_page(void *to, void *from)
  13.385 -{
  13.386 -	int d0, d1, d2;
  13.387 -	__asm__ __volatile__( \
  13.388 -		"cld\n\t" \
  13.389 -		"rep ; movsl" \
  13.390 -		: "=&c" (d0), "=&D" (d1), "=&S" (d2) \
  13.391 -		: "0" (1024),"1" ((long) to),"2" ((long) from) \
  13.392 -		: "memory");
  13.393 -}
  13.394 -  
  13.395 -
  13.396 -void mmx_copy_page(void *to, void *from)
  13.397 -{
  13.398 -	if(in_interrupt())
  13.399 -		slow_copy_page(to, from);
  13.400 -	else
  13.401 -		fast_copy_page(to, from);
  13.402 -}
    14.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/old-checksum.c	Tue Mar 11 14:37:27 2003 +0000
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,19 +0,0 @@
    14.4 -/*
    14.5 - * FIXME: old compatibility stuff, will be removed soon.
    14.6 - */
    14.7 -
    14.8 -#include <net/checksum.h>
    14.9 -
   14.10 -unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum)
   14.11 -{
   14.12 -	int src_err=0, dst_err=0;
   14.13 -
   14.14 -	sum = csum_partial_copy_generic ( src, dst, len, sum, &src_err, &dst_err);
   14.15 -
   14.16 -	if (src_err || dst_err)
   14.17 -		printk("old csum_partial_copy_fromuser(), tell mingo to convert me.\n");
   14.18 -
   14.19 -	return sum;
   14.20 -}
   14.21 -
   14.22 -
    15.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/strstr.c	Tue Mar 11 14:37:27 2003 +0000
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,31 +0,0 @@
    15.4 -#include <linux/string.h>
    15.5 -
    15.6 -char * strstr(const char * cs,const char * ct)
    15.7 -{
    15.8 -int	d0, d1;
    15.9 -register char * __res;
   15.10 -__asm__ __volatile__(
   15.11 -	"movl %6,%%edi\n\t"
   15.12 -	"repne\n\t"
   15.13 -	"scasb\n\t"
   15.14 -	"notl %%ecx\n\t"
   15.15 -	"decl %%ecx\n\t"	/* NOTE! This also sets Z if searchstring='' */
   15.16 -	"movl %%ecx,%%edx\n"
   15.17 -	"1:\tmovl %6,%%edi\n\t"
   15.18 -	"movl %%esi,%%eax\n\t"
   15.19 -	"movl %%edx,%%ecx\n\t"
   15.20 -	"repe\n\t"
   15.21 -	"cmpsb\n\t"
   15.22 -	"je 2f\n\t"		/* also works for empty string, see above */
   15.23 -	"xchgl %%eax,%%esi\n\t"
   15.24 -	"incl %%esi\n\t"
   15.25 -	"cmpb $0,-1(%%eax)\n\t"
   15.26 -	"jne 1b\n\t"
   15.27 -	"xorl %%eax,%%eax\n\t"
   15.28 -	"2:"
   15.29 -	:"=a" (__res), "=&c" (d0), "=&S" (d1)
   15.30 -	:"0" (0), "1" (0xffffffff), "2" (cs), "g" (ct)
   15.31 -	:"dx", "di");
   15.32 -return __res;
   15.33 -}
   15.34 -
    16.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/usercopy.c	Tue Mar 11 14:37:27 2003 +0000
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,190 +0,0 @@
    16.4 -/* 
    16.5 - * User address space access functions.
    16.6 - * The non inlined parts of asm-i386/uaccess.h are here.
    16.7 - *
    16.8 - * Copyright 1997 Andi Kleen <ak@muc.de>
    16.9 - * Copyright 1997 Linus Torvalds
   16.10 - */
   16.11 -#include <linux/config.h>
   16.12 -#include <asm/uaccess.h>
   16.13 -#include <asm/mmx.h>
   16.14 -
   16.15 -#ifdef CONFIG_X86_USE_3DNOW_AND_WORKS
   16.16 -
   16.17 -unsigned long
   16.18 -__generic_copy_to_user(void *to, const void *from, unsigned long n)
   16.19 -{
   16.20 -	if (access_ok(VERIFY_WRITE, to, n))
   16.21 -	{
   16.22 -		if(n<512)
   16.23 -			__copy_user(to,from,n);
   16.24 -		else
   16.25 -			mmx_copy_user(to,from,n);
   16.26 -	}
   16.27 -	return n;
   16.28 -}
   16.29 -
   16.30 -unsigned long
   16.31 -__generic_copy_from_user(void *to, const void *from, unsigned long n)
   16.32 -{
   16.33 -	if (access_ok(VERIFY_READ, from, n))
   16.34 -	{
   16.35 -		if(n<512)
   16.36 -			__copy_user_zeroing(to,from,n);
   16.37 -		else
   16.38 -			mmx_copy_user_zeroing(to, from, n);
   16.39 -	}
   16.40 -	else
   16.41 -		memset(to, 0, n);
   16.42 -	return n;
   16.43 -}
   16.44 -
   16.45 -#else
   16.46 -
   16.47 -unsigned long
   16.48 -__generic_copy_to_user(void *to, const void *from, unsigned long n)
   16.49 -{
   16.50 -	prefetch(from);
   16.51 -	if (access_ok(VERIFY_WRITE, to, n))
   16.52 -		__copy_user(to,from,n);
   16.53 -	return n;
   16.54 -}
   16.55 -
   16.56 -unsigned long
   16.57 -__generic_copy_from_user(void *to, const void *from, unsigned long n)
   16.58 -{
   16.59 -	prefetchw(to);
   16.60 -	if (access_ok(VERIFY_READ, from, n))
   16.61 -		__copy_user_zeroing(to,from,n);
   16.62 -	else
   16.63 -		memset(to, 0, n);
   16.64 -	return n;
   16.65 -}
   16.66 -
   16.67 -#endif
   16.68 -
   16.69 -/*
   16.70 - * Copy a null terminated string from userspace.
   16.71 - */
   16.72 -
   16.73 -#define __do_strncpy_from_user(dst,src,count,res)			   \
   16.74 -do {									   \
   16.75 -	int __d0, __d1, __d2;						   \
   16.76 -	__asm__ __volatile__(						   \
   16.77 -		"	testl %1,%1\n"					   \
   16.78 -		"	jz 2f\n"					   \
   16.79 -		"0:	lodsb\n"					   \
   16.80 -		"	stosb\n"					   \
   16.81 -		"	testb %%al,%%al\n"				   \
   16.82 -		"	jz 1f\n"					   \
   16.83 -		"	decl %1\n"					   \
   16.84 -		"	jnz 0b\n"					   \
   16.85 -		"1:	subl %1,%0\n"					   \
   16.86 -		"2:\n"							   \
   16.87 -		".section .fixup,\"ax\"\n"				   \
   16.88 -		"3:	movl %5,%0\n"					   \
   16.89 -		"	jmp 2b\n"					   \
   16.90 -		".previous\n"						   \
   16.91 -		".section __ex_table,\"a\"\n"				   \
   16.92 -		"	.align 4\n"					   \
   16.93 -		"	.long 0b,3b\n"					   \
   16.94 -		".previous"						   \
   16.95 -		: "=d"(res), "=c"(count), "=&a" (__d0), "=&S" (__d1),	   \
   16.96 -		  "=&D" (__d2)						   \
   16.97 -		: "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \
   16.98 -		: "memory");						   \
   16.99 -} while (0)
  16.100 -
  16.101 -long
  16.102 -__strncpy_from_user(char *dst, const char *src, long count)
  16.103 -{
  16.104 -	long res;
  16.105 -	__do_strncpy_from_user(dst, src, count, res);
  16.106 -	return res;
  16.107 -}
  16.108 -
  16.109 -long
  16.110 -strncpy_from_user(char *dst, const char *src, long count)
  16.111 -{
  16.112 -	long res = -EFAULT;
  16.113 -	if (access_ok(VERIFY_READ, src, 1))
  16.114 -		__do_strncpy_from_user(dst, src, count, res);
  16.115 -	return res;
  16.116 -}
  16.117 -
  16.118 -
  16.119 -/*
  16.120 - * Zero Userspace
  16.121 - */
  16.122 -
  16.123 -#define __do_clear_user(addr,size)					\
  16.124 -do {									\
  16.125 -	int __d0;							\
  16.126 -  	__asm__ __volatile__(						\
  16.127 -		"0:	rep; stosl\n"					\
  16.128 -		"	movl %2,%0\n"					\
  16.129 -		"1:	rep; stosb\n"					\
  16.130 -		"2:\n"							\
  16.131 -		".section .fixup,\"ax\"\n"				\
  16.132 -		"3:	lea 0(%2,%0,4),%0\n"				\
  16.133 -		"	jmp 2b\n"					\
  16.134 -		".previous\n"						\
  16.135 -		".section __ex_table,\"a\"\n"				\
  16.136 -		"	.align 4\n"					\
  16.137 -		"	.long 0b,3b\n"					\
  16.138 -		"	.long 1b,2b\n"					\
  16.139 -		".previous"						\
  16.140 -		: "=&c"(size), "=&D" (__d0)				\
  16.141 -		: "r"(size & 3), "0"(size / 4), "1"(addr), "a"(0));	\
  16.142 -} while (0)
  16.143 -
  16.144 -unsigned long
  16.145 -clear_user(void *to, unsigned long n)
  16.146 -{
  16.147 -	if (access_ok(VERIFY_WRITE, to, n))
  16.148 -		__do_clear_user(to, n);
  16.149 -	return n;
  16.150 -}
  16.151 -
  16.152 -unsigned long
  16.153 -__clear_user(void *to, unsigned long n)
  16.154 -{
  16.155 -	__do_clear_user(to, n);
  16.156 -	return n;
  16.157 -}
  16.158 -
  16.159 -/*
  16.160 - * Return the size of a string (including the ending 0)
  16.161 - *
  16.162 - * Return 0 on exception, a value greater than N if too long
  16.163 - */
  16.164 -
  16.165 -long strnlen_user(const char *s, long n)
  16.166 -{
  16.167 -	unsigned long mask = -__addr_ok(s);
  16.168 -	unsigned long res, tmp;
  16.169 -
  16.170 -	__asm__ __volatile__(
  16.171 -		"	testl %0, %0\n"
  16.172 -		"	jz 3f\n"
  16.173 -		"	andl %0,%%ecx\n"
  16.174 -		"0:	repne; scasb\n"
  16.175 -		"	setne %%al\n"
  16.176 -		"	subl %%ecx,%0\n"
  16.177 -		"	addl %0,%%eax\n"
  16.178 -		"1:\n"
  16.179 -		".section .fixup,\"ax\"\n"
  16.180 -		"2:	xorl %%eax,%%eax\n"
  16.181 -		"	jmp 1b\n"
  16.182 -		"3:	movb $1,%%al\n"
  16.183 -		"	jmp 1b\n"
  16.184 -		".previous\n"
  16.185 -		".section __ex_table,\"a\"\n"
  16.186 -		"	.align 4\n"
  16.187 -		"	.long 0b,2b\n"
  16.188 -		".previous"
  16.189 -		:"=r" (n), "=D" (s), "=a" (res), "=c" (tmp)
  16.190 -		:"0" (n), "1" (s), "2" (0), "3" (mask)
  16.191 -		:"cc");
  16.192 -	return res & mask;
  16.193 -}
    17.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/extable.c	Tue Mar 11 14:37:27 2003 +0000
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,62 +0,0 @@
    17.4 -/*
    17.5 - * linux/arch/i386/mm/extable.c
    17.6 - */
    17.7 -
    17.8 -#include <linux/config.h>
    17.9 -#include <linux/module.h>
   17.10 -#include <linux/spinlock.h>
   17.11 -#include <asm/uaccess.h>
   17.12 -
   17.13 -extern const struct exception_table_entry __start___ex_table[];
   17.14 -extern const struct exception_table_entry __stop___ex_table[];
   17.15 -
   17.16 -static inline unsigned long
   17.17 -search_one_table(const struct exception_table_entry *first,
   17.18 -		 const struct exception_table_entry *last,
   17.19 -		 unsigned long value)
   17.20 -{
   17.21 -        while (first <= last) {
   17.22 -		const struct exception_table_entry *mid;
   17.23 -		long diff;
   17.24 -
   17.25 -		mid = (last - first) / 2 + first;
   17.26 -		diff = mid->insn - value;
   17.27 -                if (diff == 0)
   17.28 -                        return mid->fixup;
   17.29 -                else if (diff < 0)
   17.30 -                        first = mid+1;
   17.31 -                else
   17.32 -                        last = mid-1;
   17.33 -        }
   17.34 -        return 0;
   17.35 -}
   17.36 -
   17.37 -extern spinlock_t modlist_lock;
   17.38 -
   17.39 -unsigned long
   17.40 -search_exception_table(unsigned long addr)
   17.41 -{
   17.42 -	unsigned long ret = 0;
   17.43 -	
   17.44 -#ifndef CONFIG_MODULES
   17.45 -	/* There is only the kernel to search.  */
   17.46 -	ret = search_one_table(__start___ex_table, __stop___ex_table-1, addr);
   17.47 -	return ret;
   17.48 -#else
   17.49 -	unsigned long flags;
   17.50 -	/* The kernel is the last "module" -- no need to treat it special.  */
   17.51 -	struct module *mp;
   17.52 -
   17.53 -	spin_lock_irqsave(&modlist_lock, flags);
   17.54 -	for (mp = module_list; mp != NULL; mp = mp->next) {
   17.55 -		if (mp->ex_table_start == NULL || !(mp->flags&(MOD_RUNNING|MOD_INITIALIZING)))
   17.56 -			continue;
   17.57 -		ret = search_one_table(mp->ex_table_start,
   17.58 -				       mp->ex_table_end - 1, addr);
   17.59 -		if (ret)
   17.60 -			break;
   17.61 -	}
   17.62 -	spin_unlock_irqrestore(&modlist_lock, flags);
   17.63 -	return ret;
   17.64 -#endif
   17.65 -}
    18.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/pageattr.c	Tue Mar 11 14:37:27 2003 +0000
    18.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.3 @@ -1,175 +0,0 @@
    18.4 -/* 
    18.5 - * Copyright 2002 Andi Kleen, SuSE Labs. 
    18.6 - * Thanks to Ben LaHaise for precious feedback.
    18.7 - */ 
    18.8 -
    18.9 -#include <linux/config.h>
   18.10 -#include <linux/mm.h>
   18.11 -#include <linux/sched.h>
   18.12 -#include <linux/highmem.h>
   18.13 -#include <linux/module.h>
   18.14 -#include <asm/uaccess.h>
   18.15 -#include <asm/processor.h>
   18.16 -
   18.17 -/* Should move most of this stuff into the appropiate includes */
   18.18 -#define LARGE_PAGE_MASK (~(LARGE_PAGE_SIZE-1))
   18.19 -#define LARGE_PAGE_SIZE (1UL << PMD_SHIFT)
   18.20 -
   18.21 -static inline pte_t *lookup_address(unsigned long address) 
   18.22 -{ 
   18.23 -	pmd_t *pmd;	
   18.24 -	pgd_t *pgd = pgd_offset(&init_mm, address); 
   18.25 -
   18.26 -	if (pgd_none(*pgd))
   18.27 -		return NULL; 
   18.28 -	if (pgd_val(*pgd) & _PAGE_PSE)
   18.29 -		return (pte_t *)pgd; 
   18.30 -	pmd = pmd_offset(pgd, address); 	       
   18.31 -	if (pmd_none(*pmd))
   18.32 -		return NULL; 
   18.33 -	if (pmd_val(*pmd) & _PAGE_PSE) 
   18.34 -		return (pte_t *)pmd; 
   18.35 -    return pte_offset(pmd, address);
   18.36 -} 
   18.37 -
   18.38 -static struct page *split_large_page(unsigned long address, pgprot_t prot)
   18.39 -{ 
   18.40 -	int i; 
   18.41 -	unsigned long addr;
   18.42 -	struct page *base = alloc_pages(GFP_KERNEL, 0);
   18.43 -	pte_t *pbase;
   18.44 -	if (!base) 
   18.45 -		return NULL;
   18.46 -	address = __pa(address);
   18.47 -	addr = address & LARGE_PAGE_MASK; 
   18.48 -	pbase = (pte_t *)page_address(base);
   18.49 -	for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) {
   18.50 -		pbase[i] = mk_pte_phys(addr, 
   18.51 -				      addr == address ? prot : PAGE_KERNEL);
   18.52 -	}
   18.53 -	return base;
   18.54 -} 
   18.55 -
   18.56 -static void flush_kernel_map(void * address) 
   18.57 -{ 
   18.58 -	if (!test_bit(X86_FEATURE_SELFSNOOP, boot_cpu_data.x86_capability)) {
   18.59 -		/* Could use CLFLUSH here if the CPU supports it (Hammer,P4) */
   18.60 -		if (boot_cpu_data.x86_model >= 4) 
   18.61 -			asm volatile("wbinvd":::"memory"); 	
   18.62 -	} 
   18.63 -
   18.64 -	/* Do global flush here to work around large page flushing errata 
   18.65 -	   in some early Athlons */
   18.66 -	__flush_tlb_all(); 	
   18.67 -}
   18.68 -
   18.69 -static void set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte) 
   18.70 -{ 
   18.71 -	set_pte_atomic(kpte, pte); 	/* change init_mm */
   18.72 -#ifndef CONFIG_X86_PAE
   18.73 -	{
   18.74 -		struct list_head *l;
   18.75 -		spin_lock(&mmlist_lock);
   18.76 -		list_for_each(l, &init_mm.mmlist) { 
   18.77 -			struct mm_struct *mm = list_entry(l, struct mm_struct, mmlist);
   18.78 -			pmd_t *pmd = pmd_offset(pgd_offset(mm, address), address);
   18.79 -			set_pte_atomic((pte_t *)pmd, pte);
   18.80 -		} 
   18.81 -		spin_unlock(&mmlist_lock);
   18.82 -	}
   18.83 -#endif
   18.84 -}
   18.85 -
   18.86 -/* no more special protections in this 2/4MB area - revert to a
   18.87 -   large page again. */
   18.88 -static inline void revert_page(struct page *kpte_page, unsigned long address)
   18.89 -{
   18.90 -	pte_t *linear = (pte_t *) 
   18.91 -		pmd_offset(pgd_offset(&init_mm, address), address);
   18.92 -	set_pmd_pte(linear,  address,
   18.93 -		mk_pte_phys(__pa(address & LARGE_PAGE_MASK),
   18.94 -			    MAKE_GLOBAL(_KERNPG_TABLE|_PAGE_PSE)));
   18.95 -}	
   18.96 - 
   18.97 -/*
   18.98 - * Change the page attributes of an page in the linear mapping.
   18.99 - *
  18.100 - * This should be used when a page is mapped with a different caching policy
  18.101 - * than write-back somewhere - some CPUs do not like it when mappings with
  18.102 - * different caching policies exist. This changes the page attributes of the
  18.103 - * in kernel linear mapping too.
  18.104 - * 
  18.105 - * The caller needs to ensure that there are no conflicting mappings elsewhere.
  18.106 - * This function only deals with the kernel linear map.
  18.107 - * When page is in highmem it must never be kmap'ed.
  18.108 - */
  18.109 -static int 
  18.110 -__change_page_attr(struct page *page, pgprot_t prot, struct page **oldpage) 
  18.111 -{ 
  18.112 -	pte_t *kpte; 
  18.113 -	unsigned long address;
  18.114 -	struct page *kpte_page;
  18.115 -
  18.116 -#ifdef CONFIG_HIGHMEM
  18.117 -	if (page >= highmem_start_page) 
  18.118 -		BUG(); 
  18.119 -#endif
  18.120 -	address = (unsigned long)page_address(page);
  18.121 -	kpte = lookup_address(address);
  18.122 -	if (!kpte) 
  18.123 -		return -EINVAL; 
  18.124 -	kpte_page = virt_to_page(((unsigned long)kpte) & PAGE_MASK);
  18.125 -	if (pgprot_val(prot) != pgprot_val(PAGE_KERNEL)) { 
  18.126 -		if ((pte_val(*kpte) & _PAGE_PSE) == 0) {
  18.127 -			pte_t old = *kpte;
  18.128 -			pte_t standard = mk_pte(page, PAGE_KERNEL); 
  18.129 -
  18.130 -			set_pte_atomic(kpte, mk_pte(page, prot)); 
  18.131 -			if (pte_same(old,standard))
  18.132 -				atomic_inc(&kpte_page->count);
  18.133 -		} else {
  18.134 -			struct page *split = split_large_page(address, prot); 
  18.135 -			if (!split)
  18.136 -				return -ENOMEM;
  18.137 -			atomic_inc(&kpte_page->count); 	
  18.138 -			set_pmd_pte(kpte,address,mk_pte(split, PAGE_KERNEL));
  18.139 -		}	
  18.140 -	} else if ((pte_val(*kpte) & _PAGE_PSE) == 0) { 
  18.141 -		set_pte_atomic(kpte, mk_pte(page, PAGE_KERNEL));
  18.142 -		atomic_dec(&kpte_page->count); 
  18.143 -	}
  18.144 -
  18.145 -	if (cpu_has_pse && (atomic_read(&kpte_page->count) == 1)) { 
  18.146 -		*oldpage = kpte_page;
  18.147 -		revert_page(kpte_page, address);
  18.148 -	} 
  18.149 -	return 0;
  18.150 -} 
  18.151 -
  18.152 -int change_page_attr(struct page *page, int numpages, pgprot_t prot)
  18.153 -{
  18.154 -	int err = 0; 
  18.155 -	struct page *fpage; 
  18.156 -	int i; 
  18.157 -
  18.158 -	down_write(&init_mm.mmap_sem);
  18.159 -	for (i = 0; i < numpages; i++, page++) { 
  18.160 -		fpage = NULL;
  18.161 -		err = __change_page_attr(page, prot, &fpage); 
  18.162 -		if (err) 
  18.163 -			break; 
  18.164 -		if (fpage || i == numpages-1) { 
  18.165 -			void *address = page_address(page);
  18.166 -#ifdef CONFIG_SMP 
  18.167 -			smp_call_function(flush_kernel_map, address, 1, 1);
  18.168 -#endif	
  18.169 -			flush_kernel_map(address);
  18.170 -			if (fpage)
  18.171 -				__free_page(fpage);
  18.172 -		} 
  18.173 -	} 	
  18.174 -	up_write(&init_mm.mmap_sem); 
  18.175 -	return err;
  18.176 -}
  18.177 -
  18.178 -EXPORT_SYMBOL(change_page_attr);
    19.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/a.out.h	Tue Mar 11 14:37:27 2003 +0000
    19.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.3 @@ -1,26 +0,0 @@
    19.4 -#ifndef __I386_A_OUT_H__
    19.5 -#define __I386_A_OUT_H__
    19.6 -
    19.7 -struct exec
    19.8 -{
    19.9 -  unsigned long a_info;		/* Use macros N_MAGIC, etc for access */
   19.10 -  unsigned a_text;		/* length of text, in bytes */
   19.11 -  unsigned a_data;		/* length of data, in bytes */
   19.12 -  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
   19.13 -  unsigned a_syms;		/* length of symbol table data in file, in bytes */
   19.14 -  unsigned a_entry;		/* start address */
   19.15 -  unsigned a_trsize;		/* length of relocation info for text, in bytes */
   19.16 -  unsigned a_drsize;		/* length of relocation info for data, in bytes */
   19.17 -};
   19.18 -
   19.19 -#define N_TRSIZE(a)	((a).a_trsize)
   19.20 -#define N_DRSIZE(a)	((a).a_drsize)
   19.21 -#define N_SYMSIZE(a)	((a).a_syms)
   19.22 -
   19.23 -#ifdef __KERNEL__
   19.24 -
   19.25 -#define STACK_TOP	TASK_SIZE
   19.26 -
   19.27 -#endif
   19.28 -
   19.29 -#endif /* __A_OUT_GNU_H__ */
    20.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apic.h	Tue Mar 11 14:37:27 2003 +0000
    20.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.3 @@ -1,99 +0,0 @@
    20.4 -#ifndef __ASM_APIC_H
    20.5 -#define __ASM_APIC_H
    20.6 -
    20.7 -#include <linux/config.h>
    20.8 -#include <linux/pm.h>
    20.9 -#include <asm/apicdef.h>
   20.10 -#include <asm/system.h>
   20.11 -
   20.12 -#ifdef CONFIG_X86_LOCAL_APIC
   20.13 -
   20.14 -#define APIC_DEBUG 0
   20.15 -
   20.16 -#if APIC_DEBUG
   20.17 -#define Dprintk(x...) printk(x)
   20.18 -#else
   20.19 -#define Dprintk(x...)
   20.20 -#endif
   20.21 -
   20.22 -/*
   20.23 - * Basic functions accessing APICs.
   20.24 - */
   20.25 -
   20.26 -static __inline void apic_write(unsigned long reg, unsigned long v)
   20.27 -{
   20.28 -	*((volatile unsigned long *)(APIC_BASE+reg)) = v;
   20.29 -}
   20.30 -
   20.31 -static __inline void apic_write_atomic(unsigned long reg, unsigned long v)
   20.32 -{
   20.33 -	xchg((volatile unsigned long *)(APIC_BASE+reg), v);
   20.34 -}
   20.35 -
   20.36 -static __inline unsigned long apic_read(unsigned long reg)
   20.37 -{
   20.38 -	return *((volatile unsigned long *)(APIC_BASE+reg));
   20.39 -}
   20.40 -
   20.41 -static __inline__ void apic_wait_icr_idle(void)
   20.42 -{
   20.43 -	do { } while ( apic_read( APIC_ICR ) & APIC_ICR_BUSY );
   20.44 -}
   20.45 -
   20.46 -#ifdef CONFIG_X86_GOOD_APIC
   20.47 -# define FORCE_READ_AROUND_WRITE 0
   20.48 -# define apic_read_around(x)
   20.49 -# define apic_write_around(x,y) apic_write((x),(y))
   20.50 -#else
   20.51 -# define FORCE_READ_AROUND_WRITE 1
   20.52 -# define apic_read_around(x) apic_read(x)
   20.53 -# define apic_write_around(x,y) apic_write_atomic((x),(y))
   20.54 -#endif
   20.55 -
   20.56 -static inline void ack_APIC_irq(void)
   20.57 -{
   20.58 -	/*
   20.59 -	 * ack_APIC_irq() actually gets compiled as a single instruction:
   20.60 -	 * - a single rmw on Pentium/82489DX
   20.61 -	 * - a single write on P6+ cores (CONFIG_X86_GOOD_APIC)
   20.62 -	 * ... yummie.
   20.63 -	 */
   20.64 -
   20.65 -	/* Docs say use 0 for future compatibility */
   20.66 -	apic_write_around(APIC_EOI, 0);
   20.67 -}
   20.68 -
   20.69 -extern int get_maxlvt(void);
   20.70 -extern void clear_local_APIC(void);
   20.71 -extern void connect_bsp_APIC (void);
   20.72 -extern void disconnect_bsp_APIC (void);
   20.73 -extern void disable_local_APIC (void);
   20.74 -extern int verify_local_APIC (void);
   20.75 -extern void cache_APIC_registers (void);
   20.76 -extern void sync_Arb_IDs (void);
   20.77 -extern void init_bsp_APIC (void);
   20.78 -extern void setup_local_APIC (void);
   20.79 -extern void init_apic_mappings (void);
   20.80 -extern void smp_local_timer_interrupt (struct pt_regs * regs);
   20.81 -extern void setup_APIC_clocks (void);
   20.82 -extern void setup_apic_nmi_watchdog (void);
   20.83 -extern inline void nmi_watchdog_tick (struct pt_regs * regs);
   20.84 -extern int APIC_init_uniprocessor (void);
   20.85 -extern void disable_APIC_timer(void);
   20.86 -extern void enable_APIC_timer(void);
   20.87 -
   20.88 -extern struct pm_dev *apic_pm_register(pm_dev_t, unsigned long, pm_callback);
   20.89 -extern void apic_pm_unregister(struct pm_dev*);
   20.90 -
   20.91 -extern unsigned int apic_timer_irqs [NR_CPUS];
   20.92 -extern int check_nmi_watchdog (void);
   20.93 -
   20.94 -extern unsigned int nmi_watchdog;
   20.95 -#define NMI_NONE	0
   20.96 -#define NMI_IO_APIC	1
   20.97 -#define NMI_LOCAL_APIC	2
   20.98 -#define NMI_INVALID	3
   20.99 -
  20.100 -#endif /* CONFIG_X86_LOCAL_APIC */
  20.101 -
  20.102 -#endif /* __ASM_APIC_H */
    21.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apicdef.h	Tue Mar 11 14:37:27 2003 +0000
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,378 +0,0 @@
    21.4 -#ifndef __ASM_APICDEF_H
    21.5 -#define __ASM_APICDEF_H
    21.6 -
    21.7 -/*
    21.8 - * Constants for various Intel APICs. (local APIC, IOAPIC, etc.)
    21.9 - *
   21.10 - * Alan Cox <Alan.Cox@linux.org>, 1995.
   21.11 - * Ingo Molnar <mingo@redhat.com>, 1999, 2000
   21.12 - */
   21.13 -
   21.14 -#define		APIC_DEFAULT_PHYS_BASE	0xfee00000
   21.15 - 
   21.16 -#define		APIC_ID		0x20
   21.17 -#define			APIC_ID_MASK		(0x0F<<24)
   21.18 -#define			GET_APIC_ID(x)		(((x)>>24)&0x0F)
   21.19 -#define		APIC_LVR	0x30
   21.20 -#define			APIC_LVR_MASK		0xFF00FF
   21.21 -#define			GET_APIC_VERSION(x)	((x)&0xFF)
   21.22 -#define			GET_APIC_MAXLVT(x)	(((x)>>16)&0xFF)
   21.23 -#define			APIC_INTEGRATED(x)	((x)&0xF0)
   21.24 -#define		APIC_TASKPRI	0x80
   21.25 -#define			APIC_TPRI_MASK		0xFF
   21.26 -#define		APIC_ARBPRI	0x90
   21.27 -#define			APIC_ARBPRI_MASK	0xFF
   21.28 -#define		APIC_PROCPRI	0xA0
   21.29 -#define		APIC_EOI	0xB0
   21.30 -#define			APIC_EIO_ACK		0x0		/* Write this to the EOI register */
   21.31 -#define		APIC_RRR	0xC0
   21.32 -#define		APIC_LDR	0xD0
   21.33 -#define			APIC_LDR_MASK		(0xFF<<24)
   21.34 -#define			GET_APIC_LOGICAL_ID(x)	(((x)>>24)&0xFF)
   21.35 -#define			SET_APIC_LOGICAL_ID(x)	(((x)<<24))
   21.36 -#define			APIC_ALL_CPUS		0xFF
   21.37 -#define		APIC_DFR	0xE0
   21.38 -#define			APIC_DFR_CLUSTER	0x0FFFFFFFul	/* Clustered */
   21.39 -#define			APIC_DFR_FLAT		0xFFFFFFFFul	/* Flat mode */
   21.40 -#define		APIC_SPIV	0xF0
   21.41 -#define			APIC_SPIV_FOCUS_DISABLED	(1<<9)
   21.42 -#define			APIC_SPIV_APIC_ENABLED		(1<<8)
   21.43 -#define		APIC_ISR	0x100
   21.44 -#define		APIC_TMR	0x180
   21.45 -#define 	APIC_IRR	0x200
   21.46 -#define 	APIC_ESR	0x280
   21.47 -#define			APIC_ESR_SEND_CS	0x00001
   21.48 -#define			APIC_ESR_RECV_CS	0x00002
   21.49 -#define			APIC_ESR_SEND_ACC	0x00004
   21.50 -#define			APIC_ESR_RECV_ACC	0x00008
   21.51 -#define			APIC_ESR_SENDILL	0x00020
   21.52 -#define			APIC_ESR_RECVILL	0x00040
   21.53 -#define			APIC_ESR_ILLREGA	0x00080
   21.54 -#define		APIC_ICR	0x300
   21.55 -#define			APIC_DEST_SELF		0x40000
   21.56 -#define			APIC_DEST_ALLINC	0x80000
   21.57 -#define			APIC_DEST_ALLBUT	0xC0000
   21.58 -#define			APIC_ICR_RR_MASK	0x30000
   21.59 -#define			APIC_ICR_RR_INVALID	0x00000
   21.60 -#define			APIC_ICR_RR_INPROG	0x10000
   21.61 -#define			APIC_ICR_RR_VALID	0x20000
   21.62 -#define			APIC_INT_LEVELTRIG	0x08000
   21.63 -#define			APIC_INT_ASSERT		0x04000
   21.64 -#define			APIC_ICR_BUSY		0x01000
   21.65 -#define			APIC_DEST_PHYSICAL	0x00000
   21.66 -#define			APIC_DEST_LOGICAL	0x00800
   21.67 -#define			APIC_DM_FIXED		0x00000
   21.68 -#define			APIC_DM_LOWEST		0x00100
   21.69 -#define			APIC_DM_SMI		0x00200
   21.70 -#define			APIC_DM_REMRD		0x00300
   21.71 -#define			APIC_DM_NMI		0x00400
   21.72 -#define			APIC_DM_INIT		0x00500
   21.73 -#define			APIC_DM_STARTUP		0x00600
   21.74 -#define			APIC_DM_EXTINT		0x00700
   21.75 -#define			APIC_VECTOR_MASK	0x000FF
   21.76 -#define		APIC_ICR2	0x310
   21.77 -#define			GET_APIC_DEST_FIELD(x)	(((x)>>24)&0xFF)
   21.78 -#define			SET_APIC_DEST_FIELD(x)	((x)<<24)
   21.79 -#define		APIC_LVTT	0x320
   21.80 -#define		APIC_LVTPC	0x340
   21.81 -#define		APIC_LVT0	0x350
   21.82 -#define			APIC_LVT_TIMER_BASE_MASK	(0x3<<18)
   21.83 -#define			GET_APIC_TIMER_BASE(x)		(((x)>>18)&0x3)
   21.84 -#define			SET_APIC_TIMER_BASE(x)		(((x)<<18))
   21.85 -#define			APIC_TIMER_BASE_CLKIN		0x0
   21.86 -#define			APIC_TIMER_BASE_TMBASE		0x1
   21.87 -#define			APIC_TIMER_BASE_DIV		0x2
   21.88 -#define			APIC_LVT_TIMER_PERIODIC		(1<<17)
   21.89 -#define			APIC_LVT_MASKED			(1<<16)
   21.90 -#define			APIC_LVT_LEVEL_TRIGGER		(1<<15)
   21.91 -#define			APIC_LVT_REMOTE_IRR		(1<<14)
   21.92 -#define			APIC_INPUT_POLARITY		(1<<13)
   21.93 -#define			APIC_SEND_PENDING		(1<<12)
   21.94 -#define			GET_APIC_DELIVERY_MODE(x)	(((x)>>8)&0x7)
   21.95 -#define			SET_APIC_DELIVERY_MODE(x,y)	(((x)&~0x700)|((y)<<8))
   21.96 -#define				APIC_MODE_FIXED		0x0
   21.97 -#define				APIC_MODE_NMI		0x4
   21.98 -#define				APIC_MODE_EXINT		0x7
   21.99 -#define 	APIC_LVT1	0x360
  21.100 -#define		APIC_LVTERR	0x370
  21.101 -#define		APIC_TMICT	0x380
  21.102 -#define		APIC_TMCCT	0x390
  21.103 -#define		APIC_TDCR	0x3E0
  21.104 -#define			APIC_TDR_DIV_TMBASE	(1<<2)
  21.105 -#define			APIC_TDR_DIV_1		0xB
  21.106 -#define			APIC_TDR_DIV_2		0x0
  21.107 -#define			APIC_TDR_DIV_4		0x1
  21.108 -#define			APIC_TDR_DIV_8		0x2
  21.109 -#define			APIC_TDR_DIV_16		0x3
  21.110 -#define			APIC_TDR_DIV_32		0x8
  21.111 -#define			APIC_TDR_DIV_64		0x9
  21.112 -#define			APIC_TDR_DIV_128	0xA
  21.113 -
  21.114 -#define APIC_BASE (fix_to_virt(FIX_APIC_BASE))
  21.115 -
  21.116 -#ifdef CONFIG_X86_CLUSTERED_APIC
  21.117 -#define MAX_IO_APICS 32
  21.118 -#else
  21.119 -#define MAX_IO_APICS 8
  21.120 -#endif
  21.121 -
  21.122 -
  21.123 -/*
  21.124 - * The broadcast ID is 0xF for old APICs and 0xFF for xAPICs.  SAPICs
  21.125 - * don't broadcast (yet?), but if they did, they might use 0xFFFF.
  21.126 - */
  21.127 -#define APIC_BROADCAST_ID_XAPIC (0xFF)
  21.128 -#define APIC_BROADCAST_ID_APIC  (0x0F)
  21.129 -
  21.130 -/*
  21.131 - * the local APIC register structure, memory mapped. Not terribly well
  21.132 - * tested, but we might eventually use this one in the future - the
  21.133 - * problem why we cannot use it right now is the P5 APIC, it has an
  21.134 - * errata which cannot take 8-bit reads and writes, only 32-bit ones ...
  21.135 - */
  21.136 -#define u32 unsigned int
  21.137 -
  21.138 -#define lapic ((volatile struct local_apic *)APIC_BASE)
  21.139 -
  21.140 -struct local_apic {
  21.141 -
  21.142 -/*000*/	struct { u32 __reserved[4]; } __reserved_01;
  21.143 -
  21.144 -/*010*/	struct { u32 __reserved[4]; } __reserved_02;
  21.145 -
  21.146 -/*020*/	struct { /* APIC ID Register */
  21.147 -		u32   __reserved_1	: 24,
  21.148 -			phys_apic_id	:  4,
  21.149 -			__reserved_2	:  4;
  21.150 -		u32 __reserved[3];
  21.151 -	} id;
  21.152 -
  21.153 -/*030*/	const
  21.154 -	struct { /* APIC Version Register */
  21.155 -		u32   version		:  8,
  21.156 -			__reserved_1	:  8,
  21.157 -			max_lvt		:  8,
  21.158 -			__reserved_2	:  8;
  21.159 -		u32 __reserved[3];
  21.160 -	} version;
  21.161 -
  21.162 -/*040*/	struct { u32 __reserved[4]; } __reserved_03;
  21.163 -
  21.164 -/*050*/	struct { u32 __reserved[4]; } __reserved_04;
  21.165 -
  21.166 -/*060*/	struct { u32 __reserved[4]; } __reserved_05;
  21.167 -
  21.168 -/*070*/	struct { u32 __reserved[4]; } __reserved_06;
  21.169 -
  21.170 -/*080*/	struct { /* Task Priority Register */
  21.171 -		u32   priority	:  8,
  21.172 -			__reserved_1	: 24;
  21.173 -		u32 __reserved_2[3];
  21.174 -	} tpr;
  21.175 -
  21.176 -/*090*/	const
  21.177 -	struct { /* Arbitration Priority Register */
  21.178 -		u32   priority	:  8,
  21.179 -			__reserved_1	: 24;
  21.180 -		u32 __reserved_2[3];
  21.181 -	} apr;
  21.182 -
  21.183 -/*0A0*/	const
  21.184 -	struct { /* Processor Priority Register */
  21.185 -		u32   priority	:  8,
  21.186 -			__reserved_1	: 24;
  21.187 -		u32 __reserved_2[3];
  21.188 -	} ppr;
  21.189 -
  21.190 -/*0B0*/	struct { /* End Of Interrupt Register */
  21.191 -		u32   eoi;
  21.192 -		u32 __reserved[3];
  21.193 -	} eoi;
  21.194 -
  21.195 -/*0C0*/	struct { u32 __reserved[4]; } __reserved_07;
  21.196 -
  21.197 -/*0D0*/	struct { /* Logical Destination Register */
  21.198 -		u32   __reserved_1	: 24,
  21.199 -			logical_dest	:  8;
  21.200 -		u32 __reserved_2[3];
  21.201 -	} ldr;
  21.202 -
  21.203 -/*0E0*/	struct { /* Destination Format Register */
  21.204 -		u32   __reserved_1	: 28,
  21.205 -			model		:  4;
  21.206 -		u32 __reserved_2[3];
  21.207 -	} dfr;
  21.208 -
  21.209 -/*0F0*/	struct { /* Spurious Interrupt Vector Register */
  21.210 -		u32	spurious_vector	:  8,
  21.211 -			apic_enabled	:  1,
  21.212 -			focus_cpu	:  1,
  21.213 -			__reserved_2	: 22;
  21.214 -		u32 __reserved_3[3];
  21.215 -	} svr;
  21.216 -
  21.217 -/*100*/	struct { /* In Service Register */
  21.218 -/*170*/		u32 bitfield;
  21.219 -		u32 __reserved[3];
  21.220 -	} isr [8];
  21.221 -
  21.222 -/*180*/	struct { /* Trigger Mode Register */
  21.223 -/*1F0*/		u32 bitfield;
  21.224 -		u32 __reserved[3];
  21.225 -	} tmr [8];
  21.226 -
  21.227 -/*200*/	struct { /* Interrupt Request Register */
  21.228 -/*270*/		u32 bitfield;
  21.229 -		u32 __reserved[3];
  21.230 -	} irr [8];
  21.231 -
  21.232 -/*280*/	union { /* Error Status Register */
  21.233 -		struct {
  21.234 -			u32   send_cs_error			:  1,
  21.235 -				receive_cs_error		:  1,
  21.236 -				send_accept_error		:  1,
  21.237 -				receive_accept_error		:  1,
  21.238 -				__reserved_1			:  1,
  21.239 -				send_illegal_vector		:  1,
  21.240 -				receive_illegal_vector		:  1,
  21.241 -				illegal_register_address	:  1,
  21.242 -				__reserved_2			: 24;
  21.243 -			u32 __reserved_3[3];
  21.244 -		} error_bits;
  21.245 -		struct {
  21.246 -			u32 errors;
  21.247 -			u32 __reserved_3[3];
  21.248 -		} all_errors;
  21.249 -	} esr;
  21.250 -
  21.251 -/*290*/	struct { u32 __reserved[4]; } __reserved_08;
  21.252 -
  21.253 -/*2A0*/	struct { u32 __reserved[4]; } __reserved_09;
  21.254 -
  21.255 -/*2B0*/	struct { u32 __reserved[4]; } __reserved_10;
  21.256 -
  21.257 -/*2C0*/	struct { u32 __reserved[4]; } __reserved_11;
  21.258 -
  21.259 -/*2D0*/	struct { u32 __reserved[4]; } __reserved_12;
  21.260 -
  21.261 -/*2E0*/	struct { u32 __reserved[4]; } __reserved_13;
  21.262 -
  21.263 -/*2F0*/	struct { u32 __reserved[4]; } __reserved_14;
  21.264 -
  21.265 -/*300*/	struct { /* Interrupt Command Register 1 */
  21.266 -		u32   vector			:  8,
  21.267 -			delivery_mode		:  3,
  21.268 -			destination_mode	:  1,
  21.269 -			delivery_status		:  1,
  21.270 -			__reserved_1		:  1,
  21.271 -			level			:  1,
  21.272 -			trigger			:  1,
  21.273 -			__reserved_2		:  2,
  21.274 -			shorthand		:  2,
  21.275 -			__reserved_3		:  12;
  21.276 -		u32 __reserved_4[3];
  21.277 -	} icr1;
  21.278 -
  21.279 -/*310*/	struct { /* Interrupt Command Register 2 */
  21.280 -		union {
  21.281 -			u32   __reserved_1	: 24,
  21.282 -				phys_dest	:  4,
  21.283 -				__reserved_2	:  4;
  21.284 -			u32   __reserved_3	: 24,
  21.285 -				logical_dest	:  8;
  21.286 -		} dest;
  21.287 -		u32 __reserved_4[3];
  21.288 -	} icr2;
  21.289 -
  21.290 -/*320*/	struct { /* LVT - Timer */
  21.291 -		u32   vector		:  8,
  21.292 -			__reserved_1	:  4,
  21.293 -			delivery_status	:  1,
  21.294 -			__reserved_2	:  3,
  21.295 -			mask		:  1,
  21.296 -			timer_mode	:  1,
  21.297 -			__reserved_3	: 14;
  21.298 -		u32 __reserved_4[3];
  21.299 -	} lvt_timer;
  21.300 -
  21.301 -/*330*/	struct { u32 __reserved[4]; } __reserved_15;
  21.302 -
  21.303 -/*340*/	struct { /* LVT - Performance Counter */
  21.304 -		u32   vector		:  8,
  21.305 -			delivery_mode	:  3,
  21.306 -			__reserved_1	:  1,
  21.307 -			delivery_status	:  1,
  21.308 -			__reserved_2	:  3,
  21.309 -			mask		:  1,
  21.310 -			__reserved_3	: 15;
  21.311 -		u32 __reserved_4[3];
  21.312 -	} lvt_pc;
  21.313 -
  21.314 -/*350*/	struct { /* LVT - LINT0 */
  21.315 -		u32   vector		:  8,
  21.316 -			delivery_mode	:  3,
  21.317 -			__reserved_1	:  1,
  21.318 -			delivery_status	:  1,
  21.319 -			polarity	:  1,
  21.320 -			remote_irr	:  1,
  21.321 -			trigger		:  1,
  21.322 -			mask		:  1,
  21.323 -			__reserved_2	: 15;
  21.324 -		u32 __reserved_3[3];
  21.325 -	} lvt_lint0;
  21.326 -
  21.327 -/*360*/	struct { /* LVT - LINT1 */
  21.328 -		u32   vector		:  8,
  21.329 -			delivery_mode	:  3,
  21.330 -			__reserved_1	:  1,
  21.331 -			delivery_status	:  1,
  21.332 -			polarity	:  1,
  21.333 -			remote_irr	:  1,
  21.334 -			trigger		:  1,
  21.335 -			mask		:  1,
  21.336 -			__reserved_2	: 15;
  21.337 -		u32 __reserved_3[3];
  21.338 -	} lvt_lint1;
  21.339 -
  21.340 -/*370*/	struct { /* LVT - Error */
  21.341 -		u32   vector		:  8,
  21.342 -			__reserved_1	:  4,
  21.343 -			delivery_status	:  1,
  21.344 -			__reserved_2	:  3,
  21.345 -			mask		:  1,
  21.346 -			__reserved_3	: 15;
  21.347 -		u32 __reserved_4[3];
  21.348 -	} lvt_error;
  21.349 -
  21.350 -/*380*/	struct { /* Timer Initial Count Register */
  21.351 -		u32   initial_count;
  21.352 -		u32 __reserved_2[3];
  21.353 -	} timer_icr;
  21.354 -
  21.355 -/*390*/	const
  21.356 -	struct { /* Timer Current Count Register */
  21.357 -		u32   curr_count;
  21.358 -		u32 __reserved_2[3];
  21.359 -	} timer_ccr;
  21.360 -
  21.361 -/*3A0*/	struct { u32 __reserved[4]; } __reserved_16;
  21.362 -
  21.363 -/*3B0*/	struct { u32 __reserved[4]; } __reserved_17;
  21.364 -
  21.365 -/*3C0*/	struct { u32 __reserved[4]; } __reserved_18;
  21.366 -
  21.367 -/*3D0*/	struct { u32 __reserved[4]; } __reserved_19;
  21.368 -
  21.369 -/*3E0*/	struct { /* Timer Divide Configuration Register */
  21.370 -		u32   divisor		:  4,
  21.371 -			__reserved_1	: 28;
  21.372 -		u32 __reserved_2[3];
  21.373 -	} timer_dcr;
  21.374 -
  21.375 -/*3F0*/	struct { u32 __reserved[4]; } __reserved_20;
  21.376 -
  21.377 -} __attribute__ ((packed));
  21.378 -
  21.379 -#undef u32
  21.380 -
  21.381 -#endif
    22.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/atomic.h	Tue Mar 11 14:37:27 2003 +0000
    22.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.3 @@ -1,204 +0,0 @@
    22.4 -#ifndef __ARCH_I386_ATOMIC__
    22.5 -#define __ARCH_I386_ATOMIC__
    22.6 -
    22.7 -#include <linux/config.h>
    22.8 -
    22.9 -/*
   22.10 - * Atomic operations that C can't guarantee us.  Useful for
   22.11 - * resource counting etc..
   22.12 - */
   22.13 -
   22.14 -#ifdef CONFIG_SMP
   22.15 -#define LOCK "lock ; "
   22.16 -#else
   22.17 -#define LOCK ""
   22.18 -#endif
   22.19 -
   22.20 -/*
   22.21 - * Make sure gcc doesn't try to be clever and move things around
   22.22 - * on us. We need to use _exactly_ the address the user gave us,
   22.23 - * not some alias that contains the same information.
   22.24 - */
   22.25 -typedef struct { volatile int counter; } atomic_t;
   22.26 -
   22.27 -#define ATOMIC_INIT(i)	{ (i) }
   22.28 -
   22.29 -/**
   22.30 - * atomic_read - read atomic variable
   22.31 - * @v: pointer of type atomic_t
   22.32 - * 
   22.33 - * Atomically reads the value of @v.  Note that the guaranteed
   22.34 - * useful range of an atomic_t is only 24 bits.
   22.35 - */ 
   22.36 -#define atomic_read(v)		((v)->counter)
   22.37 -
   22.38 -/**
   22.39 - * atomic_set - set atomic variable
   22.40 - * @v: pointer of type atomic_t
   22.41 - * @i: required value
   22.42 - * 
   22.43 - * Atomically sets the value of @v to @i.  Note that the guaranteed
   22.44 - * useful range of an atomic_t is only 24 bits.
   22.45 - */ 
   22.46 -#define atomic_set(v,i)		(((v)->counter) = (i))
   22.47 -
   22.48 -/**
   22.49 - * atomic_add - add integer to atomic variable
   22.50 - * @i: integer value to add
   22.51 - * @v: pointer of type atomic_t
   22.52 - * 
   22.53 - * Atomically adds @i to @v.  Note that the guaranteed useful range
   22.54 - * of an atomic_t is only 24 bits.
   22.55 - */
   22.56 -static __inline__ void atomic_add(int i, atomic_t *v)
   22.57 -{
   22.58 -	__asm__ __volatile__(
   22.59 -		LOCK "addl %1,%0"
   22.60 -		:"=m" (v->counter)
   22.61 -		:"ir" (i), "m" (v->counter));
   22.62 -}
   22.63 -
   22.64 -/**
   22.65 - * atomic_sub - subtract the atomic variable
   22.66 - * @i: integer value to subtract
   22.67 - * @v: pointer of type atomic_t
   22.68 - * 
   22.69 - * Atomically subtracts @i from @v.  Note that the guaranteed
   22.70 - * useful range of an atomic_t is only 24 bits.
   22.71 - */
   22.72 -static __inline__ void atomic_sub(int i, atomic_t *v)
   22.73 -{
   22.74 -	__asm__ __volatile__(
   22.75 -		LOCK "subl %1,%0"
   22.76 -		:"=m" (v->counter)
   22.77 -		:"ir" (i), "m" (v->counter));
   22.78 -}
   22.79 -
   22.80 -/**
   22.81 - * atomic_sub_and_test - subtract value from variable and test result
   22.82 - * @i: integer value to subtract
   22.83 - * @v: pointer of type atomic_t
   22.84 - * 
   22.85 - * Atomically subtracts @i from @v and returns
   22.86 - * true if the result is zero, or false for all
   22.87 - * other cases.  Note that the guaranteed
   22.88 - * useful range of an atomic_t is only 24 bits.
   22.89 - */
   22.90 -static __inline__ int atomic_sub_and_test(int i, atomic_t *v)
   22.91 -{
   22.92 -	unsigned char c;
   22.93 -
   22.94 -	__asm__ __volatile__(
   22.95 -		LOCK "subl %2,%0; sete %1"
   22.96 -		:"=m" (v->counter), "=qm" (c)
   22.97 -		:"ir" (i), "m" (v->counter) : "memory");
   22.98 -	return c;
   22.99 -}
  22.100 -
  22.101 -/**
  22.102 - * atomic_inc - increment atomic variable
  22.103 - * @v: pointer of type atomic_t
  22.104 - * 
  22.105 - * Atomically increments @v by 1.  Note that the guaranteed
  22.106 - * useful range of an atomic_t is only 24 bits.
  22.107 - */ 
  22.108 -static __inline__ void atomic_inc(atomic_t *v)
  22.109 -{
  22.110 -	__asm__ __volatile__(
  22.111 -		LOCK "incl %0"
  22.112 -		:"=m" (v->counter)
  22.113 -		:"m" (v->counter));
  22.114 -}
  22.115 -
  22.116 -/**
  22.117 - * atomic_dec - decrement atomic variable
  22.118 - * @v: pointer of type atomic_t
  22.119 - * 
  22.120 - * Atomically decrements @v by 1.  Note that the guaranteed
  22.121 - * useful range of an atomic_t is only 24 bits.
  22.122 - */ 
  22.123 -static __inline__ void atomic_dec(atomic_t *v)
  22.124 -{
  22.125 -	__asm__ __volatile__(
  22.126 -		LOCK "decl %0"
  22.127 -		:"=m" (v->counter)
  22.128 -		:"m" (v->counter));
  22.129 -}
  22.130 -
  22.131 -/**
  22.132 - * atomic_dec_and_test - decrement and test
  22.133 - * @v: pointer of type atomic_t
  22.134 - * 
  22.135 - * Atomically decrements @v by 1 and
  22.136 - * returns true if the result is 0, or false for all other
  22.137 - * cases.  Note that the guaranteed
  22.138 - * useful range of an atomic_t is only 24 bits.
  22.139 - */ 
  22.140 -static __inline__ int atomic_dec_and_test(atomic_t *v)
  22.141 -{
  22.142 -	unsigned char c;
  22.143 -
  22.144 -	__asm__ __volatile__(
  22.145 -		LOCK "decl %0; sete %1"
  22.146 -		:"=m" (v->counter), "=qm" (c)
  22.147 -		:"m" (v->counter) : "memory");
  22.148 -	return c != 0;
  22.149 -}
  22.150 -
  22.151 -/**
  22.152 - * atomic_inc_and_test - increment and test 
  22.153 - * @v: pointer of type atomic_t
  22.154 - * 
  22.155 - * Atomically increments @v by 1
  22.156 - * and returns true if the result is zero, or false for all
  22.157 - * other cases.  Note that the guaranteed
  22.158 - * useful range of an atomic_t is only 24 bits.
  22.159 - */ 
  22.160 -static __inline__ int atomic_inc_and_test(atomic_t *v)
  22.161 -{
  22.162 -	unsigned char c;
  22.163 -
  22.164 -	__asm__ __volatile__(
  22.165 -		LOCK "incl %0; sete %1"
  22.166 -		:"=m" (v->counter), "=qm" (c)
  22.167 -		:"m" (v->counter) : "memory");
  22.168 -	return c != 0;
  22.169 -}
  22.170 -
  22.171 -/**
  22.172 - * atomic_add_negative - add and test if negative
  22.173 - * @v: pointer of type atomic_t
  22.174 - * @i: integer value to add
  22.175 - * 
  22.176 - * Atomically adds @i to @v and returns true
  22.177 - * if the result is negative, or false when
  22.178 - * result is greater than or equal to zero.  Note that the guaranteed
  22.179 - * useful range of an atomic_t is only 24 bits.
  22.180 - */ 
  22.181 -static __inline__ int atomic_add_negative(int i, atomic_t *v)
  22.182 -{
  22.183 -	unsigned char c;
  22.184 -
  22.185 -	__asm__ __volatile__(
  22.186 -		LOCK "addl %2,%0; sets %1"
  22.187 -		:"=m" (v->counter), "=qm" (c)
  22.188 -		:"ir" (i), "m" (v->counter) : "memory");
  22.189 -	return c;
  22.190 -}
  22.191 -
  22.192 -/* These are x86-specific, used by some header files */
  22.193 -#define atomic_clear_mask(mask, addr) \
  22.194 -__asm__ __volatile__(LOCK "andl %0,%1" \
  22.195 -: : "r" (~(mask)),"m" (*addr) : "memory")
  22.196 -
  22.197 -#define atomic_set_mask(mask, addr) \
  22.198 -__asm__ __volatile__(LOCK "orl %0,%1" \
  22.199 -: : "r" (mask),"m" (*addr) : "memory")
  22.200 -
  22.201 -/* Atomic operations are already serializing on x86 */
  22.202 -#define smp_mb__before_atomic_dec()	barrier()
  22.203 -#define smp_mb__after_atomic_dec()	barrier()
  22.204 -#define smp_mb__before_atomic_inc()	barrier()
  22.205 -#define smp_mb__after_atomic_inc()	barrier()
  22.206 -
  22.207 -#endif
    23.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/bitops.h	Tue Mar 11 14:37:27 2003 +0000
    23.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.3 @@ -1,384 +0,0 @@
    23.4 -#ifndef _I386_BITOPS_H
    23.5 -#define _I386_BITOPS_H
    23.6 -
    23.7 -/*
    23.8 - * Copyright 1992, Linus Torvalds.
    23.9 - */
   23.10 -
   23.11 -#include <linux/config.h>
   23.12 -
   23.13 -/*
   23.14 - * These have to be done with inline assembly: that way the bit-setting
   23.15 - * is guaranteed to be atomic. All bit operations return 0 if the bit
   23.16 - * was cleared before the operation and != 0 if it was not.
   23.17 - *
   23.18 - * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
   23.19 - */
   23.20 -
   23.21 -#ifdef CONFIG_SMP
   23.22 -#define LOCK_PREFIX "lock ; "
   23.23 -#else
   23.24 -#define LOCK_PREFIX ""
   23.25 -#endif
   23.26 -
   23.27 -#define ADDR (*(volatile long *) addr)
   23.28 -
   23.29 -/**
   23.30 - * set_bit - Atomically set a bit in memory
   23.31 - * @nr: the bit to set
   23.32 - * @addr: the address to start counting from
   23.33 - *
   23.34 - * This function is atomic and may not be reordered.  See __set_bit()
   23.35 - * if you do not require the atomic guarantees.
   23.36 - * Note that @nr may be almost arbitrarily large; this function is not
   23.37 - * restricted to acting on a single-word quantity.
   23.38 - */
   23.39 -static __inline__ void set_bit(int nr, volatile void * addr)
   23.40 -{
   23.41 -	__asm__ __volatile__( LOCK_PREFIX
   23.42 -		"btsl %1,%0"
   23.43 -		:"=m" (ADDR)
   23.44 -		:"Ir" (nr));
   23.45 -}
   23.46 -
   23.47 -/**
   23.48 - * __set_bit - Set a bit in memory
   23.49 - * @nr: the bit to set
   23.50 - * @addr: the address to start counting from
   23.51 - *
   23.52 - * Unlike set_bit(), this function is non-atomic and may be reordered.
   23.53 - * If it's called on the same region of memory simultaneously, the effect
   23.54 - * may be that only one operation succeeds.
   23.55 - */
   23.56 -static __inline__ void __set_bit(int nr, volatile void * addr)
   23.57 -{
   23.58 -	__asm__(
   23.59 -		"btsl %1,%0"
   23.60 -		:"=m" (ADDR)
   23.61 -		:"Ir" (nr));
   23.62 -}
   23.63 -
   23.64 -/**
   23.65 - * clear_bit - Clears a bit in memory
   23.66 - * @nr: Bit to clear
   23.67 - * @addr: Address to start counting from
   23.68 - *
   23.69 - * clear_bit() is atomic and may not be reordered.  However, it does
   23.70 - * not contain a memory barrier, so if it is used for locking purposes,
   23.71 - * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
   23.72 - * in order to ensure changes are visible on other processors.
   23.73 - */
   23.74 -static __inline__ void clear_bit(int nr, volatile void * addr)
   23.75 -{
   23.76 -	__asm__ __volatile__( LOCK_PREFIX
   23.77 -		"btrl %1,%0"
   23.78 -		:"=m" (ADDR)
   23.79 -		:"Ir" (nr));
   23.80 -}
   23.81 -#define smp_mb__before_clear_bit()	barrier()
   23.82 -#define smp_mb__after_clear_bit()	barrier()
   23.83 -
   23.84 -/**
   23.85 - * __change_bit - Toggle a bit in memory
   23.86 - * @nr: the bit to set
   23.87 - * @addr: the address to start counting from
   23.88 - *
   23.89 - * Unlike change_bit(), this function is non-atomic and may be reordered.
   23.90 - * If it's called on the same region of memory simultaneously, the effect
   23.91 - * may be that only one operation succeeds.
   23.92 - */
   23.93 -static __inline__ void __change_bit(int nr, volatile void * addr)
   23.94 -{
   23.95 -	__asm__ __volatile__(
   23.96 -		"btcl %1,%0"
   23.97 -		:"=m" (ADDR)
   23.98 -		:"Ir" (nr));
   23.99 -}
  23.100 -
  23.101 -/**
  23.102 - * change_bit - Toggle a bit in memory
  23.103 - * @nr: Bit to clear
  23.104 - * @addr: Address to start counting from
  23.105 - *
  23.106 - * change_bit() is atomic and may not be reordered.
  23.107 - * Note that @nr may be almost arbitrarily large; this function is not
  23.108 - * restricted to acting on a single-word quantity.
  23.109 - */
  23.110 -static __inline__ void change_bit(int nr, volatile void * addr)
  23.111 -{
  23.112 -	__asm__ __volatile__( LOCK_PREFIX
  23.113 -		"btcl %1,%0"
  23.114 -		:"=m" (ADDR)
  23.115 -		:"Ir" (nr));
  23.116 -}
  23.117 -
  23.118 -/**
  23.119 - * test_and_set_bit - Set a bit and return its old value
  23.120 - * @nr: Bit to set
  23.121 - * @addr: Address to count from
  23.122 - *
  23.123 - * This operation is atomic and cannot be reordered.  
  23.124 - * It also implies a memory barrier.
  23.125 - */
  23.126 -static __inline__ int test_and_set_bit(int nr, volatile void * addr)
  23.127 -{
  23.128 -	int oldbit;
  23.129 -
  23.130 -	__asm__ __volatile__( LOCK_PREFIX
  23.131 -		"btsl %2,%1\n\tsbbl %0,%0"
  23.132 -		:"=r" (oldbit),"=m" (ADDR)
  23.133 -		:"Ir" (nr) : "memory");
  23.134 -	return oldbit;
  23.135 -}
  23.136 -
  23.137 -/**
  23.138 - * __test_and_set_bit - Set a bit and return its old value
  23.139 - * @nr: Bit to set
  23.140 - * @addr: Address to count from
  23.141 - *
  23.142 - * This operation is non-atomic and can be reordered.  
  23.143 - * If two examples of this operation race, one can appear to succeed
  23.144 - * but actually fail.  You must protect multiple accesses with a lock.
  23.145 - */
  23.146 -static __inline__ int __test_and_set_bit(int nr, volatile void * addr)
  23.147 -{
  23.148 -	int oldbit;
  23.149 -
  23.150 -	__asm__(
  23.151 -		"btsl %2,%1\n\tsbbl %0,%0"
  23.152 -		:"=r" (oldbit),"=m" (ADDR)
  23.153 -		:"Ir" (nr));
  23.154 -	return oldbit;
  23.155 -}
  23.156 -
  23.157 -/**
  23.158 - * test_and_clear_bit - Clear a bit and return its old value
  23.159 - * @nr: Bit to set
  23.160 - * @addr: Address to count from
  23.161 - *
  23.162 - * This operation is atomic and cannot be reordered.  
  23.163 - * It also implies a memory barrier.
  23.164 - */
  23.165 -static __inline__ int test_and_clear_bit(int nr, volatile void * addr)
  23.166 -{
  23.167 -	int oldbit;
  23.168 -
  23.169 -	__asm__ __volatile__( LOCK_PREFIX
  23.170 -		"btrl %2,%1\n\tsbbl %0,%0"
  23.171 -		:"=r" (oldbit),"=m" (ADDR)
  23.172 -		:"Ir" (nr) : "memory");
  23.173 -	return oldbit;
  23.174 -}
  23.175 -
  23.176 -/**
  23.177 - * __test_and_clear_bit - Clear a bit and return its old value
  23.178 - * @nr: Bit to set
  23.179 - * @addr: Address to count from
  23.180 - *
  23.181 - * This operation is non-atomic and can be reordered.  
  23.182 - * If two examples of this operation race, one can appear to succeed
  23.183 - * but actually fail.  You must protect multiple accesses with a lock.
  23.184 - */
  23.185 -static __inline__ int __test_and_clear_bit(int nr, volatile void * addr)
  23.186 -{
  23.187 -	int oldbit;
  23.188 -
  23.189 -	__asm__(
  23.190 -		"btrl %2,%1\n\tsbbl %0,%0"
  23.191 -		:"=r" (oldbit),"=m" (ADDR)
  23.192 -		:"Ir" (nr));
  23.193 -	return oldbit;
  23.194 -}
  23.195 -
  23.196 -/* WARNING: non atomic and it can be reordered! */
  23.197 -static __inline__ int __test_and_change_bit(int nr, volatile void * addr)
  23.198 -{
  23.199 -	int oldbit;
  23.200 -
  23.201 -	__asm__ __volatile__(
  23.202 -		"btcl %2,%1\n\tsbbl %0,%0"
  23.203 -		:"=r" (oldbit),"=m" (ADDR)
  23.204 -		:"Ir" (nr) : "memory");
  23.205 -	return oldbit;
  23.206 -}
  23.207 -
  23.208 -/**
  23.209 - * test_and_change_bit - Change a bit and return its new value
  23.210 - * @nr: Bit to set
  23.211 - * @addr: Address to count from
  23.212 - *
  23.213 - * This operation is atomic and cannot be reordered.  
  23.214 - * It also implies a memory barrier.
  23.215 - */
  23.216 -static __inline__ int test_and_change_bit(int nr, volatile void * addr)
  23.217 -{
  23.218 -	int oldbit;
  23.219 -
  23.220 -	__asm__ __volatile__( LOCK_PREFIX
  23.221 -		"btcl %2,%1\n\tsbbl %0,%0"
  23.222 -		:"=r" (oldbit),"=m" (ADDR)
  23.223 -		:"Ir" (nr) : "memory");
  23.224 -	return oldbit;
  23.225 -}
  23.226 -
  23.227 -#if 0 /* Fool kernel-doc since it doesn't do macros yet */
  23.228 -/**
  23.229 - * test_bit - Determine whether a bit is set
  23.230 - * @nr: bit number to test
  23.231 - * @addr: Address to start counting from
  23.232 - */
  23.233 -static int test_bit(int nr, const volatile void * addr);
  23.234 -#endif
  23.235 -
  23.236 -static __inline__ int constant_test_bit(int nr, const volatile void * addr)
  23.237 -{
  23.238 -	return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0;
  23.239 -}
  23.240 -
  23.241 -static __inline__ int variable_test_bit(int nr, volatile void * addr)
  23.242 -{
  23.243 -	int oldbit;
  23.244 -
  23.245 -	__asm__ __volatile__(
  23.246 -		"btl %2,%1\n\tsbbl %0,%0"
  23.247 -		:"=r" (oldbit)
  23.248 -		:"m" (ADDR),"Ir" (nr));
  23.249 -	return oldbit;
  23.250 -}
  23.251 -
  23.252 -#define test_bit(nr,addr) \
  23.253 -(__builtin_constant_p(nr) ? \
  23.254 - constant_test_bit((nr),(addr)) : \
  23.255 - variable_test_bit((nr),(addr)))
  23.256 -
  23.257 -/**
  23.258 - * find_first_zero_bit - find the first zero bit in a memory region
  23.259 - * @addr: The address to start the search at
  23.260 - * @size: The maximum size to search
  23.261 - *
  23.262 - * Returns the bit-number of the first zero bit, not the number of the byte
  23.263 - * containing a bit.
  23.264 - */
  23.265 -static __inline__ int find_first_zero_bit(void * addr, unsigned size)
  23.266 -{
  23.267 -	int d0, d1, d2;
  23.268 -	int res;
  23.269 -
  23.270 -	if (!size)
  23.271 -		return 0;
  23.272 -	/* This looks at memory. Mark it volatile to tell gcc not to move it around */
  23.273 -	__asm__ __volatile__(
  23.274 -		"movl $-1,%%eax\n\t"
  23.275 -		"xorl %%edx,%%edx\n\t"
  23.276 -		"repe; scasl\n\t"
  23.277 -		"je 1f\n\t"
  23.278 -		"xorl -4(%%edi),%%eax\n\t"
  23.279 -		"subl $4,%%edi\n\t"
  23.280 -		"bsfl %%eax,%%edx\n"
  23.281 -		"1:\tsubl %%ebx,%%edi\n\t"
  23.282 -		"shll $3,%%edi\n\t"
  23.283 -		"addl %%edi,%%edx"
  23.284 -		:"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2)
  23.285 -		:"1" ((size + 31) >> 5), "2" (addr), "b" (addr));
  23.286 -	return res;
  23.287 -}
  23.288 -
  23.289 -/**
  23.290 - * find_next_zero_bit - find the first zero bit in a memory region
  23.291 - * @addr: The address to base the search on
  23.292 - * @offset: The bitnumber to start searching at
  23.293 - * @size: The maximum size to search
  23.294 - */
  23.295 -static __inline__ int find_next_zero_bit (void * addr, int size, int offset)
  23.296 -{
  23.297 -	unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
  23.298 -	int set = 0, bit = offset & 31, res;
  23.299 -	
  23.300 -	if (bit) {
  23.301 -		/*
  23.302 -		 * Look for zero in first byte
  23.303 -		 */
  23.304 -		__asm__("bsfl %1,%0\n\t"
  23.305 -			"jne 1f\n\t"
  23.306 -			"movl $32, %0\n"
  23.307 -			"1:"
  23.308 -			: "=r" (set)
  23.309 -			: "r" (~(*p >> bit)));
  23.310 -		if (set < (32 - bit))
  23.311 -			return set + offset;
  23.312 -		set = 32 - bit;
  23.313 -		p++;
  23.314 -	}
  23.315 -	/*
  23.316 -	 * No zero yet, search remaining full bytes for a zero
  23.317 -	 */
  23.318 -	res = find_first_zero_bit (p, size - 32 * (p - (unsigned long *) addr));
  23.319 -	return (offset + set + res);
  23.320 -}
  23.321 -
  23.322 -/**
  23.323 - * ffz - find first zero in word.
  23.324 - * @word: The word to search
  23.325 - *
  23.326 - * Undefined if no zero exists, so code should check against ~0UL first.
  23.327 - */
  23.328 -static __inline__ unsigned long ffz(unsigned long word)
  23.329 -{
  23.330 -	__asm__("bsfl %1,%0"
  23.331 -		:"=r" (word)
  23.332 -		:"r" (~word));
  23.333 -	return word;
  23.334 -}
  23.335 -
  23.336 -#ifdef __KERNEL__
  23.337 -
  23.338 -/**
  23.339 - * ffs - find first bit set
  23.340 - * @x: the word to search
  23.341 - *
  23.342 - * This is defined the same way as
  23.343 - * the libc and compiler builtin ffs routines, therefore
  23.344 - * differs in spirit from the above ffz (man ffs).
  23.345 - */
  23.346 -static __inline__ int ffs(int x)
  23.347 -{
  23.348 -	int r;
  23.349 -
  23.350 -	__asm__("bsfl %1,%0\n\t"
  23.351 -		"jnz 1f\n\t"
  23.352 -		"movl $-1,%0\n"
  23.353 -		"1:" : "=r" (r) : "rm" (x));
  23.354 -	return r+1;
  23.355 -}
  23.356 -
  23.357 -/**
  23.358 - * hweightN - returns the hamming weight of a N-bit word
  23.359 - * @x: the word to weigh
  23.360 - *
  23.361 - * The Hamming Weight of a number is the total number of bits set in it.
  23.362 - */
  23.363 -
  23.364 -#define hweight32(x) generic_hweight32(x)
  23.365 -#define hweight16(x) generic_hweight16(x)
  23.366 -#define hweight8(x) generic_hweight8(x)
  23.367 -
  23.368 -#endif /* __KERNEL__ */
  23.369 -
  23.370 -#ifdef __KERNEL__
  23.371 -
  23.372 -#define ext2_set_bit                 __test_and_set_bit
  23.373 -#define ext2_clear_bit               __test_and_clear_bit
  23.374 -#define ext2_test_bit                test_bit
  23.375 -#define ext2_find_first_zero_bit     find_first_zero_bit
  23.376 -#define ext2_find_next_zero_bit      find_next_zero_bit
  23.377 -
  23.378 -/* Bitmap functions for the minix filesystem.  */
  23.379 -#define minix_test_and_set_bit(nr,addr) __test_and_set_bit(nr,addr)
  23.380 -#define minix_set_bit(nr,addr) __set_bit(nr,addr)
  23.381 -#define minix_test_and_clear_bit(nr,addr) __test_and_clear_bit(nr,addr)
  23.382 -#define minix_test_bit(nr,addr) test_bit(nr,addr)
  23.383 -#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
  23.384 -
  23.385 -#endif /* __KERNEL__ */
  23.386 -
  23.387 -#endif /* _I386_BITOPS_H */
    24.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/boot.h	Tue Mar 11 14:37:27 2003 +0000
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,15 +0,0 @@
    24.4 -#ifndef _LINUX_BOOT_H
    24.5 -#define _LINUX_BOOT_H
    24.6 -
    24.7 -/* Don't touch these, unless you really know what you're doing. */
    24.8 -#define DEF_INITSEG	0x9000
    24.9 -#define DEF_SYSSEG	0x1000
   24.10 -#define DEF_SETUPSEG	0x9020
   24.11 -#define DEF_SYSSIZE	0x7F00
   24.12 -
   24.13 -/* Internal svga startup constants */
   24.14 -#define NORMAL_VGA	0xffff		/* 80x25 mode */
   24.15 -#define EXTENDED_VGA	0xfffe		/* 80x50 mode */
   24.16 -#define ASK_VGA		0xfffd		/* ask for it at bootup */
   24.17 -
   24.18 -#endif
    25.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/byteorder.h	Tue Mar 11 14:37:27 2003 +0000
    25.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.3 @@ -1,47 +0,0 @@
    25.4 -#ifndef _I386_BYTEORDER_H
    25.5 -#define _I386_BYTEORDER_H
    25.6 -
    25.7 -#include <asm/types.h>
    25.8 -
    25.9 -#ifdef __GNUC__
   25.10 -
   25.11 -/* For avoiding bswap on i386 */
   25.12 -#ifdef __KERNEL__
   25.13 -#include <linux/config.h>
   25.14 -#endif
   25.15 -
   25.16 -static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
   25.17 -{
   25.18 -#ifdef CONFIG_X86_BSWAP
   25.19 -	__asm__("bswap %0" : "=r" (x) : "0" (x));
   25.20 -#else
   25.21 -	__asm__("xchgb %b0,%h0\n\t"	/* swap lower bytes	*/
   25.22 -		"rorl $16,%0\n\t"	/* swap words		*/
   25.23 -		"xchgb %b0,%h0"		/* swap higher bytes	*/
   25.24 -		:"=q" (x)
   25.25 -		: "0" (x));
   25.26 -#endif
   25.27 -	return x;
   25.28 -}
   25.29 -
   25.30 -static __inline__ __const__ __u16 ___arch__swab16(__u16 x)
   25.31 -{
   25.32 -	__asm__("xchgb %b0,%h0"		/* swap bytes		*/ \
   25.33 -		: "=q" (x) \
   25.34 -		:  "0" (x)); \
   25.35 -		return x;
   25.36 -}
   25.37 -
   25.38 -#define __arch__swab32(x) ___arch__swab32(x)
   25.39 -#define __arch__swab16(x) ___arch__swab16(x)
   25.40 -
   25.41 -#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
   25.42 -#  define __BYTEORDER_HAS_U64__
   25.43 -#  define __SWAB_64_THRU_32__
   25.44 -#endif
   25.45 -
   25.46 -#endif /* __GNUC__ */
   25.47 -
   25.48 -#include <linux/byteorder/little_endian.h>
   25.49 -
   25.50 -#endif /* _I386_BYTEORDER_H */
    26.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cache.h	Tue Mar 11 14:37:27 2003 +0000
    26.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.3 @@ -1,13 +0,0 @@
    26.4 -/*
    26.5 - * include/asm-i386/cache.h
    26.6 - */
    26.7 -#ifndef __ARCH_I386_CACHE_H
    26.8 -#define __ARCH_I386_CACHE_H
    26.9 -
   26.10 -#include <linux/config.h>
   26.11 -
   26.12 -/* L1 cache line size */
   26.13 -#define L1_CACHE_SHIFT	(CONFIG_X86_L1_CACHE_SHIFT)
   26.14 -#define L1_CACHE_BYTES	(1 << L1_CACHE_SHIFT)
   26.15 -
   26.16 -#endif
    27.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/checksum.h	Tue Mar 11 14:37:27 2003 +0000
    27.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.3 @@ -1,195 +0,0 @@
    27.4 -#ifndef _I386_CHECKSUM_H
    27.5 -#define _I386_CHECKSUM_H
    27.6 -
    27.7 -
    27.8 -/*
    27.9 - * computes the checksum of a memory block at buff, length len,
   27.10 - * and adds in "sum" (32-bit)
   27.11 - *
   27.12 - * returns a 32-bit number suitable for feeding into itself
   27.13 - * or csum_tcpudp_magic
   27.14 - *
   27.15 - * this function must be called with even lengths, except
   27.16 - * for the last fragment, which may be odd
   27.17 - *
   27.18 - * it's best to have buff aligned on a 32-bit boundary
   27.19 - */
   27.20 -asmlinkage unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum);
   27.21 -
   27.22 -/*
   27.23 - * the same as csum_partial, but copies from src while it
   27.24 - * checksums, and handles user-space pointer exceptions correctly, when needed.
   27.25 - *
   27.26 - * here even more important to align src and dst on a 32-bit (or even
   27.27 - * better 64-bit) boundary
   27.28 - */
   27.29 -
   27.30 -asmlinkage unsigned int csum_partial_copy_generic( const char *src, char *dst, int len, int sum,
   27.31 -						   int *src_err_ptr, int *dst_err_ptr);
   27.32 -
   27.33 -/*
   27.34 - *	Note: when you get a NULL pointer exception here this means someone
   27.35 - *	passed in an incorrect kernel address to one of these functions.
   27.36 - *
   27.37 - *	If you use these functions directly please don't forget the
   27.38 - *	verify_area().
   27.39 - */
   27.40 -static __inline__
   27.41 -unsigned int csum_partial_copy_nocheck ( const char *src, char *dst,
   27.42 -					int len, int sum)
   27.43 -{
   27.44 -	return csum_partial_copy_generic ( src, dst, len, sum, NULL, NULL);
   27.45 -}
   27.46 -
   27.47 -static __inline__
   27.48 -unsigned int csum_partial_copy_from_user ( const char *src, char *dst,
   27.49 -						int len, int sum, int *err_ptr)
   27.50 -{
   27.51 -	return csum_partial_copy_generic ( src, dst, len, sum, err_ptr, NULL);
   27.52 -}
   27.53 -
   27.54 -/*
   27.55 - * These are the old (and unsafe) way of doing checksums, a warning message will be
   27.56 - * printed if they are used and an exeption occurs.
   27.57 - *
   27.58 - * these functions should go away after some time.
   27.59 - */
   27.60 -
   27.61 -#define csum_partial_copy_fromuser csum_partial_copy
   27.62 -unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum);
   27.63 -
   27.64 -/*
   27.65 - *	This is a version of ip_compute_csum() optimized for IP headers,
   27.66 - *	which always checksum on 4 octet boundaries.
   27.67 - *
   27.68 - *	By Jorge Cwik <jorge@laser.satlink.net>, adapted for linux by
   27.69 - *	Arnt Gulbrandsen.
   27.70 - */
   27.71 -static inline unsigned short ip_fast_csum(unsigned char * iph,
   27.72 -					  unsigned int ihl)
   27.73 -{
   27.74 -	unsigned int sum;
   27.75 -
   27.76 -	__asm__ __volatile__(
   27.77 -	    "movl (%1), %0	;\n"
   27.78 -	    "subl $4, %2	;\n"
   27.79 -	    "jbe 2f		;\n"
   27.80 -	    "addl 4(%1), %0	;\n"
   27.81 -	    "adcl 8(%1), %0	;\n"
   27.82 -	    "adcl 12(%1), %0	;\n"
   27.83 -"1:	    adcl 16(%1), %0	;\n"
   27.84 -	    "lea 4(%1), %1	;\n"
   27.85 -	    "decl %2		;\n"
   27.86 -	    "jne 1b		;\n"
   27.87 -	    "adcl $0, %0	;\n"
   27.88 -	    "movl %0, %2	;\n"
   27.89 -	    "shrl $16, %0	;\n"
   27.90 -	    "addw %w2, %w0	;\n"
   27.91 -	    "adcl $0, %0	;\n"
   27.92 -	    "notl %0		;\n"
   27.93 -"2:				;\n"
   27.94 -	/* Since the input registers which are loaded with iph and ipl
   27.95 -	   are modified, we must also specify them as outputs, or gcc
   27.96 -	   will assume they contain their original values. */
   27.97 -	: "=r" (sum), "=r" (iph), "=r" (ihl)
   27.98 -	: "1" (iph), "2" (ihl));
   27.99 -	return(sum);
  27.100 -}
  27.101 -
  27.102 -/*
  27.103 - *	Fold a partial checksum
  27.104 - */
  27.105 -
  27.106 -static inline unsigned int csum_fold(unsigned int sum)
  27.107 -{
  27.108 -	__asm__(
  27.109 -		"addl %1, %0		;\n"
  27.110 -		"adcl $0xffff, %0	;\n"
  27.111 -		: "=r" (sum)
  27.112 -		: "r" (sum << 16), "0" (sum & 0xffff0000)
  27.113 -	);
  27.114 -	return (~sum) >> 16;
  27.115 -}
  27.116 -
  27.117 -static inline unsigned long csum_tcpudp_nofold(unsigned long saddr,
  27.118 -						   unsigned long daddr,
  27.119 -						   unsigned short len,
  27.120 -						   unsigned short proto,
  27.121 -						   unsigned int sum)
  27.122 -{
  27.123 -    __asm__(
  27.124 -	"addl %1, %0	;\n"
  27.125 -	"adcl %2, %0	;\n"
  27.126 -	"adcl %3, %0	;\n"
  27.127 -	"adcl $0, %0	;\n"
  27.128 -	: "=r" (sum)
  27.129 -	: "g" (daddr), "g"(saddr), "g"((ntohs(len)<<16)+proto*256), "0"(sum));
  27.130 -    return sum;
  27.131 -}
  27.132 -
  27.133 -/*
  27.134 - * computes the checksum of the TCP/UDP pseudo-header
  27.135 - * returns a 16-bit checksum, already complemented
  27.136 - */
  27.137 -static inline unsigned short int csum_tcpudp_magic(unsigned long saddr,
  27.138 -						   unsigned long daddr,
  27.139 -						   unsigned short len,
  27.140 -						   unsigned short proto,
  27.141 -						   unsigned int sum)
  27.142 -{
  27.143 -	return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
  27.144 -}
  27.145 -
  27.146 -/*
  27.147 - * this routine is used for miscellaneous IP-like checksums, mainly
  27.148 - * in icmp.c
  27.149 - */
  27.150 -
  27.151 -static inline unsigned short ip_compute_csum(unsigned char * buff, int len)
  27.152 -{
  27.153 -    return csum_fold (csum_partial(buff, len, 0));
  27.154 -}
  27.155 -
  27.156 -#define _HAVE_ARCH_IPV6_CSUM
  27.157 -static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
  27.158 -						     struct in6_addr *daddr,
  27.159 -						     __u32 len,
  27.160 -						     unsigned short proto,
  27.161 -						     unsigned int sum)
  27.162 -{
  27.163 -	__asm__(
  27.164 -		"addl 0(%1), %0		;\n"
  27.165 -		"adcl 4(%1), %0		;\n"
  27.166 -		"adcl 8(%1), %0		;\n"
  27.167 -		"adcl 12(%1), %0	;\n"
  27.168 -		"adcl 0(%2), %0		;\n"
  27.169 -		"adcl 4(%2), %0		;\n"
  27.170 -		"adcl 8(%2), %0		;\n"
  27.171 -		"adcl 12(%2), %0	;\n"
  27.172 -		"adcl %3, %0		;\n"
  27.173 -		"adcl %4, %0		;\n"
  27.174 -		"adcl $0, %0		;\n"
  27.175 -		: "=&r" (sum)
  27.176 -		: "r" (saddr), "r" (daddr),
  27.177 -		  "r"(htonl(len)), "r"(htonl(proto)), "0"(sum));
  27.178 -
  27.179 -	return csum_fold(sum);
  27.180 -}
  27.181 -
  27.182 -/*
  27.183 - *	Copy and checksum to user
  27.184 - */
  27.185 -#define HAVE_CSUM_COPY_USER
  27.186 -static __inline__ unsigned int csum_and_copy_to_user(const char *src, char *dst,
  27.187 -				    int len, int sum, int *err_ptr)
  27.188 -{
  27.189 -	if (access_ok(VERIFY_WRITE, dst, len))
  27.190 -		return csum_partial_copy_generic(src, dst, len, sum, NULL, err_ptr);
  27.191 -
  27.192 -	if (len)
  27.193 -		*err_ptr = -EFAULT;
  27.194 -
  27.195 -	return -1; /* invalid checksum */
  27.196 -}
  27.197 -
  27.198 -#endif
    28.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cpufeature.h	Tue Mar 11 14:37:27 2003 +0000
    28.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.3 @@ -1,76 +0,0 @@
    28.4 -/*
    28.5 - * cpufeature.h
    28.6 - *
    28.7 - * Defines x86 CPU feature bits
    28.8 - */
    28.9 -
   28.10 -#ifndef __ASM_I386_CPUFEATURE_H
   28.11 -#define __ASM_I386_CPUFEATURE_H
   28.12 -
   28.13 -/* Sample usage: CPU_FEATURE_P(cpu.x86_capability, FPU) */
   28.14 -#define CPU_FEATURE_P(CAP, FEATURE) test_bit(CAP, X86_FEATURE_##FEATURE ##_BIT)
   28.15 -
   28.16 -#define NCAPINTS	4	/* Currently we have 4 32-bit words worth of info */
   28.17 -
   28.18 -/* Intel-defined CPU features, CPUID level 0x00000001, word 0 */
   28.19 -#define X86_FEATURE_FPU		(0*32+ 0) /* Onboard FPU */
   28.20 -#define X86_FEATURE_VME		(0*32+ 1) /* Virtual Mode Extensions */
   28.21 -#define X86_FEATURE_DE		(0*32+ 2) /* Debugging Extensions */
   28.22 -#define X86_FEATURE_PSE 	(0*32+ 3) /* Page Size Extensions */
   28.23 -#define X86_FEATURE_TSC		(0*32+ 4) /* Time Stamp Counter */
   28.24 -#define X86_FEATURE_MSR		(0*32+ 5) /* Model-Specific Registers, RDMSR, WRMSR */
   28.25 -#define X86_FEATURE_PAE		(0*32+ 6) /* Physical Address Extensions */
   28.26 -#define X86_FEATURE_MCE		(0*32+ 7) /* Machine Check Architecture */
   28.27 -#define X86_FEATURE_CX8		(0*32+ 8) /* CMPXCHG8 instruction */
   28.28 -#define X86_FEATURE_APIC	(0*32+ 9) /* Onboard APIC */
   28.29 -#define X86_FEATURE_SEP		(0*32+11) /* SYSENTER/SYSEXIT */
   28.30 -#define X86_FEATURE_MTRR	(0*32+12) /* Memory Type Range Registers */
   28.31 -#define X86_FEATURE_PGE		(0*32+13) /* Page Global Enable */
   28.32 -#define X86_FEATURE_MCA		(0*32+14) /* Machine Check Architecture */
   28.33 -#define X86_FEATURE_CMOV	(0*32+15) /* CMOV instruction (FCMOVCC and FCOMI too if FPU present) */
   28.34 -#define X86_FEATURE_PAT		(0*32+16) /* Page Attribute Table */
   28.35 -#define X86_FEATURE_PSE36	(0*32+17) /* 36-bit PSEs */
   28.36 -#define X86_FEATURE_PN		(0*32+18) /* Processor serial number */
   28.37 -#define X86_FEATURE_CLFLSH	(0*32+19) /* Supports the CLFLUSH instruction */
   28.38 -#define X86_FEATURE_DTES	(0*32+21) /* Debug Trace Store */
   28.39 -#define X86_FEATURE_ACPI	(0*32+22) /* ACPI via MSR */
   28.40 -#define X86_FEATURE_MMX		(0*32+23) /* Multimedia Extensions */
   28.41 -#define X86_FEATURE_FXSR	(0*32+24) /* FXSAVE and FXRSTOR instructions (fast save and restore */
   28.42 -				          /* of FPU context), and CR4.OSFXSR available */
   28.43 -#define X86_FEATURE_XMM		(0*32+25) /* Streaming SIMD Extensions */
   28.44 -#define X86_FEATURE_XMM2	(0*32+26) /* Streaming SIMD Extensions-2 */
   28.45 -#define X86_FEATURE_SELFSNOOP	(0*32+27) /* CPU self snoop */
   28.46 -#define X86_FEATURE_HT		(0*32+28) /* Hyper-Threading */
   28.47 -#define X86_FEATURE_ACC		(0*32+29) /* Automatic clock control */
   28.48 -#define X86_FEATURE_IA64	(0*32+30) /* IA-64 processor */
   28.49 -
   28.50 -/* AMD-defined CPU features, CPUID level 0x80000001, word 1 */
   28.51 -/* Don't duplicate feature flags which are redundant with Intel! */
   28.52 -#define X86_FEATURE_SYSCALL	(1*32+11) /* SYSCALL/SYSRET */
   28.53 -#define X86_FEATURE_MMXEXT	(1*32+22) /* AMD MMX extensions */
   28.54 -#define X86_FEATURE_LM		(1*32+29) /* Long Mode (x86-64) */
   28.55 -#define X86_FEATURE_3DNOWEXT	(1*32+30) /* AMD 3DNow! extensions */
   28.56 -#define X86_FEATURE_3DNOW	(1*32+31) /* 3DNow! */
   28.57 -
   28.58 -/* Transmeta-defined CPU features, CPUID level 0x80860001, word 2 */
   28.59 -#define X86_FEATURE_RECOVERY	(2*32+ 0) /* CPU in recovery mode */
   28.60 -#define X86_FEATURE_LONGRUN	(2*32+ 1) /* Longrun power control */
   28.61 -#define X86_FEATURE_LRTI	(2*32+ 3) /* LongRun table interface */
   28.62 -
   28.63 -/* Other features, Linux-defined mapping, word 3 */
   28.64 -/* This range is used for feature bits which conflict or are synthesized */
   28.65 -#define X86_FEATURE_CXMMX	(3*32+ 0) /* Cyrix MMX extensions */
   28.66 -#define X86_FEATURE_K6_MTRR	(3*32+ 1) /* AMD K6 nonstandard MTRRs */
   28.67 -#define X86_FEATURE_CYRIX_ARR	(3*32+ 2) /* Cyrix ARRs (= MTRRs) */
   28.68 -#define X86_FEATURE_CENTAUR_MCR	(3*32+ 3) /* Centaur MCRs (= MTRRs) */
   28.69 -
   28.70 -#define cpu_has(c, bit)            test_bit(bit, (c)->x86_capability)
   28.71 -
   28.72 -#endif /* __ASM_I386_CPUFEATURE_H */
   28.73 -
   28.74 -/* 
   28.75 - * Local Variables:
   28.76 - * mode:c
   28.77 - * comment-column:42
   28.78 - * End:
   28.79 - */
    29.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/current.h	Tue Mar 11 14:37:27 2003 +0000
    29.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.3 @@ -1,15 +0,0 @@
    29.4 -#ifndef _I386_CURRENT_H
    29.5 -#define _I386_CURRENT_H
    29.6 -
    29.7 -struct task_struct;
    29.8 -
    29.9 -static inline struct task_struct * get_current(void)
   29.10 -{
   29.11 -	struct task_struct *current;
   29.12 -	__asm__("andl %%esp,%0; ":"=r" (current) : "0" (~8191UL));
   29.13 -	return current;
   29.14 - }
   29.15 - 
   29.16 -#define current get_current()
   29.17 -
   29.18 -#endif /* !(_I386_CURRENT_H) */
    30.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/debugreg.h	Tue Mar 11 14:37:27 2003 +0000
    30.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.3 @@ -1,64 +0,0 @@
    30.4 -#ifndef _I386_DEBUGREG_H
    30.5 -#define _I386_DEBUGREG_H
    30.6 -
    30.7 -
    30.8 -/* Indicate the register numbers for a number of the specific
    30.9 -   debug registers.  Registers 0-3 contain the addresses we wish to trap on */
   30.10 -#define DR_FIRSTADDR 0        /* u_debugreg[DR_FIRSTADDR] */
   30.11 -#define DR_LASTADDR 3         /* u_debugreg[DR_LASTADDR]  */
   30.12 -
   30.13 -#define DR_STATUS 6           /* u_debugreg[DR_STATUS]     */
   30.14 -#define DR_CONTROL 7          /* u_debugreg[DR_CONTROL] */
   30.15 -
   30.16 -/* Define a few things for the status register.  We can use this to determine
   30.17 -   which debugging register was responsible for the trap.  The other bits
   30.18 -   are either reserved or not of interest to us. */
   30.19 -
   30.20 -#define DR_TRAP0	(0x1)		/* db0 */
   30.21 -#define DR_TRAP1	(0x2)		/* db1 */
   30.22 -#define DR_TRAP2	(0x4)		/* db2 */
   30.23 -#define DR_TRAP3	(0x8)		/* db3 */
   30.24 -
   30.25 -#define DR_STEP		(0x4000)	/* single-step */
   30.26 -#define DR_SWITCH	(0x8000)	/* task switch */
   30.27 -
   30.28 -/* Now define a bunch of things for manipulating the control register.
   30.29 -   The top two bytes of the control register consist of 4 fields of 4
   30.30 -   bits - each field corresponds to one of the four debug registers,
   30.31 -   and indicates what types of access we trap on, and how large the data
   30.32 -   field is that we are looking at */
   30.33 -
   30.34 -#define DR_CONTROL_SHIFT 16 /* Skip this many bits in ctl register */
   30.35 -#define DR_CONTROL_SIZE 4   /* 4 control bits per register */
   30.36 -
   30.37 -#define DR_RW_EXECUTE (0x0)   /* Settings for the access types to trap on */
   30.38 -#define DR_RW_WRITE (0x1)
   30.39 -#define DR_RW_READ (0x3)
   30.40 -
   30.41 -#define DR_LEN_1 (0x0) /* Settings for data length to trap on */
   30.42 -#define DR_LEN_2 (0x4)
   30.43 -#define DR_LEN_4 (0xC)
   30.44 -
   30.45 -/* The low byte to the control register determine which registers are
   30.46 -   enabled.  There are 4 fields of two bits.  One bit is "local", meaning
   30.47 -   that the processor will reset the bit after a task switch and the other
   30.48 -   is global meaning that we have to explicitly reset the bit.  With linux,
   30.49 -   you can use either one, since we explicitly zero the register when we enter
   30.50 -   kernel mode. */
   30.51 -
   30.52 -#define DR_LOCAL_ENABLE_SHIFT 0    /* Extra shift to the local enable bit */
   30.53 -#define DR_GLOBAL_ENABLE_SHIFT 1   /* Extra shift to the global enable bit */
   30.54 -#define DR_ENABLE_SIZE 2           /* 2 enable bits per register */
   30.55 -
   30.56 -#define DR_LOCAL_ENABLE_MASK (0x55)  /* Set  local bits for all 4 regs */
   30.57 -#define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */
   30.58 -
   30.59 -/* The second byte to the control register has a few special things.
   30.60 -   We can slow the instruction pipeline for instructions coming via the
   30.61 -   gdt or the ldt if we want to.  I am not sure why this is an advantage */
   30.62 -
   30.63 -#define DR_CONTROL_RESERVED (0xFC00) /* Reserved by Intel */
   30.64 -#define DR_LOCAL_SLOWDOWN (0x100)   /* Local slow the pipeline */
   30.65 -#define DR_GLOBAL_SLOWDOWN (0x200)  /* Global slow the pipeline */
   30.66 -
   30.67 -#endif
    31.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/delay.h	Tue Mar 11 14:37:27 2003 +0000
    31.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.3 @@ -1,20 +0,0 @@
    31.4 -#ifndef _I386_DELAY_H
    31.5 -#define _I386_DELAY_H
    31.6 -
    31.7 -/*
    31.8 - * Copyright (C) 1993 Linus Torvalds
    31.9 - *
   31.10 - * Delay routines calling functions in arch/i386/lib/delay.c
   31.11 - */
   31.12 - 
   31.13 -extern void __bad_udelay(void);
   31.14 -
   31.15 -extern void __udelay(unsigned long usecs);
   31.16 -extern void __const_udelay(unsigned long usecs);
   31.17 -extern void __delay(unsigned long loops);
   31.18 -
   31.19 -#define udelay(n) (__builtin_constant_p(n) ? \
   31.20 -	((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \
   31.21 -	__udelay(n))
   31.22 -
   31.23 -#endif /* defined(_I386_DELAY_H) */
    32.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h	Tue Mar 11 14:37:27 2003 +0000
    32.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.3 @@ -1,17 +0,0 @@
    32.4 -#ifndef __I386_DIV64
    32.5 -#define __I386_DIV64
    32.6 -
    32.7 -#define do_div(n,base) ({ \
    32.8 -	unsigned long __upper, __low, __high, __mod; \
    32.9 -	asm("":"=a" (__low), "=d" (__high):"A" (n)); \
   32.10 -	__upper = __high; \
   32.11 -	if (__high) { \
   32.12 -		__upper = __high % (base); \
   32.13 -		__high = __high / (base); \
   32.14 -	} \
   32.15 -	asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (base), "0" (__low), "1" (__upper)); \
   32.16 -	asm("":"=A" (n):"a" (__low),"d" (__high)); \
   32.17 -	__mod; \
   32.18 -})
   32.19 -
   32.20 -#endif
    33.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/dma.h	Tue Mar 11 14:37:27 2003 +0000
    33.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.3 @@ -1,298 +0,0 @@
    33.4 -/* $Id: dma.h,v 1.7 1992/12/14 00:29:34 root Exp root $
    33.5 - * linux/include/asm/dma.h: Defines for using and allocating dma channels.
    33.6 - * Written by Hennus Bergman, 1992.
    33.7 - * High DMA channel support & info by Hannu Savolainen
    33.8 - * and John Boyd, Nov. 1992.
    33.9 - */
   33.10 -
   33.11 -#ifndef _ASM_DMA_H
   33.12 -#define _ASM_DMA_H
   33.13 -
   33.14 -#include <linux/config.h>
   33.15 -#include <linux/spinlock.h>	/* And spinlocks */
   33.16 -#include <asm/io.h>		/* need byte IO */
   33.17 -#include <linux/delay.h>
   33.18 -
   33.19 -
   33.20 -#ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER
   33.21 -#define dma_outb	outb_p
   33.22 -#else
   33.23 -#define dma_outb	outb
   33.24 -#endif
   33.25 -
   33.26 -#define dma_inb		inb
   33.27 -
   33.28 -/*
   33.29 - * NOTES about DMA transfers:
   33.30 - *
   33.31 - *  controller 1: channels 0-3, byte operations, ports 00-1F
   33.32 - *  controller 2: channels 4-7, word operations, ports C0-DF
   33.33 - *
   33.34 - *  - ALL registers are 8 bits only, regardless of transfer size
   33.35 - *  - channel 4 is not used - cascades 1 into 2.
   33.36 - *  - channels 0-3 are byte - addresses/counts are for physical bytes
   33.37 - *  - channels 5-7 are word - addresses/counts are for physical words
   33.38 - *  - transfers must not cross physical 64K (0-3) or 128K (5-7) boundaries
   33.39 - *  - transfer count loaded to registers is 1 less than actual count
   33.40 - *  - controller 2 offsets are all even (2x offsets for controller 1)
   33.41 - *  - page registers for 5-7 don't use data bit 0, represent 128K pages
   33.42 - *  - page registers for 0-3 use bit 0, represent 64K pages
   33.43 - *
   33.44 - * DMA transfers are limited to the lower 16MB of _physical_ memory.  
   33.45 - * Note that addresses loaded into registers must be _physical_ addresses,
   33.46 - * not logical addresses (which may differ if paging is active).
   33.47 - *
   33.48 - *  Address mapping for channels 0-3:
   33.49 - *
   33.50 - *   A23 ... A16 A15 ... A8  A7 ... A0    (Physical addresses)
   33.51 - *    |  ...  |   |  ... |   |  ... |
   33.52 - *    |  ...  |   |  ... |   |  ... |
   33.53 - *    |  ...  |   |  ... |   |  ... |
   33.54 - *   P7  ...  P0  A7 ... A0  A7 ... A0   
   33.55 - * |    Page    | Addr MSB | Addr LSB |   (DMA registers)
   33.56 - *
   33.57 - *  Address mapping for channels 5-7:
   33.58 - *
   33.59 - *   A23 ... A17 A16 A15 ... A9 A8 A7 ... A1 A0    (Physical addresses)
   33.60 - *    |  ...  |   \   \   ... \  \  \  ... \  \
   33.61 - *    |  ...  |    \   \   ... \  \  \  ... \  (not used)
   33.62 - *    |  ...  |     \   \   ... \  \  \  ... \
   33.63 - *   P7  ...  P1 (0) A7 A6  ... A0 A7 A6 ... A0   
   33.64 - * |      Page      |  Addr MSB   |  Addr LSB  |   (DMA registers)
   33.65 - *
   33.66 - * Again, channels 5-7 transfer _physical_ words (16 bits), so addresses
   33.67 - * and counts _must_ be word-aligned (the lowest address bit is _ignored_ at
   33.68 - * the hardware level, so odd-byte transfers aren't possible).
   33.69 - *
   33.70 - * Transfer count (_not # bytes_) is limited to 64K, represented as actual
   33.71 - * count - 1 : 64K => 0xFFFF, 1 => 0x0000.  Thus, count is always 1 or more,
   33.72 - * and up to 128K bytes may be transferred on channels 5-7 in one operation. 
   33.73 - *
   33.74 - */
   33.75 -
   33.76 -#define MAX_DMA_CHANNELS	8
   33.77 -
   33.78 -/* The maximum address that we can perform a DMA transfer to on this platform */
   33.79 -#define MAX_DMA_ADDRESS      (PAGE_OFFSET+0x1000000)
   33.80 -
   33.81 -/* 8237 DMA controllers */
   33.82 -#define IO_DMA1_BASE	0x00	/* 8 bit slave DMA, channels 0..3 */
   33.83 -#define IO_DMA2_BASE	0xC0	/* 16 bit master DMA, ch 4(=slave input)..7 */
   33.84 -
   33.85 -/* DMA controller registers */
   33.86 -#define DMA1_CMD_REG		0x08	/* command register (w) */
   33.87 -#define DMA1_STAT_REG		0x08	/* status register (r) */
   33.88 -#define DMA1_REQ_REG            0x09    /* request register (w) */
   33.89 -#define DMA1_MASK_REG		0x0A	/* single-channel mask (w) */
   33.90 -#define DMA1_MODE_REG		0x0B	/* mode register (w) */
   33.91 -#define DMA1_CLEAR_FF_REG	0x0C	/* clear pointer flip-flop (w) */
   33.92 -#define DMA1_TEMP_REG           0x0D    /* Temporary Register (r) */
   33.93 -#define DMA1_RESET_REG		0x0D	/* Master Clear (w) */
   33.94 -#define DMA1_CLR_MASK_REG       0x0E    /* Clear Mask */
   33.95 -#define DMA1_MASK_ALL_REG       0x0F    /* all-channels mask (w) */
   33.96 -
   33.97 -#define DMA2_CMD_REG		0xD0	/* command register (w) */
   33.98 -#define DMA2_STAT_REG		0xD0	/* status register (r) */
   33.99 -#define DMA2_REQ_REG            0xD2    /* request register (w) */
  33.100 -#define DMA2_MASK_REG		0xD4	/* single-channel mask (w) */
  33.101 -#define DMA2_MODE_REG		0xD6	/* mode register (w) */
  33.102 -#define DMA2_CLEAR_FF_REG	0xD8	/* clear pointer flip-flop (w) */
  33.103 -#define DMA2_TEMP_REG           0xDA    /* Temporary Register (r) */
  33.104 -#define DMA2_RESET_REG		0xDA	/* Master Clear (w) */
  33.105 -#define DMA2_CLR_MASK_REG       0xDC    /* Clear Mask */
  33.106 -#define DMA2_MASK_ALL_REG       0xDE    /* all-channels mask (w) */
  33.107 -
  33.108 -#define DMA_ADDR_0              0x00    /* DMA address registers */
  33.109 -#define DMA_ADDR_1              0x02
  33.110 -#define DMA_ADDR_2              0x04
  33.111 -#define DMA_ADDR_3              0x06
  33.112 -#define DMA_ADDR_4              0xC0
  33.113 -#define DMA_ADDR_5              0xC4
  33.114 -#define DMA_ADDR_6              0xC8
  33.115 -#define DMA_ADDR_7              0xCC
  33.116 -
  33.117 -#define DMA_CNT_0               0x01    /* DMA count registers */
  33.118 -#define DMA_CNT_1               0x03
  33.119 -#define DMA_CNT_2               0x05
  33.120 -#define DMA_CNT_3               0x07
  33.121 -#define DMA_CNT_4               0xC2
  33.122 -#define DMA_CNT_5               0xC6
  33.123 -#define DMA_CNT_6               0xCA
  33.124 -#define DMA_CNT_7               0xCE
  33.125 -
  33.126 -#define DMA_PAGE_0              0x87    /* DMA page registers */
  33.127 -#define DMA_PAGE_1              0x83
  33.128 -#define DMA_PAGE_2              0x81
  33.129 -#define DMA_PAGE_3              0x82
  33.130 -#define DMA_PAGE_5              0x8B
  33.131 -#define DMA_PAGE_6              0x89
  33.132 -#define DMA_PAGE_7              0x8A
  33.133 -
  33.134 -#define DMA_MODE_READ	0x44	/* I/O to memory, no autoinit, increment, single mode */
  33.135 -#define DMA_MODE_WRITE	0x48	/* memory to I/O, no autoinit, increment, single mode */
  33.136 -#define DMA_MODE_CASCADE 0xC0   /* pass thru DREQ->HRQ, DACK<-HLDA only */
  33.137 -
  33.138 -#define DMA_AUTOINIT	0x10
  33.139 -
  33.140 -
  33.141 -extern spinlock_t  dma_spin_lock;
  33.142 -
  33.143 -static __inline__ unsigned long claim_dma_lock(void)
  33.144 -{
  33.145 -	unsigned long flags;
  33.146 -	spin_lock_irqsave(&dma_spin_lock, flags);
  33.147 -	return flags;
  33.148 -}
  33.149 -
  33.150 -static __inline__ void release_dma_lock(unsigned long flags)
  33.151 -{
  33.152 -	spin_unlock_irqrestore(&dma_spin_lock, flags);
  33.153 -}
  33.154 -
  33.155 -/* enable/disable a specific DMA channel */
  33.156 -static __inline__ void enable_dma(unsigned int dmanr)
  33.157 -{
  33.158 -	if (dmanr<=3)
  33.159 -		dma_outb(dmanr,  DMA1_MASK_REG);
  33.160 -	else
  33.161 -		dma_outb(dmanr & 3,  DMA2_MASK_REG);
  33.162 -}
  33.163 -
  33.164 -static __inline__ void disable_dma(unsigned int dmanr)
  33.165 -{
  33.166 -	if (dmanr<=3)
  33.167 -		dma_outb(dmanr | 4,  DMA1_MASK_REG);
  33.168 -	else
  33.169 -		dma_outb((dmanr & 3) | 4,  DMA2_MASK_REG);
  33.170 -}
  33.171 -
  33.172 -/* Clear the 'DMA Pointer Flip Flop'.
  33.173 - * Write 0 for LSB/MSB, 1 for MSB/LSB access.
  33.174 - * Use this once to initialize the FF to a known state.
  33.175 - * After that, keep track of it. :-)
  33.176 - * --- In order to do that, the DMA routines below should ---
  33.177 - * --- only be used while holding the DMA lock ! ---
  33.178 - */
  33.179 -static __inline__ void clear_dma_ff(unsigned int dmanr)
  33.180 -{
  33.181 -	if (dmanr<=3)
  33.182 -		dma_outb(0,  DMA1_CLEAR_FF_REG);
  33.183 -	else
  33.184 -		dma_outb(0,  DMA2_CLEAR_FF_REG);
  33.185 -}
  33.186 -
  33.187 -/* set mode (above) for a specific DMA channel */
  33.188 -static __inline__ void set_dma_mode(unsigned int dmanr, char mode)
  33.189 -{
  33.190 -	if (dmanr<=3)
  33.191 -		dma_outb(mode | dmanr,  DMA1_MODE_REG);
  33.192 -	else
  33.193 -		dma_outb(mode | (dmanr&3),  DMA2_MODE_REG);
  33.194 -}
  33.195 -
  33.196 -/* Set only the page register bits of the transfer address.
  33.197 - * This is used for successive transfers when we know the contents of
  33.198 - * the lower 16 bits of the DMA current address register, but a 64k boundary
  33.199 - * may have been crossed.
  33.200 - */
  33.201 -static __inline__ void set_dma_page(unsigned int dmanr, char pagenr)
  33.202 -{
  33.203 -	switch(dmanr) {
  33.204 -		case 0:
  33.205 -			dma_outb(pagenr, DMA_PAGE_0);
  33.206 -			break;
  33.207 -		case 1:
  33.208 -			dma_outb(pagenr, DMA_PAGE_1);
  33.209 -			break;
  33.210 -		case 2:
  33.211 -			dma_outb(pagenr, DMA_PAGE_2);
  33.212 -			break;
  33.213 -		case 3:
  33.214 -			dma_outb(pagenr, DMA_PAGE_3);
  33.215 -			break;
  33.216 -		case 5:
  33.217 -			dma_outb(pagenr & 0xfe, DMA_PAGE_5);
  33.218 -			break;
  33.219 -		case 6:
  33.220 -			dma_outb(pagenr & 0xfe, DMA_PAGE_6);
  33.221 -			break;
  33.222 -		case 7:
  33.223 -			dma_outb(pagenr & 0xfe, DMA_PAGE_7);
  33.224 -			break;
  33.225 -	}
  33.226 -}
  33.227 -
  33.228 -
  33.229 -/* Set transfer address & page bits for specific DMA channel.
  33.230 - * Assumes dma flipflop is clear.
  33.231 - */
  33.232 -static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a)
  33.233 -{
  33.234 -	set_dma_page(dmanr, a>>16);
  33.235 -	if (dmanr <= 3)  {
  33.236 -	    dma_outb( a & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE );
  33.237 -            dma_outb( (a>>8) & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE );
  33.238 -	}  else  {
  33.239 -	    dma_outb( (a>>1) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE );
  33.240 -	    dma_outb( (a>>9) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE );
  33.241 -	}
  33.242 -}
  33.243 -
  33.244 -
  33.245 -/* Set transfer size (max 64k for DMA1..3, 128k for DMA5..7) for
  33.246 - * a specific DMA channel.
  33.247 - * You must ensure the parameters are valid.
  33.248 - * NOTE: from a manual: "the number of transfers is one more
  33.249 - * than the initial word count"! This is taken into account.
  33.250 - * Assumes dma flip-flop is clear.
  33.251 - * NOTE 2: "count" represents _bytes_ and must be even for channels 5-7.
  33.252 - */
  33.253 -static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count)
  33.254 -{
  33.255 -        count--;
  33.256 -	if (dmanr <= 3)  {
  33.257 -	    dma_outb( count & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE );
  33.258 -	    dma_outb( (count>>8) & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE );
  33.259 -        } else {
  33.260 -	    dma_outb( (count>>1) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE );
  33.261 -	    dma_outb( (count>>9) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE );
  33.262 -        }
  33.263 -}
  33.264 -
  33.265 -
  33.266 -/* Get DMA residue count. After a DMA transfer, this
  33.267 - * should return zero. Reading this while a DMA transfer is
  33.268 - * still in progress will return unpredictable results.
  33.269 - * If called before the channel has been used, it may return 1.
  33.270 - * Otherwise, it returns the number of _bytes_ left to transfer.
  33.271 - *
  33.272 - * Assumes DMA flip-flop is clear.
  33.273 - */
  33.274 -static __inline__ int get_dma_residue(unsigned int dmanr)
  33.275 -{
  33.276 -	unsigned int io_port = (dmanr<=3)? ((dmanr&3)<<1) + 1 + IO_DMA1_BASE
  33.277 -					 : ((dmanr&3)<<2) + 2 + IO_DMA2_BASE;
  33.278 -
  33.279 -	/* using short to get 16-bit wrap around */
  33.280 -	unsigned short count;
  33.281 -
  33.282 -	count = 1 + dma_inb(io_port);
  33.283 -	count += dma_inb(io_port) << 8;
  33.284 -	
  33.285 -	return (dmanr<=3)? count : (count<<1);
  33.286 -}
  33.287 -
  33.288 -
  33.289 -/* These are in kernel/dma.c: */
  33.290 -extern int request_dma(unsigned int dmanr, const char * device_id);	/* reserve a DMA channel */
  33.291 -extern void free_dma(unsigned int dmanr);	/* release it again */
  33.292 -
  33.293 -/* From PCI */
  33.294 -
  33.295 -#ifdef CONFIG_PCI
  33.296 -extern int isa_dma_bridge_buggy;
  33.297 -#else
  33.298 -#define isa_dma_bridge_buggy 	(0)
  33.299 -#endif
  33.300 -
  33.301 -#endif /* _ASM_DMA_H */
    34.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/elf.h	Tue Mar 11 14:37:27 2003 +0000
    34.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.3 @@ -1,104 +0,0 @@
    34.4 -#ifndef __ASMi386_ELF_H
    34.5 -#define __ASMi386_ELF_H
    34.6 -
    34.7 -/*
    34.8 - * ELF register definitions..
    34.9 - */
   34.10 -
   34.11 -#include <asm/ptrace.h>
   34.12 -#include <asm/user.h>
   34.13 -
   34.14 -#include <linux/utsname.h>
   34.15 -
   34.16 -typedef unsigned long elf_greg_t;
   34.17 -
   34.18 -#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
   34.19 -typedef elf_greg_t elf_gregset_t[ELF_NGREG];
   34.20 -
   34.21 -typedef struct user_i387_struct elf_fpregset_t;
   34.22 -typedef struct user_fxsr_struct elf_fpxregset_t;
   34.23 -
   34.24 -/*
   34.25 - * This is used to ensure we don't load something for the wrong architecture.
   34.26 - */
   34.27 -#define elf_check_arch(x) \
   34.28 -	(((x)->e_machine == EM_386) || ((x)->e_machine == EM_486))
   34.29 -
   34.30 -/*
   34.31 - * These are used to set parameters in the core dumps.
   34.32 - */
   34.33 -#define ELF_CLASS	ELFCLASS32
   34.34 -#define ELF_DATA	ELFDATA2LSB
   34.35 -#define ELF_ARCH	EM_386
   34.36 -
   34.37 -/* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx
   34.38 -   contains a pointer to a function which might be registered using `atexit'.
   34.39 -   This provides a mean for the dynamic linker to call DT_FINI functions for
   34.40 -   shared libraries that have been loaded before the code runs.
   34.41 -
   34.42 -   A value of 0 tells we have no such handler. 
   34.43 -
   34.44 -   We might as well make sure everything else is cleared too (except for %esp),
   34.45 -   just to make things more deterministic.
   34.46 - */
   34.47 -#define ELF_PLAT_INIT(_r)	do { \
   34.48 -	_r->ebx = 0; _r->ecx = 0; _r->edx = 0; \
   34.49 -	_r->esi = 0; _r->edi = 0; _r->ebp = 0; \
   34.50 -	_r->eax = 0; \
   34.51 -} while (0)
   34.52 -
   34.53 -#define USE_ELF_CORE_DUMP
   34.54 -#define ELF_EXEC_PAGESIZE	4096
   34.55 -
   34.56 -/* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
   34.57 -   use of this is to invoke "./ld.so someprog" to test out a new version of
   34.58 -   the loader.  We need to make sure that it is out of the way of the program
   34.59 -   that it will "exec", and that there is sufficient room for the brk.  */
   34.60 -
   34.61 -#define ELF_ET_DYN_BASE         (TASK_SIZE / 3 * 2)
   34.62 -
   34.63 -/* Wow, the "main" arch needs arch dependent functions too.. :) */
   34.64 -
   34.65 -/* regs is struct pt_regs, pr_reg is elf_gregset_t (which is
   34.66 -   now struct_user_regs, they are different) */
   34.67 -
   34.68 -#define ELF_CORE_COPY_REGS(pr_reg, regs)		\
   34.69 -	pr_reg[0] = regs->ebx;				\
   34.70 -	pr_reg[1] = regs->ecx;				\
   34.71 -	pr_reg[2] = regs->edx;				\
   34.72 -	pr_reg[3] = regs->esi;				\
   34.73 -	pr_reg[4] = regs->edi;				\
   34.74 -	pr_reg[5] = regs->ebp;				\
   34.75 -	pr_reg[6] = regs->eax;				\
   34.76 -	pr_reg[7] = regs->xds;				\
   34.77 -	pr_reg[8] = regs->xes;				\
   34.78 -	/* fake once used fs and gs selectors? */	\
   34.79 -	pr_reg[9] = regs->xds;	/* was fs and __fs */	\
   34.80 -	pr_reg[10] = regs->xds;	/* was gs and __gs */	\
   34.81 -	pr_reg[11] = regs->orig_eax;			\
   34.82 -	pr_reg[12] = regs->eip;				\
   34.83 -	pr_reg[13] = regs->xcs;				\
   34.84 -	pr_reg[14] = regs->eflags;			\
   34.85 -	pr_reg[15] = regs->esp;				\
   34.86 -	pr_reg[16] = regs->xss;
   34.87 -
   34.88 -/* This yields a mask that user programs can use to figure out what
   34.89 -   instruction set this CPU supports.  This could be done in user space,
   34.90 -   but it's not easy, and we've already done it here.  */
   34.91 -
   34.92 -#define ELF_HWCAP	(boot_cpu_data.x86_capability[0])
   34.93 -
   34.94 -/* This yields a string that ld.so will use to load implementation
   34.95 -   specific libraries for optimization.  This is more specific in
   34.96 -   intent than poking at uname or /proc/cpuinfo.
   34.97 -
   34.98 -   For the moment, we have only optimizations for the Intel generations,
   34.99 -   but that could change... */
  34.100 -
  34.101 -#define ELF_PLATFORM  (system_utsname.machine)
  34.102 -
  34.103 -#ifdef __KERNEL__
  34.104 -#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
  34.105 -#endif
  34.106 -
  34.107 -#endif
    35.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/errno.h	Tue Mar 11 14:37:27 2003 +0000
    35.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.3 @@ -1,132 +0,0 @@
    35.4 -#ifndef _I386_ERRNO_H
    35.5 -#define _I386_ERRNO_H
    35.6 -
    35.7 -#define	EPERM		 1	/* Operation not permitted */
    35.8 -#define	ENOENT		 2	/* No such file or directory */
    35.9 -#define	ESRCH		 3	/* No such process */
   35.10 -#define	EINTR		 4	/* Interrupted system call */
   35.11 -#define	EIO		 5	/* I/O error */
   35.12 -#define	ENXIO		 6	/* No such device or address */
   35.13 -#define	E2BIG		 7	/* Argument list too long */
   35.14 -#define	ENOEXEC		 8	/* Exec format error */
   35.15 -#define	EBADF		 9	/* Bad file number */
   35.16 -#define	ECHILD		10	/* No child processes */
   35.17 -#define	EAGAIN		11	/* Try again */
   35.18 -#define	ENOMEM		12	/* Out of memory */
   35.19 -#define	EACCES		13	/* Permission denied */
   35.20 -#define	EFAULT		14	/* Bad address */
   35.21 -#define	ENOTBLK		15	/* Block device required */
   35.22 -#define	EBUSY		16	/* Device or resource busy */
   35.23 -#define	EEXIST		17	/* File exists */
   35.24 -#define	EXDEV		18	/* Cross-device link */
   35.25 -#define	ENODEV		19	/* No such device */
   35.26 -#define	ENOTDIR		20	/* Not a directory */
   35.27 -#define	EISDIR		21	/* Is a directory */
   35.28 -#define	EINVAL		22	/* Invalid argument */
   35.29 -#define	ENFILE		23	/* File table overflow */
   35.30 -#define	EMFILE		24	/* Too many open files */
   35.31 -#define	ENOTTY		25	/* Not a typewriter */
   35.32 -#define	ETXTBSY		26	/* Text file busy */
   35.33 -#define	EFBIG		27	/* File too large */
   35.34 -#define	ENOSPC		28	/* No space left on device */
   35.35 -#define	ESPIPE		29	/* Illegal seek */
   35.36 -#define	EROFS		30	/* Read-only file system */
   35.37 -#define	EMLINK		31	/* Too many links */
   35.38 -#define	EPIPE		32	/* Broken pipe */
   35.39 -#define	EDOM		33	/* Math argument out of domain of func */
   35.40 -#define	ERANGE		34	/* Math result not representable */
   35.41 -#define	EDEADLK		35	/* Resource deadlock would occur */
   35.42 -#define	ENAMETOOLONG	36	/* File name too long */
   35.43 -#define	ENOLCK		37	/* No record locks available */
   35.44 -#define	ENOSYS		38	/* Function not implemented */
   35.45 -#define	ENOTEMPTY	39	/* Directory not empty */
   35.46 -#define	ELOOP		40	/* Too many symbolic links encountered */
   35.47 -#define	EWOULDBLOCK	EAGAIN	/* Operation would block */
   35.48 -#define	ENOMSG		42	/* No message of desired type */
   35.49 -#define	EIDRM		43	/* Identifier removed */
   35.50 -#define	ECHRNG		44	/* Channel number out of range */
   35.51 -#define	EL2NSYNC	45	/* Level 2 not synchronized */
   35.52 -#define	EL3HLT		46	/* Level 3 halted */
   35.53 -#define	EL3RST		47	/* Level 3 reset */
   35.54 -#define	ELNRNG		48	/* Link number out of range */
   35.55 -#define	EUNATCH		49	/* Protocol driver not attached */
   35.56 -#define	ENOCSI		50	/* No CSI structure available */
   35.57 -#define	EL2HLT		51	/* Level 2 halted */
   35.58 -#define	EBADE		52	/* Invalid exchange */
   35.59 -#define	EBADR		53	/* Invalid request descriptor */
   35.60 -#define	EXFULL		54	/* Exchange full */
   35.61 -#define	ENOANO		55	/* No anode */
   35.62 -#define	EBADRQC		56	/* Invalid request code */
   35.63 -#define	EBADSLT		57	/* Invalid slot */
   35.64 -
   35.65 -#define	EDEADLOCK	EDEADLK
   35.66 -
   35.67 -#define	EBFONT		59	/* Bad font file format */
   35.68 -#define	ENOSTR		60	/* Device not a stream */
   35.69 -#define	ENODATA		61	/* No data available */
   35.70 -#define	ETIME		62	/* Timer expired */
   35.71 -#define	ENOSR		63	/* Out of streams resources */
   35.72 -#define	ENONET		64	/* Machine is not on the network */
   35.73 -#define	ENOPKG		65	/* Package not installed */
   35.74 -#define	EREMOTE		66	/* Object is remote */
   35.75 -#define	ENOLINK		67	/* Link has been severed */
   35.76 -#define	EADV		68	/* Advertise error */
   35.77 -#define	ESRMNT		69	/* Srmount error */
   35.78 -#define	ECOMM		70	/* Communication error on send */
   35.79 -#define	EPROTO		71	/* Protocol error */
   35.80 -#define	EMULTIHOP	72	/* Multihop attempted */
   35.81 -#define	EDOTDOT		73	/* RFS specific error */
   35.82 -#define	EBADMSG		74	/* Not a data message */
   35.83 -#define	EOVERFLOW	75	/* Value too large for defined data type */
   35.84 -#define	ENOTUNIQ	76	/* Name not unique on network */
   35.85 -#define	EBADFD		77	/* File descriptor in bad state */
   35.86 -#define	EREMCHG		78	/* Remote address changed */
   35.87 -#define	ELIBACC		79	/* Can not access a needed shared library */
   35.88 -#define	ELIBBAD		80	/* Accessing a corrupted shared library */
   35.89 -#define	ELIBSCN		81	/* .lib section in a.out corrupted */
   35.90 -#define	ELIBMAX		82	/* Attempting to link in too many shared libraries */
   35.91 -#define	ELIBEXEC	83	/* Cannot exec a shared library directly */
   35.92 -#define	EILSEQ		84	/* Illegal byte sequence */
   35.93 -#define	ERESTART	85	/* Interrupted system call should be restarted */
   35.94 -#define	ESTRPIPE	86	/* Streams pipe error */
   35.95 -#define	EUSERS		87	/* Too many users */
   35.96 -#define	ENOTSOCK	88	/* Socket operation on non-socket */
   35.97 -#define	EDESTADDRREQ	89	/* Destination address required */
   35.98 -#define	EMSGSIZE	90	/* Message too long */
   35.99 -#define	EPROTOTYPE	91	/* Protocol wrong type for socket */
  35.100 -#define	ENOPROTOOPT	92	/* Protocol not available */
  35.101 -#define	EPROTONOSUPPORT	93	/* Protocol not supported */
  35.102 -#define	ESOCKTNOSUPPORT	94	/* Socket type not supported */
  35.103 -#define	EOPNOTSUPP	95	/* Operation not supported on transport endpoint */
  35.104 -#define	EPFNOSUPPORT	96	/* Protocol family not supported */
  35.105 -#define	EAFNOSUPPORT	97	/* Address family not supported by protocol */
  35.106 -#define	EADDRINUSE	98	/* Address already in use */
  35.107 -#define	EADDRNOTAVAIL	99	/* Cannot assign requested address */
  35.108 -#define	ENETDOWN	100	/* Network is down */
  35.109 -#define	ENETUNREACH	101	/* Network is unreachable */
  35.110 -#define	ENETRESET	102	/* Network dropped connection because of reset */
  35.111 -#define	ECONNABORTED	103	/* Software caused connection abort */
  35.112 -#define	ECONNRESET	104	/* Connection reset by peer */
  35.113 -#define	ENOBUFS		105	/* No buffer space available */
  35.114 -#define	EISCONN		106	/* Transport endpoint is already connected */
  35.115 -#define	ENOTCONN	107	/* Transport endpoint is not connected */
  35.116 -#define	ESHUTDOWN	108	/* Cannot send after transport endpoint shutdown */
  35.117 -#define	ETOOMANYREFS	109	/* Too many references: cannot splice */
  35.118 -#define	ETIMEDOUT	110	/* Connection timed out */
  35.119 -#define	ECONNREFUSED	111	/* Connection refused */
  35.120 -#define	EHOSTDOWN	112	/* Host is down */
  35.121 -#define	EHOSTUNREACH	113	/* No route to host */
  35.122 -#define	EALREADY	114	/* Operation already in progress */
  35.123 -#define	EINPROGRESS	115	/* Operation now in progress */
  35.124 -#define	ESTALE		116	/* Stale NFS file handle */
  35.125 -#define	EUCLEAN		117	/* Structure needs cleaning */
  35.126 -#define	ENOTNAM		118	/* Not a XENIX named type file */
  35.127 -#define	ENAVAIL		119	/* No XENIX semaphores available */
  35.128 -#define	EISNAM		120	/* Is a named type file */
  35.129 -#define	EREMOTEIO	121	/* Remote I/O error */
  35.130 -#define	EDQUOT		122	/* Quota exceeded */
  35.131 -
  35.132 -#define	ENOMEDIUM	123	/* No medium found */
  35.133 -#define	EMEDIUMTYPE	124	/* Wrong medium type */
  35.134 -
  35.135 -#endif
    36.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/fcntl.h	Tue Mar 11 14:37:27 2003 +0000
    36.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.3 @@ -1,87 +0,0 @@
    36.4 -#ifndef _I386_FCNTL_H
    36.5 -#define _I386_FCNTL_H
    36.6 -
    36.7 -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
    36.8 -   located on an ext2 file system */
    36.9 -#define O_ACCMODE	   0003
   36.10 -#define O_RDONLY	     00
   36.11 -#define O_WRONLY	     01
   36.12 -#define O_RDWR		     02
   36.13 -#define O_CREAT		   0100	/* not fcntl */
   36.14 -#define O_EXCL		   0200	/* not fcntl */
   36.15 -#define O_NOCTTY	   0400	/* not fcntl */
   36.16 -#define O_TRUNC		  01000	/* not fcntl */
   36.17 -#define O_APPEND	  02000
   36.18 -#define O_NONBLOCK	  04000
   36.19 -#define O_NDELAY	O_NONBLOCK
   36.20 -#define O_SYNC		 010000
   36.21 -#define FASYNC		 020000	/* fcntl, for BSD compatibility */
   36.22 -#define O_DIRECT	 040000	/* direct disk access hint */
   36.23 -#define O_LARGEFILE	0100000
   36.24 -#define O_DIRECTORY	0200000	/* must be a directory */
   36.25 -#define O_NOFOLLOW	0400000 /* don't follow links */
   36.26 -
   36.27 -#define F_DUPFD		0	/* dup */
   36.28 -#define F_GETFD		1	/* get close_on_exec */
   36.29 -#define F_SETFD		2	/* set/clear close_on_exec */
   36.30 -#define F_GETFL		3	/* get file->f_flags */
   36.31 -#define F_SETFL		4	/* set file->f_flags */
   36.32 -#define F_GETLK		5
   36.33 -#define F_SETLK		6
   36.34 -#define F_SETLKW	7
   36.35 -
   36.36 -#define F_SETOWN	8	/*  for sockets. */
   36.37 -#define F_GETOWN	9	/*  for sockets. */
   36.38 -#define F_SETSIG	10	/*  for sockets. */
   36.39 -#define F_GETSIG	11	/*  for sockets. */
   36.40 -
   36.41 -#define F_GETLK64	12	/*  using 'struct flock64' */
   36.42 -#define F_SETLK64	13
   36.43 -#define F_SETLKW64	14
   36.44 -
   36.45 -/* for F_[GET|SET]FL */
   36.46 -#define FD_CLOEXEC	1	/* actually anything with low bit set goes */
   36.47 -
   36.48 -/* for posix fcntl() and lockf() */
   36.49 -#define F_RDLCK		0
   36.50 -#define F_WRLCK		1
   36.51 -#define F_UNLCK		2
   36.52 -
   36.53 -/* for old implementation of bsd flock () */
   36.54 -#define F_EXLCK		4	/* or 3 */
   36.55 -#define F_SHLCK		8	/* or 4 */
   36.56 -
   36.57 -/* for leases */
   36.58 -#define F_INPROGRESS	16
   36.59 -
   36.60 -/* operations for bsd flock(), also used by the kernel implementation */
   36.61 -#define LOCK_SH		1	/* shared lock */
   36.62 -#define LOCK_EX		2	/* exclusive lock */
   36.63 -#define LOCK_NB		4	/* or'd with one of the above to prevent
   36.64 -				   blocking */
   36.65 -#define LOCK_UN		8	/* remove lock */
   36.66 -
   36.67 -#define LOCK_MAND	32	/* This is a mandatory flock */
   36.68 -#define LOCK_READ	64	/* ... Which allows concurrent read operations */
   36.69 -#define LOCK_WRITE	128	/* ... Which allows concurrent write operations */
   36.70 -#define LOCK_RW		192	/* ... Which allows concurrent read & write ops */
   36.71 -
   36.72 -struct flock {
   36.73 -	short l_type;
   36.74 -	short l_whence;
   36.75 -	off_t l_start;
   36.76 -	off_t l_len;
   36.77 -	pid_t l_pid;
   36.78 -};
   36.79 -
   36.80 -struct flock64 {
   36.81 -	short  l_type;
   36.82 -	short  l_whence;
   36.83 -	loff_t l_start;
   36.84 -	loff_t l_len;
   36.85 -	pid_t  l_pid;
   36.86 -};
   36.87 -
   36.88 -#define F_LINUX_SPECIFIC_BASE	1024
   36.89 -
   36.90 -#endif
    37.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/floppy.h	Tue Mar 11 14:37:27 2003 +0000
    37.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.3 @@ -1,320 +0,0 @@
    37.4 -/*
    37.5 - * Architecture specific parts of the Floppy driver
    37.6 - *
    37.7 - * This file is subject to the terms and conditions of the GNU General Public
    37.8 - * License.  See the file "COPYING" in the main directory of this archive
    37.9 - * for more details.
   37.10 - *
   37.11 - * Copyright (C) 1995
   37.12 - */
   37.13 -#ifndef __ASM_I386_FLOPPY_H
   37.14 -#define __ASM_I386_FLOPPY_H
   37.15 -
   37.16 -#include <linux/vmalloc.h>
   37.17 -
   37.18 -
   37.19 -/*
   37.20 - * The DMA channel used by the floppy controller cannot access data at
   37.21 - * addresses >= 16MB
   37.22 - *
   37.23 - * Went back to the 1MB limit, as some people had problems with the floppy
   37.24 - * driver otherwise. It doesn't matter much for performance anyway, as most
   37.25 - * floppy accesses go through the track buffer.
   37.26 - */
   37.27 -#define _CROSS_64KB(a,s,vdma) \
   37.28 -(!vdma && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64))
   37.29 -
   37.30 -#define CROSS_64KB(a,s) _CROSS_64KB(a,s,use_virtual_dma & 1)
   37.31 -
   37.32 -
   37.33 -#define SW fd_routine[use_virtual_dma&1]
   37.34 -#define CSW fd_routine[can_use_virtual_dma & 1]
   37.35 -
   37.36 -
   37.37 -#define fd_inb(port)			inb_p(port)
   37.38 -#define fd_outb(port,value)		outb_p(port,value)
   37.39 -
   37.40 -#define fd_request_dma()        CSW._request_dma(FLOPPY_DMA,"floppy")
   37.41 -#define fd_free_dma()           CSW._free_dma(FLOPPY_DMA)
   37.42 -#define fd_enable_irq()         enable_irq(FLOPPY_IRQ)
   37.43 -#define fd_disable_irq()        disable_irq(FLOPPY_IRQ)
   37.44 -#define fd_free_irq()		free_irq(FLOPPY_IRQ, NULL)
   37.45 -#define fd_get_dma_residue()    SW._get_dma_residue(FLOPPY_DMA)
   37.46 -#define fd_dma_mem_alloc(size)	SW._dma_mem_alloc(size)
   37.47 -#define fd_dma_setup(addr, size, mode, io) SW._dma_setup(addr, size, mode, io)
   37.48 -
   37.49 -#define FLOPPY_CAN_FALLBACK_ON_NODMA
   37.50 -
   37.51 -static int virtual_dma_count;
   37.52 -static int virtual_dma_residue;
   37.53 -static char *virtual_dma_addr;
   37.54 -static int virtual_dma_mode;
   37.55 -static int doing_pdma;
   37.56 -
   37.57 -static void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
   37.58 -{
   37.59 -	register unsigned char st;
   37.60 -
   37.61 -#undef TRACE_FLPY_INT
   37.62 -#define NO_FLOPPY_ASSEMBLER
   37.63 -
   37.64 -#ifdef TRACE_FLPY_INT
   37.65 -	static int calls=0;
   37.66 -	static int bytes=0;
   37.67 -	static int dma_wait=0;
   37.68 -#endif
   37.69 -	if(!doing_pdma) {
   37.70 -		floppy_interrupt(irq, dev_id, regs);
   37.71 -		return;
   37.72 -	}
   37.73 -
   37.74 -#ifdef TRACE_FLPY_INT
   37.75 -	if(!calls)
   37.76 -		bytes = virtual_dma_count;
   37.77 -#endif
   37.78 -
   37.79 -#ifndef NO_FLOPPY_ASSEMBLER
   37.80 -	__asm__ (
   37.81 -       "testl %1,%1"
   37.82 -	"je 3f"
   37.83 -"1:	inb %w4,%b0"
   37.84 -	"andb $160,%b0"
   37.85 -	"cmpb $160,%b0"
   37.86 -	"jne 2f"
   37.87 -	"incw %w4"
   37.88 -	"testl %3,%3"
   37.89 -	"jne 4f"
   37.90 -	"inb %w4,%b0"
   37.91 -	"movb %0,(%2)"
   37.92 -	"jmp 5f"
   37.93 -"4:    	movb (%2),%0"
   37.94 -	"outb %b0,%w4"
   37.95 -"5:	decw %w4"
   37.96 -	"outb %0,$0x80"
   37.97 -	"decl %1"
   37.98 -	"incl %2"
   37.99 -	"testl %1,%1"
  37.100 -	"jne 1b"
  37.101 -"3:	inb %w4,%b0"
  37.102 -"2:	"
  37.103 -       : "=a" ((char) st), 
  37.104 -       "=c" ((long) virtual_dma_count), 
  37.105 -       "=S" ((long) virtual_dma_addr)
  37.106 -       : "b" ((long) virtual_dma_mode),
  37.107 -       "d" ((short) virtual_dma_port+4), 
  37.108 -       "1" ((long) virtual_dma_count),
  37.109 -       "2" ((long) virtual_dma_addr));
  37.110 -#else	
  37.111 -	{
  37.112 -		register int lcount;
  37.113 -		register char *lptr;
  37.114 -
  37.115 -		st = 1;
  37.116 -		for(lcount=virtual_dma_count, lptr=virtual_dma_addr; 
  37.117 -		    lcount; lcount--, lptr++) {
  37.118 -			st=inb(virtual_dma_port+4) & 0xa0 ;
  37.119 -			if(st != 0xa0) 
  37.120 -				break;
  37.121 -			if(virtual_dma_mode)
  37.122 -				outb_p(*lptr, virtual_dma_port+5);
  37.123 -			else
  37.124 -				*lptr = inb_p(virtual_dma_port+5);
  37.125 -		}
  37.126 -		virtual_dma_count = lcount;
  37.127 -		virtual_dma_addr = lptr;
  37.128 -		st = inb(virtual_dma_port+4);
  37.129 -	}
  37.130 -#endif
  37.131 -
  37.132 -#ifdef TRACE_FLPY_INT
  37.133 -	calls++;
  37.134 -#endif
  37.135 -	if(st == 0x20)
  37.136 -		return;
  37.137 -	if(!(st & 0x20)) {
  37.138 -		virtual_dma_residue += virtual_dma_count;
  37.139 -		virtual_dma_count=0;
  37.140 -#ifdef TRACE_FLPY_INT
  37.141 -		printk("count=%x, residue=%x calls=%d bytes=%d dma_wait=%d\n", 
  37.142 -		       virtual_dma_count, virtual_dma_residue, calls, bytes,
  37.143 -		       dma_wait);
  37.144 -		calls = 0;
  37.145 -		dma_wait=0;
  37.146 -#endif
  37.147 -		doing_pdma = 0;
  37.148 -		floppy_interrupt(irq, dev_id, regs);
  37.149 -		return;
  37.150 -	}
  37.151 -#ifdef TRACE_FLPY_INT
  37.152 -	if(!virtual_dma_count)
  37.153 -		dma_wait++;
  37.154 -#endif
  37.155 -}
  37.156 -
  37.157 -static void fd_disable_dma(void)
  37.158 -{
  37.159 -	if(! (can_use_virtual_dma & 1))
  37.160 -		disable_dma(FLOPPY_DMA);
  37.161 -	doing_pdma = 0;
  37.162 -	virtual_dma_residue += virtual_dma_count;
  37.163 -	virtual_dma_count=0;
  37.164 -}
  37.165 -
  37.166 -static int vdma_request_dma(unsigned int dmanr, const char * device_id)
  37.167 -{
  37.168 -	return 0;
  37.169 -}
  37.170 -
  37.171 -static void vdma_nop(unsigned int dummy)
  37.172 -{
  37.173 -}
  37.174 -
  37.175 -
  37.176 -static int vdma_get_dma_residue(unsigned int dummy)
  37.177 -{
  37.178 -	return virtual_dma_count + virtual_dma_residue;
  37.179 -}
  37.180 -
  37.181 -
  37.182 -static int fd_request_irq(void)
  37.183 -{
  37.184 -	if(can_use_virtual_dma)
  37.185 -		return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT,
  37.186 -						   "floppy", NULL);
  37.187 -	else
  37.188 -		return request_irq(FLOPPY_IRQ, floppy_interrupt,
  37.189 -						   SA_INTERRUPT|SA_SAMPLE_RANDOM,
  37.190 -						   "floppy", NULL);	
  37.191 -
  37.192 -}
  37.193 -
  37.194 -static unsigned long dma_mem_alloc(unsigned long size)
  37.195 -{
  37.196 -	return __get_dma_pages(GFP_KERNEL,get_order(size));
  37.197 -}
  37.198 -
  37.199 -
  37.200 -static unsigned long vdma_mem_alloc(unsigned long size)
  37.201 -{
  37.202 -	return (unsigned long) vmalloc(size);
  37.203 -
  37.204 -}
  37.205 -
  37.206 -#define nodma_mem_alloc(size) vdma_mem_alloc(size)
  37.207 -
  37.208 -static void _fd_dma_mem_free(unsigned long addr, unsigned long size)
  37.209 -{
  37.210 -	if((unsigned int) addr >= (unsigned int) high_memory)
  37.211 -		return vfree((void *)addr);
  37.212 -	else
  37.213 -		free_pages(addr, get_order(size));		
  37.214 -}
  37.215 -
  37.216 -#define fd_dma_mem_free(addr, size)  _fd_dma_mem_free(addr, size) 
  37.217 -
  37.218 -static void _fd_chose_dma_mode(char *addr, unsigned long size)
  37.219 -{
  37.220 -	if(can_use_virtual_dma == 2) {
  37.221 -		if((unsigned int) addr >= (unsigned int) high_memory ||
  37.222 -		   virt_to_bus(addr) >= 0x1000000 ||
  37.223 -		   _CROSS_64KB(addr, size, 0))
  37.224 -			use_virtual_dma = 1;
  37.225 -		else
  37.226 -			use_virtual_dma = 0;
  37.227 -	} else {
  37.228 -		use_virtual_dma = can_use_virtual_dma & 1;
  37.229 -	}
  37.230 -}
  37.231 -
  37.232 -#define fd_chose_dma_mode(addr, size) _fd_chose_dma_mode(addr, size)
  37.233 -
  37.234 -
  37.235 -static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io)
  37.236 -{
  37.237 -	doing_pdma = 1;
  37.238 -	virtual_dma_port = io;
  37.239 -	virtual_dma_mode = (mode  == DMA_MODE_WRITE);
  37.240 -	virtual_dma_addr = addr;
  37.241 -	virtual_dma_count = size;
  37.242 -	virtual_dma_residue = 0;
  37.243 -	return 0;
  37.244 -}
  37.245 -
  37.246 -static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
  37.247 -{
  37.248 -#ifdef FLOPPY_SANITY_CHECK
  37.249 -	if (CROSS_64KB(addr, size)) {
  37.250 -		printk("DMA crossing 64-K boundary %p-%p\n", addr, addr+size);
  37.251 -		return -1;
  37.252 -	}
  37.253 -#endif
  37.254 -	/* actual, physical DMA */
  37.255 -	doing_pdma = 0;
  37.256 -	clear_dma_ff(FLOPPY_DMA);
  37.257 -	set_dma_mode(FLOPPY_DMA,mode);
  37.258 -	set_dma_addr(FLOPPY_DMA,virt_to_bus(addr));
  37.259 -	set_dma_count(FLOPPY_DMA,size);
  37.260 -	enable_dma(FLOPPY_DMA);
  37.261 -	return 0;
  37.262 -}
  37.263 -
  37.264 -struct fd_routine_l {
  37.265 -	int (*_request_dma)(unsigned int dmanr, const char * device_id);
  37.266 -	void (*_free_dma)(unsigned int dmanr);
  37.267 -	int (*_get_dma_residue)(unsigned int dummy);
  37.268 -	unsigned long (*_dma_mem_alloc) (unsigned long size);
  37.269 -	int (*_dma_setup)(char *addr, unsigned long size, int mode, int io);
  37.270 -} fd_routine[] = {
  37.271 -	{
  37.272 -		request_dma,
  37.273 -		free_dma,
  37.274 -		get_dma_residue,
  37.275 -		dma_mem_alloc,
  37.276 -		hard_dma_setup
  37.277 -	},
  37.278 -	{
  37.279 -		vdma_request_dma,
  37.280 -		vdma_nop,
  37.281 -		vdma_get_dma_residue,
  37.282 -		vdma_mem_alloc,
  37.283 -		vdma_dma_setup
  37.284 -	}
  37.285 -};
  37.286 -
  37.287 -
  37.288 -static int FDC1 = 0x3f0;
  37.289 -static int FDC2 = -1;
  37.290 -
  37.291 -/*
  37.292 - * Floppy types are stored in the rtc's CMOS RAM and so rtc_lock
  37.293 - * is needed to prevent corrupted CMOS RAM in case "insmod floppy"
  37.294 - * coincides with another rtc CMOS user.		Paul G.
  37.295 - */
  37.296 -#define FLOPPY0_TYPE	({				\
  37.297 -	unsigned long flags;				\
  37.298 -	unsigned char val;				\
  37.299 -	spin_lock_irqsave(&rtc_lock, flags);		\
  37.300 -	val = (CMOS_READ(0x10) >> 4) & 15;		\
  37.301 -	spin_unlock_irqrestore(&rtc_lock, flags);	\
  37.302 -	val;						\
  37.303 -})
  37.304 -
  37.305 -#define FLOPPY1_TYPE	({				\
  37.306 -	unsigned long flags;				\
  37.307 -	unsigned char val;				\
  37.308 -	spin_lock_irqsave(&rtc_lock, flags);		\
  37.309 -	val = CMOS_READ(0x10) & 15;			\
  37.310 -	spin_unlock_irqrestore(&rtc_lock, flags);	\
  37.311 -	val;						\
  37.312 -})
  37.313 -
  37.314 -#define N_FDC 2
  37.315 -#define N_DRIVE 8
  37.316 -
  37.317 -#define FLOPPY_MOTOR_MASK 0xf0
  37.318 -
  37.319 -#define AUTO_DMA
  37.320 -
  37.321 -#define EXTRA_FLOPPY_PARAMS
  37.322 -
  37.323 -#endif /* __ASM_I386_FLOPPY_H */
    38.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hardirq.h	Tue Mar 11 14:37:27 2003 +0000
    38.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    38.3 @@ -1,91 +0,0 @@
    38.4 -#ifndef __ASM_HARDIRQ_H
    38.5 -#define __ASM_HARDIRQ_H
    38.6 -
    38.7 -#include <linux/config.h>
    38.8 -#include <linux/threads.h>
    38.9 -#include <linux/irq.h>
   38.10 -
   38.11 -/* assembly code in softirq.h is sensitive to the offsets of these fields */
   38.12 -typedef struct {
   38.13 -	unsigned int __softirq_pending;
   38.14 -	unsigned int __local_irq_count;
   38.15 -	unsigned int __local_bh_count;
   38.16 -	unsigned int __syscall_count;
   38.17 -	struct task_struct * __ksoftirqd_task; /* waitqueue is too large */
   38.18 -	unsigned int __nmi_count;	/* arch dependent */
   38.19 -} ____cacheline_aligned irq_cpustat_t;
   38.20 -
   38.21 -#include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */
   38.22 -
   38.23 -/*
   38.24 - * Are we in an interrupt context? Either doing bottom half
   38.25 - * or hardware interrupt processing?
   38.26 - */
   38.27 -#define in_interrupt() ({ int __cpu = smp_processor_id(); \
   38.28 -	(local_irq_count(__cpu) + local_bh_count(__cpu) != 0); })
   38.29 -
   38.30 -#define in_irq() (local_irq_count(smp_processor_id()) != 0)
   38.31 -
   38.32 -#ifndef CONFIG_SMP
   38.33 -
   38.34 -#define hardirq_trylock(cpu)	(local_irq_count(cpu) == 0)
   38.35 -#define hardirq_endlock(cpu)	do { } while (0)
   38.36 -
   38.37 -#define irq_enter(cpu, irq)	(local_irq_count(cpu)++)
   38.38 -#define irq_exit(cpu, irq)	(local_irq_count(cpu)--)
   38.39 -
   38.40 -#define synchronize_irq()	barrier()
   38.41 -
   38.42 -#else
   38.43 -
   38.44 -#include <asm/atomic.h>
   38.45 -#include <asm/smp.h>
   38.46 -
   38.47 -extern unsigned char global_irq_holder;
   38.48 -extern unsigned volatile long global_irq_lock; /* long for set_bit -RR */
   38.49 -
   38.50 -static inline int irqs_running (void)
   38.51 -{
   38.52 -	int i;
   38.53 -
   38.54 -	for (i = 0; i < smp_num_cpus; i++)
   38.55 -		if (local_irq_count(i))
   38.56 -			return 1;
   38.57 -	return 0;
   38.58 -}
   38.59 -
   38.60 -static inline void release_irqlock(int cpu)
   38.61 -{
   38.62 -	/* if we didn't own the irq lock, just ignore.. */
   38.63 -	if (global_irq_holder == (unsigned char) cpu) {
   38.64 -		global_irq_holder = NO_PROC_ID;
   38.65 -		clear_bit(0,&global_irq_lock);
   38.66 -	}
   38.67 -}
   38.68 -
   38.69 -static inline void irq_enter(int cpu, int irq)
   38.70 -{
   38.71 -	++local_irq_count(cpu);
   38.72 -
   38.73 -	while (test_bit(0,&global_irq_lock)) {
   38.74 -		cpu_relax();
   38.75 -	}
   38.76 -}
   38.77 -
   38.78 -static inline void irq_exit(int cpu, int irq)
   38.79 -{
   38.80 -	--local_irq_count(cpu);
   38.81 -}
   38.82 -
   38.83 -static inline int hardirq_trylock(int cpu)
   38.84 -{
   38.85 -	return !local_irq_count(cpu) && !test_bit(0,&global_irq_lock);
   38.86 -}
   38.87 -
   38.88 -#define hardirq_endlock(cpu)	do { } while (0)
   38.89 -
   38.90 -extern void synchronize_irq(void);
   38.91 -
   38.92 -#endif /* CONFIG_SMP */
   38.93 -
   38.94 -#endif /* __ASM_HARDIRQ_H */
    39.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hdreg.h	Tue Mar 11 14:37:27 2003 +0000
    39.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    39.3 @@ -1,13 +0,0 @@
    39.4 -/*
    39.5 - *  linux/include/asm-i386/hdreg.h
    39.6 - *
    39.7 - *  Copyright (C) 1994-1996  Linus Torvalds & authors
    39.8 - */
    39.9 -
   39.10 -#ifndef __ASMi386_HDREG_H
   39.11 -#define __ASMi386_HDREG_H
   39.12 -
   39.13 -//typedef unsigned short ide_ioreg_t;
   39.14 -typedef unsigned long ide_ioreg_t;
   39.15 -
   39.16 -#endif /* __ASMi386_HDREG_H */
    40.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/i387.h	Tue Mar 11 14:37:27 2003 +0000
    40.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    40.3 @@ -1,89 +0,0 @@
    40.4 -/*
    40.5 - * include/asm-i386/i387.h
    40.6 - *
    40.7 - * Copyright (C) 1994 Linus Torvalds
    40.8 - *
    40.9 - * Pentium III FXSR, SSE support
   40.10 - * General FPU state handling cleanups
   40.11 - *	Gareth Hughes <gareth@valinux.com>, May 2000
   40.12 - */
   40.13 -
   40.14 -#ifndef __ASM_I386_I387_H
   40.15 -#define __ASM_I386_I387_H
   40.16 -
   40.17 -#include <linux/sched.h>
   40.18 -#include <asm/processor.h>
   40.19 -#include <asm/sigcontext.h>
   40.20 -#include <asm/user.h>
   40.21 -
   40.22 -extern void init_fpu(void);
   40.23 -/*
   40.24 - * FPU lazy state save handling...
   40.25 - */
   40.26 -extern void save_init_fpu( struct task_struct *tsk );
   40.27 -extern void restore_fpu( struct task_struct *tsk );
   40.28 -
   40.29 -extern void kernel_fpu_begin(void);
   40.30 -#define kernel_fpu_end() stts()
   40.31 -
   40.32 -
   40.33 -#define unlazy_fpu( tsk ) do { \
   40.34 -	if ( tsk->flags & PF_USEDFPU ) \
   40.35 -		save_init_fpu( tsk ); \
   40.36 -} while (0)
   40.37 -
   40.38 -#define clear_fpu( tsk ) do { \
   40.39 -	if ( tsk->flags & PF_USEDFPU ) { \
   40.40 -		asm volatile("fwait"); \
   40.41 -		tsk->flags &= ~PF_USEDFPU; \
   40.42 -		stts(); \
   40.43 -	} \
   40.44 -} while (0)
   40.45 -
   40.46 -/*
   40.47 - * FPU state interaction...
   40.48 - */
   40.49 -extern unsigned short get_fpu_cwd( struct task_struct *tsk );
   40.50 -extern unsigned short get_fpu_swd( struct task_struct *tsk );
   40.51 -extern unsigned short get_fpu_twd( struct task_struct *tsk );
   40.52 -extern unsigned short get_fpu_mxcsr( struct task_struct *tsk );
   40.53 -
   40.54 -extern void set_fpu_cwd( struct task_struct *tsk, unsigned short cwd );
   40.55 -extern void set_fpu_swd( struct task_struct *tsk, unsigned short swd );
   40.56 -extern void set_fpu_twd( struct task_struct *tsk, unsigned short twd );
   40.57 -extern void set_fpu_mxcsr( struct task_struct *tsk, unsigned short mxcsr );
   40.58 -
   40.59 -#define load_mxcsr( val ) do { \
   40.60 -	unsigned long __mxcsr = ((unsigned long)(val) & 0xffbf); \
   40.61 -	asm volatile( "ldmxcsr %0" : : "m" (__mxcsr) ); \
   40.62 -} while (0)
   40.63 -
   40.64 -/*
   40.65 - * Signal frame handlers...
   40.66 - */
   40.67 -extern int save_i387( struct _fpstate *buf );
   40.68 -extern int restore_i387( struct _fpstate *buf );
   40.69 -
   40.70 -/*
   40.71 - * ptrace request handers...
   40.72 - */
   40.73 -extern int get_fpregs( struct user_i387_struct *buf,
   40.74 -		       struct task_struct *tsk );
   40.75 -extern int set_fpregs( struct task_struct *tsk,
   40.76 -		       struct user_i387_struct *buf );
   40.77 -
   40.78 -extern int get_fpxregs( struct user_fxsr_struct *buf,
   40.79 -			struct task_struct *tsk );
   40.80 -extern int set_fpxregs( struct task_struct *tsk,
   40.81 -			struct user_fxsr_struct *buf );
   40.82 -extern void load_empty_fpu(struct task_struct *);
   40.83 -
   40.84 -/*
   40.85 - * FPU state for core dumps...
   40.86 - */
   40.87 -extern int dump_fpu( struct pt_regs *regs,
   40.88 -		     struct user_i387_struct *fpu );
   40.89 -extern int dump_extended_fpu( struct pt_regs *regs,
   40.90 -			      struct user_fxsr_struct *fpu );
   40.91 -
   40.92 -#endif /* __ASM_I386_I387_H */
    41.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ide.h	Tue Mar 11 14:37:27 2003 +0000
    41.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    41.3 @@ -1,92 +0,0 @@
    41.4 -/*
    41.5 - *  linux/include/asm-i386/ide.h
    41.6 - *
    41.7 - *  Copyright (C) 1994-1996  Linus Torvalds & authors
    41.8 - */
    41.9 -
   41.10 -/*
   41.11 - *  This file contains the i386 architecture specific IDE code.
   41.12 - */
   41.13 -
   41.14 -#ifndef __ASMi386_IDE_H
   41.15 -#define __ASMi386_IDE_H
   41.16 -
   41.17 -#ifdef __KERNEL__
   41.18 -
   41.19 -#include <linux/config.h>
   41.20 -
   41.21 -#ifndef MAX_HWIFS
   41.22 -# ifdef CONFIG_BLK_DEV_IDEPCI
   41.23 -#define MAX_HWIFS	10
   41.24 -# else
   41.25 -#define MAX_HWIFS	6
   41.26 -# endif
   41.27 -#endif
   41.28 -
   41.29 -static __inline__ int ide_default_irq(ide_ioreg_t base)
   41.30 -{
   41.31 -	switch (base) {
   41.32 -		case 0x1f0: return 14;
   41.33 -		case 0x170: return 15;
   41.34 -		case 0x1e8: return 11;
   41.35 -		case 0x168: return 10;
   41.36 -		case 0x1e0: return 8;
   41.37 -		case 0x160: return 12;
   41.38 -		default:
   41.39 -			return 0;
   41.40 -	}
   41.41 -}
   41.42 -
   41.43 -static __inline__ ide_ioreg_t ide_default_io_base(int index)
   41.44 -{
   41.45 -	switch (index) {
   41.46 -		case 0:	return 0x1f0;
   41.47 -		case 1:	return 0x170;
   41.48 -		case 2: return 0x1e8;
   41.49 -		case 3: return 0x168;
   41.50 -		case 4: return 0x1e0;
   41.51 -		case 5: return 0x160;
   41.52 -		default:
   41.53 -			return 0;
   41.54 -	}
   41.55 -}
   41.56 -
   41.57 -static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq)
   41.58 -{
   41.59 -	ide_ioreg_t reg = data_port;
   41.60 -	int i;
   41.61 -
   41.62 -	for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
   41.63 -		hw->io_ports[i] = reg;
   41.64 -		reg += 1;
   41.65 -	}
   41.66 -	if (ctrl_port) {
   41.67 -		hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
   41.68 -	} else {
   41.69 -		hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206;
   41.70 -	}
   41.71 -	if (irq != NULL)
   41.72 -		*irq = 0;
   41.73 -	hw->io_ports[IDE_IRQ_OFFSET] = 0;
   41.74 -}
   41.75 -
   41.76 -static __inline__ void ide_init_default_hwifs(void)
   41.77 -{
   41.78 -#ifndef CONFIG_BLK_DEV_IDEPCI
   41.79 -	hw_regs_t hw;
   41.80 -	int index;
   41.81 -
   41.82 -	for(index = 0; index < MAX_HWIFS; index++) {
   41.83 -		memset(&hw, 0, sizeof hw);
   41.84 -		ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
   41.85 -		hw.irq = ide_default_irq(ide_default_io_base(index));
   41.86 -		ide_register_hw(&hw, NULL);
   41.87 -	}
   41.88 -#endif /* CONFIG_BLK_DEV_IDEPCI */
   41.89 -}
   41.90 -
   41.91 -#include <asm-generic/ide_iops.h>
   41.92 -
   41.93 -#endif /* __KERNEL__ */
   41.94 -
   41.95 -#endif /* __ASMi386_IDE_H */
    42.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/init.h	Tue Mar 11 14:37:27 2003 +0000
    42.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    42.3 @@ -1,1 +0,0 @@
    42.4 -#error "<asm/init.h> should never be used - use <linux/init.h> instead"
    43.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/io_apic.h	Tue Mar 11 14:37:27 2003 +0000
    43.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    43.3 @@ -1,148 +0,0 @@
    43.4 -#ifndef __ASM_IO_APIC_H
    43.5 -#define __ASM_IO_APIC_H
    43.6 -
    43.7 -#include <linux/config.h>
    43.8 -#include <asm/types.h>
    43.9 -
   43.10 -/*
   43.11 - * Intel IO-APIC support for SMP and UP systems.
   43.12 - *
   43.13 - * Copyright (C) 1997, 1998, 1999, 2000 Ingo Molnar
   43.14 - */
   43.15 -
   43.16 -#ifdef CONFIG_X86_IO_APIC
   43.17 -
   43.18 -#define APIC_MISMATCH_DEBUG
   43.19 -
   43.20 -#define IO_APIC_BASE(idx) \
   43.21 -		((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + idx) \
   43.22 -		+ (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK)))
   43.23 -
   43.24 -/*
   43.25 - * The structure of the IO-APIC:
   43.26 - */
   43.27 -struct IO_APIC_reg_00 {
   43.28 -	__u32	__reserved_2	: 24,
   43.29 -		ID		:  4,
   43.30 -		__reserved_1	:  4;
   43.31 -} __attribute__ ((packed));
   43.32 -
   43.33 -struct IO_APIC_reg_01 {
   43.34 -	__u32	version		:  8,
   43.35 -		__reserved_2	:  7,
   43.36 -		PRQ		:  1,
   43.37 -		entries		:  8,
   43.38 -		__reserved_1	:  8;
   43.39 -} __attribute__ ((packed));
   43.40 -
   43.41 -struct IO_APIC_reg_02 {
   43.42 -	__u32	__reserved_2	: 24,
   43.43 -		arbitration	:  4,
   43.44 -		__reserved_1	:  4;
   43.45 -} __attribute__ ((packed));
   43.46 -
   43.47 -/*
   43.48 - * # of IO-APICs and # of IRQ routing registers
   43.49 - */
   43.50 -extern int nr_ioapics;
   43.51 -extern int nr_ioapic_registers[MAX_IO_APICS];
   43.52 -
   43.53 -enum ioapic_irq_destination_types {
   43.54 -	dest_Fixed = 0,
   43.55 -	dest_LowestPrio = 1,
   43.56 -	dest_SMI = 2,
   43.57 -	dest__reserved_1 = 3,
   43.58 -	dest_NMI = 4,
   43.59 -	dest_INIT = 5,
   43.60 -	dest__reserved_2 = 6,
   43.61 -	dest_ExtINT = 7
   43.62 -};
   43.63 -
   43.64 -struct IO_APIC_route_entry {
   43.65 -	__u32	vector		:  8,
   43.66 -		delivery_mode	:  3,	/* 000: FIXED
   43.67 -					 * 001: lowest prio
   43.68 -					 * 111: ExtINT
   43.69 -					 */
   43.70 -		dest_mode	:  1,	/* 0: physical, 1: logical */
   43.71 -		delivery_status	:  1,
   43.72 -		polarity	:  1,
   43.73 -		irr		:  1,
   43.74 -		trigger		:  1,	/* 0: edge, 1: level */
   43.75 -		mask		:  1,	/* 0: enabled, 1: disabled */
   43.76 -		__reserved_2	: 15;
   43.77 -
   43.78 -	union {		struct { __u32
   43.79 -					__reserved_1	: 24,
   43.80 -					physical_dest	:  4,
   43.81 -					__reserved_2	:  4;
   43.82 -			} physical;
   43.83 -
   43.84 -			struct { __u32
   43.85 -					__reserved_1	: 24,
   43.86 -					logical_dest	:  8;
   43.87 -			} logical;
   43.88 -	} dest;
   43.89 -
   43.90 -} __attribute__ ((packed));
   43.91 -
   43.92 -/*
   43.93 - * MP-BIOS irq configuration table structures:
   43.94 - */
   43.95 -
   43.96 -/* I/O APIC entries */
   43.97 -extern struct mpc_config_ioapic mp_ioapics[MAX_IO_APICS];
   43.98 -
   43.99 -/* # of MP IRQ source entries */
  43.100 -extern int mp_irq_entries;
  43.101 -
  43.102 -/* MP IRQ source entries */
  43.103 -extern struct mpc_config_intsrc *mp_irqs;
  43.104 -
  43.105 -/* non-0 if default (table-less) MP configuration */
  43.106 -extern int mpc_default_type;
  43.107 -
  43.108 -static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
  43.109 -{
  43.110 -	*IO_APIC_BASE(apic) = reg;
  43.111 -	return *(IO_APIC_BASE(apic)+4);
  43.112 -}
  43.113 -
  43.114 -static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
  43.115 -{
  43.116 -	*IO_APIC_BASE(apic) = reg;
  43.117 -	*(IO_APIC_BASE(apic)+4) = value;
  43.118 -}
  43.119 -
  43.120 -/*
  43.121 - * Re-write a value: to be used for read-modify-write
  43.122 - * cycles where the read already set up the index register.
  43.123 - */
  43.124 -static inline void io_apic_modify(unsigned int apic, unsigned int value)
  43.125 -{
  43.126 -	*(IO_APIC_BASE(apic)+4) = value;
  43.127 -}
  43.128 -
  43.129 -/*
  43.130 - * Synchronize the IO-APIC and the CPU by doing
  43.131 - * a dummy read from the IO-APIC
  43.132 - */
  43.133 -static inline void io_apic_sync(unsigned int apic)
  43.134 -{
  43.135 -	(void) *(IO_APIC_BASE(apic)+4);
  43.136 -}
  43.137 -
  43.138 -/* 1 if "noapic" boot option passed */
  43.139 -extern int skip_ioapic_setup;
  43.140 -
  43.141 -/*
  43.142 - * If we use the IO-APIC for IRQ routing, disable automatic
  43.143 - * assignment of PCI IRQ's.
  43.144 - */
  43.145 -#define io_apic_assign_pci_irqs (mp_irq_entries && !skip_ioapic_setup)
  43.146 -
  43.147 -#else  /* !CONFIG_X86_IO_APIC */
  43.148 -#define io_apic_assign_pci_irqs 0
  43.149 -#endif
  43.150 -
  43.151 -#endif
    44.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctl.h	Tue Mar 11 14:37:27 2003 +0000
    44.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    44.3 @@ -1,75 +0,0 @@
    44.4 -/* $Id: ioctl.h,v 1.5 1993/07/19 21:53:50 root Exp root $
    44.5 - *
    44.6 - * linux/ioctl.h for Linux by H.H. Bergman.
    44.7 - */
    44.8 -
    44.9 -#ifndef _ASMI386_IOCTL_H
   44.10 -#define _ASMI386_IOCTL_H
   44.11 -
   44.12 -/* ioctl command encoding: 32 bits total, command in lower 16 bits,
   44.13 - * size of the parameter structure in the lower 14 bits of the
   44.14 - * upper 16 bits.
   44.15 - * Encoding the size of the parameter structure in the ioctl request
   44.16 - * is useful for catching programs compiled with old versions
   44.17 - * and to avoid overwriting user space outside the user buffer area.
   44.18 - * The highest 2 bits are reserved for indicating the ``access mode''.
   44.19 - * NOTE: This limits the max parameter size to 16kB -1 !
   44.20 - */
   44.21 -
   44.22 -/*
   44.23 - * The following is for compatibility across the various Linux
   44.24 - * platforms.  The i386 ioctl numbering scheme doesn't really enforce
   44.25 - * a type field.  De facto, however, the top 8 bits of the lower 16
   44.26 - * bits are indeed used as a type field, so we might just as well make
   44.27 - * this explicit here.  Please be sure to use the decoding macros
   44.28 - * below from now on.
   44.29 - */
   44.30 -#define _IOC_NRBITS	8
   44.31 -#define _IOC_TYPEBITS	8
   44.32 -#define _IOC_SIZEBITS	14
   44.33 -#define _IOC_DIRBITS	2
   44.34 -
   44.35 -#define _IOC_NRMASK	((1 << _IOC_NRBITS)-1)
   44.36 -#define _IOC_TYPEMASK	((1 << _IOC_TYPEBITS)-1)
   44.37 -#define _IOC_SIZEMASK	((1 << _IOC_SIZEBITS)-1)
   44.38 -#define _IOC_DIRMASK	((1 << _IOC_DIRBITS)-1)
   44.39 -
   44.40 -#define _IOC_NRSHIFT	0
   44.41 -#define _IOC_TYPESHIFT	(_IOC_NRSHIFT+_IOC_NRBITS)
   44.42 -#define _IOC_SIZESHIFT	(_IOC_TYPESHIFT+_IOC_TYPEBITS)
   44.43 -#define _IOC_DIRSHIFT	(_IOC_SIZESHIFT+_IOC_SIZEBITS)
   44.44 -
   44.45 -/*
   44.46 - * Direction bits.
   44.47 - */
   44.48 -#define _IOC_NONE	0U
   44.49 -#define _IOC_WRITE	1U
   44.50 -#define _IOC_READ	2U
   44.51 -
   44.52 -#define _IOC(dir,type,nr,size) \
   44.53 -	(((dir)  << _IOC_DIRSHIFT) | \
   44.54 -	 ((type) << _IOC_TYPESHIFT) | \
   44.55 -	 ((nr)   << _IOC_NRSHIFT) | \
   44.56 -	 ((size) << _IOC_SIZESHIFT))
   44.57 -
   44.58 -/* used to create numbers */
   44.59 -#define _IO(type,nr)		_IOC(_IOC_NONE,(type),(nr),0)
   44.60 -#define _IOR(type,nr,size)	_IOC(_IOC_READ,(type),(nr),sizeof(size))
   44.61 -#define _IOW(type,nr,size)	_IOC(_IOC_WRITE,(type),(nr),sizeof(size))
   44.62 -#define _IOWR(type,nr,size)	_IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
   44.63 -
   44.64 -/* used to decode ioctl numbers.. */
   44.65 -#define _IOC_DIR(nr)		(((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
   44.66 -#define _IOC_TYPE(nr)		(((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
   44.67 -#define _IOC_NR(nr)		(((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
   44.68 -#define _IOC_SIZE(nr)		(((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
   44.69 -
   44.70 -/* ...and for the drivers/sound files... */
   44.71 -
   44.72 -#define IOC_IN		(_IOC_WRITE << _IOC_DIRSHIFT)
   44.73 -#define IOC_OUT		(_IOC_READ << _IOC_DIRSHIFT)
   44.74 -#define IOC_INOUT	((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
   44.75 -#define IOCSIZE_MASK	(_IOC_SIZEMASK << _IOC_SIZESHIFT)
   44.76 -#define IOCSIZE_SHIFT	(_IOC_SIZESHIFT)
   44.77 -
   44.78 -#endif /* _ASMI386_IOCTL_H */
    45.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctls.h	Tue Mar 11 14:37:27 2003 +0000
    45.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    45.3 @@ -1,82 +0,0 @@
    45.4 -#ifndef __ARCH_I386_IOCTLS_H__
    45.5 -#define __ARCH_I386_IOCTLS_H__
    45.6 -
    45.7 -#include <asm/ioctl.h>
    45.8 -
    45.9 -/* 0x54 is just a magic number to make these relatively unique ('T') */
   45.10 -
   45.11 -#define TCGETS		0x5401
   45.12 -#define TCSETS		0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */
   45.13 -#define TCSETSW		0x5403
   45.14 -#define TCSETSF		0x5404
   45.15 -#define TCGETA		0x5405
   45.16 -#define TCSETA		0x5406
   45.17 -#define TCSETAW		0x5407
   45.18 -#define TCSETAF		0x5408
   45.19 -#define TCSBRK		0x5409
   45.20 -#define TCXONC		0x540A
   45.21 -#define TCFLSH		0x540B
   45.22 -#define TIOCEXCL	0x540C
   45.23 -#define TIOCNXCL	0x540D
   45.24 -#define TIOCSCTTY	0x540E
   45.25 -#define TIOCGPGRP	0x540F
   45.26 -#define TIOCSPGRP	0x5410
   45.27 -#define TIOCOUTQ	0x5411
   45.28 -#define TIOCSTI		0x5412
   45.29 -#define TIOCGWINSZ	0x5413
   45.30 -#define TIOCSWINSZ	0x5414
   45.31 -#define TIOCMGET	0x5415
   45.32 -#define TIOCMBIS	0x5416
   45.33 -#define TIOCMBIC	0x5417
   45.34 -#define TIOCMSET	0x5418
   45.35 -#define TIOCGSOFTCAR	0x5419
   45.36 -#define TIOCSSOFTCAR	0x541A
   45.37 -#define FIONREAD	0x541B
   45.38 -#define TIOCINQ		FIONREAD
   45.39 -#define TIOCLINUX	0x541C
   45.40 -#define TIOCCONS	0x541D
   45.41 -#define TIOCGSERIAL	0x541E
   45.42 -#define TIOCSSERIAL	0x541F
   45.43 -#define TIOCPKT		0x5420
   45.44 -#define FIONBIO		0x5421
   45.45 -#define TIOCNOTTY	0x5422
   45.46 -#define TIOCSETD	0x5423
   45.47 -#define TIOCGETD	0x5424
   45.48 -#define TCSBRKP		0x5425	/* Needed for POSIX tcsendbreak() */
   45.49 -#define TIOCTTYGSTRUCT	0x5426  /* For debugging only */
   45.50 -#define TIOCSBRK	0x5427  /* BSD compatibility */
   45.51 -#define TIOCCBRK	0x5428  /* BSD compatibility */
   45.52 -#define TIOCGSID	0x5429  /* Return the session ID of FD */
   45.53 -#define TIOCGPTN	_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
   45.54 -#define TIOCSPTLCK	_IOW('T',0x31, int)  /* Lock/unlock Pty */
   45.55 -
   45.56 -#define FIONCLEX	0x5450  /* these numbers need to be adjusted. */
   45.57 -#define FIOCLEX		0x5451
   45.58 -#define FIOASYNC	0x5452
   45.59 -#define TIOCSERCONFIG	0x5453
   45.60 -#define TIOCSERGWILD	0x5454
   45.61 -#define TIOCSERSWILD	0x5455
   45.62 -#define TIOCGLCKTRMIOS	0x5456
   45.63 -#define TIOCSLCKTRMIOS	0x5457
   45.64 -#define TIOCSERGSTRUCT	0x5458 /* For debugging only */
   45.65 -#define TIOCSERGETLSR   0x5459 /* Get line status register */
   45.66 -#define TIOCSERGETMULTI 0x545A /* Get multiport config  */
   45.67 -#define TIOCSERSETMULTI 0x545B /* Set multiport config */
   45.68 -
   45.69 -#define TIOCMIWAIT	0x545C	/* wait for a change on serial input line(s) */
   45.70 -#define TIOCGICOUNT	0x545D	/* read serial port inline interrupt counts */
   45.71 -#define TIOCGHAYESESP   0x545E  /* Get Hayes ESP configuration */
   45.72 -#define TIOCSHAYESESP   0x545F  /* Set Hayes ESP configuration */
   45.73 -
   45.74 -/* Used for packet mode */
   45.75 -#define TIOCPKT_DATA		 0
   45.76 -#define TIOCPKT_FLUSHREAD	 1
   45.77 -#define TIOCPKT_FLUSHWRITE	 2
   45.78 -#define TIOCPKT_STOP		 4
   45.79 -#define TIOCPKT_START		 8
   45.80 -#define TIOCPKT_NOSTOP		16
   45.81 -#define TIOCPKT_DOSTOP		32
   45.82 -
   45.83 -#define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
   45.84 -
   45.85 -#endif
    46.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipc.h	Tue Mar 11 14:37:27 2003 +0000
    46.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    46.3 @@ -1,31 +0,0 @@
    46.4 -#ifndef __i386_IPC_H__
    46.5 -#define __i386_IPC_H__
    46.6 -
    46.7 -/* 
    46.8 - * These are used to wrap system calls on x86.
    46.9 - *
   46.10 - * See arch/i386/kernel/sys_i386.c for ugly details..
   46.11 - */
   46.12 -struct ipc_kludge {
   46.13 -	struct msgbuf *msgp;
   46.14 -	long msgtyp;
   46.15 -};
   46.16 -
   46.17 -#define SEMOP		 1
   46.18 -#define SEMGET		 2
   46.19 -#define SEMCTL		 3
   46.20 -#define MSGSND		11
   46.21 -#define MSGRCV		12
   46.22 -#define MSGGET		13
   46.23 -#define MSGCTL		14
   46.24 -#define SHMAT		21
   46.25 -#define SHMDT		22
   46.26 -#define SHMGET		23
   46.27 -#define SHMCTL		24
   46.28 -
   46.29 -/* Used by the DIPC package, try and avoid reusing it */
   46.30 -#define DIPC            25
   46.31 -
   46.32 -#define IPCCALL(version,op)	((version)<<16 | (op))
   46.33 -
   46.34 -#endif
    47.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipcbuf.h	Tue Mar 11 14:37:27 2003 +0000
    47.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    47.3 @@ -1,29 +0,0 @@
    47.4 -#ifndef __i386_IPCBUF_H__
    47.5 -#define __i386_IPCBUF_H__
    47.6 -
    47.7 -/*
    47.8 - * The ipc64_perm structure for i386 architecture.
    47.9 - * Note extra padding because this structure is passed back and forth
   47.10 - * between kernel and user space.
   47.11 - *
   47.12 - * Pad space is left for:
   47.13 - * - 32-bit mode_t and seq
   47.14 - * - 2 miscellaneous 32-bit values
   47.15 - */
   47.16 -
   47.17 -struct ipc64_perm
   47.18 -{
   47.19 -	__kernel_key_t		key;
   47.20 -	__kernel_uid32_t	uid;
   47.21 -	__kernel_gid32_t	gid;
   47.22 -	__kernel_uid32_t	cuid;
   47.23 -	__kernel_gid32_t	cgid;
   47.24 -	__kernel_mode_t		mode;
   47.25 -	unsigned short		__pad1;
   47.26 -	unsigned short		seq;
   47.27 -	unsigned short		__pad2;
   47.28 -	unsigned long		__unused1;
   47.29 -	unsigned long		__unused2;
   47.30 -};
   47.31 -
   47.32 -#endif /* __i386_IPCBUF_H__ */
    48.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/keyboard.h	Tue Mar 11 14:37:27 2003 +0000
    48.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    48.3 @@ -1,72 +0,0 @@
    48.4 -/*
    48.5 - *  linux/include/asm-i386/keyboard.h
    48.6 - *
    48.7 - *  Created 3 Nov 1996 by Geert Uytterhoeven
    48.8 - */
    48.9 -
   48.10 -/*
   48.11 - *  This file contains the i386 architecture specific keyboard definitions
   48.12 - */
   48.13 -
   48.14 -#ifndef _I386_KEYBOARD_H
   48.15 -#define _I386_KEYBOARD_H
   48.16 -
   48.17 -#ifdef __KERNEL__
   48.18 -
   48.19 -#include <linux/kernel.h>
   48.20 -#include <linux/ioport.h>
   48.21 -#include <linux/kd.h>
   48.22 -#include <linux/pm.h>
   48.23 -#include <asm/io.h>
   48.24 -
   48.25 -#define KEYBOARD_IRQ			1
   48.26 -#define DISABLE_KBD_DURING_INTERRUPTS	0
   48.27 -
   48.28 -extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode);
   48.29 -extern int pckbd_getkeycode(unsigned int scancode);
   48.30 -extern int pckbd_translate(unsigned char scancode, unsigned char *keycode,
   48.31 -			   char raw_mode);
   48.32 -extern char pckbd_unexpected_up(unsigned char keycode);
   48.33 -extern void pckbd_leds(unsigned char leds);
   48.34 -extern void pckbd_init_hw(void);
   48.35 -extern int pckbd_pm_resume(struct pm_dev *, pm_request_t, void *);
   48.36 -extern pm_callback pm_kbd_request_override;
   48.37 -extern unsigned char pckbd_sysrq_xlate[128];
   48.38 -
   48.39 -#define kbd_setkeycode		pckbd_setkeycode
   48.40 -#define kbd_getkeycode		pckbd_getkeycode
   48.41 -#define kbd_translate		pckbd_translate
   48.42 -#define kbd_unexpected_up	pckbd_unexpected_up
   48.43 -#define kbd_leds		pckbd_leds
   48.44 -#define kbd_init_hw		pckbd_init_hw
   48.45 -#define kbd_sysrq_xlate		pckbd_sysrq_xlate
   48.46 -
   48.47 -#define SYSRQ_KEY 0x54
   48.48 -
   48.49 -/* resource allocation */
   48.50 -#define kbd_request_region()
   48.51 -#define kbd_request_irq(handler) request_irq(KEYBOARD_IRQ, handler, 0, \
   48.52 -                                             "keyboard", NULL)
   48.53 -
   48.54 -/* How to access the keyboard macros on this platform.  */
   48.55 -#define kbd_read_input() inb(KBD_DATA_REG)
   48.56 -#define kbd_read_status() inb(KBD_STATUS_REG)
   48.57 -#define kbd_write_output(val) outb(val, KBD_DATA_REG)
   48.58 -#define kbd_write_command(val) outb(val, KBD_CNTL_REG)
   48.59 -
   48.60 -/* Some stoneage hardware needs delays after some operations.  */
   48.61 -#define kbd_pause() do { } while(0)
   48.62 -
   48.63 -/*
   48.64 - * Machine specific bits for the PS/2 driver
   48.65 - */
   48.66 -
   48.67 -#define AUX_IRQ 12
   48.68 -
   48.69 -#define aux_request_irq(hand, dev_id)					\
   48.70 -	request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id)
   48.71 -
   48.72 -#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)
   48.73 -
   48.74 -#endif /* __KERNEL__ */
   48.75 -#endif /* _I386_KEYBOARD_H */
    49.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/kmap_types.h	Tue Mar 11 14:37:27 2003 +0000
    49.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    49.3 @@ -1,14 +0,0 @@
    49.4 -#ifndef _ASM_KMAP_TYPES_H
    49.5 -#define _ASM_KMAP_TYPES_H
    49.6 -
    49.7 -enum km_type {
    49.8 -	KM_BOUNCE_READ,
    49.9 -	KM_SKB_SUNRPC_DATA,
   49.10 -	KM_SKB_DATA_SOFTIRQ,
   49.11 -	KM_USER0,
   49.12 -	KM_USER1,
   49.13 -	KM_BH_IRQ,
   49.14 -	KM_TYPE_NR
   49.15 -};
   49.16 -
   49.17 -#endif
    50.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ldt.h	Tue Mar 11 14:37:27 2003 +0000
    50.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    50.3 @@ -1,32 +0,0 @@
    50.4 -/*
    50.5 - * ldt.h
    50.6 - *
    50.7 - * Definitions of structures used with the modify_ldt system call.
    50.8 - */
    50.9 -#ifndef _LINUX_LDT_H
   50.10 -#define _LINUX_LDT_H
   50.11 -
   50.12 -/* Maximum number of LDT entries supported. */
   50.13 -#define LDT_ENTRIES	8192
   50.14 -/* The size of each LDT entry. */
   50.15 -#define LDT_ENTRY_SIZE	8
   50.16 -
   50.17 -#ifndef __ASSEMBLY__
   50.18 -struct modify_ldt_ldt_s {
   50.19 -	unsigned int  entry_number;
   50.20 -	unsigned long base_addr;
   50.21 -	unsigned int  limit;
   50.22 -	unsigned int  seg_32bit:1;
   50.23 -	unsigned int  contents:2;
   50.24 -	unsigned int  read_exec_only:1;
   50.25 -	unsigned int  limit_in_pages:1;
   50.26 -	unsigned int  seg_not_present:1;
   50.27 -	unsigned int  useable:1;
   50.28 -};
   50.29 -
   50.30 -#define MODIFY_LDT_CONTENTS_DATA	0
   50.31 -#define MODIFY_LDT_CONTENTS_STACK	1
   50.32 -#define MODIFY_LDT_CONTENTS_CODE	2
   50.33 -
   50.34 -#endif /* !__ASSEMBLY__ */
   50.35 -#endif
    51.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/linux_logo.h	Tue Mar 11 14:37:27 2003 +0000
    51.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    51.3 @@ -1,27 +0,0 @@
    51.4 -/* $Id: linux_logo.h,v 1.8 1998/07/30 16:30:24 jj Exp $
    51.5 - * include/asm-i386/linux_logo.h: This is a linux logo
    51.6 - *                                to be displayed on boot.
    51.7 - *
    51.8 - * Copyright (C) 1996 Larry Ewing (lewing@isc.tamu.edu)
    51.9 - * Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
   51.10 - *
   51.11 - * You can put anything here, but:
   51.12 - * LINUX_LOGO_COLORS has to be less than 224
   51.13 - * image size has to be 80x80
   51.14 - * values have to start from 0x20
   51.15 - * (i.e. RGB(linux_logo_red[0],
   51.16 - *	     linux_logo_green[0],
   51.17 - *	     linux_logo_blue[0]) is color 0x20)
   51.18 - * BW image has to be 80x80 as well, with MS bit
   51.19 - * on the left
   51.20 - * Serial_console ascii image can be any size,
   51.21 - * but should contain %s to display the version
   51.22 - */
   51.23 - 
   51.24 -#include <linux/init.h>
   51.25 -#include <linux/version.h>
   51.26 -
   51.27 -#define linux_logo_banner "Linux/ia32 version " UTS_RELEASE
   51.28 -
   51.29 -#include <linux/linux_logo.h>
   51.30 -
    52.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/locks.h	Tue Mar 11 14:37:27 2003 +0000
    52.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    52.3 @@ -1,135 +0,0 @@
    52.4 -/*
    52.5 - *	SMP locks primitives for building ix86 locks
    52.6 - *	(not yet used).
    52.7 - *
    52.8 - *		Alan Cox, alan@redhat.com, 1995
    52.9 - */
   52.10 - 
   52.11 -/*
   52.12 - *	This would be much easier but far less clear and easy
   52.13 - *	to borrow for other processors if it was just assembler.
   52.14 - */
   52.15 -
   52.16 -static __inline__ void prim_spin_lock(struct spinlock *sp)
   52.17 -{
   52.18 -	int processor=smp_processor_id();
   52.19 -	
   52.20 -	/*
   52.21 -	 *	Grab the lock bit
   52.22 -	 */
   52.23 -	 
   52.24 -	while(lock_set_bit(0,&sp->lock))
   52.25 -	{
   52.26 -		/*
   52.27 -		 *	Failed, but that's cos we own it!
   52.28 -		 */
   52.29 -		 
   52.30 -		if(sp->cpu==processor)
   52.31 -		{
   52.32 -			sp->users++;
   52.33 -			return 0;
   52.34 -		}
   52.35 -		/*
   52.36 -		 *	Spin in the cache S state if possible
   52.37 -		 */
   52.38 -		while(sp->lock)
   52.39 -		{
   52.40 -			/*
   52.41 -			 *	Wait for any invalidates to go off
   52.42 -			 */
   52.43 -			 
   52.44 -			if(smp_invalidate_needed&(1<<processor))
   52.45 -				while(lock_clear_bit(processor,&smp_invalidate_needed))
   52.46 -					local_flush_tlb();
   52.47 -			sp->spins++;
   52.48 -		}
   52.49 -		/*
   52.50 -		 *	Someone wrote the line, we go 'I' and get
   52.51 -		 *	the cache entry. Now try to regrab
   52.52 -		 */
   52.53 -	}
   52.54 -	sp->users++;sp->cpu=processor;
   52.55 -	return 1;
   52.56 -}
   52.57 -
   52.58 -/*
   52.59 - *	Release a spin lock
   52.60 - */
   52.61 - 
   52.62 -static __inline__ int prim_spin_unlock(struct spinlock *sp)
   52.63 -{
   52.64 -	/* This is safe. The decrement is still guarded by the lock. A multilock would
   52.65 -	   not be safe this way */
   52.66 -	if(!--sp->users)
   52.67 -	{
   52.68 -		sp->cpu= NO_PROC_ID;lock_clear_bit(0,&sp->lock);
   52.69 -		return 1;
   52.70 -	}
   52.71 -	return 0;
   52.72 -}
   52.73 -
   52.74 -
   52.75 -/*
   52.76 - *	Non blocking lock grab
   52.77 - */
   52.78 - 
   52.79 -static __inline__ int prim_spin_lock_nb(struct spinlock *sp)
   52.80 -{
   52.81 -	if(lock_set_bit(0,&sp->lock))
   52.82 -		return 0;		/* Locked already */
   52.83 -	sp->users++;
   52.84 -	return 1;			/* We got the lock */
   52.85 -}
   52.86 -
   52.87 -
   52.88 -/*
   52.89 - *	These wrap the locking primitives up for usage
   52.90 - */
   52.91 - 
   52.92 -static __inline__ void spinlock(struct spinlock *sp)
   52.93 -{
   52.94 -	if(sp->priority<current->lock_order)
   52.95 -		panic("lock order violation: %s (%d)\n", sp->name, current->lock_order);
   52.96 -	if(prim_spin_lock(sp))
   52.97 -	{
   52.98 -		/*
   52.99 -		 *	We got a new lock. Update the priority chain
  52.100 -		 */
  52.101 -		sp->oldpri=current->lock_order;
  52.102 -		current->lock_order=sp->priority;
  52.103 -	}
  52.104 -}
  52.105 -
  52.106 -static __inline__ void spinunlock(struct spinlock *sp)
  52.107 -{
  52.108 -	int pri;
  52.109 -	if(current->lock_order!=sp->priority)
  52.110 -		panic("lock release order violation %s (%d)\n", sp->name, current->lock_order);
  52.111 -	pri=sp->oldpri;
  52.112 -	if(prim_spin_unlock(sp))
  52.113 -	{
  52.114 -		/*
  52.115 -		 *	Update the debugging lock priority chain. We dumped
  52.116 -		 *	our last right to the lock.
  52.117 -		 */
  52.118 -		current->lock_order=sp->pri;
  52.119 -	}	
  52.120 -}
  52.121 -
  52.122 -static __inline__ void spintestlock(struct spinlock *sp)
  52.123 -{
  52.124 -	/*
  52.125 -	 *	We do no sanity checks, it's legal to optimistically
  52.126 -	 *	get a lower lock.
  52.127 -	 */
  52.128 -	prim_spin_lock_nb(sp);
  52.129 -}
  52.130 -
  52.131 -static __inline__ void spintestunlock(struct spinlock *sp)
  52.132 -{
  52.133 -	/*
  52.134 -	 *	A testlock doesn't update the lock chain so we
  52.135 -	 *	must not update it on free
  52.136 -	 */
  52.137 -	prim_spin_unlock(sp);
  52.138 -}
    53.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/math_emu.h	Tue Mar 11 14:37:27 2003 +0000
    53.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    53.3 @@ -1,35 +0,0 @@
    53.4 -#ifndef _I386_MATH_EMU_H
    53.5 -#define _I386_MATH_EMU_H
    53.6 -
    53.7 -#include <asm/sigcontext.h>
    53.8 -
    53.9 -int restore_i387_soft(void *s387, struct _fpstate *buf);
   53.10 -int save_i387_soft(void *s387, struct _fpstate * buf);
   53.11 -
   53.12 -/* This structure matches the layout of the data saved to the stack
   53.13 -   following a device-not-present interrupt, part of it saved
   53.14 -   automatically by the 80386/80486.
   53.15 -   */
   53.16 -struct info {
   53.17 -	long ___orig_eip;
   53.18 -	long ___ebx;
   53.19 -	long ___ecx;
   53.20 -	long ___edx;
   53.21 -	long ___esi;
   53.22 -	long ___edi;
   53.23 -	long ___ebp;
   53.24 -	long ___eax;
   53.25 -	long ___ds;
   53.26 -	long ___es;
   53.27 -	long ___orig_eax;
   53.28 -	long ___eip;
   53.29 -	long ___cs;
   53.30 -	long ___eflags;
   53.31 -	long ___esp;
   53.32 -	long ___ss;
   53.33 -	long ___vm86_es; /* This and the following only in vm86 mode */
   53.34 -	long ___vm86_ds;
   53.35 -	long ___vm86_fs;
   53.36 -	long ___vm86_gs;
   53.37 -};
   53.38 -#endif
    54.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mc146818rtc.h	Tue Mar 11 14:37:27 2003 +0000
    54.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    54.3 @@ -1,29 +0,0 @@
    54.4 -/*
    54.5 - * Machine dependent access functions for RTC registers.
    54.6 - */
    54.7 -#ifndef _ASM_MC146818RTC_H
    54.8 -#define _ASM_MC146818RTC_H
    54.9 -
   54.10 -#include <asm/io.h>
   54.11 -
   54.12 -#ifndef RTC_PORT
   54.13 -#define RTC_PORT(x)	(0x70 + (x))
   54.14 -#define RTC_ALWAYS_BCD	1	/* RTC operates in binary mode */
   54.15 -#endif
   54.16 -
   54.17 -/*
   54.18 - * The yet supported machines all access the RTC index register via
   54.19 - * an ISA port access but the way to access the date register differs ...
   54.20 - */
   54.21 -#define CMOS_READ(addr) ({ \
   54.22 -outb_p((addr),RTC_PORT(0)); \
   54.23 -inb_p(RTC_PORT(1)); \
   54.24 -})
   54.25 -#define CMOS_WRITE(val, addr) ({ \
   54.26 -outb_p((addr),RTC_PORT(0)); \
   54.27 -outb_p((val),RTC_PORT(1)); \
   54.28 -})
   54.29 -
   54.30 -#define RTC_IRQ 8
   54.31 -
   54.32 -#endif /* _ASM_MC146818RTC_H */
    55.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mca_dma.h	Tue Mar 11 14:37:27 2003 +0000
    55.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    55.3 @@ -1,202 +0,0 @@
    55.4 -#ifndef MCA_DMA_H
    55.5 -#define MCA_DMA_H
    55.6 -
    55.7 -#include <asm/io.h>
    55.8 -#include <linux/ioport.h>
    55.9 -
   55.10 -/*
   55.11 - * Microchannel specific DMA stuff.  DMA on an MCA machine is fairly similar to
   55.12 - *   standard PC dma, but it certainly has its quirks.  DMA register addresses
   55.13 - *   are in a different place and there are some added functions.  Most of this
   55.14 - *   should be pretty obvious on inspection.  Note that the user must divide
   55.15 - *   count by 2 when using 16-bit dma; that is not handled by these functions.
   55.16 - *
   55.17 - * Ramen Noodles are yummy.
   55.18 - * 
   55.19 - *  1998 Tymm Twillman <tymm@computer.org>  
   55.20 - */
   55.21 -
   55.22 -/*
   55.23 - * Registers that are used by the DMA controller; FN is the function register 
   55.24 - *   (tell the controller what to do) and EXE is the execution register (how
   55.25 - *   to do it)
   55.26 - */
   55.27 -
   55.28 -#define MCA_DMA_REG_FN  0x18
   55.29 -#define MCA_DMA_REG_EXE 0x1A 
   55.30 -
   55.31 -/*
   55.32 - * Functions that the DMA controller can do
   55.33 - */
   55.34 -
   55.35 -#define MCA_DMA_FN_SET_IO       0x00
   55.36 -#define MCA_DMA_FN_SET_ADDR     0x20
   55.37 -#define MCA_DMA_FN_GET_ADDR     0x30
   55.38 -#define MCA_DMA_FN_SET_COUNT    0x40
   55.39 -#define MCA_DMA_FN_GET_COUNT    0x50
   55.40 -#define MCA_DMA_FN_GET_STATUS   0x60
   55.41 -#define MCA_DMA_FN_SET_MODE     0x70
   55.42 -#define MCA_DMA_FN_SET_ARBUS    0x80
   55.43 -#define MCA_DMA_FN_MASK         0x90
   55.44 -#define MCA_DMA_FN_RESET_MASK   0xA0
   55.45 -#define MCA_DMA_FN_MASTER_CLEAR 0xD0
   55.46 -
   55.47 -/*
   55.48 - * Modes (used by setting MCA_DMA_FN_MODE in the function register)
   55.49 - * 
   55.50 - * Note that the MODE_READ is read from memory (write to device), and
   55.51 - *   MODE_WRITE is vice-versa.  
   55.52 - */
   55.53 -
   55.54 -#define MCA_DMA_MODE_XFER  0x04  /* read by default */
   55.55 -#define MCA_DMA_MODE_READ  0x04  /* same as XFER */
   55.56 -#define MCA_DMA_MODE_WRITE 0x08  /* OR with MODE_XFER to use */
   55.57 -#define MCA_DMA_MODE_IO    0x01  /* DMA from IO register */
   55.58 -#define MCA_DMA_MODE_16    0x40  /* 16 bit xfers */
   55.59 -
   55.60 -
   55.61 -/**
   55.62 - *	mca_enable_dma	-	channel to enable DMA on
   55.63 - *	@dmanr: DMA channel
   55.64 - *
   55.65 - *	Enable the MCA bus DMA on a channel. This can be called from
   55.66 - *	IRQ context.
   55.67 - */
   55.68 -
   55.69 -static __inline__ void mca_enable_dma(unsigned int dmanr)
   55.70 -{
   55.71 -	outb(MCA_DMA_FN_RESET_MASK | dmanr, MCA_DMA_REG_FN);
   55.72 -}
   55.73 -
   55.74 -/**
   55.75 - *	mca_disble_dma	-	channel to disable DMA on
   55.76 - *	@dmanr: DMA channel
   55.77 - *
   55.78 - *	Enable the MCA bus DMA on a channel. This can be called from
   55.79 - *	IRQ context.
   55.80 - */
   55.81 -
   55.82 -static __inline__ void mca_disable_dma(unsigned int dmanr)
   55.83 -{
   55.84 -	outb(MCA_DMA_FN_MASK | dmanr, MCA_DMA_REG_FN);
   55.85 -}
   55.86 -
   55.87 -/**
   55.88 - *	mca_set_dma_addr -	load a 24bit DMA address
   55.89 - *	@dmanr: DMA channel
   55.90 - *	@a: 24bit bus address
   55.91 - *
   55.92 - *	Load the address register in the DMA controller. This has a 24bit
   55.93 - *	limitation (16Mb). 
   55.94 - */
   55.95 -
   55.96 -static __inline__ void mca_set_dma_addr(unsigned int dmanr, unsigned int a)
   55.97 -{
   55.98 -	outb(MCA_DMA_FN_SET_ADDR | dmanr, MCA_DMA_REG_FN);
   55.99 -	outb(a & 0xff, MCA_DMA_REG_EXE);
  55.100 -	outb((a >> 8) & 0xff, MCA_DMA_REG_EXE);
  55.101 -	outb((a >> 16) & 0xff, MCA_DMA_REG_EXE);
  55.102 -}
  55.103 -
  55.104 -/**
  55.105 - *	mca_get_dma_addr -	load a 24bit DMA address
  55.106 - *	@dmanr: DMA channel
  55.107 - *
  55.108 - *	Read the address register in the DMA controller. This has a 24bit
  55.109 - *	limitation (16Mb). The return is a bus address.
  55.110 - */
  55.111 -
  55.112 -static __inline__ unsigned int mca_get_dma_addr(unsigned int dmanr)
  55.113 -{
  55.114 -	unsigned int addr;
  55.115 -
  55.116 -	outb(MCA_DMA_FN_GET_ADDR | dmanr, MCA_DMA_REG_FN);
  55.117 -	addr = inb(MCA_DMA_REG_EXE);
  55.118 -	addr |= inb(MCA_DMA_REG_EXE) << 8;
  55.119 -	addr |= inb(MCA_DMA_REG_EXE) << 16;  
  55.120 -
  55.121 -	return addr;
  55.122 -}
  55.123 -
  55.124 -/**
  55.125 - *	mca_set_dma_count -	load a 16bit transfer count
  55.126 - *	@dmanr: DMA channel
  55.127 - *	@count: count
  55.128 - *
  55.129 - *	Set the DMA count for this channel. This can be up to 64Kbytes.
  55.130 - *	Setting a count of zero will not do what you expect.
  55.131 - */
  55.132 -
  55.133 -static __inline__ void mca_set_dma_count(unsigned int dmanr, unsigned int count)
  55.134 -{
  55.135 -	count--;  /* transfers one more than count -- correct for this */
  55.136 -
  55.137 -	outb(MCA_DMA_FN_SET_COUNT | dmanr, MCA_DMA_REG_FN);
  55.138 -	outb(count & 0xff, MCA_DMA_REG_EXE);
  55.139 -	outb((count >> 8) & 0xff, MCA_DMA_REG_EXE);
  55.140 -}
  55.141 -
  55.142 -/**
  55.143 - *	mca_get_dma_residue -	get the remaining bytes to transfer
  55.144 - *	@dmanr: DMA channel
  55.145 - *
  55.146 - *	This function returns the number of bytes left to transfer
  55.147 - *	on this DMA channel.
  55.148 - */
  55.149 -
  55.150 -static __inline__ unsigned int mca_get_dma_residue(unsigned int dmanr)
  55.151 -{
  55.152 -	unsigned short count;
  55.153 -
  55.154 -	outb(MCA_DMA_FN_GET_COUNT | dmanr, MCA_DMA_REG_FN);
  55.155 -	count = 1 + inb(MCA_DMA_REG_EXE);
  55.156 -	count += inb(MCA_DMA_REG_EXE) << 8;
  55.157 -
  55.158 -	return count;
  55.159 -}
  55.160 -
  55.161 -/**
  55.162 - *	mca_set_dma_io -	set the port for an I/O transfer
  55.163 - *	@dmanr: DMA channel
  55.164 - *	@io_addr: an I/O port number
  55.165 - *
  55.166 - *	Unlike the ISA bus DMA controllers the DMA on MCA bus can transfer
  55.167 - *	with an I/O port target.
  55.168 - */
  55.169 -
  55.170 -static __inline__ void mca_set_dma_io(unsigned int dmanr, unsigned int io_addr)
  55.171 -{
  55.172 -	/*
  55.173 -	 * DMA from a port address -- set the io address
  55.174 -	 */
  55.175 -	
  55.176 -	outb(MCA_DMA_FN_SET_IO | dmanr, MCA_DMA_REG_FN);
  55.177 -	outb(io_addr & 0xff, MCA_DMA_REG_EXE);
  55.178 -	outb((io_addr >>  8) & 0xff, MCA_DMA_REG_EXE);
  55.179 -}
  55.180 -
  55.181 -/**
  55.182 - *	mca_set_dma_mode -	set the DMA mode
  55.183 - *	@dmanr: DMA channel
  55.184 - *	@mode: mode to set
  55.185 - *
  55.186 - *	The DMA controller supports several modes. The mode values you can
  55.187 - *	set are :
  55.188 - *
  55.189 - *	%MCA_DMA_MODE_READ when reading from the DMA device.
  55.190 - *
  55.191 - *	%MCA_DMA_MODE_WRITE to writing to the DMA device.
  55.192 - *
  55.193 - *	%MCA_DMA_MODE_IO to do DMA to or from an I/O port.
  55.194 - *
  55.195 - *	%MCA_DMA_MODE_16 to do 16bit transfers.
  55.196 - *
  55.197 - */
  55.198 -
  55.199 -static __inline__ void mca_set_dma_mode(unsigned int dmanr, unsigned int mode)
  55.200 -{
  55.201 -	outb(MCA_DMA_FN_SET_MODE | dmanr, MCA_DMA_REG_FN);
  55.202 -	outb(mode, MCA_DMA_REG_EXE);
  55.203 -}
  55.204 -
  55.205 -#endif /* MCA_DMA_H */
    56.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mman.h	Tue Mar 11 14:37:27 2003 +0000
    56.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    56.3 @@ -1,38 +0,0 @@
    56.4 -#ifndef __I386_MMAN_H__
    56.5 -#define __I386_MMAN_H__
    56.6 -
    56.7 -#define PROT_READ	0x1		/* page can be read */
    56.8 -#define PROT_WRITE	0x2		/* page can be written */
    56.9 -#define PROT_EXEC	0x4		/* page can be executed */
   56.10 -#define PROT_NONE	0x0		/* page can not be accessed */
   56.11 -
   56.12 -#define MAP_SHARED	0x01		/* Share changes */
   56.13 -#define MAP_PRIVATE	0x02		/* Changes are private */
   56.14 -#define MAP_TYPE	0x0f		/* Mask for type of mapping */
   56.15 -#define MAP_FIXED	0x10		/* Interpret addr exactly */
   56.16 -#define MAP_ANONYMOUS	0x20		/* don't use a file */
   56.17 -
   56.18 -#define MAP_GROWSDOWN	0x0100		/* stack-like segment */
   56.19 -#define MAP_DENYWRITE	0x0800		/* ETXTBSY */
   56.20 -#define MAP_EXECUTABLE	0x1000		/* mark it as an executable */
   56.21 -#define MAP_LOCKED	0x2000		/* pages are locked */
   56.22 -#define MAP_NORESERVE	0x4000		/* don't check for reservations */
   56.23 -
   56.24 -#define MS_ASYNC	1		/* sync memory asynchronously */
   56.25 -#define MS_INVALIDATE	2		/* invalidate the caches */
   56.26 -#define MS_SYNC		4		/* synchronous memory sync */
   56.27 -
   56.28 -#define MCL_CURRENT	1		/* lock all current mappings */
   56.29 -#define MCL_FUTURE	2		/* lock all future mappings */
   56.30 -
   56.31 -#define MADV_NORMAL	0x0		/* default page-in behavior */
   56.32 -#define MADV_RANDOM	0x1		/* page-in minimum required */
   56.33 -#define MADV_SEQUENTIAL	0x2		/* read-ahead aggressively */
   56.34 -#define MADV_WILLNEED	0x3		/* pre-fault pages */
   56.35 -#define MADV_DONTNEED	0x4		/* discard these pages */
   56.36 -
   56.37 -/* compatibility flags */
   56.38 -#define MAP_ANON	MAP_ANONYMOUS
   56.39 -#define MAP_FILE	0
   56.40 -
   56.41 -#endif /* __I386_MMAN_H__ */
    57.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmx.h	Tue Mar 11 14:37:27 2003 +0000
    57.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    57.3 @@ -1,14 +0,0 @@
    57.4 -#ifndef _ASM_MMX_H
    57.5 -#define _ASM_MMX_H
    57.6 -
    57.7 -/*
    57.8 - *	MMX 3Dnow! helper operations
    57.9 - */
   57.10 -
   57.11 -#include <linux/types.h>
   57.12 - 
   57.13 -extern void *_mmx_memcpy(void *to, const void *from, size_t size);
   57.14 -extern void mmx_clear_page(void *page);
   57.15 -extern void mmx_copy_page(void *to, void *from);
   57.16 -
   57.17 -#endif
    58.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/module.h	Tue Mar 11 14:37:27 2003 +0000
    58.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    58.3 @@ -1,12 +0,0 @@
    58.4 -#ifndef _ASM_I386_MODULE_H
    58.5 -#define _ASM_I386_MODULE_H
    58.6 -/*
    58.7 - * This file contains the i386 architecture specific module code.
    58.8 - */
    58.9 -
   58.10 -#define module_map(x)		vmalloc(x)
   58.11 -#define module_unmap(x)		vfree(x)
   58.12 -#define module_arch_init(x)	(0)
   58.13 -#define arch_init_modules(x)	do { } while (0)
   58.14 -
   58.15 -#endif /* _ASM_I386_MODULE_H */
    59.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mpspec.h	Tue Mar 11 14:37:27 2003 +0000
    59.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    59.3 @@ -1,223 +0,0 @@
    59.4 -#ifndef __ASM_MPSPEC_H
    59.5 -#define __ASM_MPSPEC_H
    59.6 -
    59.7 -/*
    59.8 - * Structure definitions for SMP machines following the
    59.9 - * Intel Multiprocessing Specification 1.1 and 1.4.
   59.10 - */
   59.11 -
   59.12 -/*
   59.13 - * This tag identifies where the SMP configuration
   59.14 - * information is. 
   59.15 - */
   59.16 - 
   59.17 -#define SMP_MAGIC_IDENT	(('_'<<24)|('P'<<16)|('M'<<8)|'_')
   59.18 -
   59.19 -/*
   59.20 - * a maximum of 16 APICs with the current APIC ID architecture.
   59.21 - * xAPICs can have up to 256.  SAPICs have 16 ID bits.
   59.22 - */
   59.23 -#ifdef CONFIG_X86_CLUSTERED_APIC
   59.24 -#define MAX_APICS 256
   59.25 -#else
   59.26 -#define MAX_APICS 16
   59.27 -#endif
   59.28 -
   59.29 -#define MAX_MPC_ENTRY 1024
   59.30 -
   59.31 -struct intel_mp_floating
   59.32 -{
   59.33 -	char mpf_signature[4];		/* "_MP_" 			*/
   59.34 -	unsigned long mpf_physptr;	/* Configuration table address	*/
   59.35 -	unsigned char mpf_length;	/* Our length (paragraphs)	*/
   59.36 -	unsigned char mpf_specification;/* Specification version	*/
   59.37 -	unsigned char mpf_checksum;	/* Checksum (makes sum 0)	*/
   59.38 -	unsigned char mpf_feature1;	/* Standard or configuration ? 	*/
   59.39 -	unsigned char mpf_feature2;	/* Bit7 set for IMCR|PIC	*/
   59.40 -	unsigned char mpf_feature3;	/* Unused (0)			*/
   59.41 -	unsigned char mpf_feature4;	/* Unused (0)			*/
   59.42 -	unsigned char mpf_feature5;	/* Unused (0)			*/
   59.43 -};
   59.44 -
   59.45 -struct mp_config_table
   59.46 -{
   59.47 -	char mpc_signature[4];
   59.48 -#define MPC_SIGNATURE "PCMP"
   59.49 -	unsigned short mpc_length;	/* Size of table */
   59.50 -	char  mpc_spec;			/* 0x01 */
   59.51 -	char  mpc_checksum;
   59.52 -	char  mpc_oem[8];
   59.53 -	char  mpc_productid[12];
   59.54 -	unsigned long mpc_oemptr;	/* 0 if not present */
   59.55 -	unsigned short mpc_oemsize;	/* 0 if not present */
   59.56 -	unsigned short mpc_oemcount;
   59.57 -	unsigned long mpc_lapic;	/* APIC address */
   59.58 -	unsigned long reserved;
   59.59 -};
   59.60 -
   59.61 -/* Followed by entries */
   59.62 -
   59.63 -#define	MP_PROCESSOR	0
   59.64 -#define	MP_BUS		1
   59.65 -#define	MP_IOAPIC	2
   59.66 -#define	MP_INTSRC	3
   59.67 -#define	MP_LINTSRC	4
   59.68 -#define	MP_TRANSLATION  192  /* Used by IBM NUMA-Q to describe node locality */
   59.69 -
   59.70 -struct mpc_config_processor
   59.71 -{
   59.72 -	unsigned char mpc_type;
   59.73 -	unsigned char mpc_apicid;	/* Local APIC number */
   59.74 -	unsigned char mpc_apicver;	/* Its versions */
   59.75 -	unsigned char mpc_cpuflag;
   59.76 -#define CPU_ENABLED		1	/* Processor is available */
   59.77 -#define CPU_BOOTPROCESSOR	2	/* Processor is the BP */
   59.78 -	unsigned long mpc_cpufeature;		
   59.79 -#define CPU_STEPPING_MASK 0x0F
   59.80 -#define CPU_MODEL_MASK	0xF0
   59.81 -#define CPU_FAMILY_MASK	0xF00
   59.82 -	unsigned long mpc_featureflag;	/* CPUID feature value */
   59.83 -	unsigned long mpc_reserved[2];
   59.84 -};
   59.85 -
   59.86 -struct mpc_config_bus
   59.87 -{
   59.88 -	unsigned char mpc_type;
   59.89 -	unsigned char mpc_busid;
   59.90 -	unsigned char mpc_bustype[6] __attribute((packed));
   59.91 -};
   59.92 -
   59.93 -/* List of Bus Type string values, Intel MP Spec. */
   59.94 -#define BUSTYPE_EISA	"EISA"
   59.95 -#define BUSTYPE_ISA	"ISA"
   59.96 -#define BUSTYPE_INTERN	"INTERN"	/* Internal BUS */
   59.97 -#define BUSTYPE_MCA	"MCA"
   59.98 -#define BUSTYPE_VL	"VL"		/* Local bus */
   59.99 -#define BUSTYPE_PCI	"PCI"
  59.100 -#define BUSTYPE_PCMCIA	"PCMCIA"
  59.101 -#define BUSTYPE_CBUS	"CBUS"
  59.102 -#define BUSTYPE_CBUSII	"CBUSII"
  59.103 -#define BUSTYPE_FUTURE	"FUTURE"
  59.104 -#define BUSTYPE_MBI	"MBI"
  59.105 -#define BUSTYPE_MBII	"MBII"
  59.106 -#define BUSTYPE_MPI	"MPI"
  59.107 -#define BUSTYPE_MPSA	"MPSA"
  59.108 -#define BUSTYPE_NUBUS	"NUBUS"
  59.109 -#define BUSTYPE_TC	"TC"
  59.110 -#define BUSTYPE_VME	"VME"
  59.111 -#define BUSTYPE_XPRESS	"XPRESS"
  59.112 -
  59.113 -struct mpc_config_ioapic
  59.114 -{
  59.115 -	unsigned char mpc_type;
  59.116 -	unsigned char mpc_apicid;
  59.117 -	unsigned char mpc_apicver;
  59.118 -	unsigned char mpc_flags;
  59.119 -#define MPC_APIC_USABLE		0x01
  59.120 -	unsigned long mpc_apicaddr;
  59.121 -};
  59.122 -
  59.123 -struct mpc_config_intsrc
  59.124 -{
  59.125 -	unsigned char mpc_type;
  59.126 -	unsigned char mpc_irqtype;
  59.127 -	unsigned short mpc_irqflag;
  59.128 -	unsigned char mpc_srcbus;
  59.129 -	unsigned char mpc_srcbusirq;
  59.130 -	unsigned char mpc_dstapic;
  59.131 -	unsigned char mpc_dstirq;
  59.132 -};
  59.133 -
  59.134 -enum mp_irq_source_types {
  59.135 -	mp_INT = 0,
  59.136 -	mp_NMI = 1,
  59.137 -	mp_SMI = 2,
  59.138 -	mp_ExtINT = 3
  59.139 -};
  59.140 -
  59.141 -#define MP_IRQDIR_DEFAULT	0
  59.142 -#define MP_IRQDIR_HIGH		1
  59.143 -#define MP_IRQDIR_LOW		3
  59.144 -
  59.145 -
  59.146 -struct mpc_config_lintsrc
  59.147 -{
  59.148 -	unsigned char mpc_type;
  59.149 -	unsigned char mpc_irqtype;
  59.150 -	unsigned short mpc_irqflag;
  59.151 -	unsigned char mpc_srcbusid;
  59.152 -	unsigned char mpc_srcbusirq;
  59.153 -	unsigned char mpc_destapic;	
  59.154 -#define MP_APIC_ALL	0xFF
  59.155 -	unsigned char mpc_destapiclint;
  59.156 -};
  59.157 -
  59.158 -struct mp_config_oemtable
  59.159 -{
  59.160 -	char oem_signature[4];
  59.161 -#define MPC_OEM_SIGNATURE "_OEM"
  59.162 -	unsigned short oem_length;	/* Size of table */
  59.163 -	char  oem_rev;			/* 0x01 */
  59.164 -	char  oem_checksum;
  59.165 -	char  mpc_oem[8];
  59.166 -};
  59.167 -
  59.168 -struct mpc_config_translation
  59.169 -{
  59.170 -        unsigned char mpc_type;
  59.171 -        unsigned char trans_len;
  59.172 -        unsigned char trans_type;
  59.173 -        unsigned char trans_quad;
  59.174 -        unsigned char trans_global;
  59.175 -        unsigned char trans_local;
  59.176 -        unsigned short trans_reserved;
  59.177 -};
  59.178 -
  59.179 -/*
  59.180 - *	Default configurations
  59.181 - *
  59.182 - *	1	2 CPU ISA 82489DX
  59.183 - *	2	2 CPU EISA 82489DX neither IRQ 0 timer nor IRQ 13 DMA chaining
  59.184 - *	3	2 CPU EISA 82489DX
  59.185 - *	4	2 CPU MCA 82489DX
  59.186 - *	5	2 CPU ISA+PCI
  59.187 - *	6	2 CPU EISA+PCI
  59.188 - *	7	2 CPU MCA+PCI
  59.189 - */
  59.190 -
  59.191 -#ifdef CONFIG_MULTIQUAD
  59.192 -#define MAX_IRQ_SOURCES 512
  59.193 -#else /* !CONFIG_MULTIQUAD */
  59.194 -#define MAX_IRQ_SOURCES 256
  59.195 -#endif /* CONFIG_MULTIQUAD */
  59.196 -
  59.197 -#define MAX_MP_BUSSES 32
  59.198 -enum mp_bustype {
  59.199 -	MP_BUS_ISA = 1,
  59.200 -	MP_BUS_EISA,
  59.201 -	MP_BUS_PCI,
  59.202 -	MP_BUS_MCA
  59.203 -};
  59.204 -extern int *mp_bus_id_to_type;
  59.205 -extern int *mp_bus_id_to_node;
  59.206 -extern int *mp_bus_id_to_local;
  59.207 -extern int *mp_bus_id_to_pci_bus;
  59.208 -extern int quad_local_to_mp_bus_id [NR_CPUS/4][4];
  59.209 -
  59.210 -extern unsigned int boot_cpu_physical_apicid;
  59.211 -extern unsigned long phys_cpu_present_map;
  59.212 -extern int smp_found_config;
  59.213 -extern void find_smp_config (void);
  59.214 -extern void get_smp_config (void);
  59.215 -extern int nr_ioapics;
  59.216 -extern int apic_version [MAX_APICS];
  59.217 -extern int mp_irq_entries;
  59.218 -extern struct mpc_config_intsrc *mp_irqs;
  59.219 -extern int mpc_default_type;
  59.220 -extern int mp_current_pci_id;
  59.221 -extern unsigned long mp_lapic_addr;
  59.222 -extern int pic_mode;
  59.223 -extern int using_apic_timer;
  59.224 -
  59.225 -#endif
  59.226 -
    60.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msgbuf.h	Tue Mar 11 14:37:27 2003 +0000
    60.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    60.3 @@ -1,31 +0,0 @@
    60.4 -#ifndef _I386_MSGBUF_H
    60.5 -#define _I386_MSGBUF_H
    60.6 -
    60.7 -/* 
    60.8 - * The msqid64_ds structure for i386 architecture.
    60.9 - * Note extra padding because this structure is passed back and forth
   60.10 - * between kernel and user space.
   60.11 - *
   60.12 - * Pad space is left for:
   60.13 - * - 64-bit time_t to solve y2038 problem
   60.14 - * - 2 miscellaneous 32-bit values
   60.15 - */
   60.16 -
   60.17 -struct msqid64_ds {
   60.18 -	struct ipc64_perm msg_perm;
   60.19 -	__kernel_time_t msg_stime;	/* last msgsnd time */
   60.20 -	unsigned long	__unused1;
   60.21 -	__kernel_time_t msg_rtime;	/* last msgrcv time */
   60.22 -	unsigned long	__unused2;
   60.23 -	__kernel_time_t msg_ctime;	/* last change time */
   60.24 -	unsigned long	__unused3;
   60.25 -	unsigned long  msg_cbytes;	/* current number of bytes on queue */
   60.26 -	unsigned long  msg_qnum;	/* number of messages in queue */
   60.27 -	unsigned long  msg_qbytes;	/* max number of bytes on queue */
   60.28 -	__kernel_pid_t msg_lspid;	/* pid of last msgsnd */
   60.29 -	__kernel_pid_t msg_lrpid;	/* last receive pid */
   60.30 -	unsigned long  __unused4;
   60.31 -	unsigned long  __unused5;
   60.32 -};
   60.33 -
   60.34 -#endif /* _I386_MSGBUF_H */
    61.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msr.h	Tue Mar 11 14:37:27 2003 +0000
    61.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    61.3 @@ -1,121 +0,0 @@
    61.4 -#ifndef __ASM_MSR_H
    61.5 -#define __ASM_MSR_H
    61.6 -
    61.7 -/*
    61.8 - * Access to machine-specific registers (available on 586 and better only)
    61.9 - * Note: the rd* operations modify the parameters directly (without using
   61.10 - * pointer indirection), this allows gcc to optimize better
   61.11 - */
   61.12 -
   61.13 -#define rdmsr(msr,val1,val2) \
   61.14 -     __asm__ __volatile__("rdmsr" \
   61.15 -			  : "=a" (val1), "=d" (val2) \
   61.16 -			  : "c" (msr))
   61.17 -
   61.18 -#define wrmsr(msr,val1,val2) \
   61.19 -     __asm__ __volatile__("wrmsr" \
   61.20 -			  : /* no outputs */ \
   61.21 -			  : "c" (msr), "a" (val1), "d" (val2))
   61.22 -
   61.23 -#define rdtsc(low,high) \
   61.24 -     __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))
   61.25 -
   61.26 -#define rdtscl(low) \
   61.27 -     __asm__ __volatile__("rdtsc" : "=a" (low) : : "edx")
   61.28 -
   61.29 -#define rdtscll(val) \
   61.30 -     __asm__ __volatile__("rdtsc" : "=A" (val))
   61.31 -
   61.32 -#define write_tsc(val1,val2) wrmsr(0x10, val1, val2)
   61.33 -
   61.34 -#define rdpmc(counter,low,high) \
   61.35 -     __asm__ __volatile__("rdpmc" \
   61.36 -			  : "=a" (low), "=d" (high) \
   61.37 -			  : "c" (counter))
   61.38 -
   61.39 -/* symbolic names for some interesting MSRs */
   61.40 -/* Intel defined MSRs. */
   61.41 -#define MSR_IA32_P5_MC_ADDR		0
   61.42 -#define MSR_IA32_P5_MC_TYPE		1
   61.43 -#define MSR_IA32_PLATFORM_ID		0x17
   61.44 -#define MSR_IA32_EBL_CR_POWERON		0x2a
   61.45 -
   61.46 -#define MSR_IA32_APICBASE		0x1b
   61.47 -#define MSR_IA32_APICBASE_BSP		(1<<8)
   61.48 -#define MSR_IA32_APICBASE_ENABLE	(1<<11)
   61.49 -#define MSR_IA32_APICBASE_BASE		(0xfffff<<12)
   61.50 -
   61.51 -#define MSR_IA32_UCODE_WRITE		0x79
   61.52 -#define MSR_IA32_UCODE_REV		0x8b
   61.53 -
   61.54 -#define MSR_IA32_BBL_CR_CTL		0x119
   61.55 -
   61.56 -#define MSR_IA32_MCG_CAP		0x179
   61.57 -#define MSR_IA32_MCG_STATUS		0x17a
   61.58 -#define MSR_IA32_MCG_CTL		0x17b
   61.59 -
   61.60 -#define MSR_IA32_THERM_CONTROL		0x19a
   61.61 -#define MSR_IA32_THERM_INTERRUPT	0x19b
   61.62 -#define MSR_IA32_THERM_STATUS		0x19c
   61.63 -#define MSR_IA32_MISC_ENABLE		0x1a0
   61.64 -
   61.65 -#define MSR_IA32_DEBUGCTLMSR		0x1d9
   61.66 -#define MSR_IA32_LASTBRANCHFROMIP	0x1db
   61.67 -#define MSR_IA32_LASTBRANCHTOIP		0x1dc
   61.68 -#define MSR_IA32_LASTINTFROMIP		0x1dd
   61.69 -#define MSR_IA32_LASTINTTOIP		0x1de
   61.70 -
   61.71 -#define MSR_IA32_MC0_CTL		0x400
   61.72 -#define MSR_IA32_MC0_STATUS		0x401
   61.73 -#define MSR_IA32_MC0_ADDR		0x402
   61.74 -#define MSR_IA32_MC0_MISC		0x403
   61.75 -
   61.76 -#define MSR_P6_PERFCTR0			0xc1
   61.77 -#define MSR_P6_PERFCTR1			0xc2
   61.78 -#define MSR_P6_EVNTSEL0			0x186
   61.79 -#define MSR_P6_EVNTSEL1			0x187
   61.80 -
   61.81 -/* AMD Defined MSRs */
   61.82 -#define MSR_K6_EFER			0xC0000080
   61.83 -#define MSR_K6_STAR			0xC0000081
   61.84 -#define MSR_K6_WHCR			0xC0000082
   61.85 -#define MSR_K6_UWCCR			0xC0000085
   61.86 -#define MSR_K6_EPMR			0xC0000086
   61.87 -#define MSR_K6_PSOR			0xC0000087
   61.88 -#define MSR_K6_PFIR			0xC0000088
   61.89 -
   61.90 -#define MSR_K7_EVNTSEL0			0xC0010000
   61.91 -#define MSR_K7_PERFCTR0			0xC0010004
   61.92 -#define MSR_K7_HWCR			0xC0010015
   61.93 -#define MSR_K7_CLK_CTL			0xC001001b
   61.94 -#define MSR_K7_FID_VID_CTL		0xC0010041
   61.95 -#define MSR_K7_VID_STATUS		0xC0010042
   61.96 -
   61.97 -/* Centaur-Hauls/IDT defined MSRs. */
   61.98 -#define MSR_IDT_FCR1			0x107
   61.99 -#define MSR_IDT_FCR2			0x108
  61.100 -#define MSR_IDT_FCR3			0x109
  61.101 -#define MSR_IDT_FCR4			0x10a
  61.102 -
  61.103 -#define MSR_IDT_MCR0			0x110
  61.104 -#define MSR_IDT_MCR1			0x111
  61.105 -#define MSR_IDT_MCR2			0x112
  61.106 -#define MSR_IDT_MCR3			0x113
  61.107 -#define MSR_IDT_MCR4			0x114
  61.108 -#define MSR_IDT_MCR5			0x115
  61.109 -#define MSR_IDT_MCR6			0x116
  61.110 -#define MSR_IDT_MCR7			0x117
  61.111 -#define MSR_IDT_MCR_CTRL		0x120
  61.112 -
  61.113 -/* VIA Cyrix defined MSRs*/
  61.114 -#define MSR_VIA_FCR			0x1107
  61.115 -#define MSR_VIA_LONGHAUL		0x110a
  61.116 -#define MSR_VIA_BCR2			0x1147
  61.117 -
  61.118 -/* Transmeta defined MSRs */
  61.119 -#define MSR_TMTA_LONGRUN_CTRL		0x80868010
  61.120 -#define MSR_TMTA_LONGRUN_FLAGS		0x80868011
  61.121 -#define MSR_TMTA_LRTI_READOUT		0x80868018
  61.122 -#define MSR_TMTA_LRTI_VOLT_MHZ		0x8086801a
  61.123 -
  61.124 -#endif /* __ASM_MSR_H */
    62.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mtrr.h	Tue Mar 11 14:37:27 2003 +0000
    62.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    62.3 @@ -1,127 +0,0 @@
    62.4 -/*  Generic MTRR (Memory Type Range Register) ioctls.
    62.5 -
    62.6 -    Copyright (C) 1997-1999  Richard Gooch
    62.7 -
    62.8 -    This library is free software; you can redistribute it and/or
    62.9 -    modify it under the terms of the GNU Library General Public
   62.10 -    License as published by the Free Software Foundation; either
   62.11 -    version 2 of the License, or (at your option) any later version.
   62.12 -
   62.13 -    This library is distributed in the hope that it will be useful,
   62.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   62.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   62.16 -    Library General Public License for more details.
   62.17 -
   62.18 -    You should have received a copy of the GNU Library General Public
   62.19 -    License along with this library; if not, write to the Free
   62.20 -    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   62.21 -
   62.22 -    Richard Gooch may be reached by email at  rgooch@atnf.csiro.au
   62.23 -    The postal address is:
   62.24 -      Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.
   62.25 -*/
   62.26 -#ifndef _LINUX_MTRR_H
   62.27 -#define _LINUX_MTRR_H
   62.28 -
   62.29 -#include <linux/config.h>
   62.30 -#include <linux/ioctl.h>
   62.31 -
   62.32 -#define	MTRR_IOCTL_BASE	'M'
   62.33 -
   62.34 -struct mtrr_sentry
   62.35 -{
   62.36 -    unsigned long base;    /*  Base address     */
   62.37 -    unsigned long size;    /*  Size of region   */
   62.38 -    unsigned int type;     /*  Type of region   */
   62.39 -};
   62.40 -
   62.41 -struct mtrr_gentry
   62.42 -{
   62.43 -    unsigned int regnum;   /*  Register number  */
   62.44 -    unsigned long base;    /*  Base address     */
   62.45 -    unsigned long size;    /*  Size of region   */
   62.46 -    unsigned int type;     /*  Type of region   */
   62.47 -};
   62.48 -
   62.49 -/*  These are the various ioctls  */
   62.50 -#define MTRRIOC_ADD_ENTRY        _IOW(MTRR_IOCTL_BASE,  0, struct mtrr_sentry)
   62.51 -#define MTRRIOC_SET_ENTRY        _IOW(MTRR_IOCTL_BASE,  1, struct mtrr_sentry)
   62.52 -#define MTRRIOC_DEL_ENTRY        _IOW(MTRR_IOCTL_BASE,  2, struct mtrr_sentry)
   62.53 -#define MTRRIOC_GET_ENTRY        _IOWR(MTRR_IOCTL_BASE, 3, struct mtrr_gentry)
   62.54 -#define MTRRIOC_KILL_ENTRY       _IOW(MTRR_IOCTL_BASE,  4, struct mtrr_sentry)
   62.55 -#define MTRRIOC_ADD_PAGE_ENTRY   _IOW(MTRR_IOCTL_BASE,  5, struct mtrr_sentry)
   62.56 -#define MTRRIOC_SET_PAGE_ENTRY   _IOW(MTRR_IOCTL_BASE,  6, struct mtrr_sentry)
   62.57 -#define MTRRIOC_DEL_PAGE_ENTRY   _IOW(MTRR_IOCTL_BASE,  7, struct mtrr_sentry)
   62.58 -#define MTRRIOC_GET_PAGE_ENTRY   _IOWR(MTRR_IOCTL_BASE, 8, struct mtrr_gentry)
   62.59 -#define MTRRIOC_KILL_PAGE_ENTRY  _IOW(MTRR_IOCTL_BASE,  9, struct mtrr_sentry)
   62.60 -
   62.61 -/*  These are the region types  */
   62.62 -#define MTRR_TYPE_UNCACHABLE 0
   62.63 -#define MTRR_TYPE_WRCOMB     1
   62.64 -/*#define MTRR_TYPE_         2*/
   62.65 -/*#define MTRR_TYPE_         3*/
   62.66 -#define MTRR_TYPE_WRTHROUGH  4
   62.67 -#define MTRR_TYPE_WRPROT     5
   62.68 -#define MTRR_TYPE_WRBACK     6
   62.69 -#define MTRR_NUM_TYPES       7
   62.70 -
   62.71 -#ifdef MTRR_NEED_STRINGS
   62.72 -static char *mtrr_strings[MTRR_NUM_TYPES] =
   62.73 -{
   62.74 -    "uncachable",               /* 0 */
   62.75 -    "write-combining",          /* 1 */
   62.76 -    "?",                        /* 2 */
   62.77 -    "?",                        /* 3 */
   62.78 -    "write-through",            /* 4 */
   62.79 -    "write-protect",            /* 5 */
   62.80 -    "write-back",               /* 6 */
   62.81 -};
   62.82 -#endif
   62.83 -
   62.84 -#ifdef __KERNEL__
   62.85 -
   62.86 -/*  The following functions are for use by other drivers  */
   62.87 -# ifdef CONFIG_MTRR
   62.88 -extern int mtrr_add (unsigned long base, unsigned long size,
   62.89 -		     unsigned int type, char increment);
   62.90 -extern int mtrr_add_page (unsigned long base, unsigned long size,
   62.91 -		     unsigned int type, char increment);
   62.92 -extern int mtrr_del (int reg, unsigned long base, unsigned long size);
   62.93 -extern int mtrr_del_page (int reg, unsigned long base, unsigned long size);
   62.94 -extern void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi);
   62.95 -#  else
   62.96 -static __inline__ int mtrr_add (unsigned long base, unsigned long size,
   62.97 -				unsigned int type, char increment)
   62.98 -{
   62.99 -    return -ENODEV;
  62.100 -}
  62.101 -static __inline__ int mtrr_add_page (unsigned long base, unsigned long size,
  62.102 -				unsigned int type, char increment)
  62.103 -{
  62.104 -    return -ENODEV;
  62.105 -}
  62.106 -static __inline__ int mtrr_del (int reg, unsigned long base,
  62.107 -				unsigned long size)
  62.108 -{
  62.109 -    return -ENODEV;
  62.110 -}
  62.111 -static __inline__ int mtrr_del_page (int reg, unsigned long base,
  62.112 -				unsigned long size)
  62.113 -{
  62.114 -    return -ENODEV;
  62.115 -}
  62.116 -
  62.117 -static __inline__ void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi) {;}
  62.118 -
  62.119 -#  endif
  62.120 -
  62.121 -/*  The following functions are for initialisation: don't use them!  */
  62.122 -extern int mtrr_init (void);
  62.123 -#  if defined(CONFIG_SMP) && defined(CONFIG_MTRR)
  62.124 -extern void mtrr_init_boot_cpu (void);
  62.125 -extern void mtrr_init_secondary_cpu (void);
  62.126 -#  endif
  62.127 -
  62.128 -#endif
  62.129 -
  62.130 -#endif  /*  _LINUX_MTRR_H  */
    63.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/namei.h	Tue Mar 11 14:37:27 2003 +0000
    63.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    63.3 @@ -1,17 +0,0 @@
    63.4 -/* $Id: namei.h,v 1.1 1996/12/13 14:48:21 jj Exp $
    63.5 - * linux/include/asm-i386/namei.h
    63.6 - *
    63.7 - * Included from linux/fs/namei.c
    63.8 - */
    63.9 -
   63.10 -#ifndef __I386_NAMEI_H
   63.11 -#define __I386_NAMEI_H
   63.12 -
   63.13 -/* This dummy routine maybe changed to something useful
   63.14 - * for /usr/gnemul/ emulation stuff.
   63.15 - * Look at asm-sparc/namei.h for details.
   63.16 - */
   63.17 -
   63.18 -#define __emul_prefix() NULL
   63.19 -
   63.20 -#endif /* __I386_NAMEI_H */
    64.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/param.h	Tue Mar 11 14:37:27 2003 +0000
    64.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    64.3 @@ -1,24 +0,0 @@
    64.4 -#ifndef _ASMi386_PARAM_H
    64.5 -#define _ASMi386_PARAM_H
    64.6 -
    64.7 -#ifndef HZ
    64.8 -#define HZ 100
    64.9 -#endif
   64.10 -
   64.11 -#define EXEC_PAGESIZE	4096
   64.12 -
   64.13 -#ifndef NGROUPS
   64.14 -#define NGROUPS		32
   64.15 -#endif
   64.16 -
   64.17 -#ifndef NOGROUP
   64.18 -#define NOGROUP		(-1)
   64.19 -#endif
   64.20 -
   64.21 -#define MAXHOSTNAMELEN	64	/* max length of hostname */
   64.22 -
   64.23 -#ifdef __KERNEL__
   64.24 -# define CLOCKS_PER_SEC	100	/* frequency at which times() counts */
   64.25 -#endif
   64.26 -
   64.27 -#endif
    65.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/parport.h	Tue Mar 11 14:37:27 2003 +0000
    65.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    65.3 @@ -1,18 +0,0 @@
    65.4 -/*
    65.5 - * parport.h: ia32-specific parport initialisation
    65.6 - *
    65.7 - * Copyright (C) 1999, 2000  Tim Waugh <tim@cyberelk.demon.co.uk>
    65.8 - *
    65.9 - * This file should only be included by drivers/parport/parport_pc.c.
   65.10 - */
   65.11 -
   65.12 -#ifndef _ASM_I386_PARPORT_H
   65.13 -#define _ASM_I386_PARPORT_H 1
   65.14 -
   65.15 -static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
   65.16 -static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
   65.17 -{
   65.18 -	return parport_pc_find_isa_ports (autoirq, autodma);
   65.19 -}
   65.20 -
   65.21 -#endif /* !(_ASM_I386_PARPORT_H) */
    66.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/poll.h	Tue Mar 11 14:37:27 2003 +0000
    66.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    66.3 @@ -1,25 +0,0 @@
    66.4 -#ifndef __i386_POLL_H
    66.5 -#define __i386_POLL_H
    66.6 -
    66.7 -/* These are specified by iBCS2 */
    66.8 -#define POLLIN		0x0001
    66.9 -#define POLLPRI		0x0002
   66.10 -#define POLLOUT		0x0004
   66.11 -#define POLLERR		0x0008
   66.12 -#define POLLHUP		0x0010
   66.13 -#define POLLNVAL	0x0020
   66.14 -
   66.15 -/* The rest seem to be more-or-less nonstandard. Check them! */
   66.16 -#define POLLRDNORM	0x0040
   66.17 -#define POLLRDBAND	0x0080
   66.18 -#define POLLWRNORM	0x0100
   66.19 -#define POLLWRBAND	0x0200
   66.20 -#define POLLMSG		0x0400
   66.21 -
   66.22 -struct pollfd {
   66.23 -	int fd;
   66.24 -	short events;
   66.25 -	short revents;
   66.26 -};
   66.27 -
   66.28 -#endif
    67.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/posix_types.h	Tue Mar 11 14:37:27 2003 +0000
    67.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    67.3 @@ -1,80 +0,0 @@
    67.4 -#ifndef __ARCH_I386_POSIX_TYPES_H
    67.5 -#define __ARCH_I386_POSIX_TYPES_H
    67.6 -
    67.7 -/*
    67.8 - * This file is generally used by user-level software, so you need to
    67.9 - * be a little careful about namespace pollution etc.  Also, we cannot
   67.10 - * assume GCC is being used.
   67.11 - */
   67.12 -
   67.13 -typedef unsigned short	__kernel_dev_t;
   67.14 -typedef unsigned long	__kernel_ino_t;
   67.15 -typedef unsigned short	__kernel_mode_t;
   67.16 -typedef unsigned short	__kernel_nlink_t;
   67.17 -typedef long		__kernel_off_t;
   67.18 -typedef int		__kernel_pid_t;
   67.19 -typedef unsigned short	__kernel_ipc_pid_t;
   67.20 -typedef unsigned short	__kernel_uid_t;
   67.21 -typedef unsigned short	__kernel_gid_t;
   67.22 -typedef unsigned int	__kernel_size_t;
   67.23 -typedef int		__kernel_ssize_t;
   67.24 -typedef int		__kernel_ptrdiff_t;
   67.25 -typedef long		__kernel_time_t;
   67.26 -typedef long		__kernel_suseconds_t;
   67.27 -typedef long		__kernel_clock_t;
   67.28 -typedef int		__kernel_daddr_t;
   67.29 -typedef char *		__kernel_caddr_t;
   67.30 -typedef unsigned short	__kernel_uid16_t;
   67.31 -typedef unsigned short	__kernel_gid16_t;
   67.32 -typedef unsigned int	__kernel_uid32_t;
   67.33 -typedef unsigned int	__kernel_gid32_t;
   67.34 -
   67.35 -typedef unsigned short	__kernel_old_uid_t;
   67.36 -typedef unsigned short	__kernel_old_gid_t;
   67.37 -
   67.38 -#ifdef __GNUC__
   67.39 -typedef long long	__kernel_loff_t;
   67.40 -#endif
   67.41 -
   67.42 -typedef struct {
   67.43 -#if defined(__KERNEL__) || defined(__USE_ALL)
   67.44 -	int	val[2];
   67.45 -#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
   67.46 -	int	__val[2];
   67.47 -#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
   67.48 -} __kernel_fsid_t;
   67.49 -
   67.50 -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
   67.51 -
   67.52 -#undef	__FD_SET
   67.53 -#define __FD_SET(fd,fdsetp) \
   67.54 -		__asm__ __volatile__("btsl %1,%0": \
   67.55 -			"=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
   67.56 -
   67.57 -#undef	__FD_CLR
   67.58 -#define __FD_CLR(fd,fdsetp) \
   67.59 -		__asm__ __volatile__("btrl %1,%0": \
   67.60 -			"=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
   67.61 -
   67.62 -#undef	__FD_ISSET
   67.63 -#define __FD_ISSET(fd,fdsetp) (__extension__ ({ \
   67.64 -		unsigned char __result; \
   67.65 -		__asm__ __volatile__("btl %1,%2 ; setb %0" \
   67.66 -			:"=q" (__result) :"r" ((int) (fd)), \
   67.67 -			"m" (*(__kernel_fd_set *) (fdsetp))); \
   67.68 -		__result; }))
   67.69 -
   67.70 -#undef	__FD_ZERO
   67.71 -#define __FD_ZERO(fdsetp) \
   67.72 -do { \
   67.73 -	int __d0, __d1; \
   67.74 -	__asm__ __volatile__("cld ; rep ; stosl" \
   67.75 -			:"=m" (*(__kernel_fd_set *) (fdsetp)), \
   67.76 -			  "=&c" (__d0), "=&D" (__d1) \
   67.77 -			:"a" (0), "1" (__FDSET_LONGS), \
   67.78 -			"2" ((__kernel_fd_set *) (fdsetp)) : "memory"); \
   67.79 -} while (0)
   67.80 -
   67.81 -#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
   67.82 -
   67.83 -#endif
    68.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/resource.h	Tue Mar 11 14:37:27 2003 +0000
    68.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    68.3 @@ -1,47 +0,0 @@
    68.4 -#ifndef _I386_RESOURCE_H
    68.5 -#define _I386_RESOURCE_H
    68.6 -
    68.7 -/*
    68.8 - * Resource limits
    68.9 - */
   68.10 -
   68.11 -#define RLIMIT_CPU	0		/* CPU time in ms */
   68.12 -#define RLIMIT_FSIZE	1		/* Maximum filesize */
   68.13 -#define RLIMIT_DATA	2		/* max data size */
   68.14 -#define RLIMIT_STACK	3		/* max stack size */
   68.15 -#define RLIMIT_CORE	4		/* max core file size */
   68.16 -#define RLIMIT_RSS	5		/* max resident set size */
   68.17 -#define RLIMIT_NPROC	6		/* max number of processes */
   68.18 -#define RLIMIT_NOFILE	7		/* max number of open files */
   68.19 -#define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
   68.20 -#define RLIMIT_AS	9		/* address space limit */
   68.21 -#define RLIMIT_LOCKS	10		/* maximum file locks held */
   68.22 -
   68.23 -#define RLIM_NLIMITS	11
   68.24 -
   68.25 -/*
   68.26 - * SuS says limits have to be unsigned.
   68.27 - * Which makes a ton more sense anyway.
   68.28 - */
   68.29 -#define RLIM_INFINITY	(~0UL)
   68.30 -
   68.31 -#ifdef __KERNEL__
   68.32 -
   68.33 -#define INIT_RLIMITS					\
   68.34 -{							\
   68.35 -	{ RLIM_INFINITY, RLIM_INFINITY },		\
   68.36 -	{ RLIM_INFINITY, RLIM_INFINITY },		\
   68.37 -	{ RLIM_INFINITY, RLIM_INFINITY },		\
   68.38 -	{      _STK_LIM, RLIM_INFINITY },		\
   68.39 -	{             0, RLIM_INFINITY },		\
   68.40 -	{ RLIM_INFINITY, RLIM_INFINITY },		\
   68.41 -	{             0,             0 },		\
   68.42 -	{      INR_OPEN,     INR_OPEN  },		\
   68.43 -	{ RLIM_INFINITY, RLIM_INFINITY },		\
   68.44 -	{ RLIM_INFINITY, RLIM_INFINITY },		\
   68.45 -        { RLIM_INFINITY, RLIM_INFINITY },		\
   68.46 -}
   68.47 -
   68.48 -#endif /* __KERNEL__ */
   68.49 -
   68.50 -#endif
    69.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwlock.h	Tue Mar 11 14:37:27 2003 +0000
    69.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    69.3 @@ -1,83 +0,0 @@
    69.4 -/* include/asm-i386/rwlock.h
    69.5 - *
    69.6 - *	Helpers used by both rw spinlocks and rw semaphores.
    69.7 - *
    69.8 - *	Based in part on code from semaphore.h and
    69.9 - *	spinlock.h Copyright 1996 Linus Torvalds.
   69.10 - *
   69.11 - *	Copyright 1999 Red Hat, Inc.
   69.12 - *
   69.13 - *	Written by Benjamin LaHaise.
   69.14 - *
   69.15 - *	This program is free software; you can redistribute it and/or
   69.16 - *	modify it under the terms of the GNU General Public License
   69.17 - *	as published by the Free Software Foundation; either version
   69.18 - *	2 of the License, or (at your option) any later version.
   69.19 - */
   69.20 -#ifndef _ASM_I386_RWLOCK_H
   69.21 -#define _ASM_I386_RWLOCK_H
   69.22 -
   69.23 -#define RW_LOCK_BIAS		 0x01000000
   69.24 -#define RW_LOCK_BIAS_STR	"0x01000000"
   69.25 -
   69.26 -#define __build_read_lock_ptr(rw, helper)   \
   69.27 -	asm volatile(LOCK "subl $1,(%0)\n\t" \
   69.28 -		     "js 2f\n" \
   69.29 -		     "1:\n" \
   69.30 -		     LOCK_SECTION_START("") \
   69.31 -		     "2:\tcall " helper "\n\t" \
   69.32 -		     "jmp 1b\n" \
   69.33 -		     LOCK_SECTION_END \
   69.34 -		     ::"a" (rw) : "memory")
   69.35 -
   69.36 -#define __build_read_lock_const(rw, helper)   \
   69.37 -	asm volatile(LOCK "subl $1,%0\n\t" \
   69.38 -		     "js 2f\n" \
   69.39 -		     "1:\n" \
   69.40 -		     LOCK_SECTION_START("") \
   69.41 -		     "2:\tpushl %%eax\n\t" \
   69.42 -		     "leal %0,%%eax\n\t" \
   69.43 -		     "call " helper "\n\t" \
   69.44 -		     "popl %%eax\n\t" \
   69.45 -		     "jmp 1b\n" \
   69.46 -		     LOCK_SECTION_END \
   69.47 -		     :"=m" (*(volatile int *)rw) : : "memory")
   69.48 -
   69.49 -#define __build_read_lock(rw, helper)	do { \
   69.50 -						if (__builtin_constant_p(rw)) \
   69.51 -							__build_read_lock_const(rw, helper); \
   69.52 -						else \
   69.53 -							__build_read_lock_ptr(rw, helper); \
   69.54 -					} while (0)
   69.55 -
   69.56 -#define __build_write_lock_ptr(rw, helper) \
   69.57 -	asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
   69.58 -		     "jnz 2f\n" \
   69.59 -		     "1:\n" \
   69.60 -		     LOCK_SECTION_START("") \
   69.61 -		     "2:\tcall " helper "\n\t" \
   69.62 -		     "jmp 1b\n" \
   69.63 -		     LOCK_SECTION_END \
   69.64 -		     ::"a" (rw) : "memory")
   69.65 -
   69.66 -#define __build_write_lock_const(rw, helper) \
   69.67 -	asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
   69.68 -		     "jnz 2f\n" \
   69.69 -		     "1:\n" \
   69.70 -		     LOCK_SECTION_START("") \
   69.71 -		     "2:\tpushl %%eax\n\t" \
   69.72 -		     "leal %0,%%eax\n\t" \
   69.73 -		     "call " helper "\n\t" \
   69.74 -		     "popl %%eax\n\t" \
   69.75 -		     "jmp 1b\n" \
   69.76 -		     LOCK_SECTION_END \
   69.77 -		     :"=m" (*(volatile int *)rw) : : "memory")
   69.78 -
   69.79 -#define __build_write_lock(rw, helper)	do { \
   69.80 -						if (__builtin_constant_p(rw)) \
   69.81 -							__build_write_lock_const(rw, helper); \
   69.82 -						else \
   69.83 -							__build_write_lock_ptr(rw, helper); \
   69.84 -					} while (0)
   69.85 -
   69.86 -#endif
    70.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwsem.h	Tue Mar 11 14:37:27 2003 +0000
    70.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    70.3 @@ -1,264 +0,0 @@
    70.4 -/* rwsem.h: R/W semaphores implemented using XADD/CMPXCHG for i486+
    70.5 - *
    70.6 - * Written by David Howells (dhowells@redhat.com).
    70.7 - *
    70.8 - * Derived from asm-i386/semaphore.h
    70.9 - *
   70.10 - * Trylock by Brian Watson (Brian.J.Watson@compaq.com).
   70.11 - *
   70.12 - *
   70.13 - * The MSW of the count is the negated number of active writers and waiting
   70.14 - * lockers, and the LSW is the total number of active locks
   70.15 - *
   70.16 - * The lock count is initialized to 0 (no active and no waiting lockers).
   70.17 - *
   70.18 - * When a writer subtracts WRITE_BIAS, it'll get 0xffff0001 for the case of an
   70.19 - * uncontended lock. This can be determined because XADD returns the old value.
   70.20 - * Readers increment by 1 and see a positive value when uncontended, negative
   70.21 - * if there are writers (and maybe) readers waiting (in which case it goes to
   70.22 - * sleep).
   70.23 - *
   70.24 - * The value of WAITING_BIAS supports up to 32766 waiting processes. This can
   70.25 - * be extended to 65534 by manually checking the whole MSW rather than relying
   70.26 - * on the S flag.
   70.27 - *
   70.28 - * The value of ACTIVE_BIAS supports up to 65535 active processes.
   70.29 - *
   70.30 - * This should be totally fair - if anything is waiting, a process that wants a
   70.31 - * lock will go to the back of the queue. When the currently active lock is
   70.32 - * released, if there's a writer at the front of the queue, then that and only
   70.33 - * that will be woken up; if there's a bunch of consequtive readers at the
   70.34 - * front, then they'll all be woken up, but no other readers will be.
   70.35 - */
   70.36 -
   70.37 -#ifndef _I386_RWSEM_H
   70.38 -#define _I386_RWSEM_H
   70.39 -
   70.40 -#ifndef _LINUX_RWSEM_H
   70.41 -#error please dont include asm/rwsem.h directly, use linux/rwsem.h instead
   70.42 -#endif
   70.43 -
   70.44 -#ifdef __KERNEL__
   70.45 -
   70.46 -#include <linux/list.h>
   70.47 -#include <linux/spinlock.h>
   70.48 -
   70.49 -struct rwsem_waiter;
   70.50 -
   70.51 -extern struct rw_semaphore *FASTCALL(rwsem_down_read_failed(struct rw_semaphore *sem));
   70.52 -extern struct rw_semaphore *FASTCALL(rwsem_down_write_failed(struct rw_semaphore *sem));
   70.53 -extern struct rw_semaphore *FASTCALL(rwsem_wake(struct rw_semaphore *));
   70.54 -
   70.55 -/*
   70.56 - * the semaphore definition
   70.57 - */
   70.58 -struct rw_semaphore {
   70.59 -	signed long		count;
   70.60 -#define RWSEM_UNLOCKED_VALUE		0x00000000
   70.61 -#define RWSEM_ACTIVE_BIAS		0x00000001
   70.62 -#define RWSEM_ACTIVE_MASK		0x0000ffff
   70.63 -#define RWSEM_WAITING_BIAS		(-0x00010000)
   70.64 -#define RWSEM_ACTIVE_READ_BIAS		RWSEM_ACTIVE_BIAS
   70.65 -#define RWSEM_ACTIVE_WRITE_BIAS		(RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
   70.66 -	spinlock_t		wait_lock;
   70.67 -	struct list_head	wait_list;
   70.68 -#if RWSEM_DEBUG
   70.69 -	int			debug;
   70.70 -#endif
   70.71 -};
   70.72 -
   70.73 -/*
   70.74 - * initialisation
   70.75 - */
   70.76 -#if RWSEM_DEBUG
   70.77 -#define __RWSEM_DEBUG_INIT      , 0
   70.78 -#else
   70.79 -#define __RWSEM_DEBUG_INIT	/* */
   70.80 -#endif
   70.81 -
   70.82 -#define __RWSEM_INITIALIZER(name) \
   70.83 -{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) \
   70.84 -	__RWSEM_DEBUG_INIT }
   70.85 -
   70.86 -#define DECLARE_RWSEM(name) \
   70.87 -	struct rw_semaphore name = __RWSEM_INITIALIZER(name)
   70.88 -
   70.89 -static inline void init_rwsem(struct rw_semaphore *sem)
   70.90 -{
   70.91 -	sem->count = RWSEM_UNLOCKED_VALUE;
   70.92 -	spin_lock_init(&sem->wait_lock);
   70.93 -	INIT_LIST_HEAD(&sem->wait_list);
   70.94 -#if RWSEM_DEBUG
   70.95 -	sem->debug = 0;
   70.96 -#endif
   70.97 -}
   70.98 -
   70.99 -/*
  70.100 - * lock for reading
  70.101 - */
  70.102 -static inline void __down_read(struct rw_semaphore *sem)
  70.103 -{
  70.104 -	__asm__ __volatile__(
  70.105 -		"# beginning down_read\n\t"
  70.106 -LOCK_PREFIX	"  incl      (%%eax)\n\t" /* adds 0x00000001, returns the old value */
  70.107 -		"  js        2f\n\t" /* jump if we weren't granted the lock */
  70.108 -		"1:\n\t"
  70.109 -		LOCK_SECTION_START("")
  70.110 -		"2:\n\t"
  70.111 -		"  pushl     %%ecx\n\t"
  70.112 -		"  pushl     %%edx\n\t"
  70.113 -		"  call      rwsem_down_read_failed\n\t"
  70.114 -		"  popl      %%edx\n\t"
  70.115 -		"  popl      %%ecx\n\t"
  70.116 -		"  jmp       1b\n"
  70.117 -		LOCK_SECTION_END
  70.118 -		"# ending down_read\n\t"
  70.119 -		: "+m"(sem->count)
  70.120 -		: "a"(sem)
  70.121 -		: "memory", "cc");
  70.122 -}
  70.123 -
  70.124 -/*
  70.125 - * trylock for reading -- returns 1 if successful, 0 if contention
  70.126 - */
  70.127 -static inline int __down_read_trylock(struct rw_semaphore *sem)
  70.128 -{
  70.129 -	__s32 result, tmp;
  70.130 -	__asm__ __volatile__(
  70.131 -		"# beginning __down_read_trylock\n\t"
  70.132 -		"  movl      %0,%1\n\t"
  70.133 -		"1:\n\t"
  70.134 -		"  movl	     %1,%2\n\t"
  70.135 -		"  addl      %3,%2\n\t"
  70.136 -		"  jle	     2f\n\t"
  70.137 -LOCK_PREFIX	"  cmpxchgl  %2,%0\n\t"
  70.138 -		"  jnz	     1b\n\t"
  70.139 -		"2:\n\t"
  70.140 -		"# ending __down_read_trylock\n\t"
  70.141 -		: "+m"(sem->count), "=&a"(result), "=&r"(tmp)
  70.142 -		: "i"(RWSEM_ACTIVE_READ_BIAS)
  70.143 -		: "memory", "cc");
  70.144 -	return result>=0 ? 1 : 0;
  70.145 -}
  70.146 -
  70.147 -/*
  70.148 - * lock for writing
  70.149 - */
  70.150 -static inline void __down_write(struct rw_semaphore *sem)
  70.151 -{
  70.152 -	int tmp;
  70.153 -
  70.154 -	tmp = RWSEM_ACTIVE_WRITE_BIAS;
  70.155 -	__asm__ __volatile__(
  70.156 -		"# beginning down_write\n\t"
  70.157 -LOCK_PREFIX	"  xadd      %0,(%%eax)\n\t" /* subtract 0x0000ffff, returns the old value */
  70.158 -		"  testl     %0,%0\n\t" /* was the count 0 before? */
  70.159 -		"  jnz       2f\n\t" /* jump if we weren't granted the lock */
  70.160 -		"1:\n\t"
  70.161 -		LOCK_SECTION_START("")
  70.162 -		"2:\n\t"
  70.163 -		"  pushl     %%ecx\n\t"
  70.164 -		"  call      rwsem_down_write_failed\n\t"
  70.165 -		"  popl      %%ecx\n\t"
  70.166 -		"  jmp       1b\n"
  70.167 -		LOCK_SECTION_END
  70.168 -		"# ending down_write"
  70.169 -		: "+d"(tmp), "+m"(sem->count)
  70.170 -		: "a"(sem)
  70.171 -		: "memory", "cc");
  70.172 -}
  70.173 -
  70.174 -/*
  70.175 - * trylock for writing -- returns 1 if successful, 0 if contention
  70.176 - */
  70.177 -static inline int __down_write_trylock(struct rw_semaphore *sem)
  70.178 -{
  70.179 -	signed long ret = cmpxchg(&sem->count,
  70.180 -				  RWSEM_UNLOCKED_VALUE, 
  70.181 -				  RWSEM_ACTIVE_WRITE_BIAS);
  70.182 -	if (ret == RWSEM_UNLOCKED_VALUE)
  70.183 -		return 1;
  70.184 -	return 0;
  70.185 -}
  70.186 -
  70.187 -/*
  70.188 - * unlock after reading
  70.189 - */
  70.190 -static inline void __up_read(struct rw_semaphore *sem)
  70.191 -{
  70.192 -	__s32 tmp = -RWSEM_ACTIVE_READ_BIAS;
  70.193 -	__asm__ __volatile__(
  70.194 -		"# beginning __up_read\n\t"
  70.195 -LOCK_PREFIX	"  xadd      %%edx,(%%eax)\n\t" /* subtracts 1, returns the old value */
  70.196 -		"  js        2f\n\t" /* jump if the lock is being waited upon */
  70.197 -		"1:\n\t"
  70.198 -		LOCK_SECTION_START("")
  70.199 -		"2:\n\t"
  70.200 -		"  decw      %%dx\n\t" /* do nothing if still outstanding active readers */
  70.201 -		"  jnz       1b\n\t"
  70.202 -		"  pushl     %%ecx\n\t"
  70.203 -		"  call      rwsem_wake\n\t"
  70.204 -		"  popl      %%ecx\n\t"
  70.205 -		"  jmp       1b\n"
  70.206 -		LOCK_SECTION_END
  70.207 -		"# ending __up_read\n"
  70.208 -		: "+m"(sem->count), "+d"(tmp)
  70.209 -		: "a"(sem)
  70.210 -		: "memory", "cc");
  70.211 -}
  70.212 -
  70.213 -/*
  70.214 - * unlock after writing
  70.215 - */
  70.216 -static inline void __up_write(struct rw_semaphore *sem)
  70.217 -{
  70.218 -	__asm__ __volatile__(
  70.219 -		"# beginning __up_write\n\t"
  70.220 -		"  movl      %2,%%edx\n\t"
  70.221 -LOCK_PREFIX	"  xaddl     %%edx,(%%eax)\n\t" /* tries to transition 0xffff0001 -> 0x00000000 */
  70.222 -		"  jnz       2f\n\t" /* jump if the lock is being waited upon */
  70.223 -		"1:\n\t"
  70.224 -		LOCK_SECTION_START("")
  70.225 -		"2:\n\t"
  70.226 -		"  decw      %%dx\n\t" /* did the active count reduce to 0? */
  70.227 -		"  jnz       1b\n\t" /* jump back if not */
  70.228 -		"  pushl     %%ecx\n\t"
  70.229 -		"  call      rwsem_wake\n\t"
  70.230 -		"  popl      %%ecx\n\t"
  70.231 -		"  jmp       1b\n"
  70.232 -		LOCK_SECTION_END
  70.233 -		"# ending __up_write\n"
  70.234 -		: "+m"(sem->count)
  70.235 -		: "a"(sem), "i"(-RWSEM_ACTIVE_WRITE_BIAS)
  70.236 -		: "memory", "cc", "edx");
  70.237 -}
  70.238 -
  70.239 -/*
  70.240 - * implement atomic add functionality
  70.241 - */
  70.242 -static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem)
  70.243 -{
  70.244 -	__asm__ __volatile__(
  70.245 -LOCK_PREFIX	"addl %1,%0"
  70.246 -		:"=m"(sem->count)
  70.247 -		:"ir"(delta), "m"(sem->count));
  70.248 -}
  70.249 -
  70.250 -/*
  70.251 - * implement exchange and add functionality
  70.252 - */
  70.253 -static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem)
  70.254 -{
  70.255 -	int tmp = delta;
  70.256 -
  70.257 -	__asm__ __volatile__(
  70.258 -LOCK_PREFIX	"xadd %0,(%2)"
  70.259 -		: "+r"(tmp), "=m"(sem->count)
  70.260 -		: "r"(sem), "m"(sem->count)
  70.261 -		: "memory");
  70.262 -
  70.263 -	return tmp+delta;
  70.264 -}
  70.265 -
  70.266 -#endif /* __KERNEL__ */
  70.267 -#endif /* _I386_RWSEM_H */
    71.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/scatterlist.h	Tue Mar 11 14:37:27 2003 +0000
    71.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    71.3 @@ -1,34 +0,0 @@
    71.4 -#ifndef _I386_SCATTERLIST_H
    71.5 -#define _I386_SCATTERLIST_H
    71.6 -
    71.7 -/*
    71.8 - * Drivers must set either ->address or (preferred) ->page and ->offset
    71.9 - * to indicate where data must be transferred to/from.
   71.10 - *
   71.11 - * Using ->page is recommended since it handles highmem data as well as
   71.12 - * low mem. ->address is restricted to data which has a virtual mapping, and
   71.13 - * it will go away in the future. Updating to ->page can be automated very
   71.14 - * easily -- something like
   71.15 - *
   71.16 - * sg->address = some_ptr;
   71.17 - *
   71.18 - * can be rewritten as
   71.19 - *
   71.20 - * sg->page = virt_to_page(some_ptr);
   71.21 - * sg->offset = (unsigned long) some_ptr & ~PAGE_MASK;
   71.22 - *
   71.23 - * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens
   71.24 - */
   71.25 -struct scatterlist {
   71.26 -    char *  address;    /* Location data is to be transferred to, NULL for
   71.27 -			 * highmem page */
   71.28 -    struct page * page; /* Location for highmem page, if any */
   71.29 -    unsigned int offset;/* for highmem, page offset */
   71.30 -
   71.31 -    dma_addr_t dma_address;
   71.32 -    unsigned int length;
   71.33 -};
   71.34 -
   71.35 -#define ISA_DMA_THRESHOLD (0x00ffffff)
   71.36 -
   71.37 -#endif /* !(_I386_SCATTERLIST_H) */
    72.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/semaphore.h	Tue Mar 11 14:37:27 2003 +0000
    72.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    72.3 @@ -1,222 +0,0 @@
    72.4 -#ifndef _I386_SEMAPHORE_H
    72.5 -#define _I386_SEMAPHORE_H
    72.6 -
    72.7 -#include <linux/linkage.h>
    72.8 -
    72.9 -#ifdef __KERNEL__
   72.10 -
   72.11 -/*
   72.12 - * SMP- and interrupt-safe semaphores..
   72.13 - *
   72.14 - * (C) Copyright 1996 Linus Torvalds
   72.15 - *
   72.16 - * Modified 1996-12-23 by Dave Grothe <dave@gcom.com> to fix bugs in
   72.17 - *                     the original code and to make semaphore waits
   72.18 - *                     interruptible so that processes waiting on
   72.19 - *                     semaphores can be killed.
   72.20 - * Modified 1999-02-14 by Andrea Arcangeli, split the sched.c helper
   72.21 - *		       functions in asm/sempahore-helper.h while fixing a
   72.22 - *		       potential and subtle race discovered by Ulrich Schmid
   72.23 - *		       in down_interruptible(). Since I started to play here I
   72.24 - *		       also implemented the `trylock' semaphore operation.
   72.25 - *          1999-07-02 Artur Skawina <skawina@geocities.com>
   72.26 - *                     Optimized "0(ecx)" -> "(ecx)" (the assembler does not
   72.27 - *                     do this). Changed calling sequences from push/jmp to
   72.28 - *                     traditional call/ret.
   72.29 - * Modified 2001-01-01 Andreas Franck <afranck@gmx.de>
   72.30 - *		       Some hacks to ensure compatibility with recent
   72.31 - *		       GCC snapshots, to avoid stack corruption when compiling
   72.32 - *		       with -fomit-frame-pointer. It's not sure if this will
   72.33 - *		       be fixed in GCC, as our previous implementation was a
   72.34 - *		       bit dubious.
   72.35 - *
   72.36 - * If you would like to see an analysis of this implementation, please
   72.37 - * ftp to gcom.com and download the file
   72.38 - * /pub/linux/src/semaphore/semaphore-2.0.24.tar.gz.
   72.39 - *
   72.40 - */
   72.41 -
   72.42 -#include <asm/system.h>
   72.43 -#include <asm/atomic.h>
   72.44 -#include <linux/wait.h>
   72.45 -#include <linux/rwsem.h>
   72.46 -
   72.47 -struct semaphore {
   72.48 -	atomic_t count;
   72.49 -	int sleepers;
   72.50 -	wait_queue_head_t wait;
   72.51 -#if WAITQUEUE_DEBUG
   72.52 -	long __magic;
   72.53 -#endif
   72.54 -};
   72.55 -
   72.56 -#if WAITQUEUE_DEBUG
   72.57 -# define __SEM_DEBUG_INIT(name) \
   72.58 -		, (int)&(name).__magic
   72.59 -#else
   72.60 -# define __SEM_DEBUG_INIT(name)
   72.61 -#endif
   72.62 -
   72.63 -#define __SEMAPHORE_INITIALIZER(name,count) \
   72.64 -{ ATOMIC_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
   72.65 -	__SEM_DEBUG_INIT(name) }
   72.66 -
   72.67 -#define __MUTEX_INITIALIZER(name) \
   72.68 -	__SEMAPHORE_INITIALIZER(name,1)
   72.69 -
   72.70 -#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
   72.71 -	struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
   72.72 -
   72.73 -#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
   72.74 -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
   72.75 -
   72.76 -static inline void sema_init (struct semaphore *sem, int val)
   72.77 -{
   72.78 -/*
   72.79 - *	*sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
   72.80 - *
   72.81 - * i'd rather use the more flexible initialization above, but sadly
   72.82 - * GCC 2.7.2.3 emits a bogus warning. EGCS doesnt. Oh well.
   72.83 - */
   72.84 -	atomic_set(&sem->count, val);
   72.85 -	sem->sleepers = 0;
   72.86 -	init_waitqueue_head(&sem->wait);
   72.87 -#if WAITQUEUE_DEBUG
   72.88 -	sem->__magic = (int)&sem->__magic;
   72.89 -#endif
   72.90 -}
   72.91 -
   72.92 -static inline void init_MUTEX (struct semaphore *sem)
   72.93 -{
   72.94 -	sema_init(sem, 1);
   72.95 -}
   72.96 -
   72.97 -static inline void init_MUTEX_LOCKED (struct semaphore *sem)
   72.98 -{
   72.99 -	sema_init(sem, 0);
  72.100 -}
  72.101 -
  72.102 -asmlinkage void __down_failed(void /* special register calling convention */);
  72.103 -asmlinkage int  __down_failed_interruptible(void  /* params in registers */);
  72.104 -asmlinkage int  __down_failed_trylock(void  /* params in registers */);
  72.105 -asmlinkage void __up_wakeup(void /* special register calling convention */);
  72.106 -
  72.107 -asmlinkage void __down(struct semaphore * sem);
  72.108 -asmlinkage int  __down_interruptible(struct semaphore * sem);
  72.109 -asmlinkage int  __down_trylock(struct semaphore * sem);
  72.110 -asmlinkage void __up(struct semaphore * sem);
  72.111 -
  72.112 -/*
  72.113 - * This is ugly, but we want the default case to fall through.
  72.114 - * "__down_failed" is a special asm handler that calls the C
  72.115 - * routine that actually waits. See arch/i386/kernel/semaphore.c
  72.116 - */
  72.117 -static inline void down(struct semaphore * sem)
  72.118 -{
  72.119 -#if WAITQUEUE_DEBUG
  72.120 -	CHECK_MAGIC(sem->__magic);
  72.121 -#endif
  72.122 -
  72.123 -	__asm__ __volatile__(
  72.124 -		"# atomic down operation\n\t"
  72.125 -		LOCK "decl %0\n\t"     /* --sem->count */
  72.126 -		"js 2f\n"
  72.127 -		"1:\n"
  72.128 -		LOCK_SECTION_START("")
  72.129 -		"2:\tcall __down_failed\n\t"
  72.130 -		"jmp 1b\n"
  72.131 -		LOCK_SECTION_END
  72.132 -		:"=m" (sem->count)
  72.133 -		:"c" (sem)
  72.134 -		:"memory");
  72.135 -}
  72.136 -
  72.137 -/*
  72.138 - * Interruptible try to acquire a semaphore.  If we obtained
  72.139 - * it, return zero.  If we were interrupted, returns -EINTR
  72.140 - */
  72.141 -static inline int down_interruptible(struct semaphore * sem)
  72.142 -{
  72.143 -	int result;
  72.144 -
  72.145 -#if WAITQUEUE_DEBUG
  72.146 -	CHECK_MAGIC(sem->__magic);
  72.147 -#endif
  72.148 -
  72.149 -	__asm__ __volatile__(
  72.150 -		"# atomic interruptible down operation\n\t"
  72.151 -		LOCK "decl %1\n\t"     /* --sem->count */
  72.152 -		"js 2f\n\t"
  72.153 -		"xorl %0,%0\n"
  72.154 -		"1:\n"
  72.155 -		LOCK_SECTION_START("")
  72.156 -		"2:\tcall __down_failed_interruptible\n\t"
  72.157 -		"jmp 1b\n"
  72.158 -		LOCK_SECTION_END
  72.159 -		:"=a" (result), "=m" (sem->count)
  72.160 -		:"c" (sem)
  72.161 -		:"memory");
  72.162 -	return result;
  72.163 -}
  72.164 -
  72.165 -/*
  72.166 - * Non-blockingly attempt to down() a semaphore.
  72.167 - * Returns zero if we acquired it
  72.168 - */
  72.169 -static inline int down_trylock(struct semaphore * sem)
  72.170 -{
  72.171 -	int result;
  72.172 -
  72.173 -#if WAITQUEUE_DEBUG
  72.174 -	CHECK_MAGIC(sem->__magic);
  72.175 -#endif
  72.176 -
  72.177 -	__asm__ __volatile__(
  72.178 -		"# atomic interruptible down operation\n\t"
  72.179 -		LOCK "decl %1\n\t"     /* --sem->count */
  72.180 -		"js 2f\n\t"
  72.181 -		"xorl %0,%0\n"
  72.182 -		"1:\n"
  72.183 -		LOCK_SECTION_START("")
  72.184 -		"2:\tcall __down_failed_trylock\n\t"
  72.185 -		"jmp 1b\n"
  72.186 -		LOCK_SECTION_END
  72.187 -		:"=a" (result), "=m" (sem->count)
  72.188 -		:"c" (sem)
  72.189 -		:"memory");
  72.190 -	return result;
  72.191 -}
  72.192 -
  72.193 -/*
  72.194 - * Note! This is subtle. We jump to wake people up only if
  72.195 - * the semaphore was negative (== somebody was waiting on it).
  72.196 - * The default case (no contention) will result in NO
  72.197 - * jumps for both down() and up().
  72.198 - */
  72.199 -static inline void up(struct semaphore * sem)
  72.200 -{
  72.201 -#if WAITQUEUE_DEBUG
  72.202 -	CHECK_MAGIC(sem->__magic);
  72.203 -#endif
  72.204 -	__asm__ __volatile__(
  72.205 -		"# atomic up operation\n\t"
  72.206 -		LOCK "incl %0\n\t"     /* ++sem->count */
  72.207 -		"jle 2f\n"
  72.208 -		"1:\n"
  72.209 -		LOCK_SECTION_START("")
  72.210 -		"2:\tcall __up_wakeup\n\t"
  72.211 -		"jmp 1b\n"
  72.212 -		LOCK_SECTION_END
  72.213 -		".subsection 0\n"
  72.214 -		:"=m" (sem->count)
  72.215 -		:"c" (sem)
  72.216 -		:"memory");
  72.217 -}
  72.218 -
  72.219 -static inline int sem_getcount(struct semaphore *sem)
  72.220 -{
  72.221 -	return atomic_read(&sem->count);
  72.222 -}
  72.223 -
  72.224 -#endif
  72.225 -#endif
    73.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sembuf.h	Tue Mar 11 14:37:27 2003 +0000
    73.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    73.3 @@ -1,25 +0,0 @@
    73.4 -#ifndef _I386_SEMBUF_H
    73.5 -#define _I386_SEMBUF_H
    73.6 -
    73.7 -/* 
    73.8 - * The semid64_ds structure for i386 architecture.
    73.9 - * Note extra padding because this structure is passed back and forth
   73.10 - * between kernel and user space.
   73.11 - *
   73.12 - * Pad space is left for:
   73.13 - * - 64-bit time_t to solve y2038 problem
   73.14 - * - 2 miscellaneous 32-bit values
   73.15 - */
   73.16 -
   73.17 -struct semid64_ds {
   73.18 -	struct ipc64_perm sem_perm;		/* permissions .. see ipc.h */
   73.19 -	__kernel_time_t	sem_otime;		/* last semop time */
   73.20 -	unsigned long	__unused1;
   73.21 -	__kernel_time_t	sem_ctime;		/* last change time */
   73.22 -	unsigned long	__unused2;
   73.23 -	unsigned long	sem_nsems;		/* no. of semaphores in array */
   73.24 -	unsigned long	__unused3;
   73.25 -	unsigned long	__unused4;
   73.26 -};
   73.27 -
   73.28 -#endif /* _I386_SEMBUF_H */
    74.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/serial.h	Tue Mar 11 14:37:27 2003 +0000
    74.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    74.3 @@ -1,148 +0,0 @@
    74.4 -/*
    74.5 - * include/asm-i386/serial.h
    74.6 - */
    74.7 -
    74.8 -#include <linux/config.h>
    74.9 -
   74.10 -/*
   74.11 - * This assumes you have a 1.8432 MHz clock for your UART.
   74.12 - *
   74.13 - * It'd be nice if someone built a serial card with a 24.576 MHz
   74.14 - * clock, since the 16550A is capable of handling a top speed of 1.5
   74.15 - * megabits/second; but this requires the faster clock.
   74.16 - */
   74.17 -#define BASE_BAUD ( 1843200 / 16 )
   74.18 -
   74.19 -/* Standard COM flags (except for COM4, because of the 8514 problem) */
   74.20 -#ifdef CONFIG_SERIAL_DETECT_IRQ
   74.21 -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
   74.22 -#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
   74.23 -#else
   74.24 -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
   74.25 -#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
   74.26 -#endif
   74.27 -
   74.28 -#ifdef CONFIG_SERIAL_MANY_PORTS
   74.29 -#define FOURPORT_FLAGS ASYNC_FOURPORT
   74.30 -#define ACCENT_FLAGS 0
   74.31 -#define BOCA_FLAGS 0
   74.32 -#define HUB6_FLAGS 0
   74.33 -#define RS_TABLE_SIZE	64
   74.34 -#else
   74.35 -#define RS_TABLE_SIZE
   74.36 -#endif
   74.37 -
   74.38 -#define MCA_COM_FLAGS	(STD_COM_FLAGS|ASYNC_BOOT_ONLYMCA)
   74.39 -
   74.40 -/*
   74.41 - * The following define the access methods for the HUB6 card. All
   74.42 - * access is through two ports for all 24 possible chips. The card is
   74.43 - * selected through the high 2 bits, the port on that card with the
   74.44 - * "middle" 3 bits, and the register on that port with the bottom
   74.45 - * 3 bits.
   74.46 - *
   74.47 - * While the access port and interrupt is configurable, the default
   74.48 - * port locations are 0x302 for the port control register, and 0x303
   74.49 - * for the data read/write register. Normally, the interrupt is at irq3
   74.50 - * but can be anything from 3 to 7 inclusive. Note that using 3 will
   74.51 - * require disabling com2.
   74.52 - */
   74.53 -
   74.54 -#define C_P(card,port) (((card)<<6|(port)<<3) + 1)
   74.55 -
   74.56 -#define STD_SERIAL_PORT_DEFNS			\
   74.57 -	/* UART CLK   PORT IRQ     FLAGS        */			\
   74.58 -	{ 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS },	/* ttyS0 */	\
   74.59 -	{ 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS },	/* ttyS1 */	\
   74.60 -	{ 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS },	/* ttyS2 */	\
   74.61 -	{ 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS },	/* ttyS3 */
   74.62 -
   74.63 -/*
   74.64 - * HCDP_SERIAL_PORT_DEFNS should be placed in exactly the same slot 
   74.65 - * in rs_table as defined by HCDP_SERIAL_CONSOLE_PORT in 
   74.66 - * include/linux/serial.h
   74.67 - */
   74.68 -#define HCDP_SERIAL_PORT_DEFNS	\
   74.69 -	{ 0, BASE_BAUD, -1, 0, STD_COM_FLAGS},		/* ttySx device
   74.70 -							   in comments sucks.
   74.71 -							   You add an entry
   74.72 -							   and you get to edit 
   74.73 -							   boatloads of these 
   74.74 -							   comments. Not worth
   74.75 -							   it */
   74.76 -
   74.77 -
   74.78 -#ifdef CONFIG_SERIAL_MANY_PORTS
   74.79 -#define EXTRA_SERIAL_PORT_DEFNS			\
   74.80 -	{ 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, 	/* ttyS4 */	\
   74.81 -	{ 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS },	/* ttyS5 */	\
   74.82 -	{ 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS },	/* ttyS6 */	\
   74.83 -	{ 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS },	/* ttyS7 */	\
   74.84 -	{ 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS },	/* ttyS8 */	\
   74.85 -	{ 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS },	/* ttyS9 */	\
   74.86 -	{ 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS },	/* ttyS10 */	\
   74.87 -	{ 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS },	/* ttyS11 */	\
   74.88 -	{ 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS },	/* ttyS12 */	\
   74.89 -	{ 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS },	/* ttyS13 */	\
   74.90 -	{ 0, BASE_BAUD, 0x000, 0, 0 },	/* ttyS14 (spare) */		\
   74.91 -	{ 0, BASE_BAUD, 0x000, 0, 0 },	/* ttyS15 (spare) */		\
   74.92 -	{ 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS },	/* ttyS16 */	\
   74.93 -	{ 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS },	/* ttyS17 */	\
   74.94 -	{ 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS },	/* ttyS18 */	\
   74.95 -	{ 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS },	/* ttyS19 */	\
   74.96 -	{ 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS },	/* ttyS20 */	\
   74.97 -	{ 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS },	/* ttyS21 */	\
   74.98 -	{ 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS },	/* ttyS22 */	\
   74.99 -	{ 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS },	/* ttyS23 */	\
  74.100 -	{ 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS },	/* ttyS24 */	\
  74.101 -	{ 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS },	/* ttyS25 */	\
  74.102 -	{ 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS },	/* ttyS26 */	\
  74.103 -	{ 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS },	/* ttyS27 */	\
  74.104 -	{ 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS },	/* ttyS28 */	\
  74.105 -	{ 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS },	/* ttyS29 */	\
  74.106 -	{ 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS },	/* ttyS30 */	\
  74.107 -	{ 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS },	/* ttyS31 */
  74.108 -#else
  74.109 -#define EXTRA_SERIAL_PORT_DEFNS
  74.110 -#endif
  74.111 -
  74.112 -/* You can have up to four HUB6's in the system, but I've only
  74.113 - * included two cards here for a total of twelve ports.
  74.114 - */
  74.115 -#if (defined(CONFIG_HUB6) && defined(CONFIG_SERIAL_MANY_PORTS))
  74.116 -#define HUB6_SERIAL_PORT_DFNS		\
  74.117 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,0) },  /* ttyS32 */	\
  74.118 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,1) },  /* ttyS33 */	\
  74.119 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,2) },  /* ttyS34 */	\
  74.120 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,3) },  /* ttyS35 */	\
  74.121 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,4) },  /* ttyS36 */	\
  74.122 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,5) },  /* ttyS37 */	\
  74.123 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,0) },  /* ttyS38 */	\
  74.124 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,1) },  /* ttyS39 */	\
  74.125 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,2) },  /* ttyS40 */	\
  74.126 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,3) },  /* ttyS41 */	\
  74.127 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,4) },  /* ttyS42 */	\
  74.128 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,5) },  /* ttyS43 */
  74.129 -#else
  74.130 -#define HUB6_SERIAL_PORT_DFNS
  74.131 -#endif
  74.132 -
  74.133 -#ifdef CONFIG_MCA
  74.134 -#define MCA_SERIAL_PORT_DFNS			\
  74.135 -	{ 0, BASE_BAUD, 0x3220, 3, MCA_COM_FLAGS },	\
  74.136 -	{ 0, BASE_BAUD, 0x3228, 3, MCA_COM_FLAGS },	\
  74.137 -	{ 0, BASE_BAUD, 0x4220, 3, MCA_COM_FLAGS },	\
  74.138 -	{ 0, BASE_BAUD, 0x4228, 3, MCA_COM_FLAGS },	\
  74.139 -	{ 0, BASE_BAUD, 0x5220, 3, MCA_COM_FLAGS },	\
  74.140 -	{ 0, BASE_BAUD, 0x5228, 3, MCA_COM_FLAGS },
  74.141 -#else
  74.142 -#define MCA_SERIAL_PORT_DFNS
  74.143 -#endif
  74.144 -
  74.145 -#define SERIAL_PORT_DFNS		\
  74.146 -	STD_SERIAL_PORT_DEFNS		\
  74.147 -	HCDP_SERIAL_PORT_DEFNS		\
  74.148 -	EXTRA_SERIAL_PORT_DEFNS		\
  74.149 -	HUB6_SERIAL_PORT_DFNS		\
  74.150 -	MCA_SERIAL_PORT_DFNS
  74.151 -
    75.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/setup.h	Tue Mar 11 14:37:27 2003 +0000
    75.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    75.3 @@ -1,10 +0,0 @@
    75.4 -/*
    75.5 - *	Just a place holder. We don't want to have to test x86 before
    75.6 - *	we include stuff
    75.7 - */
    75.8 -
    75.9 -#ifndef _i386_SETUP_H
   75.10 -#define _i386_SETUP_H
   75.11 -
   75.12 -
   75.13 -#endif /* _i386_SETUP_H */
    76.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmbuf.h	Tue Mar 11 14:37:27 2003 +0000
    76.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    76.3 @@ -1,42 +0,0 @@
    76.4 -#ifndef _I386_SHMBUF_H
    76.5 -#define _I386_SHMBUF_H
    76.6 -
    76.7 -/* 
    76.8 - * The shmid64_ds structure for i386 architecture.
    76.9 - * Note extra padding because this structure is passed back and forth
   76.10 - * between kernel and user space.
   76.11 - *
   76.12 - * Pad space is left for:
   76.13 - * - 64-bit time_t to solve y2038 problem
   76.14 - * - 2 miscellaneous 32-bit values
   76.15 - */
   76.16 -
   76.17 -struct shmid64_ds {
   76.18 -	struct ipc64_perm	shm_perm;	/* operation perms */
   76.19 -	size_t			shm_segsz;	/* size of segment (bytes) */
   76.20 -	__kernel_time_t		shm_atime;	/* last attach time */
   76.21 -	unsigned long		__unused1;
   76.22 -	__kernel_time_t		shm_dtime;	/* last detach time */
   76.23 -	unsigned long		__unused2;
   76.24 -	__kernel_time_t		shm_ctime;	/* last change time */
   76.25 -	unsigned long		__unused3;
   76.26 -	__kernel_pid_t		shm_cpid;	/* pid of creator */
   76.27 -	__kernel_pid_t		shm_lpid;	/* pid of last operator */
   76.28 -	unsigned long		shm_nattch;	/* no. of current attaches */
   76.29 -	unsigned long		__unused4;
   76.30 -	unsigned long		__unused5;
   76.31 -};
   76.32 -
   76.33 -struct shminfo64 {
   76.34 -	unsigned long	shmmax;
   76.35 -	unsigned long	shmmin;
   76.36 -	unsigned long	shmmni;
   76.37 -	unsigned long	shmseg;
   76.38 -	unsigned long	shmall;
   76.39 -	unsigned long	__unused1;
   76.40 -	unsigned long	__unused2;
   76.41 -	unsigned long	__unused3;
   76.42 -	unsigned long	__unused4;
   76.43 -};
   76.44 -
   76.45 -#endif /* _I386_SHMBUF_H */
    77.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmparam.h	Tue Mar 11 14:37:27 2003 +0000
    77.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    77.3 @@ -1,6 +0,0 @@
    77.4 -#ifndef _ASMI386_SHMPARAM_H
    77.5 -#define _ASMI386_SHMPARAM_H
    77.6 -
    77.7 -#define	SHMLBA PAGE_SIZE		 /* attach addr a multiple of this */
    77.8 -
    77.9 -#endif /* _ASMI386_SHMPARAM_H */
    78.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sigcontext.h	Tue Mar 11 14:37:27 2003 +0000
    78.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    78.3 @@ -1,83 +0,0 @@
    78.4 -#ifndef _ASMi386_SIGCONTEXT_H
    78.5 -#define _ASMi386_SIGCONTEXT_H
    78.6 -
    78.7 -/*
    78.8 - * As documented in the iBCS2 standard..
    78.9 - *
   78.10 - * The first part of "struct _fpstate" is just the normal i387
   78.11 - * hardware setup, the extra "status" word is used to save the
   78.12 - * coprocessor status word before entering the handler.
   78.13 - *
   78.14 - * Pentium III FXSR, SSE support
   78.15 - *	Gareth Hughes <gareth@valinux.com>, May 2000
   78.16 - *
   78.17 - * The FPU state data structure has had to grow to accomodate the
   78.18 - * extended FPU state required by the Streaming SIMD Extensions.
   78.19 - * There is no documented standard to accomplish this at the moment.
   78.20 - */
   78.21 -struct _fpreg {
   78.22 -	unsigned short significand[4];
   78.23 -	unsigned short exponent;
   78.24 -};
   78.25 -
   78.26 -struct _fpxreg {
   78.27 -	unsigned short significand[4];
   78.28 -	unsigned short exponent;
   78.29 -	unsigned short padding[3];
   78.30 -};
   78.31 -
   78.32 -struct _xmmreg {
   78.33 -	unsigned long element[4];
   78.34 -};
   78.35 -
   78.36 -struct _fpstate {
   78.37 -	/* Regular FPU environment */
   78.38 -	unsigned long 	cw;
   78.39 -	unsigned long	sw;
   78.40 -	unsigned long	tag;
   78.41 -	unsigned long	ipoff;
   78.42 -	unsigned long	cssel;
   78.43 -	unsigned long	dataoff;
   78.44 -	unsigned long	datasel;
   78.45 -	struct _fpreg	_st[8];
   78.46 -	unsigned short	status;
   78.47 -	unsigned short	magic;		/* 0xffff = regular FPU data only */
   78.48 -
   78.49 -	/* FXSR FPU environment */
   78.50 -	unsigned long	_fxsr_env[6];	/* FXSR FPU env is ignored */
   78.51 -	unsigned long	mxcsr;
   78.52 -	unsigned long	reserved;
   78.53 -	struct _fpxreg	_fxsr_st[8];	/* FXSR FPU reg data is ignored */
   78.54 -	struct _xmmreg	_xmm[8];
   78.55 -	unsigned long	padding[56];
   78.56 -};
   78.57 -
   78.58 -#define X86_FXSR_MAGIC		0x0000
   78.59 -
   78.60 -struct sigcontext {
   78.61 -	unsigned short gs, __gsh;
   78.62 -	unsigned short fs, __fsh;
   78.63 -	unsigned short es, __esh;
   78.64 -	unsigned short ds, __dsh;
   78.65 -	unsigned long edi;
   78.66 -	unsigned long esi;
   78.67 -	unsigned long ebp;
   78.68 -	unsigned long esp;
   78.69 -	unsigned long ebx;
   78.70 -	unsigned long edx;
   78.71 -	unsigned long ecx;
   78.72 -	unsigned long eax;
   78.73 -	unsigned long trapno;
   78.74 -	unsigned long err;
   78.75 -	unsigned long eip;
   78.76 -	unsigned short cs, __csh;
   78.77 -	unsigned long eflags;
   78.78 -	unsigned long esp_at_signal;
   78.79 -	unsigned short ss, __ssh;
   78.80 -	struct _fpstate * fpstate;
   78.81 -	unsigned long oldmask;
   78.82 -	unsigned long cr2;
   78.83 -};
   78.84 -
   78.85 -
   78.86 -#endif
    79.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/siginfo.h	Tue Mar 11 14:37:27 2003 +0000
    79.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    79.3 @@ -1,233 +0,0 @@
    79.4 -#ifndef _I386_SIGINFO_H
    79.5 -#define _I386_SIGINFO_H
    79.6 -
    79.7 -#include <linux/types.h>
    79.8 -
    79.9 -/* XXX: This structure was copied from the Alpha; is there an iBCS version?  */
   79.10 -
   79.11 -typedef union sigval {
   79.12 -	int sival_int;
   79.13 -	void *sival_ptr;
   79.14 -} sigval_t;
   79.15 -
   79.16 -#define SI_MAX_SIZE	128
   79.17 -#define SI_PAD_SIZE	((SI_MAX_SIZE/sizeof(int)) - 3)
   79.18 -
   79.19 -typedef struct siginfo {
   79.20 -	int si_signo;
   79.21 -	int si_errno;
   79.22 -	int si_code;
   79.23 -
   79.24 -	union {
   79.25 -		int _pad[SI_PAD_SIZE];
   79.26 -
   79.27 -		/* kill() */
   79.28 -		struct {
   79.29 -			pid_t _pid;		/* sender's pid */
   79.30 -			uid_t _uid;		/* sender's uid */
   79.31 -		} _kill;
   79.32 -
   79.33 -		/* POSIX.1b timers */
   79.34 -		struct {
   79.35 -			unsigned int _timer1;
   79.36 -			unsigned int _timer2;
   79.37 -		} _timer;
   79.38 -
   79.39 -		/* POSIX.1b signals */
   79.40 -		struct {
   79.41 -			pid_t _pid;		/* sender's pid */
   79.42 -			uid_t _uid;		/* sender's uid */
   79.43 -			sigval_t _sigval;
   79.44 -		} _rt;
   79.45 -
   79.46 -		/* SIGCHLD */
   79.47 -		struct {
   79.48 -			pid_t _pid;		/* which child */
   79.49 -			uid_t _uid;		/* sender's uid */
   79.50 -			int _status;		/* exit code */
   79.51 -			clock_t _utime;
   79.52 -			clock_t _stime;
   79.53 -		} _sigchld;
   79.54 -
   79.55 -		/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
   79.56 -		struct {
   79.57 -			void *_addr; /* faulting insn/memory ref. */
   79.58 -		} _sigfault;
   79.59 -
   79.60 -		/* SIGPOLL */
   79.61 -		struct {
   79.62 -			int _band;	/* POLL_IN, POLL_OUT, POLL_MSG */
   79.63 -			int _fd;
   79.64 -		} _sigpoll;
   79.65 -	} _sifields;
   79.66 -} siginfo_t;
   79.67 -
   79.68 -/*
   79.69 - * How these fields are to be accessed.
   79.70 - */
   79.71 -#define si_pid		_sifields._kill._pid
   79.72 -#define si_uid		_sifields._kill._uid
   79.73 -#define si_status	_sifields._sigchld._status
   79.74 -#define si_utime	_sifields._sigchld._utime
   79.75 -#define si_stime	_sifields._sigchld._stime
   79.76 -#define si_value	_sifields._rt._sigval
   79.77 -#define si_int		_sifields._rt._sigval.sival_int
   79.78 -#define si_ptr		_sifields._rt._sigval.sival_ptr
   79.79 -#define si_addr		_sifields._sigfault._addr
   79.80 -#define si_band		_sifields._sigpoll._band
   79.81 -#define si_fd		_sifields._sigpoll._fd
   79.82 -
   79.83 -#ifdef __KERNEL__
   79.84 -#define __SI_MASK	0xffff0000
   79.85 -#define __SI_KILL	(0 << 16)
   79.86 -#define __SI_TIMER	(1 << 16)
   79.87 -#define __SI_POLL	(2 << 16)
   79.88 -#define __SI_FAULT	(3 << 16)
   79.89 -#define __SI_CHLD	(4 << 16)
   79.90 -#define __SI_RT		(5 << 16)
   79.91 -#define __SI_CODE(T,N)	((T) << 16 | ((N) & 0xffff))
   79.92 -#else
   79.93 -#define __SI_KILL	0
   79.94 -#define __SI_TIMER	0
   79.95 -#define __SI_POLL	0
   79.96 -#define __SI_FAULT	0
   79.97 -#define __SI_CHLD	0
   79.98 -#define __SI_RT		0
   79.99 -#define __SI_CODE(T,N)	(N)
  79.100 -#endif
  79.101 -
  79.102 -/*
  79.103 - * si_code values
  79.104 - * Digital reserves positive values for kernel-generated signals.
  79.105 - */
  79.106 -#define SI_USER		0		/* sent by kill, sigsend, raise */
  79.107 -#define SI_KERNEL	0x80		/* sent by the kernel from somewhere */
  79.108 -#define SI_QUEUE	-1		/* sent by sigqueue */
  79.109 -#define SI_TIMER __SI_CODE(__SI_TIMER,-2) /* sent by timer expiration */
  79.110 -#define SI_MESGQ	-3		/* sent by real time mesq state change */
  79.111 -#define SI_ASYNCIO	-4		/* sent by AIO completion */
  79.112 -#define SI_SIGIO	-5		/* sent by queued SIGIO */
  79.113 -#define SI_TKILL	-6		/* sent by tkill system call */
  79.114 -
  79.115 -#define SI_FROMUSER(siptr)	((siptr)->si_code <= 0)
  79.116 -#define SI_FROMKERNEL(siptr)	((siptr)->si_code > 0)
  79.117 -
  79.118 -/*
  79.119 - * SIGILL si_codes
  79.120 - */
  79.121 -#define ILL_ILLOPC	(__SI_FAULT|1)	/* illegal opcode */
  79.122 -#define ILL_ILLOPN	(__SI_FAULT|2)	/* illegal operand */
  79.123 -#define ILL_ILLADR	(__SI_FAULT|3)	/* illegal addressing mode */
  79.124 -#define ILL_ILLTRP	(__SI_FAULT|4)	/* illegal trap */
  79.125 -#define ILL_PRVOPC	(__SI_FAULT|5)	/* privileged opcode */
  79.126 -#define ILL_PRVREG	(__SI_FAULT|6)	/* privileged register */
  79.127 -#define ILL_COPROC	(__SI_FAULT|7)	/* coprocessor error */
  79.128 -#define ILL_BADSTK	(__SI_FAULT|8)	/* internal stack error */
  79.129 -#define NSIGILL		8
  79.130 -
  79.131 -/*
  79.132 - * SIGFPE si_codes
  79.133 - */
  79.134 -#define FPE_INTDIV	(__SI_FAULT|1)	/* integer divide by zero */
  79.135 -#define FPE_INTOVF	(__SI_FAULT|2)	/* integer overflow */
  79.136 -#define FPE_FLTDIV	(__SI_FAULT|3)	/* floating point divide by zero */
  79.137 -#define FPE_FLTOVF	(__SI_FAULT|4)	/* floating point overflow */
  79.138 -#define FPE_FLTUND	(__SI_FAULT|5)	/* floating point underflow */
  79.139 -#define FPE_FLTRES	(__SI_FAULT|6)	/* floating point inexact result */
  79.140 -#define FPE_FLTINV	(__SI_FAULT|7)	/* floating point invalid operation */
  79.141 -#define FPE_FLTSUB	(__SI_FAULT|8)	/* subscript out of range */
  79.142 -#define NSIGFPE		8
  79.143 -
  79.144 -/*
  79.145 - * SIGSEGV si_codes
  79.146 - */
  79.147 -#define SEGV_MAPERR	(__SI_FAULT|1)	/* address not mapped to object */
  79.148 -#define SEGV_ACCERR	(__SI_FAULT|2)	/* invalid permissions for mapped object */
  79.149 -#define NSIGSEGV	2
  79.150 -
  79.151 -/*
  79.152 - * SIGBUS si_codes
  79.153 - */
  79.154 -#define BUS_ADRALN	(__SI_FAULT|1)	/* invalid address alignment */
  79.155 -#define BUS_ADRERR	(__SI_FAULT|2)	/* non-existant physical address */
  79.156 -#define BUS_OBJERR	(__SI_FAULT|3)	/* object specific hardware error */
  79.157 -#define NSIGBUS		3
  79.158 -
  79.159 -/*
  79.160 - * SIGTRAP si_codes
  79.161 - */
  79.162 -#define TRAP_BRKPT	(__SI_FAULT|1)	/* process breakpoint */
  79.163 -#define TRAP_TRACE	(__SI_FAULT|2)	/* process trace trap */
  79.164 -#define NSIGTRAP	2
  79.165 -
  79.166 -/*
  79.167 - * SIGCHLD si_codes
  79.168 - */
  79.169 -#define CLD_EXITED	(__SI_CHLD|1)	/* child has exited */
  79.170 -#define CLD_KILLED	(__SI_CHLD|2)	/* child was killed */
  79.171 -#define CLD_DUMPED	(__SI_CHLD|3)	/* child terminated abnormally */
  79.172 -#define CLD_TRAPPED	(__SI_CHLD|4)	/* traced child has trapped */
  79.173 -#define CLD_STOPPED	(__SI_CHLD|5)	/* child has stopped */
  79.174 -#define CLD_CONTINUED	(__SI_CHLD|6)	/* stopped child has continued */
  79.175 -#define NSIGCHLD	6
  79.176 -
  79.177 -/*
  79.178 - * SIGPOLL si_codes
  79.179 - */
  79.180 -#define POLL_IN		(__SI_POLL|1)	/* data input available */
  79.181 -#define POLL_OUT	(__SI_POLL|2)	/* output buffers available */
  79.182 -#define POLL_MSG	(__SI_POLL|3)	/* input message available */
  79.183 -#define POLL_ERR	(__SI_POLL|4)	/* i/o error */
  79.184 -#define POLL_PRI	(__SI_POLL|5)	/* high priority input available */
  79.185 -#define POLL_HUP	(__SI_POLL|6)	/* device disconnected */
  79.186 -#define NSIGPOLL	6
  79.187 -
  79.188 -/*
  79.189 - * sigevent definitions
  79.190 - * 
  79.191 - * It seems likely that SIGEV_THREAD will have to be handled from 
  79.192 - * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the
  79.193 - * thread manager then catches and does the appropriate nonsense.
  79.194 - * However, everything is written out here so as to not get lost.
  79.195 - */
  79.196 -#define SIGEV_SIGNAL	0	/* notify via signal */
  79.197 -#define SIGEV_NONE	1	/* other notification: meaningless */
  79.198 -#define SIGEV_THREAD	2	/* deliver via thread creation */
  79.199 -
  79.200 -#define SIGEV_MAX_SIZE	64
  79.201 -#define SIGEV_PAD_SIZE	((SIGEV_MAX_SIZE/sizeof(int)) - 3)
  79.202 -
  79.203 -typedef struct sigevent {
  79.204 -	sigval_t sigev_value;
  79.205 -	int sigev_signo;
  79.206 -	int sigev_notify;
  79.207 -	union {
  79.208 -		int _pad[SIGEV_PAD_SIZE];
  79.209 -
  79.210 -		struct {
  79.211 -			void (*_function)(sigval_t);
  79.212 -			void *_attribute;	/* really pthread_attr_t */
  79.213 -		} _sigev_thread;
  79.214 -	} _sigev_un;
  79.215 -} sigevent_t;
  79.216 -
  79.217 -#define sigev_notify_function	_sigev_un._sigev_thread._function
  79.218 -#define sigev_notify_attributes	_sigev_un._sigev_thread._attribute
  79.219 -
  79.220 -#ifdef __KERNEL__
  79.221 -#include <linux/string.h>
  79.222 -
  79.223 -static inline void copy_siginfo(siginfo_t *to, siginfo_t *from)
  79.224 -{
  79.225 -	if (from->si_code < 0)
  79.226 -		memcpy(to, from, sizeof(siginfo_t));
  79.227 -	else
  79.228 -		/* _sigchld is currently the largest know union member */
  79.229 -		memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
  79.230 -}
  79.231 -
  79.232 -extern int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from);
  79.233 -
  79.234 -#endif /* __KERNEL__ */
  79.235 -
  79.236 -#endif
    80.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/signal.h	Tue Mar 11 14:37:27 2003 +0000
    80.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    80.3 @@ -1,221 +0,0 @@
    80.4 -#ifndef _ASMi386_SIGNAL_H
    80.5 -#define _ASMi386_SIGNAL_H
    80.6 -
    80.7 -#include <linux/types.h>
    80.8 -
    80.9 -/* Avoid too many header ordering problems.  */
   80.10 -struct siginfo;
   80.11 -
   80.12 -#ifdef __KERNEL__
   80.13 -/* Most things should be clean enough to redefine this at will, if care
   80.14 -   is taken to make libc match.  */
   80.15 -
   80.16 -#define _NSIG		64
   80.17 -#define _NSIG_BPW	32
   80.18 -#define _NSIG_WORDS	(_NSIG / _NSIG_BPW)
   80.19 -
   80.20 -typedef unsigned long old_sigset_t;		/* at least 32 bits */
   80.21 -
   80.22 -typedef struct {
   80.23 -	unsigned long sig[_NSIG_WORDS];
   80.24 -} sigset_t;
   80.25 -
   80.26 -#else
   80.27 -/* Here we must cater to libcs that poke about in kernel headers.  */
   80.28 -
   80.29 -#define NSIG		32
   80.30 -typedef unsigned long sigset_t;
   80.31 -
   80.32 -#endif /* __KERNEL__ */
   80.33 -
   80.34 -#define SIGHUP		 1
   80.35 -#define SIGINT		 2
   80.36 -#define SIGQUIT		 3
   80.37 -#define SIGILL		 4
   80.38 -#define SIGTRAP		 5
   80.39 -#define SIGABRT		 6
   80.40 -#define SIGIOT		 6
   80.41 -#define SIGBUS		 7
   80.42 -#define SIGFPE		 8
   80.43 -#define SIGKILL		 9
   80.44 -#define SIGUSR1		10
   80.45 -#define SIGSEGV		11
   80.46 -#define SIGUSR2		12
   80.47 -#define SIGPIPE		13
   80.48 -#define SIGALRM		14
   80.49 -#define SIGTERM		15
   80.50 -#define SIGSTKFLT	16
   80.51 -#define SIGCHLD		17
   80.52 -#define SIGCONT		18
   80.53 -#define SIGSTOP		19
   80.54 -#define SIGTSTP		20
   80.55 -#define SIGTTIN		21
   80.56 -#define SIGTTOU		22
   80.57 -#define SIGURG		23
   80.58 -#define SIGXCPU		24
   80.59 -#define SIGXFSZ		25
   80.60 -#define SIGVTALRM	26
   80.61 -#define SIGPROF		27
   80.62 -#define SIGWINCH	28
   80.63 -#define SIGIO		29
   80.64 -#define SIGPOLL		SIGIO
   80.65 -/*
   80.66 -#define SIGLOST		29
   80.67 -*/
   80.68 -#define SIGPWR		30
   80.69 -#define SIGSYS		31
   80.70 -#define	SIGUNUSED	31
   80.71 -
   80.72 -/* These should not be considered constants from userland.  */
   80.73 -#define SIGRTMIN	32
   80.74 -#define SIGRTMAX	(_NSIG-1)
   80.75 -
   80.76 -/*
   80.77 - * SA_FLAGS values:
   80.78 - *
   80.79 - * SA_ONSTACK indicates that a registered stack_t will be used.
   80.80 - * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
   80.81 - * SA_RESTART flag to get restarting signals (which were the default long ago)
   80.82 - * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
   80.83 - * SA_RESETHAND clears the handler when the signal is delivered.
   80.84 - * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
   80.85 - * SA_NODEFER prevents the current signal from being masked in the handler.
   80.86 - *
   80.87 - * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
   80.88 - * Unix names RESETHAND and NODEFER respectively.
   80.89 - */
   80.90 -#define SA_NOCLDSTOP	0x00000001
   80.91 -#define SA_NOCLDWAIT	0x00000002 /* not supported yet */
   80.92 -#define SA_SIGINFO	0x00000004
   80.93 -#define SA_ONSTACK	0x08000000
   80.94 -#define SA_RESTART	0x10000000
   80.95 -#define SA_NODEFER	0x40000000
   80.96 -#define SA_RESETHAND	0x80000000
   80.97 -
   80.98 -#define SA_NOMASK	SA_NODEFER
   80.99 -#define SA_ONESHOT	SA_RESETHAND
  80.100 -#define SA_INTERRUPT	0x20000000 /* dummy -- ignored */
  80.101 -
  80.102 -#define SA_RESTORER	0x04000000
  80.103 -
  80.104 -/* 
  80.105 - * sigaltstack controls
  80.106 - */
  80.107 -#define SS_ONSTACK	1
  80.108 -#define SS_DISABLE	2
  80.109 -
  80.110 -#define MINSIGSTKSZ	2048
  80.111 -#define SIGSTKSZ	8192
  80.112 -
  80.113 -#ifdef __KERNEL__
  80.114 -
  80.115 -/*
  80.116 - * These values of sa_flags are used only by the kernel as part of the
  80.117 - * irq handling routines.
  80.118 - *
  80.119 - * SA_INTERRUPT is also used by the irq handling routines.
  80.120 - * SA_SHIRQ is for shared interrupt support on PCI and EISA.
  80.121 - */
  80.122 -#define SA_PROBE		SA_ONESHOT
  80.123 -#define SA_SAMPLE_RANDOM	SA_RESTART
  80.124 -#define SA_SHIRQ		0x04000000
  80.125 -#endif
  80.126 -
  80.127 -#define SIG_BLOCK          0	/* for blocking signals */
  80.128 -#define SIG_UNBLOCK        1	/* for unblocking signals */
  80.129 -#define SIG_SETMASK        2	/* for setting the signal mask */
  80.130 -
  80.131 -/* Type of a signal handler.  */
  80.132 -typedef void (*__sighandler_t)(int);
  80.133 -
  80.134 -#define SIG_DFL	((__sighandler_t)0)	/* default signal handling */
  80.135 -#define SIG_IGN	((__sighandler_t)1)	/* ignore signal */
  80.136 -#define SIG_ERR	((__sighandler_t)-1)	/* error return from signal */
  80.137 -
  80.138 -#ifdef __KERNEL__
  80.139 -struct old_sigaction {
  80.140 -	__sighandler_t sa_handler;
  80.141 -	old_sigset_t sa_mask;
  80.142 -	unsigned long sa_flags;
  80.143 -	void (*sa_restorer)(void);
  80.144 -};
  80.145 -
  80.146 -struct sigaction {
  80.147 -	__sighandler_t sa_handler;
  80.148 -	unsigned long sa_flags;
  80.149 -	void (*sa_restorer)(void);
  80.150 -	sigset_t sa_mask;		/* mask last for extensibility */
  80.151 -};
  80.152 -
  80.153 -struct k_sigaction {
  80.154 -	struct sigaction sa;
  80.155 -};
  80.156 -#else
  80.157 -/* Here we must cater to libcs that poke about in kernel headers.  */
  80.158 -
  80.159 -struct sigaction {
  80.160 -	union {
  80.161 -	  __sighandler_t _sa_handler;
  80.162 -	  void (*_sa_sigaction)(int, struct siginfo *, void *);
  80.163 -	} _u;
  80.164 -	sigset_t sa_mask;
  80.165 -	unsigned long sa_flags;
  80.166 -	void (*sa_restorer)(void);
  80.167 -};
  80.168 -
  80.169 -#define sa_handler	_u._sa_handler
  80.170 -#define sa_sigaction	_u._sa_sigaction
  80.171 -
  80.172 -#endif /* __KERNEL__ */
  80.173 -
  80.174 -typedef struct sigaltstack {
  80.175 -	void *ss_sp;
  80.176 -	int ss_flags;
  80.177 -	size_t ss_size;
  80.178 -} stack_t;
  80.179 -
  80.180 -#ifdef __KERNEL__
  80.181 -#include <asm/sigcontext.h>
  80.182 -
  80.183 -#define __HAVE_ARCH_SIG_BITOPS
  80.184 -
  80.185 -static __inline__ void sigaddset(sigset_t *set, int _sig)
  80.186 -{
  80.187 -	__asm__("btsl %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc");
  80.188 -}
  80.189 -
  80.190 -static __inline__ void sigdelset(sigset_t *set, int _sig)
  80.191 -{
  80.192 -	__asm__("btrl %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc");
  80.193 -}
  80.194 -
  80.195 -static __inline__ int __const_sigismember(sigset_t *set, int _sig)
  80.196 -{
  80.197 -	unsigned long sig = _sig - 1;
  80.198 -	return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW));
  80.199 -}
  80.200 -
  80.201 -static __inline__ int __gen_sigismember(sigset_t *set, int _sig)
  80.202 -{
  80.203 -	int ret;
  80.204 -	__asm__("btl %2,%1\n\tsbbl %0,%0"
  80.205 -		: "=r"(ret) : "m"(*set), "Ir"(_sig-1) : "cc");
  80.206 -	return ret;
  80.207 -}
  80.208 -
  80.209 -#define sigismember(set,sig)			\
  80.210 -	(__builtin_constant_p(sig) ?		\
  80.211 -	 __const_sigismember((set),(sig)) :	\
  80.212 -	 __gen_sigismember((set),(sig)))
  80.213 -
  80.214 -#define sigmask(sig)	(1UL << ((sig) - 1))
  80.215 -
  80.216 -static __inline__ int sigfindinword(unsigned long word)
  80.217 -{
  80.218 -	__asm__("bsfl %1,%0" : "=r"(word) : "rm"(word) : "cc");
  80.219 -	return word;
  80.220 -}
  80.221 -
  80.222 -#endif /* __KERNEL__ */
  80.223 -
  80.224 -#endif
    81.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/smplock.h	Tue Mar 11 14:37:27 2003 +0000
    81.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    81.3 @@ -1,81 +0,0 @@
    81.4 -#ifndef __ASM_SMPLOCK_H
    81.5 -#define __ASM_SMPLOCK_H
    81.6 -
    81.7 -/*
    81.8 - * <asm/smplock.h>
    81.9 - *
   81.10 - * i386 SMP lock implementation
   81.11 - */
   81.12 -#include <linux/interrupt.h>
   81.13 -#include <linux/spinlock.h>
   81.14 -#include <linux/sched.h>
   81.15 -#include <asm/current.h>
   81.16 -
   81.17 -extern spinlock_cacheline_t kernel_flag_cacheline;  
   81.18 -#define kernel_flag kernel_flag_cacheline.lock      
   81.19 -
   81.20 -#define kernel_locked()		spin_is_locked(&kernel_flag)
   81.21 -
   81.22 -/*
   81.23 - * Release global kernel lock and global interrupt lock
   81.24 - */
   81.25 -#define release_kernel_lock(task, cpu) \
   81.26 -do { \
   81.27 -	if (task->lock_depth >= 0) \
   81.28 -		spin_unlock(&kernel_flag); \
   81.29 -	release_irqlock(cpu); \
   81.30 -	__sti(); \
   81.31 -} while (0)
   81.32 -
   81.33 -/*
   81.34 - * Re-acquire the kernel lock
   81.35 - */
   81.36 -#define reacquire_kernel_lock(task) \
   81.37 -do { \
   81.38 -	if (task->lock_depth >= 0) \
   81.39 -		spin_lock(&kernel_flag); \
   81.40 -} while (0)
   81.41 -
   81.42 -
   81.43 -/*
   81.44 - * Getting the big kernel lock.
   81.45 - *
   81.46 - * This cannot happen asynchronously,
   81.47 - * so we only need to worry about other
   81.48 - * CPU's.
   81.49 - */
   81.50 -static __inline__ void lock_kernel(void)
   81.51 -{
   81.52 -#if 1
   81.53 -	if (!++current->lock_depth)
   81.54 -		spin_lock(&kernel_flag);
   81.55 -#else
   81.56 -	__asm__ __volatile__(
   81.57 -		"incl %1\n\t"
   81.58 -		"jne 9f"
   81.59 -		spin_lock_string
   81.60 -		"\n9:"
   81.61 -		:"=m" (__dummy_lock(&kernel_flag)),
   81.62 -		 "=m" (current->lock_depth));
   81.63 -#endif
   81.64 -}
   81.65 -
   81.66 -static __inline__ void unlock_kernel(void)
   81.67 -{
   81.68 -	if (current->lock_depth < 0)
   81.69 -		out_of_line_bug();
   81.70 -#if 1
   81.71 -	if (--current->lock_depth < 0)
   81.72 -		spin_unlock(&kernel_flag);
   81.73 -#else
   81.74 -	__asm__ __volatile__(
   81.75 -		"decl %1\n\t"
   81.76 -		"jns 9f\n\t"
   81.77 -		spin_unlock_string
   81.78 -		"\n9:"
   81.79 -		:"=m" (__dummy_lock(&kernel_flag)),
   81.80 -		 "=m" (current->lock_depth));
   81.81 -#endif
   81.82 -}
   81.83 -
   81.84 -#endif /* __ASM_SMPLOCK_H */
    82.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/socket.h	Tue Mar 11 14:37:27 2003 +0000
    82.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    82.3 @@ -1,64 +0,0 @@
    82.4 -#ifndef _ASM_SOCKET_H
    82.5 -#define _ASM_SOCKET_H
    82.6 -
    82.7 -#include <asm/sockios.h>
    82.8 -
    82.9 -/* For setsockopt(2) */
   82.10 -#define SOL_SOCKET	1
   82.11 -
   82.12 -#define SO_DEBUG	1
   82.13 -#define SO_REUSEADDR	2
   82.14 -#define SO_TYPE		3
   82.15 -#define SO_ERROR	4
   82.16 -#define SO_DONTROUTE	5
   82.17 -#define SO_BROADCAST	6
   82.18 -#define SO_SNDBUF	7
   82.19 -#define SO_RCVBUF	8
   82.20 -#define SO_KEEPALIVE	9
   82.21 -#define SO_OOBINLINE	10
   82.22 -#define SO_NO_CHECK	11
   82.23 -#define SO_PRIORITY	12
   82.24 -#define SO_LINGER	13
   82.25 -#define SO_BSDCOMPAT	14
   82.26 -/* To add :#define SO_REUSEPORT 15 */
   82.27 -#define SO_PASSCRED	16
   82.28 -#define SO_PEERCRED	17
   82.29 -#define SO_RCVLOWAT	18
   82.30 -#define SO_SNDLOWAT	19
   82.31 -#define SO_RCVTIMEO	20
   82.32 -#define SO_SNDTIMEO	21
   82.33 -
   82.34 -/* Security levels - as per NRL IPv6 - don't actually do anything */
   82.35 -#define SO_SECURITY_AUTHENTICATION		22
   82.36 -#define SO_SECURITY_ENCRYPTION_TRANSPORT	23
   82.37 -#define SO_SECURITY_ENCRYPTION_NETWORK		24
   82.38 -
   82.39 -#define SO_BINDTODEVICE	25
   82.40 -
   82.41 -/* Socket filtering */
   82.42 -#define SO_ATTACH_FILTER        26
   82.43 -#define SO_DETACH_FILTER        27
   82.44 -
   82.45 -#define SO_PEERNAME		28
   82.46 -#define SO_TIMESTAMP		29
   82.47 -#define SCM_TIMESTAMP		SO_TIMESTAMP
   82.48 -
   82.49 -#define SO_ACCEPTCONN		30
   82.50 -
   82.51 -/* Nasty libc5 fixup - bletch */
   82.52 -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
   82.53 -/* Socket types. */
   82.54 -#define SOCK_STREAM	1		/* stream (connection) socket	*/
   82.55 -#define SOCK_DGRAM	2		/* datagram (conn.less) socket	*/
   82.56 -#define SOCK_RAW	3		/* raw socket			*/
   82.57 -#define SOCK_RDM	4		/* reliably-delivered message	*/
   82.58 -#define SOCK_SEQPACKET	5		/* sequential packet socket	*/
   82.59 -#define SOCK_PACKET	10		/* linux specific way of	*/
   82.60 -					/* getting packets at the dev	*/
   82.61 -					/* level.  For writing rarp and	*/
   82.62 -					/* other similar things on the	*/
   82.63 -					/* user level.			*/
   82.64 -#define	SOCK_MAX	(SOCK_PACKET+1)
   82.65 -#endif
   82.66 -
   82.67 -#endif /* _ASM_SOCKET_H */
    83.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sockios.h	Tue Mar 11 14:37:27 2003 +0000
    83.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    83.3 @@ -1,12 +0,0 @@
    83.4 -#ifndef __ARCH_I386_SOCKIOS__
    83.5 -#define __ARCH_I386_SOCKIOS__
    83.6 -
    83.7 -/* Socket-level I/O control calls. */
    83.8 -#define FIOSETOWN 	0x8901
    83.9 -#define SIOCSPGRP	0x8902
   83.10 -#define FIOGETOWN	0x8903
   83.11 -#define SIOCGPGRP	0x8904
   83.12 -#define SIOCATMARK	0x8905
   83.13 -#define SIOCGSTAMP	0x8906		/* Get stamp */
   83.14 -
   83.15 -#endif
    84.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/softirq.h	Tue Mar 11 14:37:27 2003 +0000
    84.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    84.3 @@ -1,48 +0,0 @@
    84.4 -#ifndef __ASM_SOFTIRQ_H
    84.5 -#define __ASM_SOFTIRQ_H
    84.6 -
    84.7 -#include <asm/atomic.h>
    84.8 -#include <asm/hardirq.h>
    84.9 -
   84.10 -#define __cpu_bh_enable(cpu) \
   84.11 -		do { barrier(); local_bh_count(cpu)--; } while (0)
   84.12 -#define cpu_bh_disable(cpu) \
   84.13 -		do { local_bh_count(cpu)++; barrier(); } while (0)
   84.14 -
   84.15 -#define local_bh_disable()	cpu_bh_disable(smp_processor_id())
   84.16 -#define __local_bh_enable()	__cpu_bh_enable(smp_processor_id())
   84.17 -
   84.18 -#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
   84.19 -
   84.20 -/*
   84.21 - * NOTE: this assembly code assumes:
   84.22 - *
   84.23 - *    (char *)&local_bh_count - 8 == (char *)&softirq_pending
   84.24 - *
   84.25 - * If you change the offsets in irq_stat then you have to
   84.26 - * update this code as well.
   84.27 - */
   84.28 -#define local_bh_enable()						\
   84.29 -do {									\
   84.30 -	unsigned int *ptr = &local_bh_count(smp_processor_id());	\
   84.31 -									\
   84.32 -	barrier();							\
   84.33 -	if (!--*ptr)							\
   84.34 -		__asm__ __volatile__ (					\
   84.35 -			"cmpl $0, -8(%0);"				\
   84.36 -			"jnz 2f;"					\
   84.37 -			"1:;"						\
   84.38 -									\
   84.39 -			LOCK_SECTION_START("")				\
   84.40 -			"2: pushl %%eax; pushl %%ecx; pushl %%edx;"	\
   84.41 -			"call %c1;"					\
   84.42 -			"popl %%edx; popl %%ecx; popl %%eax;"		\
   84.43 -			"jmp 1b;"					\
   84.44 -			LOCK_SECTION_END				\
   84.45 -									\
   84.46 -		: /* no output */					\
   84.47 -		: "r" (ptr), "i" (do_softirq)				\
   84.48 -		/* no registers clobbered */ );				\
   84.49 -} while (0)
   84.50 -
   84.51 -#endif	/* __ASM_SOFTIRQ_H */
    85.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/spinlock.h	Tue Mar 11 14:37:27 2003 +0000
    85.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    85.3 @@ -1,212 +0,0 @@
    85.4 -#ifndef __ASM_SPINLOCK_H
    85.5 -#define __ASM_SPINLOCK_H
    85.6 -
    85.7 -#include <asm/atomic.h>
    85.8 -#include <asm/rwlock.h>
    85.9 -#include <asm/page.h>
   85.10 -#include <linux/config.h>
   85.11 -
   85.12 -extern int printk(const char * fmt, ...)
   85.13 -	__attribute__ ((format (printf, 1, 2)));
   85.14 -
   85.15 -/* It seems that people are forgetting to
   85.16 - * initialize their spinlocks properly, tsk tsk.
   85.17 - * Remember to turn this off in 2.4. -ben
   85.18 - */
   85.19 -#if defined(CONFIG_DEBUG_SPINLOCK)
   85.20 -#define SPINLOCK_DEBUG	1
   85.21 -#else
   85.22 -#define SPINLOCK_DEBUG	0
   85.23 -#endif
   85.24 -
   85.25 -/*
   85.26 - * Your basic SMP spinlocks, allowing only a single CPU anywhere
   85.27 - */
   85.28 -
   85.29 -typedef struct {
   85.30 -	volatile unsigned int lock;
   85.31 -#if SPINLOCK_DEBUG
   85.32 -	unsigned magic;
   85.33 -#endif
   85.34 -} spinlock_t;
   85.35 -
   85.36 -#define SPINLOCK_MAGIC	0xdead4ead
   85.37 -
   85.38 -#if SPINLOCK_DEBUG
   85.39 -#define SPINLOCK_MAGIC_INIT	, SPINLOCK_MAGIC
   85.40 -#else
   85.41 -#define SPINLOCK_MAGIC_INIT	/* */
   85.42 -#endif
   85.43 -
   85.44 -#define SPIN_LOCK_UNLOCKED (spinlock_t) { 1 SPINLOCK_MAGIC_INIT }
   85.45 -
   85.46 -#define spin_lock_init(x)	do { *(x) = SPIN_LOCK_UNLOCKED; } while(0)
   85.47 -
   85.48 -/*
   85.49 - * Simple spin lock operations.  There are two variants, one clears IRQ's
   85.50 - * on the local processor, one does not.
   85.51 - *
   85.52 - * We make no fairness assumptions. They have a cost.
   85.53 - */
   85.54 -
   85.55 -#define spin_is_locked(x)	(*(volatile signed char *)(&(x)->lock) <= 0)
   85.56 -#define spin_unlock_wait(x)	do { barrier(); } while(spin_is_locked(x))
   85.57 -
   85.58 -#define spin_lock_string \
   85.59 -	"\n1:\t" \
   85.60 -	"lock ; decb %0\n\t" \
   85.61 -	"js 2f\n" \
   85.62 -	LOCK_SECTION_START("") \
   85.63 -	"2:\t" \
   85.64 -	"cmpb $0,%0\n\t" \
   85.65 -	"rep;nop\n\t" \
   85.66 -	"jle 2b\n\t" \
   85.67 -	"jmp 1b\n" \
   85.68 -	LOCK_SECTION_END
   85.69 -
   85.70 -/*
   85.71 - * This works. Despite all the confusion.
   85.72 - * (except on PPro SMP or if we are using OOSTORE)
   85.73 - * (PPro errata 66, 92)
   85.74 - */
   85.75 - 
   85.76 -#if !defined(CONFIG_X86_OOSTORE) && !defined(CONFIG_X86_PPRO_FENCE)
   85.77 -
   85.78 -#define spin_unlock_string \
   85.79 -	"movb $1,%0" \
   85.80 -		:"=m" (lock->lock) : : "memory"
   85.81 -
   85.82 -
   85.83 -static inline void spin_unlock(spinlock_t *lock)
   85.84 -{
   85.85 -#if SPINLOCK_DEBUG
   85.86 -	if (lock->magic != SPINLOCK_MAGIC)
   85.87 -		BUG();
   85.88 -	if (!spin_is_locked(lock))
   85.89 -		BUG();
   85.90 -#endif
   85.91 -	__asm__ __volatile__(
   85.92 -		spin_unlock_string
   85.93 -	);
   85.94 -}
   85.95 -
   85.96 -#else
   85.97 -
   85.98 -#define spin_unlock_string \
   85.99 -	"xchgb %b0, %1" \
  85.100 -		:"=q" (oldval), "=m" (lock->lock) \
  85.101 -		:"0" (oldval) : "memory"
  85.102 -
  85.103 -static inline void spin_unlock(spinlock_t *lock)
  85.104 -{
  85.105 -	char oldval = 1;
  85.106 -#if SPINLOCK_DEBUG
  85.107 -	if (lock->magic != SPINLOCK_MAGIC)
  85.108 -		BUG();
  85.109 -	if (!spin_is_locked(lock))
  85.110 -		BUG();
  85.111 -#endif
  85.112 -	__asm__ __volatile__(
  85.113 -		spin_unlock_string
  85.114 -	);
  85.115 -}
  85.116 -
  85.117 -#endif
  85.118 -
  85.119 -static inline int spin_trylock(spinlock_t *lock)
  85.120 -{
  85.121 -	char oldval;
  85.122 -	__asm__ __volatile__(
  85.123 -		"xchgb %b0,%1"
  85.124 -		:"=q" (oldval), "=m" (lock->lock)
  85.125 -		:"0" (0) : "memory");
  85.126 -	return oldval > 0;
  85.127 -}
  85.128 -
  85.129 -static inline void spin_lock(spinlock_t *lock)
  85.130 -{
  85.131 -#if SPINLOCK_DEBUG
  85.132 -	__label__ here;
  85.133 -here:
  85.134 -	if (lock->magic != SPINLOCK_MAGIC) {
  85.135 -printk("eip: %p\n", &&here);
  85.136 -		BUG();
  85.137 -	}
  85.138 -#endif
  85.139 -	__asm__ __volatile__(
  85.140 -		spin_lock_string
  85.141 -		:"=m" (lock->lock) : : "memory");
  85.142 -}
  85.143 -
  85.144 -
  85.145 -/*
  85.146 - * Read-write spinlocks, allowing multiple readers
  85.147 - * but only one writer.
  85.148 - *
  85.149 - * NOTE! it is quite common to have readers in interrupts
  85.150 - * but no interrupt writers. For those circumstances we
  85.151 - * can "mix" irq-safe locks - any writer needs to get a
  85.152 - * irq-safe write-lock, but readers can get non-irqsafe
  85.153 - * read-locks.
  85.154 - */
  85.155 -typedef struct {
  85.156 -	volatile unsigned int lock;
  85.157 -#if SPINLOCK_DEBUG
  85.158 -	unsigned magic;
  85.159 -#endif
  85.160 -} rwlock_t;
  85.161 -
  85.162 -#define RWLOCK_MAGIC	0xdeaf1eed
  85.163 -
  85.164 -#if SPINLOCK_DEBUG
  85.165 -#define RWLOCK_MAGIC_INIT	, RWLOCK_MAGIC
  85.166 -#else
  85.167 -#define RWLOCK_MAGIC_INIT	/* */
  85.168 -#endif
  85.169 -
  85.170 -#define RW_LOCK_UNLOCKED (rwlock_t) { RW_LOCK_BIAS RWLOCK_MAGIC_INIT }
  85.171 -
  85.172 -#define rwlock_init(x)	do { *(x) = RW_LOCK_UNLOCKED; } while(0)
  85.173 -
  85.174 -/*
  85.175 - * On x86, we implement read-write locks as a 32-bit counter
  85.176 - * with the high bit (sign) being the "contended" bit.
  85.177 - *
  85.178 - * The inline assembly is non-obvious. Think about it.
  85.179 - *
  85.180 - * Changed to use the same technique as rw semaphores.  See
  85.181 - * semaphore.h for details.  -ben
  85.182 - */
  85.183 -/* the spinlock helpers are in arch/i386/kernel/semaphore.c */
  85.184 -
  85.185 -static inline void read_lock(rwlock_t *rw)
  85.186 -{
  85.187 -#if SPINLOCK_DEBUG
  85.188 -	if (rw->magic != RWLOCK_MAGIC)
  85.189 -		BUG();
  85.190 -#endif
  85.191 -	__build_read_lock(rw, "__read_lock_failed");
  85.192 -}
  85.193 -
  85.194 -static inline void write_lock(rwlock_t *rw)
  85.195 -{
  85.196 -#if SPINLOCK_DEBUG
  85.197 -	if (rw->magic != RWLOCK_MAGIC)
  85.198 -		BUG();
  85.199 -#endif
  85.200 -	__build_write_lock(rw, "__write_lock_failed");
  85.201 -}
  85.202 -
  85.203 -#define read_unlock(rw)		asm volatile("lock ; incl %0" :"=m" ((rw)->lock) : : "memory")
  85.204 -#define write_unlock(rw)	asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ",%0":"=m" ((rw)->lock) : : "memory")
  85.205 -
  85.206 -static inline int write_trylock(rwlock_t *lock)
  85.207 -{
  85.208 -	atomic_t *count = (atomic_t *)lock;
  85.209 -	if (atomic_sub_and_test(RW_LOCK_BIAS, count))
  85.210 -		return 1;
  85.211 -	atomic_add(RW_LOCK_BIAS, count);
  85.212 -	return 0;
  85.213 -}
  85.214 -
  85.215 -#endif /* __ASM_SPINLOCK_H */
    86.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/stat.h	Tue Mar 11 14:37:27 2003 +0000
    86.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    86.3 @@ -1,78 +0,0 @@
    86.4 -#ifndef _I386_STAT_H
    86.5 -#define _I386_STAT_H
    86.6 -
    86.7 -struct __old_kernel_stat {
    86.8 -	unsigned short st_dev;
    86.9 -	unsigned short st_ino;
   86.10 -	unsigned short st_mode;
   86.11 -	unsigned short st_nlink;
   86.12 -	unsigned short st_uid;
   86.13 -	unsigned short st_gid;
   86.14 -	unsigned short st_rdev;
   86.15 -	unsigned long  st_size;
   86.16 -	unsigned long  st_atime;
   86.17 -	unsigned long  st_mtime;
   86.18 -	unsigned long  st_ctime;
   86.19 -};
   86.20 -
   86.21 -struct stat {
   86.22 -	unsigned short st_dev;
   86.23 -	unsigned short __pad1;
   86.24 -	unsigned long st_ino;
   86.25 -	unsigned short st_mode;
   86.26 -	unsigned short st_nlink;
   86.27 -	unsigned short st_uid;
   86.28 -	unsigned short st_gid;
   86.29 -	unsigned short st_rdev;
   86.30 -	unsigned short __pad2;
   86.31 -	unsigned long  st_size;
   86.32 -	unsigned long  st_blksize;
   86.33 -	unsigned long  st_blocks;
   86.34 -	unsigned long  st_atime;
   86.35 -	unsigned long  __unused1;
   86.36 -	unsigned long  st_mtime;
   86.37 -	unsigned long  __unused2;
   86.38 -	unsigned long  st_ctime;
   86.39 -	unsigned long  __unused3;
   86.40 -	unsigned long  __unused4;
   86.41 -	unsigned long  __unused5;
   86.42 -};
   86.43 -
   86.44 -/* This matches struct stat64 in glibc2.1, hence the absolutely
   86.45 - * insane amounts of padding around dev_t's.
   86.46 - */
   86.47 -struct stat64 {
   86.48 -	unsigned short	st_dev;
   86.49 -	unsigned char	__pad0[10];
   86.50 -
   86.51 -#define STAT64_HAS_BROKEN_ST_INO	1
   86.52 -	unsigned long	__st_ino;
   86.53 -
   86.54 -	unsigned int	st_mode;
   86.55 -	unsigned int	st_nlink;
   86.56 -
   86.57 -	unsigned long	st_uid;
   86.58 -	unsigned long	st_gid;
   86.59 -
   86.60 -	unsigned short	st_rdev;
   86.61 -	unsigned char	__pad3[10];
   86.62 -
   86.63 -	long long	st_size;
   86.64 -	unsigned long	st_blksize;
   86.65 -
   86.66 -	unsigned long	st_blocks;	/* Number 512-byte blocks allocated. */
   86.67 -	unsigned long	__pad4;		/* future possible st_blocks high bits */
   86.68 -
   86.69 -	unsigned long	st_atime;
   86.70 -	unsigned long	__pad5;
   86.71 -
   86.72 -	unsigned long	st_mtime;
   86.73 -	unsigned long	__pad6;
   86.74 -
   86.75 -	unsigned long	st_ctime;
   86.76 -	unsigned long	__pad7;		/* will be high 32 bits of ctime someday */
   86.77 -
   86.78 -	unsigned long long	st_ino;
   86.79 -};
   86.80 -
   86.81 -#endif
    87.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/statfs.h	Tue Mar 11 14:37:27 2003 +0000
    87.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    87.3 @@ -1,25 +0,0 @@
    87.4 -#ifndef _I386_STATFS_H
    87.5 -#define _I386_STATFS_H
    87.6 -
    87.7 -#ifndef __KERNEL_STRICT_NAMES
    87.8 -
    87.9 -#include <linux/types.h>
   87.10 -
   87.11 -typedef __kernel_fsid_t	fsid_t;
   87.12 -
   87.13 -#endif
   87.14 -
   87.15 -struct statfs {
   87.16 -	long f_type;
   87.17 -	long f_bsize;
   87.18 -	long f_blocks;
   87.19 -	long f_bfree;
   87.20 -	long f_bavail;
   87.21 -	long f_files;
   87.22 -	long f_ffree;
   87.23 -	__kernel_fsid_t f_fsid;
   87.24 -	long f_namelen;
   87.25 -	long f_spare[6];
   87.26 -};
   87.27 -
   87.28 -#endif
    88.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string-486.h	Tue Mar 11 14:37:27 2003 +0000
    88.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    88.3 @@ -1,617 +0,0 @@
    88.4 -#ifndef _I386_STRING_I486_H_
    88.5 -#define _I386_STRING_I486_H_
    88.6 -
    88.7 -/*
    88.8 - * This string-include defines all string functions as inline
    88.9 - * functions. Use gcc. It also assumes ds=es=data space, this should be
   88.10 - * normal. Most of the string-functions are rather heavily hand-optimized,
   88.11 - * see especially strtok,strstr,str[c]spn. They should work, but are not
   88.12 - * very easy to understand. Everything is done entirely within the register
   88.13 - * set, making the functions fast and clean. 
   88.14 - *
   88.15 - *		Copyright (C) 1991, 1992 Linus Torvalds
   88.16 - *		Revised and optimized for i486/pentium
   88.17 - *		1994/03/15 by Alberto Vignani/Davide Parodi @crf.it
   88.18 - *
   88.19 - *	Split into 2 CPU specific files by Alan Cox to keep #ifdef noise down.
   88.20 - *
   88.21 - *	1999/10/5	Proper register args for newer GCCs and minor bugs
   88.22 - *			fixed - Petko Manolov (petkan@spct.net)
   88.23 - *	1999/10/14	3DNow memscpy() added - Petkan
   88.24 - *	2000/05/09	extern changed to static in function definitions
   88.25 - *			and a few cleanups - Petkan
   88.26 - */
   88.27 -
   88.28 -#define __HAVE_ARCH_STRCPY
   88.29 -static inline char * strcpy(char * dest,const char *src)
   88.30 -{
   88.31 -register char *tmp= (char *)dest;
   88.32 -register char dummy;
   88.33 -__asm__ __volatile__(
   88.34 -	"\n1:\t"
   88.35 -	"movb (%0),%2\n\t"
   88.36 -	"incl %0\n\t"
   88.37 -	"movb %2,(%1)\n\t"
   88.38 -	"incl %1\n\t"
   88.39 -	"testb %2,%2\n\t"
   88.40 -	"jne 1b"
   88.41 -	:"=r" (src), "=r" (tmp), "=q" (dummy)
   88.42 -	:"0" (src), "1" (tmp)
   88.43 -	:"memory");
   88.44 -return dest;
   88.45 -}
   88.46 -
   88.47 -#define __HAVE_ARCH_STRNCPY
   88.48 -static inline char * strncpy(char * dest,const char *src,size_t count)
   88.49 -{
   88.50 -register char *tmp= (char *)dest;
   88.51 -register char dummy;
   88.52 -if (count) {
   88.53 -__asm__ __volatile__(
   88.54 -	"\n1:\t"
   88.55 -	"movb (%0),%2\n\t"
   88.56 -	"incl %0\n\t"
   88.57 -	"movb %2,(%1)\n\t"
   88.58 -	"incl %1\n\t"
   88.59 -	"decl %3\n\t"
   88.60 -	"je 3f\n\t"
   88.61 -	"testb %2,%2\n\t"
   88.62 -	"jne 1b\n\t"
   88.63 -	"2:\tmovb %2,(%1)\n\t"
   88.64 -	"incl %1\n\t"
   88.65 -	"decl %3\n\t"
   88.66 -	"jne 2b\n\t"
   88.67 -	"3:"
   88.68 -	:"=r" (src), "=r" (tmp), "=q" (dummy), "=r" (count)
   88.69 -	:"0" (src), "1" (tmp), "3" (count)
   88.70 -	:"memory");
   88.71 -    } /* if (count) */
   88.72 -return dest;
   88.73 -}
   88.74 -
   88.75 -#define __HAVE_ARCH_STRCAT
   88.76 -static inline char * strcat(char * dest,const char * src)
   88.77 -{
   88.78 -register char *tmp = (char *)(dest-1);
   88.79 -register char dummy;
   88.80 -__asm__ __volatile__(
   88.81 -	"\n1:\tincl %1\n\t"
   88.82 -	"cmpb $0,(%1)\n\t"
   88.83 -	"jne 1b\n"
   88.84 -	"2:\tmovb (%2),%b0\n\t"
   88.85 -	"incl %2\n\t"
   88.86 -	"movb %b0,(%1)\n\t"
   88.87 -	"incl %1\n\t"
   88.88 -	"testb %b0,%b0\n\t"
   88.89 -	"jne 2b\n"
   88.90 -	:"=q" (dummy), "=r" (tmp), "=r" (src)
   88.91 -	:"1"  (tmp), "2"  (src)
   88.92 -	:"memory");
   88.93 -return dest;
   88.94 -}
   88.95 -
   88.96 -#define __HAVE_ARCH_STRNCAT
   88.97 -static inline char * strncat(char * dest,const char * src,size_t count)
   88.98 -{
   88.99 -register char *tmp = (char *)(dest-1);
  88.100 -register char dummy;
  88.101 -__asm__ __volatile__(
  88.102 -	"\n1:\tincl %1\n\t"
  88.103 -	"cmpb $0,(%1)\n\t"
  88.104 -	"jne 1b\n"
  88.105 -	"2:\tdecl %3\n\t"
  88.106 -	"js 3f\n\t"
  88.107 -	"movb (%2),%b0\n\t"
  88.108 -	"incl %2\n\t"
  88.109 -	"movb %b0,(%1)\n\t"
  88.110 -	"incl %1\n\t"
  88.111 -	"testb %b0,%b0\n\t"
  88.112 -	"jne 2b\n"
  88.113 -	"3:\txorb %0,%0\n\t"
  88.114 -	"movb %b0,(%1)\n\t"
  88.115 -	:"=q" (dummy), "=r" (tmp), "=r" (src), "=r" (count)
  88.116 -	:"1"  (tmp), "2"  (src), "3"  (count)
  88.117 -	:"memory");
  88.118 -return dest;
  88.119 -}
  88.120 -
  88.121 -#define __HAVE_ARCH_STRCMP
  88.122 -static inline int strcmp(const char * cs,const char * ct)
  88.123 -{
  88.124 -register int __res;
  88.125 -__asm__ __volatile__(
  88.126 -	"\n1:\tmovb (%1),%b0\n\t"
  88.127 -	"incl %1\n\t"
  88.128 -	"cmpb %b0,(%2)\n\t"
  88.129 -	"jne 2f\n\t"
  88.130 -	"incl %2\n\t"
  88.131 -	"testb %b0,%b0\n\t"
  88.132 -	"jne 1b\n\t"
  88.133 -	"xorl %0,%0\n\t"
  88.134 -	"jmp 3f\n"
  88.135 -	"2:\tmovl $1,%0\n\t"
  88.136 -	"jb 3f\n\t"
  88.137 -	"negl %0\n"
  88.138 -	"3:"
  88.139 -	:"=q" (__res), "=r" (cs), "=r" (ct)
  88.140 -	:"1" (cs), "2" (ct)
  88.141 -	: "memory" );
  88.142 -return __res;
  88.143 -}
  88.144 -
  88.145 -#define __HAVE_ARCH_STRNCMP
  88.146 -static inline int strncmp(const char * cs,const char * ct,size_t count)
  88.147 -{
  88.148 -register int __res;
  88.149 -__asm__ __volatile__(
  88.150 -	"\n1:\tdecl %3\n\t"
  88.151 -	"js 2f\n\t"
  88.152 -	"movb (%1),%b0\n\t"
  88.153 -	"incl %1\n\t"
  88.154 -	"cmpb %b0,(%2)\n\t"
  88.155 -	"jne 3f\n\t"
  88.156 -	"incl %2\n\t"
  88.157 -	"testb %b0,%b0\n\t"
  88.158 -	"jne 1b\n"
  88.159 -	"2:\txorl %0,%0\n\t"
  88.160 -	"jmp 4f\n"
  88.161 -	"3:\tmovl $1,%0\n\t"
  88.162 -	"jb 4f\n\t"
  88.163 -	"negl %0\n"
  88.164 -	"4:"
  88.165 -	:"=q" (__res), "=r" (cs), "=r" (ct), "=r" (count)
  88.166 -	:"1"  (cs), "2"  (ct),  "3" (count));
  88.167 -return __res;
  88.168 -}
  88.169 -
  88.170 -#define __HAVE_ARCH_STRCHR
  88.171 -static inline char * strchr(const char * s, int c)
  88.172 -{
  88.173 -register char * __res;
  88.174 -__asm__ __volatile__(
  88.175 -	"movb %%al,%%ah\n"
  88.176 -	"1:\tmovb (%1),%%al\n\t"
  88.177 -	"cmpb %%ah,%%al\n\t"
  88.178 -	"je 2f\n\t"
  88.179 -	"incl %1\n\t"
  88.180 -	"testb %%al,%%al\n\t"
  88.181 -	"jne 1b\n\t"
  88.182 -	"xorl %1,%1\n"
  88.183 -	"2:\tmovl %1,%0\n\t"
  88.184 -	:"=a" (__res), "=r" (s)
  88.185 -	:"0" (c),      "1"  (s));
  88.186 -return __res;
  88.187 -}
  88.188 -
  88.189 -#define __HAVE_ARCH_STRRCHR
  88.190 -static inline char * strrchr(const char * s, int c)
  88.191 -{
  88.192 -int	d0, d1;
  88.193 -register char * __res;
  88.194 -__asm__ __volatile__(
  88.195 -	"movb %%al,%%ah\n"
  88.196 -	"1:\tlodsb\n\t"
  88.197 -	"cmpb %%ah,%%al\n\t"
  88.198 -	"jne 2f\n\t"
  88.199 -	"leal -1(%%esi),%0\n"
  88.200 -	"2:\ttestb %%al,%%al\n\t"
  88.201 -	"jne 1b"
  88.202 -	:"=d" (__res), "=&S" (d0), "=&a" (d1)
  88.203 -	:"0" (0), "1" (s), "2" (c));
  88.204 -return __res;
  88.205 -}
  88.206 -
  88.207 -
  88.208 -#define __HAVE_ARCH_STRCSPN
  88.209 -static inline size_t strcspn(const char * cs, const char * ct)
  88.210 -{
  88.211 -int	d0, d1;
  88.212 -register char * __res;
  88.213 -__asm__ __volatile__(
  88.214 -	"movl %6,%%edi\n\t"
  88.215 -	"repne\n\t"
  88.216 -	"scasb\n\t"
  88.217 -	"notl %%ecx\n\t"
  88.218 -	"decl %%ecx\n\t"
  88.219 -	"movl %%ecx,%%edx\n"
  88.220 -	"1:\tlodsb\n\t"
  88.221 -	"testb %%al,%%al\n\t"
  88.222 -	"je 2f\n\t"
  88.223 -	"movl %6,%%edi\n\t"
  88.224 -	"movl %%edx,%%ecx\n\t"
  88.225 -	"repne\n\t"
  88.226 -	"scasb\n\t"
  88.227 -	"jne 1b\n"
  88.228 -	"2:\tdecl %0"
  88.229 -	:"=S" (__res), "=&a" (d0), "=&c" (d1)
  88.230 -	:"0" (cs), "1" (0), "2" (0xffffffff), "g" (ct)
  88.231 -	:"dx", "di");
  88.232 -return __res-cs;
  88.233 -}
  88.234 -
  88.235 -
  88.236 -#define __HAVE_ARCH_STRLEN
  88.237 -static inline size_t strlen(const char * s)
  88.238 -{
  88.239 -/*
  88.240 - * slightly slower on a 486, but with better chances of
  88.241 - * register allocation
  88.242 - */
  88.243 -register char dummy, *tmp= (char *)s;
  88.244 -__asm__ __volatile__(
  88.245 -	"\n1:\t"
  88.246 -	"movb\t(%0),%1\n\t"
  88.247 -	"incl\t%0\n\t"
  88.248 -	"testb\t%1,%1\n\t"
  88.249 -	"jne\t1b"
  88.250 -	:"=r" (tmp),"=q" (dummy)
  88.251 -	:"0" (s)
  88.252 -	: "memory" );
  88.253 -return (tmp-s-1);
  88.254 -}
  88.255 -
  88.256 -/* Added by Gertjan van Wingerde to make minix and sysv module work */
  88.257 -#define __HAVE_ARCH_STRNLEN
  88.258 -static inline size_t strnlen(const char * s, size_t count)
  88.259 -{
  88.260 -int	d0;
  88.261 -register int __res;
  88.262 -__asm__ __volatile__(
  88.263 -	"movl %3,%0\n\t"
  88.264 -	"jmp 2f\n"
  88.265 -	"1:\tcmpb $0,(%0)\n\t"
  88.266 -	"je 3f\n\t"
  88.267 -	"incl %0\n"
  88.268 -	"2:\tdecl %2\n\t"
  88.269 -	"cmpl $-1,%2\n\t"
  88.270 -	"jne 1b\n"
  88.271 -	"3:\tsubl %3,%0"
  88.272 -	:"=a" (__res), "=&d" (d0)
  88.273 -	:"1" (count), "c" (s));
  88.274 -return __res;
  88.275 -}
  88.276 -/* end of additional stuff */
  88.277 -
  88.278 -
  88.279 -/*
  88.280 - *	These ought to get tweaked to do some cache priming.
  88.281 - */
  88.282 - 
  88.283 -static inline void * __memcpy_by4(void * to, const void * from, size_t n)
  88.284 -{
  88.285 -register void *tmp = (void *)to;
  88.286 -register int dummy1,dummy2;
  88.287 -__asm__ __volatile__ (
  88.288 -	"\n1:\tmovl (%2),%0\n\t"
  88.289 -	"addl $4,%2\n\t"
  88.290 -	"movl %0,(%1)\n\t"
  88.291 -	"addl $4,%1\n\t"
  88.292 -	"decl %3\n\t"
  88.293 -	"jnz 1b"
  88.294 -	:"=r" (dummy1), "=r" (tmp), "=r" (from), "=r" (dummy2) 
  88.295 -	:"1" (tmp), "2" (from), "3" (n/4)
  88.296 -	:"memory");
  88.297 -return (to);
  88.298 -}
  88.299 -
  88.300 -static inline void * __memcpy_by2(void * to, const void * from, size_t n)
  88.301 -{
  88.302 -register void *tmp = (void *)to;
  88.303 -register int dummy1,dummy2;
  88.304 -__asm__ __volatile__ (
  88.305 -	"shrl $1,%3\n\t"
  88.306 -	"jz 2f\n"                 /* only a word */
  88.307 -	"1:\tmovl (%2),%0\n\t"
  88.308 -	"addl $4,%2\n\t"
  88.309 -	"movl %0,(%1)\n\t"
  88.310 -	"addl $4,%1\n\t"
  88.311 -	"decl %3\n\t"
  88.312 -	"jnz 1b\n"
  88.313 -	"2:\tmovw (%2),%w0\n\t"
  88.314 -	"movw %w0,(%1)"
  88.315 -	:"=r" (dummy1), "=r" (tmp), "=r" (from), "=r" (dummy2) 
  88.316 -	:"1" (tmp), "2" (from), "3" (n/2)
  88.317 -	:"memory");
  88.318 -return (to);
  88.319 -}
  88.320 -
  88.321 -static inline void * __memcpy_g(void * to, const void * from, size_t n)
  88.322 -{
  88.323 -int	d0, d1, d2;
  88.324 -register void *tmp = (void *)to;
  88.325 -__asm__ __volatile__ (
  88.326 -	"shrl $1,%%ecx\n\t"
  88.327 -	"jnc 1f\n\t"
  88.328 -	"movsb\n"
  88.329 -	"1:\tshrl $1,%%ecx\n\t"
  88.330 -	"jnc 2f\n\t"
  88.331 -	"movsw\n"
  88.332 -	"2:\trep\n\t"
  88.333 -	"movsl"
  88.334 -	:"=&c" (d0), "=&D" (d1), "=&S" (d2)
  88.335 -	:"0" (n), "1" ((long) tmp), "2" ((long) from)
  88.336 -	:"memory");
  88.337 -return (to);
  88.338 -}
  88.339 -
  88.340 -#define __memcpy_c(d,s,count) \
  88.341 -((count%4==0) ? \
  88.342 - __memcpy_by4((d),(s),(count)) : \
  88.343 - ((count%2==0) ? \
  88.344 -  __memcpy_by2((d),(s),(count)) : \
  88.345 -  __memcpy_g((d),(s),(count))))
  88.346 -  
  88.347 -#define __memcpy(d,s,count) \
  88.348 -(__builtin_constant_p(count) ? \
  88.349 - __memcpy_c((d),(s),(count)) : \
  88.350 - __memcpy_g((d),(s),(count)))
  88.351 - 
  88.352 -#define __HAVE_ARCH_MEMCPY
  88.353 -
  88.354 -#include <linux/config.h>
  88.355 -
  88.356 -#ifdef CONFIG_X86_USE_3DNOW
  88.357 -
  88.358 -#include <asm/mmx.h>
  88.359 -
  88.360 -/*
  88.361 -**      This CPU favours 3DNow strongly (eg AMD K6-II, K6-III, Athlon)
  88.362 -*/
  88.363 -
  88.364 -static inline void * __constant_memcpy3d(void * to, const void * from, size_t len)
  88.365 -{
  88.366 -	if (len < 512)
  88.367 -		return __memcpy_c(to, from, len);
  88.368 -	return _mmx_memcpy(to, from, len);
  88.369 -}
  88.370 -
  88.371 -static inline void *__memcpy3d(void *to, const void *from, size_t len)
  88.372 -{
  88.373 -	if(len < 512)
  88.374 -		return __memcpy_g(to, from, len);
  88.375 -	return _mmx_memcpy(to, from, len);
  88.376 -}
  88.377 -
  88.378 -#define memcpy(d, s, count) \
  88.379 -(__builtin_constant_p(count) ? \
  88.380 - __constant_memcpy3d((d),(s),(count)) : \
  88.381 - __memcpy3d((d),(s),(count)))
  88.382 - 
  88.383 -#else /* CONFIG_X86_USE_3DNOW */
  88.384 -
  88.385 -/*
  88.386 -**	Generic routines
  88.387 -*/
  88.388 -
  88.389 -
  88.390 -#define memcpy(d, s, count) __memcpy(d, s, count)
  88.391 -
  88.392 -#endif /* CONFIG_X86_USE_3DNOW */ 
  88.393 -
  88.394 -
  88.395 -extern void __struct_cpy_bug( void );
  88.396 -
  88.397 -#define struct_cpy(x,y)				\
  88.398 -({						\
  88.399 -	if (sizeof(*(x)) != sizeof(*(y)))	\
  88.400 -		__struct_cpy_bug;		\
  88.401 -	memcpy(x, y, sizeof(*(x)));		\
  88.402 -})
  88.403 -
  88.404 -
  88.405 -#define __HAVE_ARCH_MEMMOVE
  88.406 -static inline void * memmove(void * dest,const void * src, size_t n)
  88.407 -{
  88.408 -int	d0, d1, d2;
  88.409 -register void *tmp = (void *)dest;
  88.410 -if (dest<src)
  88.411 -__asm__ __volatile__ (
  88.412 -	"rep\n\t"
  88.413 -	"movsb"
  88.414 -	:"=&c" (d0), "=&S" (d1), "=&D" (d2)
  88.415 -	:"0" (n), "1" (src), "2" (tmp)
  88.416 -	:"memory");
  88.417 -else
  88.418 -__asm__ __volatile__ (
  88.419 -	"std\n\t"
  88.420 -	"rep\n\t"
  88.421 -	"movsb\n\t"
  88.422 -	"cld"
  88.423 -	:"=&c" (d0), "=&S" (d1), "=&D" (d2)
  88.424 -	:"0" (n), "1" (n-1+(const char *)src), "2" (n-1+(char *)tmp)
  88.425 -	:"memory");
  88.426 -return dest;
  88.427 -}
  88.428 -
  88.429 -
  88.430 -#define	__HAVE_ARCH_MEMCMP
  88.431 -static inline int memcmp(const void * cs,const void * ct,size_t count)
  88.432 -{
  88.433 -int	d0, d1, d2;
  88.434 -register int __res;
  88.435 -__asm__ __volatile__(
  88.436 -	"repe\n\t"
  88.437 -	"cmpsb\n\t"
  88.438 -	"je 1f\n\t"
  88.439 -	"sbbl %0,%0\n\t"
  88.440 -	"orb $1,%b0\n"
  88.441 -	"1:"
  88.442 -	:"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
  88.443 -	:"0" (0), "1" (cs), "2" (ct), "3" (count));
  88.444 -return __res;
  88.445 -}
  88.446 -
  88.447 -
  88.448 -#define __HAVE_ARCH_MEMCHR
  88.449 -static inline void * memchr(const void * cs,int c,size_t count)
  88.450 -{
  88.451 -int	d0;
  88.452 -register void * __res;
  88.453 -if (!count)
  88.454 -	return NULL;
  88.455 -__asm__ __volatile__(
  88.456 -	"repne\n\t"
  88.457 -	"scasb\n\t"
  88.458 -	"je 1f\n\t"
  88.459 -	"movl $1,%0\n"
  88.460 -	"1:\tdecl %0"
  88.461 -	:"=D" (__res), "=&c" (d0)
  88.462 -	:"a" (c), "0" (cs), "1" (count));
  88.463 -return __res;
  88.464 -}
  88.465 -
  88.466 -#define __memset_cc(s,c,count) \
  88.467 -((count%4==0) ? \
  88.468 - __memset_cc_by4((s),(c),(count)) : \
  88.469 - ((count%2==0) ? \
  88.470 -  __memset_cc_by2((s),(c),(count)) : \
  88.471 -  __memset_cg((s),(c),(count))))
  88.472 -
  88.473 -#define __memset_gc(s,c,count) \
  88.474 -((count%4==0) ? \
  88.475 - __memset_gc_by4((s),(c),(count)) : \
  88.476 - ((count%2==0) ? \
  88.477 -  __memset_gc_by2((s),(c),(count)) : \
  88.478 -  __memset_gg((s),(c),(count))))
  88.479 -
  88.480 -#define __HAVE_ARCH_MEMSET
  88.481 -#define memset(s,c,count) \
  88.482 -(__builtin_constant_p(c) ? \
  88.483 - (__builtin_constant_p(count) ? \
  88.484 -  __memset_cc((s),(c),(count)) : \
  88.485 -  __memset_cg((s),(c),(count))) : \
  88.486 - (__builtin_constant_p(count) ? \
  88.487 -  __memset_gc((s),(c),(count)) : \
  88.488 -  __memset_gg((s),(c),(count))))
  88.489 -
  88.490 -static inline void * __memset_cc_by4(void * s, char c, size_t count)
  88.491 -{
  88.492 -/*
  88.493 - * register char *tmp = s;
  88.494 - */
  88.495 -register char *tmp = (char *)s;
  88.496 -register int  dummy;
  88.497 -__asm__ __volatile__ (
  88.498 -	"\n1:\tmovl %2,(%0)\n\t"
  88.499 -	"addl $4,%0\n\t"
  88.500 -	"decl %1\n\t"
  88.501 -	"jnz 1b"
  88.502 -	:"=r" (tmp), "=r" (dummy)
  88.503 -	:"q" (0x01010101UL * (unsigned char) c), "0" (tmp), "1" (count/4)
  88.504 -	:"memory");
  88.505 -return s;
  88.506 -}
  88.507 -
  88.508 -static inline void * __memset_cc_by2(void * s, char c, size_t count)
  88.509 -{
  88.510 -register void *tmp = (void *)s;
  88.511 -register int  dummy;
  88.512 -__asm__ __volatile__ (
  88.513 -	"shrl $1,%1\n\t"          /* may be divisible also by 4 */
  88.514 -	"jz 2f\n"
  88.515 -	"\n1:\tmovl %2,(%0)\n\t"
  88.516 -	"addl $4,%0\n\t"
  88.517 -	"decl %1\n\t"
  88.518 -	"jnz 1b\n"
  88.519 -	"2:\tmovw %w2,(%0)"
  88.520 -	:"=r" (tmp), "=r" (dummy)
  88.521 -	:"q" (0x01010101UL * (unsigned char) c), "0" (tmp), "1" (count/2)
  88.522