From 2700fa96e938e3c10d23380c5ab6176471a98872 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Tue, 11 Mar 2003 12:11:03 +0000 Subject: bitkeeper revision 1.122.1.1 (3e6dd2571tuS-UOLoEX2Z4iIxMPlxA) pci.h, perfc.c: Fixed PCI DMA code -- a fake virtual address of NULL is actually valid. --- BitKeeper/etc/logging_ok | 1 + xen/common/perfc.c | 2 ++ xen/include/asm-i386/pci.h | 12 ++++++------ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index cc166e6358..4998459b72 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -6,6 +6,7 @@ bd240@boulderdash.cl.cam.ac.uk iap10@labyrinth.cl.cam.ac.uk kaf24@labyrinth.cl.cam.ac.uk kaf24@plym.cl.cam.ac.uk +kaf24@scramble.cl.cam.ac.uk kaf24@striker.cl.cam.ac.uk lynx@idefix.cl.cam.ac.uk rn@wyvis.camb.intel-research.net diff --git a/xen/common/perfc.c b/xen/common/perfc.c index 55554eba70..6b7e9f2af3 100644 --- a/xen/common/perfc.c +++ b/xen/common/perfc.c @@ -5,6 +5,8 @@ #include #include +#undef PERFCOUNTER +#undef PERFCOUNTER_ARRAY #define PERFCOUNTER( var, name ) "[0]"name"\0", #define PERFCOUNTER_ARRAY( var, name, size ) "["#size"]"name"\0", diff --git a/xen/include/asm-i386/pci.h b/xen/include/asm-i386/pci.h index 1ffade8914..a38bef4986 100644 --- a/xen/include/asm-i386/pci.h +++ b/xen/include/asm-i386/pci.h @@ -151,17 +151,17 @@ static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, for (i = 0; i < nents; i++ ) { if (sg[i].address && sg[i].page) out_of_line_bug(); - - /* not worth checking since NULL is ok says SMH */ #if 0 - else if (!sg[i].address && !sg[i].page) + /* Invalid check, since address==0 is valid. */ + else if (!sg[i].address && !sg[i].page) out_of_line_bug(); #endif - if (sg[i].address) - sg[i].dma_address = virt_to_bus(sg[i].address); - else + /* XXX Switched round, since address==0 is valid. */ + if (sg[i].page) sg[i].dma_address = page_to_bus(sg[i].page) + sg[i].offset; + else + sg[i].dma_address = virt_to_bus(sg[i].address); } flush_write_buffers(); -- cgit v1.2.3 From 92c383e584d199db53ecb8e170ab7f85947644c0 Mon Sep 17 00:00:00 2001 From: "iap10@labyrinth.cl.cam.ac.uk" Date: Tue, 11 Mar 2003 12:14:10 +0000 Subject: bitkeeper revision 1.122.1.2 (3e6dd312fGC_rwhJmT6CTXtWNO5Uag) dprintf change --- xen/drivers/block/xen_block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/block/xen_block.c b/xen/drivers/block/xen_block.c index bf9cfd7431..4f05e4f4e7 100644 --- a/xen/drivers/block/xen_block.c +++ b/xen/drivers/block/xen_block.c @@ -212,7 +212,7 @@ static void end_block_io_op(struct buffer_head *bh, int uptodate) unsigned long *buff = map_domain_mem(virt_to_phys(bh->b_data)); if ( (buff[ 0] == 0xdeadbeef) && (buff[127] == 0xdeadbeef) ) - printk("An unmodified buffer at sector %ld\n", bh->b_rsector); + printk("An unmodified buffer at sector %ld. b_data = %08x, phys = %08x\n", bh->b_rsector,bh->b_data,virt_to_phys(bh->b_data)); unmap_domain_mem(buff); } #endif -- cgit v1.2.3 From 7ce89e921ef65004ca01323f5efbc5b6f7e7bd41 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Tue, 11 Mar 2003 13:23:10 +0000 Subject: bitkeeper revision 1.122.1.3 (3e6de33eI-mrmcpiWraVdUDnJkVYHQ) xen_block.c: Turn of debugging in Xen blkdev layer. --- xen/drivers/block/xen_block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/block/xen_block.c b/xen/drivers/block/xen_block.c index 4f05e4f4e7..314a684952 100644 --- a/xen/drivers/block/xen_block.c +++ b/xen/drivers/block/xen_block.c @@ -19,7 +19,7 @@ #include #include /* TEST_READ_VALIDITY */ -#if 1 +#if 0 #define TEST_READ_VALIDITY #define DPRINTK(_f, _a...) printk( _f , ## _a ) #else -- cgit v1.2.3 From 7c2ffc6c5043e0a49fbe1b81f9da465ec68a9e64 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Tue, 11 Mar 2003 14:37:27 +0000 Subject: bitkeeper revision 1.122.1.4 (3e6df4a7f-8km7JCWMQgbr3amW1lUA) xen_block.c: . --- xen/drivers/block/xen_block.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/xen/drivers/block/xen_block.c b/xen/drivers/block/xen_block.c index 314a684952..a49817d46f 100644 --- a/xen/drivers/block/xen_block.c +++ b/xen/drivers/block/xen_block.c @@ -17,10 +17,8 @@ #include #include #include -#include /* TEST_READ_VALIDITY */ #if 0 -#define TEST_READ_VALIDITY #define DPRINTK(_f, _a...) printk( _f , ## _a ) #else #define DPRINTK(_f, _a...) ((void)0) @@ -206,16 +204,6 @@ static void end_block_io_op(struct buffer_head *bh, int uptodate) DPRINTK("Buffer not up-to-date at end of operation\n"); pending_req->status = 1; } -#ifdef TEST_READ_VALIDITY - else if ( pending_req->operation == READ ) - { - unsigned long *buff = map_domain_mem(virt_to_phys(bh->b_data)); - if ( (buff[ 0] == 0xdeadbeef) && - (buff[127] == 0xdeadbeef) ) - printk("An unmodified buffer at sector %ld. b_data = %08x, phys = %08x\n", bh->b_rsector,bh->b_data,virt_to_phys(bh->b_data)); - unmap_domain_mem(buff); - } -#endif unlock_buffer(pending_req->domain, virt_to_phys(bh->b_data), @@ -616,12 +604,6 @@ static void dispatch_rw_block_io(struct task_struct *p, int index) } else { -#ifdef TEST_READ_VALIDITY - unsigned long *buff = map_domain_mem(phys_seg[i].buffer); - buff[ 0] = 0xdeadbeef; - buff[127] = 0xdeadbeef; - unmap_domain_mem(buff); -#endif bh->b_state = (1 << BH_Mapped) | (1 << BH_Read); } -- cgit v1.2.3 From ee53d3b8685245febda44ac761877871ec4cd0f4 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Wed, 12 Mar 2003 00:15:31 +0000 Subject: 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 --- .bk-to-hg | 2 - .hg-to-bk | 4 - .rootkeys | 100 +-- .../arch/xeno/kernel/init_task.c | 33 - .../arch/xeno/kernel/ptrace.c | 454 ----------- .../arch/xeno/kernel/semaphore.c | 291 ------- .../arch/xeno/kernel/sys_i386.c | 256 ------ .../arch/xeno/lib/checksum.S | 496 ------------ .../arch/xeno/lib/dec_and_lock.c | 40 - .../arch/xeno/lib/getuser.S | 73 -- .../arch/xeno/lib/iodebug.c | 19 - .../arch/xeno/lib/memcpy.c | 19 - xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/mmx.c | 399 ---------- .../arch/xeno/lib/old-checksum.c | 19 - .../arch/xeno/lib/strstr.c | 31 - .../arch/xeno/lib/usercopy.c | 190 ----- .../arch/xeno/mm/extable.c | 62 -- .../arch/xeno/mm/pageattr.c | 175 ---- .../include/asm-xeno/a.out.h | 26 - .../include/asm-xeno/apic.h | 99 --- .../include/asm-xeno/apicdef.h | 378 --------- .../include/asm-xeno/atomic.h | 204 ----- .../include/asm-xeno/bitops.h | 384 --------- .../include/asm-xeno/boot.h | 15 - .../include/asm-xeno/byteorder.h | 47 -- .../include/asm-xeno/cache.h | 13 - .../include/asm-xeno/checksum.h | 195 ----- .../include/asm-xeno/cpufeature.h | 76 -- .../include/asm-xeno/current.h | 15 - .../include/asm-xeno/debugreg.h | 64 -- .../include/asm-xeno/delay.h | 20 - .../include/asm-xeno/div64.h | 17 - .../include/asm-xeno/dma.h | 298 ------- .../include/asm-xeno/elf.h | 104 --- .../include/asm-xeno/errno.h | 132 ---- .../include/asm-xeno/fcntl.h | 87 -- .../include/asm-xeno/floppy.h | 320 -------- .../include/asm-xeno/hardirq.h | 91 --- .../include/asm-xeno/hdreg.h | 13 - .../include/asm-xeno/i387.h | 89 --- .../include/asm-xeno/ide.h | 92 --- .../include/asm-xeno/init.h | 1 - .../include/asm-xeno/io_apic.h | 148 ---- .../include/asm-xeno/ioctl.h | 75 -- .../include/asm-xeno/ioctls.h | 82 -- .../include/asm-xeno/ipc.h | 31 - .../include/asm-xeno/ipcbuf.h | 29 - .../include/asm-xeno/keyboard.h | 72 -- .../include/asm-xeno/kmap_types.h | 14 - .../include/asm-xeno/ldt.h | 32 - .../include/asm-xeno/linux_logo.h | 27 - .../include/asm-xeno/locks.h | 135 ---- .../include/asm-xeno/math_emu.h | 35 - .../include/asm-xeno/mc146818rtc.h | 29 - .../include/asm-xeno/mca_dma.h | 202 ----- .../include/asm-xeno/mman.h | 38 - .../include/asm-xeno/mmx.h | 14 - .../include/asm-xeno/module.h | 12 - .../include/asm-xeno/mpspec.h | 223 ------ .../include/asm-xeno/msgbuf.h | 31 - .../include/asm-xeno/msr.h | 121 --- .../include/asm-xeno/mtrr.h | 127 --- .../include/asm-xeno/namei.h | 17 - .../include/asm-xeno/param.h | 24 - .../include/asm-xeno/parport.h | 18 - .../include/asm-xeno/poll.h | 25 - .../include/asm-xeno/posix_types.h | 80 -- .../include/asm-xeno/resource.h | 47 -- .../include/asm-xeno/rwlock.h | 83 -- .../include/asm-xeno/rwsem.h | 264 ------- .../include/asm-xeno/scatterlist.h | 34 - .../include/asm-xeno/semaphore.h | 222 ------ .../include/asm-xeno/sembuf.h | 25 - .../include/asm-xeno/serial.h | 148 ---- .../include/asm-xeno/setup.h | 10 - .../include/asm-xeno/shmbuf.h | 42 - .../include/asm-xeno/shmparam.h | 6 - .../include/asm-xeno/sigcontext.h | 83 -- .../include/asm-xeno/siginfo.h | 233 ------ .../include/asm-xeno/signal.h | 221 ------ .../include/asm-xeno/smplock.h | 81 -- .../include/asm-xeno/socket.h | 64 -- .../include/asm-xeno/sockios.h | 12 - .../include/asm-xeno/softirq.h | 48 -- .../include/asm-xeno/spinlock.h | 212 ----- .../include/asm-xeno/stat.h | 78 -- .../include/asm-xeno/statfs.h | 25 - .../include/asm-xeno/string-486.h | 617 --------------- .../include/asm-xeno/string.h | 531 ------------- .../include/asm-xeno/termbits.h | 172 ---- .../include/asm-xeno/termios.h | 108 --- .../include/asm-xeno/timex.h | 58 -- .../include/asm-xeno/tlb.h | 1 - .../include/asm-xeno/types.h | 57 -- .../include/asm-xeno/uaccess.h | 606 -------------- .../include/asm-xeno/ucontext.h | 12 - .../include/asm-xeno/unaligned.h | 37 - .../include/asm-xeno/unistd.h | 386 --------- .../include/asm-xeno/user.h | 122 --- .../include/asm-xeno/vga.h | 20 - .../include/asm-xeno/xor.h | 878 --------------------- xenolinux-2.4.21-pre4-sparse/mkbuildtree | 124 +++ 102 files changed, 125 insertions(+), 12626 deletions(-) delete mode 100644 xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/init_task.c delete mode 100644 xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ptrace.c delete mode 100644 xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/semaphore.c delete mode 100644 xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/sys_i386.c delete mode 100644 xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/checksum.S delete mode 100644 xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/dec_and_lock.c delete mode 100644 xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/getuser.S delete mode 100644 xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/iodebug.c delete mode 100644 xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/memcpy.c delete mode 100644 xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/mmx.c delete mode 100644 xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/old-checksum.c delete mode 100644 xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/strstr.c delete mode 100644 xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/usercopy.c delete mode 100644 xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/extable.c delete mode 100644 xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/pageattr.c delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/a.out.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apic.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apicdef.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/atomic.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/bitops.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/boot.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/byteorder.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cache.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/checksum.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cpufeature.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/current.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/debugreg.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/delay.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/dma.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/elf.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/errno.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/fcntl.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/floppy.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hardirq.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hdreg.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/i387.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ide.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/init.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/io_apic.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctl.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctls.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipc.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipcbuf.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/keyboard.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/kmap_types.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ldt.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/linux_logo.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/locks.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/math_emu.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mc146818rtc.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mca_dma.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mman.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmx.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/module.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mpspec.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msgbuf.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msr.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mtrr.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/namei.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/param.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/parport.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/poll.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/posix_types.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/resource.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwlock.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwsem.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/scatterlist.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/semaphore.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sembuf.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/serial.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/setup.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmbuf.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmparam.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sigcontext.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/siginfo.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/signal.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/smplock.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/socket.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sockios.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/softirq.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/spinlock.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/stat.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/statfs.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string-486.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termbits.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termios.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/timex.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/tlb.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/types.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/uaccess.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ucontext.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unaligned.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unistd.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/user.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/vga.h delete mode 100644 xenolinux-2.4.21-pre4-sparse/include/asm-xeno/xor.h create mode 100755 xenolinux-2.4.21-pre4-sparse/mkbuildtree diff --git a/.bk-to-hg b/.bk-to-hg index f6ef3fd2e5..a1e10bd62c 100755 --- a/.bk-to-hg +++ b/.bk-to-hg @@ -2,7 +2,5 @@ set -e test -L old/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs rm old/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs -test -L xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor-ifs -rm xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor-ifs (find -depth -type d -print | xargs -r rmdir 2>/dev/null) || true exit 0 diff --git a/.hg-to-bk b/.hg-to-bk index 7fb090ac41..817e56037e 100755 --- a/.hg-to-bk +++ b/.hg-to-bk @@ -5,9 +5,5 @@ mkdir -p old/xenolinux-2.4.16-sparse mkdir -p old/xenolinux-2.4.16-sparse/include mkdir -p old/xenolinux-2.4.16-sparse/include/asm-xeno ln -s ../../../xen-2.4.16/include/hypervisor-ifs old/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs -mkdir -p xenolinux-2.4.21-pre4-sparse -mkdir -p xenolinux-2.4.21-pre4-sparse/include -mkdir -p xenolinux-2.4.21-pre4-sparse/include/asm-xeno -ln -s ../../../xen/include/hypervisor-ifs xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor-ifs (find -depth -type d -print | xargs -r rmdir 2>/dev/null) || true exit 0 diff --git a/.rootkeys b/.rootkeys index eb07e88135..dc1f07ed27 100644 --- a/.rootkeys +++ b/.rootkeys @@ -496,150 +496,52 @@ 3e5a4e65ibVQmwlOn0j3sVH_j_6hAg xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/hypervisor.c 3e5a4e65RMGcuA-HCn3-wNx3fFQwdg xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/i386_ksyms.c 3e5a4e65JfSHwduNJO6j-upYnjoWLA xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/i387.c -3e5a4e65tzCYKTX26zdI8rk2m48BDA xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/init_task.c 3e5a4e65MEvZhlr070sK5JsfAQlv7Q xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ioport.c 3e5a4e653U6cELGv528IxOLHvCq8iA xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/irq.c 3e5a4e65muT6SU3ck47IP87Q7Ti5hA xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ldt.c 3e5a4e65IGt3WwQDNiL4h-gYWgNTWQ xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c -3e5a4e65vXUggUHe9b_D9q0CNcZmQg xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ptrace.c -3e5a4e66StFP0OPSNngVwPJ4cJDy4g xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/semaphore.c 3e5a4e66tR-qJMLj3MppcKqmvuI2XQ xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/setup.c 3e5a4e66fWSTagLGU2P8BGFGRjhDiw xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/signal.c -3e5a4e66Id8AWFANwLRFP4mKJgIFQw xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/sys_i386.c 3e5a4e66N__lUXNwzQ-eADRzK9LXuQ xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/time.c 3e5a4e66aHCbQ_F5QZ8VeyikLmuRZQ xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/traps.c 3e5a4e66-9_NczrVMbuQkoSLyXckIw xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/Makefile -3e5a4e66pZtp3RawntDpdofnJEvHIg xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/checksum.S -3e5a4e660Zju423CmC6q_-ZdObYhuA xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/dec_and_lock.c 3e5a4e6637ZDk0BvFEC-aFQs599-ng xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/delay.c -3e5a4e66Cf-sjHkzP95oIJ6hBC1pOA xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/getuser.S -3e5a4e66s_LxC8VI5vqmr-TPOdJYsw xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/iodebug.c -3e5a4e667pxnNndXVcVxVNBvZezxhw xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/memcpy.c -3e5a4e66MHYcXyO9DndD8k0DDBovYw xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/mmx.c -3e5a4e669xZJQRPtO8oiRIqMwChrLg xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/old-checksum.c -3e5a4e66RzO4JzKOAraCe2dnQ5m-yw xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/strstr.c -3e5a4e66us6VmRaduHUnWiKcAONyLA xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/usercopy.c 3e5a4e66croVgpcJyJuF2ycQw0HuJw xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/Makefile -3e5a4e661LP_6AdxThMuysfcYtOexA xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/extable.c 3e5a4e66l8Q5Tv-6B3lQIRmaVbFPzg xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/fault.c 3e5a4e66TyNNUEXkr5RxqvQhXK1MQA xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/get_unmapped_area.c 3e5a4e668SE9rixq4ahho9rNhLUUFQ xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/hypervisor.c 3e5a4e661gLzzff25pJooKIIWe7IWg xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/init.c 3e5a4e66U45cAIoHmxg0y1e1XhzVCA xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/mmu_context.c -3e5a4e66_jLCqAOBvqAy5N4mP7hmBA xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/pageattr.c 3e5a4e66qRlSTcjafidMB6ulECADvg xenolinux-2.4.21-pre4-sparse/arch/xeno/vmlinux.lds 3e5a4e668yELUdtr3HiJZBIqxqUyuA xenolinux-2.4.21-pre4-sparse/drivers/block/Config.in 3e5a4e66mrtlmV75L1tjKDg8RaM5gA xenolinux-2.4.21-pre4-sparse/drivers/block/ll_rw_blk.c 3e5a4e66rw65CxyolW9PKz4GG42RcA xenolinux-2.4.21-pre4-sparse/drivers/char/tty_io.c 3e5a4e669uzIE54VwucPYtGwXLAbzA xenolinux-2.4.21-pre4-sparse/fs/exec.c -3e5a4e66HUJwJfJBBOilIN7LeL0twg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/a.out.h -3e5a4e66nv3Esm5N8FS5r0qs-l7A0w xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apic.h -3e5a4e66BHReK8U7xl4qqZMXvFXihQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apicdef.h -3e5a4e668V7Eo08_6qmVoevzFrlxGQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/atomic.h -3e5a4e66FNm4qKYGsIMdX6DGJ1pI1g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/bitops.h -3e5a4e66zkP-aEQkEtznyyp-e7tUGA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/boot.h 3e5a4e66wbeCpsJgVf_U8Jde-CNcsA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/bugs.h -3e5a4e66wTE9HEEjsnOHrijDB8iXrQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/byteorder.h -3e5a4e66VqboK-qHV-HxmSflMh4VqQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cache.h -3e5a4e66bTVzeqJUJQiu67FWoHM5iw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/checksum.h -3e5a4e66JVArkZ-0_pav3AsvKbftdw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cpufeature.h -3e5a4e66cCx28DaXo1U_nKvVX-5Y5w xenolinux-2.4.21-pre4-sparse/include/asm-xeno/current.h -3e5a4e66o7NZjoJZjzJa-Z7XcGmGqg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/debugreg.h -3e5a4e66rpzD2c7pNKF0XLbHzxb24A xenolinux-2.4.21-pre4-sparse/include/asm-xeno/delay.h 3e5a4e66HdSkvIV6SJ1evG_xmTmXHA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/desc.h -3e5a4e66GP6AL7wpHyxcsHOH4cJ4BQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h -3e5a4e66wJ9hmUtY2rLWliznHdjWaw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/dma.h -3e5a4e667P_1mO6v1YFRZ-ocfpiyVQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/elf.h -3e5a4e66qeYk1odm2esnGypmiMcxqw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/errno.h -3e5a4e663pDK4oQnfbuT38CR04cXDQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/fcntl.h 3e5a4e66SYp_UpAVcF8Lc1wa3Qtgzw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/fixmap.h -3e5a4e67fsayUJFE3A24CKZoUDI88A xenolinux-2.4.21-pre4-sparse/include/asm-xeno/floppy.h -3e5a4e67uPmwPbjvF7YGsG2hX-3oBQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hardirq.h -3e5a4e67P_6RRoCzUiQt_gyx6lmyWw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hdreg.h 3e5a4e67w_DWgjIJ17Tlossu1LGujQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/highmem.h 3e5a4e67YtcyDLQsShhCfQwPSELfvA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hw_irq.h -3e00b957NB9Iz667rjRZg5YAJqoKCg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor-ifs 3e5a4e677VBavzM1UZIEcH1B-RlXMA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor.h -3e5a4e679TYbXAUiURvTeX4cFb1RlQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/i387.h -3e5a4e672eNAzAKUZsefsPdmsH19hA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ide.h -3e5a4e67XHl6b9C1Oqv79FiE1T3ybg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/init.h 3e5a4e67Ulv-Ll8Zp4j2GwMwQ8aAXQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/io.h -3e5a4e67cWGE9V1O6DSwvj5KtkY04g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/io_apic.h -3e5a4e67-vXNELtSK-qDSYyK55febg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctl.h -3e5a4e67iqnkteX3g1IFQ-0Hf-vyuA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctls.h -3e5a4e674l2NZF3klG30JX_auXUBgA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipc.h -3e5a4e678dxUg9lvKOXvH1s5a9GNsA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipcbuf.h 3e5a4e673p7PEOyHFm3nHkYX6HQYBg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/irq.h -3e5a4e67nfnw10Wsugp5ZeMYFO_Eeg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/keyboard.h -3e5a4e67FbgZ92JO9Vp2CKlW6z7wjA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/kmap_types.h -3e5a4e674VIvXJxlOtz7LjtNAJttAA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ldt.h -3e5a4e67X2GwDXstxQeuIyr65hdOig xenolinux-2.4.21-pre4-sparse/include/asm-xeno/linux_logo.h -3e5a4e67mLXkDcU-aaeMByYb1-3v7Q xenolinux-2.4.21-pre4-sparse/include/asm-xeno/locks.h -3e5a4e67g8B4DjzsIajoy1_mlxlvLg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/math_emu.h -3e5a4e67J6JsiPWb0AwWZzQcOLbKKw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mc146818rtc.h -3e5a4e67otTxTEz6CA4vVHE-CFLGkQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mca_dma.h -3e5a4e67hSfhasW1McVONBMITBY28g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mman.h 3e5a4e67zoNch27qYhEBpr2k6SABOg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmu.h 3e5a4e678ddsQOpbSiRdy1GRcDc9WA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmu_context.h -3e5a4e67YQ_cLDcJjIsd8XTCk3w4rg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmx.h -3e5a4e67Zv1yObwNLd_9AYbyGTTvSw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/module.h -3e5a4e67C-czbgW6YxgEbJG1e9aPGg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mpspec.h -3e5a4e67swa8teSCnQDQvpV90xYiZQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msgbuf.h -3e5a4e67U1TsB9azleujfFZm3E5i3w xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msr.h -3e5a4e67f6dvHFEisaZ4wCR2t3a0yw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mtrr.h -3e5a4e67Kd-KWcgJON9dfcJEQD9hdg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/namei.h 3e5a4e67mnQfh-R8KcQCaVo2Oho6yg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/page.h -3e5a4e67IYaS0RnLo3SntreGd59gMA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/param.h -3e5a4e67nvdHRk38knQeDl-0Z2j6_Q xenolinux-2.4.21-pre4-sparse/include/asm-xeno/parport.h 3e5a4e67uTYU5oEnIDjxuaez8njjqg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgalloc.h 3e5a4e67X7JyupgdYkgDX19Huj2sAw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgtable-2level.h 3e5a4e67w3ckNdrTEgqiSiYYAYMwOQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgtable-3level.h 3e5a4e67gr4NLGtQ5CvSLimMYZlkOA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgtable.h -3e5a4e671OnIMxuFE59yynI-qvwKCA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/poll.h -3e5a4e67o7FLcNPHjwyw5vb01EQTCg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/posix_types.h 3e5a4e676uK4xErTBDH6XJREn9LSyg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/processor.h 3e5a4e67AJPjW-zL7p-xWuA6IVeH1g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ptrace.h -3e5a4e67tIfXJYRQFxfRbcpZ25vqfw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/resource.h -3e5a4e68E-U7HbKdTBaYoo3ZISdxuQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwlock.h -3e5a4e68unR4ktSClycraOPanwxvTg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwsem.h -3e5a4e68DATgqBYbF9W2Pkw5fGZBRg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/scatterlist.h 3e5a4e68uJz-xI0IBVMD7xRLQKJDFg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/segment.h -3e5a4e68Ug8hqChUpD2m_IDQSiu8jw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/semaphore.h -3e5a4e68uFNNH3YQvZS1EnL0v_E6ew xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sembuf.h -3e5a4e689R_c0pr8Ycb-w6zveleWEw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/serial.h -3e5a4e682D6yseOVKoJIx6HafkEKJw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/setup.h -3e5a4e680_gLjMSi1Ql0nUnqCoQSyQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmbuf.h -3e5a4e68PFVCbzUszQ4anRN8iZ1DUg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmparam.h -3e5a4e689rAyWPwrwdvtJEkrtVw1rA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sigcontext.h -3e5a4e68D7dXWzciOKbyG1G3l3yt0w xenolinux-2.4.21-pre4-sparse/include/asm-xeno/siginfo.h -3e5a4e68soo0VsYXn1HYv2XeUnlxgw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/signal.h 3e5a4e68Nfdh6QcOKUTGCaYkf2LmYA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/smp.h -3e5a4e688pv8zI1Z3wciLUik3c2iEw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/smplock.h -3e5a4e68jaQZMOApQVZiq7T_gGPZhw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/socket.h -3e5a4e68wlnX8Huhsl0gd7VgmiA8uA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sockios.h -3e5a4e68tuqUkZ3kyZGk6BZ1hrkXyw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/softirq.h -3e5a4e68viR5sAz1SvKnPNrpKmlAZA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/spinlock.h -3e5a4e68nUxBYfOOLm0_cZN7XM-3LQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/stat.h -3e5a4e68my8BhpsHYBD63VUrxLXRCg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/statfs.h -3e5a4e68W6piFzx4c4kiqwNB-h8PbQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string-486.h -3e5a4e68gFzDdQZEy91vkcdKWubf2g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string.h 3e5a4e68mTr0zcp9SXDbnd-XLrrfxw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/system.h -3e5a4e686Tful7frKeVbjeeWZ4S0nA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termbits.h -3e5a4e68fZcskF52zTGHdiF_yoVBiw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termios.h -3e5a4e68t8oGxTdC3i40nPjFwW00_g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/timex.h -3e5a4e685uCbimBjS_2iGxUqptPYiQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/tlb.h -3e5a4e68Elybq23T6RnEt6vopg3mxg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/types.h -3e5a4e68NeADbbaqoo4emjpU5xcaqA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/uaccess.h -3e5a4e68HMMGyb6iBvG-qVbd9hODaQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ucontext.h -3e5a4e68m2MrAb54gFw8n-ZGNEu-Fw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unaligned.h -3e5a4e68vggReonfTJ1gdzYjFaOSKw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unistd.h -3e5a4e68QPC4T0aOA61QgK2SGDPVVA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/user.h -3e5a4e68g2boOp0d45bjtwugxQ8zNw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/vga.h -3e5a4e68AB-TTHj1oXtqVJvUo9jzIg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/xor.h 3e5a4e68WLX3B8owTvktP3HHOtznPQ xenolinux-2.4.21-pre4-sparse/include/linux/major.h 3e5a4e686V0nioX2ZpFf056sgvdiQw xenolinux-2.4.21-pre4-sparse/include/linux/sunrpc/debug.h 3e5a4e68W_hpMlM3u_-QOKMp3gzcwQ xenolinux-2.4.21-pre4-sparse/init/do_mounts.c 3e5a4e68TJJavrunYwTAnLRSBxSYqQ xenolinux-2.4.21-pre4-sparse/kernel/panic.c +3e6e7c1efbQe93xCvOpOVCnXTMmQ5w xenolinux-2.4.21-pre4-sparse/mkbuildtree 3e5a4e68GxCIaFH4sy01v1wjapetaA xenolinux-2.4.21-pre4-sparse/mm/memory.c 3e5a4e681xMPdF9xCMwpyfuYMySU5g xenolinux-2.4.21-pre4-sparse/mm/mremap.c 3e5a4e683HKVU-sxtagrDasRB8eBVw xenolinux-2.4.21-pre4-sparse/mm/swapfile.c diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/init_task.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/init_task.c deleted file mode 100644 index 7779809ef2..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/init_task.c +++ /dev/null @@ -1,33 +0,0 @@ -#include -#include -#include - -#include -#include -#include - -static struct fs_struct init_fs = INIT_FS; -static struct files_struct init_files = INIT_FILES; -static struct signal_struct init_signals = INIT_SIGNALS; -struct mm_struct init_mm = INIT_MM(init_mm); - -/* - * Initial task structure. - * - * We need to make sure that this is 8192-byte aligned due to the - * way process stacks are handled. This is done by having a special - * "init_task" linker map entry.. - */ -union task_union init_task_union - __attribute__((__section__(".data.init_task"))) = - { INIT_TASK(init_task_union.task) }; - -/* - * per-CPU TSS segments. Threads are completely 'soft' on Linux, - * no more per-task TSS's. The TSS size is kept cacheline-aligned - * so they are allowed to end up in the .data.cacheline_aligned - * section. Since TSS's are completely CPU-local, we want them - * on exact cacheline boundaries, to eliminate cacheline ping-pong. - */ -struct tss_struct init_tss[NR_CPUS] __cacheline_aligned = { [0 ... NR_CPUS-1] = INIT_TSS }; - diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ptrace.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ptrace.c deleted file mode 100644 index b0ba97d198..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ptrace.c +++ /dev/null @@ -1,454 +0,0 @@ -/* ptrace.c */ -/* By Ross Biro 1/23/92 */ -/* - * Pentium III FXSR, SSE support - * Gareth Hughes , May 2000 - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -/* - * does not yet catch signals sent when the child dies. - * in exit.c or in signal.c. - */ - -/* determines which flags the user has access to. */ -/* 1 = access 0 = no access */ -#define FLAG_MASK 0x00044dd5 - -/* set's the trap flag. */ -#define TRAP_FLAG 0x100 - -/* - * Offset of eflags on child stack.. - */ -#define EFL_OFFSET ((EFL-2)*4-sizeof(struct pt_regs)) - -/* - * this routine will get a word off of the processes privileged stack. - * the offset is how far from the base addr as stored in the TSS. - * this routine assumes that all the privileged stacks are in our - * data space. - */ -static inline int get_stack_long(struct task_struct *task, int offset) -{ - unsigned char *stack; - - stack = (unsigned char *)task->thread.esp0; - stack += offset; - return (*((int *)stack)); -} - -/* - * this routine will put a word on the processes privileged stack. - * the offset is how far from the base addr as stored in the TSS. - * this routine assumes that all the privileged stacks are in our - * data space. - */ -static inline int put_stack_long(struct task_struct *task, int offset, - unsigned long data) -{ - unsigned char * stack; - - stack = (unsigned char *) task->thread.esp0; - stack += offset; - *(unsigned long *) stack = data; - return 0; -} - -static int putreg(struct task_struct *child, - unsigned long regno, unsigned long value) -{ - switch (regno >> 2) { - case FS: - if (value && (value & 3) != 3) - return -EIO; - child->thread.fs = value; - return 0; - case GS: - if (value && (value & 3) != 3) - return -EIO; - child->thread.gs = value; - return 0; - case DS: - case ES: - if (value && (value & 3) != 3) - return -EIO; - value &= 0xffff; - break; - case SS: - case CS: - if ((value & 3) != 3) - return -EIO; - value &= 0xffff; - break; - case EFL: - value &= FLAG_MASK; - value |= get_stack_long(child, EFL_OFFSET) & ~FLAG_MASK; - break; - } - if (regno > GS*4) - regno -= 2*4; - put_stack_long(child, regno - sizeof(struct pt_regs), value); - return 0; -} - -static unsigned long getreg(struct task_struct *child, - unsigned long regno) -{ - unsigned long retval = ~0UL; - - switch (regno >> 2) { - case FS: - retval = child->thread.fs; - break; - case GS: - retval = child->thread.gs; - break; - case DS: - case ES: - case SS: - case CS: - retval = 0xffff; - /* fall through */ - default: - if (regno > GS*4) - regno -= 2*4; - regno = regno - sizeof(struct pt_regs); - retval &= get_stack_long(child, regno); - } - return retval; -} - -/* - * Called by kernel/ptrace.c when detaching.. - * - * Make sure the single step bit is not set. - */ -void ptrace_disable(struct task_struct *child) -{ - long tmp; - - tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG; - put_stack_long(child, EFL_OFFSET, tmp); -} - -asmlinkage int sys_ptrace(long request, long pid, long addr, long data) -{ - struct task_struct *child; - struct user * dummy = NULL; - int i, ret; - - lock_kernel(); - ret = -EPERM; - if (request == PTRACE_TRACEME) { - /* are we already being traced? */ - if (current->ptrace & PT_PTRACED) - goto out; - /* set the ptrace bit in the process flags. */ - current->ptrace |= PT_PTRACED; - ret = 0; - goto out; - } - ret = -ESRCH; - read_lock(&tasklist_lock); - child = find_task_by_pid(pid); - if (child) - get_task_struct(child); - read_unlock(&tasklist_lock); - if (!child) - goto out; - - ret = -EPERM; - if (pid == 1) /* you may not mess with init */ - goto out_tsk; - - if (request == PTRACE_ATTACH) { - ret = ptrace_attach(child); - goto out_tsk; - } - - ret = ptrace_check_attach(child, request == PTRACE_KILL); - if (ret < 0) - goto out_tsk; - - switch (request) { - /* when I and D space are separate, these will need to be fixed. */ - case PTRACE_PEEKTEXT: /* read word at location addr. */ - case PTRACE_PEEKDATA: { - unsigned long tmp; - int copied; - - copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); - ret = -EIO; - if (copied != sizeof(tmp)) - break; - ret = put_user(tmp,(unsigned long *) data); - break; - } - - /* read the word at location addr in the USER area. */ - case PTRACE_PEEKUSR: { - unsigned long tmp; - - ret = -EIO; - if ((addr & 3) || addr < 0 || - addr > sizeof(struct user) - 3) - break; - - tmp = 0; /* Default return condition */ - if(addr < FRAME_SIZE*sizeof(long)) - tmp = getreg(child, addr); - if(addr >= (long) &dummy->u_debugreg[0] && - addr <= (long) &dummy->u_debugreg[7]){ - addr -= (long) &dummy->u_debugreg[0]; - addr = addr >> 2; - tmp = child->thread.debugreg[addr]; - } - ret = put_user(tmp,(unsigned long *) data); - break; - } - - /* when I and D space are separate, this will have to be fixed. */ - case PTRACE_POKETEXT: /* write the word at location addr. */ - case PTRACE_POKEDATA: - ret = 0; - if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data)) - break; - ret = -EIO; - break; - - case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ - ret = -EIO; - if ((addr & 3) || addr < 0 || - addr > sizeof(struct user) - 3) - break; - - if (addr < FRAME_SIZE*sizeof(long)) { - ret = putreg(child, addr, data); - break; - } - /* We need to be very careful here. We implicitly - want to modify a portion of the task_struct, and we - have to be selective about what portions we allow someone - to modify. */ - - ret = -EIO; - if(addr >= (long) &dummy->u_debugreg[0] && - addr <= (long) &dummy->u_debugreg[7]){ - - if(addr == (long) &dummy->u_debugreg[4]) break; - if(addr == (long) &dummy->u_debugreg[5]) break; - if(addr < (long) &dummy->u_debugreg[4] && - ((unsigned long) data) >= TASK_SIZE-3) break; - - if(addr == (long) &dummy->u_debugreg[7]) { - data &= ~DR_CONTROL_RESERVED; - for(i=0; i<4; i++) - if ((0x5f54 >> ((data >> (16 + 4*i)) & 0xf)) & 1) - goto out_tsk; - } - - addr -= (long) &dummy->u_debugreg; - addr = addr >> 2; - child->thread.debugreg[addr] = data; - ret = 0; - } - break; - - case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ - case PTRACE_CONT: { /* restart after signal. */ - long tmp; - - ret = -EIO; - if ((unsigned long) data > _NSIG) - break; - if (request == PTRACE_SYSCALL) - child->ptrace |= PT_TRACESYS; - else - child->ptrace &= ~PT_TRACESYS; - child->exit_code = data; - /* make sure the single step bit is not set. */ - tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG; - put_stack_long(child, EFL_OFFSET,tmp); - wake_up_process(child); - ret = 0; - break; - } - -/* - * make the child exit. Best I can do is send it a sigkill. - * perhaps it should be put in the status that it wants to - * exit. - */ - case PTRACE_KILL: { - long tmp; - - ret = 0; - if (child->state == TASK_ZOMBIE) /* already dead */ - break; - child->exit_code = SIGKILL; - /* make sure the single step bit is not set. */ - tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG; - put_stack_long(child, EFL_OFFSET, tmp); - wake_up_process(child); - break; - } - - case PTRACE_SINGLESTEP: { /* set the trap flag. */ - long tmp; - - ret = -EIO; - if ((unsigned long) data > _NSIG) - break; - child->ptrace &= ~PT_TRACESYS; - if ((child->ptrace & PT_DTRACE) == 0) { - /* Spurious delayed TF traps may occur */ - child->ptrace |= PT_DTRACE; - } - tmp = get_stack_long(child, EFL_OFFSET) | TRAP_FLAG; - put_stack_long(child, EFL_OFFSET, tmp); - child->exit_code = data; - /* give it a chance to run. */ - wake_up_process(child); - ret = 0; - break; - } - - case PTRACE_DETACH: - /* detach a process that was attached. */ - ret = ptrace_detach(child, data); - break; - - case PTRACE_GETREGS: { /* Get all gp regs from the child. */ - if (!access_ok(VERIFY_WRITE, (unsigned *)data, FRAME_SIZE*sizeof(long))) { - ret = -EIO; - break; - } - for ( i = 0; i < FRAME_SIZE*sizeof(long); i += sizeof(long) ) { - __put_user(getreg(child, i),(unsigned long *) data); - data += sizeof(long); - } - ret = 0; - break; - } - - case PTRACE_SETREGS: { /* Set all gp regs in the child. */ - unsigned long tmp; - if (!access_ok(VERIFY_READ, (unsigned *)data, FRAME_SIZE*sizeof(long))) { - ret = -EIO; - break; - } - for ( i = 0; i < FRAME_SIZE*sizeof(long); i += sizeof(long) ) { - __get_user(tmp, (unsigned long *) data); - putreg(child, i, tmp); - data += sizeof(long); - } - ret = 0; - break; - } - - case PTRACE_GETFPREGS: { /* Get the child FPU state. */ - if (!access_ok(VERIFY_WRITE, (unsigned *)data, - sizeof(struct user_i387_struct))) { - ret = -EIO; - break; - } - ret = 0; - if ( !child->used_math ) - load_empty_fpu(child); - get_fpregs((struct user_i387_struct *)data, child); - break; - } - - case PTRACE_SETFPREGS: { /* Set the child FPU state. */ - if (!access_ok(VERIFY_READ, (unsigned *)data, - sizeof(struct user_i387_struct))) { - ret = -EIO; - break; - } - child->used_math = 1; - set_fpregs(child, (struct user_i387_struct *)data); - ret = 0; - break; - } - - case PTRACE_GETFPXREGS: { /* Get the child extended FPU state. */ - if (!access_ok(VERIFY_WRITE, (unsigned *)data, - sizeof(struct user_fxsr_struct))) { - ret = -EIO; - break; - } - if ( !child->used_math ) - load_empty_fpu(child); - ret = get_fpxregs((struct user_fxsr_struct *)data, child); - break; - } - - case PTRACE_SETFPXREGS: { /* Set the child extended FPU state. */ - if (!access_ok(VERIFY_READ, (unsigned *)data, - sizeof(struct user_fxsr_struct))) { - ret = -EIO; - break; - } - child->used_math = 1; - ret = set_fpxregs(child, (struct user_fxsr_struct *)data); - break; - } - - case PTRACE_SETOPTIONS: { - if (data & PTRACE_O_TRACESYSGOOD) - child->ptrace |= PT_TRACESYSGOOD; - else - child->ptrace &= ~PT_TRACESYSGOOD; - ret = 0; - break; - } - - default: - ret = -EIO; - break; - } -out_tsk: - free_task_struct(child); -out: - unlock_kernel(); - return ret; -} - -asmlinkage void syscall_trace(void) -{ - if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) != - (PT_PTRACED|PT_TRACESYS)) - return; - /* the 0x80 provides a way for the tracing parent to distinguish - between a syscall stop and SIGTRAP delivery */ - current->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) - ? 0x80 : 0); - current->state = TASK_STOPPED; - notify_parent(current, SIGCHLD); - schedule(); - /* - * this isn't the same as continuing with a signal, but it will do - * for normal use. strace only continues with a signal if the - * stopping signal is not SIGTRAP. -brl - */ - if (current->exit_code) { - send_sig(current->exit_code, current, 1); - current->exit_code = 0; - } -} diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/semaphore.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/semaphore.c deleted file mode 100644 index fd44981804..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/semaphore.c +++ /dev/null @@ -1,291 +0,0 @@ -/* - * i386 semaphore implementation. - * - * (C) Copyright 1999 Linus Torvalds - * - * Portions Copyright 1999 Red Hat, Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * rw semaphores implemented November 1999 by Benjamin LaHaise - */ -#include -#include -#include - -/* - * Semaphores are implemented using a two-way counter: - * The "count" variable is decremented for each process - * that tries to acquire the semaphore, while the "sleeping" - * variable is a count of such acquires. - * - * Notably, the inline "up()" and "down()" functions can - * efficiently test if they need to do any extra work (up - * needs to do something only if count was negative before - * the increment operation. - * - * "sleeping" and the contention routine ordering is - * protected by the semaphore spinlock. - * - * Note that these functions are only called when there is - * contention on the lock, and as such all this is the - * "non-critical" part of the whole semaphore business. The - * critical part is the inline stuff in - * where we want to avoid any extra jumps and calls. - */ - -/* - * Logic: - * - only on a boundary condition do we need to care. When we go - * from a negative count to a non-negative, we wake people up. - * - when we go from a non-negative count to a negative do we - * (a) synchronize with the "sleeper" count and (b) make sure - * that we're on the wakeup list before we synchronize so that - * we cannot lose wakeup events. - */ - -void __up(struct semaphore *sem) -{ - wake_up(&sem->wait); -} - -static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED; - -void __down(struct semaphore * sem) -{ - struct task_struct *tsk = current; - DECLARE_WAITQUEUE(wait, tsk); - tsk->state = TASK_UNINTERRUPTIBLE; - add_wait_queue_exclusive(&sem->wait, &wait); - - spin_lock_irq(&semaphore_lock); - sem->sleepers++; - for (;;) { - int sleepers = sem->sleepers; - - /* - * Add "everybody else" into it. They aren't - * playing, because we own the spinlock. - */ - if (!atomic_add_negative(sleepers - 1, &sem->count)) { - sem->sleepers = 0; - break; - } - sem->sleepers = 1; /* us - see -1 above */ - spin_unlock_irq(&semaphore_lock); - - schedule(); - tsk->state = TASK_UNINTERRUPTIBLE; - spin_lock_irq(&semaphore_lock); - } - spin_unlock_irq(&semaphore_lock); - remove_wait_queue(&sem->wait, &wait); - tsk->state = TASK_RUNNING; - wake_up(&sem->wait); -} - -int __down_interruptible(struct semaphore * sem) -{ - int retval = 0; - struct task_struct *tsk = current; - DECLARE_WAITQUEUE(wait, tsk); - tsk->state = TASK_INTERRUPTIBLE; - add_wait_queue_exclusive(&sem->wait, &wait); - - spin_lock_irq(&semaphore_lock); - sem->sleepers ++; - for (;;) { - int sleepers = sem->sleepers; - - /* - * With signals pending, this turns into - * the trylock failure case - we won't be - * sleeping, and we* can't get the lock as - * it has contention. Just correct the count - * and exit. - */ - if (signal_pending(current)) { - retval = -EINTR; - sem->sleepers = 0; - atomic_add(sleepers, &sem->count); - break; - } - - /* - * Add "everybody else" into it. They aren't - * playing, because we own the spinlock. The - * "-1" is because we're still hoping to get - * the lock. - */ - if (!atomic_add_negative(sleepers - 1, &sem->count)) { - sem->sleepers = 0; - break; - } - sem->sleepers = 1; /* us - see -1 above */ - spin_unlock_irq(&semaphore_lock); - - schedule(); - tsk->state = TASK_INTERRUPTIBLE; - spin_lock_irq(&semaphore_lock); - } - spin_unlock_irq(&semaphore_lock); - tsk->state = TASK_RUNNING; - remove_wait_queue(&sem->wait, &wait); - wake_up(&sem->wait); - return retval; -} - -/* - * Trylock failed - make sure we correct for - * having decremented the count. - * - * We could have done the trylock with a - * single "cmpxchg" without failure cases, - * but then it wouldn't work on a 386. - */ -int __down_trylock(struct semaphore * sem) -{ - int sleepers; - unsigned long flags; - - spin_lock_irqsave(&semaphore_lock, flags); - sleepers = sem->sleepers + 1; - sem->sleepers = 0; - - /* - * Add "everybody else" and us into it. They aren't - * playing, because we own the spinlock. - */ - if (!atomic_add_negative(sleepers, &sem->count)) - wake_up(&sem->wait); - - spin_unlock_irqrestore(&semaphore_lock, flags); - return 1; -} - - -/* - * The semaphore operations have a special calling sequence that - * allow us to do a simpler in-line version of them. These routines - * need to convert that sequence back into the C sequence when - * there is contention on the semaphore. - * - * %ecx contains the semaphore pointer on entry. Save the C-clobbered - * registers (%eax, %edx and %ecx) except %eax when used as a return - * value.. - */ -asm( -".text\n" -".align 4\n" -".globl __down_failed\n" -"__down_failed:\n\t" -#if defined(CONFIG_FRAME_POINTER) - "pushl %ebp\n\t" - "movl %esp,%ebp\n\t" -#endif - "pushl %eax\n\t" - "pushl %edx\n\t" - "pushl %ecx\n\t" - "call __down\n\t" - "popl %ecx\n\t" - "popl %edx\n\t" - "popl %eax\n\t" -#if defined(CONFIG_FRAME_POINTER) - "movl %ebp,%esp\n\t" - "popl %ebp\n\t" -#endif - "ret" -); - -asm( -".text\n" -".align 4\n" -".globl __down_failed_interruptible\n" -"__down_failed_interruptible:\n\t" -#if defined(CONFIG_FRAME_POINTER) - "pushl %ebp\n\t" - "movl %esp,%ebp\n\t" -#endif - "pushl %edx\n\t" - "pushl %ecx\n\t" - "call __down_interruptible\n\t" - "popl %ecx\n\t" - "popl %edx\n\t" -#if defined(CONFIG_FRAME_POINTER) - "movl %ebp,%esp\n\t" - "popl %ebp\n\t" -#endif - "ret" -); - -asm( -".text\n" -".align 4\n" -".globl __down_failed_trylock\n" -"__down_failed_trylock:\n\t" -#if defined(CONFIG_FRAME_POINTER) - "pushl %ebp\n\t" - "movl %esp,%ebp\n\t" -#endif - "pushl %edx\n\t" - "pushl %ecx\n\t" - "call __down_trylock\n\t" - "popl %ecx\n\t" - "popl %edx\n\t" -#if defined(CONFIG_FRAME_POINTER) - "movl %ebp,%esp\n\t" - "popl %ebp\n\t" -#endif - "ret" -); - -asm( -".text\n" -".align 4\n" -".globl __up_wakeup\n" -"__up_wakeup:\n\t" - "pushl %eax\n\t" - "pushl %edx\n\t" - "pushl %ecx\n\t" - "call __up\n\t" - "popl %ecx\n\t" - "popl %edx\n\t" - "popl %eax\n\t" - "ret" -); - -/* - * rw spinlock fallbacks - */ -#if defined(CONFIG_SMP) -asm( -".text\n" -".align 4\n" -".globl __write_lock_failed\n" -"__write_lock_failed:\n\t" - LOCK "addl $" RW_LOCK_BIAS_STR ",(%eax)\n" -"1: rep; nop\n\t" - "cmpl $" RW_LOCK_BIAS_STR ",(%eax)\n\t" - "jne 1b\n\t" - LOCK "subl $" RW_LOCK_BIAS_STR ",(%eax)\n\t" - "jnz __write_lock_failed\n\t" - "ret" -); - -asm( -".text\n" -".align 4\n" -".globl __read_lock_failed\n" -"__read_lock_failed:\n\t" - LOCK "incl (%eax)\n" -"1: rep; nop\n\t" - "cmpl $1,(%eax)\n\t" - "js 1b\n\t" - LOCK "decl (%eax)\n\t" - "js __read_lock_failed\n\t" - "ret" -); -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/sys_i386.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/sys_i386.c deleted file mode 100644 index 5fd6910b9c..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/sys_i386.c +++ /dev/null @@ -1,256 +0,0 @@ -/* - * linux/arch/i386/kernel/sys_i386.c - * - * This file contains various random system calls that - * have a non-standard calling sequence on the Linux/i386 - * platform. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -/* - * sys_pipe() is the normal C calling standard for creating - * a pipe. It's not the way Unix traditionally does this, though. - */ -asmlinkage int sys_pipe(unsigned long * fildes) -{ - int fd[2]; - int error; - - error = do_pipe(fd); - if (!error) { - if (copy_to_user(fildes, fd, 2*sizeof(int))) - error = -EFAULT; - } - return error; -} - -/* common code for old and new mmaps */ -static inline long do_mmap2( - unsigned long addr, unsigned long len, - unsigned long prot, unsigned long flags, - unsigned long fd, unsigned long pgoff) -{ - int error = -EBADF; - struct file * file = NULL; - - flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); - if (!(flags & MAP_ANONYMOUS)) { - file = fget(fd); - if (!file) - goto out; - } - - down_write(¤t->mm->mmap_sem); - error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); - up_write(¤t->mm->mmap_sem); - - if (file) - fput(file); -out: - return error; -} - -asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, - unsigned long prot, unsigned long flags, - unsigned long fd, unsigned long pgoff) -{ - return do_mmap2(addr, len, prot, flags, fd, pgoff); -} - -/* - * Perform the select(nd, in, out, ex, tv) and mmap() system - * calls. Linux/i386 didn't use to be able to handle more than - * 4 system call parameters, so these system calls used a memory - * block for parameter passing.. - */ - -struct mmap_arg_struct { - unsigned long addr; - unsigned long len; - unsigned long prot; - unsigned long flags; - unsigned long fd; - unsigned long offset; -}; - -asmlinkage int old_mmap(struct mmap_arg_struct *arg) -{ - struct mmap_arg_struct a; - int err = -EFAULT; - - if (copy_from_user(&a, arg, sizeof(a))) - goto out; - - err = -EINVAL; - if (a.offset & ~PAGE_MASK) - goto out; - - err = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT); -out: - return err; -} - - -extern asmlinkage int sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *); - -struct sel_arg_struct { - unsigned long n; - fd_set *inp, *outp, *exp; - struct timeval *tvp; -}; - -asmlinkage int old_select(struct sel_arg_struct *arg) -{ - struct sel_arg_struct a; - - if (copy_from_user(&a, arg, sizeof(a))) - return -EFAULT; - /* sys_select() does the appropriate kernel locking */ - return sys_select(a.n, a.inp, a.outp, a.exp, a.tvp); -} - -/* - * sys_ipc() is the de-multiplexer for the SysV IPC calls.. - * - * This is really horribly ugly. - */ -asmlinkage int sys_ipc (uint call, int first, int second, - int third, void *ptr, long fifth) -{ - int version, ret; - - version = call >> 16; /* hack for backward compatibility */ - call &= 0xffff; - - switch (call) { - case SEMOP: - return sys_semop (first, (struct sembuf *)ptr, second); - case SEMGET: - return sys_semget (first, second, third); - case SEMCTL: { - union semun fourth; - if (!ptr) - return -EINVAL; - if (get_user(fourth.__pad, (void **) ptr)) - return -EFAULT; - return sys_semctl (first, second, third, fourth); - } - - case MSGSND: - return sys_msgsnd (first, (struct msgbuf *) ptr, - second, third); - case MSGRCV: - switch (version) { - case 0: { - struct ipc_kludge tmp; - if (!ptr) - return -EINVAL; - - if (copy_from_user(&tmp, - (struct ipc_kludge *) ptr, - sizeof (tmp))) - return -EFAULT; - return sys_msgrcv (first, tmp.msgp, second, - tmp.msgtyp, third); - } - default: - return sys_msgrcv (first, - (struct msgbuf *) ptr, - second, fifth, third); - } - case MSGGET: - return sys_msgget ((key_t) first, second); - case MSGCTL: - return sys_msgctl (first, second, (struct msqid_ds *) ptr); - - case SHMAT: - switch (version) { - default: { - ulong raddr; - ret = sys_shmat (first, (char *) ptr, second, &raddr); - if (ret) - return ret; - return put_user (raddr, (ulong *) third); - } - case 1: /* iBCS2 emulator entry point */ - if (!segment_eq(get_fs(), get_ds())) - return -EINVAL; - return sys_shmat (first, (char *) ptr, second, (ulong *) third); - } - case SHMDT: - return sys_shmdt ((char *)ptr); - case SHMGET: - return sys_shmget (first, second, third); - case SHMCTL: - return sys_shmctl (first, second, - (struct shmid_ds *) ptr); - default: - return -EINVAL; - } -} - -/* - * Old cruft - */ -asmlinkage int sys_uname(struct old_utsname * name) -{ - int err; - if (!name) - return -EFAULT; - down_read(&uts_sem); - err=copy_to_user(name, &system_utsname, sizeof (*name)); - up_read(&uts_sem); - return err?-EFAULT:0; -} - -asmlinkage int sys_olduname(struct oldold_utsname * name) -{ - int error; - - if (!name) - return -EFAULT; - if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname))) - return -EFAULT; - - down_read(&uts_sem); - - error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN); - error |= __put_user(0,name->sysname+__OLD_UTS_LEN); - error |= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN); - error |= __put_user(0,name->nodename+__OLD_UTS_LEN); - error |= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN); - error |= __put_user(0,name->release+__OLD_UTS_LEN); - error |= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN); - error |= __put_user(0,name->version+__OLD_UTS_LEN); - error |= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN); - error |= __put_user(0,name->machine+__OLD_UTS_LEN); - - up_read(&uts_sem); - - error = error ? -EFAULT : 0; - - return error; -} - -asmlinkage int sys_pause(void) -{ - current->state = TASK_INTERRUPTIBLE; - schedule(); - return -ERESTARTNOHAND; -} - diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/checksum.S b/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/checksum.S deleted file mode 100644 index 94c7867ddc..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/checksum.S +++ /dev/null @@ -1,496 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * IP/TCP/UDP checksumming routines - * - * Authors: Jorge Cwik, - * Arnt Gulbrandsen, - * Tom May, - * Pentium Pro/II routines: - * Alexander Kjeldaas - * Finn Arne Gangstad - * Lots of code moved from tcp.c and ip.c; see those files - * for more names. - * - * Changes: Ingo Molnar, converted csum_partial_copy() to 2.1 exception - * handling. - * Andi Kleen, add zeroing on error - * converted to pure assembler - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#include -#include - -/* - * computes a partial checksum, e.g. for TCP/UDP fragments - */ - -/* -unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) - */ - -.text -.align 4 -.globl csum_partial - -#ifndef CONFIG_X86_USE_PPRO_CHECKSUM - - /* - * Experiments with Ethernet and SLIP connections show that buff - * is aligned on either a 2-byte or 4-byte boundary. We get at - * least a twofold speedup on 486 and Pentium if it is 4-byte aligned. - * Fortunately, it is easy to convert 2-byte alignment to 4-byte - * alignment for the unrolled loop. - */ -csum_partial: - pushl %esi - pushl %ebx - movl 20(%esp),%eax # Function arg: unsigned int sum - movl 16(%esp),%ecx # Function arg: int len - movl 12(%esp),%esi # Function arg: unsigned char *buff - testl $3, %esi # Check alignment. - jz 2f # Jump if alignment is ok. - testl $1, %esi # Check alignment. - jz 10f # Jump if alignment is boundary of 2bytes. - - # buf is odd - dec %ecx - jl 8f - movzbl (%esi), %ebx - adcl %ebx, %eax - roll $8, %eax - inc %esi - testl $2, %esi - jz 2f -10: - subl $2, %ecx # Alignment uses up two bytes. - jae 1f # Jump if we had at least two bytes. - addl $2, %ecx # ecx was < 2. Deal with it. - jmp 4f -1: movw (%esi), %bx - addl $2, %esi - addw %bx, %ax - adcl $0, %eax -2: - movl %ecx, %edx - shrl $5, %ecx - jz 2f - testl %esi, %esi -1: movl (%esi), %ebx - adcl %ebx, %eax - movl 4(%esi), %ebx - adcl %ebx, %eax - movl 8(%esi), %ebx - adcl %ebx, %eax - movl 12(%esi), %ebx - adcl %ebx, %eax - movl 16(%esi), %ebx - adcl %ebx, %eax - movl 20(%esi), %ebx - adcl %ebx, %eax - movl 24(%esi), %ebx - adcl %ebx, %eax - movl 28(%esi), %ebx - adcl %ebx, %eax - lea 32(%esi), %esi - dec %ecx - jne 1b - adcl $0, %eax -2: movl %edx, %ecx - andl $0x1c, %edx - je 4f - shrl $2, %edx # This clears CF -3: adcl (%esi), %eax - lea 4(%esi), %esi - dec %edx - jne 3b - adcl $0, %eax -4: andl $3, %ecx - jz 7f - cmpl $2, %ecx - jb 5f - movw (%esi),%cx - leal 2(%esi),%esi - je 6f - shll $16,%ecx -5: movb (%esi),%cl -6: addl %ecx,%eax - adcl $0, %eax -7: - testl $1, 12(%esp) - jz 8f - roll $8, %eax -8: - popl %ebx - popl %esi - ret - -#else - -/* Version for PentiumII/PPro */ - -csum_partial: - pushl %esi - pushl %ebx - movl 20(%esp),%eax # Function arg: unsigned int sum - movl 16(%esp),%ecx # Function arg: int len - movl 12(%esp),%esi # Function arg: const unsigned char *buf - - testl $3, %esi - jnz 25f -10: - movl %ecx, %edx - movl %ecx, %ebx - andl $0x7c, %ebx - shrl $7, %ecx - addl %ebx,%esi - shrl $2, %ebx - negl %ebx - lea 45f(%ebx,%ebx,2), %ebx - testl %esi, %esi - jmp *%ebx - - # Handle 2-byte-aligned regions -20: addw (%esi), %ax - lea 2(%esi), %esi - adcl $0, %eax - jmp 10b -25: - testl $1, %esi - jz 30f - # buf is odd - dec %ecx - jl 90f - movzbl (%esi), %ebx - addl %ebx, %eax - adcl $0, %eax - roll $8, %eax - inc %esi - testl $2, %esi - jz 10b - -30: subl $2, %ecx - ja 20b - je 32f - addl $2, %ecx - jz 80f - movzbl (%esi),%ebx # csumming 1 byte, 2-aligned - addl %ebx, %eax - adcl $0, %eax - jmp 80f -32: - addw (%esi), %ax # csumming 2 bytes, 2-aligned - adcl $0, %eax - jmp 80f - -40: - addl -128(%esi), %eax - adcl -124(%esi), %eax - adcl -120(%esi), %eax - adcl -116(%esi), %eax - adcl -112(%esi), %eax - adcl -108(%esi), %eax - adcl -104(%esi), %eax - adcl -100(%esi), %eax - adcl -96(%esi), %eax - adcl -92(%esi), %eax - adcl -88(%esi), %eax - adcl -84(%esi), %eax - adcl -80(%esi), %eax - adcl -76(%esi), %eax - adcl -72(%esi), %eax - adcl -68(%esi), %eax - adcl -64(%esi), %eax - adcl -60(%esi), %eax - adcl -56(%esi), %eax - adcl -52(%esi), %eax - adcl -48(%esi), %eax - adcl -44(%esi), %eax - adcl -40(%esi), %eax - adcl -36(%esi), %eax - adcl -32(%esi), %eax - adcl -28(%esi), %eax - adcl -24(%esi), %eax - adcl -20(%esi), %eax - adcl -16(%esi), %eax - adcl -12(%esi), %eax - adcl -8(%esi), %eax - adcl -4(%esi), %eax -45: - lea 128(%esi), %esi - adcl $0, %eax - dec %ecx - jge 40b - movl %edx, %ecx -50: andl $3, %ecx - jz 80f - - # Handle the last 1-3 bytes without jumping - notl %ecx # 1->2, 2->1, 3->0, higher bits are masked - movl $0xffffff,%ebx # by the shll and shrl instructions - shll $3,%ecx - shrl %cl,%ebx - andl -128(%esi),%ebx # esi is 4-aligned so should be ok - addl %ebx,%eax - adcl $0,%eax -80: - testl $1, 12(%esp) - jz 90f - roll $8, %eax -90: - popl %ebx - popl %esi - ret - -#endif - -/* -unsigned int csum_partial_copy_generic (const char *src, char *dst, - int len, int sum, int *src_err_ptr, int *dst_err_ptr) - */ - -/* - * Copy from ds while checksumming, otherwise like csum_partial - * - * The macros SRC and DST specify the type of access for the instruction. - * thus we can call a custom exception handler for all access types. - * - * FIXME: could someone double-check whether I haven't mixed up some SRC and - * DST definitions? It's damn hard to trigger all cases. I hope I got - * them all but there's no guarantee. - */ - -#define SRC(y...) \ - 9999: y; \ - .section __ex_table, "a"; \ - .long 9999b, 6001f ; \ - .previous - -#define DST(y...) \ - 9999: y; \ - .section __ex_table, "a"; \ - .long 9999b, 6002f ; \ - .previous - -.align 4 -.globl csum_partial_copy_generic - -#ifndef CONFIG_X86_USE_PPRO_CHECKSUM - -#define ARGBASE 16 -#define FP 12 - -csum_partial_copy_generic: - subl $4,%esp - pushl %edi - pushl %esi - pushl %ebx - movl ARGBASE+16(%esp),%eax # sum - movl ARGBASE+12(%esp),%ecx # len - movl ARGBASE+4(%esp),%esi # src - movl ARGBASE+8(%esp),%edi # dst - - testl $2, %edi # Check alignment. - jz 2f # Jump if alignment is ok. - subl $2, %ecx # Alignment uses up two bytes. - jae 1f # Jump if we had at least two bytes. - addl $2, %ecx # ecx was < 2. Deal with it. - jmp 4f -SRC(1: movw (%esi), %bx ) - addl $2, %esi -DST( movw %bx, (%edi) ) - addl $2, %edi - addw %bx, %ax - adcl $0, %eax -2: - movl %ecx, FP(%esp) - shrl $5, %ecx - jz 2f - testl %esi, %esi -SRC(1: movl (%esi), %ebx ) -SRC( movl 4(%esi), %edx ) - adcl %ebx, %eax -DST( movl %ebx, (%edi) ) - adcl %edx, %eax -DST( movl %edx, 4(%edi) ) - -SRC( movl 8(%esi), %ebx ) -SRC( movl 12(%esi), %edx ) - adcl %ebx, %eax -DST( movl %ebx, 8(%edi) ) - adcl %edx, %eax -DST( movl %edx, 12(%edi) ) - -SRC( movl 16(%esi), %ebx ) -SRC( movl 20(%esi), %edx ) - adcl %ebx, %eax -DST( movl %ebx, 16(%edi) ) - adcl %edx, %eax -DST( movl %edx, 20(%edi) ) - -SRC( movl 24(%esi), %ebx ) -SRC( movl 28(%esi), %edx ) - adcl %ebx, %eax -DST( movl %ebx, 24(%edi) ) - adcl %edx, %eax -DST( movl %edx, 28(%edi) ) - - lea 32(%esi), %esi - lea 32(%edi), %edi - dec %ecx - jne 1b - adcl $0, %eax -2: movl FP(%esp), %edx - movl %edx, %ecx - andl $0x1c, %edx - je 4f - shrl $2, %edx # This clears CF -SRC(3: movl (%esi), %ebx ) - adcl %ebx, %eax -DST( movl %ebx, (%edi) ) - lea 4(%esi), %esi - lea 4(%edi), %edi - dec %edx - jne 3b - adcl $0, %eax -4: andl $3, %ecx - jz 7f - cmpl $2, %ecx - jb 5f -SRC( movw (%esi), %cx ) - leal 2(%esi), %esi -DST( movw %cx, (%edi) ) - leal 2(%edi), %edi - je 6f - shll $16,%ecx -SRC(5: movb (%esi), %cl ) -DST( movb %cl, (%edi) ) -6: addl %ecx, %eax - adcl $0, %eax -7: -5000: - -# Exception handler: -.section .fixup, "ax" - -6001: - movl ARGBASE+20(%esp), %ebx # src_err_ptr - movl $-EFAULT, (%ebx) - - # zero the complete destination - computing the rest - # is too much work - movl ARGBASE+8(%esp), %edi # dst - movl ARGBASE+12(%esp), %ecx # len - xorl %eax,%eax - rep ; stosb - - jmp 5000b - -6002: - movl ARGBASE+24(%esp), %ebx # dst_err_ptr - movl $-EFAULT,(%ebx) - jmp 5000b - -.previous - - popl %ebx - popl %esi - popl %edi - popl %ecx # equivalent to addl $4,%esp - ret - -#else - -/* Version for PentiumII/PPro */ - -#define ROUND1(x) \ - SRC(movl x(%esi), %ebx ) ; \ - addl %ebx, %eax ; \ - DST(movl %ebx, x(%edi) ) ; - -#define ROUND(x) \ - SRC(movl x(%esi), %ebx ) ; \ - adcl %ebx, %eax ; \ - DST(movl %ebx, x(%edi) ) ; - -#define ARGBASE 12 - -csum_partial_copy_generic: - pushl %ebx - pushl %edi - pushl %esi - movl ARGBASE+4(%esp),%esi #src - movl ARGBASE+8(%esp),%edi #dst - movl ARGBASE+12(%esp),%ecx #len - movl ARGBASE+16(%esp),%eax #sum -# movl %ecx, %edx - movl %ecx, %ebx - movl %esi, %edx - shrl $6, %ecx - andl $0x3c, %ebx - negl %ebx - subl %ebx, %esi - subl %ebx, %edi - lea -1(%esi),%edx - andl $-32,%edx - lea 3f(%ebx,%ebx), %ebx - testl %esi, %esi - jmp *%ebx -1: addl $64,%esi - addl $64,%edi - SRC(movb -32(%edx),%bl) ; SRC(movb (%edx),%bl) - ROUND1(-64) ROUND(-60) ROUND(-56) ROUND(-52) - ROUND (-48) ROUND(-44) ROUND(-40) ROUND(-36) - ROUND (-32) ROUND(-28) ROUND(-24) ROUND(-20) - ROUND (-16) ROUND(-12) ROUND(-8) ROUND(-4) -3: adcl $0,%eax - addl $64, %edx - dec %ecx - jge 1b -4: movl ARGBASE+12(%esp),%edx #len - andl $3, %edx - jz 7f - cmpl $2, %edx - jb 5f -SRC( movw (%esi), %dx ) - leal 2(%esi), %esi -DST( movw %dx, (%edi) ) - leal 2(%edi), %edi - je 6f - shll $16,%edx -5: -SRC( movb (%esi), %dl ) -DST( movb %dl, (%edi) ) -6: addl %edx, %eax - adcl $0, %eax -7: -.section .fixup, "ax" -6001: movl ARGBASE+20(%esp), %ebx # src_err_ptr - movl $-EFAULT, (%ebx) - # zero the complete destination (computing the rest is too much work) - movl ARGBASE+8(%esp),%edi # dst - movl ARGBASE+12(%esp),%ecx # len - xorl %eax,%eax - rep; stosb - jmp 7b -6002: movl ARGBASE+24(%esp), %ebx # dst_err_ptr - movl $-EFAULT, (%ebx) - jmp 7b -.previous - - popl %esi - popl %edi - popl %ebx - ret - -#undef ROUND -#undef ROUND1 - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/dec_and_lock.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/dec_and_lock.c deleted file mode 100644 index ffd4869001..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/dec_and_lock.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * x86 version of "atomic_dec_and_lock()" using - * the atomic "cmpxchg" instruction. - * - * (For CPU's lacking cmpxchg, we use the slow - * generic version, and this one never even gets - * compiled). - */ - -#include -#include - -int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) -{ - int counter; - int newcount; - -repeat: - counter = atomic_read(atomic); - newcount = counter-1; - - if (!newcount) - goto slow_path; - - asm volatile("lock; cmpxchgl %1,%2" - :"=a" (newcount) - :"r" (newcount), "m" (atomic->counter), "0" (counter)); - - /* If the above failed, "eax" will have changed */ - if (newcount != counter) - goto repeat; - return 0; - -slow_path: - spin_lock(lock); - if (atomic_dec_and_test(atomic)) - return 1; - spin_unlock(lock); - return 0; -} diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/getuser.S b/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/getuser.S deleted file mode 100644 index c244721e70..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/getuser.S +++ /dev/null @@ -1,73 +0,0 @@ -/* - * __get_user functions. - * - * (C) Copyright 1998 Linus Torvalds - * - * These functions have a non-standard call interface - * to make them more efficient, especially as they - * return an error value in addition to the "real" - * return value. - */ - -/* - * __get_user_X - * - * Inputs: %eax contains the address - * - * Outputs: %eax is error code (0 or -EFAULT) - * %edx contains zero-extended value - * - * These functions should not modify any other registers, - * as they get called from within inline assembly. - */ - -addr_limit = 12 - -.text -.align 4 -.globl __get_user_1 -__get_user_1: - movl %esp,%edx - andl $0xffffe000,%edx - cmpl addr_limit(%edx),%eax - jae bad_get_user -1: movzbl (%eax),%edx - xorl %eax,%eax - ret - -.align 4 -.globl __get_user_2 -__get_user_2: - addl $1,%eax - movl %esp,%edx - jc bad_get_user - andl $0xffffe000,%edx - cmpl addr_limit(%edx),%eax - jae bad_get_user -2: movzwl -1(%eax),%edx - xorl %eax,%eax - ret - -.align 4 -.globl __get_user_4 -__get_user_4: - addl $3,%eax - movl %esp,%edx - jc bad_get_user - andl $0xffffe000,%edx - cmpl addr_limit(%edx),%eax - jae bad_get_user -3: movl -3(%eax),%edx - xorl %eax,%eax - ret - -bad_get_user: - xorl %edx,%edx - movl $-14,%eax - ret - -.section __ex_table,"a" - .long 1b,bad_get_user - .long 2b,bad_get_user - .long 3b,bad_get_user -.previous diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/iodebug.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/iodebug.c deleted file mode 100644 index 701a07fe72..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/iodebug.c +++ /dev/null @@ -1,19 +0,0 @@ -#include - -void * __io_virt_debug(unsigned long x, const char *file, int line) -{ - if (x < PAGE_OFFSET) { - printk("io mapaddr 0x%05lx not valid at %s:%d!\n", x, file, line); - return __va(x); - } - return (void *)x; -} - -unsigned long __io_phys_debug(unsigned long x, const char *file, int line) -{ - if (x < PAGE_OFFSET) { - printk("io mapaddr 0x%05lx not valid at %s:%d!\n", x, file, line); - return x; - } - return __pa(x); -} diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/memcpy.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/memcpy.c deleted file mode 100644 index 4cb37b6e50..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/memcpy.c +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include - -#undef memcpy -#undef memset - -void * memcpy(void * to, const void * from, size_t n) -{ -#ifdef CONFIG_X86_USE_3DNOW - return __memcpy3d(to, from, n); -#else - return __memcpy(to, from, n); -#endif -} - -void * memset(void * s, int c, size_t count) -{ - return __memset(s, c, count); -} diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/mmx.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/mmx.c deleted file mode 100644 index 2e52b5d5af..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/mmx.c +++ /dev/null @@ -1,399 +0,0 @@ -#include -#include -#include -#include - -#include -#include - - -/* - * MMX 3DNow! library helper functions - * - * To do: - * We can use MMX just for prefetch in IRQ's. This may be a win. - * (reported so on K6-III) - * We should use a better code neutral filler for the short jump - * leal ebx. [ebx] is apparently best for K6-2, but Cyrix ?? - * We also want to clobber the filler register so we dont get any - * register forwarding stalls on the filler. - * - * Add *user handling. Checksums are not a win with MMX on any CPU - * tested so far for any MMX solution figured. - * - * 22/09/2000 - Arjan van de Ven - * Improved for non-egineering-sample Athlons - * - */ - -void *_mmx_memcpy(void *to, const void *from, size_t len) -{ - void *p; - int i; - - if (in_interrupt()) - return __memcpy(to, from, len); - - p = to; - i = len >> 6; /* len/64 */ - - kernel_fpu_begin(); - - __asm__ __volatile__ ( - "1: prefetch (%0)\n" /* This set is 28 bytes */ - " prefetch 64(%0)\n" - " prefetch 128(%0)\n" - " prefetch 192(%0)\n" - " prefetch 256(%0)\n" - "2: \n" - ".section .fixup, \"ax\"\n" - "3: movw $0x1AEB, 1b\n" /* jmp on 26 bytes */ - " jmp 2b\n" - ".previous\n" - ".section __ex_table,\"a\"\n" - " .align 4\n" - " .long 1b, 3b\n" - ".previous" - : : "r" (from) ); - - - for(; i>5; i--) - { - __asm__ __volatile__ ( - "1: prefetch 320(%0)\n" - "2: movq (%0), %%mm0\n" - " movq 8(%0), %%mm1\n" - " movq 16(%0), %%mm2\n" - " movq 24(%0), %%mm3\n" - " movq %%mm0, (%1)\n" - " movq %%mm1, 8(%1)\n" - " movq %%mm2, 16(%1)\n" - " movq %%mm3, 24(%1)\n" - " movq 32(%0), %%mm0\n" - " movq 40(%0), %%mm1\n" - " movq 48(%0), %%mm2\n" - " movq 56(%0), %%mm3\n" - " movq %%mm0, 32(%1)\n" - " movq %%mm1, 40(%1)\n" - " movq %%mm2, 48(%1)\n" - " movq %%mm3, 56(%1)\n" - ".section .fixup, \"ax\"\n" - "3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */ - " jmp 2b\n" - ".previous\n" - ".section __ex_table,\"a\"\n" - " .align 4\n" - " .long 1b, 3b\n" - ".previous" - : : "r" (from), "r" (to) : "memory"); - from+=64; - to+=64; - } - - for(; i>0; i--) - { - __asm__ __volatile__ ( - " movq (%0), %%mm0\n" - " movq 8(%0), %%mm1\n" - " movq 16(%0), %%mm2\n" - " movq 24(%0), %%mm3\n" - " movq %%mm0, (%1)\n" - " movq %%mm1, 8(%1)\n" - " movq %%mm2, 16(%1)\n" - " movq %%mm3, 24(%1)\n" - " movq 32(%0), %%mm0\n" - " movq 40(%0), %%mm1\n" - " movq 48(%0), %%mm2\n" - " movq 56(%0), %%mm3\n" - " movq %%mm0, 32(%1)\n" - " movq %%mm1, 40(%1)\n" - " movq %%mm2, 48(%1)\n" - " movq %%mm3, 56(%1)\n" - : : "r" (from), "r" (to) : "memory"); - from+=64; - to+=64; - } - /* - * Now do the tail of the block - */ - __memcpy(to, from, len&63); - kernel_fpu_end(); - return p; -} - -#ifdef CONFIG_MK7 - -/* - * The K7 has streaming cache bypass load/store. The Cyrix III, K6 and - * other MMX using processors do not. - */ - -static void fast_clear_page(void *page) -{ - int i; - - kernel_fpu_begin(); - - __asm__ __volatile__ ( - " pxor %%mm0, %%mm0\n" : : - ); - - for(i=0;i<4096/64;i++) - { - __asm__ __volatile__ ( - " movntq %%mm0, (%0)\n" - " movntq %%mm0, 8(%0)\n" - " movntq %%mm0, 16(%0)\n" - " movntq %%mm0, 24(%0)\n" - " movntq %%mm0, 32(%0)\n" - " movntq %%mm0, 40(%0)\n" - " movntq %%mm0, 48(%0)\n" - " movntq %%mm0, 56(%0)\n" - : : "r" (page) : "memory"); - page+=64; - } - /* since movntq is weakly-ordered, a "sfence" is needed to become - * ordered again. - */ - __asm__ __volatile__ ( - " sfence \n" : : - ); - kernel_fpu_end(); -} - -static void fast_copy_page(void *to, void *from) -{ - int i; - - kernel_fpu_begin(); - - /* maybe the prefetch stuff can go before the expensive fnsave... - * but that is for later. -AV - */ - __asm__ __volatile__ ( - "1: prefetch (%0)\n" - " prefetch 64(%0)\n" - " prefetch 128(%0)\n" - " prefetch 192(%0)\n" - " prefetch 256(%0)\n" - "2: \n" - ".section .fixup, \"ax\"\n" - "3: movw $0x1AEB, 1b\n" /* jmp on 26 bytes */ - " jmp 2b\n" - ".previous\n" - ".section __ex_table,\"a\"\n" - " .align 4\n" - " .long 1b, 3b\n" - ".previous" - : : "r" (from) ); - - for(i=0; i<(4096-320)/64; i++) - { - __asm__ __volatile__ ( - "1: prefetch 320(%0)\n" - "2: movq (%0), %%mm0\n" - " movntq %%mm0, (%1)\n" - " movq 8(%0), %%mm1\n" - " movntq %%mm1, 8(%1)\n" - " movq 16(%0), %%mm2\n" - " movntq %%mm2, 16(%1)\n" - " movq 24(%0), %%mm3\n" - " movntq %%mm3, 24(%1)\n" - " movq 32(%0), %%mm4\n" - " movntq %%mm4, 32(%1)\n" - " movq 40(%0), %%mm5\n" - " movntq %%mm5, 40(%1)\n" - " movq 48(%0), %%mm6\n" - " movntq %%mm6, 48(%1)\n" - " movq 56(%0), %%mm7\n" - " movntq %%mm7, 56(%1)\n" - ".section .fixup, \"ax\"\n" - "3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */ - " jmp 2b\n" - ".previous\n" - ".section __ex_table,\"a\"\n" - " .align 4\n" - " .long 1b, 3b\n" - ".previous" - : : "r" (from), "r" (to) : "memory"); - from+=64; - to+=64; - } - for(i=(4096-320)/64; i<4096/64; i++) - { - __asm__ __volatile__ ( - "2: movq (%0), %%mm0\n" - " movntq %%mm0, (%1)\n" - " movq 8(%0), %%mm1\n" - " movntq %%mm1, 8(%1)\n" - " movq 16(%0), %%mm2\n" - " movntq %%mm2, 16(%1)\n" - " movq 24(%0), %%mm3\n" - " movntq %%mm3, 24(%1)\n" - " movq 32(%0), %%mm4\n" - " movntq %%mm4, 32(%1)\n" - " movq 40(%0), %%mm5\n" - " movntq %%mm5, 40(%1)\n" - " movq 48(%0), %%mm6\n" - " movntq %%mm6, 48(%1)\n" - " movq 56(%0), %%mm7\n" - " movntq %%mm7, 56(%1)\n" - : : "r" (from), "r" (to) : "memory"); - from+=64; - to+=64; - } - /* since movntq is weakly-ordered, a "sfence" is needed to become - * ordered again. - */ - __asm__ __volatile__ ( - " sfence \n" : : - ); - kernel_fpu_end(); -} - -#else - -/* - * Generic MMX implementation without K7 specific streaming - */ - -static void fast_clear_page(void *page) -{ - int i; - - kernel_fpu_begin(); - - __asm__ __volatile__ ( - " pxor %%mm0, %%mm0\n" : : - ); - - for(i=0;i<4096/128;i++) - { - __asm__ __volatile__ ( - " movq %%mm0, (%0)\n" - " movq %%mm0, 8(%0)\n" - " movq %%mm0, 16(%0)\n" - " movq %%mm0, 24(%0)\n" - " movq %%mm0, 32(%0)\n" - " movq %%mm0, 40(%0)\n" - " movq %%mm0, 48(%0)\n" - " movq %%mm0, 56(%0)\n" - " movq %%mm0, 64(%0)\n" - " movq %%mm0, 72(%0)\n" - " movq %%mm0, 80(%0)\n" - " movq %%mm0, 88(%0)\n" - " movq %%mm0, 96(%0)\n" - " movq %%mm0, 104(%0)\n" - " movq %%mm0, 112(%0)\n" - " movq %%mm0, 120(%0)\n" - : : "r" (page) : "memory"); - page+=128; - } - - kernel_fpu_end(); -} - -static void fast_copy_page(void *to, void *from) -{ - int i; - - - kernel_fpu_begin(); - - __asm__ __volatile__ ( - "1: prefetch (%0)\n" - " prefetch 64(%0)\n" - " prefetch 128(%0)\n" - " prefetch 192(%0)\n" - " prefetch 256(%0)\n" - "2: \n" - ".section .fixup, \"ax\"\n" - "3: movw $0x1AEB, 1b\n" /* jmp on 26 bytes */ - " jmp 2b\n" - ".previous\n" - ".section __ex_table,\"a\"\n" - " .align 4\n" - " .long 1b, 3b\n" - ".previous" - : : "r" (from) ); - - for(i=0; i<4096/64; i++) - { - __asm__ __volatile__ ( - "1: prefetch 320(%0)\n" - "2: movq (%0), %%mm0\n" - " movq 8(%0), %%mm1\n" - " movq 16(%0), %%mm2\n" - " movq 24(%0), %%mm3\n" - " movq %%mm0, (%1)\n" - " movq %%mm1, 8(%1)\n" - " movq %%mm2, 16(%1)\n" - " movq %%mm3, 24(%1)\n" - " movq 32(%0), %%mm0\n" - " movq 40(%0), %%mm1\n" - " movq 48(%0), %%mm2\n" - " movq 56(%0), %%mm3\n" - " movq %%mm0, 32(%1)\n" - " movq %%mm1, 40(%1)\n" - " movq %%mm2, 48(%1)\n" - " movq %%mm3, 56(%1)\n" - ".section .fixup, \"ax\"\n" - "3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */ - " jmp 2b\n" - ".previous\n" - ".section __ex_table,\"a\"\n" - " .align 4\n" - " .long 1b, 3b\n" - ".previous" - : : "r" (from), "r" (to) : "memory"); - from+=64; - to+=64; - } - kernel_fpu_end(); -} - - -#endif - -/* - * Favour MMX for page clear and copy. - */ - -static void slow_zero_page(void * page) -{ - int d0, d1; - __asm__ __volatile__( \ - "cld\n\t" \ - "rep ; stosl" \ - : "=&c" (d0), "=&D" (d1) - :"a" (0),"1" (page),"0" (1024) - :"memory"); -} - -void mmx_clear_page(void * page) -{ - if(in_interrupt()) - slow_zero_page(page); - else - fast_clear_page(page); -} - -static void slow_copy_page(void *to, void *from) -{ - int d0, d1, d2; - __asm__ __volatile__( \ - "cld\n\t" \ - "rep ; movsl" \ - : "=&c" (d0), "=&D" (d1), "=&S" (d2) \ - : "0" (1024),"1" ((long) to),"2" ((long) from) \ - : "memory"); -} - - -void mmx_copy_page(void *to, void *from) -{ - if(in_interrupt()) - slow_copy_page(to, from); - else - fast_copy_page(to, from); -} diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/old-checksum.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/old-checksum.c deleted file mode 100644 index ae3a38043a..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/old-checksum.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * FIXME: old compatibility stuff, will be removed soon. - */ - -#include - -unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum) -{ - int src_err=0, dst_err=0; - - sum = csum_partial_copy_generic ( src, dst, len, sum, &src_err, &dst_err); - - if (src_err || dst_err) - printk("old csum_partial_copy_fromuser(), tell mingo to convert me.\n"); - - return sum; -} - - diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/strstr.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/strstr.c deleted file mode 100644 index a3dafbf59d..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/strstr.c +++ /dev/null @@ -1,31 +0,0 @@ -#include - -char * strstr(const char * cs,const char * ct) -{ -int d0, d1; -register char * __res; -__asm__ __volatile__( - "movl %6,%%edi\n\t" - "repne\n\t" - "scasb\n\t" - "notl %%ecx\n\t" - "decl %%ecx\n\t" /* NOTE! This also sets Z if searchstring='' */ - "movl %%ecx,%%edx\n" - "1:\tmovl %6,%%edi\n\t" - "movl %%esi,%%eax\n\t" - "movl %%edx,%%ecx\n\t" - "repe\n\t" - "cmpsb\n\t" - "je 2f\n\t" /* also works for empty string, see above */ - "xchgl %%eax,%%esi\n\t" - "incl %%esi\n\t" - "cmpb $0,-1(%%eax)\n\t" - "jne 1b\n\t" - "xorl %%eax,%%eax\n\t" - "2:" - :"=a" (__res), "=&c" (d0), "=&S" (d1) - :"0" (0), "1" (0xffffffff), "2" (cs), "g" (ct) - :"dx", "di"); -return __res; -} - diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/usercopy.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/usercopy.c deleted file mode 100644 index d81fa81af8..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/usercopy.c +++ /dev/null @@ -1,190 +0,0 @@ -/* - * User address space access functions. - * The non inlined parts of asm-i386/uaccess.h are here. - * - * Copyright 1997 Andi Kleen - * Copyright 1997 Linus Torvalds - */ -#include -#include -#include - -#ifdef CONFIG_X86_USE_3DNOW_AND_WORKS - -unsigned long -__generic_copy_to_user(void *to, const void *from, unsigned long n) -{ - if (access_ok(VERIFY_WRITE, to, n)) - { - if(n<512) - __copy_user(to,from,n); - else - mmx_copy_user(to,from,n); - } - return n; -} - -unsigned long -__generic_copy_from_user(void *to, const void *from, unsigned long n) -{ - if (access_ok(VERIFY_READ, from, n)) - { - if(n<512) - __copy_user_zeroing(to,from,n); - else - mmx_copy_user_zeroing(to, from, n); - } - else - memset(to, 0, n); - return n; -} - -#else - -unsigned long -__generic_copy_to_user(void *to, const void *from, unsigned long n) -{ - prefetch(from); - if (access_ok(VERIFY_WRITE, to, n)) - __copy_user(to,from,n); - return n; -} - -unsigned long -__generic_copy_from_user(void *to, const void *from, unsigned long n) -{ - prefetchw(to); - if (access_ok(VERIFY_READ, from, n)) - __copy_user_zeroing(to,from,n); - else - memset(to, 0, n); - return n; -} - -#endif - -/* - * Copy a null terminated string from userspace. - */ - -#define __do_strncpy_from_user(dst,src,count,res) \ -do { \ - int __d0, __d1, __d2; \ - __asm__ __volatile__( \ - " testl %1,%1\n" \ - " jz 2f\n" \ - "0: lodsb\n" \ - " stosb\n" \ - " testb %%al,%%al\n" \ - " jz 1f\n" \ - " decl %1\n" \ - " jnz 0b\n" \ - "1: subl %1,%0\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3: movl %5,%0\n" \ - " jmp 2b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 0b,3b\n" \ - ".previous" \ - : "=d"(res), "=c"(count), "=&a" (__d0), "=&S" (__d1), \ - "=&D" (__d2) \ - : "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \ - : "memory"); \ -} while (0) - -long -__strncpy_from_user(char *dst, const char *src, long count) -{ - long res; - __do_strncpy_from_user(dst, src, count, res); - return res; -} - -long -strncpy_from_user(char *dst, const char *src, long count) -{ - long res = -EFAULT; - if (access_ok(VERIFY_READ, src, 1)) - __do_strncpy_from_user(dst, src, count, res); - return res; -} - - -/* - * Zero Userspace - */ - -#define __do_clear_user(addr,size) \ -do { \ - int __d0; \ - __asm__ __volatile__( \ - "0: rep; stosl\n" \ - " movl %2,%0\n" \ - "1: rep; stosb\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3: lea 0(%2,%0,4),%0\n" \ - " jmp 2b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 0b,3b\n" \ - " .long 1b,2b\n" \ - ".previous" \ - : "=&c"(size), "=&D" (__d0) \ - : "r"(size & 3), "0"(size / 4), "1"(addr), "a"(0)); \ -} while (0) - -unsigned long -clear_user(void *to, unsigned long n) -{ - if (access_ok(VERIFY_WRITE, to, n)) - __do_clear_user(to, n); - return n; -} - -unsigned long -__clear_user(void *to, unsigned long n) -{ - __do_clear_user(to, n); - return n; -} - -/* - * Return the size of a string (including the ending 0) - * - * Return 0 on exception, a value greater than N if too long - */ - -long strnlen_user(const char *s, long n) -{ - unsigned long mask = -__addr_ok(s); - unsigned long res, tmp; - - __asm__ __volatile__( - " testl %0, %0\n" - " jz 3f\n" - " andl %0,%%ecx\n" - "0: repne; scasb\n" - " setne %%al\n" - " subl %%ecx,%0\n" - " addl %0,%%eax\n" - "1:\n" - ".section .fixup,\"ax\"\n" - "2: xorl %%eax,%%eax\n" - " jmp 1b\n" - "3: movb $1,%%al\n" - " jmp 1b\n" - ".previous\n" - ".section __ex_table,\"a\"\n" - " .align 4\n" - " .long 0b,2b\n" - ".previous" - :"=r" (n), "=D" (s), "=a" (res), "=c" (tmp) - :"0" (n), "1" (s), "2" (0), "3" (mask) - :"cc"); - return res & mask; -} diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/extable.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/extable.c deleted file mode 100644 index 4cd9f064c3..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/extable.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * linux/arch/i386/mm/extable.c - */ - -#include -#include -#include -#include - -extern const struct exception_table_entry __start___ex_table[]; -extern const struct exception_table_entry __stop___ex_table[]; - -static inline unsigned long -search_one_table(const struct exception_table_entry *first, - const struct exception_table_entry *last, - unsigned long value) -{ - while (first <= last) { - const struct exception_table_entry *mid; - long diff; - - mid = (last - first) / 2 + first; - diff = mid->insn - value; - if (diff == 0) - return mid->fixup; - else if (diff < 0) - first = mid+1; - else - last = mid-1; - } - return 0; -} - -extern spinlock_t modlist_lock; - -unsigned long -search_exception_table(unsigned long addr) -{ - unsigned long ret = 0; - -#ifndef CONFIG_MODULES - /* There is only the kernel to search. */ - ret = search_one_table(__start___ex_table, __stop___ex_table-1, addr); - return ret; -#else - unsigned long flags; - /* The kernel is the last "module" -- no need to treat it special. */ - struct module *mp; - - spin_lock_irqsave(&modlist_lock, flags); - for (mp = module_list; mp != NULL; mp = mp->next) { - if (mp->ex_table_start == NULL || !(mp->flags&(MOD_RUNNING|MOD_INITIALIZING))) - continue; - ret = search_one_table(mp->ex_table_start, - mp->ex_table_end - 1, addr); - if (ret) - break; - } - spin_unlock_irqrestore(&modlist_lock, flags); - return ret; -#endif -} diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/pageattr.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/pageattr.c deleted file mode 100644 index 8d3b3e3856..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/pageattr.c +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright 2002 Andi Kleen, SuSE Labs. - * Thanks to Ben LaHaise for precious feedback. - */ - -#include -#include -#include -#include -#include -#include -#include - -/* Should move most of this stuff into the appropiate includes */ -#define LARGE_PAGE_MASK (~(LARGE_PAGE_SIZE-1)) -#define LARGE_PAGE_SIZE (1UL << PMD_SHIFT) - -static inline pte_t *lookup_address(unsigned long address) -{ - pmd_t *pmd; - pgd_t *pgd = pgd_offset(&init_mm, address); - - if (pgd_none(*pgd)) - return NULL; - if (pgd_val(*pgd) & _PAGE_PSE) - return (pte_t *)pgd; - pmd = pmd_offset(pgd, address); - if (pmd_none(*pmd)) - return NULL; - if (pmd_val(*pmd) & _PAGE_PSE) - return (pte_t *)pmd; - return pte_offset(pmd, address); -} - -static struct page *split_large_page(unsigned long address, pgprot_t prot) -{ - int i; - unsigned long addr; - struct page *base = alloc_pages(GFP_KERNEL, 0); - pte_t *pbase; - if (!base) - return NULL; - address = __pa(address); - addr = address & LARGE_PAGE_MASK; - pbase = (pte_t *)page_address(base); - for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) { - pbase[i] = mk_pte_phys(addr, - addr == address ? prot : PAGE_KERNEL); - } - return base; -} - -static void flush_kernel_map(void * address) -{ - if (!test_bit(X86_FEATURE_SELFSNOOP, boot_cpu_data.x86_capability)) { - /* Could use CLFLUSH here if the CPU supports it (Hammer,P4) */ - if (boot_cpu_data.x86_model >= 4) - asm volatile("wbinvd":::"memory"); - } - - /* Do global flush here to work around large page flushing errata - in some early Athlons */ - __flush_tlb_all(); -} - -static void set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte) -{ - set_pte_atomic(kpte, pte); /* change init_mm */ -#ifndef CONFIG_X86_PAE - { - struct list_head *l; - spin_lock(&mmlist_lock); - list_for_each(l, &init_mm.mmlist) { - struct mm_struct *mm = list_entry(l, struct mm_struct, mmlist); - pmd_t *pmd = pmd_offset(pgd_offset(mm, address), address); - set_pte_atomic((pte_t *)pmd, pte); - } - spin_unlock(&mmlist_lock); - } -#endif -} - -/* no more special protections in this 2/4MB area - revert to a - large page again. */ -static inline void revert_page(struct page *kpte_page, unsigned long address) -{ - pte_t *linear = (pte_t *) - pmd_offset(pgd_offset(&init_mm, address), address); - set_pmd_pte(linear, address, - mk_pte_phys(__pa(address & LARGE_PAGE_MASK), - MAKE_GLOBAL(_KERNPG_TABLE|_PAGE_PSE))); -} - -/* - * Change the page attributes of an page in the linear mapping. - * - * This should be used when a page is mapped with a different caching policy - * than write-back somewhere - some CPUs do not like it when mappings with - * different caching policies exist. This changes the page attributes of the - * in kernel linear mapping too. - * - * The caller needs to ensure that there are no conflicting mappings elsewhere. - * This function only deals with the kernel linear map. - * When page is in highmem it must never be kmap'ed. - */ -static int -__change_page_attr(struct page *page, pgprot_t prot, struct page **oldpage) -{ - pte_t *kpte; - unsigned long address; - struct page *kpte_page; - -#ifdef CONFIG_HIGHMEM - if (page >= highmem_start_page) - BUG(); -#endif - address = (unsigned long)page_address(page); - kpte = lookup_address(address); - if (!kpte) - return -EINVAL; - kpte_page = virt_to_page(((unsigned long)kpte) & PAGE_MASK); - if (pgprot_val(prot) != pgprot_val(PAGE_KERNEL)) { - if ((pte_val(*kpte) & _PAGE_PSE) == 0) { - pte_t old = *kpte; - pte_t standard = mk_pte(page, PAGE_KERNEL); - - set_pte_atomic(kpte, mk_pte(page, prot)); - if (pte_same(old,standard)) - atomic_inc(&kpte_page->count); - } else { - struct page *split = split_large_page(address, prot); - if (!split) - return -ENOMEM; - atomic_inc(&kpte_page->count); - set_pmd_pte(kpte,address,mk_pte(split, PAGE_KERNEL)); - } - } else if ((pte_val(*kpte) & _PAGE_PSE) == 0) { - set_pte_atomic(kpte, mk_pte(page, PAGE_KERNEL)); - atomic_dec(&kpte_page->count); - } - - if (cpu_has_pse && (atomic_read(&kpte_page->count) == 1)) { - *oldpage = kpte_page; - revert_page(kpte_page, address); - } - return 0; -} - -int change_page_attr(struct page *page, int numpages, pgprot_t prot) -{ - int err = 0; - struct page *fpage; - int i; - - down_write(&init_mm.mmap_sem); - for (i = 0; i < numpages; i++, page++) { - fpage = NULL; - err = __change_page_attr(page, prot, &fpage); - if (err) - break; - if (fpage || i == numpages-1) { - void *address = page_address(page); -#ifdef CONFIG_SMP - smp_call_function(flush_kernel_map, address, 1, 1); -#endif - flush_kernel_map(address); - if (fpage) - __free_page(fpage); - } - } - up_write(&init_mm.mmap_sem); - return err; -} - -EXPORT_SYMBOL(change_page_attr); diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/a.out.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/a.out.h deleted file mode 100644 index ab17bb8e54..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/a.out.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __I386_A_OUT_H__ -#define __I386_A_OUT_H__ - -struct exec -{ - unsigned long a_info; /* Use macros N_MAGIC, etc for access */ - unsigned a_text; /* length of text, in bytes */ - unsigned a_data; /* length of data, in bytes */ - unsigned a_bss; /* length of uninitialized data area for file, in bytes */ - unsigned a_syms; /* length of symbol table data in file, in bytes */ - unsigned a_entry; /* start address */ - unsigned a_trsize; /* length of relocation info for text, in bytes */ - unsigned a_drsize; /* length of relocation info for data, in bytes */ -}; - -#define N_TRSIZE(a) ((a).a_trsize) -#define N_DRSIZE(a) ((a).a_drsize) -#define N_SYMSIZE(a) ((a).a_syms) - -#ifdef __KERNEL__ - -#define STACK_TOP TASK_SIZE - -#endif - -#endif /* __A_OUT_GNU_H__ */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apic.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apic.h deleted file mode 100644 index 89921f9d78..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apic.h +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef __ASM_APIC_H -#define __ASM_APIC_H - -#include -#include -#include -#include - -#ifdef CONFIG_X86_LOCAL_APIC - -#define APIC_DEBUG 0 - -#if APIC_DEBUG -#define Dprintk(x...) printk(x) -#else -#define Dprintk(x...) -#endif - -/* - * Basic functions accessing APICs. - */ - -static __inline void apic_write(unsigned long reg, unsigned long v) -{ - *((volatile unsigned long *)(APIC_BASE+reg)) = v; -} - -static __inline void apic_write_atomic(unsigned long reg, unsigned long v) -{ - xchg((volatile unsigned long *)(APIC_BASE+reg), v); -} - -static __inline unsigned long apic_read(unsigned long reg) -{ - return *((volatile unsigned long *)(APIC_BASE+reg)); -} - -static __inline__ void apic_wait_icr_idle(void) -{ - do { } while ( apic_read( APIC_ICR ) & APIC_ICR_BUSY ); -} - -#ifdef CONFIG_X86_GOOD_APIC -# define FORCE_READ_AROUND_WRITE 0 -# define apic_read_around(x) -# define apic_write_around(x,y) apic_write((x),(y)) -#else -# define FORCE_READ_AROUND_WRITE 1 -# define apic_read_around(x) apic_read(x) -# define apic_write_around(x,y) apic_write_atomic((x),(y)) -#endif - -static inline void ack_APIC_irq(void) -{ - /* - * ack_APIC_irq() actually gets compiled as a single instruction: - * - a single rmw on Pentium/82489DX - * - a single write on P6+ cores (CONFIG_X86_GOOD_APIC) - * ... yummie. - */ - - /* Docs say use 0 for future compatibility */ - apic_write_around(APIC_EOI, 0); -} - -extern int get_maxlvt(void); -extern void clear_local_APIC(void); -extern void connect_bsp_APIC (void); -extern void disconnect_bsp_APIC (void); -extern void disable_local_APIC (void); -extern int verify_local_APIC (void); -extern void cache_APIC_registers (void); -extern void sync_Arb_IDs (void); -extern void init_bsp_APIC (void); -extern void setup_local_APIC (void); -extern void init_apic_mappings (void); -extern void smp_local_timer_interrupt (struct pt_regs * regs); -extern void setup_APIC_clocks (void); -extern void setup_apic_nmi_watchdog (void); -extern inline void nmi_watchdog_tick (struct pt_regs * regs); -extern int APIC_init_uniprocessor (void); -extern void disable_APIC_timer(void); -extern void enable_APIC_timer(void); - -extern struct pm_dev *apic_pm_register(pm_dev_t, unsigned long, pm_callback); -extern void apic_pm_unregister(struct pm_dev*); - -extern unsigned int apic_timer_irqs [NR_CPUS]; -extern int check_nmi_watchdog (void); - -extern unsigned int nmi_watchdog; -#define NMI_NONE 0 -#define NMI_IO_APIC 1 -#define NMI_LOCAL_APIC 2 -#define NMI_INVALID 3 - -#endif /* CONFIG_X86_LOCAL_APIC */ - -#endif /* __ASM_APIC_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apicdef.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apicdef.h deleted file mode 100644 index 227bfca652..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apicdef.h +++ /dev/null @@ -1,378 +0,0 @@ -#ifndef __ASM_APICDEF_H -#define __ASM_APICDEF_H - -/* - * Constants for various Intel APICs. (local APIC, IOAPIC, etc.) - * - * Alan Cox , 1995. - * Ingo Molnar , 1999, 2000 - */ - -#define APIC_DEFAULT_PHYS_BASE 0xfee00000 - -#define APIC_ID 0x20 -#define APIC_ID_MASK (0x0F<<24) -#define GET_APIC_ID(x) (((x)>>24)&0x0F) -#define APIC_LVR 0x30 -#define APIC_LVR_MASK 0xFF00FF -#define GET_APIC_VERSION(x) ((x)&0xFF) -#define GET_APIC_MAXLVT(x) (((x)>>16)&0xFF) -#define APIC_INTEGRATED(x) ((x)&0xF0) -#define APIC_TASKPRI 0x80 -#define APIC_TPRI_MASK 0xFF -#define APIC_ARBPRI 0x90 -#define APIC_ARBPRI_MASK 0xFF -#define APIC_PROCPRI 0xA0 -#define APIC_EOI 0xB0 -#define APIC_EIO_ACK 0x0 /* Write this to the EOI register */ -#define APIC_RRR 0xC0 -#define APIC_LDR 0xD0 -#define APIC_LDR_MASK (0xFF<<24) -#define GET_APIC_LOGICAL_ID(x) (((x)>>24)&0xFF) -#define SET_APIC_LOGICAL_ID(x) (((x)<<24)) -#define APIC_ALL_CPUS 0xFF -#define APIC_DFR 0xE0 -#define APIC_DFR_CLUSTER 0x0FFFFFFFul /* Clustered */ -#define APIC_DFR_FLAT 0xFFFFFFFFul /* Flat mode */ -#define APIC_SPIV 0xF0 -#define APIC_SPIV_FOCUS_DISABLED (1<<9) -#define APIC_SPIV_APIC_ENABLED (1<<8) -#define APIC_ISR 0x100 -#define APIC_TMR 0x180 -#define APIC_IRR 0x200 -#define APIC_ESR 0x280 -#define APIC_ESR_SEND_CS 0x00001 -#define APIC_ESR_RECV_CS 0x00002 -#define APIC_ESR_SEND_ACC 0x00004 -#define APIC_ESR_RECV_ACC 0x00008 -#define APIC_ESR_SENDILL 0x00020 -#define APIC_ESR_RECVILL 0x00040 -#define APIC_ESR_ILLREGA 0x00080 -#define APIC_ICR 0x300 -#define APIC_DEST_SELF 0x40000 -#define APIC_DEST_ALLINC 0x80000 -#define APIC_DEST_ALLBUT 0xC0000 -#define APIC_ICR_RR_MASK 0x30000 -#define APIC_ICR_RR_INVALID 0x00000 -#define APIC_ICR_RR_INPROG 0x10000 -#define APIC_ICR_RR_VALID 0x20000 -#define APIC_INT_LEVELTRIG 0x08000 -#define APIC_INT_ASSERT 0x04000 -#define APIC_ICR_BUSY 0x01000 -#define APIC_DEST_PHYSICAL 0x00000 -#define APIC_DEST_LOGICAL 0x00800 -#define APIC_DM_FIXED 0x00000 -#define APIC_DM_LOWEST 0x00100 -#define APIC_DM_SMI 0x00200 -#define APIC_DM_REMRD 0x00300 -#define APIC_DM_NMI 0x00400 -#define APIC_DM_INIT 0x00500 -#define APIC_DM_STARTUP 0x00600 -#define APIC_DM_EXTINT 0x00700 -#define APIC_VECTOR_MASK 0x000FF -#define APIC_ICR2 0x310 -#define GET_APIC_DEST_FIELD(x) (((x)>>24)&0xFF) -#define SET_APIC_DEST_FIELD(x) ((x)<<24) -#define APIC_LVTT 0x320 -#define APIC_LVTPC 0x340 -#define APIC_LVT0 0x350 -#define APIC_LVT_TIMER_BASE_MASK (0x3<<18) -#define GET_APIC_TIMER_BASE(x) (((x)>>18)&0x3) -#define SET_APIC_TIMER_BASE(x) (((x)<<18)) -#define APIC_TIMER_BASE_CLKIN 0x0 -#define APIC_TIMER_BASE_TMBASE 0x1 -#define APIC_TIMER_BASE_DIV 0x2 -#define APIC_LVT_TIMER_PERIODIC (1<<17) -#define APIC_LVT_MASKED (1<<16) -#define APIC_LVT_LEVEL_TRIGGER (1<<15) -#define APIC_LVT_REMOTE_IRR (1<<14) -#define APIC_INPUT_POLARITY (1<<13) -#define APIC_SEND_PENDING (1<<12) -#define GET_APIC_DELIVERY_MODE(x) (((x)>>8)&0x7) -#define SET_APIC_DELIVERY_MODE(x,y) (((x)&~0x700)|((y)<<8)) -#define APIC_MODE_FIXED 0x0 -#define APIC_MODE_NMI 0x4 -#define APIC_MODE_EXINT 0x7 -#define APIC_LVT1 0x360 -#define APIC_LVTERR 0x370 -#define APIC_TMICT 0x380 -#define APIC_TMCCT 0x390 -#define APIC_TDCR 0x3E0 -#define APIC_TDR_DIV_TMBASE (1<<2) -#define APIC_TDR_DIV_1 0xB -#define APIC_TDR_DIV_2 0x0 -#define APIC_TDR_DIV_4 0x1 -#define APIC_TDR_DIV_8 0x2 -#define APIC_TDR_DIV_16 0x3 -#define APIC_TDR_DIV_32 0x8 -#define APIC_TDR_DIV_64 0x9 -#define APIC_TDR_DIV_128 0xA - -#define APIC_BASE (fix_to_virt(FIX_APIC_BASE)) - -#ifdef CONFIG_X86_CLUSTERED_APIC -#define MAX_IO_APICS 32 -#else -#define MAX_IO_APICS 8 -#endif - - -/* - * The broadcast ID is 0xF for old APICs and 0xFF for xAPICs. SAPICs - * don't broadcast (yet?), but if they did, they might use 0xFFFF. - */ -#define APIC_BROADCAST_ID_XAPIC (0xFF) -#define APIC_BROADCAST_ID_APIC (0x0F) - -/* - * the local APIC register structure, memory mapped. Not terribly well - * tested, but we might eventually use this one in the future - the - * problem why we cannot use it right now is the P5 APIC, it has an - * errata which cannot take 8-bit reads and writes, only 32-bit ones ... - */ -#define u32 unsigned int - -#define lapic ((volatile struct local_apic *)APIC_BASE) - -struct local_apic { - -/*000*/ struct { u32 __reserved[4]; } __reserved_01; - -/*010*/ struct { u32 __reserved[4]; } __reserved_02; - -/*020*/ struct { /* APIC ID Register */ - u32 __reserved_1 : 24, - phys_apic_id : 4, - __reserved_2 : 4; - u32 __reserved[3]; - } id; - -/*030*/ const - struct { /* APIC Version Register */ - u32 version : 8, - __reserved_1 : 8, - max_lvt : 8, - __reserved_2 : 8; - u32 __reserved[3]; - } version; - -/*040*/ struct { u32 __reserved[4]; } __reserved_03; - -/*050*/ struct { u32 __reserved[4]; } __reserved_04; - -/*060*/ struct { u32 __reserved[4]; } __reserved_05; - -/*070*/ struct { u32 __reserved[4]; } __reserved_06; - -/*080*/ struct { /* Task Priority Register */ - u32 priority : 8, - __reserved_1 : 24; - u32 __reserved_2[3]; - } tpr; - -/*090*/ const - struct { /* Arbitration Priority Register */ - u32 priority : 8, - __reserved_1 : 24; - u32 __reserved_2[3]; - } apr; - -/*0A0*/ const - struct { /* Processor Priority Register */ - u32 priority : 8, - __reserved_1 : 24; - u32 __reserved_2[3]; - } ppr; - -/*0B0*/ struct { /* End Of Interrupt Register */ - u32 eoi; - u32 __reserved[3]; - } eoi; - -/*0C0*/ struct { u32 __reserved[4]; } __reserved_07; - -/*0D0*/ struct { /* Logical Destination Register */ - u32 __reserved_1 : 24, - logical_dest : 8; - u32 __reserved_2[3]; - } ldr; - -/*0E0*/ struct { /* Destination Format Register */ - u32 __reserved_1 : 28, - model : 4; - u32 __reserved_2[3]; - } dfr; - -/*0F0*/ struct { /* Spurious Interrupt Vector Register */ - u32 spurious_vector : 8, - apic_enabled : 1, - focus_cpu : 1, - __reserved_2 : 22; - u32 __reserved_3[3]; - } svr; - -/*100*/ struct { /* In Service Register */ -/*170*/ u32 bitfield; - u32 __reserved[3]; - } isr [8]; - -/*180*/ struct { /* Trigger Mode Register */ -/*1F0*/ u32 bitfield; - u32 __reserved[3]; - } tmr [8]; - -/*200*/ struct { /* Interrupt Request Register */ -/*270*/ u32 bitfield; - u32 __reserved[3]; - } irr [8]; - -/*280*/ union { /* Error Status Register */ - struct { - u32 send_cs_error : 1, - receive_cs_error : 1, - send_accept_error : 1, - receive_accept_error : 1, - __reserved_1 : 1, - send_illegal_vector : 1, - receive_illegal_vector : 1, - illegal_register_address : 1, - __reserved_2 : 24; - u32 __reserved_3[3]; - } error_bits; - struct { - u32 errors; - u32 __reserved_3[3]; - } all_errors; - } esr; - -/*290*/ struct { u32 __reserved[4]; } __reserved_08; - -/*2A0*/ struct { u32 __reserved[4]; } __reserved_09; - -/*2B0*/ struct { u32 __reserved[4]; } __reserved_10; - -/*2C0*/ struct { u32 __reserved[4]; } __reserved_11; - -/*2D0*/ struct { u32 __reserved[4]; } __reserved_12; - -/*2E0*/ struct { u32 __reserved[4]; } __reserved_13; - -/*2F0*/ struct { u32 __reserved[4]; } __reserved_14; - -/*300*/ struct { /* Interrupt Command Register 1 */ - u32 vector : 8, - delivery_mode : 3, - destination_mode : 1, - delivery_status : 1, - __reserved_1 : 1, - level : 1, - trigger : 1, - __reserved_2 : 2, - shorthand : 2, - __reserved_3 : 12; - u32 __reserved_4[3]; - } icr1; - -/*310*/ struct { /* Interrupt Command Register 2 */ - union { - u32 __reserved_1 : 24, - phys_dest : 4, - __reserved_2 : 4; - u32 __reserved_3 : 24, - logical_dest : 8; - } dest; - u32 __reserved_4[3]; - } icr2; - -/*320*/ struct { /* LVT - Timer */ - u32 vector : 8, - __reserved_1 : 4, - delivery_status : 1, - __reserved_2 : 3, - mask : 1, - timer_mode : 1, - __reserved_3 : 14; - u32 __reserved_4[3]; - } lvt_timer; - -/*330*/ struct { u32 __reserved[4]; } __reserved_15; - -/*340*/ struct { /* LVT - Performance Counter */ - u32 vector : 8, - delivery_mode : 3, - __reserved_1 : 1, - delivery_status : 1, - __reserved_2 : 3, - mask : 1, - __reserved_3 : 15; - u32 __reserved_4[3]; - } lvt_pc; - -/*350*/ struct { /* LVT - LINT0 */ - u32 vector : 8, - delivery_mode : 3, - __reserved_1 : 1, - delivery_status : 1, - polarity : 1, - remote_irr : 1, - trigger : 1, - mask : 1, - __reserved_2 : 15; - u32 __reserved_3[3]; - } lvt_lint0; - -/*360*/ struct { /* LVT - LINT1 */ - u32 vector : 8, - delivery_mode : 3, - __reserved_1 : 1, - delivery_status : 1, - polarity : 1, - remote_irr : 1, - trigger : 1, - mask : 1, - __reserved_2 : 15; - u32 __reserved_3[3]; - } lvt_lint1; - -/*370*/ struct { /* LVT - Error */ - u32 vector : 8, - __reserved_1 : 4, - delivery_status : 1, - __reserved_2 : 3, - mask : 1, - __reserved_3 : 15; - u32 __reserved_4[3]; - } lvt_error; - -/*380*/ struct { /* Timer Initial Count Register */ - u32 initial_count; - u32 __reserved_2[3]; - } timer_icr; - -/*390*/ const - struct { /* Timer Current Count Register */ - u32 curr_count; - u32 __reserved_2[3]; - } timer_ccr; - -/*3A0*/ struct { u32 __reserved[4]; } __reserved_16; - -/*3B0*/ struct { u32 __reserved[4]; } __reserved_17; - -/*3C0*/ struct { u32 __reserved[4]; } __reserved_18; - -/*3D0*/ struct { u32 __reserved[4]; } __reserved_19; - -/*3E0*/ struct { /* Timer Divide Configuration Register */ - u32 divisor : 4, - __reserved_1 : 28; - u32 __reserved_2[3]; - } timer_dcr; - -/*3F0*/ struct { u32 __reserved[4]; } __reserved_20; - -} __attribute__ ((packed)); - -#undef u32 - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/atomic.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/atomic.h deleted file mode 100644 index b356b37394..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/atomic.h +++ /dev/null @@ -1,204 +0,0 @@ -#ifndef __ARCH_I386_ATOMIC__ -#define __ARCH_I386_ATOMIC__ - -#include - -/* - * Atomic operations that C can't guarantee us. Useful for - * resource counting etc.. - */ - -#ifdef CONFIG_SMP -#define LOCK "lock ; " -#else -#define LOCK "" -#endif - -/* - * Make sure gcc doesn't try to be clever and move things around - * on us. We need to use _exactly_ the address the user gave us, - * not some alias that contains the same information. - */ -typedef struct { volatile int counter; } atomic_t; - -#define ATOMIC_INIT(i) { (i) } - -/** - * atomic_read - read atomic variable - * @v: pointer of type atomic_t - * - * Atomically reads the value of @v. Note that the guaranteed - * useful range of an atomic_t is only 24 bits. - */ -#define atomic_read(v) ((v)->counter) - -/** - * atomic_set - set atomic variable - * @v: pointer of type atomic_t - * @i: required value - * - * Atomically sets the value of @v to @i. Note that the guaranteed - * useful range of an atomic_t is only 24 bits. - */ -#define atomic_set(v,i) (((v)->counter) = (i)) - -/** - * atomic_add - add integer to atomic variable - * @i: integer value to add - * @v: pointer of type atomic_t - * - * Atomically adds @i to @v. Note that the guaranteed useful range - * of an atomic_t is only 24 bits. - */ -static __inline__ void atomic_add(int i, atomic_t *v) -{ - __asm__ __volatile__( - LOCK "addl %1,%0" - :"=m" (v->counter) - :"ir" (i), "m" (v->counter)); -} - -/** - * atomic_sub - subtract the atomic variable - * @i: integer value to subtract - * @v: pointer of type atomic_t - * - * Atomically subtracts @i from @v. Note that the guaranteed - * useful range of an atomic_t is only 24 bits. - */ -static __inline__ void atomic_sub(int i, atomic_t *v) -{ - __asm__ __volatile__( - LOCK "subl %1,%0" - :"=m" (v->counter) - :"ir" (i), "m" (v->counter)); -} - -/** - * atomic_sub_and_test - subtract value from variable and test result - * @i: integer value to subtract - * @v: pointer of type atomic_t - * - * Atomically subtracts @i from @v and returns - * true if the result is zero, or false for all - * other cases. Note that the guaranteed - * useful range of an atomic_t is only 24 bits. - */ -static __inline__ int atomic_sub_and_test(int i, atomic_t *v) -{ - unsigned char c; - - __asm__ __volatile__( - LOCK "subl %2,%0; sete %1" - :"=m" (v->counter), "=qm" (c) - :"ir" (i), "m" (v->counter) : "memory"); - return c; -} - -/** - * atomic_inc - increment atomic variable - * @v: pointer of type atomic_t - * - * Atomically increments @v by 1. Note that the guaranteed - * useful range of an atomic_t is only 24 bits. - */ -static __inline__ void atomic_inc(atomic_t *v) -{ - __asm__ __volatile__( - LOCK "incl %0" - :"=m" (v->counter) - :"m" (v->counter)); -} - -/** - * atomic_dec - decrement atomic variable - * @v: pointer of type atomic_t - * - * Atomically decrements @v by 1. Note that the guaranteed - * useful range of an atomic_t is only 24 bits. - */ -static __inline__ void atomic_dec(atomic_t *v) -{ - __asm__ __volatile__( - LOCK "decl %0" - :"=m" (v->counter) - :"m" (v->counter)); -} - -/** - * atomic_dec_and_test - decrement and test - * @v: pointer of type atomic_t - * - * Atomically decrements @v by 1 and - * returns true if the result is 0, or false for all other - * cases. Note that the guaranteed - * useful range of an atomic_t is only 24 bits. - */ -static __inline__ int atomic_dec_and_test(atomic_t *v) -{ - unsigned char c; - - __asm__ __volatile__( - LOCK "decl %0; sete %1" - :"=m" (v->counter), "=qm" (c) - :"m" (v->counter) : "memory"); - return c != 0; -} - -/** - * atomic_inc_and_test - increment and test - * @v: pointer of type atomic_t - * - * Atomically increments @v by 1 - * and returns true if the result is zero, or false for all - * other cases. Note that the guaranteed - * useful range of an atomic_t is only 24 bits. - */ -static __inline__ int atomic_inc_and_test(atomic_t *v) -{ - unsigned char c; - - __asm__ __volatile__( - LOCK "incl %0; sete %1" - :"=m" (v->counter), "=qm" (c) - :"m" (v->counter) : "memory"); - return c != 0; -} - -/** - * atomic_add_negative - add and test if negative - * @v: pointer of type atomic_t - * @i: integer value to add - * - * Atomically adds @i to @v and returns true - * if the result is negative, or false when - * result is greater than or equal to zero. Note that the guaranteed - * useful range of an atomic_t is only 24 bits. - */ -static __inline__ int atomic_add_negative(int i, atomic_t *v) -{ - unsigned char c; - - __asm__ __volatile__( - LOCK "addl %2,%0; sets %1" - :"=m" (v->counter), "=qm" (c) - :"ir" (i), "m" (v->counter) : "memory"); - return c; -} - -/* These are x86-specific, used by some header files */ -#define atomic_clear_mask(mask, addr) \ -__asm__ __volatile__(LOCK "andl %0,%1" \ -: : "r" (~(mask)),"m" (*addr) : "memory") - -#define atomic_set_mask(mask, addr) \ -__asm__ __volatile__(LOCK "orl %0,%1" \ -: : "r" (mask),"m" (*addr) : "memory") - -/* Atomic operations are already serializing on x86 */ -#define smp_mb__before_atomic_dec() barrier() -#define smp_mb__after_atomic_dec() barrier() -#define smp_mb__before_atomic_inc() barrier() -#define smp_mb__after_atomic_inc() barrier() - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/bitops.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/bitops.h deleted file mode 100644 index 6d03e64bf1..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/bitops.h +++ /dev/null @@ -1,384 +0,0 @@ -#ifndef _I386_BITOPS_H -#define _I386_BITOPS_H - -/* - * Copyright 1992, Linus Torvalds. - */ - -#include - -/* - * These have to be done with inline assembly: that way the bit-setting - * is guaranteed to be atomic. All bit operations return 0 if the bit - * was cleared before the operation and != 0 if it was not. - * - * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1). - */ - -#ifdef CONFIG_SMP -#define LOCK_PREFIX "lock ; " -#else -#define LOCK_PREFIX "" -#endif - -#define ADDR (*(volatile long *) addr) - -/** - * set_bit - Atomically set a bit in memory - * @nr: the bit to set - * @addr: the address to start counting from - * - * This function is atomic and may not be reordered. See __set_bit() - * if you do not require the atomic guarantees. - * Note that @nr may be almost arbitrarily large; this function is not - * restricted to acting on a single-word quantity. - */ -static __inline__ void set_bit(int nr, volatile void * addr) -{ - __asm__ __volatile__( LOCK_PREFIX - "btsl %1,%0" - :"=m" (ADDR) - :"Ir" (nr)); -} - -/** - * __set_bit - Set a bit in memory - * @nr: the bit to set - * @addr: the address to start counting from - * - * Unlike set_bit(), this function is non-atomic and may be reordered. - * If it's called on the same region of memory simultaneously, the effect - * may be that only one operation succeeds. - */ -static __inline__ void __set_bit(int nr, volatile void * addr) -{ - __asm__( - "btsl %1,%0" - :"=m" (ADDR) - :"Ir" (nr)); -} - -/** - * clear_bit - Clears a bit in memory - * @nr: Bit to clear - * @addr: Address to start counting from - * - * clear_bit() is atomic and may not be reordered. However, it does - * not contain a memory barrier, so if it is used for locking purposes, - * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit() - * in order to ensure changes are visible on other processors. - */ -static __inline__ void clear_bit(int nr, volatile void * addr) -{ - __asm__ __volatile__( LOCK_PREFIX - "btrl %1,%0" - :"=m" (ADDR) - :"Ir" (nr)); -} -#define smp_mb__before_clear_bit() barrier() -#define smp_mb__after_clear_bit() barrier() - -/** - * __change_bit - Toggle a bit in memory - * @nr: the bit to set - * @addr: the address to start counting from - * - * Unlike change_bit(), this function is non-atomic and may be reordered. - * If it's called on the same region of memory simultaneously, the effect - * may be that only one operation succeeds. - */ -static __inline__ void __change_bit(int nr, volatile void * addr) -{ - __asm__ __volatile__( - "btcl %1,%0" - :"=m" (ADDR) - :"Ir" (nr)); -} - -/** - * change_bit - Toggle a bit in memory - * @nr: Bit to clear - * @addr: Address to start counting from - * - * change_bit() is atomic and may not be reordered. - * Note that @nr may be almost arbitrarily large; this function is not - * restricted to acting on a single-word quantity. - */ -static __inline__ void change_bit(int nr, volatile void * addr) -{ - __asm__ __volatile__( LOCK_PREFIX - "btcl %1,%0" - :"=m" (ADDR) - :"Ir" (nr)); -} - -/** - * test_and_set_bit - Set a bit and return its old value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is atomic and cannot be reordered. - * It also implies a memory barrier. - */ -static __inline__ int test_and_set_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( LOCK_PREFIX - "btsl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr) : "memory"); - return oldbit; -} - -/** - * __test_and_set_bit - Set a bit and return its old value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is non-atomic and can be reordered. - * If two examples of this operation race, one can appear to succeed - * but actually fail. You must protect multiple accesses with a lock. - */ -static __inline__ int __test_and_set_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__( - "btsl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr)); - return oldbit; -} - -/** - * test_and_clear_bit - Clear a bit and return its old value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is atomic and cannot be reordered. - * It also implies a memory barrier. - */ -static __inline__ int test_and_clear_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( LOCK_PREFIX - "btrl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr) : "memory"); - return oldbit; -} - -/** - * __test_and_clear_bit - Clear a bit and return its old value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is non-atomic and can be reordered. - * If two examples of this operation race, one can appear to succeed - * but actually fail. You must protect multiple accesses with a lock. - */ -static __inline__ int __test_and_clear_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__( - "btrl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr)); - return oldbit; -} - -/* WARNING: non atomic and it can be reordered! */ -static __inline__ int __test_and_change_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( - "btcl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr) : "memory"); - return oldbit; -} - -/** - * test_and_change_bit - Change a bit and return its new value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is atomic and cannot be reordered. - * It also implies a memory barrier. - */ -static __inline__ int test_and_change_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( LOCK_PREFIX - "btcl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"Ir" (nr) : "memory"); - return oldbit; -} - -#if 0 /* Fool kernel-doc since it doesn't do macros yet */ -/** - * test_bit - Determine whether a bit is set - * @nr: bit number to test - * @addr: Address to start counting from - */ -static int test_bit(int nr, const volatile void * addr); -#endif - -static __inline__ int constant_test_bit(int nr, const volatile void * addr) -{ - return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; -} - -static __inline__ int variable_test_bit(int nr, volatile void * addr) -{ - int oldbit; - - __asm__ __volatile__( - "btl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit) - :"m" (ADDR),"Ir" (nr)); - return oldbit; -} - -#define test_bit(nr,addr) \ -(__builtin_constant_p(nr) ? \ - constant_test_bit((nr),(addr)) : \ - variable_test_bit((nr),(addr))) - -/** - * find_first_zero_bit - find the first zero bit in a memory region - * @addr: The address to start the search at - * @size: The maximum size to search - * - * Returns the bit-number of the first zero bit, not the number of the byte - * containing a bit. - */ -static __inline__ int find_first_zero_bit(void * addr, unsigned size) -{ - int d0, d1, d2; - int res; - - if (!size) - return 0; - /* This looks at memory. Mark it volatile to tell gcc not to move it around */ - __asm__ __volatile__( - "movl $-1,%%eax\n\t" - "xorl %%edx,%%edx\n\t" - "repe; scasl\n\t" - "je 1f\n\t" - "xorl -4(%%edi),%%eax\n\t" - "subl $4,%%edi\n\t" - "bsfl %%eax,%%edx\n" - "1:\tsubl %%ebx,%%edi\n\t" - "shll $3,%%edi\n\t" - "addl %%edi,%%edx" - :"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2) - :"1" ((size + 31) >> 5), "2" (addr), "b" (addr)); - return res; -} - -/** - * find_next_zero_bit - find the first zero bit in a memory region - * @addr: The address to base the search on - * @offset: The bitnumber to start searching at - * @size: The maximum size to search - */ -static __inline__ int find_next_zero_bit (void * addr, int size, int offset) -{ - unsigned long * p = ((unsigned long *) addr) + (offset >> 5); - int set = 0, bit = offset & 31, res; - - if (bit) { - /* - * Look for zero in first byte - */ - __asm__("bsfl %1,%0\n\t" - "jne 1f\n\t" - "movl $32, %0\n" - "1:" - : "=r" (set) - : "r" (~(*p >> bit))); - if (set < (32 - bit)) - return set + offset; - set = 32 - bit; - p++; - } - /* - * No zero yet, search remaining full bytes for a zero - */ - res = find_first_zero_bit (p, size - 32 * (p - (unsigned long *) addr)); - return (offset + set + res); -} - -/** - * ffz - find first zero in word. - * @word: The word to search - * - * Undefined if no zero exists, so code should check against ~0UL first. - */ -static __inline__ unsigned long ffz(unsigned long word) -{ - __asm__("bsfl %1,%0" - :"=r" (word) - :"r" (~word)); - return word; -} - -#ifdef __KERNEL__ - -/** - * ffs - find first bit set - * @x: the word to search - * - * This is defined the same way as - * the libc and compiler builtin ffs routines, therefore - * differs in spirit from the above ffz (man ffs). - */ -static __inline__ int ffs(int x) -{ - int r; - - __asm__("bsfl %1,%0\n\t" - "jnz 1f\n\t" - "movl $-1,%0\n" - "1:" : "=r" (r) : "rm" (x)); - return r+1; -} - -/** - * hweightN - returns the hamming weight of a N-bit word - * @x: the word to weigh - * - * The Hamming Weight of a number is the total number of bits set in it. - */ - -#define hweight32(x) generic_hweight32(x) -#define hweight16(x) generic_hweight16(x) -#define hweight8(x) generic_hweight8(x) - -#endif /* __KERNEL__ */ - -#ifdef __KERNEL__ - -#define ext2_set_bit __test_and_set_bit -#define ext2_clear_bit __test_and_clear_bit -#define ext2_test_bit test_bit -#define ext2_find_first_zero_bit find_first_zero_bit -#define ext2_find_next_zero_bit find_next_zero_bit - -/* Bitmap functions for the minix filesystem. */ -#define minix_test_and_set_bit(nr,addr) __test_and_set_bit(nr,addr) -#define minix_set_bit(nr,addr) __set_bit(nr,addr) -#define minix_test_and_clear_bit(nr,addr) __test_and_clear_bit(nr,addr) -#define minix_test_bit(nr,addr) test_bit(nr,addr) -#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size) - -#endif /* __KERNEL__ */ - -#endif /* _I386_BITOPS_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/boot.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/boot.h deleted file mode 100644 index 96b228e6e7..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/boot.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _LINUX_BOOT_H -#define _LINUX_BOOT_H - -/* Don't touch these, unless you really know what you're doing. */ -#define DEF_INITSEG 0x9000 -#define DEF_SYSSEG 0x1000 -#define DEF_SETUPSEG 0x9020 -#define DEF_SYSSIZE 0x7F00 - -/* Internal svga startup constants */ -#define NORMAL_VGA 0xffff /* 80x25 mode */ -#define EXTENDED_VGA 0xfffe /* 80x50 mode */ -#define ASK_VGA 0xfffd /* ask for it at bootup */ - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/byteorder.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/byteorder.h deleted file mode 100644 index bbfb629fae..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/byteorder.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef _I386_BYTEORDER_H -#define _I386_BYTEORDER_H - -#include - -#ifdef __GNUC__ - -/* For avoiding bswap on i386 */ -#ifdef __KERNEL__ -#include -#endif - -static __inline__ __const__ __u32 ___arch__swab32(__u32 x) -{ -#ifdef CONFIG_X86_BSWAP - __asm__("bswap %0" : "=r" (x) : "0" (x)); -#else - __asm__("xchgb %b0,%h0\n\t" /* swap lower bytes */ - "rorl $16,%0\n\t" /* swap words */ - "xchgb %b0,%h0" /* swap higher bytes */ - :"=q" (x) - : "0" (x)); -#endif - return x; -} - -static __inline__ __const__ __u16 ___arch__swab16(__u16 x) -{ - __asm__("xchgb %b0,%h0" /* swap bytes */ \ - : "=q" (x) \ - : "0" (x)); \ - return x; -} - -#define __arch__swab32(x) ___arch__swab32(x) -#define __arch__swab16(x) ___arch__swab16(x) - -#if !defined(__STRICT_ANSI__) || defined(__KERNEL__) -# define __BYTEORDER_HAS_U64__ -# define __SWAB_64_THRU_32__ -#endif - -#endif /* __GNUC__ */ - -#include - -#endif /* _I386_BYTEORDER_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cache.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cache.h deleted file mode 100644 index 615911e5bd..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cache.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * include/asm-i386/cache.h - */ -#ifndef __ARCH_I386_CACHE_H -#define __ARCH_I386_CACHE_H - -#include - -/* L1 cache line size */ -#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) -#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/checksum.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/checksum.h deleted file mode 100644 index 6b9761aa8f..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/checksum.h +++ /dev/null @@ -1,195 +0,0 @@ -#ifndef _I386_CHECKSUM_H -#define _I386_CHECKSUM_H - - -/* - * computes the checksum of a memory block at buff, length len, - * and adds in "sum" (32-bit) - * - * returns a 32-bit number suitable for feeding into itself - * or csum_tcpudp_magic - * - * this function must be called with even lengths, except - * for the last fragment, which may be odd - * - * it's best to have buff aligned on a 32-bit boundary - */ -asmlinkage unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum); - -/* - * the same as csum_partial, but copies from src while it - * checksums, and handles user-space pointer exceptions correctly, when needed. - * - * here even more important to align src and dst on a 32-bit (or even - * better 64-bit) boundary - */ - -asmlinkage unsigned int csum_partial_copy_generic( const char *src, char *dst, int len, int sum, - int *src_err_ptr, int *dst_err_ptr); - -/* - * Note: when you get a NULL pointer exception here this means someone - * passed in an incorrect kernel address to one of these functions. - * - * If you use these functions directly please don't forget the - * verify_area(). - */ -static __inline__ -unsigned int csum_partial_copy_nocheck ( const char *src, char *dst, - int len, int sum) -{ - return csum_partial_copy_generic ( src, dst, len, sum, NULL, NULL); -} - -static __inline__ -unsigned int csum_partial_copy_from_user ( const char *src, char *dst, - int len, int sum, int *err_ptr) -{ - return csum_partial_copy_generic ( src, dst, len, sum, err_ptr, NULL); -} - -/* - * These are the old (and unsafe) way of doing checksums, a warning message will be - * printed if they are used and an exeption occurs. - * - * these functions should go away after some time. - */ - -#define csum_partial_copy_fromuser csum_partial_copy -unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum); - -/* - * This is a version of ip_compute_csum() optimized for IP headers, - * which always checksum on 4 octet boundaries. - * - * By Jorge Cwik , adapted for linux by - * Arnt Gulbrandsen. - */ -static inline unsigned short ip_fast_csum(unsigned char * iph, - unsigned int ihl) -{ - unsigned int sum; - - __asm__ __volatile__( - "movl (%1), %0 ;\n" - "subl $4, %2 ;\n" - "jbe 2f ;\n" - "addl 4(%1), %0 ;\n" - "adcl 8(%1), %0 ;\n" - "adcl 12(%1), %0 ;\n" -"1: adcl 16(%1), %0 ;\n" - "lea 4(%1), %1 ;\n" - "decl %2 ;\n" - "jne 1b ;\n" - "adcl $0, %0 ;\n" - "movl %0, %2 ;\n" - "shrl $16, %0 ;\n" - "addw %w2, %w0 ;\n" - "adcl $0, %0 ;\n" - "notl %0 ;\n" -"2: ;\n" - /* Since the input registers which are loaded with iph and ipl - are modified, we must also specify them as outputs, or gcc - will assume they contain their original values. */ - : "=r" (sum), "=r" (iph), "=r" (ihl) - : "1" (iph), "2" (ihl)); - return(sum); -} - -/* - * Fold a partial checksum - */ - -static inline unsigned int csum_fold(unsigned int sum) -{ - __asm__( - "addl %1, %0 ;\n" - "adcl $0xffff, %0 ;\n" - : "=r" (sum) - : "r" (sum << 16), "0" (sum & 0xffff0000) - ); - return (~sum) >> 16; -} - -static inline unsigned long csum_tcpudp_nofold(unsigned long saddr, - unsigned long daddr, - unsigned short len, - unsigned short proto, - unsigned int sum) -{ - __asm__( - "addl %1, %0 ;\n" - "adcl %2, %0 ;\n" - "adcl %3, %0 ;\n" - "adcl $0, %0 ;\n" - : "=r" (sum) - : "g" (daddr), "g"(saddr), "g"((ntohs(len)<<16)+proto*256), "0"(sum)); - return sum; -} - -/* - * computes the checksum of the TCP/UDP pseudo-header - * returns a 16-bit checksum, already complemented - */ -static inline unsigned short int csum_tcpudp_magic(unsigned long saddr, - unsigned long daddr, - unsigned short len, - unsigned short proto, - unsigned int sum) -{ - return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); -} - -/* - * this routine is used for miscellaneous IP-like checksums, mainly - * in icmp.c - */ - -static inline unsigned short ip_compute_csum(unsigned char * buff, int len) -{ - return csum_fold (csum_partial(buff, len, 0)); -} - -#define _HAVE_ARCH_IPV6_CSUM -static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr, - struct in6_addr *daddr, - __u32 len, - unsigned short proto, - unsigned int sum) -{ - __asm__( - "addl 0(%1), %0 ;\n" - "adcl 4(%1), %0 ;\n" - "adcl 8(%1), %0 ;\n" - "adcl 12(%1), %0 ;\n" - "adcl 0(%2), %0 ;\n" - "adcl 4(%2), %0 ;\n" - "adcl 8(%2), %0 ;\n" - "adcl 12(%2), %0 ;\n" - "adcl %3, %0 ;\n" - "adcl %4, %0 ;\n" - "adcl $0, %0 ;\n" - : "=&r" (sum) - : "r" (saddr), "r" (daddr), - "r"(htonl(len)), "r"(htonl(proto)), "0"(sum)); - - return csum_fold(sum); -} - -/* - * Copy and checksum to user - */ -#define HAVE_CSUM_COPY_USER -static __inline__ unsigned int csum_and_copy_to_user(const char *src, char *dst, - int len, int sum, int *err_ptr) -{ - if (access_ok(VERIFY_WRITE, dst, len)) - return csum_partial_copy_generic(src, dst, len, sum, NULL, err_ptr); - - if (len) - *err_ptr = -EFAULT; - - return -1; /* invalid checksum */ -} - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cpufeature.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cpufeature.h deleted file mode 100644 index 440c6ae3c0..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cpufeature.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * cpufeature.h - * - * Defines x86 CPU feature bits - */ - -#ifndef __ASM_I386_CPUFEATURE_H -#define __ASM_I386_CPUFEATURE_H - -/* Sample usage: CPU_FEATURE_P(cpu.x86_capability, FPU) */ -#define CPU_FEATURE_P(CAP, FEATURE) test_bit(CAP, X86_FEATURE_##FEATURE ##_BIT) - -#define NCAPINTS 4 /* Currently we have 4 32-bit words worth of info */ - -/* Intel-defined CPU features, CPUID level 0x00000001, word 0 */ -#define X86_FEATURE_FPU (0*32+ 0) /* Onboard FPU */ -#define X86_FEATURE_VME (0*32+ 1) /* Virtual Mode Extensions */ -#define X86_FEATURE_DE (0*32+ 2) /* Debugging Extensions */ -#define X86_FEATURE_PSE (0*32+ 3) /* Page Size Extensions */ -#define X86_FEATURE_TSC (0*32+ 4) /* Time Stamp Counter */ -#define X86_FEATURE_MSR (0*32+ 5) /* Model-Specific Registers, RDMSR, WRMSR */ -#define X86_FEATURE_PAE (0*32+ 6) /* Physical Address Extensions */ -#define X86_FEATURE_MCE (0*32+ 7) /* Machine Check Architecture */ -#define X86_FEATURE_CX8 (0*32+ 8) /* CMPXCHG8 instruction */ -#define X86_FEATURE_APIC (0*32+ 9) /* Onboard APIC */ -#define X86_FEATURE_SEP (0*32+11) /* SYSENTER/SYSEXIT */ -#define X86_FEATURE_MTRR (0*32+12) /* Memory Type Range Registers */ -#define X86_FEATURE_PGE (0*32+13) /* Page Global Enable */ -#define X86_FEATURE_MCA (0*32+14) /* Machine Check Architecture */ -#define X86_FEATURE_CMOV (0*32+15) /* CMOV instruction (FCMOVCC and FCOMI too if FPU present) */ -#define X86_FEATURE_PAT (0*32+16) /* Page Attribute Table */ -#define X86_FEATURE_PSE36 (0*32+17) /* 36-bit PSEs */ -#define X86_FEATURE_PN (0*32+18) /* Processor serial number */ -#define X86_FEATURE_CLFLSH (0*32+19) /* Supports the CLFLUSH instruction */ -#define X86_FEATURE_DTES (0*32+21) /* Debug Trace Store */ -#define X86_FEATURE_ACPI (0*32+22) /* ACPI via MSR */ -#define X86_FEATURE_MMX (0*32+23) /* Multimedia Extensions */ -#define X86_FEATURE_FXSR (0*32+24) /* FXSAVE and FXRSTOR instructions (fast save and restore */ - /* of FPU context), and CR4.OSFXSR available */ -#define X86_FEATURE_XMM (0*32+25) /* Streaming SIMD Extensions */ -#define X86_FEATURE_XMM2 (0*32+26) /* Streaming SIMD Extensions-2 */ -#define X86_FEATURE_SELFSNOOP (0*32+27) /* CPU self snoop */ -#define X86_FEATURE_HT (0*32+28) /* Hyper-Threading */ -#define X86_FEATURE_ACC (0*32+29) /* Automatic clock control */ -#define X86_FEATURE_IA64 (0*32+30) /* IA-64 processor */ - -/* AMD-defined CPU features, CPUID level 0x80000001, word 1 */ -/* Don't duplicate feature flags which are redundant with Intel! */ -#define X86_FEATURE_SYSCALL (1*32+11) /* SYSCALL/SYSRET */ -#define X86_FEATURE_MMXEXT (1*32+22) /* AMD MMX extensions */ -#define X86_FEATURE_LM (1*32+29) /* Long Mode (x86-64) */ -#define X86_FEATURE_3DNOWEXT (1*32+30) /* AMD 3DNow! extensions */ -#define X86_FEATURE_3DNOW (1*32+31) /* 3DNow! */ - -/* Transmeta-defined CPU features, CPUID level 0x80860001, word 2 */ -#define X86_FEATURE_RECOVERY (2*32+ 0) /* CPU in recovery mode */ -#define X86_FEATURE_LONGRUN (2*32+ 1) /* Longrun power control */ -#define X86_FEATURE_LRTI (2*32+ 3) /* LongRun table interface */ - -/* Other features, Linux-defined mapping, word 3 */ -/* This range is used for feature bits which conflict or are synthesized */ -#define X86_FEATURE_CXMMX (3*32+ 0) /* Cyrix MMX extensions */ -#define X86_FEATURE_K6_MTRR (3*32+ 1) /* AMD K6 nonstandard MTRRs */ -#define X86_FEATURE_CYRIX_ARR (3*32+ 2) /* Cyrix ARRs (= MTRRs) */ -#define X86_FEATURE_CENTAUR_MCR (3*32+ 3) /* Centaur MCRs (= MTRRs) */ - -#define cpu_has(c, bit) test_bit(bit, (c)->x86_capability) - -#endif /* __ASM_I386_CPUFEATURE_H */ - -/* - * Local Variables: - * mode:c - * comment-column:42 - * End: - */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/current.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/current.h deleted file mode 100644 index bc1496a2c9..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/current.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _I386_CURRENT_H -#define _I386_CURRENT_H - -struct task_struct; - -static inline struct task_struct * get_current(void) -{ - struct task_struct *current; - __asm__("andl %%esp,%0; ":"=r" (current) : "0" (~8191UL)); - return current; - } - -#define current get_current() - -#endif /* !(_I386_CURRENT_H) */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/debugreg.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/debugreg.h deleted file mode 100644 index f0b2b06ae0..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/debugreg.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef _I386_DEBUGREG_H -#define _I386_DEBUGREG_H - - -/* Indicate the register numbers for a number of the specific - debug registers. Registers 0-3 contain the addresses we wish to trap on */ -#define DR_FIRSTADDR 0 /* u_debugreg[DR_FIRSTADDR] */ -#define DR_LASTADDR 3 /* u_debugreg[DR_LASTADDR] */ - -#define DR_STATUS 6 /* u_debugreg[DR_STATUS] */ -#define DR_CONTROL 7 /* u_debugreg[DR_CONTROL] */ - -/* Define a few things for the status register. We can use this to determine - which debugging register was responsible for the trap. The other bits - are either reserved or not of interest to us. */ - -#define DR_TRAP0 (0x1) /* db0 */ -#define DR_TRAP1 (0x2) /* db1 */ -#define DR_TRAP2 (0x4) /* db2 */ -#define DR_TRAP3 (0x8) /* db3 */ - -#define DR_STEP (0x4000) /* single-step */ -#define DR_SWITCH (0x8000) /* task switch */ - -/* Now define a bunch of things for manipulating the control register. - The top two bytes of the control register consist of 4 fields of 4 - bits - each field corresponds to one of the four debug registers, - and indicates what types of access we trap on, and how large the data - field is that we are looking at */ - -#define DR_CONTROL_SHIFT 16 /* Skip this many bits in ctl register */ -#define DR_CONTROL_SIZE 4 /* 4 control bits per register */ - -#define DR_RW_EXECUTE (0x0) /* Settings for the access types to trap on */ -#define DR_RW_WRITE (0x1) -#define DR_RW_READ (0x3) - -#define DR_LEN_1 (0x0) /* Settings for data length to trap on */ -#define DR_LEN_2 (0x4) -#define DR_LEN_4 (0xC) - -/* The low byte to the control register determine which registers are - enabled. There are 4 fields of two bits. One bit is "local", meaning - that the processor will reset the bit after a task switch and the other - is global meaning that we have to explicitly reset the bit. With linux, - you can use either one, since we explicitly zero the register when we enter - kernel mode. */ - -#define DR_LOCAL_ENABLE_SHIFT 0 /* Extra shift to the local enable bit */ -#define DR_GLOBAL_ENABLE_SHIFT 1 /* Extra shift to the global enable bit */ -#define DR_ENABLE_SIZE 2 /* 2 enable bits per register */ - -#define DR_LOCAL_ENABLE_MASK (0x55) /* Set local bits for all 4 regs */ -#define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */ - -/* The second byte to the control register has a few special things. - We can slow the instruction pipeline for instructions coming via the - gdt or the ldt if we want to. I am not sure why this is an advantage */ - -#define DR_CONTROL_RESERVED (0xFC00) /* Reserved by Intel */ -#define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */ -#define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */ - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/delay.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/delay.h deleted file mode 100644 index c7d2184929..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/delay.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _I386_DELAY_H -#define _I386_DELAY_H - -/* - * Copyright (C) 1993 Linus Torvalds - * - * Delay routines calling functions in arch/i386/lib/delay.c - */ - -extern void __bad_udelay(void); - -extern void __udelay(unsigned long usecs); -extern void __const_udelay(unsigned long usecs); -extern void __delay(unsigned long loops); - -#define udelay(n) (__builtin_constant_p(n) ? \ - ((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \ - __udelay(n)) - -#endif /* defined(_I386_DELAY_H) */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h deleted file mode 100644 index ef915df700..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __I386_DIV64 -#define __I386_DIV64 - -#define do_div(n,base) ({ \ - unsigned long __upper, __low, __high, __mod; \ - asm("":"=a" (__low), "=d" (__high):"A" (n)); \ - __upper = __high; \ - if (__high) { \ - __upper = __high % (base); \ - __high = __high / (base); \ - } \ - asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (base), "0" (__low), "1" (__upper)); \ - asm("":"=A" (n):"a" (__low),"d" (__high)); \ - __mod; \ -}) - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/dma.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/dma.h deleted file mode 100644 index 1bc9899b20..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/dma.h +++ /dev/null @@ -1,298 +0,0 @@ -/* $Id: dma.h,v 1.7 1992/12/14 00:29:34 root Exp root $ - * linux/include/asm/dma.h: Defines for using and allocating dma channels. - * Written by Hennus Bergman, 1992. - * High DMA channel support & info by Hannu Savolainen - * and John Boyd, Nov. 1992. - */ - -#ifndef _ASM_DMA_H -#define _ASM_DMA_H - -#include -#include /* And spinlocks */ -#include /* need byte IO */ -#include - - -#ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER -#define dma_outb outb_p -#else -#define dma_outb outb -#endif - -#define dma_inb inb - -/* - * NOTES about DMA transfers: - * - * controller 1: channels 0-3, byte operations, ports 00-1F - * controller 2: channels 4-7, word operations, ports C0-DF - * - * - ALL registers are 8 bits only, regardless of transfer size - * - channel 4 is not used - cascades 1 into 2. - * - channels 0-3 are byte - addresses/counts are for physical bytes - * - channels 5-7 are word - addresses/counts are for physical words - * - transfers must not cross physical 64K (0-3) or 128K (5-7) boundaries - * - transfer count loaded to registers is 1 less than actual count - * - controller 2 offsets are all even (2x offsets for controller 1) - * - page registers for 5-7 don't use data bit 0, represent 128K pages - * - page registers for 0-3 use bit 0, represent 64K pages - * - * DMA transfers are limited to the lower 16MB of _physical_ memory. - * Note that addresses loaded into registers must be _physical_ addresses, - * not logical addresses (which may differ if paging is active). - * - * Address mapping for channels 0-3: - * - * A23 ... A16 A15 ... A8 A7 ... A0 (Physical addresses) - * | ... | | ... | | ... | - * | ... | | ... | | ... | - * | ... | | ... | | ... | - * P7 ... P0 A7 ... A0 A7 ... A0 - * | Page | Addr MSB | Addr LSB | (DMA registers) - * - * Address mapping for channels 5-7: - * - * A23 ... A17 A16 A15 ... A9 A8 A7 ... A1 A0 (Physical addresses) - * | ... | \ \ ... \ \ \ ... \ \ - * | ... | \ \ ... \ \ \ ... \ (not used) - * | ... | \ \ ... \ \ \ ... \ - * P7 ... P1 (0) A7 A6 ... A0 A7 A6 ... A0 - * | Page | Addr MSB | Addr LSB | (DMA registers) - * - * Again, channels 5-7 transfer _physical_ words (16 bits), so addresses - * and counts _must_ be word-aligned (the lowest address bit is _ignored_ at - * the hardware level, so odd-byte transfers aren't possible). - * - * Transfer count (_not # bytes_) is limited to 64K, represented as actual - * count - 1 : 64K => 0xFFFF, 1 => 0x0000. Thus, count is always 1 or more, - * and up to 128K bytes may be transferred on channels 5-7 in one operation. - * - */ - -#define MAX_DMA_CHANNELS 8 - -/* The maximum address that we can perform a DMA transfer to on this platform */ -#define MAX_DMA_ADDRESS (PAGE_OFFSET+0x1000000) - -/* 8237 DMA controllers */ -#define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */ -#define IO_DMA2_BASE 0xC0 /* 16 bit master DMA, ch 4(=slave input)..7 */ - -/* DMA controller registers */ -#define DMA1_CMD_REG 0x08 /* command register (w) */ -#define DMA1_STAT_REG 0x08 /* status register (r) */ -#define DMA1_REQ_REG 0x09 /* request register (w) */ -#define DMA1_MASK_REG 0x0A /* single-channel mask (w) */ -#define DMA1_MODE_REG 0x0B /* mode register (w) */ -#define DMA1_CLEAR_FF_REG 0x0C /* clear pointer flip-flop (w) */ -#define DMA1_TEMP_REG 0x0D /* Temporary Register (r) */ -#define DMA1_RESET_REG 0x0D /* Master Clear (w) */ -#define DMA1_CLR_MASK_REG 0x0E /* Clear Mask */ -#define DMA1_MASK_ALL_REG 0x0F /* all-channels mask (w) */ - -#define DMA2_CMD_REG 0xD0 /* command register (w) */ -#define DMA2_STAT_REG 0xD0 /* status register (r) */ -#define DMA2_REQ_REG 0xD2 /* request register (w) */ -#define DMA2_MASK_REG 0xD4 /* single-channel mask (w) */ -#define DMA2_MODE_REG 0xD6 /* mode register (w) */ -#define DMA2_CLEAR_FF_REG 0xD8 /* clear pointer flip-flop (w) */ -#define DMA2_TEMP_REG 0xDA /* Temporary Register (r) */ -#define DMA2_RESET_REG 0xDA /* Master Clear (w) */ -#define DMA2_CLR_MASK_REG 0xDC /* Clear Mask */ -#define DMA2_MASK_ALL_REG 0xDE /* all-channels mask (w) */ - -#define DMA_ADDR_0 0x00 /* DMA address registers */ -#define DMA_ADDR_1 0x02 -#define DMA_ADDR_2 0x04 -#define DMA_ADDR_3 0x06 -#define DMA_ADDR_4 0xC0 -#define DMA_ADDR_5 0xC4 -#define DMA_ADDR_6 0xC8 -#define DMA_ADDR_7 0xCC - -#define DMA_CNT_0 0x01 /* DMA count registers */ -#define DMA_CNT_1 0x03 -#define DMA_CNT_2 0x05 -#define DMA_CNT_3 0x07 -#define DMA_CNT_4 0xC2 -#define DMA_CNT_5 0xC6 -#define DMA_CNT_6 0xCA -#define DMA_CNT_7 0xCE - -#define DMA_PAGE_0 0x87 /* DMA page registers */ -#define DMA_PAGE_1 0x83 -#define DMA_PAGE_2 0x81 -#define DMA_PAGE_3 0x82 -#define DMA_PAGE_5 0x8B -#define DMA_PAGE_6 0x89 -#define DMA_PAGE_7 0x8A - -#define DMA_MODE_READ 0x44 /* I/O to memory, no autoinit, increment, single mode */ -#define DMA_MODE_WRITE 0x48 /* memory to I/O, no autoinit, increment, single mode */ -#define DMA_MODE_CASCADE 0xC0 /* pass thru DREQ->HRQ, DACK<-HLDA only */ - -#define DMA_AUTOINIT 0x10 - - -extern spinlock_t dma_spin_lock; - -static __inline__ unsigned long claim_dma_lock(void) -{ - unsigned long flags; - spin_lock_irqsave(&dma_spin_lock, flags); - return flags; -} - -static __inline__ void release_dma_lock(unsigned long flags) -{ - spin_unlock_irqrestore(&dma_spin_lock, flags); -} - -/* enable/disable a specific DMA channel */ -static __inline__ void enable_dma(unsigned int dmanr) -{ - if (dmanr<=3) - dma_outb(dmanr, DMA1_MASK_REG); - else - dma_outb(dmanr & 3, DMA2_MASK_REG); -} - -static __inline__ void disable_dma(unsigned int dmanr) -{ - if (dmanr<=3) - dma_outb(dmanr | 4, DMA1_MASK_REG); - else - dma_outb((dmanr & 3) | 4, DMA2_MASK_REG); -} - -/* Clear the 'DMA Pointer Flip Flop'. - * Write 0 for LSB/MSB, 1 for MSB/LSB access. - * Use this once to initialize the FF to a known state. - * After that, keep track of it. :-) - * --- In order to do that, the DMA routines below should --- - * --- only be used while holding the DMA lock ! --- - */ -static __inline__ void clear_dma_ff(unsigned int dmanr) -{ - if (dmanr<=3) - dma_outb(0, DMA1_CLEAR_FF_REG); - else - dma_outb(0, DMA2_CLEAR_FF_REG); -} - -/* set mode (above) for a specific DMA channel */ -static __inline__ void set_dma_mode(unsigned int dmanr, char mode) -{ - if (dmanr<=3) - dma_outb(mode | dmanr, DMA1_MODE_REG); - else - dma_outb(mode | (dmanr&3), DMA2_MODE_REG); -} - -/* Set only the page register bits of the transfer address. - * This is used for successive transfers when we know the contents of - * the lower 16 bits of the DMA current address register, but a 64k boundary - * may have been crossed. - */ -static __inline__ void set_dma_page(unsigned int dmanr, char pagenr) -{ - switch(dmanr) { - case 0: - dma_outb(pagenr, DMA_PAGE_0); - break; - case 1: - dma_outb(pagenr, DMA_PAGE_1); - break; - case 2: - dma_outb(pagenr, DMA_PAGE_2); - break; - case 3: - dma_outb(pagenr, DMA_PAGE_3); - break; - case 5: - dma_outb(pagenr & 0xfe, DMA_PAGE_5); - break; - case 6: - dma_outb(pagenr & 0xfe, DMA_PAGE_6); - break; - case 7: - dma_outb(pagenr & 0xfe, DMA_PAGE_7); - break; - } -} - - -/* Set transfer address & page bits for specific DMA channel. - * Assumes dma flipflop is clear. - */ -static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a) -{ - set_dma_page(dmanr, a>>16); - if (dmanr <= 3) { - dma_outb( a & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); - dma_outb( (a>>8) & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); - } else { - dma_outb( (a>>1) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); - dma_outb( (a>>9) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); - } -} - - -/* Set transfer size (max 64k for DMA1..3, 128k for DMA5..7) for - * a specific DMA channel. - * You must ensure the parameters are valid. - * NOTE: from a manual: "the number of transfers is one more - * than the initial word count"! This is taken into account. - * Assumes dma flip-flop is clear. - * NOTE 2: "count" represents _bytes_ and must be even for channels 5-7. - */ -static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count) -{ - count--; - if (dmanr <= 3) { - dma_outb( count & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); - dma_outb( (count>>8) & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); - } else { - dma_outb( (count>>1) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); - dma_outb( (count>>9) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); - } -} - - -/* Get DMA residue count. After a DMA transfer, this - * should return zero. Reading this while a DMA transfer is - * still in progress will return unpredictable results. - * If called before the channel has been used, it may return 1. - * Otherwise, it returns the number of _bytes_ left to transfer. - * - * Assumes DMA flip-flop is clear. - */ -static __inline__ int get_dma_residue(unsigned int dmanr) -{ - unsigned int io_port = (dmanr<=3)? ((dmanr&3)<<1) + 1 + IO_DMA1_BASE - : ((dmanr&3)<<2) + 2 + IO_DMA2_BASE; - - /* using short to get 16-bit wrap around */ - unsigned short count; - - count = 1 + dma_inb(io_port); - count += dma_inb(io_port) << 8; - - return (dmanr<=3)? count : (count<<1); -} - - -/* These are in kernel/dma.c: */ -extern int request_dma(unsigned int dmanr, const char * device_id); /* reserve a DMA channel */ -extern void free_dma(unsigned int dmanr); /* release it again */ - -/* From PCI */ - -#ifdef CONFIG_PCI -extern int isa_dma_bridge_buggy; -#else -#define isa_dma_bridge_buggy (0) -#endif - -#endif /* _ASM_DMA_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/elf.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/elf.h deleted file mode 100644 index 9b14bcf6c9..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/elf.h +++ /dev/null @@ -1,104 +0,0 @@ -#ifndef __ASMi386_ELF_H -#define __ASMi386_ELF_H - -/* - * ELF register definitions.. - */ - -#include -#include - -#include - -typedef unsigned long elf_greg_t; - -#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) -typedef elf_greg_t elf_gregset_t[ELF_NGREG]; - -typedef struct user_i387_struct elf_fpregset_t; -typedef struct user_fxsr_struct elf_fpxregset_t; - -/* - * This is used to ensure we don't load something for the wrong architecture. - */ -#define elf_check_arch(x) \ - (((x)->e_machine == EM_386) || ((x)->e_machine == EM_486)) - -/* - * These are used to set parameters in the core dumps. - */ -#define ELF_CLASS ELFCLASS32 -#define ELF_DATA ELFDATA2LSB -#define ELF_ARCH EM_386 - -/* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx - contains a pointer to a function which might be registered using `atexit'. - This provides a mean for the dynamic linker to call DT_FINI functions for - shared libraries that have been loaded before the code runs. - - A value of 0 tells we have no such handler. - - We might as well make sure everything else is cleared too (except for %esp), - just to make things more deterministic. - */ -#define ELF_PLAT_INIT(_r) do { \ - _r->ebx = 0; _r->ecx = 0; _r->edx = 0; \ - _r->esi = 0; _r->edi = 0; _r->ebp = 0; \ - _r->eax = 0; \ -} while (0) - -#define USE_ELF_CORE_DUMP -#define ELF_EXEC_PAGESIZE 4096 - -/* This is the location that an ET_DYN program is loaded if exec'ed. Typical - use of this is to invoke "./ld.so someprog" to test out a new version of - the loader. We need to make sure that it is out of the way of the program - that it will "exec", and that there is sufficient room for the brk. */ - -#define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2) - -/* Wow, the "main" arch needs arch dependent functions too.. :) */ - -/* regs is struct pt_regs, pr_reg is elf_gregset_t (which is - now struct_user_regs, they are different) */ - -#define ELF_CORE_COPY_REGS(pr_reg, regs) \ - pr_reg[0] = regs->ebx; \ - pr_reg[1] = regs->ecx; \ - pr_reg[2] = regs->edx; \ - pr_reg[3] = regs->esi; \ - pr_reg[4] = regs->edi; \ - pr_reg[5] = regs->ebp; \ - pr_reg[6] = regs->eax; \ - pr_reg[7] = regs->xds; \ - pr_reg[8] = regs->xes; \ - /* fake once used fs and gs selectors? */ \ - pr_reg[9] = regs->xds; /* was fs and __fs */ \ - pr_reg[10] = regs->xds; /* was gs and __gs */ \ - pr_reg[11] = regs->orig_eax; \ - pr_reg[12] = regs->eip; \ - pr_reg[13] = regs->xcs; \ - pr_reg[14] = regs->eflags; \ - pr_reg[15] = regs->esp; \ - pr_reg[16] = regs->xss; - -/* This yields a mask that user programs can use to figure out what - instruction set this CPU supports. This could be done in user space, - but it's not easy, and we've already done it here. */ - -#define ELF_HWCAP (boot_cpu_data.x86_capability[0]) - -/* This yields a string that ld.so will use to load implementation - specific libraries for optimization. This is more specific in - intent than poking at uname or /proc/cpuinfo. - - For the moment, we have only optimizations for the Intel generations, - but that could change... */ - -#define ELF_PLATFORM (system_utsname.machine) - -#ifdef __KERNEL__ -#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) -#endif - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/errno.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/errno.h deleted file mode 100644 index 1b66789087..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/errno.h +++ /dev/null @@ -1,132 +0,0 @@ -#ifndef _I386_ERRNO_H -#define _I386_ERRNO_H - -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* I/O error */ -#define ENXIO 6 /* No such device or address */ -#define E2BIG 7 /* Argument list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file number */ -#define ECHILD 10 /* No child processes */ -#define EAGAIN 11 /* Try again */ -#define ENOMEM 12 /* Out of memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Device or resource busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* No such device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* File table overflow */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Not a typewriter */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ -#define EDOM 33 /* Math argument out of domain of func */ -#define ERANGE 34 /* Math result not representable */ -#define EDEADLK 35 /* Resource deadlock would occur */ -#define ENAMETOOLONG 36 /* File name too long */ -#define ENOLCK 37 /* No record locks available */ -#define ENOSYS 38 /* Function not implemented */ -#define ENOTEMPTY 39 /* Directory not empty */ -#define ELOOP 40 /* Too many symbolic links encountered */ -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define ENOMSG 42 /* No message of desired type */ -#define EIDRM 43 /* Identifier removed */ -#define ECHRNG 44 /* Channel number out of range */ -#define EL2NSYNC 45 /* Level 2 not synchronized */ -#define EL3HLT 46 /* Level 3 halted */ -#define EL3RST 47 /* Level 3 reset */ -#define ELNRNG 48 /* Link number out of range */ -#define EUNATCH 49 /* Protocol driver not attached */ -#define ENOCSI 50 /* No CSI structure available */ -#define EL2HLT 51 /* Level 2 halted */ -#define EBADE 52 /* Invalid exchange */ -#define EBADR 53 /* Invalid request descriptor */ -#define EXFULL 54 /* Exchange full */ -#define ENOANO 55 /* No anode */ -#define EBADRQC 56 /* Invalid request code */ -#define EBADSLT 57 /* Invalid slot */ - -#define EDEADLOCK EDEADLK - -#define EBFONT 59 /* Bad font file format */ -#define ENOSTR 60 /* Device not a stream */ -#define ENODATA 61 /* No data available */ -#define ETIME 62 /* Timer expired */ -#define ENOSR 63 /* Out of streams resources */ -#define ENONET 64 /* Machine is not on the network */ -#define ENOPKG 65 /* Package not installed */ -#define EREMOTE 66 /* Object is remote */ -#define ENOLINK 67 /* Link has been severed */ -#define EADV 68 /* Advertise error */ -#define ESRMNT 69 /* Srmount error */ -#define ECOMM 70 /* Communication error on send */ -#define EPROTO 71 /* Protocol error */ -#define EMULTIHOP 72 /* Multihop attempted */ -#define EDOTDOT 73 /* RFS specific error */ -#define EBADMSG 74 /* Not a data message */ -#define EOVERFLOW 75 /* Value too large for defined data type */ -#define ENOTUNIQ 76 /* Name not unique on network */ -#define EBADFD 77 /* File descriptor in bad state */ -#define EREMCHG 78 /* Remote address changed */ -#define ELIBACC 79 /* Can not access a needed shared library */ -#define ELIBBAD 80 /* Accessing a corrupted shared library */ -#define ELIBSCN 81 /* .lib section in a.out corrupted */ -#define ELIBMAX 82 /* Attempting to link in too many shared libraries */ -#define ELIBEXEC 83 /* Cannot exec a shared library directly */ -#define EILSEQ 84 /* Illegal byte sequence */ -#define ERESTART 85 /* Interrupted system call should be restarted */ -#define ESTRPIPE 86 /* Streams pipe error */ -#define EUSERS 87 /* Too many users */ -#define ENOTSOCK 88 /* Socket operation on non-socket */ -#define EDESTADDRREQ 89 /* Destination address required */ -#define EMSGSIZE 90 /* Message too long */ -#define EPROTOTYPE 91 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 92 /* Protocol not available */ -#define EPROTONOSUPPORT 93 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 94 /* Socket type not supported */ -#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ -#define EPFNOSUPPORT 96 /* Protocol family not supported */ -#define EAFNOSUPPORT 97 /* Address family not supported by protocol */ -#define EADDRINUSE 98 /* Address already in use */ -#define EADDRNOTAVAIL 99 /* Cannot assign requested address */ -#define ENETDOWN 100 /* Network is down */ -#define ENETUNREACH 101 /* Network is unreachable */ -#define ENETRESET 102 /* Network dropped connection because of reset */ -#define ECONNABORTED 103 /* Software caused connection abort */ -#define ECONNRESET 104 /* Connection reset by peer */ -#define ENOBUFS 105 /* No buffer space available */ -#define EISCONN 106 /* Transport endpoint is already connected */ -#define ENOTCONN 107 /* Transport endpoint is not connected */ -#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ -#define ETOOMANYREFS 109 /* Too many references: cannot splice */ -#define ETIMEDOUT 110 /* Connection timed out */ -#define ECONNREFUSED 111 /* Connection refused */ -#define EHOSTDOWN 112 /* Host is down */ -#define EHOSTUNREACH 113 /* No route to host */ -#define EALREADY 114 /* Operation already in progress */ -#define EINPROGRESS 115 /* Operation now in progress */ -#define ESTALE 116 /* Stale NFS file handle */ -#define EUCLEAN 117 /* Structure needs cleaning */ -#define ENOTNAM 118 /* Not a XENIX named type file */ -#define ENAVAIL 119 /* No XENIX semaphores available */ -#define EISNAM 120 /* Is a named type file */ -#define EREMOTEIO 121 /* Remote I/O error */ -#define EDQUOT 122 /* Quota exceeded */ - -#define ENOMEDIUM 123 /* No medium found */ -#define EMEDIUMTYPE 124 /* Wrong medium type */ - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/fcntl.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/fcntl.h deleted file mode 100644 index 41e3c4d914..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/fcntl.h +++ /dev/null @@ -1,87 +0,0 @@ -#ifndef _I386_FCNTL_H -#define _I386_FCNTL_H - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_NOCTTY 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 -#define FASYNC 020000 /* fcntl, for BSD compatibility */ -#define O_DIRECT 040000 /* direct disk access hint */ -#define O_LARGEFILE 0100000 -#define O_DIRECTORY 0200000 /* must be a directory */ -#define O_NOFOLLOW 0400000 /* don't follow links */ - -#define F_DUPFD 0 /* dup */ -#define F_GETFD 1 /* get close_on_exec */ -#define F_SETFD 2 /* set/clear close_on_exec */ -#define F_GETFL 3 /* get file->f_flags */ -#define F_SETFL 4 /* set file->f_flags */ -#define F_GETLK 5 -#define F_SETLK 6 -#define F_SETLKW 7 - -#define F_SETOWN 8 /* for sockets. */ -#define F_GETOWN 9 /* for sockets. */ -#define F_SETSIG 10 /* for sockets. */ -#define F_GETSIG 11 /* for sockets. */ - -#define F_GETLK64 12 /* using 'struct flock64' */ -#define F_SETLK64 13 -#define F_SETLKW64 14 - -/* for F_[GET|SET]FL */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* for posix fcntl() and lockf() */ -#define F_RDLCK 0 -#define F_WRLCK 1 -#define F_UNLCK 2 - -/* for old implementation of bsd flock () */ -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -/* for leases */ -#define F_INPROGRESS 16 - -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -#define LOCK_UN 8 /* remove lock */ - -#define LOCK_MAND 32 /* This is a mandatory flock */ -#define LOCK_READ 64 /* ... Which allows concurrent read operations */ -#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ -#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ - -struct flock { - short l_type; - short l_whence; - off_t l_start; - off_t l_len; - pid_t l_pid; -}; - -struct flock64 { - short l_type; - short l_whence; - loff_t l_start; - loff_t l_len; - pid_t l_pid; -}; - -#define F_LINUX_SPECIFIC_BASE 1024 - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/floppy.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/floppy.h deleted file mode 100644 index 0317b2f887..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/floppy.h +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Architecture specific parts of the Floppy driver - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - * - * Copyright (C) 1995 - */ -#ifndef __ASM_I386_FLOPPY_H -#define __ASM_I386_FLOPPY_H - -#include - - -/* - * The DMA channel used by the floppy controller cannot access data at - * addresses >= 16MB - * - * Went back to the 1MB limit, as some people had problems with the floppy - * driver otherwise. It doesn't matter much for performance anyway, as most - * floppy accesses go through the track buffer. - */ -#define _CROSS_64KB(a,s,vdma) \ -(!vdma && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64)) - -#define CROSS_64KB(a,s) _CROSS_64KB(a,s,use_virtual_dma & 1) - - -#define SW fd_routine[use_virtual_dma&1] -#define CSW fd_routine[can_use_virtual_dma & 1] - - -#define fd_inb(port) inb_p(port) -#define fd_outb(port,value) outb_p(port,value) - -#define fd_request_dma() CSW._request_dma(FLOPPY_DMA,"floppy") -#define fd_free_dma() CSW._free_dma(FLOPPY_DMA) -#define fd_enable_irq() enable_irq(FLOPPY_IRQ) -#define fd_disable_irq() disable_irq(FLOPPY_IRQ) -#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL) -#define fd_get_dma_residue() SW._get_dma_residue(FLOPPY_DMA) -#define fd_dma_mem_alloc(size) SW._dma_mem_alloc(size) -#define fd_dma_setup(addr, size, mode, io) SW._dma_setup(addr, size, mode, io) - -#define FLOPPY_CAN_FALLBACK_ON_NODMA - -static int virtual_dma_count; -static int virtual_dma_residue; -static char *virtual_dma_addr; -static int virtual_dma_mode; -static int doing_pdma; - -static void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs) -{ - register unsigned char st; - -#undef TRACE_FLPY_INT -#define NO_FLOPPY_ASSEMBLER - -#ifdef TRACE_FLPY_INT - static int calls=0; - static int bytes=0; - static int dma_wait=0; -#endif - if(!doing_pdma) { - floppy_interrupt(irq, dev_id, regs); - return; - } - -#ifdef TRACE_FLPY_INT - if(!calls) - bytes = virtual_dma_count; -#endif - -#ifndef NO_FLOPPY_ASSEMBLER - __asm__ ( - "testl %1,%1" - "je 3f" -"1: inb %w4,%b0" - "andb $160,%b0" - "cmpb $160,%b0" - "jne 2f" - "incw %w4" - "testl %3,%3" - "jne 4f" - "inb %w4,%b0" - "movb %0,(%2)" - "jmp 5f" -"4: movb (%2),%0" - "outb %b0,%w4" -"5: decw %w4" - "outb %0,$0x80" - "decl %1" - "incl %2" - "testl %1,%1" - "jne 1b" -"3: inb %w4,%b0" -"2: " - : "=a" ((char) st), - "=c" ((long) virtual_dma_count), - "=S" ((long) virtual_dma_addr) - : "b" ((long) virtual_dma_mode), - "d" ((short) virtual_dma_port+4), - "1" ((long) virtual_dma_count), - "2" ((long) virtual_dma_addr)); -#else - { - register int lcount; - register char *lptr; - - st = 1; - for(lcount=virtual_dma_count, lptr=virtual_dma_addr; - lcount; lcount--, lptr++) { - st=inb(virtual_dma_port+4) & 0xa0 ; - if(st != 0xa0) - break; - if(virtual_dma_mode) - outb_p(*lptr, virtual_dma_port+5); - else - *lptr = inb_p(virtual_dma_port+5); - } - virtual_dma_count = lcount; - virtual_dma_addr = lptr; - st = inb(virtual_dma_port+4); - } -#endif - -#ifdef TRACE_FLPY_INT - calls++; -#endif - if(st == 0x20) - return; - if(!(st & 0x20)) { - virtual_dma_residue += virtual_dma_count; - virtual_dma_count=0; -#ifdef TRACE_FLPY_INT - printk("count=%x, residue=%x calls=%d bytes=%d dma_wait=%d\n", - virtual_dma_count, virtual_dma_residue, calls, bytes, - dma_wait); - calls = 0; - dma_wait=0; -#endif - doing_pdma = 0; - floppy_interrupt(irq, dev_id, regs); - return; - } -#ifdef TRACE_FLPY_INT - if(!virtual_dma_count) - dma_wait++; -#endif -} - -static void fd_disable_dma(void) -{ - if(! (can_use_virtual_dma & 1)) - disable_dma(FLOPPY_DMA); - doing_pdma = 0; - virtual_dma_residue += virtual_dma_count; - virtual_dma_count=0; -} - -static int vdma_request_dma(unsigned int dmanr, const char * device_id) -{ - return 0; -} - -static void vdma_nop(unsigned int dummy) -{ -} - - -static int vdma_get_dma_residue(unsigned int dummy) -{ - return virtual_dma_count + virtual_dma_residue; -} - - -static int fd_request_irq(void) -{ - if(can_use_virtual_dma) - return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, - "floppy", NULL); - else - return request_irq(FLOPPY_IRQ, floppy_interrupt, - SA_INTERRUPT|SA_SAMPLE_RANDOM, - "floppy", NULL); - -} - -static unsigned long dma_mem_alloc(unsigned long size) -{ - return __get_dma_pages(GFP_KERNEL,get_order(size)); -} - - -static unsigned long vdma_mem_alloc(unsigned long size) -{ - return (unsigned long) vmalloc(size); - -} - -#define nodma_mem_alloc(size) vdma_mem_alloc(size) - -static void _fd_dma_mem_free(unsigned long addr, unsigned long size) -{ - if((unsigned int) addr >= (unsigned int) high_memory) - return vfree((void *)addr); - else - free_pages(addr, get_order(size)); -} - -#define fd_dma_mem_free(addr, size) _fd_dma_mem_free(addr, size) - -static void _fd_chose_dma_mode(char *addr, unsigned long size) -{ - if(can_use_virtual_dma == 2) { - if((unsigned int) addr >= (unsigned int) high_memory || - virt_to_bus(addr) >= 0x1000000 || - _CROSS_64KB(addr, size, 0)) - use_virtual_dma = 1; - else - use_virtual_dma = 0; - } else { - use_virtual_dma = can_use_virtual_dma & 1; - } -} - -#define fd_chose_dma_mode(addr, size) _fd_chose_dma_mode(addr, size) - - -static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) -{ - doing_pdma = 1; - virtual_dma_port = io; - virtual_dma_mode = (mode == DMA_MODE_WRITE); - virtual_dma_addr = addr; - virtual_dma_count = size; - virtual_dma_residue = 0; - return 0; -} - -static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) -{ -#ifdef FLOPPY_SANITY_CHECK - if (CROSS_64KB(addr, size)) { - printk("DMA crossing 64-K boundary %p-%p\n", addr, addr+size); - return -1; - } -#endif - /* actual, physical DMA */ - doing_pdma = 0; - clear_dma_ff(FLOPPY_DMA); - set_dma_mode(FLOPPY_DMA,mode); - set_dma_addr(FLOPPY_DMA,virt_to_bus(addr)); - set_dma_count(FLOPPY_DMA,size); - enable_dma(FLOPPY_DMA); - return 0; -} - -struct fd_routine_l { - int (*_request_dma)(unsigned int dmanr, const char * device_id); - void (*_free_dma)(unsigned int dmanr); - int (*_get_dma_residue)(unsigned int dummy); - unsigned long (*_dma_mem_alloc) (unsigned long size); - int (*_dma_setup)(char *addr, unsigned long size, int mode, int io); -} fd_routine[] = { - { - request_dma, - free_dma, - get_dma_residue, - dma_mem_alloc, - hard_dma_setup - }, - { - vdma_request_dma, - vdma_nop, - vdma_get_dma_residue, - vdma_mem_alloc, - vdma_dma_setup - } -}; - - -static int FDC1 = 0x3f0; -static int FDC2 = -1; - -/* - * Floppy types are stored in the rtc's CMOS RAM and so rtc_lock - * is needed to prevent corrupted CMOS RAM in case "insmod floppy" - * coincides with another rtc CMOS user. Paul G. - */ -#define FLOPPY0_TYPE ({ \ - unsigned long flags; \ - unsigned char val; \ - spin_lock_irqsave(&rtc_lock, flags); \ - val = (CMOS_READ(0x10) >> 4) & 15; \ - spin_unlock_irqrestore(&rtc_lock, flags); \ - val; \ -}) - -#define FLOPPY1_TYPE ({ \ - unsigned long flags; \ - unsigned char val; \ - spin_lock_irqsave(&rtc_lock, flags); \ - val = CMOS_READ(0x10) & 15; \ - spin_unlock_irqrestore(&rtc_lock, flags); \ - val; \ -}) - -#define N_FDC 2 -#define N_DRIVE 8 - -#define FLOPPY_MOTOR_MASK 0xf0 - -#define AUTO_DMA - -#define EXTRA_FLOPPY_PARAMS - -#endif /* __ASM_I386_FLOPPY_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hardirq.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hardirq.h deleted file mode 100644 index 4acb4b09dd..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hardirq.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef __ASM_HARDIRQ_H -#define __ASM_HARDIRQ_H - -#include -#include -#include - -/* assembly code in softirq.h is sensitive to the offsets of these fields */ -typedef struct { - unsigned int __softirq_pending; - unsigned int __local_irq_count; - unsigned int __local_bh_count; - unsigned int __syscall_count; - struct task_struct * __ksoftirqd_task; /* waitqueue is too large */ - unsigned int __nmi_count; /* arch dependent */ -} ____cacheline_aligned irq_cpustat_t; - -#include /* Standard mappings for irq_cpustat_t above */ - -/* - * Are we in an interrupt context? Either doing bottom half - * or hardware interrupt processing? - */ -#define in_interrupt() ({ int __cpu = smp_processor_id(); \ - (local_irq_count(__cpu) + local_bh_count(__cpu) != 0); }) - -#define in_irq() (local_irq_count(smp_processor_id()) != 0) - -#ifndef CONFIG_SMP - -#define hardirq_trylock(cpu) (local_irq_count(cpu) == 0) -#define hardirq_endlock(cpu) do { } while (0) - -#define irq_enter(cpu, irq) (local_irq_count(cpu)++) -#define irq_exit(cpu, irq) (local_irq_count(cpu)--) - -#define synchronize_irq() barrier() - -#else - -#include -#include - -extern unsigned char global_irq_holder; -extern unsigned volatile long global_irq_lock; /* long for set_bit -RR */ - -static inline int irqs_running (void) -{ - int i; - - for (i = 0; i < smp_num_cpus; i++) - if (local_irq_count(i)) - return 1; - return 0; -} - -static inline void release_irqlock(int cpu) -{ - /* if we didn't own the irq lock, just ignore.. */ - if (global_irq_holder == (unsigned char) cpu) { - global_irq_holder = NO_PROC_ID; - clear_bit(0,&global_irq_lock); - } -} - -static inline void irq_enter(int cpu, int irq) -{ - ++local_irq_count(cpu); - - while (test_bit(0,&global_irq_lock)) { - cpu_relax(); - } -} - -static inline void irq_exit(int cpu, int irq) -{ - --local_irq_count(cpu); -} - -static inline int hardirq_trylock(int cpu) -{ - return !local_irq_count(cpu) && !test_bit(0,&global_irq_lock); -} - -#define hardirq_endlock(cpu) do { } while (0) - -extern void synchronize_irq(void); - -#endif /* CONFIG_SMP */ - -#endif /* __ASM_HARDIRQ_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hdreg.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hdreg.h deleted file mode 100644 index 2c4ca680f6..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hdreg.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * linux/include/asm-i386/hdreg.h - * - * Copyright (C) 1994-1996 Linus Torvalds & authors - */ - -#ifndef __ASMi386_HDREG_H -#define __ASMi386_HDREG_H - -//typedef unsigned short ide_ioreg_t; -typedef unsigned long ide_ioreg_t; - -#endif /* __ASMi386_HDREG_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/i387.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/i387.h deleted file mode 100644 index 9a4d9a63e9..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/i387.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * include/asm-i386/i387.h - * - * Copyright (C) 1994 Linus Torvalds - * - * Pentium III FXSR, SSE support - * General FPU state handling cleanups - * Gareth Hughes , May 2000 - */ - -#ifndef __ASM_I386_I387_H -#define __ASM_I386_I387_H - -#include -#include -#include -#include - -extern void init_fpu(void); -/* - * FPU lazy state save handling... - */ -extern void save_init_fpu( struct task_struct *tsk ); -extern void restore_fpu( struct task_struct *tsk ); - -extern void kernel_fpu_begin(void); -#define kernel_fpu_end() stts() - - -#define unlazy_fpu( tsk ) do { \ - if ( tsk->flags & PF_USEDFPU ) \ - save_init_fpu( tsk ); \ -} while (0) - -#define clear_fpu( tsk ) do { \ - if ( tsk->flags & PF_USEDFPU ) { \ - asm volatile("fwait"); \ - tsk->flags &= ~PF_USEDFPU; \ - stts(); \ - } \ -} while (0) - -/* - * FPU state interaction... - */ -extern unsigned short get_fpu_cwd( struct task_struct *tsk ); -extern unsigned short get_fpu_swd( struct task_struct *tsk ); -extern unsigned short get_fpu_twd( struct task_struct *tsk ); -extern unsigned short get_fpu_mxcsr( struct task_struct *tsk ); - -extern void set_fpu_cwd( struct task_struct *tsk, unsigned short cwd ); -extern void set_fpu_swd( struct task_struct *tsk, unsigned short swd ); -extern void set_fpu_twd( struct task_struct *tsk, unsigned short twd ); -extern void set_fpu_mxcsr( struct task_struct *tsk, unsigned short mxcsr ); - -#define load_mxcsr( val ) do { \ - unsigned long __mxcsr = ((unsigned long)(val) & 0xffbf); \ - asm volatile( "ldmxcsr %0" : : "m" (__mxcsr) ); \ -} while (0) - -/* - * Signal frame handlers... - */ -extern int save_i387( struct _fpstate *buf ); -extern int restore_i387( struct _fpstate *buf ); - -/* - * ptrace request handers... - */ -extern int get_fpregs( struct user_i387_struct *buf, - struct task_struct *tsk ); -extern int set_fpregs( struct task_struct *tsk, - struct user_i387_struct *buf ); - -extern int get_fpxregs( struct user_fxsr_struct *buf, - struct task_struct *tsk ); -extern int set_fpxregs( struct task_struct *tsk, - struct user_fxsr_struct *buf ); -extern void load_empty_fpu(struct task_struct *); - -/* - * FPU state for core dumps... - */ -extern int dump_fpu( struct pt_regs *regs, - struct user_i387_struct *fpu ); -extern int dump_extended_fpu( struct pt_regs *regs, - struct user_fxsr_struct *fpu ); - -#endif /* __ASM_I386_I387_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ide.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ide.h deleted file mode 100644 index 806a584831..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ide.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * linux/include/asm-i386/ide.h - * - * Copyright (C) 1994-1996 Linus Torvalds & authors - */ - -/* - * This file contains the i386 architecture specific IDE code. - */ - -#ifndef __ASMi386_IDE_H -#define __ASMi386_IDE_H - -#ifdef __KERNEL__ - -#include - -#ifndef MAX_HWIFS -# ifdef CONFIG_BLK_DEV_IDEPCI -#define MAX_HWIFS 10 -# else -#define MAX_HWIFS 6 -# endif -#endif - -static __inline__ int ide_default_irq(ide_ioreg_t base) -{ - switch (base) { - case 0x1f0: return 14; - case 0x170: return 15; - case 0x1e8: return 11; - case 0x168: return 10; - case 0x1e0: return 8; - case 0x160: return 12; - default: - return 0; - } -} - -static __inline__ ide_ioreg_t ide_default_io_base(int index) -{ - switch (index) { - case 0: return 0x1f0; - case 1: return 0x170; - case 2: return 0x1e8; - case 3: return 0x168; - case 4: return 0x1e0; - case 5: return 0x160; - default: - return 0; - } -} - -static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq) -{ - ide_ioreg_t reg = data_port; - int i; - - for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { - hw->io_ports[i] = reg; - reg += 1; - } - if (ctrl_port) { - hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port; - } else { - hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206; - } - if (irq != NULL) - *irq = 0; - hw->io_ports[IDE_IRQ_OFFSET] = 0; -} - -static __inline__ void ide_init_default_hwifs(void) -{ -#ifndef CONFIG_BLK_DEV_IDEPCI - hw_regs_t hw; - int index; - - for(index = 0; index < MAX_HWIFS; index++) { - memset(&hw, 0, sizeof hw); - ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL); - hw.irq = ide_default_irq(ide_default_io_base(index)); - ide_register_hw(&hw, NULL); - } -#endif /* CONFIG_BLK_DEV_IDEPCI */ -} - -#include - -#endif /* __KERNEL__ */ - -#endif /* __ASMi386_IDE_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/init.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/init.h deleted file mode 100644 index 17d2155741..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/init.h +++ /dev/null @@ -1 +0,0 @@ -#error " should never be used - use instead" diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/io_apic.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/io_apic.h deleted file mode 100644 index 196d04ada2..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/io_apic.h +++ /dev/null @@ -1,148 +0,0 @@ -#ifndef __ASM_IO_APIC_H -#define __ASM_IO_APIC_H - -#include -#include - -/* - * Intel IO-APIC support for SMP and UP systems. - * - * Copyright (C) 1997, 1998, 1999, 2000 Ingo Molnar - */ - -#ifdef CONFIG_X86_IO_APIC - -#define APIC_MISMATCH_DEBUG - -#define IO_APIC_BASE(idx) \ - ((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + idx) \ - + (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK))) - -/* - * The structure of the IO-APIC: - */ -struct IO_APIC_reg_00 { - __u32 __reserved_2 : 24, - ID : 4, - __reserved_1 : 4; -} __attribute__ ((packed)); - -struct IO_APIC_reg_01 { - __u32 version : 8, - __reserved_2 : 7, - PRQ : 1, - entries : 8, - __reserved_1 : 8; -} __attribute__ ((packed)); - -struct IO_APIC_reg_02 { - __u32 __reserved_2 : 24, - arbitration : 4, - __reserved_1 : 4; -} __attribute__ ((packed)); - -/* - * # of IO-APICs and # of IRQ routing registers - */ -extern int nr_ioapics; -extern int nr_ioapic_registers[MAX_IO_APICS]; - -enum ioapic_irq_destination_types { - dest_Fixed = 0, - dest_LowestPrio = 1, - dest_SMI = 2, - dest__reserved_1 = 3, - dest_NMI = 4, - dest_INIT = 5, - dest__reserved_2 = 6, - dest_ExtINT = 7 -}; - -struct IO_APIC_route_entry { - __u32 vector : 8, - delivery_mode : 3, /* 000: FIXED - * 001: lowest prio - * 111: ExtINT - */ - dest_mode : 1, /* 0: physical, 1: logical */ - delivery_status : 1, - polarity : 1, - irr : 1, - trigger : 1, /* 0: edge, 1: level */ - mask : 1, /* 0: enabled, 1: disabled */ - __reserved_2 : 15; - - union { struct { __u32 - __reserved_1 : 24, - physical_dest : 4, - __reserved_2 : 4; - } physical; - - struct { __u32 - __reserved_1 : 24, - logical_dest : 8; - } logical; - } dest; - -} __attribute__ ((packed)); - -/* - * MP-BIOS irq configuration table structures: - */ - -/* I/O APIC entries */ -extern struct mpc_config_ioapic mp_ioapics[MAX_IO_APICS]; - -/* # of MP IRQ source entries */ -extern int mp_irq_entries; - -/* MP IRQ source entries */ -extern struct mpc_config_intsrc *mp_irqs; - -/* non-0 if default (table-less) MP configuration */ -extern int mpc_default_type; - -static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg) -{ - *IO_APIC_BASE(apic) = reg; - return *(IO_APIC_BASE(apic)+4); -} - -static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value) -{ - *IO_APIC_BASE(apic) = reg; - *(IO_APIC_BASE(apic)+4) = value; -} - -/* - * Re-write a value: to be used for read-modify-write - * cycles where the read already set up the index register. - */ -static inline void io_apic_modify(unsigned int apic, unsigned int value) -{ - *(IO_APIC_BASE(apic)+4) = value; -} - -/* - * Synchronize the IO-APIC and the CPU by doing - * a dummy read from the IO-APIC - */ -static inline void io_apic_sync(unsigned int apic) -{ - (void) *(IO_APIC_BASE(apic)+4); -} - -/* 1 if "noapic" boot option passed */ -extern int skip_ioapic_setup; - -/* - * If we use the IO-APIC for IRQ routing, disable automatic - * assignment of PCI IRQ's. - */ -#define io_apic_assign_pci_irqs (mp_irq_entries && !skip_ioapic_setup) - -#else /* !CONFIG_X86_IO_APIC */ -#define io_apic_assign_pci_irqs 0 -#endif - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctl.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctl.h deleted file mode 100644 index c75f20ade6..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctl.h +++ /dev/null @@ -1,75 +0,0 @@ -/* $Id: ioctl.h,v 1.5 1993/07/19 21:53:50 root Exp root $ - * - * linux/ioctl.h for Linux by H.H. Bergman. - */ - -#ifndef _ASMI386_IOCTL_H -#define _ASMI386_IOCTL_H - -/* ioctl command encoding: 32 bits total, command in lower 16 bits, - * size of the parameter structure in the lower 14 bits of the - * upper 16 bits. - * Encoding the size of the parameter structure in the ioctl request - * is useful for catching programs compiled with old versions - * and to avoid overwriting user space outside the user buffer area. - * The highest 2 bits are reserved for indicating the ``access mode''. - * NOTE: This limits the max parameter size to 16kB -1 ! - */ - -/* - * The following is for compatibility across the various Linux - * platforms. The i386 ioctl numbering scheme doesn't really enforce - * a type field. De facto, however, the top 8 bits of the lower 16 - * bits are indeed used as a type field, so we might just as well make - * this explicit here. Please be sure to use the decoding macros - * below from now on. - */ -#define _IOC_NRBITS 8 -#define _IOC_TYPEBITS 8 -#define _IOC_SIZEBITS 14 -#define _IOC_DIRBITS 2 - -#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) -#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) -#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) -#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) - -#define _IOC_NRSHIFT 0 -#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) -#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) -#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) - -/* - * Direction bits. - */ -#define _IOC_NONE 0U -#define _IOC_WRITE 1U -#define _IOC_READ 2U - -#define _IOC(dir,type,nr,size) \ - (((dir) << _IOC_DIRSHIFT) | \ - ((type) << _IOC_TYPESHIFT) | \ - ((nr) << _IOC_NRSHIFT) | \ - ((size) << _IOC_SIZESHIFT)) - -/* used to create numbers */ -#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) -#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) -#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) - -/* used to decode ioctl numbers.. */ -#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) -#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) -#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) -#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) - -/* ...and for the drivers/sound files... */ - -#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) -#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) -#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) -#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) -#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) - -#endif /* _ASMI386_IOCTL_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctls.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctls.h deleted file mode 100644 index 97b41f2fed..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctls.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef __ARCH_I386_IOCTLS_H__ -#define __ARCH_I386_IOCTLS_H__ - -#include - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */ -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ -#define TIOCSBRK 0x5427 /* BSD compatibility */ -#define TIOCCBRK 0x5428 /* BSD compatibility */ -#define TIOCGSID 0x5429 /* Return the session ID of FD */ -#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ -#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ - -#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458 /* For debugging only */ -#define TIOCSERGETLSR 0x5459 /* Get line status register */ -#define TIOCSERGETMULTI 0x545A /* Get multiport config */ -#define TIOCSERSETMULTI 0x545B /* Set multiport config */ - -#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ -#define TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */ -#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */ - -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 - -#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipc.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipc.h deleted file mode 100644 index 36f43063ad..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipc.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef __i386_IPC_H__ -#define __i386_IPC_H__ - -/* - * These are used to wrap system calls on x86. - * - * See arch/i386/kernel/sys_i386.c for ugly details.. - */ -struct ipc_kludge { - struct msgbuf *msgp; - long msgtyp; -}; - -#define SEMOP 1 -#define SEMGET 2 -#define SEMCTL 3 -#define MSGSND 11 -#define MSGRCV 12 -#define MSGGET 13 -#define MSGCTL 14 -#define SHMAT 21 -#define SHMDT 22 -#define SHMGET 23 -#define SHMCTL 24 - -/* Used by the DIPC package, try and avoid reusing it */ -#define DIPC 25 - -#define IPCCALL(version,op) ((version)<<16 | (op)) - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipcbuf.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipcbuf.h deleted file mode 100644 index 0dcad4f84c..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipcbuf.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __i386_IPCBUF_H__ -#define __i386_IPCBUF_H__ - -/* - * The ipc64_perm structure for i386 architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 32-bit mode_t and seq - * - 2 miscellaneous 32-bit values - */ - -struct ipc64_perm -{ - __kernel_key_t key; - __kernel_uid32_t uid; - __kernel_gid32_t gid; - __kernel_uid32_t cuid; - __kernel_gid32_t cgid; - __kernel_mode_t mode; - unsigned short __pad1; - unsigned short seq; - unsigned short __pad2; - unsigned long __unused1; - unsigned long __unused2; -}; - -#endif /* __i386_IPCBUF_H__ */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/keyboard.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/keyboard.h deleted file mode 100644 index 1507890e5b..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/keyboard.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * linux/include/asm-i386/keyboard.h - * - * Created 3 Nov 1996 by Geert Uytterhoeven - */ - -/* - * This file contains the i386 architecture specific keyboard definitions - */ - -#ifndef _I386_KEYBOARD_H -#define _I386_KEYBOARD_H - -#ifdef __KERNEL__ - -#include -#include -#include -#include -#include - -#define KEYBOARD_IRQ 1 -#define DISABLE_KBD_DURING_INTERRUPTS 0 - -extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode); -extern int pckbd_getkeycode(unsigned int scancode); -extern int pckbd_translate(unsigned char scancode, unsigned char *keycode, - char raw_mode); -extern char pckbd_unexpected_up(unsigned char keycode); -extern void pckbd_leds(unsigned char leds); -extern void pckbd_init_hw(void); -extern int pckbd_pm_resume(struct pm_dev *, pm_request_t, void *); -extern pm_callback pm_kbd_request_override; -extern unsigned char pckbd_sysrq_xlate[128]; - -#define kbd_setkeycode pckbd_setkeycode -#define kbd_getkeycode pckbd_getkeycode -#define kbd_translate pckbd_translate -#define kbd_unexpected_up pckbd_unexpected_up -#define kbd_leds pckbd_leds -#define kbd_init_hw pckbd_init_hw -#define kbd_sysrq_xlate pckbd_sysrq_xlate - -#define SYSRQ_KEY 0x54 - -/* resource allocation */ -#define kbd_request_region() -#define kbd_request_irq(handler) request_irq(KEYBOARD_IRQ, handler, 0, \ - "keyboard", NULL) - -/* How to access the keyboard macros on this platform. */ -#define kbd_read_input() inb(KBD_DATA_REG) -#define kbd_read_status() inb(KBD_STATUS_REG) -#define kbd_write_output(val) outb(val, KBD_DATA_REG) -#define kbd_write_command(val) outb(val, KBD_CNTL_REG) - -/* Some stoneage hardware needs delays after some operations. */ -#define kbd_pause() do { } while(0) - -/* - * Machine specific bits for the PS/2 driver - */ - -#define AUX_IRQ 12 - -#define aux_request_irq(hand, dev_id) \ - request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id) - -#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id) - -#endif /* __KERNEL__ */ -#endif /* _I386_KEYBOARD_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/kmap_types.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/kmap_types.h deleted file mode 100644 index 1084105336..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/kmap_types.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _ASM_KMAP_TYPES_H -#define _ASM_KMAP_TYPES_H - -enum km_type { - KM_BOUNCE_READ, - KM_SKB_SUNRPC_DATA, - KM_SKB_DATA_SOFTIRQ, - KM_USER0, - KM_USER1, - KM_BH_IRQ, - KM_TYPE_NR -}; - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ldt.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ldt.h deleted file mode 100644 index 9d1110f984..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ldt.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * ldt.h - * - * Definitions of structures used with the modify_ldt system call. - */ -#ifndef _LINUX_LDT_H -#define _LINUX_LDT_H - -/* Maximum number of LDT entries supported. */ -#define LDT_ENTRIES 8192 -/* The size of each LDT entry. */ -#define LDT_ENTRY_SIZE 8 - -#ifndef __ASSEMBLY__ -struct modify_ldt_ldt_s { - unsigned int entry_number; - unsigned long base_addr; - unsigned int limit; - unsigned int seg_32bit:1; - unsigned int contents:2; - unsigned int read_exec_only:1; - unsigned int limit_in_pages:1; - unsigned int seg_not_present:1; - unsigned int useable:1; -}; - -#define MODIFY_LDT_CONTENTS_DATA 0 -#define MODIFY_LDT_CONTENTS_STACK 1 -#define MODIFY_LDT_CONTENTS_CODE 2 - -#endif /* !__ASSEMBLY__ */ -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/linux_logo.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/linux_logo.h deleted file mode 100644 index 1e2fe6c899..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/linux_logo.h +++ /dev/null @@ -1,27 +0,0 @@ -/* $Id: linux_logo.h,v 1.8 1998/07/30 16:30:24 jj Exp $ - * include/asm-i386/linux_logo.h: This is a linux logo - * to be displayed on boot. - * - * Copyright (C) 1996 Larry Ewing (lewing@isc.tamu.edu) - * Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz) - * - * You can put anything here, but: - * LINUX_LOGO_COLORS has to be less than 224 - * image size has to be 80x80 - * values have to start from 0x20 - * (i.e. RGB(linux_logo_red[0], - * linux_logo_green[0], - * linux_logo_blue[0]) is color 0x20) - * BW image has to be 80x80 as well, with MS bit - * on the left - * Serial_console ascii image can be any size, - * but should contain %s to display the version - */ - -#include -#include - -#define linux_logo_banner "Linux/ia32 version " UTS_RELEASE - -#include - diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/locks.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/locks.h deleted file mode 100644 index ffcab0afb6..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/locks.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * SMP locks primitives for building ix86 locks - * (not yet used). - * - * Alan Cox, alan@redhat.com, 1995 - */ - -/* - * This would be much easier but far less clear and easy - * to borrow for other processors if it was just assembler. - */ - -static __inline__ void prim_spin_lock(struct spinlock *sp) -{ - int processor=smp_processor_id(); - - /* - * Grab the lock bit - */ - - while(lock_set_bit(0,&sp->lock)) - { - /* - * Failed, but that's cos we own it! - */ - - if(sp->cpu==processor) - { - sp->users++; - return 0; - } - /* - * Spin in the cache S state if possible - */ - while(sp->lock) - { - /* - * Wait for any invalidates to go off - */ - - if(smp_invalidate_needed&(1<spins++; - } - /* - * Someone wrote the line, we go 'I' and get - * the cache entry. Now try to regrab - */ - } - sp->users++;sp->cpu=processor; - return 1; -} - -/* - * Release a spin lock - */ - -static __inline__ int prim_spin_unlock(struct spinlock *sp) -{ - /* This is safe. The decrement is still guarded by the lock. A multilock would - not be safe this way */ - if(!--sp->users) - { - sp->cpu= NO_PROC_ID;lock_clear_bit(0,&sp->lock); - return 1; - } - return 0; -} - - -/* - * Non blocking lock grab - */ - -static __inline__ int prim_spin_lock_nb(struct spinlock *sp) -{ - if(lock_set_bit(0,&sp->lock)) - return 0; /* Locked already */ - sp->users++; - return 1; /* We got the lock */ -} - - -/* - * These wrap the locking primitives up for usage - */ - -static __inline__ void spinlock(struct spinlock *sp) -{ - if(sp->prioritylock_order) - panic("lock order violation: %s (%d)\n", sp->name, current->lock_order); - if(prim_spin_lock(sp)) - { - /* - * We got a new lock. Update the priority chain - */ - sp->oldpri=current->lock_order; - current->lock_order=sp->priority; - } -} - -static __inline__ void spinunlock(struct spinlock *sp) -{ - int pri; - if(current->lock_order!=sp->priority) - panic("lock release order violation %s (%d)\n", sp->name, current->lock_order); - pri=sp->oldpri; - if(prim_spin_unlock(sp)) - { - /* - * Update the debugging lock priority chain. We dumped - * our last right to the lock. - */ - current->lock_order=sp->pri; - } -} - -static __inline__ void spintestlock(struct spinlock *sp) -{ - /* - * We do no sanity checks, it's legal to optimistically - * get a lower lock. - */ - prim_spin_lock_nb(sp); -} - -static __inline__ void spintestunlock(struct spinlock *sp) -{ - /* - * A testlock doesn't update the lock chain so we - * must not update it on free - */ - prim_spin_unlock(sp); -} diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/math_emu.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/math_emu.h deleted file mode 100644 index bc8421d5e5..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/math_emu.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _I386_MATH_EMU_H -#define _I386_MATH_EMU_H - -#include - -int restore_i387_soft(void *s387, struct _fpstate *buf); -int save_i387_soft(void *s387, struct _fpstate * buf); - -/* This structure matches the layout of the data saved to the stack - following a device-not-present interrupt, part of it saved - automatically by the 80386/80486. - */ -struct info { - long ___orig_eip; - long ___ebx; - long ___ecx; - long ___edx; - long ___esi; - long ___edi; - long ___ebp; - long ___eax; - long ___ds; - long ___es; - long ___orig_eax; - long ___eip; - long ___cs; - long ___eflags; - long ___esp; - long ___ss; - long ___vm86_es; /* This and the following only in vm86 mode */ - long ___vm86_ds; - long ___vm86_fs; - long ___vm86_gs; -}; -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mc146818rtc.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mc146818rtc.h deleted file mode 100644 index d6e3009430..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mc146818rtc.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Machine dependent access functions for RTC registers. - */ -#ifndef _ASM_MC146818RTC_H -#define _ASM_MC146818RTC_H - -#include - -#ifndef RTC_PORT -#define RTC_PORT(x) (0x70 + (x)) -#define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */ -#endif - -/* - * The yet supported machines all access the RTC index register via - * an ISA port access but the way to access the date register differs ... - */ -#define CMOS_READ(addr) ({ \ -outb_p((addr),RTC_PORT(0)); \ -inb_p(RTC_PORT(1)); \ -}) -#define CMOS_WRITE(val, addr) ({ \ -outb_p((addr),RTC_PORT(0)); \ -outb_p((val),RTC_PORT(1)); \ -}) - -#define RTC_IRQ 8 - -#endif /* _ASM_MC146818RTC_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mca_dma.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mca_dma.h deleted file mode 100644 index 4b3b526c5a..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mca_dma.h +++ /dev/null @@ -1,202 +0,0 @@ -#ifndef MCA_DMA_H -#define MCA_DMA_H - -#include -#include - -/* - * Microchannel specific DMA stuff. DMA on an MCA machine is fairly similar to - * standard PC dma, but it certainly has its quirks. DMA register addresses - * are in a different place and there are some added functions. Most of this - * should be pretty obvious on inspection. Note that the user must divide - * count by 2 when using 16-bit dma; that is not handled by these functions. - * - * Ramen Noodles are yummy. - * - * 1998 Tymm Twillman - */ - -/* - * Registers that are used by the DMA controller; FN is the function register - * (tell the controller what to do) and EXE is the execution register (how - * to do it) - */ - -#define MCA_DMA_REG_FN 0x18 -#define MCA_DMA_REG_EXE 0x1A - -/* - * Functions that the DMA controller can do - */ - -#define MCA_DMA_FN_SET_IO 0x00 -#define MCA_DMA_FN_SET_ADDR 0x20 -#define MCA_DMA_FN_GET_ADDR 0x30 -#define MCA_DMA_FN_SET_COUNT 0x40 -#define MCA_DMA_FN_GET_COUNT 0x50 -#define MCA_DMA_FN_GET_STATUS 0x60 -#define MCA_DMA_FN_SET_MODE 0x70 -#define MCA_DMA_FN_SET_ARBUS 0x80 -#define MCA_DMA_FN_MASK 0x90 -#define MCA_DMA_FN_RESET_MASK 0xA0 -#define MCA_DMA_FN_MASTER_CLEAR 0xD0 - -/* - * Modes (used by setting MCA_DMA_FN_MODE in the function register) - * - * Note that the MODE_READ is read from memory (write to device), and - * MODE_WRITE is vice-versa. - */ - -#define MCA_DMA_MODE_XFER 0x04 /* read by default */ -#define MCA_DMA_MODE_READ 0x04 /* same as XFER */ -#define MCA_DMA_MODE_WRITE 0x08 /* OR with MODE_XFER to use */ -#define MCA_DMA_MODE_IO 0x01 /* DMA from IO register */ -#define MCA_DMA_MODE_16 0x40 /* 16 bit xfers */ - - -/** - * mca_enable_dma - channel to enable DMA on - * @dmanr: DMA channel - * - * Enable the MCA bus DMA on a channel. This can be called from - * IRQ context. - */ - -static __inline__ void mca_enable_dma(unsigned int dmanr) -{ - outb(MCA_DMA_FN_RESET_MASK | dmanr, MCA_DMA_REG_FN); -} - -/** - * mca_disble_dma - channel to disable DMA on - * @dmanr: DMA channel - * - * Enable the MCA bus DMA on a channel. This can be called from - * IRQ context. - */ - -static __inline__ void mca_disable_dma(unsigned int dmanr) -{ - outb(MCA_DMA_FN_MASK | dmanr, MCA_DMA_REG_FN); -} - -/** - * mca_set_dma_addr - load a 24bit DMA address - * @dmanr: DMA channel - * @a: 24bit bus address - * - * Load the address register in the DMA controller. This has a 24bit - * limitation (16Mb). - */ - -static __inline__ void mca_set_dma_addr(unsigned int dmanr, unsigned int a) -{ - outb(MCA_DMA_FN_SET_ADDR | dmanr, MCA_DMA_REG_FN); - outb(a & 0xff, MCA_DMA_REG_EXE); - outb((a >> 8) & 0xff, MCA_DMA_REG_EXE); - outb((a >> 16) & 0xff, MCA_DMA_REG_EXE); -} - -/** - * mca_get_dma_addr - load a 24bit DMA address - * @dmanr: DMA channel - * - * Read the address register in the DMA controller. This has a 24bit - * limitation (16Mb). The return is a bus address. - */ - -static __inline__ unsigned int mca_get_dma_addr(unsigned int dmanr) -{ - unsigned int addr; - - outb(MCA_DMA_FN_GET_ADDR | dmanr, MCA_DMA_REG_FN); - addr = inb(MCA_DMA_REG_EXE); - addr |= inb(MCA_DMA_REG_EXE) << 8; - addr |= inb(MCA_DMA_REG_EXE) << 16; - - return addr; -} - -/** - * mca_set_dma_count - load a 16bit transfer count - * @dmanr: DMA channel - * @count: count - * - * Set the DMA count for this channel. This can be up to 64Kbytes. - * Setting a count of zero will not do what you expect. - */ - -static __inline__ void mca_set_dma_count(unsigned int dmanr, unsigned int count) -{ - count--; /* transfers one more than count -- correct for this */ - - outb(MCA_DMA_FN_SET_COUNT | dmanr, MCA_DMA_REG_FN); - outb(count & 0xff, MCA_DMA_REG_EXE); - outb((count >> 8) & 0xff, MCA_DMA_REG_EXE); -} - -/** - * mca_get_dma_residue - get the remaining bytes to transfer - * @dmanr: DMA channel - * - * This function returns the number of bytes left to transfer - * on this DMA channel. - */ - -static __inline__ unsigned int mca_get_dma_residue(unsigned int dmanr) -{ - unsigned short count; - - outb(MCA_DMA_FN_GET_COUNT | dmanr, MCA_DMA_REG_FN); - count = 1 + inb(MCA_DMA_REG_EXE); - count += inb(MCA_DMA_REG_EXE) << 8; - - return count; -} - -/** - * mca_set_dma_io - set the port for an I/O transfer - * @dmanr: DMA channel - * @io_addr: an I/O port number - * - * Unlike the ISA bus DMA controllers the DMA on MCA bus can transfer - * with an I/O port target. - */ - -static __inline__ void mca_set_dma_io(unsigned int dmanr, unsigned int io_addr) -{ - /* - * DMA from a port address -- set the io address - */ - - outb(MCA_DMA_FN_SET_IO | dmanr, MCA_DMA_REG_FN); - outb(io_addr & 0xff, MCA_DMA_REG_EXE); - outb((io_addr >> 8) & 0xff, MCA_DMA_REG_EXE); -} - -/** - * mca_set_dma_mode - set the DMA mode - * @dmanr: DMA channel - * @mode: mode to set - * - * The DMA controller supports several modes. The mode values you can - * set are : - * - * %MCA_DMA_MODE_READ when reading from the DMA device. - * - * %MCA_DMA_MODE_WRITE to writing to the DMA device. - * - * %MCA_DMA_MODE_IO to do DMA to or from an I/O port. - * - * %MCA_DMA_MODE_16 to do 16bit transfers. - * - */ - -static __inline__ void mca_set_dma_mode(unsigned int dmanr, unsigned int mode) -{ - outb(MCA_DMA_FN_SET_MODE | dmanr, MCA_DMA_REG_FN); - outb(mode, MCA_DMA_REG_EXE); -} - -#endif /* MCA_DMA_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mman.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mman.h deleted file mode 100644 index f953c436ce..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mman.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef __I386_MMAN_H__ -#define __I386_MMAN_H__ - -#define PROT_READ 0x1 /* page can be read */ -#define PROT_WRITE 0x2 /* page can be written */ -#define PROT_EXEC 0x4 /* page can be executed */ -#define PROT_NONE 0x0 /* page can not be accessed */ - -#define MAP_SHARED 0x01 /* Share changes */ -#define MAP_PRIVATE 0x02 /* Changes are private */ -#define MAP_TYPE 0x0f /* Mask for type of mapping */ -#define MAP_FIXED 0x10 /* Interpret addr exactly */ -#define MAP_ANONYMOUS 0x20 /* don't use a file */ - -#define MAP_GROWSDOWN 0x0100 /* stack-like segment */ -#define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ -#define MAP_LOCKED 0x2000 /* pages are locked */ -#define MAP_NORESERVE 0x4000 /* don't check for reservations */ - -#define MS_ASYNC 1 /* sync memory asynchronously */ -#define MS_INVALIDATE 2 /* invalidate the caches */ -#define MS_SYNC 4 /* synchronous memory sync */ - -#define MCL_CURRENT 1 /* lock all current mappings */ -#define MCL_FUTURE 2 /* lock all future mappings */ - -#define MADV_NORMAL 0x0 /* default page-in behavior */ -#define MADV_RANDOM 0x1 /* page-in minimum required */ -#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ -#define MADV_WILLNEED 0x3 /* pre-fault pages */ -#define MADV_DONTNEED 0x4 /* discard these pages */ - -/* compatibility flags */ -#define MAP_ANON MAP_ANONYMOUS -#define MAP_FILE 0 - -#endif /* __I386_MMAN_H__ */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmx.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmx.h deleted file mode 100644 index 46b71da998..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmx.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _ASM_MMX_H -#define _ASM_MMX_H - -/* - * MMX 3Dnow! helper operations - */ - -#include - -extern void *_mmx_memcpy(void *to, const void *from, size_t size); -extern void mmx_clear_page(void *page); -extern void mmx_copy_page(void *to, void *from); - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/module.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/module.h deleted file mode 100644 index a55217377a..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/module.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _ASM_I386_MODULE_H -#define _ASM_I386_MODULE_H -/* - * This file contains the i386 architecture specific module code. - */ - -#define module_map(x) vmalloc(x) -#define module_unmap(x) vfree(x) -#define module_arch_init(x) (0) -#define arch_init_modules(x) do { } while (0) - -#endif /* _ASM_I386_MODULE_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mpspec.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mpspec.h deleted file mode 100644 index 8e1d34343c..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mpspec.h +++ /dev/null @@ -1,223 +0,0 @@ -#ifndef __ASM_MPSPEC_H -#define __ASM_MPSPEC_H - -/* - * Structure definitions for SMP machines following the - * Intel Multiprocessing Specification 1.1 and 1.4. - */ - -/* - * This tag identifies where the SMP configuration - * information is. - */ - -#define SMP_MAGIC_IDENT (('_'<<24)|('P'<<16)|('M'<<8)|'_') - -/* - * a maximum of 16 APICs with the current APIC ID architecture. - * xAPICs can have up to 256. SAPICs have 16 ID bits. - */ -#ifdef CONFIG_X86_CLUSTERED_APIC -#define MAX_APICS 256 -#else -#define MAX_APICS 16 -#endif - -#define MAX_MPC_ENTRY 1024 - -struct intel_mp_floating -{ - char mpf_signature[4]; /* "_MP_" */ - unsigned long mpf_physptr; /* Configuration table address */ - unsigned char mpf_length; /* Our length (paragraphs) */ - unsigned char mpf_specification;/* Specification version */ - unsigned char mpf_checksum; /* Checksum (makes sum 0) */ - unsigned char mpf_feature1; /* Standard or configuration ? */ - unsigned char mpf_feature2; /* Bit7 set for IMCR|PIC */ - unsigned char mpf_feature3; /* Unused (0) */ - unsigned char mpf_feature4; /* Unused (0) */ - unsigned char mpf_feature5; /* Unused (0) */ -}; - -struct mp_config_table -{ - char mpc_signature[4]; -#define MPC_SIGNATURE "PCMP" - unsigned short mpc_length; /* Size of table */ - char mpc_spec; /* 0x01 */ - char mpc_checksum; - char mpc_oem[8]; - char mpc_productid[12]; - unsigned long mpc_oemptr; /* 0 if not present */ - unsigned short mpc_oemsize; /* 0 if not present */ - unsigned short mpc_oemcount; - unsigned long mpc_lapic; /* APIC address */ - unsigned long reserved; -}; - -/* Followed by entries */ - -#define MP_PROCESSOR 0 -#define MP_BUS 1 -#define MP_IOAPIC 2 -#define MP_INTSRC 3 -#define MP_LINTSRC 4 -#define MP_TRANSLATION 192 /* Used by IBM NUMA-Q to describe node locality */ - -struct mpc_config_processor -{ - unsigned char mpc_type; - unsigned char mpc_apicid; /* Local APIC number */ - unsigned char mpc_apicver; /* Its versions */ - unsigned char mpc_cpuflag; -#define CPU_ENABLED 1 /* Processor is available */ -#define CPU_BOOTPROCESSOR 2 /* Processor is the BP */ - unsigned long mpc_cpufeature; -#define CPU_STEPPING_MASK 0x0F -#define CPU_MODEL_MASK 0xF0 -#define CPU_FAMILY_MASK 0xF00 - unsigned long mpc_featureflag; /* CPUID feature value */ - unsigned long mpc_reserved[2]; -}; - -struct mpc_config_bus -{ - unsigned char mpc_type; - unsigned char mpc_busid; - unsigned char mpc_bustype[6] __attribute((packed)); -}; - -/* List of Bus Type string values, Intel MP Spec. */ -#define BUSTYPE_EISA "EISA" -#define BUSTYPE_ISA "ISA" -#define BUSTYPE_INTERN "INTERN" /* Internal BUS */ -#define BUSTYPE_MCA "MCA" -#define BUSTYPE_VL "VL" /* Local bus */ -#define BUSTYPE_PCI "PCI" -#define BUSTYPE_PCMCIA "PCMCIA" -#define BUSTYPE_CBUS "CBUS" -#define BUSTYPE_CBUSII "CBUSII" -#define BUSTYPE_FUTURE "FUTURE" -#define BUSTYPE_MBI "MBI" -#define BUSTYPE_MBII "MBII" -#define BUSTYPE_MPI "MPI" -#define BUSTYPE_MPSA "MPSA" -#define BUSTYPE_NUBUS "NUBUS" -#define BUSTYPE_TC "TC" -#define BUSTYPE_VME "VME" -#define BUSTYPE_XPRESS "XPRESS" - -struct mpc_config_ioapic -{ - unsigned char mpc_type; - unsigned char mpc_apicid; - unsigned char mpc_apicver; - unsigned char mpc_flags; -#define MPC_APIC_USABLE 0x01 - unsigned long mpc_apicaddr; -}; - -struct mpc_config_intsrc -{ - unsigned char mpc_type; - unsigned char mpc_irqtype; - unsigned short mpc_irqflag; - unsigned char mpc_srcbus; - unsigned char mpc_srcbusirq; - unsigned char mpc_dstapic; - unsigned char mpc_dstirq; -}; - -enum mp_irq_source_types { - mp_INT = 0, - mp_NMI = 1, - mp_SMI = 2, - mp_ExtINT = 3 -}; - -#define MP_IRQDIR_DEFAULT 0 -#define MP_IRQDIR_HIGH 1 -#define MP_IRQDIR_LOW 3 - - -struct mpc_config_lintsrc -{ - unsigned char mpc_type; - unsigned char mpc_irqtype; - unsigned short mpc_irqflag; - unsigned char mpc_srcbusid; - unsigned char mpc_srcbusirq; - unsigned char mpc_destapic; -#define MP_APIC_ALL 0xFF - unsigned char mpc_destapiclint; -}; - -struct mp_config_oemtable -{ - char oem_signature[4]; -#define MPC_OEM_SIGNATURE "_OEM" - unsigned short oem_length; /* Size of table */ - char oem_rev; /* 0x01 */ - char oem_checksum; - char mpc_oem[8]; -}; - -struct mpc_config_translation -{ - unsigned char mpc_type; - unsigned char trans_len; - unsigned char trans_type; - unsigned char trans_quad; - unsigned char trans_global; - unsigned char trans_local; - unsigned short trans_reserved; -}; - -/* - * Default configurations - * - * 1 2 CPU ISA 82489DX - * 2 2 CPU EISA 82489DX neither IRQ 0 timer nor IRQ 13 DMA chaining - * 3 2 CPU EISA 82489DX - * 4 2 CPU MCA 82489DX - * 5 2 CPU ISA+PCI - * 6 2 CPU EISA+PCI - * 7 2 CPU MCA+PCI - */ - -#ifdef CONFIG_MULTIQUAD -#define MAX_IRQ_SOURCES 512 -#else /* !CONFIG_MULTIQUAD */ -#define MAX_IRQ_SOURCES 256 -#endif /* CONFIG_MULTIQUAD */ - -#define MAX_MP_BUSSES 32 -enum mp_bustype { - MP_BUS_ISA = 1, - MP_BUS_EISA, - MP_BUS_PCI, - MP_BUS_MCA -}; -extern int *mp_bus_id_to_type; -extern int *mp_bus_id_to_node; -extern int *mp_bus_id_to_local; -extern int *mp_bus_id_to_pci_bus; -extern int quad_local_to_mp_bus_id [NR_CPUS/4][4]; - -extern unsigned int boot_cpu_physical_apicid; -extern unsigned long phys_cpu_present_map; -extern int smp_found_config; -extern void find_smp_config (void); -extern void get_smp_config (void); -extern int nr_ioapics; -extern int apic_version [MAX_APICS]; -extern int mp_irq_entries; -extern struct mpc_config_intsrc *mp_irqs; -extern int mpc_default_type; -extern int mp_current_pci_id; -extern unsigned long mp_lapic_addr; -extern int pic_mode; -extern int using_apic_timer; - -#endif - diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msgbuf.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msgbuf.h deleted file mode 100644 index b8d659c157..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msgbuf.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _I386_MSGBUF_H -#define _I386_MSGBUF_H - -/* - * The msqid64_ds structure for i386 architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 64-bit time_t to solve y2038 problem - * - 2 miscellaneous 32-bit values - */ - -struct msqid64_ds { - struct ipc64_perm msg_perm; - __kernel_time_t msg_stime; /* last msgsnd time */ - unsigned long __unused1; - __kernel_time_t msg_rtime; /* last msgrcv time */ - unsigned long __unused2; - __kernel_time_t msg_ctime; /* last change time */ - unsigned long __unused3; - unsigned long msg_cbytes; /* current number of bytes on queue */ - unsigned long msg_qnum; /* number of messages in queue */ - unsigned long msg_qbytes; /* max number of bytes on queue */ - __kernel_pid_t msg_lspid; /* pid of last msgsnd */ - __kernel_pid_t msg_lrpid; /* last receive pid */ - unsigned long __unused4; - unsigned long __unused5; -}; - -#endif /* _I386_MSGBUF_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msr.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msr.h deleted file mode 100644 index 45ec765e6e..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msr.h +++ /dev/null @@ -1,121 +0,0 @@ -#ifndef __ASM_MSR_H -#define __ASM_MSR_H - -/* - * Access to machine-specific registers (available on 586 and better only) - * Note: the rd* operations modify the parameters directly (without using - * pointer indirection), this allows gcc to optimize better - */ - -#define rdmsr(msr,val1,val2) \ - __asm__ __volatile__("rdmsr" \ - : "=a" (val1), "=d" (val2) \ - : "c" (msr)) - -#define wrmsr(msr,val1,val2) \ - __asm__ __volatile__("wrmsr" \ - : /* no outputs */ \ - : "c" (msr), "a" (val1), "d" (val2)) - -#define rdtsc(low,high) \ - __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) - -#define rdtscl(low) \ - __asm__ __volatile__("rdtsc" : "=a" (low) : : "edx") - -#define rdtscll(val) \ - __asm__ __volatile__("rdtsc" : "=A" (val)) - -#define write_tsc(val1,val2) wrmsr(0x10, val1, val2) - -#define rdpmc(counter,low,high) \ - __asm__ __volatile__("rdpmc" \ - : "=a" (low), "=d" (high) \ - : "c" (counter)) - -/* symbolic names for some interesting MSRs */ -/* Intel defined MSRs. */ -#define MSR_IA32_P5_MC_ADDR 0 -#define MSR_IA32_P5_MC_TYPE 1 -#define MSR_IA32_PLATFORM_ID 0x17 -#define MSR_IA32_EBL_CR_POWERON 0x2a - -#define MSR_IA32_APICBASE 0x1b -#define MSR_IA32_APICBASE_BSP (1<<8) -#define MSR_IA32_APICBASE_ENABLE (1<<11) -#define MSR_IA32_APICBASE_BASE (0xfffff<<12) - -#define MSR_IA32_UCODE_WRITE 0x79 -#define MSR_IA32_UCODE_REV 0x8b - -#define MSR_IA32_BBL_CR_CTL 0x119 - -#define MSR_IA32_MCG_CAP 0x179 -#define MSR_IA32_MCG_STATUS 0x17a -#define MSR_IA32_MCG_CTL 0x17b - -#define MSR_IA32_THERM_CONTROL 0x19a -#define MSR_IA32_THERM_INTERRUPT 0x19b -#define MSR_IA32_THERM_STATUS 0x19c -#define MSR_IA32_MISC_ENABLE 0x1a0 - -#define MSR_IA32_DEBUGCTLMSR 0x1d9 -#define MSR_IA32_LASTBRANCHFROMIP 0x1db -#define MSR_IA32_LASTBRANCHTOIP 0x1dc -#define MSR_IA32_LASTINTFROMIP 0x1dd -#define MSR_IA32_LASTINTTOIP 0x1de - -#define MSR_IA32_MC0_CTL 0x400 -#define MSR_IA32_MC0_STATUS 0x401 -#define MSR_IA32_MC0_ADDR 0x402 -#define MSR_IA32_MC0_MISC 0x403 - -#define MSR_P6_PERFCTR0 0xc1 -#define MSR_P6_PERFCTR1 0xc2 -#define MSR_P6_EVNTSEL0 0x186 -#define MSR_P6_EVNTSEL1 0x187 - -/* AMD Defined MSRs */ -#define MSR_K6_EFER 0xC0000080 -#define MSR_K6_STAR 0xC0000081 -#define MSR_K6_WHCR 0xC0000082 -#define MSR_K6_UWCCR 0xC0000085 -#define MSR_K6_EPMR 0xC0000086 -#define MSR_K6_PSOR 0xC0000087 -#define MSR_K6_PFIR 0xC0000088 - -#define MSR_K7_EVNTSEL0 0xC0010000 -#define MSR_K7_PERFCTR0 0xC0010004 -#define MSR_K7_HWCR 0xC0010015 -#define MSR_K7_CLK_CTL 0xC001001b -#define MSR_K7_FID_VID_CTL 0xC0010041 -#define MSR_K7_VID_STATUS 0xC0010042 - -/* Centaur-Hauls/IDT defined MSRs. */ -#define MSR_IDT_FCR1 0x107 -#define MSR_IDT_FCR2 0x108 -#define MSR_IDT_FCR3 0x109 -#define MSR_IDT_FCR4 0x10a - -#define MSR_IDT_MCR0 0x110 -#define MSR_IDT_MCR1 0x111 -#define MSR_IDT_MCR2 0x112 -#define MSR_IDT_MCR3 0x113 -#define MSR_IDT_MCR4 0x114 -#define MSR_IDT_MCR5 0x115 -#define MSR_IDT_MCR6 0x116 -#define MSR_IDT_MCR7 0x117 -#define MSR_IDT_MCR_CTRL 0x120 - -/* VIA Cyrix defined MSRs*/ -#define MSR_VIA_FCR 0x1107 -#define MSR_VIA_LONGHAUL 0x110a -#define MSR_VIA_BCR2 0x1147 - -/* Transmeta defined MSRs */ -#define MSR_TMTA_LONGRUN_CTRL 0x80868010 -#define MSR_TMTA_LONGRUN_FLAGS 0x80868011 -#define MSR_TMTA_LRTI_READOUT 0x80868018 -#define MSR_TMTA_LRTI_VOLT_MHZ 0x8086801a - -#endif /* __ASM_MSR_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mtrr.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mtrr.h deleted file mode 100644 index ff3ea870d0..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mtrr.h +++ /dev/null @@ -1,127 +0,0 @@ -/* Generic MTRR (Memory Type Range Register) ioctls. - - Copyright (C) 1997-1999 Richard Gooch - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - Richard Gooch may be reached by email at rgooch@atnf.csiro.au - The postal address is: - Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. -*/ -#ifndef _LINUX_MTRR_H -#define _LINUX_MTRR_H - -#include -#include - -#define MTRR_IOCTL_BASE 'M' - -struct mtrr_sentry -{ - unsigned long base; /* Base address */ - unsigned long size; /* Size of region */ - unsigned int type; /* Type of region */ -}; - -struct mtrr_gentry -{ - unsigned int regnum; /* Register number */ - unsigned long base; /* Base address */ - unsigned long size; /* Size of region */ - unsigned int type; /* Type of region */ -}; - -/* These are the various ioctls */ -#define MTRRIOC_ADD_ENTRY _IOW(MTRR_IOCTL_BASE, 0, struct mtrr_sentry) -#define MTRRIOC_SET_ENTRY _IOW(MTRR_IOCTL_BASE, 1, struct mtrr_sentry) -#define MTRRIOC_DEL_ENTRY _IOW(MTRR_IOCTL_BASE, 2, struct mtrr_sentry) -#define MTRRIOC_GET_ENTRY _IOWR(MTRR_IOCTL_BASE, 3, struct mtrr_gentry) -#define MTRRIOC_KILL_ENTRY _IOW(MTRR_IOCTL_BASE, 4, struct mtrr_sentry) -#define MTRRIOC_ADD_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 5, struct mtrr_sentry) -#define MTRRIOC_SET_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 6, struct mtrr_sentry) -#define MTRRIOC_DEL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 7, struct mtrr_sentry) -#define MTRRIOC_GET_PAGE_ENTRY _IOWR(MTRR_IOCTL_BASE, 8, struct mtrr_gentry) -#define MTRRIOC_KILL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 9, struct mtrr_sentry) - -/* These are the region types */ -#define MTRR_TYPE_UNCACHABLE 0 -#define MTRR_TYPE_WRCOMB 1 -/*#define MTRR_TYPE_ 2*/ -/*#define MTRR_TYPE_ 3*/ -#define MTRR_TYPE_WRTHROUGH 4 -#define MTRR_TYPE_WRPROT 5 -#define MTRR_TYPE_WRBACK 6 -#define MTRR_NUM_TYPES 7 - -#ifdef MTRR_NEED_STRINGS -static char *mtrr_strings[MTRR_NUM_TYPES] = -{ - "uncachable", /* 0 */ - "write-combining", /* 1 */ - "?", /* 2 */ - "?", /* 3 */ - "write-through", /* 4 */ - "write-protect", /* 5 */ - "write-back", /* 6 */ -}; -#endif - -#ifdef __KERNEL__ - -/* The following functions are for use by other drivers */ -# ifdef CONFIG_MTRR -extern int mtrr_add (unsigned long base, unsigned long size, - unsigned int type, char increment); -extern int mtrr_add_page (unsigned long base, unsigned long size, - unsigned int type, char increment); -extern int mtrr_del (int reg, unsigned long base, unsigned long size); -extern int mtrr_del_page (int reg, unsigned long base, unsigned long size); -extern void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi); -# else -static __inline__ int mtrr_add (unsigned long base, unsigned long size, - unsigned int type, char increment) -{ - return -ENODEV; -} -static __inline__ int mtrr_add_page (unsigned long base, unsigned long size, - unsigned int type, char increment) -{ - return -ENODEV; -} -static __inline__ int mtrr_del (int reg, unsigned long base, - unsigned long size) -{ - return -ENODEV; -} -static __inline__ int mtrr_del_page (int reg, unsigned long base, - unsigned long size) -{ - return -ENODEV; -} - -static __inline__ void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi) {;} - -# endif - -/* The following functions are for initialisation: don't use them! */ -extern int mtrr_init (void); -# if defined(CONFIG_SMP) && defined(CONFIG_MTRR) -extern void mtrr_init_boot_cpu (void); -extern void mtrr_init_secondary_cpu (void); -# endif - -#endif - -#endif /* _LINUX_MTRR_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/namei.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/namei.h deleted file mode 100644 index 8148650886..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/namei.h +++ /dev/null @@ -1,17 +0,0 @@ -/* $Id: namei.h,v 1.1 1996/12/13 14:48:21 jj Exp $ - * linux/include/asm-i386/namei.h - * - * Included from linux/fs/namei.c - */ - -#ifndef __I386_NAMEI_H -#define __I386_NAMEI_H - -/* This dummy routine maybe changed to something useful - * for /usr/gnemul/ emulation stuff. - * Look at asm-sparc/namei.h for details. - */ - -#define __emul_prefix() NULL - -#endif /* __I386_NAMEI_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/param.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/param.h deleted file mode 100644 index 1b10bf49fe..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/param.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef _ASMi386_PARAM_H -#define _ASMi386_PARAM_H - -#ifndef HZ -#define HZ 100 -#endif - -#define EXEC_PAGESIZE 4096 - -#ifndef NGROUPS -#define NGROUPS 32 -#endif - -#ifndef NOGROUP -#define NOGROUP (-1) -#endif - -#define MAXHOSTNAMELEN 64 /* max length of hostname */ - -#ifdef __KERNEL__ -# define CLOCKS_PER_SEC 100 /* frequency at which times() counts */ -#endif - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/parport.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/parport.h deleted file mode 100644 index fa0e321e49..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/parport.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * parport.h: ia32-specific parport initialisation - * - * Copyright (C) 1999, 2000 Tim Waugh - * - * This file should only be included by drivers/parport/parport_pc.c. - */ - -#ifndef _ASM_I386_PARPORT_H -#define _ASM_I386_PARPORT_H 1 - -static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); -static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) -{ - return parport_pc_find_isa_ports (autoirq, autodma); -} - -#endif /* !(_ASM_I386_PARPORT_H) */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/poll.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/poll.h deleted file mode 100644 index e5feda71b3..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/poll.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __i386_POLL_H -#define __i386_POLL_H - -/* These are specified by iBCS2 */ -#define POLLIN 0x0001 -#define POLLPRI 0x0002 -#define POLLOUT 0x0004 -#define POLLERR 0x0008 -#define POLLHUP 0x0010 -#define POLLNVAL 0x0020 - -/* The rest seem to be more-or-less nonstandard. Check them! */ -#define POLLRDNORM 0x0040 -#define POLLRDBAND 0x0080 -#define POLLWRNORM 0x0100 -#define POLLWRBAND 0x0200 -#define POLLMSG 0x0400 - -struct pollfd { - int fd; - short events; - short revents; -}; - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/posix_types.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/posix_types.h deleted file mode 100644 index 5529f32702..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/posix_types.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef __ARCH_I386_POSIX_TYPES_H -#define __ARCH_I386_POSIX_TYPES_H - -/* - * This file is generally used by user-level software, so you need to - * be a little careful about namespace pollution etc. Also, we cannot - * assume GCC is being used. - */ - -typedef unsigned short __kernel_dev_t; -typedef unsigned long __kernel_ino_t; -typedef unsigned short __kernel_mode_t; -typedef unsigned short __kernel_nlink_t; -typedef long __kernel_off_t; -typedef int __kernel_pid_t; -typedef unsigned short __kernel_ipc_pid_t; -typedef unsigned short __kernel_uid_t; -typedef unsigned short __kernel_gid_t; -typedef unsigned int __kernel_size_t; -typedef int __kernel_ssize_t; -typedef int __kernel_ptrdiff_t; -typedef long __kernel_time_t; -typedef long __kernel_suseconds_t; -typedef long __kernel_clock_t; -typedef int __kernel_daddr_t; -typedef char * __kernel_caddr_t; -typedef unsigned short __kernel_uid16_t; -typedef unsigned short __kernel_gid16_t; -typedef unsigned int __kernel_uid32_t; -typedef unsigned int __kernel_gid32_t; - -typedef unsigned short __kernel_old_uid_t; -typedef unsigned short __kernel_old_gid_t; - -#ifdef __GNUC__ -typedef long long __kernel_loff_t; -#endif - -typedef struct { -#if defined(__KERNEL__) || defined(__USE_ALL) - int val[2]; -#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */ - int __val[2]; -#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */ -} __kernel_fsid_t; - -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) - -#undef __FD_SET -#define __FD_SET(fd,fdsetp) \ - __asm__ __volatile__("btsl %1,%0": \ - "=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd))) - -#undef __FD_CLR -#define __FD_CLR(fd,fdsetp) \ - __asm__ __volatile__("btrl %1,%0": \ - "=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd))) - -#undef __FD_ISSET -#define __FD_ISSET(fd,fdsetp) (__extension__ ({ \ - unsigned char __result; \ - __asm__ __volatile__("btl %1,%2 ; setb %0" \ - :"=q" (__result) :"r" ((int) (fd)), \ - "m" (*(__kernel_fd_set *) (fdsetp))); \ - __result; })) - -#undef __FD_ZERO -#define __FD_ZERO(fdsetp) \ -do { \ - int __d0, __d1; \ - __asm__ __volatile__("cld ; rep ; stosl" \ - :"=m" (*(__kernel_fd_set *) (fdsetp)), \ - "=&c" (__d0), "=&D" (__d1) \ - :"a" (0), "1" (__FDSET_LONGS), \ - "2" ((__kernel_fd_set *) (fdsetp)) : "memory"); \ -} while (0) - -#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */ - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/resource.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/resource.h deleted file mode 100644 index e0da3ad1d0..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/resource.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef _I386_RESOURCE_H -#define _I386_RESOURCE_H - -/* - * Resource limits - */ - -#define RLIMIT_CPU 0 /* CPU time in ms */ -#define RLIMIT_FSIZE 1 /* Maximum filesize */ -#define RLIMIT_DATA 2 /* max data size */ -#define RLIMIT_STACK 3 /* max stack size */ -#define RLIMIT_CORE 4 /* max core file size */ -#define RLIMIT_RSS 5 /* max resident set size */ -#define RLIMIT_NPROC 6 /* max number of processes */ -#define RLIMIT_NOFILE 7 /* max number of open files */ -#define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space */ -#define RLIMIT_AS 9 /* address space limit */ -#define RLIMIT_LOCKS 10 /* maximum file locks held */ - -#define RLIM_NLIMITS 11 - -/* - * SuS says limits have to be unsigned. - * Which makes a ton more sense anyway. - */ -#define RLIM_INFINITY (~0UL) - -#ifdef __KERNEL__ - -#define INIT_RLIMITS \ -{ \ - { RLIM_INFINITY, RLIM_INFINITY }, \ - { RLIM_INFINITY, RLIM_INFINITY }, \ - { RLIM_INFINITY, RLIM_INFINITY }, \ - { _STK_LIM, RLIM_INFINITY }, \ - { 0, RLIM_INFINITY }, \ - { RLIM_INFINITY, RLIM_INFINITY }, \ - { 0, 0 }, \ - { INR_OPEN, INR_OPEN }, \ - { RLIM_INFINITY, RLIM_INFINITY }, \ - { RLIM_INFINITY, RLIM_INFINITY }, \ - { RLIM_INFINITY, RLIM_INFINITY }, \ -} - -#endif /* __KERNEL__ */ - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwlock.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwlock.h deleted file mode 100644 index 5c2f47040f..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwlock.h +++ /dev/null @@ -1,83 +0,0 @@ -/* include/asm-i386/rwlock.h - * - * Helpers used by both rw spinlocks and rw semaphores. - * - * Based in part on code from semaphore.h and - * spinlock.h Copyright 1996 Linus Torvalds. - * - * Copyright 1999 Red Hat, Inc. - * - * Written by Benjamin LaHaise. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _ASM_I386_RWLOCK_H -#define _ASM_I386_RWLOCK_H - -#define RW_LOCK_BIAS 0x01000000 -#define RW_LOCK_BIAS_STR "0x01000000" - -#define __build_read_lock_ptr(rw, helper) \ - asm volatile(LOCK "subl $1,(%0)\n\t" \ - "js 2f\n" \ - "1:\n" \ - LOCK_SECTION_START("") \ - "2:\tcall " helper "\n\t" \ - "jmp 1b\n" \ - LOCK_SECTION_END \ - ::"a" (rw) : "memory") - -#define __build_read_lock_const(rw, helper) \ - asm volatile(LOCK "subl $1,%0\n\t" \ - "js 2f\n" \ - "1:\n" \ - LOCK_SECTION_START("") \ - "2:\tpushl %%eax\n\t" \ - "leal %0,%%eax\n\t" \ - "call " helper "\n\t" \ - "popl %%eax\n\t" \ - "jmp 1b\n" \ - LOCK_SECTION_END \ - :"=m" (*(volatile int *)rw) : : "memory") - -#define __build_read_lock(rw, helper) do { \ - if (__builtin_constant_p(rw)) \ - __build_read_lock_const(rw, helper); \ - else \ - __build_read_lock_ptr(rw, helper); \ - } while (0) - -#define __build_write_lock_ptr(rw, helper) \ - asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ - "jnz 2f\n" \ - "1:\n" \ - LOCK_SECTION_START("") \ - "2:\tcall " helper "\n\t" \ - "jmp 1b\n" \ - LOCK_SECTION_END \ - ::"a" (rw) : "memory") - -#define __build_write_lock_const(rw, helper) \ - asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ - "jnz 2f\n" \ - "1:\n" \ - LOCK_SECTION_START("") \ - "2:\tpushl %%eax\n\t" \ - "leal %0,%%eax\n\t" \ - "call " helper "\n\t" \ - "popl %%eax\n\t" \ - "jmp 1b\n" \ - LOCK_SECTION_END \ - :"=m" (*(volatile int *)rw) : : "memory") - -#define __build_write_lock(rw, helper) do { \ - if (__builtin_constant_p(rw)) \ - __build_write_lock_const(rw, helper); \ - else \ - __build_write_lock_ptr(rw, helper); \ - } while (0) - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwsem.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwsem.h deleted file mode 100644 index 0765f92f79..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwsem.h +++ /dev/null @@ -1,264 +0,0 @@ -/* rwsem.h: R/W semaphores implemented using XADD/CMPXCHG for i486+ - * - * Written by David Howells (dhowells@redhat.com). - * - * Derived from asm-i386/semaphore.h - * - * Trylock by Brian Watson (Brian.J.Watson@compaq.com). - * - * - * The MSW of the count is the negated number of active writers and waiting - * lockers, and the LSW is the total number of active locks - * - * The lock count is initialized to 0 (no active and no waiting lockers). - * - * When a writer subtracts WRITE_BIAS, it'll get 0xffff0001 for the case of an - * uncontended lock. This can be determined because XADD returns the old value. - * Readers increment by 1 and see a positive value when uncontended, negative - * if there are writers (and maybe) readers waiting (in which case it goes to - * sleep). - * - * The value of WAITING_BIAS supports up to 32766 waiting processes. This can - * be extended to 65534 by manually checking the whole MSW rather than relying - * on the S flag. - * - * The value of ACTIVE_BIAS supports up to 65535 active processes. - * - * This should be totally fair - if anything is waiting, a process that wants a - * lock will go to the back of the queue. When the currently active lock is - * released, if there's a writer at the front of the queue, then that and only - * that will be woken up; if there's a bunch of consequtive readers at the - * front, then they'll all be woken up, but no other readers will be. - */ - -#ifndef _I386_RWSEM_H -#define _I386_RWSEM_H - -#ifndef _LINUX_RWSEM_H -#error please dont include asm/rwsem.h directly, use linux/rwsem.h instead -#endif - -#ifdef __KERNEL__ - -#include -#include - -struct rwsem_waiter; - -extern struct rw_semaphore *FASTCALL(rwsem_down_read_failed(struct rw_semaphore *sem)); -extern struct rw_semaphore *FASTCALL(rwsem_down_write_failed(struct rw_semaphore *sem)); -extern struct rw_semaphore *FASTCALL(rwsem_wake(struct rw_semaphore *)); - -/* - * the semaphore definition - */ -struct rw_semaphore { - signed long count; -#define RWSEM_UNLOCKED_VALUE 0x00000000 -#define RWSEM_ACTIVE_BIAS 0x00000001 -#define RWSEM_ACTIVE_MASK 0x0000ffff -#define RWSEM_WAITING_BIAS (-0x00010000) -#define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS -#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) - spinlock_t wait_lock; - struct list_head wait_list; -#if RWSEM_DEBUG - int debug; -#endif -}; - -/* - * initialisation - */ -#if RWSEM_DEBUG -#define __RWSEM_DEBUG_INIT , 0 -#else -#define __RWSEM_DEBUG_INIT /* */ -#endif - -#define __RWSEM_INITIALIZER(name) \ -{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) \ - __RWSEM_DEBUG_INIT } - -#define DECLARE_RWSEM(name) \ - struct rw_semaphore name = __RWSEM_INITIALIZER(name) - -static inline void init_rwsem(struct rw_semaphore *sem) -{ - sem->count = RWSEM_UNLOCKED_VALUE; - spin_lock_init(&sem->wait_lock); - INIT_LIST_HEAD(&sem->wait_list); -#if RWSEM_DEBUG - sem->debug = 0; -#endif -} - -/* - * lock for reading - */ -static inline void __down_read(struct rw_semaphore *sem) -{ - __asm__ __volatile__( - "# beginning down_read\n\t" -LOCK_PREFIX " incl (%%eax)\n\t" /* adds 0x00000001, returns the old value */ - " js 2f\n\t" /* jump if we weren't granted the lock */ - "1:\n\t" - LOCK_SECTION_START("") - "2:\n\t" - " pushl %%ecx\n\t" - " pushl %%edx\n\t" - " call rwsem_down_read_failed\n\t" - " popl %%edx\n\t" - " popl %%ecx\n\t" - " jmp 1b\n" - LOCK_SECTION_END - "# ending down_read\n\t" - : "+m"(sem->count) - : "a"(sem) - : "memory", "cc"); -} - -/* - * trylock for reading -- returns 1 if successful, 0 if contention - */ -static inline int __down_read_trylock(struct rw_semaphore *sem) -{ - __s32 result, tmp; - __asm__ __volatile__( - "# beginning __down_read_trylock\n\t" - " movl %0,%1\n\t" - "1:\n\t" - " movl %1,%2\n\t" - " addl %3,%2\n\t" - " jle 2f\n\t" -LOCK_PREFIX " cmpxchgl %2,%0\n\t" - " jnz 1b\n\t" - "2:\n\t" - "# ending __down_read_trylock\n\t" - : "+m"(sem->count), "=&a"(result), "=&r"(tmp) - : "i"(RWSEM_ACTIVE_READ_BIAS) - : "memory", "cc"); - return result>=0 ? 1 : 0; -} - -/* - * lock for writing - */ -static inline void __down_write(struct rw_semaphore *sem) -{ - int tmp; - - tmp = RWSEM_ACTIVE_WRITE_BIAS; - __asm__ __volatile__( - "# beginning down_write\n\t" -LOCK_PREFIX " xadd %0,(%%eax)\n\t" /* subtract 0x0000ffff, returns the old value */ - " testl %0,%0\n\t" /* was the count 0 before? */ - " jnz 2f\n\t" /* jump if we weren't granted the lock */ - "1:\n\t" - LOCK_SECTION_START("") - "2:\n\t" - " pushl %%ecx\n\t" - " call rwsem_down_write_failed\n\t" - " popl %%ecx\n\t" - " jmp 1b\n" - LOCK_SECTION_END - "# ending down_write" - : "+d"(tmp), "+m"(sem->count) - : "a"(sem) - : "memory", "cc"); -} - -/* - * trylock for writing -- returns 1 if successful, 0 if contention - */ -static inline int __down_write_trylock(struct rw_semaphore *sem) -{ - signed long ret = cmpxchg(&sem->count, - RWSEM_UNLOCKED_VALUE, - RWSEM_ACTIVE_WRITE_BIAS); - if (ret == RWSEM_UNLOCKED_VALUE) - return 1; - return 0; -} - -/* - * unlock after reading - */ -static inline void __up_read(struct rw_semaphore *sem) -{ - __s32 tmp = -RWSEM_ACTIVE_READ_BIAS; - __asm__ __volatile__( - "# beginning __up_read\n\t" -LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtracts 1, returns the old value */ - " js 2f\n\t" /* jump if the lock is being waited upon */ - "1:\n\t" - LOCK_SECTION_START("") - "2:\n\t" - " decw %%dx\n\t" /* do nothing if still outstanding active readers */ - " jnz 1b\n\t" - " pushl %%ecx\n\t" - " call rwsem_wake\n\t" - " popl %%ecx\n\t" - " jmp 1b\n" - LOCK_SECTION_END - "# ending __up_read\n" - : "+m"(sem->count), "+d"(tmp) - : "a"(sem) - : "memory", "cc"); -} - -/* - * unlock after writing - */ -static inline void __up_write(struct rw_semaphore *sem) -{ - __asm__ __volatile__( - "# beginning __up_write\n\t" - " movl %2,%%edx\n\t" -LOCK_PREFIX " xaddl %%edx,(%%eax)\n\t" /* tries to transition 0xffff0001 -> 0x00000000 */ - " jnz 2f\n\t" /* jump if the lock is being waited upon */ - "1:\n\t" - LOCK_SECTION_START("") - "2:\n\t" - " decw %%dx\n\t" /* did the active count reduce to 0? */ - " jnz 1b\n\t" /* jump back if not */ - " pushl %%ecx\n\t" - " call rwsem_wake\n\t" - " popl %%ecx\n\t" - " jmp 1b\n" - LOCK_SECTION_END - "# ending __up_write\n" - : "+m"(sem->count) - : "a"(sem), "i"(-RWSEM_ACTIVE_WRITE_BIAS) - : "memory", "cc", "edx"); -} - -/* - * implement atomic add functionality - */ -static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem) -{ - __asm__ __volatile__( -LOCK_PREFIX "addl %1,%0" - :"=m"(sem->count) - :"ir"(delta), "m"(sem->count)); -} - -/* - * implement exchange and add functionality - */ -static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem) -{ - int tmp = delta; - - __asm__ __volatile__( -LOCK_PREFIX "xadd %0,(%2)" - : "+r"(tmp), "=m"(sem->count) - : "r"(sem), "m"(sem->count) - : "memory"); - - return tmp+delta; -} - -#endif /* __KERNEL__ */ -#endif /* _I386_RWSEM_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/scatterlist.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/scatterlist.h deleted file mode 100644 index 272104b369..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/scatterlist.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _I386_SCATTERLIST_H -#define _I386_SCATTERLIST_H - -/* - * Drivers must set either ->address or (preferred) ->page and ->offset - * to indicate where data must be transferred to/from. - * - * Using ->page is recommended since it handles highmem data as well as - * low mem. ->address is restricted to data which has a virtual mapping, and - * it will go away in the future. Updating to ->page can be automated very - * easily -- something like - * - * sg->address = some_ptr; - * - * can be rewritten as - * - * sg->page = virt_to_page(some_ptr); - * sg->offset = (unsigned long) some_ptr & ~PAGE_MASK; - * - * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens - */ -struct scatterlist { - char * address; /* Location data is to be transferred to, NULL for - * highmem page */ - struct page * page; /* Location for highmem page, if any */ - unsigned int offset;/* for highmem, page offset */ - - dma_addr_t dma_address; - unsigned int length; -}; - -#define ISA_DMA_THRESHOLD (0x00ffffff) - -#endif /* !(_I386_SCATTERLIST_H) */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/semaphore.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/semaphore.h deleted file mode 100644 index ad86f852d5..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/semaphore.h +++ /dev/null @@ -1,222 +0,0 @@ -#ifndef _I386_SEMAPHORE_H -#define _I386_SEMAPHORE_H - -#include - -#ifdef __KERNEL__ - -/* - * SMP- and interrupt-safe semaphores.. - * - * (C) Copyright 1996 Linus Torvalds - * - * Modified 1996-12-23 by Dave Grothe to fix bugs in - * the original code and to make semaphore waits - * interruptible so that processes waiting on - * semaphores can be killed. - * Modified 1999-02-14 by Andrea Arcangeli, split the sched.c helper - * functions in asm/sempahore-helper.h while fixing a - * potential and subtle race discovered by Ulrich Schmid - * in down_interruptible(). Since I started to play here I - * also implemented the `trylock' semaphore operation. - * 1999-07-02 Artur Skawina - * Optimized "0(ecx)" -> "(ecx)" (the assembler does not - * do this). Changed calling sequences from push/jmp to - * traditional call/ret. - * Modified 2001-01-01 Andreas Franck - * Some hacks to ensure compatibility with recent - * GCC snapshots, to avoid stack corruption when compiling - * with -fomit-frame-pointer. It's not sure if this will - * be fixed in GCC, as our previous implementation was a - * bit dubious. - * - * If you would like to see an analysis of this implementation, please - * ftp to gcom.com and download the file - * /pub/linux/src/semaphore/semaphore-2.0.24.tar.gz. - * - */ - -#include -#include -#include -#include - -struct semaphore { - atomic_t count; - int sleepers; - wait_queue_head_t wait; -#if WAITQUEUE_DEBUG - long __magic; -#endif -}; - -#if WAITQUEUE_DEBUG -# define __SEM_DEBUG_INIT(name) \ - , (int)&(name).__magic -#else -# define __SEM_DEBUG_INIT(name) -#endif - -#define __SEMAPHORE_INITIALIZER(name,count) \ -{ ATOMIC_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ - __SEM_DEBUG_INIT(name) } - -#define __MUTEX_INITIALIZER(name) \ - __SEMAPHORE_INITIALIZER(name,1) - -#define __DECLARE_SEMAPHORE_GENERIC(name,count) \ - struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) - -#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) - -static inline void sema_init (struct semaphore *sem, int val) -{ -/* - * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); - * - * i'd rather use the more flexible initialization above, but sadly - * GCC 2.7.2.3 emits a bogus warning. EGCS doesnt. Oh well. - */ - atomic_set(&sem->count, val); - sem->sleepers = 0; - init_waitqueue_head(&sem->wait); -#if WAITQUEUE_DEBUG - sem->__magic = (int)&sem->__magic; -#endif -} - -static inline void init_MUTEX (struct semaphore *sem) -{ - sema_init(sem, 1); -} - -static inline void init_MUTEX_LOCKED (struct semaphore *sem) -{ - sema_init(sem, 0); -} - -asmlinkage void __down_failed(void /* special register calling convention */); -asmlinkage int __down_failed_interruptible(void /* params in registers */); -asmlinkage int __down_failed_trylock(void /* params in registers */); -asmlinkage void __up_wakeup(void /* special register calling convention */); - -asmlinkage void __down(struct semaphore * sem); -asmlinkage int __down_interruptible(struct semaphore * sem); -asmlinkage int __down_trylock(struct semaphore * sem); -asmlinkage void __up(struct semaphore * sem); - -/* - * This is ugly, but we want the default case to fall through. - * "__down_failed" is a special asm handler that calls the C - * routine that actually waits. See arch/i386/kernel/semaphore.c - */ -static inline void down(struct semaphore * sem) -{ -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - - __asm__ __volatile__( - "# atomic down operation\n\t" - LOCK "decl %0\n\t" /* --sem->count */ - "js 2f\n" - "1:\n" - LOCK_SECTION_START("") - "2:\tcall __down_failed\n\t" - "jmp 1b\n" - LOCK_SECTION_END - :"=m" (sem->count) - :"c" (sem) - :"memory"); -} - -/* - * Interruptible try to acquire a semaphore. If we obtained - * it, return zero. If we were interrupted, returns -EINTR - */ -static inline int down_interruptible(struct semaphore * sem) -{ - int result; - -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - - __asm__ __volatile__( - "# atomic interruptible down operation\n\t" - LOCK "decl %1\n\t" /* --sem->count */ - "js 2f\n\t" - "xorl %0,%0\n" - "1:\n" - LOCK_SECTION_START("") - "2:\tcall __down_failed_interruptible\n\t" - "jmp 1b\n" - LOCK_SECTION_END - :"=a" (result), "=m" (sem->count) - :"c" (sem) - :"memory"); - return result; -} - -/* - * Non-blockingly attempt to down() a semaphore. - * Returns zero if we acquired it - */ -static inline int down_trylock(struct semaphore * sem) -{ - int result; - -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - - __asm__ __volatile__( - "# atomic interruptible down operation\n\t" - LOCK "decl %1\n\t" /* --sem->count */ - "js 2f\n\t" - "xorl %0,%0\n" - "1:\n" - LOCK_SECTION_START("") - "2:\tcall __down_failed_trylock\n\t" - "jmp 1b\n" - LOCK_SECTION_END - :"=a" (result), "=m" (sem->count) - :"c" (sem) - :"memory"); - return result; -} - -/* - * Note! This is subtle. We jump to wake people up only if - * the semaphore was negative (== somebody was waiting on it). - * The default case (no contention) will result in NO - * jumps for both down() and up(). - */ -static inline void up(struct semaphore * sem) -{ -#if WAITQUEUE_DEBUG - CHECK_MAGIC(sem->__magic); -#endif - __asm__ __volatile__( - "# atomic up operation\n\t" - LOCK "incl %0\n\t" /* ++sem->count */ - "jle 2f\n" - "1:\n" - LOCK_SECTION_START("") - "2:\tcall __up_wakeup\n\t" - "jmp 1b\n" - LOCK_SECTION_END - ".subsection 0\n" - :"=m" (sem->count) - :"c" (sem) - :"memory"); -} - -static inline int sem_getcount(struct semaphore *sem) -{ - return atomic_read(&sem->count); -} - -#endif -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sembuf.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sembuf.h deleted file mode 100644 index 323835166c..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sembuf.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _I386_SEMBUF_H -#define _I386_SEMBUF_H - -/* - * The semid64_ds structure for i386 architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 64-bit time_t to solve y2038 problem - * - 2 miscellaneous 32-bit values - */ - -struct semid64_ds { - struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ - __kernel_time_t sem_otime; /* last semop time */ - unsigned long __unused1; - __kernel_time_t sem_ctime; /* last change time */ - unsigned long __unused2; - unsigned long sem_nsems; /* no. of semaphores in array */ - unsigned long __unused3; - unsigned long __unused4; -}; - -#endif /* _I386_SEMBUF_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/serial.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/serial.h deleted file mode 100644 index 2297ab04dc..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/serial.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * include/asm-i386/serial.h - */ - -#include - -/* - * This assumes you have a 1.8432 MHz clock for your UART. - * - * It'd be nice if someone built a serial card with a 24.576 MHz - * clock, since the 16550A is capable of handling a top speed of 1.5 - * megabits/second; but this requires the faster clock. - */ -#define BASE_BAUD ( 1843200 / 16 ) - -/* Standard COM flags (except for COM4, because of the 8514 problem) */ -#ifdef CONFIG_SERIAL_DETECT_IRQ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ) -#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ) -#else -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) -#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF -#endif - -#ifdef CONFIG_SERIAL_MANY_PORTS -#define FOURPORT_FLAGS ASYNC_FOURPORT -#define ACCENT_FLAGS 0 -#define BOCA_FLAGS 0 -#define HUB6_FLAGS 0 -#define RS_TABLE_SIZE 64 -#else -#define RS_TABLE_SIZE -#endif - -#define MCA_COM_FLAGS (STD_COM_FLAGS|ASYNC_BOOT_ONLYMCA) - -/* - * The following define the access methods for the HUB6 card. All - * access is through two ports for all 24 possible chips. The card is - * selected through the high 2 bits, the port on that card with the - * "middle" 3 bits, and the register on that port with the bottom - * 3 bits. - * - * While the access port and interrupt is configurable, the default - * port locations are 0x302 for the port control register, and 0x303 - * for the data read/write register. Normally, the interrupt is at irq3 - * but can be anything from 3 to 7 inclusive. Note that using 3 will - * require disabling com2. - */ - -#define C_P(card,port) (((card)<<6|(port)<<3) + 1) - -#define STD_SERIAL_PORT_DEFNS \ - /* UART CLK PORT IRQ FLAGS */ \ - { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ - { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ - { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ - { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ - -/* - * HCDP_SERIAL_PORT_DEFNS should be placed in exactly the same slot - * in rs_table as defined by HCDP_SERIAL_CONSOLE_PORT in - * include/linux/serial.h - */ -#define HCDP_SERIAL_PORT_DEFNS \ - { 0, BASE_BAUD, -1, 0, STD_COM_FLAGS}, /* ttySx device - in comments sucks. - You add an entry - and you get to edit - boatloads of these - comments. Not worth - it */ - - -#ifdef CONFIG_SERIAL_MANY_PORTS -#define EXTRA_SERIAL_PORT_DEFNS \ - { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \ - { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \ - { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \ - { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \ - { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \ - { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \ - { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */ \ - { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */ \ - { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */ \ - { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* ttyS13 */ \ - { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare) */ \ - { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS15 (spare) */ \ - { 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS }, /* ttyS16 */ \ - { 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS }, /* ttyS17 */ \ - { 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS }, /* ttyS18 */ \ - { 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS }, /* ttyS19 */ \ - { 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS }, /* ttyS20 */ \ - { 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS }, /* ttyS21 */ \ - { 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS }, /* ttyS22 */ \ - { 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS }, /* ttyS23 */ \ - { 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS }, /* ttyS24 */ \ - { 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS }, /* ttyS25 */ \ - { 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS }, /* ttyS26 */ \ - { 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS }, /* ttyS27 */ \ - { 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS }, /* ttyS28 */ \ - { 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS }, /* ttyS29 */ \ - { 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS }, /* ttyS30 */ \ - { 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS }, /* ttyS31 */ -#else -#define EXTRA_SERIAL_PORT_DEFNS -#endif - -/* You can have up to four HUB6's in the system, but I've only - * included two cards here for a total of twelve ports. - */ -#if (defined(CONFIG_HUB6) && defined(CONFIG_SERIAL_MANY_PORTS)) -#define HUB6_SERIAL_PORT_DFNS \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,0) }, /* ttyS32 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,1) }, /* ttyS33 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,2) }, /* ttyS34 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,3) }, /* ttyS35 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,4) }, /* ttyS36 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,5) }, /* ttyS37 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,0) }, /* ttyS38 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,1) }, /* ttyS39 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,2) }, /* ttyS40 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,3) }, /* ttyS41 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,4) }, /* ttyS42 */ \ - { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,5) }, /* ttyS43 */ -#else -#define HUB6_SERIAL_PORT_DFNS -#endif - -#ifdef CONFIG_MCA -#define MCA_SERIAL_PORT_DFNS \ - { 0, BASE_BAUD, 0x3220, 3, MCA_COM_FLAGS }, \ - { 0, BASE_BAUD, 0x3228, 3, MCA_COM_FLAGS }, \ - { 0, BASE_BAUD, 0x4220, 3, MCA_COM_FLAGS }, \ - { 0, BASE_BAUD, 0x4228, 3, MCA_COM_FLAGS }, \ - { 0, BASE_BAUD, 0x5220, 3, MCA_COM_FLAGS }, \ - { 0, BASE_BAUD, 0x5228, 3, MCA_COM_FLAGS }, -#else -#define MCA_SERIAL_PORT_DFNS -#endif - -#define SERIAL_PORT_DFNS \ - STD_SERIAL_PORT_DEFNS \ - HCDP_SERIAL_PORT_DEFNS \ - EXTRA_SERIAL_PORT_DEFNS \ - HUB6_SERIAL_PORT_DFNS \ - MCA_SERIAL_PORT_DFNS - diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/setup.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/setup.h deleted file mode 100644 index ae25cc4275..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/setup.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Just a place holder. We don't want to have to test x86 before - * we include stuff - */ - -#ifndef _i386_SETUP_H -#define _i386_SETUP_H - - -#endif /* _i386_SETUP_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmbuf.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmbuf.h deleted file mode 100644 index d1cdc3cb07..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmbuf.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef _I386_SHMBUF_H -#define _I386_SHMBUF_H - -/* - * The shmid64_ds structure for i386 architecture. - * Note extra padding because this structure is passed back and forth - * between kernel and user space. - * - * Pad space is left for: - * - 64-bit time_t to solve y2038 problem - * - 2 miscellaneous 32-bit values - */ - -struct shmid64_ds { - struct ipc64_perm shm_perm; /* operation perms */ - size_t shm_segsz; /* size of segment (bytes) */ - __kernel_time_t shm_atime; /* last attach time */ - unsigned long __unused1; - __kernel_time_t shm_dtime; /* last detach time */ - unsigned long __unused2; - __kernel_time_t shm_ctime; /* last change time */ - unsigned long __unused3; - __kernel_pid_t shm_cpid; /* pid of creator */ - __kernel_pid_t shm_lpid; /* pid of last operator */ - unsigned long shm_nattch; /* no. of current attaches */ - unsigned long __unused4; - unsigned long __unused5; -}; - -struct shminfo64 { - unsigned long shmmax; - unsigned long shmmin; - unsigned long shmmni; - unsigned long shmseg; - unsigned long shmall; - unsigned long __unused1; - unsigned long __unused2; - unsigned long __unused3; - unsigned long __unused4; -}; - -#endif /* _I386_SHMBUF_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmparam.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmparam.h deleted file mode 100644 index 786243a5b3..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmparam.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _ASMI386_SHMPARAM_H -#define _ASMI386_SHMPARAM_H - -#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ - -#endif /* _ASMI386_SHMPARAM_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sigcontext.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sigcontext.h deleted file mode 100644 index b51145936a..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sigcontext.h +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef _ASMi386_SIGCONTEXT_H -#define _ASMi386_SIGCONTEXT_H - -/* - * As documented in the iBCS2 standard.. - * - * The first part of "struct _fpstate" is just the normal i387 - * hardware setup, the extra "status" word is used to save the - * coprocessor status word before entering the handler. - * - * Pentium III FXSR, SSE support - * Gareth Hughes , May 2000 - * - * The FPU state data structure has had to grow to accomodate the - * extended FPU state required by the Streaming SIMD Extensions. - * There is no documented standard to accomplish this at the moment. - */ -struct _fpreg { - unsigned short significand[4]; - unsigned short exponent; -}; - -struct _fpxreg { - unsigned short significand[4]; - unsigned short exponent; - unsigned short padding[3]; -}; - -struct _xmmreg { - unsigned long element[4]; -}; - -struct _fpstate { - /* Regular FPU environment */ - unsigned long cw; - unsigned long sw; - unsigned long tag; - unsigned long ipoff; - unsigned long cssel; - unsigned long dataoff; - unsigned long datasel; - struct _fpreg _st[8]; - unsigned short status; - unsigned short magic; /* 0xffff = regular FPU data only */ - - /* FXSR FPU environment */ - unsigned long _fxsr_env[6]; /* FXSR FPU env is ignored */ - unsigned long mxcsr; - unsigned long reserved; - struct _fpxreg _fxsr_st[8]; /* FXSR FPU reg data is ignored */ - struct _xmmreg _xmm[8]; - unsigned long padding[56]; -}; - -#define X86_FXSR_MAGIC 0x0000 - -struct sigcontext { - unsigned short gs, __gsh; - unsigned short fs, __fsh; - unsigned short es, __esh; - unsigned short ds, __dsh; - unsigned long edi; - unsigned long esi; - unsigned long ebp; - unsigned long esp; - unsigned long ebx; - unsigned long edx; - unsigned long ecx; - unsigned long eax; - unsigned long trapno; - unsigned long err; - unsigned long eip; - unsigned short cs, __csh; - unsigned long eflags; - unsigned long esp_at_signal; - unsigned short ss, __ssh; - struct _fpstate * fpstate; - unsigned long oldmask; - unsigned long cr2; -}; - - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/siginfo.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/siginfo.h deleted file mode 100644 index d2686eda12..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/siginfo.h +++ /dev/null @@ -1,233 +0,0 @@ -#ifndef _I386_SIGINFO_H -#define _I386_SIGINFO_H - -#include - -/* XXX: This structure was copied from the Alpha; is there an iBCS version? */ - -typedef union sigval { - int sival_int; - void *sival_ptr; -} sigval_t; - -#define SI_MAX_SIZE 128 -#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 3) - -typedef struct siginfo { - int si_signo; - int si_errno; - int si_code; - - union { - int _pad[SI_PAD_SIZE]; - - /* kill() */ - struct { - pid_t _pid; /* sender's pid */ - uid_t _uid; /* sender's uid */ - } _kill; - - /* POSIX.1b timers */ - struct { - unsigned int _timer1; - unsigned int _timer2; - } _timer; - - /* POSIX.1b signals */ - struct { - pid_t _pid; /* sender's pid */ - uid_t _uid; /* sender's uid */ - sigval_t _sigval; - } _rt; - - /* SIGCHLD */ - struct { - pid_t _pid; /* which child */ - uid_t _uid; /* sender's uid */ - int _status; /* exit code */ - clock_t _utime; - clock_t _stime; - } _sigchld; - - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ - struct { - void *_addr; /* faulting insn/memory ref. */ - } _sigfault; - - /* SIGPOLL */ - struct { - int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ - int _fd; - } _sigpoll; - } _sifields; -} siginfo_t; - -/* - * How these fields are to be accessed. - */ -#define si_pid _sifields._kill._pid -#define si_uid _sifields._kill._uid -#define si_status _sifields._sigchld._status -#define si_utime _sifields._sigchld._utime -#define si_stime _sifields._sigchld._stime -#define si_value _sifields._rt._sigval -#define si_int _sifields._rt._sigval.sival_int -#define si_ptr _sifields._rt._sigval.sival_ptr -#define si_addr _sifields._sigfault._addr -#define si_band _sifields._sigpoll._band -#define si_fd _sifields._sigpoll._fd - -#ifdef __KERNEL__ -#define __SI_MASK 0xffff0000 -#define __SI_KILL (0 << 16) -#define __SI_TIMER (1 << 16) -#define __SI_POLL (2 << 16) -#define __SI_FAULT (3 << 16) -#define __SI_CHLD (4 << 16) -#define __SI_RT (5 << 16) -#define __SI_CODE(T,N) ((T) << 16 | ((N) & 0xffff)) -#else -#define __SI_KILL 0 -#define __SI_TIMER 0 -#define __SI_POLL 0 -#define __SI_FAULT 0 -#define __SI_CHLD 0 -#define __SI_RT 0 -#define __SI_CODE(T,N) (N) -#endif - -/* - * si_code values - * Digital reserves positive values for kernel-generated signals. - */ -#define SI_USER 0 /* sent by kill, sigsend, raise */ -#define SI_KERNEL 0x80 /* sent by the kernel from somewhere */ -#define SI_QUEUE -1 /* sent by sigqueue */ -#define SI_TIMER __SI_CODE(__SI_TIMER,-2) /* sent by timer expiration */ -#define SI_MESGQ -3 /* sent by real time mesq state change */ -#define SI_ASYNCIO -4 /* sent by AIO completion */ -#define SI_SIGIO -5 /* sent by queued SIGIO */ -#define SI_TKILL -6 /* sent by tkill system call */ - -#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) -#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) - -/* - * SIGILL si_codes - */ -#define ILL_ILLOPC (__SI_FAULT|1) /* illegal opcode */ -#define ILL_ILLOPN (__SI_FAULT|2) /* illegal operand */ -#define ILL_ILLADR (__SI_FAULT|3) /* illegal addressing mode */ -#define ILL_ILLTRP (__SI_FAULT|4) /* illegal trap */ -#define ILL_PRVOPC (__SI_FAULT|5) /* privileged opcode */ -#define ILL_PRVREG (__SI_FAULT|6) /* privileged register */ -#define ILL_COPROC (__SI_FAULT|7) /* coprocessor error */ -#define ILL_BADSTK (__SI_FAULT|8) /* internal stack error */ -#define NSIGILL 8 - -/* - * SIGFPE si_codes - */ -#define FPE_INTDIV (__SI_FAULT|1) /* integer divide by zero */ -#define FPE_INTOVF (__SI_FAULT|2) /* integer overflow */ -#define FPE_FLTDIV (__SI_FAULT|3) /* floating point divide by zero */ -#define FPE_FLTOVF (__SI_FAULT|4) /* floating point overflow */ -#define FPE_FLTUND (__SI_FAULT|5) /* floating point underflow */ -#define FPE_FLTRES (__SI_FAULT|6) /* floating point inexact result */ -#define FPE_FLTINV (__SI_FAULT|7) /* floating point invalid operation */ -#define FPE_FLTSUB (__SI_FAULT|8) /* subscript out of range */ -#define NSIGFPE 8 - -/* - * SIGSEGV si_codes - */ -#define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */ -#define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */ -#define NSIGSEGV 2 - -/* - * SIGBUS si_codes - */ -#define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */ -#define BUS_ADRERR (__SI_FAULT|2) /* non-existant physical address */ -#define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */ -#define NSIGBUS 3 - -/* - * SIGTRAP si_codes - */ -#define TRAP_BRKPT (__SI_FAULT|1) /* process breakpoint */ -#define TRAP_TRACE (__SI_FAULT|2) /* process trace trap */ -#define NSIGTRAP 2 - -/* - * SIGCHLD si_codes - */ -#define CLD_EXITED (__SI_CHLD|1) /* child has exited */ -#define CLD_KILLED (__SI_CHLD|2) /* child was killed */ -#define CLD_DUMPED (__SI_CHLD|3) /* child terminated abnormally */ -#define CLD_TRAPPED (__SI_CHLD|4) /* traced child has trapped */ -#define CLD_STOPPED (__SI_CHLD|5) /* child has stopped */ -#define CLD_CONTINUED (__SI_CHLD|6) /* stopped child has continued */ -#define NSIGCHLD 6 - -/* - * SIGPOLL si_codes - */ -#define POLL_IN (__SI_POLL|1) /* data input available */ -#define POLL_OUT (__SI_POLL|2) /* output buffers available */ -#define POLL_MSG (__SI_POLL|3) /* input message available */ -#define POLL_ERR (__SI_POLL|4) /* i/o error */ -#define POLL_PRI (__SI_POLL|5) /* high priority input available */ -#define POLL_HUP (__SI_POLL|6) /* device disconnected */ -#define NSIGPOLL 6 - -/* - * sigevent definitions - * - * It seems likely that SIGEV_THREAD will have to be handled from - * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the - * thread manager then catches and does the appropriate nonsense. - * However, everything is written out here so as to not get lost. - */ -#define SIGEV_SIGNAL 0 /* notify via signal */ -#define SIGEV_NONE 1 /* other notification: meaningless */ -#define SIGEV_THREAD 2 /* deliver via thread creation */ - -#define SIGEV_MAX_SIZE 64 -#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int)) - 3) - -typedef struct sigevent { - sigval_t sigev_value; - int sigev_signo; - int sigev_notify; - union { - int _pad[SIGEV_PAD_SIZE]; - - struct { - void (*_function)(sigval_t); - void *_attribute; /* really pthread_attr_t */ - } _sigev_thread; - } _sigev_un; -} sigevent_t; - -#define sigev_notify_function _sigev_un._sigev_thread._function -#define sigev_notify_attributes _sigev_un._sigev_thread._attribute - -#ifdef __KERNEL__ -#include - -static inline void copy_siginfo(siginfo_t *to, siginfo_t *from) -{ - if (from->si_code < 0) - memcpy(to, from, sizeof(siginfo_t)); - else - /* _sigchld is currently the largest know union member */ - memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld)); -} - -extern int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from); - -#endif /* __KERNEL__ */ - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/signal.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/signal.h deleted file mode 100644 index 8740d4ea24..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/signal.h +++ /dev/null @@ -1,221 +0,0 @@ -#ifndef _ASMi386_SIGNAL_H -#define _ASMi386_SIGNAL_H - -#include - -/* Avoid too many header ordering problems. */ -struct siginfo; - -#ifdef __KERNEL__ -/* Most things should be clean enough to redefine this at will, if care - is taken to make libc match. */ - -#define _NSIG 64 -#define _NSIG_BPW 32 -#define _NSIG_WORDS (_NSIG / _NSIG_BPW) - -typedef unsigned long old_sigset_t; /* at least 32 bits */ - -typedef struct { - unsigned long sig[_NSIG_WORDS]; -} sigset_t; - -#else -/* Here we must cater to libcs that poke about in kernel headers. */ - -#define NSIG 32 -typedef unsigned long sigset_t; - -#endif /* __KERNEL__ */ - -#define SIGHUP 1 -#define SIGINT 2 -#define SIGQUIT 3 -#define SIGILL 4 -#define SIGTRAP 5 -#define SIGABRT 6 -#define SIGIOT 6 -#define SIGBUS 7 -#define SIGFPE 8 -#define SIGKILL 9 -#define SIGUSR1 10 -#define SIGSEGV 11 -#define SIGUSR2 12 -#define SIGPIPE 13 -#define SIGALRM 14 -#define SIGTERM 15 -#define SIGSTKFLT 16 -#define SIGCHLD 17 -#define SIGCONT 18 -#define SIGSTOP 19 -#define SIGTSTP 20 -#define SIGTTIN 21 -#define SIGTTOU 22 -#define SIGURG 23 -#define SIGXCPU 24 -#define SIGXFSZ 25 -#define SIGVTALRM 26 -#define SIGPROF 27 -#define SIGWINCH 28 -#define SIGIO 29 -#define SIGPOLL SIGIO -/* -#define SIGLOST 29 -*/ -#define SIGPWR 30 -#define SIGSYS 31 -#define SIGUNUSED 31 - -/* These should not be considered constants from userland. */ -#define SIGRTMIN 32 -#define SIGRTMAX (_NSIG-1) - -/* - * SA_FLAGS values: - * - * SA_ONSTACK indicates that a registered stack_t will be used. - * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the - * SA_RESTART flag to get restarting signals (which were the default long ago) - * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. - * SA_RESETHAND clears the handler when the signal is delivered. - * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. - * SA_NODEFER prevents the current signal from being masked in the handler. - * - * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single - * Unix names RESETHAND and NODEFER respectively. - */ -#define SA_NOCLDSTOP 0x00000001 -#define SA_NOCLDWAIT 0x00000002 /* not supported yet */ -#define SA_SIGINFO 0x00000004 -#define SA_ONSTACK 0x08000000 -#define SA_RESTART 0x10000000 -#define SA_NODEFER 0x40000000 -#define SA_RESETHAND 0x80000000 - -#define SA_NOMASK SA_NODEFER -#define SA_ONESHOT SA_RESETHAND -#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ - -#define SA_RESTORER 0x04000000 - -/* - * sigaltstack controls - */ -#define SS_ONSTACK 1 -#define SS_DISABLE 2 - -#define MINSIGSTKSZ 2048 -#define SIGSTKSZ 8192 - -#ifdef __KERNEL__ - -/* - * These values of sa_flags are used only by the kernel as part of the - * irq handling routines. - * - * SA_INTERRUPT is also used by the irq handling routines. - * SA_SHIRQ is for shared interrupt support on PCI and EISA. - */ -#define SA_PROBE SA_ONESHOT -#define SA_SAMPLE_RANDOM SA_RESTART -#define SA_SHIRQ 0x04000000 -#endif - -#define SIG_BLOCK 0 /* for blocking signals */ -#define SIG_UNBLOCK 1 /* for unblocking signals */ -#define SIG_SETMASK 2 /* for setting the signal mask */ - -/* Type of a signal handler. */ -typedef void (*__sighandler_t)(int); - -#define SIG_DFL ((__sighandler_t)0) /* default signal handling */ -#define SIG_IGN ((__sighandler_t)1) /* ignore signal */ -#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ - -#ifdef __KERNEL__ -struct old_sigaction { - __sighandler_t sa_handler; - old_sigset_t sa_mask; - unsigned long sa_flags; - void (*sa_restorer)(void); -}; - -struct sigaction { - __sighandler_t sa_handler; - unsigned long sa_flags; - void (*sa_restorer)(void); - sigset_t sa_mask; /* mask last for extensibility */ -}; - -struct k_sigaction { - struct sigaction sa; -}; -#else -/* Here we must cater to libcs that poke about in kernel headers. */ - -struct sigaction { - union { - __sighandler_t _sa_handler; - void (*_sa_sigaction)(int, struct siginfo *, void *); - } _u; - sigset_t sa_mask; - unsigned long sa_flags; - void (*sa_restorer)(void); -}; - -#define sa_handler _u._sa_handler -#define sa_sigaction _u._sa_sigaction - -#endif /* __KERNEL__ */ - -typedef struct sigaltstack { - void *ss_sp; - int ss_flags; - size_t ss_size; -} stack_t; - -#ifdef __KERNEL__ -#include - -#define __HAVE_ARCH_SIG_BITOPS - -static __inline__ void sigaddset(sigset_t *set, int _sig) -{ - __asm__("btsl %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc"); -} - -static __inline__ void sigdelset(sigset_t *set, int _sig) -{ - __asm__("btrl %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc"); -} - -static __inline__ int __const_sigismember(sigset_t *set, int _sig) -{ - unsigned long sig = _sig - 1; - return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW)); -} - -static __inline__ int __gen_sigismember(sigset_t *set, int _sig) -{ - int ret; - __asm__("btl %2,%1\n\tsbbl %0,%0" - : "=r"(ret) : "m"(*set), "Ir"(_sig-1) : "cc"); - return ret; -} - -#define sigismember(set,sig) \ - (__builtin_constant_p(sig) ? \ - __const_sigismember((set),(sig)) : \ - __gen_sigismember((set),(sig))) - -#define sigmask(sig) (1UL << ((sig) - 1)) - -static __inline__ int sigfindinword(unsigned long word) -{ - __asm__("bsfl %1,%0" : "=r"(word) : "rm"(word) : "cc"); - return word; -} - -#endif /* __KERNEL__ */ - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/smplock.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/smplock.h deleted file mode 100644 index 129ce26607..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/smplock.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef __ASM_SMPLOCK_H -#define __ASM_SMPLOCK_H - -/* - * - * - * i386 SMP lock implementation - */ -#include -#include -#include -#include - -extern spinlock_cacheline_t kernel_flag_cacheline; -#define kernel_flag kernel_flag_cacheline.lock - -#define kernel_locked() spin_is_locked(&kernel_flag) - -/* - * Release global kernel lock and global interrupt lock - */ -#define release_kernel_lock(task, cpu) \ -do { \ - if (task->lock_depth >= 0) \ - spin_unlock(&kernel_flag); \ - release_irqlock(cpu); \ - __sti(); \ -} while (0) - -/* - * Re-acquire the kernel lock - */ -#define reacquire_kernel_lock(task) \ -do { \ - if (task->lock_depth >= 0) \ - spin_lock(&kernel_flag); \ -} while (0) - - -/* - * Getting the big kernel lock. - * - * This cannot happen asynchronously, - * so we only need to worry about other - * CPU's. - */ -static __inline__ void lock_kernel(void) -{ -#if 1 - if (!++current->lock_depth) - spin_lock(&kernel_flag); -#else - __asm__ __volatile__( - "incl %1\n\t" - "jne 9f" - spin_lock_string - "\n9:" - :"=m" (__dummy_lock(&kernel_flag)), - "=m" (current->lock_depth)); -#endif -} - -static __inline__ void unlock_kernel(void) -{ - if (current->lock_depth < 0) - out_of_line_bug(); -#if 1 - if (--current->lock_depth < 0) - spin_unlock(&kernel_flag); -#else - __asm__ __volatile__( - "decl %1\n\t" - "jns 9f\n\t" - spin_unlock_string - "\n9:" - :"=m" (__dummy_lock(&kernel_flag)), - "=m" (current->lock_depth)); -#endif -} - -#endif /* __ASM_SMPLOCK_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/socket.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/socket.h deleted file mode 100644 index 525f83218c..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/socket.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef _ASM_SOCKET_H -#define _ASM_SOCKET_H - -#include - -/* For setsockopt(2) */ -#define SOL_SOCKET 1 - -#define SO_DEBUG 1 -#define SO_REUSEADDR 2 -#define SO_TYPE 3 -#define SO_ERROR 4 -#define SO_DONTROUTE 5 -#define SO_BROADCAST 6 -#define SO_SNDBUF 7 -#define SO_RCVBUF 8 -#define SO_KEEPALIVE 9 -#define SO_OOBINLINE 10 -#define SO_NO_CHECK 11 -#define SO_PRIORITY 12 -#define SO_LINGER 13 -#define SO_BSDCOMPAT 14 -/* To add :#define SO_REUSEPORT 15 */ -#define SO_PASSCRED 16 -#define SO_PEERCRED 17 -#define SO_RCVLOWAT 18 -#define SO_SNDLOWAT 19 -#define SO_RCVTIMEO 20 -#define SO_SNDTIMEO 21 - -/* Security levels - as per NRL IPv6 - don't actually do anything */ -#define SO_SECURITY_AUTHENTICATION 22 -#define SO_SECURITY_ENCRYPTION_TRANSPORT 23 -#define SO_SECURITY_ENCRYPTION_NETWORK 24 - -#define SO_BINDTODEVICE 25 - -/* Socket filtering */ -#define SO_ATTACH_FILTER 26 -#define SO_DETACH_FILTER 27 - -#define SO_PEERNAME 28 -#define SO_TIMESTAMP 29 -#define SCM_TIMESTAMP SO_TIMESTAMP - -#define SO_ACCEPTCONN 30 - -/* Nasty libc5 fixup - bletch */ -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ -#define SOCK_MAX (SOCK_PACKET+1) -#endif - -#endif /* _ASM_SOCKET_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sockios.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sockios.h deleted file mode 100644 index 6b747f8e22..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sockios.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __ARCH_I386_SOCKIOS__ -#define __ARCH_I386_SOCKIOS__ - -/* Socket-level I/O control calls. */ -#define FIOSETOWN 0x8901 -#define SIOCSPGRP 0x8902 -#define FIOGETOWN 0x8903 -#define SIOCGPGRP 0x8904 -#define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906 /* Get stamp */ - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/softirq.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/softirq.h deleted file mode 100644 index b9f7796b29..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/softirq.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef __ASM_SOFTIRQ_H -#define __ASM_SOFTIRQ_H - -#include -#include - -#define __cpu_bh_enable(cpu) \ - do { barrier(); local_bh_count(cpu)--; } while (0) -#define cpu_bh_disable(cpu) \ - do { local_bh_count(cpu)++; barrier(); } while (0) - -#define local_bh_disable() cpu_bh_disable(smp_processor_id()) -#define __local_bh_enable() __cpu_bh_enable(smp_processor_id()) - -#define in_softirq() (local_bh_count(smp_processor_id()) != 0) - -/* - * NOTE: this assembly code assumes: - * - * (char *)&local_bh_count - 8 == (char *)&softirq_pending - * - * If you change the offsets in irq_stat then you have to - * update this code as well. - */ -#define local_bh_enable() \ -do { \ - unsigned int *ptr = &local_bh_count(smp_processor_id()); \ - \ - barrier(); \ - if (!--*ptr) \ - __asm__ __volatile__ ( \ - "cmpl $0, -8(%0);" \ - "jnz 2f;" \ - "1:;" \ - \ - LOCK_SECTION_START("") \ - "2: pushl %%eax; pushl %%ecx; pushl %%edx;" \ - "call %c1;" \ - "popl %%edx; popl %%ecx; popl %%eax;" \ - "jmp 1b;" \ - LOCK_SECTION_END \ - \ - : /* no output */ \ - : "r" (ptr), "i" (do_softirq) \ - /* no registers clobbered */ ); \ -} while (0) - -#endif /* __ASM_SOFTIRQ_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/spinlock.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/spinlock.h deleted file mode 100644 index 2b9537ecf1..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/spinlock.h +++ /dev/null @@ -1,212 +0,0 @@ -#ifndef __ASM_SPINLOCK_H -#define __ASM_SPINLOCK_H - -#include -#include -#include -#include - -extern int printk(const char * fmt, ...) - __attribute__ ((format (printf, 1, 2))); - -/* It seems that people are forgetting to - * initialize their spinlocks properly, tsk tsk. - * Remember to turn this off in 2.4. -ben - */ -#if defined(CONFIG_DEBUG_SPINLOCK) -#define SPINLOCK_DEBUG 1 -#else -#define SPINLOCK_DEBUG 0 -#endif - -/* - * Your basic SMP spinlocks, allowing only a single CPU anywhere - */ - -typedef struct { - volatile unsigned int lock; -#if SPINLOCK_DEBUG - unsigned magic; -#endif -} spinlock_t; - -#define SPINLOCK_MAGIC 0xdead4ead - -#if SPINLOCK_DEBUG -#define SPINLOCK_MAGIC_INIT , SPINLOCK_MAGIC -#else -#define SPINLOCK_MAGIC_INIT /* */ -#endif - -#define SPIN_LOCK_UNLOCKED (spinlock_t) { 1 SPINLOCK_MAGIC_INIT } - -#define spin_lock_init(x) do { *(x) = SPIN_LOCK_UNLOCKED; } while(0) - -/* - * Simple spin lock operations. There are two variants, one clears IRQ's - * on the local processor, one does not. - * - * We make no fairness assumptions. They have a cost. - */ - -#define spin_is_locked(x) (*(volatile signed char *)(&(x)->lock) <= 0) -#define spin_unlock_wait(x) do { barrier(); } while(spin_is_locked(x)) - -#define spin_lock_string \ - "\n1:\t" \ - "lock ; decb %0\n\t" \ - "js 2f\n" \ - LOCK_SECTION_START("") \ - "2:\t" \ - "cmpb $0,%0\n\t" \ - "rep;nop\n\t" \ - "jle 2b\n\t" \ - "jmp 1b\n" \ - LOCK_SECTION_END - -/* - * This works. Despite all the confusion. - * (except on PPro SMP or if we are using OOSTORE) - * (PPro errata 66, 92) - */ - -#if !defined(CONFIG_X86_OOSTORE) && !defined(CONFIG_X86_PPRO_FENCE) - -#define spin_unlock_string \ - "movb $1,%0" \ - :"=m" (lock->lock) : : "memory" - - -static inline void spin_unlock(spinlock_t *lock) -{ -#if SPINLOCK_DEBUG - if (lock->magic != SPINLOCK_MAGIC) - BUG(); - if (!spin_is_locked(lock)) - BUG(); -#endif - __asm__ __volatile__( - spin_unlock_string - ); -} - -#else - -#define spin_unlock_string \ - "xchgb %b0, %1" \ - :"=q" (oldval), "=m" (lock->lock) \ - :"0" (oldval) : "memory" - -static inline void spin_unlock(spinlock_t *lock) -{ - char oldval = 1; -#if SPINLOCK_DEBUG - if (lock->magic != SPINLOCK_MAGIC) - BUG(); - if (!spin_is_locked(lock)) - BUG(); -#endif - __asm__ __volatile__( - spin_unlock_string - ); -} - -#endif - -static inline int spin_trylock(spinlock_t *lock) -{ - char oldval; - __asm__ __volatile__( - "xchgb %b0,%1" - :"=q" (oldval), "=m" (lock->lock) - :"0" (0) : "memory"); - return oldval > 0; -} - -static inline void spin_lock(spinlock_t *lock) -{ -#if SPINLOCK_DEBUG - __label__ here; -here: - if (lock->magic != SPINLOCK_MAGIC) { -printk("eip: %p\n", &&here); - BUG(); - } -#endif - __asm__ __volatile__( - spin_lock_string - :"=m" (lock->lock) : : "memory"); -} - - -/* - * Read-write spinlocks, allowing multiple readers - * but only one writer. - * - * NOTE! it is quite common to have readers in interrupts - * but no interrupt writers. For those circumstances we - * can "mix" irq-safe locks - any writer needs to get a - * irq-safe write-lock, but readers can get non-irqsafe - * read-locks. - */ -typedef struct { - volatile unsigned int lock; -#if SPINLOCK_DEBUG - unsigned magic; -#endif -} rwlock_t; - -#define RWLOCK_MAGIC 0xdeaf1eed - -#if SPINLOCK_DEBUG -#define RWLOCK_MAGIC_INIT , RWLOCK_MAGIC -#else -#define RWLOCK_MAGIC_INIT /* */ -#endif - -#define RW_LOCK_UNLOCKED (rwlock_t) { RW_LOCK_BIAS RWLOCK_MAGIC_INIT } - -#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0) - -/* - * On x86, we implement read-write locks as a 32-bit counter - * with the high bit (sign) being the "contended" bit. - * - * The inline assembly is non-obvious. Think about it. - * - * Changed to use the same technique as rw semaphores. See - * semaphore.h for details. -ben - */ -/* the spinlock helpers are in arch/i386/kernel/semaphore.c */ - -static inline void read_lock(rwlock_t *rw) -{ -#if SPINLOCK_DEBUG - if (rw->magic != RWLOCK_MAGIC) - BUG(); -#endif - __build_read_lock(rw, "__read_lock_failed"); -} - -static inline void write_lock(rwlock_t *rw) -{ -#if SPINLOCK_DEBUG - if (rw->magic != RWLOCK_MAGIC) - BUG(); -#endif - __build_write_lock(rw, "__write_lock_failed"); -} - -#define read_unlock(rw) asm volatile("lock ; incl %0" :"=m" ((rw)->lock) : : "memory") -#define write_unlock(rw) asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ",%0":"=m" ((rw)->lock) : : "memory") - -static inline int write_trylock(rwlock_t *lock) -{ - atomic_t *count = (atomic_t *)lock; - if (atomic_sub_and_test(RW_LOCK_BIAS, count)) - return 1; - atomic_add(RW_LOCK_BIAS, count); - return 0; -} - -#endif /* __ASM_SPINLOCK_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/stat.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/stat.h deleted file mode 100644 index ef16311fe0..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/stat.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef _I386_STAT_H -#define _I386_STAT_H - -struct __old_kernel_stat { - unsigned short st_dev; - unsigned short st_ino; - unsigned short st_mode; - unsigned short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned short st_rdev; - unsigned long st_size; - unsigned long st_atime; - unsigned long st_mtime; - unsigned long st_ctime; -}; - -struct stat { - unsigned short st_dev; - unsigned short __pad1; - unsigned long st_ino; - unsigned short st_mode; - unsigned short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned short st_rdev; - unsigned short __pad2; - unsigned long st_size; - unsigned long st_blksize; - unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; - unsigned long __unused4; - unsigned long __unused5; -}; - -/* This matches struct stat64 in glibc2.1, hence the absolutely - * insane amounts of padding around dev_t's. - */ -struct stat64 { - unsigned short st_dev; - unsigned char __pad0[10]; - -#define STAT64_HAS_BROKEN_ST_INO 1 - unsigned long __st_ino; - - unsigned int st_mode; - unsigned int st_nlink; - - unsigned long st_uid; - unsigned long st_gid; - - unsigned short st_rdev; - unsigned char __pad3[10]; - - long long st_size; - unsigned long st_blksize; - - unsigned long st_blocks; /* Number 512-byte blocks allocated. */ - unsigned long __pad4; /* future possible st_blocks high bits */ - - unsigned long st_atime; - unsigned long __pad5; - - unsigned long st_mtime; - unsigned long __pad6; - - unsigned long st_ctime; - unsigned long __pad7; /* will be high 32 bits of ctime someday */ - - unsigned long long st_ino; -}; - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/statfs.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/statfs.h deleted file mode 100644 index 113d5d428a..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/statfs.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _I386_STATFS_H -#define _I386_STATFS_H - -#ifndef __KERNEL_STRICT_NAMES - -#include - -typedef __kernel_fsid_t fsid_t; - -#endif - -struct statfs { - long f_type; - long f_bsize; - long f_blocks; - long f_bfree; - long f_bavail; - long f_files; - long f_ffree; - __kernel_fsid_t f_fsid; - long f_namelen; - long f_spare[6]; -}; - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string-486.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string-486.h deleted file mode 100644 index 51bfd051bc..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string-486.h +++ /dev/null @@ -1,617 +0,0 @@ -#ifndef _I386_STRING_I486_H_ -#define _I386_STRING_I486_H_ - -/* - * This string-include defines all string functions as inline - * functions. Use gcc. It also assumes ds=es=data space, this should be - * normal. Most of the string-functions are rather heavily hand-optimized, - * see especially strtok,strstr,str[c]spn. They should work, but are not - * very easy to understand. Everything is done entirely within the register - * set, making the functions fast and clean. - * - * Copyright (C) 1991, 1992 Linus Torvalds - * Revised and optimized for i486/pentium - * 1994/03/15 by Alberto Vignani/Davide Parodi @crf.it - * - * Split into 2 CPU specific files by Alan Cox to keep #ifdef noise down. - * - * 1999/10/5 Proper register args for newer GCCs and minor bugs - * fixed - Petko Manolov (petkan@spct.net) - * 1999/10/14 3DNow memscpy() added - Petkan - * 2000/05/09 extern changed to static in function definitions - * and a few cleanups - Petkan - */ - -#define __HAVE_ARCH_STRCPY -static inline char * strcpy(char * dest,const char *src) -{ -register char *tmp= (char *)dest; -register char dummy; -__asm__ __volatile__( - "\n1:\t" - "movb (%0),%2\n\t" - "incl %0\n\t" - "movb %2,(%1)\n\t" - "incl %1\n\t" - "testb %2,%2\n\t" - "jne 1b" - :"=r" (src), "=r" (tmp), "=q" (dummy) - :"0" (src), "1" (tmp) - :"memory"); -return dest; -} - -#define __HAVE_ARCH_STRNCPY -static inline char * strncpy(char * dest,const char *src,size_t count) -{ -register char *tmp= (char *)dest; -register char dummy; -if (count) { -__asm__ __volatile__( - "\n1:\t" - "movb (%0),%2\n\t" - "incl %0\n\t" - "movb %2,(%1)\n\t" - "incl %1\n\t" - "decl %3\n\t" - "je 3f\n\t" - "testb %2,%2\n\t" - "jne 1b\n\t" - "2:\tmovb %2,(%1)\n\t" - "incl %1\n\t" - "decl %3\n\t" - "jne 2b\n\t" - "3:" - :"=r" (src), "=r" (tmp), "=q" (dummy), "=r" (count) - :"0" (src), "1" (tmp), "3" (count) - :"memory"); - } /* if (count) */ -return dest; -} - -#define __HAVE_ARCH_STRCAT -static inline char * strcat(char * dest,const char * src) -{ -register char *tmp = (char *)(dest-1); -register char dummy; -__asm__ __volatile__( - "\n1:\tincl %1\n\t" - "cmpb $0,(%1)\n\t" - "jne 1b\n" - "2:\tmovb (%2),%b0\n\t" - "incl %2\n\t" - "movb %b0,(%1)\n\t" - "incl %1\n\t" - "testb %b0,%b0\n\t" - "jne 2b\n" - :"=q" (dummy), "=r" (tmp), "=r" (src) - :"1" (tmp), "2" (src) - :"memory"); -return dest; -} - -#define __HAVE_ARCH_STRNCAT -static inline char * strncat(char * dest,const char * src,size_t count) -{ -register char *tmp = (char *)(dest-1); -register char dummy; -__asm__ __volatile__( - "\n1:\tincl %1\n\t" - "cmpb $0,(%1)\n\t" - "jne 1b\n" - "2:\tdecl %3\n\t" - "js 3f\n\t" - "movb (%2),%b0\n\t" - "incl %2\n\t" - "movb %b0,(%1)\n\t" - "incl %1\n\t" - "testb %b0,%b0\n\t" - "jne 2b\n" - "3:\txorb %0,%0\n\t" - "movb %b0,(%1)\n\t" - :"=q" (dummy), "=r" (tmp), "=r" (src), "=r" (count) - :"1" (tmp), "2" (src), "3" (count) - :"memory"); -return dest; -} - -#define __HAVE_ARCH_STRCMP -static inline int strcmp(const char * cs,const char * ct) -{ -register int __res; -__asm__ __volatile__( - "\n1:\tmovb (%1),%b0\n\t" - "incl %1\n\t" - "cmpb %b0,(%2)\n\t" - "jne 2f\n\t" - "incl %2\n\t" - "testb %b0,%b0\n\t" - "jne 1b\n\t" - "xorl %0,%0\n\t" - "jmp 3f\n" - "2:\tmovl $1,%0\n\t" - "jb 3f\n\t" - "negl %0\n" - "3:" - :"=q" (__res), "=r" (cs), "=r" (ct) - :"1" (cs), "2" (ct) - : "memory" ); -return __res; -} - -#define __HAVE_ARCH_STRNCMP -static inline int strncmp(const char * cs,const char * ct,size_t count) -{ -register int __res; -__asm__ __volatile__( - "\n1:\tdecl %3\n\t" - "js 2f\n\t" - "movb (%1),%b0\n\t" - "incl %1\n\t" - "cmpb %b0,(%2)\n\t" - "jne 3f\n\t" - "incl %2\n\t" - "testb %b0,%b0\n\t" - "jne 1b\n" - "2:\txorl %0,%0\n\t" - "jmp 4f\n" - "3:\tmovl $1,%0\n\t" - "jb 4f\n\t" - "negl %0\n" - "4:" - :"=q" (__res), "=r" (cs), "=r" (ct), "=r" (count) - :"1" (cs), "2" (ct), "3" (count)); -return __res; -} - -#define __HAVE_ARCH_STRCHR -static inline char * strchr(const char * s, int c) -{ -register char * __res; -__asm__ __volatile__( - "movb %%al,%%ah\n" - "1:\tmovb (%1),%%al\n\t" - "cmpb %%ah,%%al\n\t" - "je 2f\n\t" - "incl %1\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n\t" - "xorl %1,%1\n" - "2:\tmovl %1,%0\n\t" - :"=a" (__res), "=r" (s) - :"0" (c), "1" (s)); -return __res; -} - -#define __HAVE_ARCH_STRRCHR -static inline char * strrchr(const char * s, int c) -{ -int d0, d1; -register char * __res; -__asm__ __volatile__( - "movb %%al,%%ah\n" - "1:\tlodsb\n\t" - "cmpb %%ah,%%al\n\t" - "jne 2f\n\t" - "leal -1(%%esi),%0\n" - "2:\ttestb %%al,%%al\n\t" - "jne 1b" - :"=d" (__res), "=&S" (d0), "=&a" (d1) - :"0" (0), "1" (s), "2" (c)); -return __res; -} - - -#define __HAVE_ARCH_STRCSPN -static inline size_t strcspn(const char * cs, const char * ct) -{ -int d0, d1; -register char * __res; -__asm__ __volatile__( - "movl %6,%%edi\n\t" - "repne\n\t" - "scasb\n\t" - "notl %%ecx\n\t" - "decl %%ecx\n\t" - "movl %%ecx,%%edx\n" - "1:\tlodsb\n\t" - "testb %%al,%%al\n\t" - "je 2f\n\t" - "movl %6,%%edi\n\t" - "movl %%edx,%%ecx\n\t" - "repne\n\t" - "scasb\n\t" - "jne 1b\n" - "2:\tdecl %0" - :"=S" (__res), "=&a" (d0), "=&c" (d1) - :"0" (cs), "1" (0), "2" (0xffffffff), "g" (ct) - :"dx", "di"); -return __res-cs; -} - - -#define __HAVE_ARCH_STRLEN -static inline size_t strlen(const char * s) -{ -/* - * slightly slower on a 486, but with better chances of - * register allocation - */ -register char dummy, *tmp= (char *)s; -__asm__ __volatile__( - "\n1:\t" - "movb\t(%0),%1\n\t" - "incl\t%0\n\t" - "testb\t%1,%1\n\t" - "jne\t1b" - :"=r" (tmp),"=q" (dummy) - :"0" (s) - : "memory" ); -return (tmp-s-1); -} - -/* Added by Gertjan van Wingerde to make minix and sysv module work */ -#define __HAVE_ARCH_STRNLEN -static inline size_t strnlen(const char * s, size_t count) -{ -int d0; -register int __res; -__asm__ __volatile__( - "movl %3,%0\n\t" - "jmp 2f\n" - "1:\tcmpb $0,(%0)\n\t" - "je 3f\n\t" - "incl %0\n" - "2:\tdecl %2\n\t" - "cmpl $-1,%2\n\t" - "jne 1b\n" - "3:\tsubl %3,%0" - :"=a" (__res), "=&d" (d0) - :"1" (count), "c" (s)); -return __res; -} -/* end of additional stuff */ - - -/* - * These ought to get tweaked to do some cache priming. - */ - -static inline void * __memcpy_by4(void * to, const void * from, size_t n) -{ -register void *tmp = (void *)to; -register int dummy1,dummy2; -__asm__ __volatile__ ( - "\n1:\tmovl (%2),%0\n\t" - "addl $4,%2\n\t" - "movl %0,(%1)\n\t" - "addl $4,%1\n\t" - "decl %3\n\t" - "jnz 1b" - :"=r" (dummy1), "=r" (tmp), "=r" (from), "=r" (dummy2) - :"1" (tmp), "2" (from), "3" (n/4) - :"memory"); -return (to); -} - -static inline void * __memcpy_by2(void * to, const void * from, size_t n) -{ -register void *tmp = (void *)to; -register int dummy1,dummy2; -__asm__ __volatile__ ( - "shrl $1,%3\n\t" - "jz 2f\n" /* only a word */ - "1:\tmovl (%2),%0\n\t" - "addl $4,%2\n\t" - "movl %0,(%1)\n\t" - "addl $4,%1\n\t" - "decl %3\n\t" - "jnz 1b\n" - "2:\tmovw (%2),%w0\n\t" - "movw %w0,(%1)" - :"=r" (dummy1), "=r" (tmp), "=r" (from), "=r" (dummy2) - :"1" (tmp), "2" (from), "3" (n/2) - :"memory"); -return (to); -} - -static inline void * __memcpy_g(void * to, const void * from, size_t n) -{ -int d0, d1, d2; -register void *tmp = (void *)to; -__asm__ __volatile__ ( - "shrl $1,%%ecx\n\t" - "jnc 1f\n\t" - "movsb\n" - "1:\tshrl $1,%%ecx\n\t" - "jnc 2f\n\t" - "movsw\n" - "2:\trep\n\t" - "movsl" - :"=&c" (d0), "=&D" (d1), "=&S" (d2) - :"0" (n), "1" ((long) tmp), "2" ((long) from) - :"memory"); -return (to); -} - -#define __memcpy_c(d,s,count) \ -((count%4==0) ? \ - __memcpy_by4((d),(s),(count)) : \ - ((count%2==0) ? \ - __memcpy_by2((d),(s),(count)) : \ - __memcpy_g((d),(s),(count)))) - -#define __memcpy(d,s,count) \ -(__builtin_constant_p(count) ? \ - __memcpy_c((d),(s),(count)) : \ - __memcpy_g((d),(s),(count))) - -#define __HAVE_ARCH_MEMCPY - -#include - -#ifdef CONFIG_X86_USE_3DNOW - -#include - -/* -** This CPU favours 3DNow strongly (eg AMD K6-II, K6-III, Athlon) -*/ - -static inline void * __constant_memcpy3d(void * to, const void * from, size_t len) -{ - if (len < 512) - return __memcpy_c(to, from, len); - return _mmx_memcpy(to, from, len); -} - -static inline void *__memcpy3d(void *to, const void *from, size_t len) -{ - if(len < 512) - return __memcpy_g(to, from, len); - return _mmx_memcpy(to, from, len); -} - -#define memcpy(d, s, count) \ -(__builtin_constant_p(count) ? \ - __constant_memcpy3d((d),(s),(count)) : \ - __memcpy3d((d),(s),(count))) - -#else /* CONFIG_X86_USE_3DNOW */ - -/* -** Generic routines -*/ - - -#define memcpy(d, s, count) __memcpy(d, s, count) - -#endif /* CONFIG_X86_USE_3DNOW */ - - -extern void __struct_cpy_bug( void ); - -#define struct_cpy(x,y) \ -({ \ - if (sizeof(*(x)) != sizeof(*(y))) \ - __struct_cpy_bug; \ - memcpy(x, y, sizeof(*(x))); \ -}) - - -#define __HAVE_ARCH_MEMMOVE -static inline void * memmove(void * dest,const void * src, size_t n) -{ -int d0, d1, d2; -register void *tmp = (void *)dest; -if (dest -/* - * On a 486 or Pentium, we are better off not using the - * byte string operations. But on a 386 or a PPro the - * byte string ops are faster than doing it by hand - * (MUCH faster on a Pentium). - * - * Also, the byte strings actually work correctly. Forget - * the i486 routines for now as they may be broken.. - */ -#if FIXED_486_STRING && defined(CONFIG_X86_USE_STRING_486) -#include -#else - -/* - * This string-include defines all string functions as inline - * functions. Use gcc. It also assumes ds=es=data space, this should be - * normal. Most of the string-functions are rather heavily hand-optimized, - * see especially strtok,strstr,str[c]spn. They should work, but are not - * very easy to understand. Everything is done entirely within the register - * set, making the functions fast and clean. String instructions have been - * used through-out, making for "slightly" unclear code :-) - * - * NO Copyright (C) 1991, 1992 Linus Torvalds, - * consider these trivial functions to be PD. - */ - -#define __HAVE_ARCH_STRCPY -static inline char * strcpy(char * dest,const char *src) -{ -int d0, d1, d2; -__asm__ __volatile__( - "1:\tlodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b" - : "=&S" (d0), "=&D" (d1), "=&a" (d2) - :"0" (src),"1" (dest) : "memory"); -return dest; -} - -#define __HAVE_ARCH_STRNCPY -static inline char * strncpy(char * dest,const char *src,size_t count) -{ -int d0, d1, d2, d3; -__asm__ __volatile__( - "1:\tdecl %2\n\t" - "js 2f\n\t" - "lodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n\t" - "rep\n\t" - "stosb\n" - "2:" - : "=&S" (d0), "=&D" (d1), "=&c" (d2), "=&a" (d3) - :"0" (src),"1" (dest),"2" (count) : "memory"); -return dest; -} - -#define __HAVE_ARCH_STRCAT -static inline char * strcat(char * dest,const char * src) -{ -int d0, d1, d2, d3; -__asm__ __volatile__( - "repne\n\t" - "scasb\n\t" - "decl %1\n" - "1:\tlodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b" - : "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3) - : "0" (src), "1" (dest), "2" (0), "3" (0xffffffff):"memory"); -return dest; -} - -#define __HAVE_ARCH_STRNCAT -static inline char * strncat(char * dest,const char * src,size_t count) -{ -int d0, d1, d2, d3; -__asm__ __volatile__( - "repne\n\t" - "scasb\n\t" - "decl %1\n\t" - "movl %8,%3\n" - "1:\tdecl %3\n\t" - "js 2f\n\t" - "lodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n" - "2:\txorl %2,%2\n\t" - "stosb" - : "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3) - : "0" (src),"1" (dest),"2" (0),"3" (0xffffffff), "g" (count) - : "memory"); -return dest; -} - -#define __HAVE_ARCH_STRCMP -static inline int strcmp(const char * cs,const char * ct) -{ -int d0, d1; -register int __res; -__asm__ __volatile__( - "1:\tlodsb\n\t" - "scasb\n\t" - "jne 2f\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n\t" - "xorl %%eax,%%eax\n\t" - "jmp 3f\n" - "2:\tsbbl %%eax,%%eax\n\t" - "orb $1,%%al\n" - "3:" - :"=a" (__res), "=&S" (d0), "=&D" (d1) - :"1" (cs),"2" (ct)); -return __res; -} - -#define __HAVE_ARCH_STRNCMP -static inline int strncmp(const char * cs,const char * ct,size_t count) -{ -register int __res; -int d0, d1, d2; -__asm__ __volatile__( - "1:\tdecl %3\n\t" - "js 2f\n\t" - "lodsb\n\t" - "scasb\n\t" - "jne 3f\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n" - "2:\txorl %%eax,%%eax\n\t" - "jmp 4f\n" - "3:\tsbbl %%eax,%%eax\n\t" - "orb $1,%%al\n" - "4:" - :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2) - :"1" (cs),"2" (ct),"3" (count)); -return __res; -} - -#define __HAVE_ARCH_STRCHR -static inline char * strchr(const char * s, int c) -{ -int d0; -register char * __res; -__asm__ __volatile__( - "movb %%al,%%ah\n" - "1:\tlodsb\n\t" - "cmpb %%ah,%%al\n\t" - "je 2f\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n\t" - "movl $1,%1\n" - "2:\tmovl %1,%0\n\t" - "decl %0" - :"=a" (__res), "=&S" (d0) : "1" (s),"0" (c)); -return __res; -} - -#define __HAVE_ARCH_STRRCHR -static inline char * strrchr(const char * s, int c) -{ -int d0, d1; -register char * __res; -__asm__ __volatile__( - "movb %%al,%%ah\n" - "1:\tlodsb\n\t" - "cmpb %%ah,%%al\n\t" - "jne 2f\n\t" - "leal -1(%%esi),%0\n" - "2:\ttestb %%al,%%al\n\t" - "jne 1b" - :"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c)); -return __res; -} - -#define __HAVE_ARCH_STRLEN -static inline size_t strlen(const char * s) -{ -int d0; -register int __res; -__asm__ __volatile__( - "repne\n\t" - "scasb\n\t" - "notl %0\n\t" - "decl %0" - :"=c" (__res), "=&D" (d0) :"1" (s),"a" (0), "0" (0xffffffff)); -return __res; -} - -static inline void * __memcpy(void * to, const void * from, size_t n) -{ -int d0, d1, d2; -__asm__ __volatile__( - "rep ; movsl\n\t" - "testb $2,%b4\n\t" - "je 1f\n\t" - "movsw\n" - "1:\ttestb $1,%b4\n\t" - "je 2f\n\t" - "movsb\n" - "2:" - : "=&c" (d0), "=&D" (d1), "=&S" (d2) - :"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from) - : "memory"); -return (to); -} - -/* - * This looks horribly ugly, but the compiler can optimize it totally, - * as the count is constant. - */ -static inline void * __constant_memcpy(void * to, const void * from, size_t n) -{ - switch (n) { - case 0: - return to; - case 1: - *(unsigned char *)to = *(const unsigned char *)from; - return to; - case 2: - *(unsigned short *)to = *(const unsigned short *)from; - return to; - case 3: - *(unsigned short *)to = *(const unsigned short *)from; - *(2+(unsigned char *)to) = *(2+(const unsigned char *)from); - return to; - case 4: - *(unsigned long *)to = *(const unsigned long *)from; - return to; - case 6: /* for Ethernet addresses */ - *(unsigned long *)to = *(const unsigned long *)from; - *(2+(unsigned short *)to) = *(2+(const unsigned short *)from); - return to; - case 8: - *(unsigned long *)to = *(const unsigned long *)from; - *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); - return to; - case 12: - *(unsigned long *)to = *(const unsigned long *)from; - *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); - *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); - return to; - case 16: - *(unsigned long *)to = *(const unsigned long *)from; - *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); - *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); - *(3+(unsigned long *)to) = *(3+(const unsigned long *)from); - return to; - case 20: - *(unsigned long *)to = *(const unsigned long *)from; - *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); - *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); - *(3+(unsigned long *)to) = *(3+(const unsigned long *)from); - *(4+(unsigned long *)to) = *(4+(const unsigned long *)from); - return to; - } -#define COMMON(x) \ -__asm__ __volatile__( \ - "rep ; movsl" \ - x \ - : "=&c" (d0), "=&D" (d1), "=&S" (d2) \ - : "0" (n/4),"1" ((long) to),"2" ((long) from) \ - : "memory"); -{ - int d0, d1, d2; - switch (n % 4) { - case 0: COMMON(""); return to; - case 1: COMMON("\n\tmovsb"); return to; - case 2: COMMON("\n\tmovsw"); return to; - default: COMMON("\n\tmovsw\n\tmovsb"); return to; - } -} - -#undef COMMON -} - -#define __HAVE_ARCH_MEMCPY - -#ifdef CONFIG_X86_USE_3DNOW - -#include - -/* - * This CPU favours 3DNow strongly (eg AMD Athlon) - */ - -static inline void * __constant_memcpy3d(void * to, const void * from, size_t len) -{ - if (len < 512) - return __constant_memcpy(to, from, len); - return _mmx_memcpy(to, from, len); -} - -static __inline__ void *__memcpy3d(void *to, const void *from, size_t len) -{ - if (len < 512) - return __memcpy(to, from, len); - return _mmx_memcpy(to, from, len); -} - -#define memcpy(t, f, n) \ -(__builtin_constant_p(n) ? \ - __constant_memcpy3d((t),(f),(n)) : \ - __memcpy3d((t),(f),(n))) - -#else - -/* - * No 3D Now! - */ - -#define memcpy(t, f, n) \ -(__builtin_constant_p(n) ? \ - __constant_memcpy((t),(f),(n)) : \ - __memcpy((t),(f),(n))) - -#endif - -/* - * struct_cpy(x,y), copy structure *x into (matching structure) *y. - * - * We get link-time errors if the structure sizes do not match. - * There is no runtime overhead, it's all optimized away at - * compile time. - */ -extern void __struct_cpy_bug (void); - -#define struct_cpy(x,y) \ -({ \ - if (sizeof(*(x)) != sizeof(*(y))) \ - __struct_cpy_bug; \ - memcpy(x, y, sizeof(*(x))); \ -}) - -#define __HAVE_ARCH_MEMMOVE -static inline void * memmove(void * dest,const void * src, size_t n) -{ -int d0, d1, d2; -if (dest - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -#define NCCS 19 -struct termios { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ -}; - -/* c_cc characters */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VTIME 5 -#define VMIN 6 -#define VSWTC 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VEOL 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOL2 16 - -/* c_iflag bits */ -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IUCLC 0001000 -#define IXON 0002000 -#define IXANY 0004000 -#define IXOFF 0010000 -#define IMAXBEL 0020000 - -/* c_oflag bits */ -#define OPOST 0000001 -#define OLCUC 0000002 -#define ONLCR 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#define NLDLY 0000400 -#define NL0 0000000 -#define NL1 0000400 -#define CRDLY 0003000 -#define CR0 0000000 -#define CR1 0001000 -#define CR2 0002000 -#define CR3 0003000 -#define TABDLY 0014000 -#define TAB0 0000000 -#define TAB1 0004000 -#define TAB2 0010000 -#define TAB3 0014000 -#define XTABS 0014000 -#define BSDLY 0020000 -#define BS0 0000000 -#define BS1 0020000 -#define VTDLY 0040000 -#define VT0 0000000 -#define VT1 0040000 -#define FFDLY 0100000 -#define FF0 0000000 -#define FF1 0100000 - -/* c_cflag bit meaning */ -#define CBAUD 0010017 -#define B0 0000000 /* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#define EXTA B19200 -#define EXTB B38400 -#define CSIZE 0000060 -#define CS5 0000000 -#define CS6 0000020 -#define CS7 0000040 -#define CS8 0000060 -#define CSTOPB 0000100 -#define CREAD 0000200 -#define PARENB 0000400 -#define PARODD 0001000 -#define HUPCL 0002000 -#define CLOCAL 0004000 -#define CBAUDEX 0010000 -#define B57600 0010001 -#define B115200 0010002 -#define B230400 0010003 -#define B460800 0010004 -#define B500000 0010005 -#define B576000 0010006 -#define B921600 0010007 -#define B1000000 0010010 -#define B1152000 0010011 -#define B1500000 0010012 -#define B2000000 0010013 -#define B2500000 0010014 -#define B3000000 0010015 -#define B3500000 0010016 -#define B4000000 0010017 -#define CIBAUD 002003600000 /* input baud rate (not used) */ -#define CMSPAR 010000000000 /* mark or space (stick) parity */ -#define CRTSCTS 020000000000 /* flow control */ - -/* c_lflag bits */ -#define ISIG 0000001 -#define ICANON 0000002 -#define XCASE 0000004 -#define ECHO 0000010 -#define ECHOE 0000020 -#define ECHOK 0000040 -#define ECHONL 0000100 -#define NOFLSH 0000200 -#define TOSTOP 0000400 -#define ECHOCTL 0001000 -#define ECHOPRT 0002000 -#define ECHOKE 0004000 -#define FLUSHO 0010000 -#define PENDIN 0040000 -#define IEXTEN 0100000 - -/* tcflow() and TCXONC use these */ -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* tcflush() and TCFLSH use these */ -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -/* tcsetattr uses these */ -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termios.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termios.h deleted file mode 100644 index ab654386e2..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termios.h +++ /dev/null @@ -1,108 +0,0 @@ -#ifndef _I386_TERMIOS_H -#define _I386_TERMIOS_H - -#include -#include - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define NCC 8 -struct termio { - unsigned short c_iflag; /* input mode flags */ - unsigned short c_oflag; /* output mode flags */ - unsigned short c_cflag; /* control mode flags */ - unsigned short c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - -/* modem lines */ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG -#define TIOCM_OUT1 0x2000 -#define TIOCM_OUT2 0x4000 -#define TIOCM_LOOP 0x8000 - -#define TIOCM_MODEM_BITS TIOCM_OUT2 /* IRDA support */ - -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ - -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Reserved for Mobitex module */ -#define N_R3964 9 /* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Reserved for Profibus */ -#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ - -#ifdef __KERNEL__ - -/* intr=^C quit=^\ erase=del kill=^U - eof=^D vtime=\0 vmin=\1 sxtc=\0 - start=^Q stop=^S susp=^Z eol=\0 - reprint=^R discard=^U werase=^W lnext=^V - eol2=\0 -*/ -#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" - -/* - * Translate a "termio" structure into a "termios". Ugh. - */ -#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \ - unsigned short __tmp; \ - get_user(__tmp,&(termio)->x); \ - *(unsigned short *) &(termios)->x = __tmp; \ -} - -#define user_termio_to_kernel_termios(termios, termio) \ -({ \ - SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \ - SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \ - SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \ - SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \ - copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ -}) - -/* - * Translate a "termios" structure into a "termio". Ugh. - */ -#define kernel_termios_to_user_termio(termio, termios) \ -({ \ - put_user((termios)->c_iflag, &(termio)->c_iflag); \ - put_user((termios)->c_oflag, &(termio)->c_oflag); \ - put_user((termios)->c_cflag, &(termio)->c_cflag); \ - put_user((termios)->c_lflag, &(termio)->c_lflag); \ - put_user((termios)->c_line, &(termio)->c_line); \ - copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ -}) - -#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios)) -#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios)) - -#endif /* __KERNEL__ */ - -#endif /* _I386_TERMIOS_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/timex.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/timex.h deleted file mode 100644 index 3eeb5d2b70..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/timex.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * linux/include/asm-i386/timex.h - * - * i386 architecture timex specifications - */ -#ifndef _ASMi386_TIMEX_H -#define _ASMi386_TIMEX_H - -#include -#include - -#ifdef CONFIG_MELAN -# define CLOCK_TICK_RATE 1189200 /* AMD Elan has different frequency! */ -#else -# define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ -#endif - -#define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */ -#define FINETUNE ((((((long)LATCH * HZ - CLOCK_TICK_RATE) << SHIFT_HZ) * \ - (1000000/CLOCK_TICK_FACTOR) / (CLOCK_TICK_RATE/CLOCK_TICK_FACTOR)) \ - << (SHIFT_SCALE-SHIFT_HZ)) / HZ) - -/* - * Standard way to access the cycle counter on i586+ CPUs. - * Currently only used on SMP. - * - * If you really have a SMP machine with i486 chips or older, - * compile for that, and this will just always return zero. - * That's ok, it just means that the nicer scheduling heuristics - * won't work for you. - * - * We only use the low 32 bits, and we'd simply better make sure - * that we reschedule before that wraps. Scheduling at least every - * four billion cycles just basically sounds like a good idea, - * regardless of how fast the machine is. - */ -typedef unsigned long long cycles_t; - -extern cycles_t cacheflush_time; - -static inline cycles_t get_cycles (void) -{ -#ifndef CONFIG_X86_TSC - return 0; -#else - unsigned long long ret; - - rdtscll(ret); - return ret; -#endif -} - -extern unsigned long cpu_khz; - -#define vxtime_lock() do {} while (0) -#define vxtime_unlock() do {} while (0) - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/tlb.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/tlb.h deleted file mode 100644 index 69c0faa931..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/tlb.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/types.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/types.h deleted file mode 100644 index 2c64e0c3de..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/types.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef _I386_TYPES_H -#define _I386_TYPES_H - -typedef unsigned short umode_t; - -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64; -typedef unsigned long long __u64; -#endif - -/* - * These aren't exported outside the kernel to avoid name space clashes - */ -#ifdef __KERNEL__ - -#include - -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - -#define BITS_PER_LONG 32 - -/* DMA addresses come in generic and 64-bit flavours. */ - -#ifdef CONFIG_HIGHMEM64G -typedef u64 dma_addr_t; -#else -typedef u32 dma_addr_t; -#endif -typedef u64 dma64_addr_t; - -#endif /* __KERNEL__ */ - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/uaccess.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/uaccess.h deleted file mode 100644 index ecc6693352..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/uaccess.h +++ /dev/null @@ -1,606 +0,0 @@ -#ifndef __i386_UACCESS_H -#define __i386_UACCESS_H - -/* - * User space memory access functions - */ -#include -#include -#include -#include - -#define VERIFY_READ 0 -#define VERIFY_WRITE 1 - -/* - * The fs value determines whether argument validity checking should be - * performed or not. If get_fs() == USER_DS, checking is performed, with - * get_fs() == KERNEL_DS, checking is bypassed. - * - * For historical reasons, these macros are grossly misnamed. - */ - -#define MAKE_MM_SEG(s) ((mm_segment_t) { (s) }) - - -#define KERNEL_DS MAKE_MM_SEG(0xFFFFFFFF) -#define USER_DS MAKE_MM_SEG(PAGE_OFFSET) - -#define get_ds() (KERNEL_DS) -#define get_fs() (current->addr_limit) -#define set_fs(x) (current->addr_limit = (x)) - -#define segment_eq(a,b) ((a).seg == (b).seg) - -extern int __verify_write(const void *, unsigned long); - -#define __addr_ok(addr) ((unsigned long)(addr) < (current->addr_limit.seg)) - -/* - * Uhhuh, this needs 33-bit arithmetic. We have a carry.. - */ -#define __range_ok(addr,size) ({ \ - unsigned long flag,sum; \ - asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \ - :"=&r" (flag), "=r" (sum) \ - :"1" (addr),"g" ((int)(size)),"g" (current->addr_limit.seg)); \ - flag; }) - -#ifdef CONFIG_X86_WP_WORKS_OK - -#define access_ok(type,addr,size) (__range_ok(addr,size) == 0) - -#else - -#define access_ok(type,addr,size) ( (__range_ok(addr,size) == 0) && \ - ((type) == VERIFY_READ || boot_cpu_data.wp_works_ok || \ - segment_eq(get_fs(),KERNEL_DS) || \ - __verify_write((void *)(addr),(size)))) - -#endif - -static inline int verify_area(int type, const void * addr, unsigned long size) -{ - return access_ok(type,addr,size) ? 0 : -EFAULT; -} - - -/* - * The exception table consists of pairs of addresses: the first is the - * address of an instruction that is allowed to fault, and the second is - * the address at which the program should continue. No registers are - * modified, so it is entirely up to the continuation code to figure out - * what to do. - * - * All the routines below use bits of fixup code that are out of line - * with the main instruction path. This means when everything is well, - * we don't even have to jump over them. Further, they do not intrude - * on our cache or tlb entries. - */ - -struct exception_table_entry -{ - unsigned long insn, fixup; -}; - -/* Returns 0 if exception not found and fixup otherwise. */ -extern unsigned long search_exception_table(unsigned long); - - -/* - * These are the main single-value transfer routines. They automatically - * use the right size if we just have the right pointer type. - * - * This gets kind of ugly. We want to return _two_ values in "get_user()" - * and yet we don't want to do any pointers, because that is too much - * of a performance impact. Thus we have a few rather ugly macros here, - * and hide all the uglyness from the user. - * - * The "__xxx" versions of the user access functions are versions that - * do not verify the address space, that must have been done previously - * with a separate "access_ok()" call (this is used when we do multiple - * accesses to the same area of user memory). - */ - -extern void __get_user_1(void); -extern void __get_user_2(void); -extern void __get_user_4(void); - -#define __get_user_x(size,ret,x,ptr) \ - __asm__ __volatile__("call __get_user_" #size \ - :"=a" (ret),"=d" (x) \ - :"0" (ptr)) - -/* Careful: we have to cast the result to the type of the pointer for sign reasons */ -#define get_user(x,ptr) \ -({ int __ret_gu,__val_gu; \ - switch(sizeof (*(ptr))) { \ - case 1: __get_user_x(1,__ret_gu,__val_gu,ptr); break; \ - case 2: __get_user_x(2,__ret_gu,__val_gu,ptr); break; \ - case 4: __get_user_x(4,__ret_gu,__val_gu,ptr); break; \ - default: __get_user_x(X,__ret_gu,__val_gu,ptr); break; \ - } \ - (x) = (__typeof__(*(ptr)))__val_gu; \ - __ret_gu; \ -}) - -extern void __put_user_1(void); -extern void __put_user_2(void); -extern void __put_user_4(void); -extern void __put_user_8(void); - -extern void __put_user_bad(void); - -#define put_user(x,ptr) \ - __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) - -#define __get_user(x,ptr) \ - __get_user_nocheck((x),(ptr),sizeof(*(ptr))) -#define __put_user(x,ptr) \ - __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr))) - -#define __put_user_nocheck(x,ptr,size) \ -({ \ - long __pu_err; \ - __put_user_size((x),(ptr),(size),__pu_err); \ - __pu_err; \ -}) - - -#define __put_user_check(x,ptr,size) \ -({ \ - long __pu_err = -EFAULT; \ - __typeof__(*(ptr)) *__pu_addr = (ptr); \ - if (access_ok(VERIFY_WRITE,__pu_addr,size)) \ - __put_user_size((x),__pu_addr,(size),__pu_err); \ - __pu_err; \ -}) - -#define __put_user_u64(x, addr, err) \ - __asm__ __volatile__( \ - "1: movl %%eax,0(%2)\n" \ - "2: movl %%edx,4(%2)\n" \ - "3:\n" \ - ".section .fixup,\"ax\"\n" \ - "4: movl %3,%0\n" \ - " jmp 3b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 1b,4b\n" \ - " .long 2b,4b\n" \ - ".previous" \ - : "=r"(err) \ - : "A" (x), "r" (addr), "i"(-EFAULT), "0"(err)) - -#define __put_user_size(x,ptr,size,retval) \ -do { \ - retval = 0; \ - switch (size) { \ - case 1: __put_user_asm(x,ptr,retval,"b","b","iq"); break; \ - case 2: __put_user_asm(x,ptr,retval,"w","w","ir"); break; \ - case 4: __put_user_asm(x,ptr,retval,"l","","ir"); break; \ - case 8: __put_user_u64(x,ptr,retval); break; \ - default: __put_user_bad(); \ - } \ -} while (0) - -struct __large_struct { unsigned long buf[100]; }; -#define __m(x) (*(struct __large_struct *)(x)) - -/* - * Tell gcc we read from memory instead of writing: this is because - * we do not write to any memory gcc knows about, so there are no - * aliasing issues. - */ -#define __put_user_asm(x, addr, err, itype, rtype, ltype) \ - __asm__ __volatile__( \ - "1: mov"itype" %"rtype"1,%2\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3: movl %3,%0\n" \ - " jmp 2b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 1b,3b\n" \ - ".previous" \ - : "=r"(err) \ - : ltype (x), "m"(__m(addr)), "i"(-EFAULT), "0"(err)) - - -#define __get_user_nocheck(x,ptr,size) \ -({ \ - long __gu_err, __gu_val; \ - __get_user_size(__gu_val,(ptr),(size),__gu_err); \ - (x) = (__typeof__(*(ptr)))__gu_val; \ - __gu_err; \ -}) - -extern long __get_user_bad(void); - -#define __get_user_size(x,ptr,size,retval) \ -do { \ - retval = 0; \ - switch (size) { \ - case 1: __get_user_asm(x,ptr,retval,"b","b","=q"); break; \ - case 2: __get_user_asm(x,ptr,retval,"w","w","=r"); break; \ - case 4: __get_user_asm(x,ptr,retval,"l","","=r"); break; \ - default: (x) = __get_user_bad(); \ - } \ -} while (0) - -#define __get_user_asm(x, addr, err, itype, rtype, ltype) \ - __asm__ __volatile__( \ - "1: mov"itype" %2,%"rtype"1\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3: movl %3,%0\n" \ - " xor"itype" %"rtype"1,%"rtype"1\n" \ - " jmp 2b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 1b,3b\n" \ - ".previous" \ - : "=r"(err), ltype (x) \ - : "m"(__m(addr)), "i"(-EFAULT), "0"(err)) - - -/* - * Copy To/From Userspace - */ - -/* Generic arbitrary sized copy. */ -#define __copy_user(to,from,size) \ -do { \ - int __d0, __d1; \ - __asm__ __volatile__( \ - "0: rep; movsl\n" \ - " movl %3,%0\n" \ - "1: rep; movsb\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3: lea 0(%3,%0,4),%0\n" \ - " jmp 2b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 0b,3b\n" \ - " .long 1b,2b\n" \ - ".previous" \ - : "=&c"(size), "=&D" (__d0), "=&S" (__d1) \ - : "r"(size & 3), "0"(size / 4), "1"(to), "2"(from) \ - : "memory"); \ -} while (0) - -#define __copy_user_zeroing(to,from,size) \ -do { \ - int __d0, __d1; \ - __asm__ __volatile__( \ - "0: rep; movsl\n" \ - " movl %3,%0\n" \ - "1: rep; movsb\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3: lea 0(%3,%0,4),%0\n" \ - "4: pushl %0\n" \ - " pushl %%eax\n" \ - " xorl %%eax,%%eax\n" \ - " rep; stosb\n" \ - " popl %%eax\n" \ - " popl %0\n" \ - " jmp 2b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 0b,3b\n" \ - " .long 1b,4b\n" \ - ".previous" \ - : "=&c"(size), "=&D" (__d0), "=&S" (__d1) \ - : "r"(size & 3), "0"(size / 4), "1"(to), "2"(from) \ - : "memory"); \ -} while (0) - -/* We let the __ versions of copy_from/to_user inline, because they're often - * used in fast paths and have only a small space overhead. - */ -static inline unsigned long -__generic_copy_from_user_nocheck(void *to, const void *from, unsigned long n) -{ - __copy_user_zeroing(to,from,n); - return n; -} - -static inline unsigned long -__generic_copy_to_user_nocheck(void *to, const void *from, unsigned long n) -{ - __copy_user(to,from,n); - return n; -} - - -/* Optimize just a little bit when we know the size of the move. */ -#define __constant_copy_user(to, from, size) \ -do { \ - int __d0, __d1; \ - switch (size & 3) { \ - default: \ - __asm__ __volatile__( \ - "0: rep; movsl\n" \ - "1:\n" \ - ".section .fixup,\"ax\"\n" \ - "2: shl $2,%0\n" \ - " jmp 1b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 0b,2b\n" \ - ".previous" \ - : "=c"(size), "=&S" (__d0), "=&D" (__d1)\ - : "1"(from), "2"(to), "0"(size/4) \ - : "memory"); \ - break; \ - case 1: \ - __asm__ __volatile__( \ - "0: rep; movsl\n" \ - "1: movsb\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3: shl $2,%0\n" \ - "4: incl %0\n" \ - " jmp 2b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 0b,3b\n" \ - " .long 1b,4b\n" \ - ".previous" \ - : "=c"(size), "=&S" (__d0), "=&D" (__d1)\ - : "1"(from), "2"(to), "0"(size/4) \ - : "memory"); \ - break; \ - case 2: \ - __asm__ __volatile__( \ - "0: rep; movsl\n" \ - "1: movsw\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3: shl $2,%0\n" \ - "4: addl $2,%0\n" \ - " jmp 2b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 0b,3b\n" \ - " .long 1b,4b\n" \ - ".previous" \ - : "=c"(size), "=&S" (__d0), "=&D" (__d1)\ - : "1"(from), "2"(to), "0"(size/4) \ - : "memory"); \ - break; \ - case 3: \ - __asm__ __volatile__( \ - "0: rep; movsl\n" \ - "1: movsw\n" \ - "2: movsb\n" \ - "3:\n" \ - ".section .fixup,\"ax\"\n" \ - "4: shl $2,%0\n" \ - "5: addl $2,%0\n" \ - "6: incl %0\n" \ - " jmp 3b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 0b,4b\n" \ - " .long 1b,5b\n" \ - " .long 2b,6b\n" \ - ".previous" \ - : "=c"(size), "=&S" (__d0), "=&D" (__d1)\ - : "1"(from), "2"(to), "0"(size/4) \ - : "memory"); \ - break; \ - } \ -} while (0) - -/* Optimize just a little bit when we know the size of the move. */ -#define __constant_copy_user_zeroing(to, from, size) \ -do { \ - int __d0, __d1; \ - switch (size & 3) { \ - default: \ - __asm__ __volatile__( \ - "0: rep; movsl\n" \ - "1:\n" \ - ".section .fixup,\"ax\"\n" \ - "2: pushl %0\n" \ - " pushl %%eax\n" \ - " xorl %%eax,%%eax\n" \ - " rep; stosl\n" \ - " popl %%eax\n" \ - " popl %0\n" \ - " shl $2,%0\n" \ - " jmp 1b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 0b,2b\n" \ - ".previous" \ - : "=c"(size), "=&S" (__d0), "=&D" (__d1)\ - : "1"(from), "2"(to), "0"(size/4) \ - : "memory"); \ - break; \ - case 1: \ - __asm__ __volatile__( \ - "0: rep; movsl\n" \ - "1: movsb\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3: pushl %0\n" \ - " pushl %%eax\n" \ - " xorl %%eax,%%eax\n" \ - " rep; stosl\n" \ - " stosb\n" \ - " popl %%eax\n" \ - " popl %0\n" \ - " shl $2,%0\n" \ - " incl %0\n" \ - " jmp 2b\n" \ - "4: pushl %%eax\n" \ - " xorl %%eax,%%eax\n" \ - " stosb\n" \ - " popl %%eax\n" \ - " incl %0\n" \ - " jmp 2b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 0b,3b\n" \ - " .long 1b,4b\n" \ - ".previous" \ - : "=c"(size), "=&S" (__d0), "=&D" (__d1)\ - : "1"(from), "2"(to), "0"(size/4) \ - : "memory"); \ - break; \ - case 2: \ - __asm__ __volatile__( \ - "0: rep; movsl\n" \ - "1: movsw\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3: pushl %0\n" \ - " pushl %%eax\n" \ - " xorl %%eax,%%eax\n" \ - " rep; stosl\n" \ - " stosw\n" \ - " popl %%eax\n" \ - " popl %0\n" \ - " shl $2,%0\n" \ - " addl $2,%0\n" \ - " jmp 2b\n" \ - "4: pushl %%eax\n" \ - " xorl %%eax,%%eax\n" \ - " stosw\n" \ - " popl %%eax\n" \ - " addl $2,%0\n" \ - " jmp 2b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 0b,3b\n" \ - " .long 1b,4b\n" \ - ".previous" \ - : "=c"(size), "=&S" (__d0), "=&D" (__d1)\ - : "1"(from), "2"(to), "0"(size/4) \ - : "memory"); \ - break; \ - case 3: \ - __asm__ __volatile__( \ - "0: rep; movsl\n" \ - "1: movsw\n" \ - "2: movsb\n" \ - "3:\n" \ - ".section .fixup,\"ax\"\n" \ - "4: pushl %0\n" \ - " pushl %%eax\n" \ - " xorl %%eax,%%eax\n" \ - " rep; stosl\n" \ - " stosw\n" \ - " stosb\n" \ - " popl %%eax\n" \ - " popl %0\n" \ - " shl $2,%0\n" \ - " addl $3,%0\n" \ - " jmp 2b\n" \ - "5: pushl %%eax\n" \ - " xorl %%eax,%%eax\n" \ - " stosw\n" \ - " stosb\n" \ - " popl %%eax\n" \ - " addl $3,%0\n" \ - " jmp 2b\n" \ - "6: pushl %%eax\n" \ - " xorl %%eax,%%eax\n" \ - " stosb\n" \ - " popl %%eax\n" \ - " incl %0\n" \ - " jmp 3b\n" \ - ".previous\n" \ - ".section __ex_table,\"a\"\n" \ - " .align 4\n" \ - " .long 0b,4b\n" \ - " .long 1b,5b\n" \ - " .long 2b,6b\n" \ - ".previous" \ - : "=c"(size), "=&S" (__d0), "=&D" (__d1)\ - : "1"(from), "2"(to), "0"(size/4) \ - : "memory"); \ - break; \ - } \ -} while (0) - -unsigned long __generic_copy_to_user(void *, const void *, unsigned long); -unsigned long __generic_copy_from_user(void *, const void *, unsigned long); - -static inline unsigned long -__constant_copy_to_user(void *to, const void *from, unsigned long n) -{ - prefetch(from); - if (access_ok(VERIFY_WRITE, to, n)) - __constant_copy_user(to,from,n); - return n; -} - -static inline unsigned long -__constant_copy_from_user(void *to, const void *from, unsigned long n) -{ - if (access_ok(VERIFY_READ, from, n)) - __constant_copy_user_zeroing(to,from,n); - else - memset(to, 0, n); - return n; -} - -static inline unsigned long -__constant_copy_to_user_nocheck(void *to, const void *from, unsigned long n) -{ - __constant_copy_user(to,from,n); - return n; -} - -static inline unsigned long -__constant_copy_from_user_nocheck(void *to, const void *from, unsigned long n) -{ - __constant_copy_user_zeroing(to,from,n); - return n; -} - -#define copy_to_user(to,from,n) \ - (__builtin_constant_p(n) ? \ - __constant_copy_to_user((to),(from),(n)) : \ - __generic_copy_to_user((to),(from),(n))) - -#define copy_from_user(to,from,n) \ - (__builtin_constant_p(n) ? \ - __constant_copy_from_user((to),(from),(n)) : \ - __generic_copy_from_user((to),(from),(n))) - -#define __copy_to_user(to,from,n) \ - (__builtin_constant_p(n) ? \ - __constant_copy_to_user_nocheck((to),(from),(n)) : \ - __generic_copy_to_user_nocheck((to),(from),(n))) - -#define __copy_from_user(to,from,n) \ - (__builtin_constant_p(n) ? \ - __constant_copy_from_user_nocheck((to),(from),(n)) : \ - __generic_copy_from_user_nocheck((to),(from),(n))) - -long strncpy_from_user(char *dst, const char *src, long count); -long __strncpy_from_user(char *dst, const char *src, long count); -#define strlen_user(str) strnlen_user(str, ~0UL >> 1) -long strnlen_user(const char *str, long n); -unsigned long clear_user(void *mem, unsigned long len); -unsigned long __clear_user(void *mem, unsigned long len); - -#endif /* __i386_UACCESS_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ucontext.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ucontext.h deleted file mode 100644 index b0db36925f..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ucontext.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _ASMi386_UCONTEXT_H -#define _ASMi386_UCONTEXT_H - -struct ucontext { - unsigned long uc_flags; - struct ucontext *uc_link; - stack_t uc_stack; - struct sigcontext uc_mcontext; - sigset_t uc_sigmask; /* mask last for extensibility */ -}; - -#endif /* !_ASMi386_UCONTEXT_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unaligned.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unaligned.h deleted file mode 100644 index 7acd795762..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unaligned.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef __I386_UNALIGNED_H -#define __I386_UNALIGNED_H - -/* - * The i386 can do unaligned accesses itself. - * - * The strange macros are there to make sure these can't - * be misused in a way that makes them not work on other - * architectures where unaligned accesses aren't as simple. - */ - -/** - * get_unaligned - get value from possibly mis-aligned location - * @ptr: pointer to value - * - * This macro should be used for accessing values larger in size than - * single bytes at locations that are expected to be improperly aligned, - * e.g. retrieving a u16 value from a location not u16-aligned. - * - * Note that unaligned accesses can be very expensive on some architectures. - */ -#define get_unaligned(ptr) (*(ptr)) - -/** - * put_unaligned - put value to a possibly mis-aligned location - * @val: value to place - * @ptr: pointer to location - * - * This macro should be used for placing values larger in size than - * single bytes at locations that are expected to be improperly aligned, - * e.g. writing a u16 value to a location not u16-aligned. - * - * Note that unaligned accesses can be very expensive on some architectures. - */ -#define put_unaligned(val, ptr) ((void)( *(ptr) = (val) )) - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unistd.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unistd.h deleted file mode 100644 index 84143445c0..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unistd.h +++ /dev/null @@ -1,386 +0,0 @@ -#ifndef _ASM_I386_UNISTD_H_ -#define _ASM_I386_UNISTD_H_ - -/* - * This file contains the system call numbers. - */ - -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_lchown 16 -#define __NR_break 17 -#define __NR_oldstat 18 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_oldfstat 28 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_stty 31 -#define __NR_gtty 32 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_ftime 35 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_prof 44 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_signal 48 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_lock 53 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_mpx 56 -#define __NR_setpgid 57 -#define __NR_ulimit 58 -#define __NR_oldolduname 59 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_select 82 -#define __NR_symlink 83 -#define __NR_oldlstat 84 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_profil 98 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_ioperm 101 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_olduname 109 -#define __NR_iopl 110 -#define __NR_vhangup 111 -#define __NR_idle 112 -#define __NR_vm86old 113 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_modify_ldt 123 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_afs_syscall 137 /* Syscall for Andrew File System */ -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_vm86 166 -#define __NR_query_module 167 -#define __NR_poll 168 -#define __NR_nfsservctl 169 -#define __NR_setresgid 170 -#define __NR_getresgid 171 -#define __NR_prctl 172 -#define __NR_rt_sigreturn 173 -#define __NR_rt_sigaction 174 -#define __NR_rt_sigprocmask 175 -#define __NR_rt_sigpending 176 -#define __NR_rt_sigtimedwait 177 -#define __NR_rt_sigqueueinfo 178 -#define __NR_rt_sigsuspend 179 -#define __NR_pread 180 -#define __NR_pwrite 181 -#define __NR_chown 182 -#define __NR_getcwd 183 -#define __NR_capget 184 -#define __NR_capset 185 -#define __NR_sigaltstack 186 -#define __NR_sendfile 187 -#define __NR_getpmsg 188 /* some people actually want streams */ -#define __NR_putpmsg 189 /* some people actually want streams */ -#define __NR_vfork 190 -#define __NR_ugetrlimit 191 /* SuS compliant getrlimit */ -#define __NR_mmap2 192 -#define __NR_truncate64 193 -#define __NR_ftruncate64 194 -#define __NR_stat64 195 -#define __NR_lstat64 196 -#define __NR_fstat64 197 -#define __NR_lchown32 198 -#define __NR_getuid32 199 -#define __NR_getgid32 200 -#define __NR_geteuid32 201 -#define __NR_getegid32 202 -#define __NR_setreuid32 203 -#define __NR_setregid32 204 -#define __NR_getgroups32 205 -#define __NR_setgroups32 206 -#define __NR_fchown32 207 -#define __NR_setresuid32 208 -#define __NR_getresuid32 209 -#define __NR_setresgid32 210 -#define __NR_getresgid32 211 -#define __NR_chown32 212 -#define __NR_setuid32 213 -#define __NR_setgid32 214 -#define __NR_setfsuid32 215 -#define __NR_setfsgid32 216 -#define __NR_pivot_root 217 -#define __NR_mincore 218 -#define __NR_madvise 219 -#define __NR_madvise1 219 /* delete when C lib stub is removed */ -#define __NR_getdents64 220 -#define __NR_fcntl64 221 -#define __NR_security 223 /* syscall for security modules */ -#define __NR_gettid 224 -#define __NR_readahead 225 -#define __NR_setxattr 226 -#define __NR_lsetxattr 227 -#define __NR_fsetxattr 228 -#define __NR_getxattr 229 -#define __NR_lgetxattr 230 -#define __NR_fgetxattr 231 -#define __NR_listxattr 232 -#define __NR_llistxattr 233 -#define __NR_flistxattr 234 -#define __NR_removexattr 235 -#define __NR_lremovexattr 236 -#define __NR_fremovexattr 237 -#define __NR_tkill 238 -#define __NR_sendfile64 239 -#define __NR_futex 240 -#define __NR_sched_setaffinity 241 -#define __NR_sched_getaffinity 242 -#define __NR_set_thread_area 243 -#define __NR_get_thread_area 244 -#define __NR_io_setup 245 -#define __NR_io_destroy 246 -#define __NR_io_getevents 247 -#define __NR_io_submit 248 -#define __NR_io_cancel 249 -#define __NR_alloc_hugepages 250 -#define __NR_free_hugepages 251 -#define __NR_exit_group 252 - -/* user-visible error numbers are in the range -1 - -124: see */ - -#define __syscall_return(type, res) \ -do { \ - if ((unsigned long)(res) >= (unsigned long)(-125)) { \ - errno = -(res); \ - res = -1; \ - } \ - return (type) (res); \ -} while (0) - -/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */ -#define _syscall0(type,name) \ -type name(void) \ -{ \ -long __res; \ -__asm__ volatile ("int $0x80" \ - : "=a" (__res) \ - : "0" (__NR_##name)); \ -__syscall_return(type,__res); \ -} - -#define _syscall1(type,name,type1,arg1) \ -type name(type1 arg1) \ -{ \ -long __res; \ -__asm__ volatile ("int $0x80" \ - : "=a" (__res) \ - : "0" (__NR_##name),"b" ((long)(arg1))); \ -__syscall_return(type,__res); \ -} - -#define _syscall2(type,name,type1,arg1,type2,arg2) \ -type name(type1 arg1,type2 arg2) \ -{ \ -long __res; \ -__asm__ volatile ("int $0x80" \ - : "=a" (__res) \ - : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2))); \ -__syscall_return(type,__res); \ -} - -#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ -type name(type1 arg1,type2 arg2,type3 arg3) \ -{ \ -long __res; \ -__asm__ volatile ("int $0x80" \ - : "=a" (__res) \ - : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ - "d" ((long)(arg3))); \ -__syscall_return(type,__res); \ -} - -#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -{ \ -long __res; \ -__asm__ volatile ("int $0x80" \ - : "=a" (__res) \ - : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ - "d" ((long)(arg3)),"S" ((long)(arg4))); \ -__syscall_return(type,__res); \ -} - -#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5) \ -type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ -{ \ -long __res; \ -__asm__ volatile ("int $0x80" \ - : "=a" (__res) \ - : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ - "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \ -__syscall_return(type,__res); \ -} - -#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5,type6,arg6) \ -type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \ -{ \ -long __res; \ -__asm__ volatile ("push %%ebp ; movl %%eax,%%ebp ; movl %1,%%eax ; int $0x80 ; pop %%ebp" \ - : "=a" (__res) \ - : "i" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ - "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)), \ - "0" ((long)(arg6))); \ -__syscall_return(type,__res); \ -} - -#ifdef __KERNEL_SYSCALLS__ - -/* - * we need this inline - forking from kernel space will result - * in NO COPY ON WRITE (!!!), until an execve is executed. This - * is no problem, but for the stack. This is handled by not letting - * main() use the stack at all after fork(). Thus, no function - * calls - which means inline code for fork too, as otherwise we - * would use the stack upon exit from 'fork()'. - * - * Actually only pause and fork are needed inline, so that there - * won't be any messing with the stack from main(), but we define - * some others too. - */ -#define __NR__exit __NR_exit -static inline _syscall0(int,pause) -static inline _syscall0(int,sync) -static inline _syscall0(pid_t,setsid) -static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) -static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) -static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) -static inline _syscall1(int,dup,int,fd) -static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) -static inline _syscall3(int,open,const char *,file,int,flag,int,mode) -static inline _syscall1(int,close,int,fd) -static inline _syscall1(int,_exit,int,exitcode) -static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) -static inline _syscall1(int,delete_module,const char *,name) - -static inline pid_t wait(int * wait_stat) -{ - return waitpid(-1,wait_stat,0); -} - -#endif - -#endif /* _ASM_I386_UNISTD_H_ */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/user.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/user.h deleted file mode 100644 index ddc06ea014..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/user.h +++ /dev/null @@ -1,122 +0,0 @@ -#ifndef _I386_USER_H -#define _I386_USER_H - -#include -#include -/* Core file format: The core file is written in such a way that gdb - can understand it and provide useful information to the user (under - linux we use the 'trad-core' bfd). There are quite a number of - obstacles to being able to view the contents of the floating point - registers, and until these are solved you will not be able to view the - contents of them. Actually, you can read in the core file and look at - the contents of the user struct to find out what the floating point - registers contain. - The actual file contents are as follows: - UPAGE: 1 page consisting of a user struct that tells gdb what is present - in the file. Directly after this is a copy of the task_struct, which - is currently not used by gdb, but it may come in useful at some point. - All of the registers are stored as part of the upage. The upage should - always be only one page. - DATA: The data area is stored. We use current->end_text to - current->brk to pick up all of the user variables, plus any memory - that may have been malloced. No attempt is made to determine if a page - is demand-zero or if a page is totally unused, we just cover the entire - range. All of the addresses are rounded in such a way that an integral - number of pages is written. - STACK: We need the stack information in order to get a meaningful - backtrace. We need to write the data from (esp) to - current->start_stack, so we round each of these off in order to be able - to write an integer number of pages. - The minimum core file size is 3 pages, or 12288 bytes. -*/ - -/* - * Pentium III FXSR, SSE support - * Gareth Hughes , May 2000 - * - * Provide support for the GDB 5.0+ PTRACE_{GET|SET}FPXREGS requests for - * interacting with the FXSR-format floating point environment. Floating - * point data can be accessed in the regular format in the usual manner, - * and both the standard and SIMD floating point data can be accessed via - * the new ptrace requests. In either case, changes to the FPU environment - * will be reflected in the task's state as expected. - */ - -struct user_i387_struct { - long cwd; - long swd; - long twd; - long fip; - long fcs; - long foo; - long fos; - long st_space[20]; /* 8*10 bytes for each FP-reg = 80 bytes */ -}; - -struct user_fxsr_struct { - unsigned short cwd; - unsigned short swd; - unsigned short twd; - unsigned short fop; - long fip; - long fcs; - long foo; - long fos; - long mxcsr; - long reserved; - long st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */ - long xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */ - long padding[56]; -}; - -/* - * This is the old layout of "struct pt_regs", and - * is still the layout used by user mode (the new - * pt_regs doesn't have all registers as the kernel - * doesn't use the extra segment registers) - */ -struct user_regs_struct { - long ebx, ecx, edx, esi, edi, ebp, eax; - unsigned short ds, __ds, es, __es; - unsigned short fs, __fs, gs, __gs; - long orig_eax, eip; - unsigned short cs, __cs; - long eflags, esp; - unsigned short ss, __ss; -}; - -/* When the kernel dumps core, it starts by dumping the user struct - - this will be used by gdb to figure out where the data and stack segments - are within the file, and what virtual addresses to use. */ -struct user{ -/* We start with the registers, to mimic the way that "memory" is returned - from the ptrace(3,...) function. */ - struct user_regs_struct regs; /* Where the registers are actually stored */ -/* ptrace does not yet supply these. Someday.... */ - int u_fpvalid; /* True if math co-processor being used. */ - /* for this mess. Not yet used. */ - struct user_i387_struct i387; /* Math Co-processor registers. */ -/* The rest of this junk is to help gdb figure out what goes where */ - unsigned long int u_tsize; /* Text segment size (pages). */ - unsigned long int u_dsize; /* Data segment size (pages). */ - unsigned long int u_ssize; /* Stack segment size (pages). */ - unsigned long start_code; /* Starting virtual address of text. */ - unsigned long start_stack; /* Starting virtual address of stack area. - This is actually the bottom of the stack, - the top of the stack is always found in the - esp register. */ - long int signal; /* Signal that caused the core dump. */ - int reserved; /* No longer used */ - struct user_pt_regs * u_ar0; /* Used by gdb to help find the values for */ - /* the registers. */ - struct user_i387_struct* u_fpstate; /* Math Co-processor pointer. */ - unsigned long magic; /* To uniquely identify a core file */ - char u_comm[32]; /* User command that was responsible */ - int u_debugreg[8]; -}; -#define NBPG PAGE_SIZE -#define UPAGES 1 -#define HOST_TEXT_START_ADDR (u.start_code) -#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) - -#endif /* _I386_USER_H */ diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/vga.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/vga.h deleted file mode 100644 index ef0c0e50cc..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/vga.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Access to VGA videoram - * - * (c) 1998 Martin Mares - */ - -#ifndef _LINUX_ASM_VGA_H_ -#define _LINUX_ASM_VGA_H_ - -/* - * On the PC, we can just recalculate addresses and then - * access the videoram directly without any black magic. - */ - -#define VGA_MAP_MEM(x) (unsigned long)phys_to_virt(x) - -#define vga_readb(x) (*(x)) -#define vga_writeb(x,y) (*(y) = (x)) - -#endif diff --git a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/xor.h b/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/xor.h deleted file mode 100644 index bfe9396b77..0000000000 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/xor.h +++ /dev/null @@ -1,878 +0,0 @@ -/* - * include/asm-i386/xor.h - * - * Optimized RAID-5 checksumming functions for MMX and SSE. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * You should have received a copy of the GNU General Public License - * (for example /usr/src/linux/COPYING); if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * High-speed RAID5 checksumming functions utilizing MMX instructions. - * Copyright (C) 1998 Ingo Molnar. - */ - -#define FPU_SAVE \ - do { \ - if (!(current->flags & PF_USEDFPU)) \ - __asm__ __volatile__ (" clts;\n"); \ - __asm__ __volatile__ ("fsave %0; fwait": "=m"(fpu_save[0])); \ - } while (0) - -#define FPU_RESTORE \ - do { \ - __asm__ __volatile__ ("frstor %0": : "m"(fpu_save[0])); \ - if (!(current->flags & PF_USEDFPU)) \ - stts(); \ - } while (0) - -#define LD(x,y) " movq 8*("#x")(%1), %%mm"#y" ;\n" -#define ST(x,y) " movq %%mm"#y", 8*("#x")(%1) ;\n" -#define XO1(x,y) " pxor 8*("#x")(%2), %%mm"#y" ;\n" -#define XO2(x,y) " pxor 8*("#x")(%3), %%mm"#y" ;\n" -#define XO3(x,y) " pxor 8*("#x")(%4), %%mm"#y" ;\n" -#define XO4(x,y) " pxor 8*("#x")(%5), %%mm"#y" ;\n" - - -static void -xor_pII_mmx_2(unsigned long bytes, unsigned long *p1, unsigned long *p2) -{ - unsigned long lines = bytes >> 7; - char fpu_save[108]; - - FPU_SAVE; - - __asm__ __volatile__ ( -#undef BLOCK -#define BLOCK(i) \ - LD(i,0) \ - LD(i+1,1) \ - LD(i+2,2) \ - LD(i+3,3) \ - XO1(i,0) \ - ST(i,0) \ - XO1(i+1,1) \ - ST(i+1,1) \ - XO1(i+2,2) \ - ST(i+2,2) \ - XO1(i+3,3) \ - ST(i+3,3) - - " .align 32 ;\n" - " 1: ;\n" - - BLOCK(0) - BLOCK(4) - BLOCK(8) - BLOCK(12) - - " addl $128, %1 ;\n" - " addl $128, %2 ;\n" - " decl %0 ;\n" - " jnz 1b ;\n" - : "+r" (lines), - "+r" (p1), "+r" (p2) - : - : "memory"); - - FPU_RESTORE; -} - -static void -xor_pII_mmx_3(unsigned long bytes, unsigned long *p1, unsigned long *p2, - unsigned long *p3) -{ - unsigned long lines = bytes >> 7; - char fpu_save[108]; - - FPU_SAVE; - - __asm__ __volatile__ ( -#undef BLOCK -#define BLOCK(i) \ - LD(i,0) \ - LD(i+1,1) \ - LD(i+2,2) \ - LD(i+3,3) \ - XO1(i,0) \ - XO1(i+1,1) \ - XO1(i+2,2) \ - XO1(i+3,3) \ - XO2(i,0) \ - ST(i,0) \ - XO2(i+1,1) \ - ST(i+1,1) \ - XO2(i+2,2) \ - ST(i+2,2) \ - XO2(i+3,3) \ - ST(i+3,3) - - " .align 32 ;\n" - " 1: ;\n" - - BLOCK(0) - BLOCK(4) - BLOCK(8) - BLOCK(12) - - " addl $128, %1 ;\n" - " addl $128, %2 ;\n" - " addl $128, %3 ;\n" - " decl %0 ;\n" - " jnz 1b ;\n" - : "+r" (lines), - "+r" (p1), "+r" (p2), "+r" (p3) - : - : "memory"); - - FPU_RESTORE; -} - -static void -xor_pII_mmx_4(unsigned long bytes, unsigned long *p1, unsigned long *p2, - unsigned long *p3, unsigned long *p4) -{ - unsigned long lines = bytes >> 7; - char fpu_save[108]; - - FPU_SAVE; - - __asm__ __volatile__ ( -#undef BLOCK -#define BLOCK(i) \ - LD(i,0) \ - LD(i+1,1) \ - LD(i+2,2) \ - LD(i+3,3) \ - XO1(i,0) \ - XO1(i+1,1) \ - XO1(i+2,2) \ - XO1(i+3,3) \ - XO2(i,0) \ - XO2(i+1,1) \ - XO2(i+2,2) \ - XO2(i+3,3) \ - XO3(i,0) \ - ST(i,0) \ - XO3(i+1,1) \ - ST(i+1,1) \ - XO3(i+2,2) \ - ST(i+2,2) \ - XO3(i+3,3) \ - ST(i+3,3) - - " .align 32 ;\n" - " 1: ;\n" - - BLOCK(0) - BLOCK(4) - BLOCK(8) - BLOCK(12) - - " addl $128, %1 ;\n" - " addl $128, %2 ;\n" - " addl $128, %3 ;\n" - " addl $128, %4 ;\n" - " decl %0 ;\n" - " jnz 1b ;\n" - : "+r" (lines), - "+r" (p1), "+r" (p2), "+r" (p3), "+r" (p4) - : - : "memory"); - - FPU_RESTORE; -} - - -static void -xor_pII_mmx_5(unsigned long bytes, unsigned long *p1, unsigned long *p2, - unsigned long *p3, unsigned long *p4, unsigned long *p5) -{ - unsigned long lines = bytes >> 7; - char fpu_save[108]; - - FPU_SAVE; - - /* need to save/restore p4/p5 manually otherwise gcc's 10 argument - limit gets exceeded (+ counts as two arguments) */ - __asm__ __volatile__ ( - " pushl %4\n" - " pushl %5\n" -#undef BLOCK -#define BLOCK(i) \ - LD(i,0) \ - LD(i+1,1) \ - LD(i+2,2) \ - LD(i+3,3) \ - XO1(i,0) \ - XO1(i+1,1) \ - XO1(i+2,2) \ - XO1(i+3,3) \ - XO2(i,0) \ - XO2(i+1,1) \ - XO2(i+2,2) \ - XO2(i+3,3) \ - XO3(i,0) \ - XO3(i+1,1) \ - XO3(i+2,2) \ - XO3(i+3,3) \ - XO4(i,0) \ - ST(i,0) \ - XO4(i+1,1) \ - ST(i+1,1) \ - XO4(i+2,2) \ - ST(i+2,2) \ - XO4(i+3,3) \ - ST(i+3,3) - - " .align 32 ;\n" - " 1: ;\n" - - BLOCK(0) - BLOCK(4) - BLOCK(8) - BLOCK(12) - - " addl $128, %1 ;\n" - " addl $128, %2 ;\n" - " addl $128, %3 ;\n" - " addl $128, %4 ;\n" - " addl $128, %5 ;\n" - " decl %0 ;\n" - " jnz 1b ;\n" - " popl %5\n" - " popl %4\n" - : "+r" (lines), - "+r" (p1), "+r" (p2), "+r" (p3) - : "r" (p4), "r" (p5) - : "memory"); - - FPU_RESTORE; -} - -#undef LD -#undef XO1 -#undef XO2 -#undef XO3 -#undef XO4 -#undef ST -#undef BLOCK - -static void -xor_p5_mmx_2(unsigned long bytes, unsigned long *p1, unsigned long *p2) -{ - unsigned long lines = bytes >> 6; - char fpu_save[108]; - - FPU_SAVE; - - __asm__ __volatile__ ( - " .align 32 ;\n" - " 1: ;\n" - " movq (%1), %%mm0 ;\n" - " movq 8(%1), %%mm1 ;\n" - " pxor (%2), %%mm0 ;\n" - " movq 16(%1), %%mm2 ;\n" - " movq %%mm0, (%1) ;\n" - " pxor 8(%2), %%mm1 ;\n" - " movq 24(%1), %%mm3 ;\n" - " movq %%mm1, 8(%1) ;\n" - " pxor 16(%2), %%mm2 ;\n" - " movq 32(%1), %%mm4 ;\n" - " movq %%mm2, 16(%1) ;\n" - " pxor 24(%2), %%mm3 ;\n" - " movq 40(%1), %%mm5 ;\n" - " movq %%mm3, 24(%1) ;\n" - " pxor 32(%2), %%mm4 ;\n" - " movq 48(%1), %%mm6 ;\n" - " movq %%mm4, 32(%1) ;\n" - " pxor 40(%2), %%mm5 ;\n" - " movq 56(%1), %%mm7 ;\n" - " movq %%mm5, 40(%1) ;\n" - " pxor 48(%2), %%mm6 ;\n" - " pxor 56(%2), %%mm7 ;\n" - " movq %%mm6, 48(%1) ;\n" - " movq %%mm7, 56(%1) ;\n" - - " addl $64, %1 ;\n" - " addl $64, %2 ;\n" - " decl %0 ;\n" - " jnz 1b ;\n" - : "+r" (lines), - "+r" (p1), "+r" (p2) - : - : "memory"); - - FPU_RESTORE; -} - -static void -xor_p5_mmx_3(unsigned long bytes, unsigned long *p1, unsigned long *p2, - unsigned long *p3) -{ - unsigned long lines = bytes >> 6; - char fpu_save[108]; - - FPU_SAVE; - - __asm__ __volatile__ ( - " .align 32,0x90 ;\n" - " 1: ;\n" - " movq (%1), %%mm0 ;\n" - " movq 8(%1), %%mm1 ;\n" - " pxor (%2), %%mm0 ;\n" - " movq 16(%1), %%mm2 ;\n" - " pxor 8(%2), %%mm1 ;\n" - " pxor (%3), %%mm0 ;\n" - " pxor 16(%2), %%mm2 ;\n" - " movq %%mm0, (%1) ;\n" - " pxor 8(%3), %%mm1 ;\n" - " pxor 16(%3), %%mm2 ;\n" - " movq 24(%1), %%mm3 ;\n" - " movq %%mm1, 8(%1) ;\n" - " movq 32(%1), %%mm4 ;\n" - " movq 40(%1), %%mm5 ;\n" - " pxor 24(%2), %%mm3 ;\n" - " movq %%mm2, 16(%1) ;\n" - " pxor 32(%2), %%mm4 ;\n" - " pxor 24(%3), %%mm3 ;\n" - " pxor 40(%2), %%mm5 ;\n" - " movq %%mm3, 24(%1) ;\n" - " pxor 32(%3), %%mm4 ;\n" - " pxor 40(%3), %%mm5 ;\n" - " movq 48(%1), %%mm6 ;\n" - " movq %%mm4, 32(%1) ;\n" - " movq 56(%1), %%mm7 ;\n" - " pxor 48(%2), %%mm6 ;\n" - " movq %%mm5, 40(%1) ;\n" - " pxor 56(%2), %%mm7 ;\n" - " pxor 48(%3), %%mm6 ;\n" - " pxor 56(%3), %%mm7 ;\n" - " movq %%mm6, 48(%1) ;\n" - " movq %%mm7, 56(%1) ;\n" - - " addl $64, %1 ;\n" - " addl $64, %2 ;\n" - " addl $64, %3 ;\n" - " decl %0 ;\n" - " jnz 1b ;\n" - : "+r" (lines), - "+r" (p1), "+r" (p2), "+r" (p3) - : - : "memory" ); - - FPU_RESTORE; -} - -static void -xor_p5_mmx_4(unsigned long bytes, unsigned long *p1, unsigned long *p2, - unsigned long *p3, unsigned long *p4) -{ - unsigned long lines = bytes >> 6; - char fpu_save[108]; - - FPU_SAVE; - - __asm__ __volatile__ ( - " .align 32,0x90 ;\n" - " 1: ;\n" - " movq (%1), %%mm0 ;\n" - " movq 8(%1), %%mm1 ;\n" - " pxor (%2), %%mm0 ;\n" - " movq 16(%1), %%mm2 ;\n" - " pxor 8(%2), %%mm1 ;\n" - " pxor (%3), %%mm0 ;\n" - " pxor 16(%2), %%mm2 ;\n" - " pxor 8(%3), %%mm1 ;\n" - " pxor (%4), %%mm0 ;\n" - " movq 24(%1), %%mm3 ;\n" - " pxor 16(%3), %%mm2 ;\n" - " pxor 8(%4), %%mm1 ;\n" - " movq %%mm0, (%1) ;\n" - " movq 32(%1), %%mm4 ;\n" - " pxor 24(%2), %%mm3 ;\n" - " pxor 16(%4), %%mm2 ;\n" - " movq %%mm1, 8(%1) ;\n" - " movq 40(%1), %%mm5 ;\n" - " pxor 32(%2), %%mm4 ;\n" - " pxor 24(%3), %%mm3 ;\n" - " movq %%mm2, 16(%1) ;\n" - " pxor 40(%2), %%mm5 ;\n" - " pxor 32(%3), %%mm4 ;\n" - " pxor 24(%4), %%mm3 ;\n" - " movq %%mm3, 24(%1) ;\n" - " movq 56(%1), %%mm7 ;\n" - " movq 48(%1), %%mm6 ;\n" - " pxor 40(%3), %%mm5 ;\n" - " pxor 32(%4), %%mm4 ;\n" - " pxor 48(%2), %%mm6 ;\n" - " movq %%mm4, 32(%1) ;\n" - " pxor 56(%2), %%mm7 ;\n" - " pxor 40(%4), %%mm5 ;\n" - " pxor 48(%3), %%mm6 ;\n" - " pxor 56(%3), %%mm7 ;\n" - " movq %%mm5, 40(%1) ;\n" - " pxor 48(%4), %%mm6 ;\n" - " pxor 56(%4), %%mm7 ;\n" - " movq %%mm6, 48(%1) ;\n" - " movq %%mm7, 56(%1) ;\n" - - " addl $64, %1 ;\n" - " addl $64, %2 ;\n" - " addl $64, %3 ;\n" - " addl $64, %4 ;\n" - " decl %0 ;\n" - " jnz 1b ;\n" - : "+r" (lines), - "+r" (p1), "+r" (p2), "+r" (p3), "+r" (p4) - : - : "memory"); - - FPU_RESTORE; -} - -static void -xor_p5_mmx_5(unsigned long bytes, unsigned long *p1, unsigned long *p2, - unsigned long *p3, unsigned long *p4, unsigned long *p5) -{ - unsigned long lines = bytes >> 6; - char fpu_save[108]; - - FPU_SAVE; - - /* need to save p4/p5 manually to not exceed gcc's 10 argument limit */ - __asm__ __volatile__ ( - " pushl %4\n" - " pushl %5\n" - " .align 32,0x90 ;\n" - " 1: ;\n" - " movq (%1), %%mm0 ;\n" - " movq 8(%1), %%mm1 ;\n" - " pxor (%2), %%mm0 ;\n" - " pxor 8(%2), %%mm1 ;\n" - " movq 16(%1), %%mm2 ;\n" - " pxor (%3), %%mm0 ;\n" - " pxor 8(%3), %%mm1 ;\n" - " pxor 16(%2), %%mm2 ;\n" - " pxor (%4), %%mm0 ;\n" - " pxor 8(%4), %%mm1 ;\n" - " pxor 16(%3), %%mm2 ;\n" - " movq 24(%1), %%mm3 ;\n" - " pxor (%5), %%mm0 ;\n" - " pxor 8(%5), %%mm1 ;\n" - " movq %%mm0, (%1) ;\n" - " pxor 16(%4), %%mm2 ;\n" - " pxor 24(%2), %%mm3 ;\n" - " movq %%mm1, 8(%1) ;\n" - " pxor 16(%5), %%mm2 ;\n" - " pxor 24(%3), %%mm3 ;\n" - " movq 32(%1), %%mm4 ;\n" - " movq %%mm2, 16(%1) ;\n" - " pxor 24(%4), %%mm3 ;\n" - " pxor 32(%2), %%mm4 ;\n" - " movq 40(%1), %%mm5 ;\n" - " pxor 24(%5), %%mm3 ;\n" - " pxor 32(%3), %%mm4 ;\n" - " pxor 40(%2), %%mm5 ;\n" - " movq %%mm3, 24(%1) ;\n" - " pxor 32(%4), %%mm4 ;\n" - " pxor 40(%3), %%mm5 ;\n" - " movq 48(%1), %%mm6 ;\n" - " movq 56(%1), %%mm7 ;\n" - " pxor 32(%5), %%mm4 ;\n" - " pxor 40(%4), %%mm5 ;\n" - " pxor 48(%2), %%mm6 ;\n" - " pxor 56(%2), %%mm7 ;\n" - " movq %%mm4, 32(%1) ;\n" - " pxor 48(%3), %%mm6 ;\n" - " pxor 56(%3), %%mm7 ;\n" - " pxor 40(%5), %%mm5 ;\n" - " pxor 48(%4), %%mm6 ;\n" - " pxor 56(%4), %%mm7 ;\n" - " movq %%mm5, 40(%1) ;\n" - " pxor 48(%5), %%mm6 ;\n" - " pxor 56(%5), %%mm7 ;\n" - " movq %%mm6, 48(%1) ;\n" - " movq %%mm7, 56(%1) ;\n" - - " addl $64, %1 ;\n" - " addl $64, %2 ;\n" - " addl $64, %3 ;\n" - " addl $64, %4 ;\n" - " addl $64, %5 ;\n" - " decl %0 ;\n" - " jnz 1b ;\n" - " popl %5\n" - " popl %4\n" - : "+g" (lines), - "+r" (p1), "+r" (p2), "+r" (p3) - : "r" (p4), "r" (p5) - : "memory"); - - FPU_RESTORE; -} - -static struct xor_block_template xor_block_pII_mmx = { - name: "pII_mmx", - do_2: xor_pII_mmx_2, - do_3: xor_pII_mmx_3, - do_4: xor_pII_mmx_4, - do_5: xor_pII_mmx_5, -}; - -static struct xor_block_template xor_block_p5_mmx = { - name: "p5_mmx", - do_2: xor_p5_mmx_2, - do_3: xor_p5_mmx_3, - do_4: xor_p5_mmx_4, - do_5: xor_p5_mmx_5, -}; - -#undef FPU_SAVE -#undef FPU_RESTORE - -/* - * Cache avoiding checksumming functions utilizing KNI instructions - * Copyright (C) 1999 Zach Brown (with obvious credit due Ingo) - */ - -#define XMMS_SAVE \ - __asm__ __volatile__ ( \ - "movl %%cr0,%0 ;\n\t" \ - "clts ;\n\t" \ - "movups %%xmm0,(%1) ;\n\t" \ - "movups %%xmm1,0x10(%1) ;\n\t" \ - "movups %%xmm2,0x20(%1) ;\n\t" \ - "movups %%xmm3,0x30(%1) ;\n\t" \ - : "=&r" (cr0) \ - : "r" (xmm_save) \ - : "memory") - -#define XMMS_RESTORE \ - __asm__ __volatile__ ( \ - "sfence ;\n\t" \ - "movups (%1),%%xmm0 ;\n\t" \ - "movups 0x10(%1),%%xmm1 ;\n\t" \ - "movups 0x20(%1),%%xmm2 ;\n\t" \ - "movups 0x30(%1),%%xmm3 ;\n\t" \ - "movl %0,%%cr0 ;\n\t" \ - : \ - : "r" (cr0), "r" (xmm_save) \ - : "memory") - -#define ALIGN16 __attribute__((aligned(16))) - -#define OFFS(x) "16*("#x")" -#define PF_OFFS(x) "256+16*("#x")" -#define PF0(x) " prefetchnta "PF_OFFS(x)"(%1) ;\n" -#define LD(x,y) " movaps "OFFS(x)"(%1), %%xmm"#y" ;\n" -#define ST(x,y) " movaps %%xmm"#y", "OFFS(x)"(%1) ;\n" -#define PF1(x) " prefetchnta "PF_OFFS(x)"(%2) ;\n" -#define PF2(x) " prefetchnta "PF_OFFS(x)"(%3) ;\n" -#define PF3(x) " prefetchnta "PF_OFFS(x)"(%4) ;\n" -#define PF4(x) " prefetchnta "PF_OFFS(x)"(%5) ;\n" -#define PF5(x) " prefetchnta "PF_OFFS(x)"(%6) ;\n" -#define XO1(x,y) " xorps "OFFS(x)"(%2), %%xmm"#y" ;\n" -#define XO2(x,y) " xorps "OFFS(x)"(%3), %%xmm"#y" ;\n" -#define XO3(x,y) " xorps "OFFS(x)"(%4), %%xmm"#y" ;\n" -#define XO4(x,y) " xorps "OFFS(x)"(%5), %%xmm"#y" ;\n" -#define XO5(x,y) " xorps "OFFS(x)"(%6), %%xmm"#y" ;\n" - - -static void -xor_sse_2(unsigned long bytes, unsigned long *p1, unsigned long *p2) -{ - unsigned long lines = bytes >> 8; - char xmm_save[16*4] ALIGN16; - int cr0; - - XMMS_SAVE; - - __asm__ __volatile__ ( -#undef BLOCK -#define BLOCK(i) \ - LD(i,0) \ - LD(i+1,1) \ - PF1(i) \ - PF1(i+2) \ - LD(i+2,2) \ - LD(i+3,3) \ - PF0(i+4) \ - PF0(i+6) \ - XO1(i,0) \ - XO1(i+1,1) \ - XO1(i+2,2) \ - XO1(i+3,3) \ - ST(i,0) \ - ST(i+1,1) \ - ST(i+2,2) \ - ST(i+3,3) \ - - - PF0(0) - PF0(2) - - " .align 32 ;\n" - " 1: ;\n" - - BLOCK(0) - BLOCK(4) - BLOCK(8) - BLOCK(12) - - " addl $256, %1 ;\n" - " addl $256, %2 ;\n" - " decl %0 ;\n" - " jnz 1b ;\n" - : "+r" (lines), - "+r" (p1), "+r" (p2) - : - : "memory"); - - XMMS_RESTORE; -} - -static void -xor_sse_3(unsigned long bytes, unsigned long *p1, unsigned long *p2, - unsigned long *p3) -{ - unsigned long lines = bytes >> 8; - char xmm_save[16*4] ALIGN16; - int cr0; - - XMMS_SAVE; - - __asm__ __volatile__ ( -#undef BLOCK -#define BLOCK(i) \ - PF1(i) \ - PF1(i+2) \ - LD(i,0) \ - LD(i+1,1) \ - LD(i+2,2) \ - LD(i+3,3) \ - PF2(i) \ - PF2(i+2) \ - PF0(i+4) \ - PF0(i+6) \ - XO1(i,0) \ - XO1(i+1,1) \ - XO1(i+2,2) \ - XO1(i+3,3) \ - XO2(i,0) \ - XO2(i+1,1) \ - XO2(i+2,2) \ - XO2(i+3,3) \ - ST(i,0) \ - ST(i+1,1) \ - ST(i+2,2) \ - ST(i+3,3) \ - - - PF0(0) - PF0(2) - - " .align 32 ;\n" - " 1: ;\n" - - BLOCK(0) - BLOCK(4) - BLOCK(8) - BLOCK(12) - - " addl $256, %1 ;\n" - " addl $256, %2 ;\n" - " addl $256, %3 ;\n" - " decl %0 ;\n" - " jnz 1b ;\n" - : "+r" (lines), - "+r" (p1), "+r"(p2), "+r"(p3) - : - : "memory" ); - - XMMS_RESTORE; -} - -static void -xor_sse_4(unsigned long bytes, unsigned long *p1, unsigned long *p2, - unsigned long *p3, unsigned long *p4) -{ - unsigned long lines = bytes >> 8; - char xmm_save[16*4] ALIGN16; - int cr0; - - XMMS_SAVE; - - __asm__ __volatile__ ( -#undef BLOCK -#define BLOCK(i) \ - PF1(i) \ - PF1(i+2) \ - LD(i,0) \ - LD(i+1,1) \ - LD(i+2,2) \ - LD(i+3,3) \ - PF2(i) \ - PF2(i+2) \ - XO1(i,0) \ - XO1(i+1,1) \ - XO1(i+2,2) \ - XO1(i+3,3) \ - PF3(i) \ - PF3(i+2) \ - PF0(i+4) \ - PF0(i+6) \ - XO2(i,0) \ - XO2(i+1,1) \ - XO2(i+2,2) \ - XO2(i+3,3) \ - XO3(i,0) \ - XO3(i+1,1) \ - XO3(i+2,2) \ - XO3(i+3,3) \ - ST(i,0) \ - ST(i+1,1) \ - ST(i+2,2) \ - ST(i+3,3) \ - - - PF0(0) - PF0(2) - - " .align 32 ;\n" - " 1: ;\n" - - BLOCK(0) - BLOCK(4) - BLOCK(8) - BLOCK(12) - - " addl $256, %1 ;\n" - " addl $256, %2 ;\n" - " addl $256, %3 ;\n" - " addl $256, %4 ;\n" - " decl %0 ;\n" - " jnz 1b ;\n" - : "+r" (lines), - "+r" (p1), "+r" (p2), "+r" (p3), "+r" (p4) - : - : "memory" ); - - XMMS_RESTORE; -} - -static void -xor_sse_5(unsigned long bytes, unsigned long *p1, unsigned long *p2, - unsigned long *p3, unsigned long *p4, unsigned long *p5) -{ - unsigned long lines = bytes >> 8; - char xmm_save[16*4] ALIGN16; - int cr0; - - XMMS_SAVE; - - /* need to save p4/p5 manually to not exceed gcc's 10 argument limit */ - __asm__ __volatile__ ( - " pushl %4\n" - " pushl %5\n" -#undef BLOCK -#define BLOCK(i) \ - PF1(i) \ - PF1(i+2) \ - LD(i,0) \ - LD(i+1,1) \ - LD(i+2,2) \ - LD(i+3,3) \ - PF2(i) \ - PF2(i+2) \ - XO1(i,0) \ - XO1(i+1,1) \ - XO1(i+2,2) \ - XO1(i+3,3) \ - PF3(i) \ - PF3(i+2) \ - XO2(i,0) \ - XO2(i+1,1) \ - XO2(i+2,2) \ - XO2(i+3,3) \ - PF4(i) \ - PF4(i+2) \ - PF0(i+4) \ - PF0(i+6) \ - XO3(i,0) \ - XO3(i+1,1) \ - XO3(i+2,2) \ - XO3(i+3,3) \ - XO4(i,0) \ - XO4(i+1,1) \ - XO4(i+2,2) \ - XO4(i+3,3) \ - ST(i,0) \ - ST(i+1,1) \ - ST(i+2,2) \ - ST(i+3,3) \ - - - PF0(0) - PF0(2) - - " .align 32 ;\n" - " 1: ;\n" - - BLOCK(0) - BLOCK(4) - BLOCK(8) - BLOCK(12) - - " addl $256, %1 ;\n" - " addl $256, %2 ;\n" - " addl $256, %3 ;\n" - " addl $256, %4 ;\n" - " addl $256, %5 ;\n" - " decl %0 ;\n" - " jnz 1b ;\n" - " popl %5\n" - " popl %4\n" - : "+r" (lines), - "+r" (p1), "+r" (p2), "+r" (p3) - : "r" (p4), "r" (p5) - : "memory"); - - XMMS_RESTORE; -} - -static struct xor_block_template xor_block_pIII_sse = { - name: "pIII_sse", - do_2: xor_sse_2, - do_3: xor_sse_3, - do_4: xor_sse_4, - do_5: xor_sse_5, -}; - -/* Also try the generic routines. */ -#include - -#undef XOR_TRY_TEMPLATES -#define XOR_TRY_TEMPLATES \ - do { \ - xor_speed(&xor_block_8regs); \ - xor_speed(&xor_block_32regs); \ - if (cpu_has_xmm) \ - xor_speed(&xor_block_pIII_sse); \ - if (md_cpu_has_mmx()) { \ - xor_speed(&xor_block_pII_mmx); \ - xor_speed(&xor_block_p5_mmx); \ - } \ - } while (0) - -/* We force the use of the SSE xor block because it can write around L2. - We may also be able to load into the L1 only depending on how the cpu - deals with a load to a line that is being prefetched. */ -#define XOR_SELECT_TEMPLATE(FASTEST) \ - (cpu_has_xmm ? &xor_block_pIII_sse : FASTEST) diff --git a/xenolinux-2.4.21-pre4-sparse/mkbuildtree b/xenolinux-2.4.21-pre4-sparse/mkbuildtree new file mode 100755 index 0000000000..09a02d87d2 --- /dev/null +++ b/xenolinux-2.4.21-pre4-sparse/mkbuildtree @@ -0,0 +1,124 @@ +# mkbuildtree +# +# Creates symbolic links in for the sparse tree +# in the current directory. + +# Get absolute path to the destination directory +pushd . >/dev/null +cd ${1} +D=`pwd` +popd >/dev/null + +# Remove old copies of files and directories at the destination +for i in `find -type f -o -type l` ; do rm -f ${D}/${i#./} ; done + +# Create symlinks of files and directories which exist in the sparse source +lndir -silent -ignorelinks `pwd` ${D} +rm -f ${D}/mkbuildtree + +## There are a whole bunch of special symlinks, mostly for files +## which are identical in the i386 and xeno-i386 architecture-dependent +## subdirectories. + +# This first symlink is special: it links to shared files in Xen's source tree +ln -sf `pwd`/../xen/include/hypervisor-ifs ${D}/include/asm-xeno/hypervisor-ifs + +# The remainder are the i386 -> xeno-i386 links +ln -sf ${D}/include/asm-i386/a.out.h ${D}/include/asm-xeno/a.out.h +ln -sf ${D}/include/asm-i386/apicdef.h ${D}/include/asm-xeno/apicdef.h +ln -sf ${D}/include/asm-i386/apic.h ${D}/include/asm-xeno/apic.h +ln -sf ${D}/include/asm-i386/atomic.h ${D}/include/asm-xeno/atomic.h +ln -sf ${D}/include/asm-i386/bitops.h ${D}/include/asm-xeno/bitops.h +ln -sf ${D}/include/asm-i386/boot.h ${D}/include/asm-xeno/boot.h +ln -sf ${D}/include/asm-i386/byteorder.h ${D}/include/asm-xeno/byteorder.h +ln -sf ${D}/include/asm-i386/cache.h ${D}/include/asm-xeno/cache.h +ln -sf ${D}/include/asm-i386/checksum.h ${D}/include/asm-xeno/checksum.h +ln -sf ${D}/include/asm-i386/cpufeature.h ${D}/include/asm-xeno/cpufeature.h +ln -sf ${D}/include/asm-i386/current.h ${D}/include/asm-xeno/current.h +ln -sf ${D}/include/asm-i386/debugreg.h ${D}/include/asm-xeno/debugreg.h +ln -sf ${D}/include/asm-i386/delay.h ${D}/include/asm-xeno/delay.h +ln -sf ${D}/include/asm-i386/div64.h ${D}/include/asm-xeno/div64.h +ln -sf ${D}/include/asm-i386/dma.h ${D}/include/asm-xeno/dma.h +ln -sf ${D}/include/asm-i386/elf.h ${D}/include/asm-xeno/elf.h +ln -sf ${D}/include/asm-i386/errno.h ${D}/include/asm-xeno/errno.h +ln -sf ${D}/include/asm-i386/fcntl.h ${D}/include/asm-xeno/fcntl.h +ln -sf ${D}/include/asm-i386/floppy.h ${D}/include/asm-xeno/floppy.h +ln -sf ${D}/include/asm-i386/hardirq.h ${D}/include/asm-xeno/hardirq.h +ln -sf ${D}/include/asm-i386/hdreg.h ${D}/include/asm-xeno/hdreg.h +ln -sf ${D}/include/asm-i386/i387.h ${D}/include/asm-xeno/i387.h +ln -sf ${D}/include/asm-i386/ide.h ${D}/include/asm-xeno/ide.h +ln -sf ${D}/include/asm-i386/init.h ${D}/include/asm-xeno/init.h +ln -sf ${D}/include/asm-i386/io_apic.h ${D}/include/asm-xeno/io_apic.h +ln -sf ${D}/include/asm-i386/ioctl.h ${D}/include/asm-xeno/ioctl.h +ln -sf ${D}/include/asm-i386/ioctls.h ${D}/include/asm-xeno/ioctls.h +ln -sf ${D}/include/asm-i386/ipcbuf.h ${D}/include/asm-xeno/ipcbuf.h +ln -sf ${D}/include/asm-i386/ipc.h ${D}/include/asm-xeno/ipc.h +ln -sf ${D}/include/asm-i386/keyboard.h ${D}/include/asm-xeno/keyboard.h +ln -sf ${D}/include/asm-i386/kmap_types.h ${D}/include/asm-xeno/kmap_types.h +ln -sf ${D}/include/asm-i386/ldt.h ${D}/include/asm-xeno/ldt.h +ln -sf ${D}/include/asm-i386/linux_logo.h ${D}/include/asm-xeno/linux_logo.h +ln -sf ${D}/include/asm-i386/locks.h ${D}/include/asm-xeno/locks.h +ln -sf ${D}/include/asm-i386/math_emu.h ${D}/include/asm-xeno/math_emu.h +ln -sf ${D}/include/asm-i386/mc146818rtc.h ${D}/include/asm-xeno/mc146818rtc.h +ln -sf ${D}/include/asm-i386/mca_dma.h ${D}/include/asm-xeno/mca_dma.h +ln -sf ${D}/include/asm-i386/mman.h ${D}/include/asm-xeno/mman.h +ln -sf ${D}/include/asm-i386/mmx.h ${D}/include/asm-xeno/mmx.h +ln -sf ${D}/include/asm-i386/module.h ${D}/include/asm-xeno/module.h +ln -sf ${D}/include/asm-i386/mpspec.h ${D}/include/asm-xeno/mpspec.h +ln -sf ${D}/include/asm-i386/msgbuf.h ${D}/include/asm-xeno/msgbuf.h +ln -sf ${D}/include/asm-i386/msr.h ${D}/include/asm-xeno/msr.h +ln -sf ${D}/include/asm-i386/mtrr.h ${D}/include/asm-xeno/mtrr.h +ln -sf ${D}/include/asm-i386/namei.h ${D}/include/asm-xeno/namei.h +ln -sf ${D}/include/asm-i386/param.h ${D}/include/asm-xeno/param.h +ln -sf ${D}/include/asm-i386/parport.h ${D}/include/asm-xeno/parport.h +ln -sf ${D}/include/asm-i386/poll.h ${D}/include/asm-xeno/poll.h +ln -sf ${D}/include/asm-i386/posix_types.h ${D}/include/asm-xeno/posix_types.h +ln -sf ${D}/include/asm-i386/resource.h ${D}/include/asm-xeno/resource.h +ln -sf ${D}/include/asm-i386/rwlock.h ${D}/include/asm-xeno/rwlock.h +ln -sf ${D}/include/asm-i386/rwsem.h ${D}/include/asm-xeno/rwsem.h +ln -sf ${D}/include/asm-i386/scatterlist.h ${D}/include/asm-xeno/scatterlist.h +ln -sf ${D}/include/asm-i386/semaphore.h ${D}/include/asm-xeno/semaphore.h +ln -sf ${D}/include/asm-i386/sembuf.h ${D}/include/asm-xeno/sembuf.h +ln -sf ${D}/include/asm-i386/serial.h ${D}/include/asm-xeno/serial.h +ln -sf ${D}/include/asm-i386/setup.h ${D}/include/asm-xeno/setup.h +ln -sf ${D}/include/asm-i386/shmbuf.h ${D}/include/asm-xeno/shmbuf.h +ln -sf ${D}/include/asm-i386/shmparam.h ${D}/include/asm-xeno/shmparam.h +ln -sf ${D}/include/asm-i386/sigcontext.h ${D}/include/asm-xeno/sigcontext.h +ln -sf ${D}/include/asm-i386/siginfo.h ${D}/include/asm-xeno/siginfo.h +ln -sf ${D}/include/asm-i386/signal.h ${D}/include/asm-xeno/signal.h +ln -sf ${D}/include/asm-i386/smplock.h ${D}/include/asm-xeno/smplock.h +ln -sf ${D}/include/asm-i386/socket.h ${D}/include/asm-xeno/socket.h +ln -sf ${D}/include/asm-i386/sockios.h ${D}/include/asm-xeno/sockios.h +ln -sf ${D}/include/asm-i386/softirq.h ${D}/include/asm-xeno/softirq.h +ln -sf ${D}/include/asm-i386/spinlock.h ${D}/include/asm-xeno/spinlock.h +ln -sf ${D}/include/asm-i386/statfs.h ${D}/include/asm-xeno/statfs.h +ln -sf ${D}/include/asm-i386/stat.h ${D}/include/asm-xeno/stat.h +ln -sf ${D}/include/asm-i386/string-486.h ${D}/include/asm-xeno/string-486.h +ln -sf ${D}/include/asm-i386/string.h ${D}/include/asm-xeno/string.h +ln -sf ${D}/include/asm-i386/termbits.h ${D}/include/asm-xeno/termbits.h +ln -sf ${D}/include/asm-i386/termios.h ${D}/include/asm-xeno/termios.h +ln -sf ${D}/include/asm-i386/timex.h ${D}/include/asm-xeno/timex.h +ln -sf ${D}/include/asm-i386/tlb.h ${D}/include/asm-xeno/tlb.h +ln -sf ${D}/include/asm-i386/types.h ${D}/include/asm-xeno/types.h +ln -sf ${D}/include/asm-i386/uaccess.h ${D}/include/asm-xeno/uaccess.h +ln -sf ${D}/include/asm-i386/ucontext.h ${D}/include/asm-xeno/ucontext.h +ln -sf ${D}/include/asm-i386/unaligned.h ${D}/include/asm-xeno/unaligned.h +ln -sf ${D}/include/asm-i386/unistd.h ${D}/include/asm-xeno/unistd.h +ln -sf ${D}/include/asm-i386/user.h ${D}/include/asm-xeno/user.h +ln -sf ${D}/include/asm-i386/vga.h ${D}/include/asm-xeno/vga.h +ln -sf ${D}/include/asm-i386/xor.h ${D}/include/asm-xeno/xor.h +ln -sf ${D}/arch/i386/kernel/init_task.c ${D}/arch/xeno/kernel/init_task.c +ln -sf ${D}/arch/i386/kernel/ptrace.c ${D}/arch/xeno/kernel/ptrace.c +ln -sf ${D}/arch/i386/kernel/semaphore.c ${D}/arch/xeno/kernel/semaphore.c +ln -sf ${D}/arch/i386/kernel/sys_i386.c ${D}/arch/xeno/kernel/sys_i386.c +ln -sf ${D}/arch/i386/lib/checksum.S ${D}/arch/xeno/lib/checksum.S +ln -sf ${D}/arch/i386/lib/dec_and_lock.c ${D}/arch/xeno/lib/dec_and_lock.c +ln -sf ${D}/arch/i386/lib/getuser.S ${D}/arch/xeno/lib/getuser.S +ln -sf ${D}/arch/i386/lib/iodebug.c ${D}/arch/xeno/lib/iodebug.c +ln -sf ${D}/arch/i386/lib/memcpy.c ${D}/arch/xeno/lib/memcpy.c +ln -sf ${D}/arch/i386/lib/mmx.c ${D}/arch/xeno/lib/mmx.c +ln -sf ${D}/arch/i386/lib/old-checksum.c ${D}/arch/xeno/lib/old-checksum.c +ln -sf ${D}/arch/i386/lib/strstr.c ${D}/arch/xeno/lib/strstr.c +ln -sf ${D}/arch/i386/lib/usercopy.c ${D}/arch/xeno/lib/usercopy.c +ln -sf ${D}/arch/i386/mm/extable.c ${D}/arch/xeno/mm/extable.c +ln -sf ${D}/arch/i386/mm/pageattr.c ${D}/arch/xeno/mm/pageattr.c -- cgit v1.2.3 From 064b5bb75988a5fdcc18d4f86d0b0d5656f9c006 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Wed, 12 Mar 2003 11:48:53 +0000 Subject: bitkeeper revision 1.122.1.6 (3e6f1ea5rn4hVzCtyxt8cYrJ_ZsBGA) mkbuildtree: Relative symlinks to i386 directories in xenolinux build tree. --- xenolinux-2.4.21-pre4-sparse/mkbuildtree | 203 ++++++++++++++++--------------- 1 file changed, 105 insertions(+), 98 deletions(-) diff --git a/xenolinux-2.4.21-pre4-sparse/mkbuildtree b/xenolinux-2.4.21-pre4-sparse/mkbuildtree index 09a02d87d2..e4ac3c9abb 100755 --- a/xenolinux-2.4.21-pre4-sparse/mkbuildtree +++ b/xenolinux-2.4.21-pre4-sparse/mkbuildtree @@ -3,6 +3,8 @@ # Creates symbolic links in for the sparse tree # in the current directory. +[ "$1" == "" ] && { echo "Syntax: $0 "; exit 1; } + # Get absolute path to the destination directory pushd . >/dev/null cd ${1} @@ -24,101 +26,106 @@ rm -f ${D}/mkbuildtree ln -sf `pwd`/../xen/include/hypervisor-ifs ${D}/include/asm-xeno/hypervisor-ifs # The remainder are the i386 -> xeno-i386 links -ln -sf ${D}/include/asm-i386/a.out.h ${D}/include/asm-xeno/a.out.h -ln -sf ${D}/include/asm-i386/apicdef.h ${D}/include/asm-xeno/apicdef.h -ln -sf ${D}/include/asm-i386/apic.h ${D}/include/asm-xeno/apic.h -ln -sf ${D}/include/asm-i386/atomic.h ${D}/include/asm-xeno/atomic.h -ln -sf ${D}/include/asm-i386/bitops.h ${D}/include/asm-xeno/bitops.h -ln -sf ${D}/include/asm-i386/boot.h ${D}/include/asm-xeno/boot.h -ln -sf ${D}/include/asm-i386/byteorder.h ${D}/include/asm-xeno/byteorder.h -ln -sf ${D}/include/asm-i386/cache.h ${D}/include/asm-xeno/cache.h -ln -sf ${D}/include/asm-i386/checksum.h ${D}/include/asm-xeno/checksum.h -ln -sf ${D}/include/asm-i386/cpufeature.h ${D}/include/asm-xeno/cpufeature.h -ln -sf ${D}/include/asm-i386/current.h ${D}/include/asm-xeno/current.h -ln -sf ${D}/include/asm-i386/debugreg.h ${D}/include/asm-xeno/debugreg.h -ln -sf ${D}/include/asm-i386/delay.h ${D}/include/asm-xeno/delay.h -ln -sf ${D}/include/asm-i386/div64.h ${D}/include/asm-xeno/div64.h -ln -sf ${D}/include/asm-i386/dma.h ${D}/include/asm-xeno/dma.h -ln -sf ${D}/include/asm-i386/elf.h ${D}/include/asm-xeno/elf.h -ln -sf ${D}/include/asm-i386/errno.h ${D}/include/asm-xeno/errno.h -ln -sf ${D}/include/asm-i386/fcntl.h ${D}/include/asm-xeno/fcntl.h -ln -sf ${D}/include/asm-i386/floppy.h ${D}/include/asm-xeno/floppy.h -ln -sf ${D}/include/asm-i386/hardirq.h ${D}/include/asm-xeno/hardirq.h -ln -sf ${D}/include/asm-i386/hdreg.h ${D}/include/asm-xeno/hdreg.h -ln -sf ${D}/include/asm-i386/i387.h ${D}/include/asm-xeno/i387.h -ln -sf ${D}/include/asm-i386/ide.h ${D}/include/asm-xeno/ide.h -ln -sf ${D}/include/asm-i386/init.h ${D}/include/asm-xeno/init.h -ln -sf ${D}/include/asm-i386/io_apic.h ${D}/include/asm-xeno/io_apic.h -ln -sf ${D}/include/asm-i386/ioctl.h ${D}/include/asm-xeno/ioctl.h -ln -sf ${D}/include/asm-i386/ioctls.h ${D}/include/asm-xeno/ioctls.h -ln -sf ${D}/include/asm-i386/ipcbuf.h ${D}/include/asm-xeno/ipcbuf.h -ln -sf ${D}/include/asm-i386/ipc.h ${D}/include/asm-xeno/ipc.h -ln -sf ${D}/include/asm-i386/keyboard.h ${D}/include/asm-xeno/keyboard.h -ln -sf ${D}/include/asm-i386/kmap_types.h ${D}/include/asm-xeno/kmap_types.h -ln -sf ${D}/include/asm-i386/ldt.h ${D}/include/asm-xeno/ldt.h -ln -sf ${D}/include/asm-i386/linux_logo.h ${D}/include/asm-xeno/linux_logo.h -ln -sf ${D}/include/asm-i386/locks.h ${D}/include/asm-xeno/locks.h -ln -sf ${D}/include/asm-i386/math_emu.h ${D}/include/asm-xeno/math_emu.h -ln -sf ${D}/include/asm-i386/mc146818rtc.h ${D}/include/asm-xeno/mc146818rtc.h -ln -sf ${D}/include/asm-i386/mca_dma.h ${D}/include/asm-xeno/mca_dma.h -ln -sf ${D}/include/asm-i386/mman.h ${D}/include/asm-xeno/mman.h -ln -sf ${D}/include/asm-i386/mmx.h ${D}/include/asm-xeno/mmx.h -ln -sf ${D}/include/asm-i386/module.h ${D}/include/asm-xeno/module.h -ln -sf ${D}/include/asm-i386/mpspec.h ${D}/include/asm-xeno/mpspec.h -ln -sf ${D}/include/asm-i386/msgbuf.h ${D}/include/asm-xeno/msgbuf.h -ln -sf ${D}/include/asm-i386/msr.h ${D}/include/asm-xeno/msr.h -ln -sf ${D}/include/asm-i386/mtrr.h ${D}/include/asm-xeno/mtrr.h -ln -sf ${D}/include/asm-i386/namei.h ${D}/include/asm-xeno/namei.h -ln -sf ${D}/include/asm-i386/param.h ${D}/include/asm-xeno/param.h -ln -sf ${D}/include/asm-i386/parport.h ${D}/include/asm-xeno/parport.h -ln -sf ${D}/include/asm-i386/poll.h ${D}/include/asm-xeno/poll.h -ln -sf ${D}/include/asm-i386/posix_types.h ${D}/include/asm-xeno/posix_types.h -ln -sf ${D}/include/asm-i386/resource.h ${D}/include/asm-xeno/resource.h -ln -sf ${D}/include/asm-i386/rwlock.h ${D}/include/asm-xeno/rwlock.h -ln -sf ${D}/include/asm-i386/rwsem.h ${D}/include/asm-xeno/rwsem.h -ln -sf ${D}/include/asm-i386/scatterlist.h ${D}/include/asm-xeno/scatterlist.h -ln -sf ${D}/include/asm-i386/semaphore.h ${D}/include/asm-xeno/semaphore.h -ln -sf ${D}/include/asm-i386/sembuf.h ${D}/include/asm-xeno/sembuf.h -ln -sf ${D}/include/asm-i386/serial.h ${D}/include/asm-xeno/serial.h -ln -sf ${D}/include/asm-i386/setup.h ${D}/include/asm-xeno/setup.h -ln -sf ${D}/include/asm-i386/shmbuf.h ${D}/include/asm-xeno/shmbuf.h -ln -sf ${D}/include/asm-i386/shmparam.h ${D}/include/asm-xeno/shmparam.h -ln -sf ${D}/include/asm-i386/sigcontext.h ${D}/include/asm-xeno/sigcontext.h -ln -sf ${D}/include/asm-i386/siginfo.h ${D}/include/asm-xeno/siginfo.h -ln -sf ${D}/include/asm-i386/signal.h ${D}/include/asm-xeno/signal.h -ln -sf ${D}/include/asm-i386/smplock.h ${D}/include/asm-xeno/smplock.h -ln -sf ${D}/include/asm-i386/socket.h ${D}/include/asm-xeno/socket.h -ln -sf ${D}/include/asm-i386/sockios.h ${D}/include/asm-xeno/sockios.h -ln -sf ${D}/include/asm-i386/softirq.h ${D}/include/asm-xeno/softirq.h -ln -sf ${D}/include/asm-i386/spinlock.h ${D}/include/asm-xeno/spinlock.h -ln -sf ${D}/include/asm-i386/statfs.h ${D}/include/asm-xeno/statfs.h -ln -sf ${D}/include/asm-i386/stat.h ${D}/include/asm-xeno/stat.h -ln -sf ${D}/include/asm-i386/string-486.h ${D}/include/asm-xeno/string-486.h -ln -sf ${D}/include/asm-i386/string.h ${D}/include/asm-xeno/string.h -ln -sf ${D}/include/asm-i386/termbits.h ${D}/include/asm-xeno/termbits.h -ln -sf ${D}/include/asm-i386/termios.h ${D}/include/asm-xeno/termios.h -ln -sf ${D}/include/asm-i386/timex.h ${D}/include/asm-xeno/timex.h -ln -sf ${D}/include/asm-i386/tlb.h ${D}/include/asm-xeno/tlb.h -ln -sf ${D}/include/asm-i386/types.h ${D}/include/asm-xeno/types.h -ln -sf ${D}/include/asm-i386/uaccess.h ${D}/include/asm-xeno/uaccess.h -ln -sf ${D}/include/asm-i386/ucontext.h ${D}/include/asm-xeno/ucontext.h -ln -sf ${D}/include/asm-i386/unaligned.h ${D}/include/asm-xeno/unaligned.h -ln -sf ${D}/include/asm-i386/unistd.h ${D}/include/asm-xeno/unistd.h -ln -sf ${D}/include/asm-i386/user.h ${D}/include/asm-xeno/user.h -ln -sf ${D}/include/asm-i386/vga.h ${D}/include/asm-xeno/vga.h -ln -sf ${D}/include/asm-i386/xor.h ${D}/include/asm-xeno/xor.h -ln -sf ${D}/arch/i386/kernel/init_task.c ${D}/arch/xeno/kernel/init_task.c -ln -sf ${D}/arch/i386/kernel/ptrace.c ${D}/arch/xeno/kernel/ptrace.c -ln -sf ${D}/arch/i386/kernel/semaphore.c ${D}/arch/xeno/kernel/semaphore.c -ln -sf ${D}/arch/i386/kernel/sys_i386.c ${D}/arch/xeno/kernel/sys_i386.c -ln -sf ${D}/arch/i386/lib/checksum.S ${D}/arch/xeno/lib/checksum.S -ln -sf ${D}/arch/i386/lib/dec_and_lock.c ${D}/arch/xeno/lib/dec_and_lock.c -ln -sf ${D}/arch/i386/lib/getuser.S ${D}/arch/xeno/lib/getuser.S -ln -sf ${D}/arch/i386/lib/iodebug.c ${D}/arch/xeno/lib/iodebug.c -ln -sf ${D}/arch/i386/lib/memcpy.c ${D}/arch/xeno/lib/memcpy.c -ln -sf ${D}/arch/i386/lib/mmx.c ${D}/arch/xeno/lib/mmx.c -ln -sf ${D}/arch/i386/lib/old-checksum.c ${D}/arch/xeno/lib/old-checksum.c -ln -sf ${D}/arch/i386/lib/strstr.c ${D}/arch/xeno/lib/strstr.c -ln -sf ${D}/arch/i386/lib/usercopy.c ${D}/arch/xeno/lib/usercopy.c -ln -sf ${D}/arch/i386/mm/extable.c ${D}/arch/xeno/mm/extable.c -ln -sf ${D}/arch/i386/mm/pageattr.c ${D}/arch/xeno/mm/pageattr.c +cd ${D}/include/asm-xeno +ln -sf ../asm-i386/a.out.h +ln -sf ../asm-i386/apicdef.h +ln -sf ../asm-i386/apic.h +ln -sf ../asm-i386/atomic.h +ln -sf ../asm-i386/bitops.h +ln -sf ../asm-i386/boot.h +ln -sf ../asm-i386/byteorder.h +ln -sf ../asm-i386/cache.h +ln -sf ../asm-i386/checksum.h +ln -sf ../asm-i386/cpufeature.h +ln -sf ../asm-i386/current.h +ln -sf ../asm-i386/debugreg.h +ln -sf ../asm-i386/delay.h +ln -sf ../asm-i386/div64.h +ln -sf ../asm-i386/dma.h +ln -sf ../asm-i386/elf.h +ln -sf ../asm-i386/errno.h +ln -sf ../asm-i386/fcntl.h +ln -sf ../asm-i386/floppy.h +ln -sf ../asm-i386/hardirq.h +ln -sf ../asm-i386/hdreg.h +ln -sf ../asm-i386/i387.h +ln -sf ../asm-i386/ide.h +ln -sf ../asm-i386/init.h +ln -sf ../asm-i386/io_apic.h +ln -sf ../asm-i386/ioctl.h +ln -sf ../asm-i386/ioctls.h +ln -sf ../asm-i386/ipcbuf.h +ln -sf ../asm-i386/ipc.h +ln -sf ../asm-i386/keyboard.h +ln -sf ../asm-i386/kmap_types.h +ln -sf ../asm-i386/ldt.h +ln -sf ../asm-i386/linux_logo.h +ln -sf ../asm-i386/locks.h +ln -sf ../asm-i386/math_emu.h +ln -sf ../asm-i386/mc146818rtc.h +ln -sf ../asm-i386/mca_dma.h +ln -sf ../asm-i386/mman.h +ln -sf ../asm-i386/mmx.h +ln -sf ../asm-i386/module.h +ln -sf ../asm-i386/mpspec.h +ln -sf ../asm-i386/msgbuf.h +ln -sf ../asm-i386/msr.h +ln -sf ../asm-i386/mtrr.h +ln -sf ../asm-i386/namei.h +ln -sf ../asm-i386/param.h +ln -sf ../asm-i386/parport.h +ln -sf ../asm-i386/poll.h +ln -sf ../asm-i386/posix_types.h +ln -sf ../asm-i386/resource.h +ln -sf ../asm-i386/rwlock.h +ln -sf ../asm-i386/rwsem.h +ln -sf ../asm-i386/scatterlist.h +ln -sf ../asm-i386/semaphore.h +ln -sf ../asm-i386/sembuf.h +ln -sf ../asm-i386/serial.h +ln -sf ../asm-i386/setup.h +ln -sf ../asm-i386/shmbuf.h +ln -sf ../asm-i386/shmparam.h +ln -sf ../asm-i386/sigcontext.h +ln -sf ../asm-i386/siginfo.h +ln -sf ../asm-i386/signal.h +ln -sf ../asm-i386/smplock.h +ln -sf ../asm-i386/socket.h +ln -sf ../asm-i386/sockios.h +ln -sf ../asm-i386/softirq.h +ln -sf ../asm-i386/spinlock.h +ln -sf ../asm-i386/statfs.h +ln -sf ../asm-i386/stat.h +ln -sf ../asm-i386/string-486.h +ln -sf ../asm-i386/string.h +ln -sf ../asm-i386/termbits.h +ln -sf ../asm-i386/termios.h +ln -sf ../asm-i386/timex.h +ln -sf ../asm-i386/tlb.h +ln -sf ../asm-i386/types.h +ln -sf ../asm-i386/uaccess.h +ln -sf ../asm-i386/ucontext.h +ln -sf ../asm-i386/unaligned.h +ln -sf ../asm-i386/unistd.h +ln -sf ../asm-i386/user.h +ln -sf ../asm-i386/vga.h +ln -sf ../asm-i386/xor.h + +cd ../../arch/xeno/kernel +ln -sf ../../i386/kernel/init_task.c +ln -sf ../../i386/kernel/ptrace.c +ln -sf ../../i386/kernel/semaphore.c +ln -sf ../../i386/kernel/sys_i386.c +cd ../lib +ln -sf ../../i386/lib/checksum.S +ln -sf ../../i386/lib/dec_and_lock.c +ln -sf ../../i386/lib/getuser.S +ln -sf ../../i386/lib/iodebug.c +ln -sf ../../i386/lib/memcpy.c +ln -sf ../../i386/lib/mmx.c +ln -sf ../../i386/lib/old-checksum.c +ln -sf ../../i386/lib/strstr.c +ln -sf ../../i386/lib/usercopy.c +cd ../mm +ln -sf ../../i386/mm/extable.c +ln -sf ../../i386/mm/pageattr.c -- cgit v1.2.3 From 64d464cec61f4bce700ff8e4988cbd175e556ba4 Mon Sep 17 00:00:00 2001 From: "iap10@labyrinth.cl.cam.ac.uk" Date: Wed, 12 Mar 2003 15:13:44 +0000 Subject: bitkeeper revision 1.122.2.1 (3e6f4ea8S_O9ScUz62sSCLP3_id_AQ) acknowledge interupt... --- xen/drivers/net/tg3.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/drivers/net/tg3.c b/xen/drivers/net/tg3.c index 41f680904b..3e50ba408b 100644 --- a/xen/drivers/net/tg3.c +++ b/xen/drivers/net/tg3.c @@ -2099,6 +2099,12 @@ static void tg3_interrupt(int irq, void *dev_id, struct pt_regs *regs) { int budget = 1000; tg3_poll( dev, &budget ); + + tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, + 0x00000000); + tr32(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW); + + } #endif -- cgit v1.2.3 From e89abd09c85f03af5525ccb3df7626cbf675c6f2 Mon Sep 17 00:00:00 2001 From: "iap10@labyrinth.cl.cam.ac.uk" Date: Wed, 12 Mar 2003 16:29:55 +0000 Subject: bitkeeper revision 1.122.1.8 (3e6f6083-Z7ibTMuepe_OTt_EwXdKQ) scsi spin printk --- xen/drivers/scsi/scsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/drivers/scsi/scsi.c b/xen/drivers/scsi/scsi.c index 3217be195d..82e8ce78ee 100644 --- a/xen/drivers/scsi/scsi.c +++ b/xen/drivers/scsi/scsi.c @@ -855,6 +855,7 @@ void scsi_wait_req (Scsi_Request * SRpnt, const void *cmnd , *(int *)(SRpnt->sr_request.waiting) = 0; } } +printk("*"); #endif -- cgit v1.2.3 From 725439da0e29036012a1fa518bc9c031d1f0810d Mon Sep 17 00:00:00 2001 From: "iap10@labyrinth.cl.cam.ac.uk" Date: Wed, 12 Mar 2003 16:44:57 +0000 Subject: bitkeeper revision 1.122.1.9 (3e6f6409XuZqtQw_I8D1ecR7Q4MmRg) Added "nosmp" Xen command line option. --- xen/arch/i386/setup.c | 8 ++++++-- xen/common/kernel.c | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/xen/arch/i386/setup.c b/xen/arch/i386/setup.c index f4f62c2b02..1e5f35a73e 100644 --- a/xen/arch/i386/setup.c +++ b/xen/arch/i386/setup.c @@ -292,7 +292,7 @@ void __init start_of_day(void) extern void initialize_keytable(); extern void initialize_serial(void); extern void initialize_keyboard(void); - + extern int opt_nosmp; unsigned long low_mem_size; /* @@ -327,7 +327,11 @@ void __init start_of_day(void) #ifndef CONFIG_SMP APIC_init_uniprocessor(); #else - smp_boot_cpus(); /* + if( opt_nosmp ) + APIC_init_uniprocessor(); + else + smp_boot_cpus(); + /* * Does loads of stuff, including kicking the local * APIC, and the IO APIC after other CPUs are booted. * Each IRQ is preferably handled by IO-APIC, but diff --git a/xen/common/kernel.c b/xen/common/kernel.c index 344eae59c2..28eaae9b51 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -41,7 +41,7 @@ unsigned int opt_ser_baud = 9600; /* default baud for COM1 */ unsigned int opt_dom0_mem = 16000; /* default kbytes for DOM0 */ unsigned int opt_ne_base = 0; /* NE2k NICs cannot be probed */ unsigned char opt_ifname[10] = "eth0"; -int opt_noht=0, opt_noacpi=0; +int opt_noht=0, opt_noacpi=0, opt_nosmp; enum { OPT_IP, OPT_STR, OPT_UINT, OPT_BOOL }; static struct { unsigned char *name; @@ -55,6 +55,7 @@ static struct { { "ifname", OPT_STR, &opt_ifname }, { "noht", OPT_BOOL, &opt_noht }, { "noacpi", OPT_BOOL, &opt_noacpi }, + { "nosmp", OPT_BOOL, &opt_nosmp }, { NULL, 0, NULL } }; -- cgit v1.2.3 From 0730cd5690317da758f5171bb6e3e556ac938c66 Mon Sep 17 00:00:00 2001 From: "rn@wyvis.research.intel-research.net" Date: Thu, 13 Mar 2003 15:26:25 +0000 Subject: bitkeeper revision 1.122.3.1 (3e70a321BvGVezZroK7FFHJEDihQag) more perfcounters --- BitKeeper/etc/logging_ok | 1 + xen/arch/i386/apic.c | 3 + xen/arch/i386/irq.c | 9 +++ xen/common/ac_timer.c | 99 ++++++++++++-------------------- xen/common/keyhandler.c | 2 + xen/common/perfc.c | 127 ++++++++++++++++++++++++++---------------- xen/include/xeno/perfc.h | 39 +++++++++---- xen/include/xeno/perfc_defn.h | 6 ++ 8 files changed, 163 insertions(+), 123 deletions(-) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 4998459b72..84541e8dec 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -10,5 +10,6 @@ kaf24@scramble.cl.cam.ac.uk kaf24@striker.cl.cam.ac.uk lynx@idefix.cl.cam.ac.uk rn@wyvis.camb.intel-research.net +rn@wyvis.research.intel-research.net smh22@boulderdash.cl.cam.ac.uk smh22@uridium.cl.cam.ac.uk diff --git a/xen/arch/i386/apic.c b/xen/arch/i386/apic.c index 9b999df951..865a279d8c 100644 --- a/xen/arch/i386/apic.c +++ b/xen/arch/i386/apic.c @@ -48,6 +48,8 @@ #include +#include + #undef APIC_TIME_TRACE #ifdef APIC_TIME_TRACE #define TRC(_x) _x @@ -748,6 +750,7 @@ void smp_apic_timer_interrupt(struct pt_regs * regs) /* call the local handler */ irq_enter(cpu, 0); + perfc_incrc(apic_timer); smp_local_timer_interrupt(regs); irq_exit(cpu, 0); diff --git a/xen/arch/i386/irq.c b/xen/arch/i386/irq.c index e58fb8f2ad..312cfe7970 100644 --- a/xen/arch/i386/irq.c +++ b/xen/arch/i386/irq.c @@ -36,6 +36,7 @@ #include #include +#include /* * Linux has a controller-independent x86 interrupt architecture. @@ -469,6 +470,11 @@ asmlinkage unsigned int do_IRQ(struct pt_regs regs) struct irqaction * action; unsigned int status; + u32 cc_start, cc_end; + + perfc_incra(irqs, cpu); + rdtscl(cc_start); + spin_lock(&desc->lock); desc->handler->ack(irq); /* @@ -530,6 +536,9 @@ asmlinkage unsigned int do_IRQ(struct pt_regs regs) if (softirq_pending(cpu)) do_softirq(); + rdtscl(cc_end); + perfc_adda(irq_time, cpu, cc_end - cc_start); + return 1; } diff --git a/xen/common/ac_timer.c b/xen/common/ac_timer.c index 8f65ff7093..dc70de4e0c 100644 --- a/xen/common/ac_timer.c +++ b/xen/common/ac_timer.c @@ -25,7 +25,8 @@ #include #include #include -#include + +#include #include #include @@ -34,10 +35,6 @@ #include #include - -#undef AC_TIMER_TRACE -#undef AC_TIMER_STATS - #ifdef AC_TIMER_TRACE #define TRC(_x) _x #else @@ -55,22 +52,10 @@ typedef struct ac_timers_st { spinlock_t lock; struct list_head timers; - struct ac_timer *prev, *curr; + s_time_t max_diff; } __cacheline_aligned ac_timers_t; static ac_timers_t ac_timers[NR_CPUS]; -#ifdef AC_TIMER_STATS -#define BUCKETS 1000 -#define MAX_STATS -typedef struct act_stats_st -{ - u32 count; - u32 times[2*(BUCKETS)]; -} __cacheline_aligned act_stats_t; -static act_stats_t act_stats[NR_CPUS]; - -#endif - /* local prototypes */ static int detach_ac_timer(struct ac_timer *timer); /*static void ac_timer_debug(unsigned long);*/ @@ -172,14 +157,14 @@ static int detach_ac_timer(struct ac_timer *timer) */ int rem_ac_timer(struct ac_timer *timer) { - int cpu = smp_processor_id(); - int res; + int cpu = smp_processor_id(); + int res = 0; unsigned long flags; TRC(printk("ACT [%02d] remove(): timo=%lld \n", cpu, timer->expires)); - spin_lock_irqsave(&ac_timers[cpu].lock, flags); - res = detach_ac_timer(timer); + if (timer->timer_list.next) + res = detach_ac_timer(timer); spin_unlock_irqrestore(&ac_timers[cpu].lock, flags); return res; @@ -207,45 +192,23 @@ int mod_ac_timer(struct ac_timer *timer, s_time_t new_time) */ void do_ac_timer(void) { - int cpu = smp_processor_id(); - unsigned long flags; - struct ac_timer *t; + int cpu = smp_processor_id(); + unsigned long flags; + struct ac_timer *t; + s_time_t diff, now = NOW(); + long max; spin_lock_irqsave(&ac_timers[cpu].lock, flags); do_timer_again: TRC(printk("ACT [%02d] do(): now=%lld\n", cpu, NOW())); - - /* Sanity: is the timer list empty? */ - if ( list_empty(&ac_timers[cpu].timers) ) + + /* Sanity: is the timer list empty? */ + if ( list_empty(&ac_timers[cpu].timers) ) { printk("ACT[%02d] do_ac_timer(): timer irq without timer\n", cpu); - -#ifdef AC_TIMER_STATS - { - s32 diff; - u32 i; - diff = ((s32)(NOW() - t->expires)) / 1000; /* delta in us */ - if (diff < -BUCKETS) - diff = -BUCKETS; - else if (diff > BUCKETS) - diff = BUCKETS; - act_stats[cpu].times[diff+BUCKETS]++; - act_stats[cpu].count++; - - if (act_stats[cpu].count >= 5000) { - printk("ACT Stats\n"); - for (i=0; i < 2*BUCKETS; i++) { - if (act_stats[cpu].times[i] != 0) - printk("ACT [%02d]: %3dus: %5d\n", - cpu,i-BUCKETS, act_stats[cpu].times[i]); - act_stats[cpu].times[i]=0; - } - act_stats[cpu].count = 0; - printk("\n"); - } + return; } -#endif /* Handle all timeouts in the near future. */ while ( !list_empty(&ac_timers[cpu].timers) ) @@ -253,12 +216,19 @@ void do_ac_timer(void) t = list_entry(ac_timers[cpu].timers.next, struct ac_timer, timer_list); if ( t->expires > (NOW() + TIMER_SLOP) ) break; + + /* do some stats */ + diff = (now - t->expires); + if (diff > 0x7fffffff) diff = 0x7fffffff; /* THIS IS BAD! */ + max = perfc_valuea(ac_timer_max, cpu); + if (diff > max) perfc_seta(ac_timer_max, cpu, diff); + detach_ac_timer(t); spin_unlock_irqrestore(&ac_timers[cpu].lock, flags); if ( t->function != NULL ) t->function(t->data); spin_lock_irqsave(&ac_timers[cpu].lock, flags); } - + /* If list not empty then reprogram timer to new head of list */ if ( !list_empty(&ac_timers[cpu].timers) ) { @@ -287,7 +257,7 @@ static void dump_tqueue(struct list_head *queue, char *name) { struct list_head *list; int loop = 0; - struct ac_timer *t; + struct ac_timer *t; printk ("QUEUE %s %lx n: %lx, p: %lx\n", name, (unsigned long)queue, (unsigned long) queue->next, (unsigned long) queue->prev); @@ -303,18 +273,21 @@ static void dump_tqueue(struct list_head *queue, char *name) } -static void dump_timerq(u_char key, void *dev_id, struct pt_regs *regs) +void dump_timerq(u_char key, void *dev_id, struct pt_regs *regs) { u_long flags; s_time_t now = NOW(); + int i; - printk("Dumping ac_timer queues for cpu 0: NOW=0x%08X%08X\n", + printk("Dumping ac_timer queues: NOW=0x%08X%08X\n", (u32)(now>>32), (u32)now); - - spin_lock_irqsave(&ac_timers[0].lock, flags); - dump_tqueue(&ac_timers[0].timers, "ac_time"); - spin_unlock_irqrestore(&ac_timers[0].lock, flags); - printk("\n"); + for (i = 0; i < smp_num_cpus; i++) { + printk("CPU[%02d] ", i); + spin_lock_irqsave(&ac_timers[i].lock, flags); + dump_tqueue(&ac_timers[i].timers, "ac_time"); + spin_unlock_irqrestore(&ac_timers[i].lock, flags); + printk("\n"); + } return; } @@ -330,6 +303,4 @@ void __init ac_timer_init(void) INIT_LIST_HEAD(&ac_timers[i].timers); spin_lock_init(&ac_timers[i].lock); } - - add_key_handler('a', dump_timerq, "dump ac_timer queues"); } diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c index 8bb4fecab0..1f8a84ea32 100644 --- a/xen/common/keyhandler.c +++ b/xen/common/keyhandler.c @@ -2,6 +2,7 @@ #include extern void perfc_printall (u_char key, void *dev_id, struct pt_regs *regs); +extern void perfc_reset (u_char key, void *dev_id, struct pt_regs *regs); #define KEY_MAX 256 #define STR_MAX 64 @@ -122,6 +123,7 @@ void initialize_keytable() add_key_handler('d', dump_registers, "dump registers"); add_key_handler('h', show_handlers, "show this message"); add_key_handler('p', perfc_printall, "print performance counters"); + add_key_handler('P', perfc_reset, "reset performance counters"); add_key_handler('q', do_task_queues, "dump task queues + guest state"); add_key_handler('R', halt_machine, "reboot machine ungracefully"); diff --git a/xen/common/perfc.c b/xen/common/perfc.c index 6b7e9f2af3..cc277a914a 100644 --- a/xen/common/perfc.c +++ b/xen/common/perfc.c @@ -2,12 +2,19 @@ * xen performance counters */ +#include +#include +#include #include #include -#undef PERFCOUNTER -#undef PERFCOUNTER_ARRAY +/* used for different purposes in perfc.h and here */ +#undef PERFCOUNTER +#undef PERFCOUNTER_CPU +#undef PERFCOUNTER_ARRAY + #define PERFCOUNTER( var, name ) "[0]"name"\0", +#define PERFCOUNTER_CPU( var, name ) "C"name"\0", #define PERFCOUNTER_ARRAY( var, name, size ) "["#size"]"name"\0", char* perfc_name[] = { @@ -21,63 +28,89 @@ void __perfc_print (unsigned long counter[], int offset) int loop; int total_size = 0; int element_size = 0; + int cpus = 0; int num = 0; - for (loop = 0; loop < sizeof(perfc_name) / sizeof(char *); loop++) - { - num = sscanf (perfc_name[loop], "[%d]", &element_size); - total_size += element_size == 0 ? 1 : element_size; - if (total_size > offset) break; - } - if (loop == sizeof(perfc_name) / sizeof(char *)) - { - printf ("error: couldn't find variable\n"); - return; + for (loop = 0; loop < sizeof(perfc_name) / sizeof(char *); loop++) { + if (perfc_name[loop][0] == 'C') { + element_size = NR_CPUS; + cpus = 1; + } else { + num = sscanf (perfc_name[loop], "[%d]", &element_size); + } + + total_size += element_size == 0 ? 1 : element_size; + if (total_size > offset) break; } - if (element_size == 0) /* single counter */ - { - printf ("%10ld 0x%08lx %s\n", counter[0], counter[0], - perfc_name[loop] + 2 + num); + if (loop == sizeof(perfc_name) / sizeof(char *)) { + printf ("error: couldn't find variable\n"); + return; } - else /* show entire array */ - { - for (loop = 0; loop < element_size; loop++) - { - printf ("%10ld 0x%08lx %s:%d\n", - counter[loop], counter[loop], - perfc_name[loop] + 2 + num, loop); - } + if (element_size == 0) { /* single counter */ + printf ("%10ld 0x%08lx %s\n", counter[0], counter[0], + perfc_name[loop] + 2 + num); + } else if (cpus) { /* counter per CPU */ + for (loop = 0; loop < smp_num_cpus; loop++) { + printf ("%10ld 0x%08lx cpu[%02d] %s\n", + counter[loop], counter[loop], + loop, perfc_name[loop]); + } + + } else { /* show entire array */ + for (loop = 0; loop < element_size; loop++) { + printf ("%10ld 0x%08lx %s:%d\n", + counter[loop], counter[loop], + perfc_name[loop] + 2 + num, loop); + } } return; } void perfc_printall (u_char key, void *dev_id, struct pt_regs *regs) { - int loop, idx; - int element_size; - int num; - unsigned long *counters = (unsigned long *)&perfcounters; + int loop, idx; + int element_size; + int cpus=0; + int num = 0; + s_time_t now = NOW(); + unsigned long *counters = (unsigned long *)&perfcounters; + + printf ("xen performance counters: now=0x%08X%08X\n", + (u32)(now>>32), (u32)now); + + for (loop = 0; loop < sizeof(perfc_name) / sizeof(char *); loop++) { - printf ("xen performance counters\n"); - for (loop = 0; loop < sizeof(perfc_name) / sizeof(char *); loop++) - { - num = sscanf (perfc_name[loop], "[%d]", &element_size); + if (perfc_name[loop][0] == 'C') { + element_size = NR_CPUS; + cpus = 1; + } else { + num = sscanf (perfc_name[loop], "[%d]", &element_size); + } - for (idx = 0; idx < (element_size ? element_size : 1); idx++) - { - if (element_size) - { - printf ("%10ld 0x%08lx %s:%d\n", - *counters, *counters, perfc_name[loop] + num + 2, idx); - } - else - { - printf ("%10ld 0x%08lx %s\n", - *counters, *counters, perfc_name[loop] + num + 2); - } - counters++; + for (idx = 0; idx < (element_size ? element_size : 1); idx++) { + if (cpus) { + if (idx < smp_num_cpus) + printf ("%10ld 0x%08lx cpu[%02d] %s\n", + *counters, *counters, idx, perfc_name[loop] + 1); + } else if (element_size) { + printf ("%10ld 0x%08lx %s:%d\n", + *counters, *counters, perfc_name[loop] + num + 2, idx); + } else { + printf ("%10ld 0x%08lx %s\n", + *counters, *counters, perfc_name[loop] + num + 2); + } + counters++; + } } - } - return; + return; } + +void perfc_reset (u_char key, void *dev_id, struct pt_regs *regs) +{ + s_time_t now = NOW(); + printk ("xen performance counters reset: now=0x%08X%08X\n", + (u32)(now>>32), (u32)now); + memset (&perfcounters, 0, sizeof(perfcounters)); +} + diff --git a/xen/include/xeno/perfc.h b/xen/include/xeno/perfc.h index 31201eaa6d..4d0164c170 100644 --- a/xen/include/xeno/perfc.h +++ b/xen/include/xeno/perfc.h @@ -3,22 +3,31 @@ */ /* - * NOTE: new counters must be defined in xen_perf_defn.h + * NOTE: new counters must be defined in perfc_defn.h * * PERFCOUNTER (counter, string) define a new performance counter + * PERFCOUNTER_CPU (counter, string, size) define a counter per CPU * PERFCOUNTER_ARRY (counter, string, size) define an array of counters * * unsigned long perfc_value (counter) get value of a counter + * unsigned long perfc_valuec (counter) get value of a per CPU counter * unsigned long perfc_valuea (counter, index) get value of an array counter - * void perfc_incr (counter) increment a counter - * void perfc_incra (counter, index) increment an array counter - * void perfc_add (counter, value) add a value to a counter - * void perfc_adda (counter, index, value) add a value to array counter - * void perfc_print (counter) print out the counter + * unsigned long perfc_set (counter, val) set value of a counter + * unsigned long perfc_setc (counter, val) set value of a per CPU counter + * unsigned long perfc_seta (counter, index, val) set value of an array counter + * void perfc_incr (counter) increment a counter + * void perfc_incrc (counter, index) increment a per CPU counter + * void perfc_incra (counter, index) increment an array counter + * void perfc_add (counter, value) add a value to a counter + * void perfc_addc (counter, value) add a value to a per CPU counter + * void perfc_adda (counter, index, value) add a value to array counter + * void perfc_print (counter) print out the counter */ #define PERFCOUNTER( var, name ) \ unsigned long var[1]; +#define PERFCOUNTER_CPU( var, name ) \ +unsigned long var[NR_CPUS]; #define PERFCOUNTER_ARRAY( var, name, size ) \ unsigned long var[size]; @@ -30,12 +39,18 @@ struct perfcounter_t extern struct perfcounter_t perfcounters; extern char *perfc_name[]; -#define perf_value(x) perfcounters.x[0] -#define perf_valuea(x,y) perfcounters.x[y] -#define perf_incr(x) perfcounters.x[0]++ -#define perf_incra(x,y) perfcounters.x[y]++ -#define perf_add(x,y) perfcounters.x[0]+=(y) -#define perf_adda(x,y,z) perfcounters.x[y]+=(z) +#define perfc_value(x) perfcounters.x[0] +#define perfc_valuec(x) perfcounters.x[smp_processor_id()] +#define perfc_valuea(x,y) perfcounters.x[y] +#define perfc_set(x,v) perfcounters.x[0] = v +#define perfc_setc(x,v) perfcounters.x[smp_processor_id()] = v +#define perfc_seta(x,y,v) perfcounters.x[y] = v +#define perfc_incr(x) perfcounters.x[0]++ +#define perfc_incrc(x) perfcounters.x[smp_processor_id()]++ +#define perfc_incra(x,y) perfcounters.x[y]++ +#define perfc_add(x,y) perfcounters.x[0]+=(y) +#define perfc_addc(x,y) perfcounters.x[smp_processor_id()]+=(y) +#define perfc_adda(x,y,z) perfcounters.x[y]+=(z) #define perf_print(x) \ __perfc_print(perfcounters.x, \ diff --git a/xen/include/xeno/perfc_defn.h b/xen/include/xeno/perfc_defn.h index 16ab4cd8c9..41dd48f73b 100644 --- a/xen/include/xeno/perfc_defn.h +++ b/xen/include/xeno/perfc_defn.h @@ -1,4 +1,10 @@ +PERFCOUNTER_CPU( irqs, "#interrupts" ) +PERFCOUNTER_CPU( irq_time, "cycles spent in irq handler" ) + PERFCOUNTER( blockio_tx, "block io: messages received from tx queue" ) PERFCOUNTER( blockio_rx, "block io: messages sent on rx queue" ) +PERFCOUNTER_CPU( apic_timer, "apic timer interrupts" ) +PERFCOUNTER_CPU( ac_timer_max, "ac_timer max error" ) + -- cgit v1.2.3 From c568cc3fcf3ad2495d47a5a9787d8f98a89a5a65 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Thu, 13 Mar 2003 16:44:14 +0000 Subject: bitkeeper revision 1.122.1.11 (3e70b55emf8PRsy8RtiLO9uyIiycyA) network.c, xl_block.c, sd.c, ide-xeno.c, xen_segment.c, keyhandler.c: Fix IDE and SCSI initialisation. Add to entropy pool from Xenolinux net & blkdev interrupts. Add a graceful reboot handler. --- xen/common/keyhandler.c | 13 ++++++++++--- xen/drivers/block/xen_segment.c | 12 ++++++------ xen/drivers/ide/ide-xeno.c | 7 ++++--- xen/drivers/scsi/sd.c | 10 +++++++--- .../arch/xeno/drivers/block/xl_block.c | 4 ++-- .../arch/xeno/drivers/network/network.c | 8 ++++---- 6 files changed, 33 insertions(+), 21 deletions(-) diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c index 1f8a84ea32..19943fff3e 100644 --- a/xen/common/keyhandler.c +++ b/xen/common/keyhandler.c @@ -42,7 +42,7 @@ key_handler *get_key_handler(u_char key) } -void show_handlers(u_char key, void *dev_id, struct pt_regs *regs) +static void show_handlers(u_char key, void *dev_id, struct pt_regs *regs) { int i; @@ -56,7 +56,7 @@ void show_handlers(u_char key, void *dev_id, struct pt_regs *regs) } -void dump_registers(u_char key, void *dev_id, struct pt_regs *regs) +static void dump_registers(u_char key, void *dev_id, struct pt_regs *regs) { extern void show_registers(struct pt_regs *regs); @@ -65,13 +65,19 @@ void dump_registers(u_char key, void *dev_id, struct pt_regs *regs) return; } -void halt_machine(u_char key, void *dev_id, struct pt_regs *regs) +static void halt_machine(u_char key, void *dev_id, struct pt_regs *regs) { printk("'%c' pressed -> rebooting machine\n", key); machine_restart(NULL); return; } +static void kill_dom0(u_char key, void *dev_id, struct pt_regs *regs) +{ + printk("'%c' pressed -> gracefully rebooting machine\n", key); + kill_other_domain(0, 0); + return; +} /* XXX SMH: this is keir's fault */ @@ -125,6 +131,7 @@ void initialize_keytable() add_key_handler('p', perfc_printall, "print performance counters"); add_key_handler('P', perfc_reset, "reset performance counters"); add_key_handler('q', do_task_queues, "dump task queues + guest state"); + add_key_handler('B', kill_dom0, "reboot machine gracefully"); add_key_handler('R', halt_machine, "reboot machine ungracefully"); return; diff --git a/xen/drivers/block/xen_segment.c b/xen/drivers/block/xen_segment.c index 4a09f511a6..dbfe699030 100644 --- a/xen/drivers/block/xen_segment.c +++ b/xen/drivers/block/xen_segment.c @@ -101,6 +101,7 @@ void xen_segment_probe(struct task_struct *p, xen_disk_info_t *raw_xdi) { int loop, i; xen_disk_info_t *xdi = map_domain_mem(virt_to_phys(raw_xdi)); + unsigned long capacity = 0, device; for ( loop = 0; loop < XEN_MAX_SEGMENTS; loop++ ) { @@ -108,13 +109,12 @@ void xen_segment_probe(struct task_struct *p, xen_disk_info_t *raw_xdi) (xsegments[loop].domain != p->domain) ) continue; - xdi->disks[xdi->count].device = - MK_VIRTUAL_XENDEV(xsegments[loop].segment_number); + device = MK_VIRTUAL_XENDEV(xsegments[loop].segment_number); for ( i = 0; i < xsegments[loop].num_extents; i++ ) - { - xdi->disks[xdi->count].capacity += - xsegments[loop].extents[i].size; - } + capacity += xsegments[loop].extents[i].size; + + xdi->disks[xdi->count].device = device; + xdi->disks[xdi->count].capacity = capacity; xdi->count++; } diff --git a/xen/drivers/ide/ide-xeno.c b/xen/drivers/ide/ide-xeno.c index 49ecde74e4..351e2cbcf5 100644 --- a/xen/drivers/ide/ide-xeno.c +++ b/xen/drivers/ide/ide-xeno.c @@ -12,7 +12,7 @@ void ide_probe_devices(xen_disk_info_t* xdi) int loop; unsigned int unit; xen_disk_info_t *xen_xdi = map_domain_mem(virt_to_phys(xdi)); - unsigned long capacity; + unsigned long capacity, device; ide_drive_t *drive; for ( loop = 0; loop < MAX_HWIFS; loop++ ) @@ -25,9 +25,10 @@ void ide_probe_devices(xen_disk_info_t* xdi) drive = &hwif->drives[unit]; if ( !drive->present ) continue; + device = MK_IDE_XENDEV((loop * MAX_DRIVES) + unit); capacity = current_capacity(drive); - xen_xdi->disks[xen_xdi->count].device = - MK_IDE_XENDEV((loop * MAX_DRIVES) + unit); + + xen_xdi->disks[xen_xdi->count].device = device; xen_xdi->disks[xen_xdi->count].capacity = capacity; xen_xdi->count++; diff --git a/xen/drivers/scsi/sd.c b/xen/drivers/scsi/sd.c index a2a245fddc..88e7ce814a 100644 --- a/xen/drivers/scsi/sd.c +++ b/xen/drivers/scsi/sd.c @@ -1320,17 +1320,21 @@ void scsi_probe_devices(xen_disk_info_t *xdi) Scsi_Disk *sd; int i; xen_disk_info_t *xen_xdi = map_domain_mem(virt_to_phys(xdi)); + unsigned long capacity, device; for ( sd = rscsi_disks, i = 0; i < sd_template.dev_max; i++, sd++ ) { if ( sd->device == NULL ) continue; - xen_xdi->disks[xen_xdi->count].device = MK_SCSI_XENDEV(i); - xen_xdi->disks[xen_xdi->count].capacity = sd->capacity; + device = MK_SCSI_XENDEV(i); + capacity = sd->capacity; + + xen_xdi->disks[xen_xdi->count].device = device; + xen_xdi->disks[xen_xdi->count].capacity = capacity; xen_xdi->count++; printk("Disk %d: SCSI-XENO capacity %dkB (%dMB)\n", - xen_xdi->count, sd->capacity>>1, sd->capacity>>11); + xen_xdi->count, capacity>>1, capacity>>11); } unmap_domain_mem(xen_xdi); diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_block.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_block.c index bfdfa50c3e..6fd44f1cc1 100644 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_block.c +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_block.c @@ -522,8 +522,8 @@ int __init xlblk_init(void) blk_ring = (blk_ring_t *)fix_to_virt(FIX_BLKRING_BASE); blk_ring->req_prod = blk_ring->resp_prod = resp_cons = req_prod = 0; - error = request_irq(XLBLK_RESPONSE_IRQ, xlblk_response_int, 0, - "xlblk-response", NULL); + error = request_irq(XLBLK_RESPONSE_IRQ, xlblk_response_int, + SA_SAMPLE_RANDOM, "xlblk-response", NULL); if ( error ) { printk(KERN_ALERT "Could not allocate receive interrupt\n"); diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/network/network.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/network/network.c index 7e85bf5abe..86bbeb921a 100644 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/network/network.c +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/network/network.c @@ -116,8 +116,8 @@ static int network_open(struct net_device *dev) network_alloc_rx_buffers(dev); - error = request_irq(NET_RX_IRQ, network_rx_int, 0, - "net-rx", dev); + error = request_irq(NET_RX_IRQ, network_rx_int, + SA_SAMPLE_RANDOM, "net-rx", dev); if ( error ) { printk(KERN_WARNING "%s: Could not allocate receive interrupt\n", @@ -126,8 +126,8 @@ static int network_open(struct net_device *dev) goto fail; } - error = request_irq(NET_TX_IRQ, network_tx_int, 0, - "net-tx", dev); + error = request_irq(NET_TX_IRQ, network_tx_int, + SA_SAMPLE_RANDOM, "net-tx", dev); if ( error ) { printk(KERN_WARNING "%s: Could not allocate transmit interrupt\n", -- cgit v1.2.3 From 0ac392086ca11612e5d317b839bd53323cf8daac Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Thu, 13 Mar 2003 17:38:42 +0000 Subject: bitkeeper revision 1.122.1.12 (3e70c222sMX-OidE6LMQKldyEgrYWg) xl_segment.c, xl_scsi.c, xl_ide.c: Fix IDE/SCSI so that will not segfault on accessing non-existent devices. --- .../arch/xeno/drivers/block/xl_ide.c | 18 ++++++++++-------- .../arch/xeno/drivers/block/xl_scsi.c | 16 +++++++++------- .../arch/xeno/drivers/block/xl_segment.c | 4 +++- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_ide.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_ide.c index 70990167e3..5e96f4197b 100644 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_ide.c +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_ide.c @@ -18,7 +18,7 @@ static int xlide_blksize_size[XLIDE_MAX]; static int xlide_hardsect_size[XLIDE_MAX]; static int xlide_max_sectors[XLIDE_MAX]; -struct gendisk *xlide_gendisk; +struct gendisk *xlide_gendisk = NULL; static struct block_device_operations xlide_block_fops = { @@ -41,6 +41,13 @@ int xlide_init(xen_disk_info_t *xdi) int i, result, units, minors, disk; struct gendisk *gd; + /* If we don't have any usable IDE devices we may as well bail now. */ + units = 0; + for ( i = 0; i < xdi->count; i++ ) + if ( IS_IDE_XENDEV(xdi->disks[i].device) && + ((xdi->disks[i].device & XENDEV_IDX_MASK) < 16) ) units++; + if ( units == 0 ) return 0; + SET_MODULE_OWNER(&xlide_block_fops); result = register_blkdev(XLIDE_MAJOR, XLIDE_MAJOR_NAME, @@ -73,13 +80,6 @@ int xlide_init(xen_disk_info_t *xdi) */ blk_queue_headactive(BLK_DEFAULT_QUEUE(XLIDE_MAJOR), 0); - /* If we don't have any usable IDE devices we may as well bail now. */ - units = 0; - for ( i = 0; i < xdi->count; i++ ) - if ( IS_IDE_XENDEV(xdi->disks[i].device) && - ((xdi->disks[i].device & XENDEV_IDX_MASK) < 16) ) units++; - if ( units == 0 ) return 0; - /* We may register up to 16 devices in a sparse identifier space. */ units = 16; @@ -133,6 +133,8 @@ int xlide_init(xen_disk_info_t *xdi) void xlide_cleanup(void) { + if ( xlide_gendisk == NULL ) return; + blk_cleanup_queue(BLK_DEFAULT_QUEUE(XLIDE_MAJOR)); xlide_gendisk = NULL; diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_scsi.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_scsi.c index 75e379f1ba..f765d3f12e 100644 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_scsi.c +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_scsi.c @@ -42,6 +42,13 @@ int xlscsi_init(xen_disk_info_t *xdi) int i, result, units, minors, disk; struct gendisk *gd; + /* If we don't have any usable SCSI devices we may as well bail now. */ + units = 0; + for ( i = 0; i < xdi->count; i++ ) + if ( IS_SCSI_XENDEV(xdi->disks[i].device) && + ((xdi->disks[i].device & XENDEV_IDX_MASK) < 16) ) units++; + if ( units == 0 ) return 0; + SET_MODULE_OWNER(&xlscsi_block_fops); result = register_blkdev(XLSCSI_MAJOR, XLSCSI_MAJOR_NAME, @@ -74,13 +81,6 @@ int xlscsi_init(xen_disk_info_t *xdi) */ blk_queue_headactive(BLK_DEFAULT_QUEUE(XLSCSI_MAJOR), 0); - /* If we don't have any usable SCSI devices we may as well bail now. */ - units = 0; - for ( i = 0; i < xdi->count; i++ ) - if ( IS_SCSI_XENDEV(xdi->disks[i].device) && - ((xdi->disks[i].device & XENDEV_IDX_MASK) < 16) ) units++; - if ( units == 0 ) return 0; - /* We may register up to 16 devices in a sparse identifier space. */ units = 16; @@ -134,6 +134,8 @@ int xlscsi_init(xen_disk_info_t *xdi) void xlscsi_cleanup(void) { + if ( xlscsi_gendisk == NULL ) return; + blk_cleanup_queue(BLK_DEFAULT_QUEUE(XLSCSI_MAJOR)); xlscsi_gendisk = NULL; diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_segment.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_segment.c index 8626a36569..6ef1838a2b 100644 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_segment.c +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_segment.c @@ -21,7 +21,7 @@ static int xlseg_blksize_size[XLVIRT_MAX]; static int xlseg_hardsect_size[XLVIRT_MAX]; static int xlseg_max_sectors[XLVIRT_MAX]; -struct gendisk *xlsegment_gendisk; +struct gendisk *xlsegment_gendisk = NULL; static xen_disk_info_t xlseg_disk_info; @@ -148,6 +148,8 @@ int __init xlseg_init(void) static void __exit xlseg_cleanup(void) { + if ( xlsegment_gendisk == NULL ) return; + blk_cleanup_queue(BLK_DEFAULT_QUEUE(XLVIRT_MAJOR)); xlsegment_gendisk = NULL; -- cgit v1.2.3 From 46145d96ec4b7cb0611715efb0bbc3c205be5076 Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Thu, 13 Mar 2003 21:33:05 +0000 Subject: bitkeeper revision 1.122.1.13 (3e70f911KaQqE5hysMl8FEBceVLlvA) smpboot.h, io_apic.c: Round robin allocate IRQs to processors on SMP. --- xen/arch/i386/io_apic.c | 2 -- xen/include/asm-i386/smpboot.h | 11 ++++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/xen/arch/i386/io_apic.c b/xen/arch/i386/io_apic.c index 878c189afb..6ad37f2399 100644 --- a/xen/arch/i386/io_apic.c +++ b/xen/arch/i386/io_apic.c @@ -826,7 +826,6 @@ void __init print_IO_APIC(void) UNEXPECTED_IO_APIC(); } -#if 0 printk(KERN_DEBUG ".... IRQ redirection table:\n"); printk(KERN_DEBUG " NR Log Phy Mask Trig IRR Pol" @@ -871,7 +870,6 @@ void __init print_IO_APIC(void) entry = irq_2_pin + entry->next; } printk("\n"); -#endif } printk(KERN_INFO ".................................... done.\n"); diff --git a/xen/include/asm-i386/smpboot.h b/xen/include/asm-i386/smpboot.h index ece215fab0..3ca484d531 100644 --- a/xen/include/asm-i386/smpboot.h +++ b/xen/include/asm-i386/smpboot.h @@ -116,6 +116,15 @@ static inline int target_cpus(void) return cpu_online_map; } #else -#define target_cpus() (0x01) +/* KAF Xen: Round-robin allocate IRQs to CPUs. */ +static inline int target_cpus(void) +{ + static unsigned int cpu_field = 1; + do { + cpu_field <<= 1; + if ( cpu_field == 0x100 ) cpu_field = 1; /* logical field == 8 bits */ + } while ( (cpu_field & cpu_online_map) == 0 ); + return cpu_field; +} #endif #endif -- cgit v1.2.3 From 6271e1c97e44b910582453e48a332442a7c64d1b Mon Sep 17 00:00:00 2001 From: "iap10@labyrinth.cl.cam.ac.uk" Date: Thu, 13 Mar 2003 21:36:30 +0000 Subject: bitkeeper revision 1.122.4.1 (3e70f9de9vqrPg9WRlAsGz1oZFMW9g) Don't profile time spent printing our perf counters! --- xen/arch/i386/irq.c | 4 +++- xen/common/perfc.c | 8 +++++--- xen/drivers/char/xen_kbd.c | 3 ++- xen/drivers/char/xen_serial.c | 2 +- xen/include/asm-i386/irq.h | 1 + 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/xen/arch/i386/irq.c b/xen/arch/i386/irq.c index 312cfe7970..6485b6ba15 100644 --- a/xen/arch/i386/irq.c +++ b/xen/arch/i386/irq.c @@ -537,7 +537,9 @@ asmlinkage unsigned int do_IRQ(struct pt_regs regs) do_softirq(); rdtscl(cc_end); - perfc_adda(irq_time, cpu, cc_end - cc_start); + + if(!action || (!(action->flags & SA_NOPROFILE)) ) + perfc_adda(irq_time, cpu, cc_end - cc_start); return 1; } diff --git a/xen/common/perfc.c b/xen/common/perfc.c index cc277a914a..704bef1d3b 100644 --- a/xen/common/perfc.c +++ b/xen/common/perfc.c @@ -47,18 +47,18 @@ void __perfc_print (unsigned long counter[], int offset) return; } if (element_size == 0) { /* single counter */ - printf ("%10ld 0x%08lx %s\n", counter[0], counter[0], + printf ("%10lu 0x%08lx %s\n", counter[0], counter[0], perfc_name[loop] + 2 + num); } else if (cpus) { /* counter per CPU */ for (loop = 0; loop < smp_num_cpus; loop++) { - printf ("%10ld 0x%08lx cpu[%02d] %s\n", + printf ("%10lu 0x%08lx cpu[%02d] %s\n", counter[loop], counter[loop], loop, perfc_name[loop]); } } else { /* show entire array */ for (loop = 0; loop < element_size; loop++) { - printf ("%10ld 0x%08lx %s:%d\n", + printf ("%10lu 0x%08lx %s:%d\n", counter[loop], counter[loop], perfc_name[loop] + 2 + num, loop); } @@ -103,6 +103,8 @@ void perfc_printall (u_char key, void *dev_id, struct pt_regs *regs) } } + //perfc_reset( key, dev_id, regs ); + return; } diff --git a/xen/drivers/char/xen_kbd.c b/xen/drivers/char/xen_kbd.c index dc9379a06c..b103f2fb4e 100644 --- a/xen/drivers/char/xen_kbd.c +++ b/xen/drivers/char/xen_kbd.c @@ -1,4 +1,5 @@ #include +#include #include /* this has request_irq() proto for some reason */ #include @@ -183,7 +184,7 @@ static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs) void initialize_keyboard() { - if(request_irq(KEYBOARD_IRQ, keyboard_interrupt, 0, "keyboard", NULL)) + if(request_irq(KEYBOARD_IRQ, keyboard_interrupt, SA_NOPROFILE, "keyboard", NULL)) printk("initialize_keyboard: failed to alloc IRQ %d\n", KEYBOARD_IRQ); return; diff --git a/xen/drivers/char/xen_serial.c b/xen/drivers/char/xen_serial.c index 4fba991997..95107e587d 100644 --- a/xen/drivers/char/xen_serial.c +++ b/xen/drivers/char/xen_serial.c @@ -85,6 +85,6 @@ void initialize_serial() outb(NS16550_MCR_OUT2, SERIAL_BASE + NS16550_MCR); /* Modem control */ outb(NS16550_IER_ERDAI, SERIAL_BASE + NS16550_IER ); /* Setup interrupts */ - if((rc = request_irq(4, serial_rx_int, 0, "serial", 0))) + if((rc = request_irq(4, serial_rx_int, SA_NOPROFILE, "serial", 0))) printk("initialize_serial: failed to get IRQ4, rc=%d\n", rc); } diff --git a/xen/include/asm-i386/irq.h b/xen/include/asm-i386/irq.h index 41049e71b2..21c24f4483 100644 --- a/xen/include/asm-i386/irq.h +++ b/xen/include/asm-i386/irq.h @@ -8,6 +8,7 @@ #define SA_INTERRUPT 0x20000000 #define SA_SHIRQ 0x04000000 +#define SA_NOPROFILE 0x02000000 #define SA_SAMPLE_RANDOM 0 /* Linux driver compatibility */ -- cgit v1.2.3 From 17d79996321b67d1ab583684ee67f5b1e28cf183 Mon Sep 17 00:00:00 2001 From: "iap10@labyrinth.cl.cam.ac.uk" Date: Thu, 13 Mar 2003 21:37:03 +0000 Subject: bitkeeper revision 1.122.4.2 (3e70f9ffOS5_D9CqO8R3hQ8xzi4BrA) Change xenolinux xl_scsi parameters to allow more stuff to be queued up. --- xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_scsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_scsi.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_scsi.c index 75e379f1ba..57bdd8b936 100644 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_scsi.c +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_scsi.c @@ -55,16 +55,16 @@ int xlscsi_init(xen_disk_info_t *xdi) /* Initialize global arrays. */ for ( i = 0; i < XLSCSI_MAX; i++ ) { - xlscsi_blksize_size[i] = 512; + xlscsi_blksize_size[i] = 1024; //XXX 512; xlscsi_hardsect_size[i] = 512; - xlscsi_max_sectors[i] = 128; + xlscsi_max_sectors[i] = 128*8; //XXX 128 } blk_size[XLSCSI_MAJOR] = NULL; blksize_size[XLSCSI_MAJOR] = xlscsi_blksize_size; hardsect_size[XLSCSI_MAJOR] = xlscsi_hardsect_size; max_sectors[XLSCSI_MAJOR] = xlscsi_max_sectors; - read_ahead[XLSCSI_MAJOR] = 8; + read_ahead[XLSCSI_MAJOR] = NULL; //XXX8; blk_init_queue(BLK_DEFAULT_QUEUE(XLSCSI_MAJOR), do_xlblk_request); -- cgit v1.2.3