ia64/xen-unstable

changeset 304:9121aa1e3f33

bitkeeper revision 1.126 (3e71fc20anCOs2KFyD3-AMyHjdJQfg)

resolve merge conflicts manually
author rn@wyvis.research.intel-research.net
date Fri Mar 14 15:58:24 2003 +0000 (2003-03-14)
parents 4ace704a143f 8d97a5bf81d2
children 6e398cd3bf49
files .bk-to-hg .hg-to-bk .rootkeys BitKeeper/etc/logging_ok xen/arch/i386/apic.c xen/arch/i386/io_apic.c xen/arch/i386/irq.c xen/arch/i386/setup.c xen/common/ac_timer.c xen/common/kernel.c xen/common/keyhandler.c xen/common/perfc.c xen/drivers/block/xen_block.c xen/drivers/block/xen_segment.c xen/drivers/char/xen_kbd.c xen/drivers/char/xen_serial.c xen/drivers/ide/ide-xeno.c xen/drivers/net/tg3.c xen/drivers/scsi/scsi.c xen/drivers/scsi/sd.c xen/include/asm-i386/irq.h xen/include/asm-i386/pci.h xen/include/asm-i386/smpboot.h xen/include/xeno/perfc.h xen/include/xeno/perfc_defn.h xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_block.c xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_ide.c xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_scsi.c xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_segment.c xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/network/network.c xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/init_task.c xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ptrace.c xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/semaphore.c xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/sys_i386.c xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/checksum.S xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/dec_and_lock.c xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/getuser.S xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/iodebug.c xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/memcpy.c xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/mmx.c xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/old-checksum.c xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/strstr.c xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/usercopy.c xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/extable.c xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/pageattr.c xenolinux-2.4.21-pre4-sparse/include/asm-xeno/a.out.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apic.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apicdef.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/atomic.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/bitops.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/boot.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/byteorder.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cache.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/checksum.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cpufeature.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/current.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/debugreg.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/delay.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/dma.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/elf.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/errno.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/fcntl.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/floppy.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hardirq.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hdreg.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/i387.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ide.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/init.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/io_apic.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctl.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctls.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipc.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipcbuf.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/keyboard.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/kmap_types.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ldt.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/linux_logo.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/locks.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/math_emu.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mc146818rtc.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mca_dma.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mman.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmx.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/module.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mpspec.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msgbuf.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msr.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mtrr.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/namei.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/param.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/parport.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/poll.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/posix_types.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/resource.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwlock.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwsem.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/scatterlist.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/semaphore.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sembuf.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/serial.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/setup.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmbuf.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmparam.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sigcontext.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/siginfo.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/signal.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/smplock.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/socket.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sockios.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/softirq.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/spinlock.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/stat.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/statfs.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string-486.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termbits.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termios.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/timex.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/tlb.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/types.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/uaccess.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ucontext.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unaligned.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unistd.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/user.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/vga.h xenolinux-2.4.21-pre4-sparse/include/asm-xeno/xor.h xenolinux-2.4.21-pre4-sparse/mkbuildtree
line diff
     1.1 --- a/.bk-to-hg	Fri Mar 14 15:48:09 2003 +0000
     1.2 +++ b/.bk-to-hg	Fri Mar 14 15:58:24 2003 +0000
     1.3 @@ -4,7 +4,5 @@ test -L old/xenolinux-2.4.16-sparse/incl
     1.4  rm      old/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs
     1.5  test -L tools/domain_builder/dom0_ops.h
     1.6  rm      tools/domain_builder/dom0_ops.h
     1.7 -test -L xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor-ifs
     1.8 -rm      xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor-ifs
     1.9  (find -depth -type d -print | xargs -r rmdir 2>/dev/null) || true
    1.10  exit 0
     2.1 --- a/.hg-to-bk	Fri Mar 14 15:48:09 2003 +0000
     2.2 +++ b/.hg-to-bk	Fri Mar 14 15:58:24 2003 +0000
     2.3 @@ -8,9 +8,5 @@ ln -s ../../../xen-2.4.16/include/hyperv
     2.4  mkdir -p tools
     2.5  mkdir -p tools/domain_builder
     2.6  ln -s ../../xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/dom0/dom0_ops.h tools/domain_builder/dom0_ops.h
     2.7 -mkdir -p xenolinux-2.4.21-pre4-sparse
     2.8 -mkdir -p xenolinux-2.4.21-pre4-sparse/include
     2.9 -mkdir -p xenolinux-2.4.21-pre4-sparse/include/asm-xeno
    2.10 -ln -s ../../../xen/include/hypervisor-ifs xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor-ifs
    2.11  (find -depth -type d -print | xargs -r rmdir 2>/dev/null) || true
    2.12  exit 0
     3.1 --- a/.rootkeys	Fri Mar 14 15:48:09 2003 +0000
     3.2 +++ b/.rootkeys	Fri Mar 14 15:58:24 2003 +0000
     3.3 @@ -497,150 +497,52 @@ 3e5a4e65Hy_1iUvMTPsNqGNXd9uFpg xenolinux
     3.4  3e5a4e65ibVQmwlOn0j3sVH_j_6hAg xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/hypervisor.c
     3.5  3e5a4e65RMGcuA-HCn3-wNx3fFQwdg xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/i386_ksyms.c
     3.6  3e5a4e65JfSHwduNJO6j-upYnjoWLA xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/i387.c
     3.7 -3e5a4e65tzCYKTX26zdI8rk2m48BDA xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/init_task.c
     3.8  3e5a4e65MEvZhlr070sK5JsfAQlv7Q xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ioport.c
     3.9  3e5a4e653U6cELGv528IxOLHvCq8iA xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/irq.c
    3.10  3e5a4e65muT6SU3ck47IP87Q7Ti5hA xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ldt.c
    3.11  3e5a4e65IGt3WwQDNiL4h-gYWgNTWQ xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/process.c
    3.12 -3e5a4e65vXUggUHe9b_D9q0CNcZmQg xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ptrace.c
    3.13 -3e5a4e66StFP0OPSNngVwPJ4cJDy4g xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/semaphore.c
    3.14  3e5a4e66tR-qJMLj3MppcKqmvuI2XQ xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/setup.c
    3.15  3e5a4e66fWSTagLGU2P8BGFGRjhDiw xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/signal.c
    3.16 -3e5a4e66Id8AWFANwLRFP4mKJgIFQw xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/sys_i386.c
    3.17  3e5a4e66N__lUXNwzQ-eADRzK9LXuQ xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/time.c
    3.18  3e5a4e66aHCbQ_F5QZ8VeyikLmuRZQ xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/traps.c
    3.19  3e5a4e66-9_NczrVMbuQkoSLyXckIw xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/Makefile
    3.20 -3e5a4e66pZtp3RawntDpdofnJEvHIg xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/checksum.S
    3.21 -3e5a4e660Zju423CmC6q_-ZdObYhuA xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/dec_and_lock.c
    3.22  3e5a4e6637ZDk0BvFEC-aFQs599-ng xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/delay.c
    3.23 -3e5a4e66Cf-sjHkzP95oIJ6hBC1pOA xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/getuser.S
    3.24 -3e5a4e66s_LxC8VI5vqmr-TPOdJYsw xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/iodebug.c
    3.25 -3e5a4e667pxnNndXVcVxVNBvZezxhw xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/memcpy.c
    3.26 -3e5a4e66MHYcXyO9DndD8k0DDBovYw xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/mmx.c
    3.27 -3e5a4e669xZJQRPtO8oiRIqMwChrLg xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/old-checksum.c
    3.28 -3e5a4e66RzO4JzKOAraCe2dnQ5m-yw xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/strstr.c
    3.29 -3e5a4e66us6VmRaduHUnWiKcAONyLA xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/usercopy.c
    3.30  3e5a4e66croVgpcJyJuF2ycQw0HuJw xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/Makefile
    3.31 -3e5a4e661LP_6AdxThMuysfcYtOexA xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/extable.c
    3.32  3e5a4e66l8Q5Tv-6B3lQIRmaVbFPzg xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/fault.c
    3.33  3e5a4e66TyNNUEXkr5RxqvQhXK1MQA xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/get_unmapped_area.c
    3.34  3e5a4e668SE9rixq4ahho9rNhLUUFQ xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/hypervisor.c
    3.35  3e5a4e661gLzzff25pJooKIIWe7IWg xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/init.c
    3.36  3e5a4e66U45cAIoHmxg0y1e1XhzVCA xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/mmu_context.c
    3.37 -3e5a4e66_jLCqAOBvqAy5N4mP7hmBA xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/pageattr.c
    3.38  3e5a4e66qRlSTcjafidMB6ulECADvg xenolinux-2.4.21-pre4-sparse/arch/xeno/vmlinux.lds
    3.39  3e5a4e668yELUdtr3HiJZBIqxqUyuA xenolinux-2.4.21-pre4-sparse/drivers/block/Config.in
    3.40  3e5a4e66mrtlmV75L1tjKDg8RaM5gA xenolinux-2.4.21-pre4-sparse/drivers/block/ll_rw_blk.c
    3.41  3e5a4e66rw65CxyolW9PKz4GG42RcA xenolinux-2.4.21-pre4-sparse/drivers/char/tty_io.c
    3.42  3e5a4e669uzIE54VwucPYtGwXLAbzA xenolinux-2.4.21-pre4-sparse/fs/exec.c
    3.43 -3e5a4e66HUJwJfJBBOilIN7LeL0twg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/a.out.h
    3.44 -3e5a4e66nv3Esm5N8FS5r0qs-l7A0w xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apic.h
    3.45 -3e5a4e66BHReK8U7xl4qqZMXvFXihQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apicdef.h
    3.46 -3e5a4e668V7Eo08_6qmVoevzFrlxGQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/atomic.h
    3.47 -3e5a4e66FNm4qKYGsIMdX6DGJ1pI1g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/bitops.h
    3.48 -3e5a4e66zkP-aEQkEtznyyp-e7tUGA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/boot.h
    3.49  3e5a4e66wbeCpsJgVf_U8Jde-CNcsA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/bugs.h
    3.50 -3e5a4e66wTE9HEEjsnOHrijDB8iXrQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/byteorder.h
    3.51 -3e5a4e66VqboK-qHV-HxmSflMh4VqQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cache.h
    3.52 -3e5a4e66bTVzeqJUJQiu67FWoHM5iw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/checksum.h
    3.53 -3e5a4e66JVArkZ-0_pav3AsvKbftdw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cpufeature.h
    3.54 -3e5a4e66cCx28DaXo1U_nKvVX-5Y5w xenolinux-2.4.21-pre4-sparse/include/asm-xeno/current.h
    3.55 -3e5a4e66o7NZjoJZjzJa-Z7XcGmGqg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/debugreg.h
    3.56 -3e5a4e66rpzD2c7pNKF0XLbHzxb24A xenolinux-2.4.21-pre4-sparse/include/asm-xeno/delay.h
    3.57  3e5a4e66HdSkvIV6SJ1evG_xmTmXHA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/desc.h
    3.58 -3e5a4e66GP6AL7wpHyxcsHOH4cJ4BQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h
    3.59 -3e5a4e66wJ9hmUtY2rLWliznHdjWaw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/dma.h
    3.60 -3e5a4e667P_1mO6v1YFRZ-ocfpiyVQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/elf.h
    3.61 -3e5a4e66qeYk1odm2esnGypmiMcxqw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/errno.h
    3.62 -3e5a4e663pDK4oQnfbuT38CR04cXDQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/fcntl.h
    3.63  3e5a4e66SYp_UpAVcF8Lc1wa3Qtgzw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/fixmap.h
    3.64 -3e5a4e67fsayUJFE3A24CKZoUDI88A xenolinux-2.4.21-pre4-sparse/include/asm-xeno/floppy.h
    3.65 -3e5a4e67uPmwPbjvF7YGsG2hX-3oBQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hardirq.h
    3.66 -3e5a4e67P_6RRoCzUiQt_gyx6lmyWw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hdreg.h
    3.67  3e5a4e67w_DWgjIJ17Tlossu1LGujQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/highmem.h
    3.68  3e5a4e67YtcyDLQsShhCfQwPSELfvA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hw_irq.h
    3.69 -3e00b957NB9Iz667rjRZg5YAJqoKCg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor-ifs
    3.70  3e5a4e677VBavzM1UZIEcH1B-RlXMA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hypervisor.h
    3.71 -3e5a4e679TYbXAUiURvTeX4cFb1RlQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/i387.h
    3.72 -3e5a4e672eNAzAKUZsefsPdmsH19hA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ide.h
    3.73 -3e5a4e67XHl6b9C1Oqv79FiE1T3ybg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/init.h
    3.74  3e5a4e67Ulv-Ll8Zp4j2GwMwQ8aAXQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/io.h
    3.75 -3e5a4e67cWGE9V1O6DSwvj5KtkY04g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/io_apic.h
    3.76 -3e5a4e67-vXNELtSK-qDSYyK55febg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctl.h
    3.77 -3e5a4e67iqnkteX3g1IFQ-0Hf-vyuA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctls.h
    3.78 -3e5a4e674l2NZF3klG30JX_auXUBgA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipc.h
    3.79 -3e5a4e678dxUg9lvKOXvH1s5a9GNsA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipcbuf.h
    3.80  3e5a4e673p7PEOyHFm3nHkYX6HQYBg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/irq.h
    3.81 -3e5a4e67nfnw10Wsugp5ZeMYFO_Eeg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/keyboard.h
    3.82 -3e5a4e67FbgZ92JO9Vp2CKlW6z7wjA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/kmap_types.h
    3.83 -3e5a4e674VIvXJxlOtz7LjtNAJttAA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ldt.h
    3.84 -3e5a4e67X2GwDXstxQeuIyr65hdOig xenolinux-2.4.21-pre4-sparse/include/asm-xeno/linux_logo.h
    3.85 -3e5a4e67mLXkDcU-aaeMByYb1-3v7Q xenolinux-2.4.21-pre4-sparse/include/asm-xeno/locks.h
    3.86 -3e5a4e67g8B4DjzsIajoy1_mlxlvLg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/math_emu.h
    3.87 -3e5a4e67J6JsiPWb0AwWZzQcOLbKKw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mc146818rtc.h
    3.88 -3e5a4e67otTxTEz6CA4vVHE-CFLGkQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mca_dma.h
    3.89 -3e5a4e67hSfhasW1McVONBMITBY28g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mman.h
    3.90  3e5a4e67zoNch27qYhEBpr2k6SABOg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmu.h
    3.91  3e5a4e678ddsQOpbSiRdy1GRcDc9WA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmu_context.h
    3.92 -3e5a4e67YQ_cLDcJjIsd8XTCk3w4rg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmx.h
    3.93 -3e5a4e67Zv1yObwNLd_9AYbyGTTvSw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/module.h
    3.94 -3e5a4e67C-czbgW6YxgEbJG1e9aPGg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mpspec.h
    3.95 -3e5a4e67swa8teSCnQDQvpV90xYiZQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msgbuf.h
    3.96 -3e5a4e67U1TsB9azleujfFZm3E5i3w xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msr.h
    3.97 -3e5a4e67f6dvHFEisaZ4wCR2t3a0yw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mtrr.h
    3.98 -3e5a4e67Kd-KWcgJON9dfcJEQD9hdg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/namei.h
    3.99  3e5a4e67mnQfh-R8KcQCaVo2Oho6yg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/page.h
   3.100 -3e5a4e67IYaS0RnLo3SntreGd59gMA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/param.h
   3.101 -3e5a4e67nvdHRk38knQeDl-0Z2j6_Q xenolinux-2.4.21-pre4-sparse/include/asm-xeno/parport.h
   3.102  3e5a4e67uTYU5oEnIDjxuaez8njjqg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgalloc.h
   3.103  3e5a4e67X7JyupgdYkgDX19Huj2sAw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgtable-2level.h
   3.104  3e5a4e67w3ckNdrTEgqiSiYYAYMwOQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgtable-3level.h
   3.105  3e5a4e67gr4NLGtQ5CvSLimMYZlkOA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/pgtable.h
   3.106 -3e5a4e671OnIMxuFE59yynI-qvwKCA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/poll.h
   3.107 -3e5a4e67o7FLcNPHjwyw5vb01EQTCg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/posix_types.h
   3.108  3e5a4e676uK4xErTBDH6XJREn9LSyg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/processor.h
   3.109  3e5a4e67AJPjW-zL7p-xWuA6IVeH1g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ptrace.h
   3.110 -3e5a4e67tIfXJYRQFxfRbcpZ25vqfw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/resource.h
   3.111 -3e5a4e68E-U7HbKdTBaYoo3ZISdxuQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwlock.h
   3.112 -3e5a4e68unR4ktSClycraOPanwxvTg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwsem.h
   3.113 -3e5a4e68DATgqBYbF9W2Pkw5fGZBRg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/scatterlist.h
   3.114  3e5a4e68uJz-xI0IBVMD7xRLQKJDFg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/segment.h
   3.115 -3e5a4e68Ug8hqChUpD2m_IDQSiu8jw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/semaphore.h
   3.116 -3e5a4e68uFNNH3YQvZS1EnL0v_E6ew xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sembuf.h
   3.117 -3e5a4e689R_c0pr8Ycb-w6zveleWEw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/serial.h
   3.118 -3e5a4e682D6yseOVKoJIx6HafkEKJw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/setup.h
   3.119 -3e5a4e680_gLjMSi1Ql0nUnqCoQSyQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmbuf.h
   3.120 -3e5a4e68PFVCbzUszQ4anRN8iZ1DUg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmparam.h
   3.121 -3e5a4e689rAyWPwrwdvtJEkrtVw1rA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sigcontext.h
   3.122 -3e5a4e68D7dXWzciOKbyG1G3l3yt0w xenolinux-2.4.21-pre4-sparse/include/asm-xeno/siginfo.h
   3.123 -3e5a4e68soo0VsYXn1HYv2XeUnlxgw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/signal.h
   3.124  3e5a4e68Nfdh6QcOKUTGCaYkf2LmYA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/smp.h
   3.125 -3e5a4e688pv8zI1Z3wciLUik3c2iEw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/smplock.h
   3.126 -3e5a4e68jaQZMOApQVZiq7T_gGPZhw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/socket.h
   3.127 -3e5a4e68wlnX8Huhsl0gd7VgmiA8uA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sockios.h
   3.128 -3e5a4e68tuqUkZ3kyZGk6BZ1hrkXyw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/softirq.h
   3.129 -3e5a4e68viR5sAz1SvKnPNrpKmlAZA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/spinlock.h
   3.130 -3e5a4e68nUxBYfOOLm0_cZN7XM-3LQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/stat.h
   3.131 -3e5a4e68my8BhpsHYBD63VUrxLXRCg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/statfs.h
   3.132 -3e5a4e68W6piFzx4c4kiqwNB-h8PbQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string-486.h
   3.133 -3e5a4e68gFzDdQZEy91vkcdKWubf2g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/string.h
   3.134  3e5a4e68mTr0zcp9SXDbnd-XLrrfxw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/system.h
   3.135 -3e5a4e686Tful7frKeVbjeeWZ4S0nA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termbits.h
   3.136 -3e5a4e68fZcskF52zTGHdiF_yoVBiw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/termios.h
   3.137 -3e5a4e68t8oGxTdC3i40nPjFwW00_g xenolinux-2.4.21-pre4-sparse/include/asm-xeno/timex.h
   3.138 -3e5a4e685uCbimBjS_2iGxUqptPYiQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/tlb.h
   3.139 -3e5a4e68Elybq23T6RnEt6vopg3mxg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/types.h
   3.140 -3e5a4e68NeADbbaqoo4emjpU5xcaqA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/uaccess.h
   3.141 -3e5a4e68HMMGyb6iBvG-qVbd9hODaQ xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ucontext.h
   3.142 -3e5a4e68m2MrAb54gFw8n-ZGNEu-Fw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unaligned.h
   3.143 -3e5a4e68vggReonfTJ1gdzYjFaOSKw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/unistd.h
   3.144 -3e5a4e68QPC4T0aOA61QgK2SGDPVVA xenolinux-2.4.21-pre4-sparse/include/asm-xeno/user.h
   3.145 -3e5a4e68g2boOp0d45bjtwugxQ8zNw xenolinux-2.4.21-pre4-sparse/include/asm-xeno/vga.h
   3.146 -3e5a4e68AB-TTHj1oXtqVJvUo9jzIg xenolinux-2.4.21-pre4-sparse/include/asm-xeno/xor.h
   3.147  3e5a4e68WLX3B8owTvktP3HHOtznPQ xenolinux-2.4.21-pre4-sparse/include/linux/major.h
   3.148  3e5a4e686V0nioX2ZpFf056sgvdiQw xenolinux-2.4.21-pre4-sparse/include/linux/sunrpc/debug.h
   3.149  3e5a4e68W_hpMlM3u_-QOKMp3gzcwQ xenolinux-2.4.21-pre4-sparse/init/do_mounts.c
   3.150  3e5a4e68TJJavrunYwTAnLRSBxSYqQ xenolinux-2.4.21-pre4-sparse/kernel/panic.c
   3.151 +3e6e7c1efbQe93xCvOpOVCnXTMmQ5w xenolinux-2.4.21-pre4-sparse/mkbuildtree
   3.152  3e5a4e68GxCIaFH4sy01v1wjapetaA xenolinux-2.4.21-pre4-sparse/mm/memory.c
   3.153  3e5a4e681xMPdF9xCMwpyfuYMySU5g xenolinux-2.4.21-pre4-sparse/mm/mremap.c
   3.154  3e5a4e683HKVU-sxtagrDasRB8eBVw xenolinux-2.4.21-pre4-sparse/mm/swapfile.c
     4.1 --- a/BitKeeper/etc/logging_ok	Fri Mar 14 15:48:09 2003 +0000
     4.2 +++ b/BitKeeper/etc/logging_ok	Fri Mar 14 15:58:24 2003 +0000
     4.3 @@ -6,6 +6,7 @@ bd240@boulderdash.cl.cam.ac.uk
     4.4  iap10@labyrinth.cl.cam.ac.uk
     4.5  kaf24@labyrinth.cl.cam.ac.uk
     4.6  kaf24@plym.cl.cam.ac.uk
     4.7 +kaf24@scramble.cl.cam.ac.uk
     4.8  kaf24@striker.cl.cam.ac.uk
     4.9  lynx@idefix.cl.cam.ac.uk
    4.10  rn@wyvis.camb.intel-research.net
     5.1 --- a/xen/arch/i386/io_apic.c	Fri Mar 14 15:48:09 2003 +0000
     5.2 +++ b/xen/arch/i386/io_apic.c	Fri Mar 14 15:58:24 2003 +0000
     5.3 @@ -826,7 +826,6 @@ void __init print_IO_APIC(void)
     5.4  			UNEXPECTED_IO_APIC();
     5.5  	}
     5.6  
     5.7 -#if 0
     5.8  	printk(KERN_DEBUG ".... IRQ redirection table:\n");
     5.9  
    5.10  	printk(KERN_DEBUG " NR Log Phy Mask Trig IRR Pol"
    5.11 @@ -871,7 +870,6 @@ void __init print_IO_APIC(void)
    5.12  			entry = irq_2_pin + entry->next;
    5.13  		}
    5.14  		printk("\n");
    5.15 -#endif
    5.16  	}
    5.17  
    5.18  	printk(KERN_INFO ".................................... done.\n");
     6.1 --- a/xen/arch/i386/irq.c	Fri Mar 14 15:48:09 2003 +0000
     6.2 +++ b/xen/arch/i386/irq.c	Fri Mar 14 15:58:24 2003 +0000
     6.3 @@ -537,7 +537,9 @@ asmlinkage unsigned int do_IRQ(struct pt
     6.4          do_softirq();
     6.5  
     6.6      rdtscl(cc_end);
     6.7 -    perfc_adda(irq_time, cpu, cc_end - cc_start);
     6.8 +
     6.9 +    if(!action || (!(action->flags & SA_NOPROFILE)) )
    6.10 +        perfc_adda(irq_time, cpu, cc_end - cc_start);
    6.11  
    6.12      return 1;
    6.13  }
     7.1 --- a/xen/arch/i386/setup.c	Fri Mar 14 15:48:09 2003 +0000
     7.2 +++ b/xen/arch/i386/setup.c	Fri Mar 14 15:58:24 2003 +0000
     7.3 @@ -292,7 +292,7 @@ void __init start_of_day(void)
     7.4      extern void initialize_keytable(); 
     7.5      extern void initialize_serial(void);
     7.6      extern void initialize_keyboard(void);
     7.7 -
     7.8 +    extern int opt_nosmp;
     7.9      unsigned long low_mem_size;
    7.10      
    7.11      /*
    7.12 @@ -327,7 +327,11 @@ void __init start_of_day(void)
    7.13  #ifndef CONFIG_SMP    
    7.14      APIC_init_uniprocessor();
    7.15  #else
    7.16 -    smp_boot_cpus(); /*
    7.17 +    if( opt_nosmp )
    7.18 +	APIC_init_uniprocessor();
    7.19 +    else
    7.20 +    	smp_boot_cpus(); 
    7.21 +		     /*
    7.22                        * Does loads of stuff, including kicking the local
    7.23                        * APIC, and the IO APIC after other CPUs are booted.
    7.24                        * Each IRQ is preferably handled by IO-APIC, but
     8.1 --- a/xen/common/kernel.c	Fri Mar 14 15:48:09 2003 +0000
     8.2 +++ b/xen/common/kernel.c	Fri Mar 14 15:58:24 2003 +0000
     8.3 @@ -41,7 +41,7 @@ unsigned int opt_ser_baud = 9600;  /* de
     8.4  unsigned int opt_dom0_mem = 16000; /* default kbytes for DOM0 */
     8.5  unsigned int opt_ne_base = 0; /* NE2k NICs cannot be probed */
     8.6  unsigned char opt_ifname[10] = "eth0";
     8.7 -int opt_noht=0, opt_noacpi=0;
     8.8 +int opt_noht=0, opt_noacpi=0, opt_nosmp;
     8.9  enum { OPT_IP, OPT_STR, OPT_UINT, OPT_BOOL };
    8.10  static struct {
    8.11      unsigned char *name;
    8.12 @@ -55,6 +55,7 @@ static struct {
    8.13      { "ifname",   OPT_STR,  &opt_ifname },
    8.14      { "noht",     OPT_BOOL, &opt_noht },
    8.15      { "noacpi",   OPT_BOOL, &opt_noacpi },
    8.16 +    { "nosmp",    OPT_BOOL, &opt_nosmp },
    8.17      { NULL,       0,        NULL     }
    8.18  };
    8.19  
     9.1 --- a/xen/common/keyhandler.c	Fri Mar 14 15:48:09 2003 +0000
     9.2 +++ b/xen/common/keyhandler.c	Fri Mar 14 15:58:24 2003 +0000
     9.3 @@ -17,18 +17,18 @@ void add_key_handler(u_char key, key_han
     9.4      char *str; 
     9.5  
     9.6      if(key_table[key].handler != NULL) 
     9.7 -    printk("Warning: overwriting handler for key 0x%x\n", key); 
     9.8 +	printk("Warning: overwriting handler for key 0x%x\n", key); 
     9.9  
    9.10      key_table[key].handler = handler; 
    9.11  
    9.12      str = key_table[key].desc; 
    9.13      for(i = 0; i < STR_MAX; i++) {
    9.14 -    if(*desc) 
    9.15 -        *str++ = *desc++; 
    9.16 -    else break; 
    9.17 +	if(*desc) 
    9.18 +	    *str++ = *desc++; 
    9.19 +	else break; 
    9.20      }
    9.21      if (i == STR_MAX) 
    9.22 -    key_table[key].desc[STR_MAX-1] = '\0'; 
    9.23 +	key_table[key].desc[STR_MAX-1] = '\0'; 
    9.24  
    9.25      return; 
    9.26  }
    9.27 @@ -39,21 +39,21 @@ key_handler *get_key_handler(u_char key)
    9.28  }
    9.29  
    9.30  
    9.31 -void show_handlers(u_char key, void *dev_id, struct pt_regs *regs) 
    9.32 +static void show_handlers(u_char key, void *dev_id, struct pt_regs *regs) 
    9.33  {
    9.34      int i; 
    9.35  
    9.36      printk("'%c' pressed -> showing installed handlers\n", key); 
    9.37      for(i=0; i < KEY_MAX; i++) 
    9.38 -    if(key_table[i].handler) 
    9.39 -        printk(" key '%c' (ascii '%02x') => %s\n", 
    9.40 -            (i<33 || i>126)?(' '):(i),i,
    9.41 -            key_table[i].desc);
    9.42 +	if(key_table[i].handler) 
    9.43 +	    printk(" key '%c' (ascii '%02x') => %s\n", 
    9.44 +			(i<33 || i>126)?(' '):(i),i,
    9.45 +			key_table[i].desc);
    9.46      return; 
    9.47  }
    9.48  
    9.49  
    9.50 -void dump_registers(u_char key, void *dev_id, struct pt_regs *regs) 
    9.51 +static void dump_registers(u_char key, void *dev_id, struct pt_regs *regs) 
    9.52  {
    9.53      extern void show_registers(struct pt_regs *regs); 
    9.54  
    9.55 @@ -62,13 +62,21 @@ void dump_registers(u_char key, void *de
    9.56      return; 
    9.57  }
    9.58  
    9.59 -void halt_machine(u_char key, void *dev_id, struct pt_regs *regs) 
    9.60 +static void halt_machine(u_char key, void *dev_id, struct pt_regs *regs) 
    9.61  {
    9.62      printk("'%c' pressed -> rebooting machine\n", key); 
    9.63      machine_restart(NULL); 
    9.64      return; 
    9.65  }
    9.66  
    9.67 +static void kill_dom0(u_char key, void *dev_id, struct pt_regs *regs) 
    9.68 +{
    9.69 +    printk("'%c' pressed -> gracefully rebooting machine\n", key); 
    9.70 +    kill_other_domain(0, 0);
    9.71 +    return;
    9.72 +}
    9.73 +
    9.74 +
    9.75  /* XXX SMH: this is keir's fault */
    9.76  static char *task_states[] = 
    9.77  { 
    9.78 @@ -90,16 +98,16 @@ void do_task_queues(u_char key, void *de
    9.79      p = &idle0_task;
    9.80      do {
    9.81          printk("Xen: DOM %d, CPU %d [has=%c], state = %s, "
    9.82 -           "hyp_events = %08x\n", 
    9.83 -           p->domain, p->processor, p->has_cpu ? 'T':'F', 
    9.84 -           task_states[p->state], p->hyp_events); 
    9.85 -    s = p->shared_info; 
    9.86 -    if(!is_idle_task(p)) {
    9.87 -        printk("Guest: events = %08lx, event_enable = %08lx\n", 
    9.88 -           s->events, s->events_enable); 
    9.89 -        printk("Notifying guest...\n"); 
    9.90 -        set_bit(_EVENT_DEBUG, &s->events); 
    9.91 -    }
    9.92 +	       "hyp_events = %08x\n", 
    9.93 +	       p->domain, p->processor, p->has_cpu ? 'T':'F', 
    9.94 +	       task_states[p->state], p->hyp_events); 
    9.95 +	s = p->shared_info; 
    9.96 +	if(!is_idle_task(p)) {
    9.97 +	    printk("Guest: events = %08lx, event_enable = %08lx\n", 
    9.98 +		   s->events, s->events_enable); 
    9.99 +	    printk("Notifying guest...\n"); 
   9.100 +	    set_bit(_EVENT_DEBUG, &s->events); 
   9.101 +	}
   9.102      } while ( (p = p->next_task) != &idle0_task );
   9.103  
   9.104      read_unlock_irqrestore(&tasklist_lock, flags); 
   9.105 @@ -118,16 +126,17 @@ void initialize_keytable()
   9.106  
   9.107      /* first initialize key handler table */
   9.108      for(i = 0; i < KEY_MAX; i++) 
   9.109 -    key_table[i].handler = (key_handler *)NULL; 
   9.110 -    
   9.111 +	key_table[i].handler = (key_handler *)NULL; 
   9.112 +	
   9.113      /* setup own handlers */
   9.114      add_key_handler('a', dump_timerq,    "dump ac_timer queues");
   9.115      add_key_handler('d', dump_registers, "dump registers"); 
   9.116 -    add_key_handler('h', show_handlers,  "show this message");
   9.117 +    add_key_handler('h', show_handlers, "show this message");
   9.118      add_key_handler('p', perfc_printall, "print performance counters"); 
   9.119      add_key_handler('P', perfc_reset,    "reset performance counters"); 
   9.120      add_key_handler('q', do_task_queues, "dump task queues + guest state");
   9.121 -    add_key_handler('r', dump_runq,      "dump run queue"); 
   9.122 +    add_key_handler('r', dump_runq,      "dump run queues");
   9.123 +    add_key_handler('B', kill_dom0,      "reboot machine gracefully"); 
   9.124      add_key_handler('R', halt_machine,   "reboot machine ungracefully"); 
   9.125      
   9.126      return; 
    10.1 --- a/xen/common/perfc.c	Fri Mar 14 15:48:09 2003 +0000
    10.2 +++ b/xen/common/perfc.c	Fri Mar 14 15:58:24 2003 +0000
    10.3 @@ -47,18 +47,18 @@ void __perfc_print (unsigned long counte
    10.4        return;
    10.5    }
    10.6    if (element_size == 0) {                              /* single counter */
    10.7 -      printf ("%10ld  0x%08lx  %s\n", counter[0], counter[0],
    10.8 +      printf ("%10lu  0x%08lx  %s\n", counter[0], counter[0],
    10.9                perfc_name[loop] + 2 + num);
   10.10    } else if (cpus) {                                    /* counter per CPU  */
   10.11        for (loop = 0; loop < smp_num_cpus; loop++) {
   10.12 -          printf ("%10ld  0x%08lx  cpu[%02d] %s\n", 
   10.13 +          printf ("%10lu  0x%08lx  cpu[%02d] %s\n", 
   10.14                    counter[loop], counter[loop], 
   10.15                    loop, perfc_name[loop]);
   10.16        }
   10.17        
   10.18    } else {                                             /* show entire array */
   10.19        for (loop = 0; loop < element_size; loop++) {
   10.20 -          printf ("%10ld  0x%08lx  %s:%d\n", 
   10.21 +          printf ("%10lu  0x%08lx  %s:%d\n", 
   10.22                    counter[loop], counter[loop], 
   10.23                    perfc_name[loop] + 2 + num, loop);
   10.24        }
   10.25 @@ -103,6 +103,8 @@ void perfc_printall (u_char key, void *d
   10.26          }
   10.27      }
   10.28  
   10.29 +    //perfc_reset( key, dev_id, regs );
   10.30 +
   10.31      return;
   10.32  }
   10.33  
    11.1 --- a/xen/drivers/block/xen_block.c	Fri Mar 14 15:48:09 2003 +0000
    11.2 +++ b/xen/drivers/block/xen_block.c	Fri Mar 14 15:58:24 2003 +0000
    11.3 @@ -17,10 +17,8 @@
    11.4  #include <xeno/keyhandler.h>
    11.5  #include <xeno/interrupt.h>
    11.6  #include <xeno/segment.h>
    11.7 -#include <asm/domain_page.h> /* TEST_READ_VALIDITY */
    11.8  
    11.9 -#if 1
   11.10 -#define TEST_READ_VALIDITY
   11.11 +#if 0
   11.12  #define DPRINTK(_f, _a...) printk( _f , ## _a )
   11.13  #else
   11.14  #define DPRINTK(_f, _a...) ((void)0)
   11.15 @@ -206,16 +204,6 @@ static void end_block_io_op(struct buffe
   11.16          DPRINTK("Buffer not up-to-date at end of operation\n");
   11.17          pending_req->status = 1;
   11.18      }
   11.19 -#ifdef TEST_READ_VALIDITY
   11.20 -    else if ( pending_req->operation == READ )
   11.21 -    {
   11.22 -        unsigned long *buff = map_domain_mem(virt_to_phys(bh->b_data));
   11.23 -        if ( (buff[  0] == 0xdeadbeef) &&
   11.24 -             (buff[127] == 0xdeadbeef) )
   11.25 -            printk("An unmodified buffer at sector %ld\n", bh->b_rsector);
   11.26 -        unmap_domain_mem(buff);
   11.27 -    }
   11.28 -#endif
   11.29  
   11.30      unlock_buffer(pending_req->domain, 
   11.31                    virt_to_phys(bh->b_data), 
   11.32 @@ -616,12 +604,6 @@ static void dispatch_rw_block_io(struct 
   11.33          } 
   11.34          else
   11.35          {
   11.36 -#ifdef TEST_READ_VALIDITY
   11.37 -            unsigned long *buff = map_domain_mem(phys_seg[i].buffer);
   11.38 -            buff[  0] = 0xdeadbeef;
   11.39 -            buff[127] = 0xdeadbeef;
   11.40 -            unmap_domain_mem(buff);
   11.41 -#endif
   11.42              bh->b_state = (1 << BH_Mapped) | (1 << BH_Read);
   11.43          }
   11.44  
    12.1 --- a/xen/drivers/block/xen_segment.c	Fri Mar 14 15:48:09 2003 +0000
    12.2 +++ b/xen/drivers/block/xen_segment.c	Fri Mar 14 15:58:24 2003 +0000
    12.3 @@ -101,6 +101,7 @@ void xen_segment_probe(struct task_struc
    12.4  {
    12.5      int loop, i;
    12.6      xen_disk_info_t *xdi = map_domain_mem(virt_to_phys(raw_xdi));
    12.7 +    unsigned long capacity = 0, device;
    12.8  
    12.9      for ( loop = 0; loop < XEN_MAX_SEGMENTS; loop++ )
   12.10      {
   12.11 @@ -108,13 +109,12 @@ void xen_segment_probe(struct task_struc
   12.12               (xsegments[loop].domain != p->domain) )
   12.13              continue;
   12.14  
   12.15 -        xdi->disks[xdi->count].device = 
   12.16 -            MK_VIRTUAL_XENDEV(xsegments[loop].segment_number);
   12.17 +        device = MK_VIRTUAL_XENDEV(xsegments[loop].segment_number);
   12.18          for ( i = 0; i < xsegments[loop].num_extents; i++ )
   12.19 -        {
   12.20 -            xdi->disks[xdi->count].capacity += 
   12.21 -                xsegments[loop].extents[i].size;
   12.22 -        }
   12.23 +            capacity += xsegments[loop].extents[i].size;
   12.24 +
   12.25 +        xdi->disks[xdi->count].device   = device;
   12.26 +        xdi->disks[xdi->count].capacity = capacity;
   12.27          xdi->count++;
   12.28      }
   12.29  
    13.1 --- a/xen/drivers/char/xen_kbd.c	Fri Mar 14 15:48:09 2003 +0000
    13.2 +++ b/xen/drivers/char/xen_kbd.c	Fri Mar 14 15:58:24 2003 +0000
    13.3 @@ -1,4 +1,5 @@
    13.4  #include <asm-i386/io.h>
    13.5 +#include <asm-i386/irq.h>
    13.6  #include <xeno/sched.h>    /* this has request_irq() proto for some reason */
    13.7  #include <xeno/keyhandler.h>  
    13.8  
    13.9 @@ -183,7 +184,7 @@ static void keyboard_interrupt(int irq, 
   13.10  
   13.11  void initialize_keyboard()
   13.12  {
   13.13 -    if(request_irq(KEYBOARD_IRQ, keyboard_interrupt, 0, "keyboard", NULL))
   13.14 +    if(request_irq(KEYBOARD_IRQ, keyboard_interrupt, SA_NOPROFILE, "keyboard", NULL))
   13.15  	printk("initialize_keyboard: failed to alloc IRQ %d\n", KEYBOARD_IRQ); 
   13.16  
   13.17      return; 
    14.1 --- a/xen/drivers/char/xen_serial.c	Fri Mar 14 15:48:09 2003 +0000
    14.2 +++ b/xen/drivers/char/xen_serial.c	Fri Mar 14 15:58:24 2003 +0000
    14.3 @@ -85,6 +85,6 @@ void initialize_serial()
    14.4      outb(NS16550_MCR_OUT2, SERIAL_BASE + NS16550_MCR);   /* Modem control */
    14.5      outb(NS16550_IER_ERDAI, SERIAL_BASE + NS16550_IER ); /* Setup interrupts */
    14.6  
    14.7 -    if((rc = request_irq(4, serial_rx_int, 0, "serial", 0)))
    14.8 +    if((rc = request_irq(4, serial_rx_int, SA_NOPROFILE, "serial", 0)))
    14.9  	printk("initialize_serial: failed to get IRQ4, rc=%d\n", rc); 
   14.10  }
    15.1 --- a/xen/drivers/ide/ide-xeno.c	Fri Mar 14 15:48:09 2003 +0000
    15.2 +++ b/xen/drivers/ide/ide-xeno.c	Fri Mar 14 15:58:24 2003 +0000
    15.3 @@ -12,7 +12,7 @@ void ide_probe_devices(xen_disk_info_t* 
    15.4      int loop;
    15.5      unsigned int unit;
    15.6      xen_disk_info_t *xen_xdi = map_domain_mem(virt_to_phys(xdi));
    15.7 -    unsigned long capacity;
    15.8 +    unsigned long capacity, device;
    15.9      ide_drive_t *drive;
   15.10      
   15.11      for ( loop = 0; loop < MAX_HWIFS; loop++ )
   15.12 @@ -25,9 +25,10 @@ void ide_probe_devices(xen_disk_info_t* 
   15.13              drive = &hwif->drives[unit];
   15.14              if ( !drive->present ) continue;
   15.15              
   15.16 +            device   = MK_IDE_XENDEV((loop * MAX_DRIVES) + unit);
   15.17              capacity = current_capacity(drive);
   15.18 -            xen_xdi->disks[xen_xdi->count].device =
   15.19 -                MK_IDE_XENDEV((loop * MAX_DRIVES) + unit);
   15.20 +
   15.21 +            xen_xdi->disks[xen_xdi->count].device   = device;
   15.22              xen_xdi->disks[xen_xdi->count].capacity = capacity;
   15.23              xen_xdi->count++;
   15.24  
    16.1 --- a/xen/drivers/net/tg3.c	Fri Mar 14 15:48:09 2003 +0000
    16.2 +++ b/xen/drivers/net/tg3.c	Fri Mar 14 15:58:24 2003 +0000
    16.3 @@ -2099,6 +2099,12 @@ static void tg3_interrupt(int irq, void 
    16.4  	{
    16.5  	  int budget = 1000;
    16.6  	  tg3_poll( dev, &budget );
    16.7 +
    16.8 +	  tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW,
    16.9 +		       0x00000000);
   16.10 +	  tr32(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW);
   16.11 +
   16.12 +
   16.13  	}
   16.14  #endif
   16.15  
    17.1 --- a/xen/drivers/scsi/scsi.c	Fri Mar 14 15:48:09 2003 +0000
    17.2 +++ b/xen/drivers/scsi/scsi.c	Fri Mar 14 15:58:24 2003 +0000
    17.3 @@ -855,6 +855,7 @@ void scsi_wait_req (Scsi_Request * SRpnt
    17.4              *(int *)(SRpnt->sr_request.waiting) = 0; 
    17.5          } 
    17.6      }
    17.7 +printk("*");
    17.8  #endif
    17.9  
   17.10  
    18.1 --- a/xen/drivers/scsi/sd.c	Fri Mar 14 15:48:09 2003 +0000
    18.2 +++ b/xen/drivers/scsi/sd.c	Fri Mar 14 15:58:24 2003 +0000
    18.3 @@ -1320,17 +1320,21 @@ void scsi_probe_devices(xen_disk_info_t 
    18.4      Scsi_Disk *sd; 
    18.5      int i;
    18.6      xen_disk_info_t *xen_xdi = map_domain_mem(virt_to_phys(xdi));
    18.7 +    unsigned long capacity, device;
    18.8  
    18.9      for ( sd = rscsi_disks, i = 0; i < sd_template.dev_max; i++, sd++ )
   18.10      {
   18.11          if ( sd->device == NULL ) continue;
   18.12  
   18.13 -        xen_xdi->disks[xen_xdi->count].device   = MK_SCSI_XENDEV(i);
   18.14 -        xen_xdi->disks[xen_xdi->count].capacity = sd->capacity; 
   18.15 +        device   = MK_SCSI_XENDEV(i);
   18.16 +        capacity = sd->capacity;
   18.17 +
   18.18 +        xen_xdi->disks[xen_xdi->count].device   = device;
   18.19 +        xen_xdi->disks[xen_xdi->count].capacity = capacity; 
   18.20          xen_xdi->count++; 
   18.21                  
   18.22          printk("Disk %d: SCSI-XENO capacity %dkB (%dMB)\n",
   18.23 -               xen_xdi->count, sd->capacity>>1, sd->capacity>>11);
   18.24 +               xen_xdi->count, capacity>>1, capacity>>11);
   18.25      }
   18.26  
   18.27      unmap_domain_mem(xen_xdi);
    19.1 --- a/xen/include/asm-i386/irq.h	Fri Mar 14 15:48:09 2003 +0000
    19.2 +++ b/xen/include/asm-i386/irq.h	Fri Mar 14 15:58:24 2003 +0000
    19.3 @@ -8,6 +8,7 @@
    19.4  
    19.5  #define SA_INTERRUPT    0x20000000
    19.6  #define SA_SHIRQ        0x04000000
    19.7 +#define SA_NOPROFILE	0x02000000
    19.8  
    19.9  #define SA_SAMPLE_RANDOM  0   /* Linux driver compatibility */
   19.10  
    20.1 --- a/xen/include/asm-i386/pci.h	Fri Mar 14 15:48:09 2003 +0000
    20.2 +++ b/xen/include/asm-i386/pci.h	Fri Mar 14 15:58:24 2003 +0000
    20.3 @@ -151,17 +151,17 @@ static inline int pci_map_sg(struct pci_
    20.4   	for (i = 0; i < nents; i++ ) {
    20.5   		if (sg[i].address && sg[i].page)
    20.6   			out_of_line_bug();
    20.7 -
    20.8 -		/* not worth checking since NULL is ok says SMH */
    20.9  #if 0
   20.10 - 		else if (!sg[i].address && !sg[i].page)
   20.11 +		/* Invalid check, since address==0 is valid. */
   20.12 +		else if (!sg[i].address && !sg[i].page)
   20.13   			out_of_line_bug();
   20.14  #endif
   20.15   
   20.16 - 		if (sg[i].address)
   20.17 +		/* XXX Switched round, since address==0 is valid. */
   20.18 + 		if (sg[i].page)
   20.19 + 			sg[i].dma_address = page_to_bus(sg[i].page) + sg[i].offset;
   20.20 + 		else
   20.21   			sg[i].dma_address = virt_to_bus(sg[i].address);
   20.22 - 		else
   20.23 - 			sg[i].dma_address = page_to_bus(sg[i].page) + sg[i].offset;
   20.24   	}
   20.25   
   20.26  	flush_write_buffers();
    21.1 --- a/xen/include/asm-i386/smpboot.h	Fri Mar 14 15:48:09 2003 +0000
    21.2 +++ b/xen/include/asm-i386/smpboot.h	Fri Mar 14 15:58:24 2003 +0000
    21.3 @@ -116,6 +116,15 @@ static inline int target_cpus(void)
    21.4  	return cpu_online_map;
    21.5  }
    21.6  #else
    21.7 -#define target_cpus() (0x01)
    21.8 +/* KAF Xen: Round-robin allocate IRQs to CPUs. */
    21.9 +static inline int target_cpus(void)
   21.10 +{
   21.11 +    static unsigned int cpu_field = 1;
   21.12 +    do { 
   21.13 +        cpu_field <<= 1; 
   21.14 +        if ( cpu_field == 0x100 ) cpu_field = 1; /* logical field == 8 bits */ 
   21.15 +    } while ( (cpu_field & cpu_online_map) == 0 );
   21.16 +    return cpu_field;
   21.17 +}
   21.18  #endif
   21.19  #endif
    22.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_block.c	Fri Mar 14 15:48:09 2003 +0000
    22.2 +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_block.c	Fri Mar 14 15:58:24 2003 +0000
    22.3 @@ -522,8 +522,8 @@ int __init xlblk_init(void)
    22.4      blk_ring = (blk_ring_t *)fix_to_virt(FIX_BLKRING_BASE);
    22.5      blk_ring->req_prod = blk_ring->resp_prod = resp_cons = req_prod = 0;
    22.6      
    22.7 -    error = request_irq(XLBLK_RESPONSE_IRQ, xlblk_response_int, 0, 
    22.8 -			"xlblk-response", NULL);
    22.9 +    error = request_irq(XLBLK_RESPONSE_IRQ, xlblk_response_int, 
   22.10 +                        SA_SAMPLE_RANDOM, "xlblk-response", NULL);
   22.11      if ( error )
   22.12      {
   22.13  	printk(KERN_ALERT "Could not allocate receive interrupt\n");
    23.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_ide.c	Fri Mar 14 15:48:09 2003 +0000
    23.2 +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_ide.c	Fri Mar 14 15:58:24 2003 +0000
    23.3 @@ -18,7 +18,7 @@ static int xlide_blksize_size[XLIDE_MAX]
    23.4  static int xlide_hardsect_size[XLIDE_MAX];
    23.5  static int xlide_max_sectors[XLIDE_MAX];
    23.6  
    23.7 -struct gendisk *xlide_gendisk;
    23.8 +struct gendisk *xlide_gendisk = NULL;
    23.9  
   23.10  static struct block_device_operations xlide_block_fops = 
   23.11  {
   23.12 @@ -41,6 +41,13 @@ int xlide_init(xen_disk_info_t *xdi)
   23.13      int i, result, units, minors, disk;
   23.14      struct gendisk *gd;
   23.15  
   23.16 +    /* If we don't have any usable IDE devices we may as well bail now. */
   23.17 +    units = 0;
   23.18 +    for ( i = 0; i < xdi->count; i++ )
   23.19 +        if ( IS_IDE_XENDEV(xdi->disks[i].device) &&
   23.20 +             ((xdi->disks[i].device & XENDEV_IDX_MASK) < 16) ) units++;
   23.21 +    if ( units == 0 ) return 0;
   23.22 +
   23.23      SET_MODULE_OWNER(&xlide_block_fops);
   23.24  
   23.25      result = register_blkdev(XLIDE_MAJOR, XLIDE_MAJOR_NAME, 
   23.26 @@ -73,13 +80,6 @@ int xlide_init(xen_disk_info_t *xdi)
   23.27       */
   23.28      blk_queue_headactive(BLK_DEFAULT_QUEUE(XLIDE_MAJOR), 0);
   23.29  
   23.30 -    /* If we don't have any usable IDE devices we may as well bail now. */
   23.31 -    units = 0;
   23.32 -    for ( i = 0; i < xdi->count; i++ )
   23.33 -        if ( IS_IDE_XENDEV(xdi->disks[i].device) &&
   23.34 -             ((xdi->disks[i].device & XENDEV_IDX_MASK) < 16) ) units++;
   23.35 -    if ( units == 0 ) return 0;
   23.36 -
   23.37      /* We may register up to 16 devices in a sparse identifier space. */
   23.38      units = 16;
   23.39  
   23.40 @@ -133,6 +133,8 @@ int xlide_init(xen_disk_info_t *xdi)
   23.41  
   23.42  void xlide_cleanup(void)
   23.43  {
   23.44 +    if ( xlide_gendisk == NULL ) return;
   23.45 +
   23.46      blk_cleanup_queue(BLK_DEFAULT_QUEUE(XLIDE_MAJOR));
   23.47  
   23.48      xlide_gendisk = NULL;
    24.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_scsi.c	Fri Mar 14 15:48:09 2003 +0000
    24.2 +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_scsi.c	Fri Mar 14 15:58:24 2003 +0000
    24.3 @@ -42,6 +42,13 @@ int xlscsi_init(xen_disk_info_t *xdi)
    24.4      int i, result, units, minors, disk;
    24.5      struct gendisk *gd;
    24.6  
    24.7 +    /* If we don't have any usable SCSI devices we may as well bail now. */
    24.8 +    units = 0;
    24.9 +    for ( i = 0; i < xdi->count; i++ )
   24.10 +        if ( IS_SCSI_XENDEV(xdi->disks[i].device) &&
   24.11 +             ((xdi->disks[i].device & XENDEV_IDX_MASK) < 16) ) units++;
   24.12 +    if ( units == 0 ) return 0;
   24.13 +
   24.14      SET_MODULE_OWNER(&xlscsi_block_fops);
   24.15  
   24.16      result = register_blkdev(XLSCSI_MAJOR, XLSCSI_MAJOR_NAME, 
   24.17 @@ -55,16 +62,16 @@ int xlscsi_init(xen_disk_info_t *xdi)
   24.18      /* Initialize global arrays. */
   24.19      for ( i = 0; i < XLSCSI_MAX; i++ )
   24.20      {
   24.21 -	xlscsi_blksize_size[i]  = 512;
   24.22 +	xlscsi_blksize_size[i]  = 1024; //XXX 512;
   24.23  	xlscsi_hardsect_size[i] = 512;
   24.24 -	xlscsi_max_sectors[i]   = 128;
   24.25 +	xlscsi_max_sectors[i]   = 128*8; //XXX 128
   24.26      }
   24.27  
   24.28      blk_size[XLSCSI_MAJOR]      = NULL;
   24.29      blksize_size[XLSCSI_MAJOR]  = xlscsi_blksize_size;
   24.30      hardsect_size[XLSCSI_MAJOR] = xlscsi_hardsect_size;
   24.31      max_sectors[XLSCSI_MAJOR]   = xlscsi_max_sectors;
   24.32 -    read_ahead[XLSCSI_MAJOR]    = 8;
   24.33 +    read_ahead[XLSCSI_MAJOR]    = NULL; //XXX8;
   24.34  
   24.35      blk_init_queue(BLK_DEFAULT_QUEUE(XLSCSI_MAJOR), do_xlblk_request);
   24.36  
   24.37 @@ -74,13 +81,6 @@ int xlscsi_init(xen_disk_info_t *xdi)
   24.38       */
   24.39      blk_queue_headactive(BLK_DEFAULT_QUEUE(XLSCSI_MAJOR), 0);
   24.40  
   24.41 -    /* If we don't have any usable SCSI devices we may as well bail now. */
   24.42 -    units = 0;
   24.43 -    for ( i = 0; i < xdi->count; i++ )
   24.44 -        if ( IS_SCSI_XENDEV(xdi->disks[i].device) &&
   24.45 -             ((xdi->disks[i].device & XENDEV_IDX_MASK) < 16) ) units++;
   24.46 -    if ( units == 0 ) return 0;
   24.47 -
   24.48      /* We may register up to 16 devices in a sparse identifier space. */
   24.49      units = 16;
   24.50  
   24.51 @@ -134,6 +134,8 @@ int xlscsi_init(xen_disk_info_t *xdi)
   24.52  
   24.53  void xlscsi_cleanup(void)
   24.54  {
   24.55 +    if ( xlscsi_gendisk == NULL ) return;
   24.56 +
   24.57      blk_cleanup_queue(BLK_DEFAULT_QUEUE(XLSCSI_MAJOR));
   24.58  
   24.59      xlscsi_gendisk = NULL;
    25.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_segment.c	Fri Mar 14 15:48:09 2003 +0000
    25.2 +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_segment.c	Fri Mar 14 15:58:24 2003 +0000
    25.3 @@ -21,7 +21,7 @@ static int xlseg_blksize_size[XLVIRT_MAX
    25.4  static int xlseg_hardsect_size[XLVIRT_MAX];
    25.5  static int xlseg_max_sectors[XLVIRT_MAX];
    25.6  
    25.7 -struct gendisk *xlsegment_gendisk;
    25.8 +struct gendisk *xlsegment_gendisk = NULL;
    25.9  
   25.10  static xen_disk_info_t xlseg_disk_info;
   25.11  
   25.12 @@ -148,6 +148,8 @@ int __init xlseg_init(void)
   25.13  
   25.14  static void __exit xlseg_cleanup(void)
   25.15  {
   25.16 +    if ( xlsegment_gendisk == NULL ) return;
   25.17 +
   25.18      blk_cleanup_queue(BLK_DEFAULT_QUEUE(XLVIRT_MAJOR));
   25.19  
   25.20      xlsegment_gendisk = NULL;
    26.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/network/network.c	Fri Mar 14 15:48:09 2003 +0000
    26.2 +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/network/network.c	Fri Mar 14 15:58:24 2003 +0000
    26.3 @@ -116,8 +116,8 @@ static int network_open(struct net_devic
    26.4  
    26.5      network_alloc_rx_buffers(dev);
    26.6  
    26.7 -    error = request_irq(NET_RX_IRQ, network_rx_int, 0, 
    26.8 -                        "net-rx", dev);
    26.9 +    error = request_irq(NET_RX_IRQ, network_rx_int, 
   26.10 +                        SA_SAMPLE_RANDOM, "net-rx", dev);
   26.11      if ( error )
   26.12      {
   26.13          printk(KERN_WARNING "%s: Could not allocate receive interrupt\n",
   26.14 @@ -126,8 +126,8 @@ static int network_open(struct net_devic
   26.15          goto fail;
   26.16      }
   26.17  
   26.18 -    error = request_irq(NET_TX_IRQ, network_tx_int, 0, 
   26.19 -                        "net-tx", dev);
   26.20 +    error = request_irq(NET_TX_IRQ, network_tx_int, 
   26.21 +                        SA_SAMPLE_RANDOM, "net-tx", dev);
   26.22      if ( error )
   26.23      {
   26.24          printk(KERN_WARNING "%s: Could not allocate transmit interrupt\n",
    27.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/init_task.c	Fri Mar 14 15:48:09 2003 +0000
    27.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.3 @@ -1,33 +0,0 @@
    27.4 -#include <linux/mm.h>
    27.5 -#include <linux/sched.h>
    27.6 -#include <linux/init.h>
    27.7 -
    27.8 -#include <asm/uaccess.h>
    27.9 -#include <asm/pgtable.h>
   27.10 -#include <asm/desc.h>
   27.11 -
   27.12 -static struct fs_struct init_fs = INIT_FS;
   27.13 -static struct files_struct init_files = INIT_FILES;
   27.14 -static struct signal_struct init_signals = INIT_SIGNALS;
   27.15 -struct mm_struct init_mm = INIT_MM(init_mm);
   27.16 -
   27.17 -/*
   27.18 - * Initial task structure.
   27.19 - *
   27.20 - * We need to make sure that this is 8192-byte aligned due to the
   27.21 - * way process stacks are handled. This is done by having a special
   27.22 - * "init_task" linker map entry..
   27.23 - */
   27.24 -union task_union init_task_union 
   27.25 -	__attribute__((__section__(".data.init_task"))) =
   27.26 -		{ INIT_TASK(init_task_union.task) };
   27.27 -
   27.28 -/*
   27.29 - * per-CPU TSS segments. Threads are completely 'soft' on Linux,
   27.30 - * no more per-task TSS's. The TSS size is kept cacheline-aligned
   27.31 - * so they are allowed to end up in the .data.cacheline_aligned
   27.32 - * section. Since TSS's are completely CPU-local, we want them
   27.33 - * on exact cacheline boundaries, to eliminate cacheline ping-pong.
   27.34 - */ 
   27.35 -struct tss_struct init_tss[NR_CPUS] __cacheline_aligned = { [0 ... NR_CPUS-1] = INIT_TSS };
   27.36 -
    28.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/ptrace.c	Fri Mar 14 15:48:09 2003 +0000
    28.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.3 @@ -1,454 +0,0 @@
    28.4 -/* ptrace.c */
    28.5 -/* By Ross Biro 1/23/92 */
    28.6 -/*
    28.7 - * Pentium III FXSR, SSE support
    28.8 - *	Gareth Hughes <gareth@valinux.com>, May 2000
    28.9 - */
   28.10 -
   28.11 -#include <linux/kernel.h>
   28.12 -#include <linux/sched.h>
   28.13 -#include <linux/mm.h>
   28.14 -#include <linux/smp.h>
   28.15 -#include <linux/smp_lock.h>
   28.16 -#include <linux/errno.h>
   28.17 -#include <linux/ptrace.h>
   28.18 -#include <linux/user.h>
   28.19 -
   28.20 -#include <asm/uaccess.h>
   28.21 -#include <asm/pgtable.h>
   28.22 -#include <asm/system.h>
   28.23 -#include <asm/processor.h>
   28.24 -#include <asm/i387.h>
   28.25 -#include <asm/debugreg.h>
   28.26 -
   28.27 -/*
   28.28 - * does not yet catch signals sent when the child dies.
   28.29 - * in exit.c or in signal.c.
   28.30 - */
   28.31 -
   28.32 -/* determines which flags the user has access to. */
   28.33 -/* 1 = access 0 = no access */
   28.34 -#define FLAG_MASK 0x00044dd5
   28.35 -
   28.36 -/* set's the trap flag. */
   28.37 -#define TRAP_FLAG 0x100
   28.38 -
   28.39 -/*
   28.40 - * Offset of eflags on child stack..
   28.41 - */
   28.42 -#define EFL_OFFSET ((EFL-2)*4-sizeof(struct pt_regs))
   28.43 -
   28.44 -/*
   28.45 - * this routine will get a word off of the processes privileged stack. 
   28.46 - * the offset is how far from the base addr as stored in the TSS.  
   28.47 - * this routine assumes that all the privileged stacks are in our
   28.48 - * data space.
   28.49 - */   
   28.50 -static inline int get_stack_long(struct task_struct *task, int offset)
   28.51 -{
   28.52 -	unsigned char *stack;
   28.53 -
   28.54 -	stack = (unsigned char *)task->thread.esp0;
   28.55 -	stack += offset;
   28.56 -	return (*((int *)stack));
   28.57 -}
   28.58 -
   28.59 -/*
   28.60 - * this routine will put a word on the processes privileged stack. 
   28.61 - * the offset is how far from the base addr as stored in the TSS.  
   28.62 - * this routine assumes that all the privileged stacks are in our
   28.63 - * data space.
   28.64 - */
   28.65 -static inline int put_stack_long(struct task_struct *task, int offset,
   28.66 -	unsigned long data)
   28.67 -{
   28.68 -	unsigned char * stack;
   28.69 -
   28.70 -	stack = (unsigned char *) task->thread.esp0;
   28.71 -	stack += offset;
   28.72 -	*(unsigned long *) stack = data;
   28.73 -	return 0;
   28.74 -}
   28.75 -
   28.76 -static int putreg(struct task_struct *child,
   28.77 -	unsigned long regno, unsigned long value)
   28.78 -{
   28.79 -	switch (regno >> 2) {
   28.80 -		case FS:
   28.81 -			if (value && (value & 3) != 3)
   28.82 -				return -EIO;
   28.83 -			child->thread.fs = value;
   28.84 -			return 0;
   28.85 -		case GS:
   28.86 -			if (value && (value & 3) != 3)
   28.87 -				return -EIO;
   28.88 -			child->thread.gs = value;
   28.89 -			return 0;
   28.90 -		case DS:
   28.91 -		case ES:
   28.92 -			if (value && (value & 3) != 3)
   28.93 -				return -EIO;
   28.94 -			value &= 0xffff;
   28.95 -			break;
   28.96 -		case SS:
   28.97 -		case CS:
   28.98 -			if ((value & 3) != 3)
   28.99 -				return -EIO;
  28.100 -			value &= 0xffff;
  28.101 -			break;
  28.102 -		case EFL:
  28.103 -			value &= FLAG_MASK;
  28.104 -			value |= get_stack_long(child, EFL_OFFSET) & ~FLAG_MASK;
  28.105 -			break;
  28.106 -	}
  28.107 -	if (regno > GS*4)
  28.108 -		regno -= 2*4;
  28.109 -	put_stack_long(child, regno - sizeof(struct pt_regs), value);
  28.110 -	return 0;
  28.111 -}
  28.112 -
  28.113 -static unsigned long getreg(struct task_struct *child,
  28.114 -	unsigned long regno)
  28.115 -{
  28.116 -	unsigned long retval = ~0UL;
  28.117 -
  28.118 -	switch (regno >> 2) {
  28.119 -		case FS:
  28.120 -			retval = child->thread.fs;
  28.121 -			break;
  28.122 -		case GS:
  28.123 -			retval = child->thread.gs;
  28.124 -			break;
  28.125 -		case DS:
  28.126 -		case ES:
  28.127 -		case SS:
  28.128 -		case CS:
  28.129 -			retval = 0xffff;
  28.130 -			/* fall through */
  28.131 -		default:
  28.132 -			if (regno > GS*4)
  28.133 -				regno -= 2*4;
  28.134 -			regno = regno - sizeof(struct pt_regs);
  28.135 -			retval &= get_stack_long(child, regno);
  28.136 -	}
  28.137 -	return retval;
  28.138 -}
  28.139 -
  28.140 -/*
  28.141 - * Called by kernel/ptrace.c when detaching..
  28.142 - *
  28.143 - * Make sure the single step bit is not set.
  28.144 - */
  28.145 -void ptrace_disable(struct task_struct *child)
  28.146 -{ 
  28.147 -	long tmp;
  28.148 -
  28.149 -	tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG;
  28.150 -	put_stack_long(child, EFL_OFFSET, tmp);
  28.151 -}
  28.152 -
  28.153 -asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
  28.154 -{
  28.155 -	struct task_struct *child;
  28.156 -	struct user * dummy = NULL;
  28.157 -	int i, ret;
  28.158 -
  28.159 -	lock_kernel();
  28.160 -	ret = -EPERM;
  28.161 -	if (request == PTRACE_TRACEME) {
  28.162 -		/* are we already being traced? */
  28.163 -		if (current->ptrace & PT_PTRACED)
  28.164 -			goto out;
  28.165 -		/* set the ptrace bit in the process flags. */
  28.166 -		current->ptrace |= PT_PTRACED;
  28.167 -		ret = 0;
  28.168 -		goto out;
  28.169 -	}
  28.170 -	ret = -ESRCH;
  28.171 -	read_lock(&tasklist_lock);
  28.172 -	child = find_task_by_pid(pid);
  28.173 -	if (child)
  28.174 -		get_task_struct(child);
  28.175 -	read_unlock(&tasklist_lock);
  28.176 -	if (!child)
  28.177 -		goto out;
  28.178 -
  28.179 -	ret = -EPERM;
  28.180 -	if (pid == 1)		/* you may not mess with init */
  28.181 -		goto out_tsk;
  28.182 -
  28.183 -	if (request == PTRACE_ATTACH) {
  28.184 -		ret = ptrace_attach(child);
  28.185 -		goto out_tsk;
  28.186 -	}
  28.187 -
  28.188 -	ret = ptrace_check_attach(child, request == PTRACE_KILL);
  28.189 -	if (ret < 0)
  28.190 -		goto out_tsk;
  28.191 -
  28.192 -	switch (request) {
  28.193 -	/* when I and D space are separate, these will need to be fixed. */
  28.194 -	case PTRACE_PEEKTEXT: /* read word at location addr. */ 
  28.195 -	case PTRACE_PEEKDATA: {
  28.196 -		unsigned long tmp;
  28.197 -		int copied;
  28.198 -
  28.199 -		copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0);
  28.200 -		ret = -EIO;
  28.201 -		if (copied != sizeof(tmp))
  28.202 -			break;
  28.203 -		ret = put_user(tmp,(unsigned long *) data);
  28.204 -		break;
  28.205 -	}
  28.206 -
  28.207 -	/* read the word at location addr in the USER area. */
  28.208 -	case PTRACE_PEEKUSR: {
  28.209 -		unsigned long tmp;
  28.210 -
  28.211 -		ret = -EIO;
  28.212 -		if ((addr & 3) || addr < 0 || 
  28.213 -		    addr > sizeof(struct user) - 3)
  28.214 -			break;
  28.215 -
  28.216 -		tmp = 0;  /* Default return condition */
  28.217 -		if(addr < FRAME_SIZE*sizeof(long))
  28.218 -			tmp = getreg(child, addr);
  28.219 -		if(addr >= (long) &dummy->u_debugreg[0] &&
  28.220 -		   addr <= (long) &dummy->u_debugreg[7]){
  28.221 -			addr -= (long) &dummy->u_debugreg[0];
  28.222 -			addr = addr >> 2;
  28.223 -			tmp = child->thread.debugreg[addr];
  28.224 -		}
  28.225 -		ret = put_user(tmp,(unsigned long *) data);
  28.226 -		break;
  28.227 -	}
  28.228 -
  28.229 -	/* when I and D space are separate, this will have to be fixed. */
  28.230 -	case PTRACE_POKETEXT: /* write the word at location addr. */
  28.231 -	case PTRACE_POKEDATA:
  28.232 -		ret = 0;
  28.233 -		if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data))
  28.234 -			break;
  28.235 -		ret = -EIO;
  28.236 -		break;
  28.237 -
  28.238 -	case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
  28.239 -		ret = -EIO;
  28.240 -		if ((addr & 3) || addr < 0 || 
  28.241 -		    addr > sizeof(struct user) - 3)
  28.242 -			break;
  28.243 -
  28.244 -		if (addr < FRAME_SIZE*sizeof(long)) {
  28.245 -			ret = putreg(child, addr, data);
  28.246 -			break;
  28.247 -		}
  28.248 -		/* We need to be very careful here.  We implicitly
  28.249 -		   want to modify a portion of the task_struct, and we
  28.250 -		   have to be selective about what portions we allow someone
  28.251 -		   to modify. */
  28.252 -
  28.253 -		  ret = -EIO;
  28.254 -		  if(addr >= (long) &dummy->u_debugreg[0] &&
  28.255 -		     addr <= (long) &dummy->u_debugreg[7]){
  28.256 -
  28.257 -			  if(addr == (long) &dummy->u_debugreg[4]) break;
  28.258 -			  if(addr == (long) &dummy->u_debugreg[5]) break;
  28.259 -			  if(addr < (long) &dummy->u_debugreg[4] &&
  28.260 -			     ((unsigned long) data) >= TASK_SIZE-3) break;
  28.261 -			  
  28.262 -			  if(addr == (long) &dummy->u_debugreg[7]) {
  28.263 -				  data &= ~DR_CONTROL_RESERVED;
  28.264 -				  for(i=0; i<4; i++)
  28.265 -					  if ((0x5f54 >> ((data >> (16 + 4*i)) & 0xf)) & 1)
  28.266 -						  goto out_tsk;
  28.267 -			  }
  28.268 -
  28.269 -			  addr -= (long) &dummy->u_debugreg;
  28.270 -			  addr = addr >> 2;
  28.271 -			  child->thread.debugreg[addr] = data;
  28.272 -			  ret = 0;
  28.273 -		  }
  28.274 -		  break;
  28.275 -
  28.276 -	case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
  28.277 -	case PTRACE_CONT: { /* restart after signal. */
  28.278 -		long tmp;
  28.279 -
  28.280 -		ret = -EIO;
  28.281 -		if ((unsigned long) data > _NSIG)
  28.282 -			break;
  28.283 -		if (request == PTRACE_SYSCALL)
  28.284 -			child->ptrace |= PT_TRACESYS;
  28.285 -		else
  28.286 -			child->ptrace &= ~PT_TRACESYS;
  28.287 -		child->exit_code = data;
  28.288 -	/* make sure the single step bit is not set. */
  28.289 -		tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG;
  28.290 -		put_stack_long(child, EFL_OFFSET,tmp);
  28.291 -		wake_up_process(child);
  28.292 -		ret = 0;
  28.293 -		break;
  28.294 -	}
  28.295 -
  28.296 -/*
  28.297 - * make the child exit.  Best I can do is send it a sigkill. 
  28.298 - * perhaps it should be put in the status that it wants to 
  28.299 - * exit.
  28.300 - */
  28.301 -	case PTRACE_KILL: {
  28.302 -		long tmp;
  28.303 -
  28.304 -		ret = 0;
  28.305 -		if (child->state == TASK_ZOMBIE)	/* already dead */
  28.306 -			break;
  28.307 -		child->exit_code = SIGKILL;
  28.308 -		/* make sure the single step bit is not set. */
  28.309 -		tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG;
  28.310 -		put_stack_long(child, EFL_OFFSET, tmp);
  28.311 -		wake_up_process(child);
  28.312 -		break;
  28.313 -	}
  28.314 -
  28.315 -	case PTRACE_SINGLESTEP: {  /* set the trap flag. */
  28.316 -		long tmp;
  28.317 -
  28.318 -		ret = -EIO;
  28.319 -		if ((unsigned long) data > _NSIG)
  28.320 -			break;
  28.321 -		child->ptrace &= ~PT_TRACESYS;
  28.322 -		if ((child->ptrace & PT_DTRACE) == 0) {
  28.323 -			/* Spurious delayed TF traps may occur */
  28.324 -			child->ptrace |= PT_DTRACE;
  28.325 -		}
  28.326 -		tmp = get_stack_long(child, EFL_OFFSET) | TRAP_FLAG;
  28.327 -		put_stack_long(child, EFL_OFFSET, tmp);
  28.328 -		child->exit_code = data;
  28.329 -		/* give it a chance to run. */
  28.330 -		wake_up_process(child);
  28.331 -		ret = 0;
  28.332 -		break;
  28.333 -	}
  28.334 -
  28.335 -	case PTRACE_DETACH:
  28.336 -		/* detach a process that was attached. */
  28.337 -		ret = ptrace_detach(child, data);
  28.338 -		break;
  28.339 -
  28.340 -	case PTRACE_GETREGS: { /* Get all gp regs from the child. */
  28.341 -	  	if (!access_ok(VERIFY_WRITE, (unsigned *)data, FRAME_SIZE*sizeof(long))) {
  28.342 -			ret = -EIO;
  28.343 -			break;
  28.344 -		}
  28.345 -		for ( i = 0; i < FRAME_SIZE*sizeof(long); i += sizeof(long) ) {
  28.346 -			__put_user(getreg(child, i),(unsigned long *) data);
  28.347 -			data += sizeof(long);
  28.348 -		}
  28.349 -		ret = 0;
  28.350 -		break;
  28.351 -	}
  28.352 -
  28.353 -	case PTRACE_SETREGS: { /* Set all gp regs in the child. */
  28.354 -		unsigned long tmp;
  28.355 -	  	if (!access_ok(VERIFY_READ, (unsigned *)data, FRAME_SIZE*sizeof(long))) {
  28.356 -			ret = -EIO;
  28.357 -			break;
  28.358 -		}
  28.359 -		for ( i = 0; i < FRAME_SIZE*sizeof(long); i += sizeof(long) ) {
  28.360 -			__get_user(tmp, (unsigned long *) data);
  28.361 -			putreg(child, i, tmp);
  28.362 -			data += sizeof(long);
  28.363 -		}
  28.364 -		ret = 0;
  28.365 -		break;
  28.366 -	}
  28.367 -
  28.368 -	case PTRACE_GETFPREGS: { /* Get the child FPU state. */
  28.369 -		if (!access_ok(VERIFY_WRITE, (unsigned *)data,
  28.370 -			       sizeof(struct user_i387_struct))) {
  28.371 -			ret = -EIO;
  28.372 -			break;
  28.373 -		}
  28.374 -		ret = 0;
  28.375 -		if ( !child->used_math )
  28.376 -			load_empty_fpu(child);
  28.377 -		get_fpregs((struct user_i387_struct *)data, child);
  28.378 -		break;
  28.379 -	}
  28.380 -
  28.381 -	case PTRACE_SETFPREGS: { /* Set the child FPU state. */
  28.382 -		if (!access_ok(VERIFY_READ, (unsigned *)data,
  28.383 -			       sizeof(struct user_i387_struct))) {
  28.384 -			ret = -EIO;
  28.385 -			break;
  28.386 -		}
  28.387 -		child->used_math = 1;
  28.388 -		set_fpregs(child, (struct user_i387_struct *)data);
  28.389 -		ret = 0;
  28.390 -		break;
  28.391 -	}
  28.392 -
  28.393 -	case PTRACE_GETFPXREGS: { /* Get the child extended FPU state. */
  28.394 -		if (!access_ok(VERIFY_WRITE, (unsigned *)data,
  28.395 -			       sizeof(struct user_fxsr_struct))) {
  28.396 -			ret = -EIO;
  28.397 -			break;
  28.398 -		}
  28.399 -		if ( !child->used_math )
  28.400 -			load_empty_fpu(child);
  28.401 -		ret = get_fpxregs((struct user_fxsr_struct *)data, child);
  28.402 -		break;
  28.403 -	}
  28.404 -
  28.405 -	case PTRACE_SETFPXREGS: { /* Set the child extended FPU state. */
  28.406 -		if (!access_ok(VERIFY_READ, (unsigned *)data,
  28.407 -			       sizeof(struct user_fxsr_struct))) {
  28.408 -			ret = -EIO;
  28.409 -			break;
  28.410 -		}
  28.411 -		child->used_math = 1;
  28.412 -		ret = set_fpxregs(child, (struct user_fxsr_struct *)data);
  28.413 -		break;
  28.414 -	}
  28.415 -
  28.416 -	case PTRACE_SETOPTIONS: {
  28.417 -		if (data & PTRACE_O_TRACESYSGOOD)
  28.418 -			child->ptrace |= PT_TRACESYSGOOD;
  28.419 -		else
  28.420 -			child->ptrace &= ~PT_TRACESYSGOOD;
  28.421 -		ret = 0;
  28.422 -		break;
  28.423 -	}
  28.424 -
  28.425 -	default:
  28.426 -		ret = -EIO;
  28.427 -		break;
  28.428 -	}
  28.429 -out_tsk:
  28.430 -	free_task_struct(child);
  28.431 -out:
  28.432 -	unlock_kernel();
  28.433 -	return ret;
  28.434 -}
  28.435 -
  28.436 -asmlinkage void syscall_trace(void)
  28.437 -{
  28.438 -	if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) !=
  28.439 -			(PT_PTRACED|PT_TRACESYS))
  28.440 -		return;
  28.441 -	/* the 0x80 provides a way for the tracing parent to distinguish
  28.442 -	   between a syscall stop and SIGTRAP delivery */
  28.443 -	current->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
  28.444 -					? 0x80 : 0);
  28.445 -	current->state = TASK_STOPPED;
  28.446 -	notify_parent(current, SIGCHLD);
  28.447 -	schedule();
  28.448 -	/*
  28.449 -	 * this isn't the same as continuing with a signal, but it will do
  28.450 -	 * for normal use.  strace only continues with a signal if the
  28.451 -	 * stopping signal is not SIGTRAP.  -brl
  28.452 -	 */
  28.453 -	if (current->exit_code) {
  28.454 -		send_sig(current->exit_code, current, 1);
  28.455 -		current->exit_code = 0;
  28.456 -	}
  28.457 -}
    29.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/semaphore.c	Fri Mar 14 15:48:09 2003 +0000
    29.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.3 @@ -1,291 +0,0 @@
    29.4 -/*
    29.5 - * i386 semaphore implementation.
    29.6 - *
    29.7 - * (C) Copyright 1999 Linus Torvalds
    29.8 - *
    29.9 - * Portions Copyright 1999 Red Hat, Inc.
   29.10 - *
   29.11 - *	This program is free software; you can redistribute it and/or
   29.12 - *	modify it under the terms of the GNU General Public License
   29.13 - *	as published by the Free Software Foundation; either version
   29.14 - *	2 of the License, or (at your option) any later version.
   29.15 - *
   29.16 - * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@redhat.com>
   29.17 - */
   29.18 -#include <linux/config.h>
   29.19 -#include <linux/sched.h>
   29.20 -#include <asm/semaphore.h>
   29.21 -
   29.22 -/*
   29.23 - * Semaphores are implemented using a two-way counter:
   29.24 - * The "count" variable is decremented for each process
   29.25 - * that tries to acquire the semaphore, while the "sleeping"
   29.26 - * variable is a count of such acquires.
   29.27 - *
   29.28 - * Notably, the inline "up()" and "down()" functions can
   29.29 - * efficiently test if they need to do any extra work (up
   29.30 - * needs to do something only if count was negative before
   29.31 - * the increment operation.
   29.32 - *
   29.33 - * "sleeping" and the contention routine ordering is
   29.34 - * protected by the semaphore spinlock.
   29.35 - *
   29.36 - * Note that these functions are only called when there is
   29.37 - * contention on the lock, and as such all this is the
   29.38 - * "non-critical" part of the whole semaphore business. The
   29.39 - * critical part is the inline stuff in <asm/semaphore.h>
   29.40 - * where we want to avoid any extra jumps and calls.
   29.41 - */
   29.42 -
   29.43 -/*
   29.44 - * Logic:
   29.45 - *  - only on a boundary condition do we need to care. When we go
   29.46 - *    from a negative count to a non-negative, we wake people up.
   29.47 - *  - when we go from a non-negative count to a negative do we
   29.48 - *    (a) synchronize with the "sleeper" count and (b) make sure
   29.49 - *    that we're on the wakeup list before we synchronize so that
   29.50 - *    we cannot lose wakeup events.
   29.51 - */
   29.52 -
   29.53 -void __up(struct semaphore *sem)
   29.54 -{
   29.55 -	wake_up(&sem->wait);
   29.56 -}
   29.57 -
   29.58 -static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED;
   29.59 -
   29.60 -void __down(struct semaphore * sem)
   29.61 -{
   29.62 -	struct task_struct *tsk = current;
   29.63 -	DECLARE_WAITQUEUE(wait, tsk);
   29.64 -	tsk->state = TASK_UNINTERRUPTIBLE;
   29.65 -	add_wait_queue_exclusive(&sem->wait, &wait);
   29.66 -
   29.67 -	spin_lock_irq(&semaphore_lock);
   29.68 -	sem->sleepers++;
   29.69 -	for (;;) {
   29.70 -		int sleepers = sem->sleepers;
   29.71 -
   29.72 -		/*
   29.73 -		 * Add "everybody else" into it. They aren't
   29.74 -		 * playing, because we own the spinlock.
   29.75 -		 */
   29.76 -		if (!atomic_add_negative(sleepers - 1, &sem->count)) {
   29.77 -			sem->sleepers = 0;
   29.78 -			break;
   29.79 -		}
   29.80 -		sem->sleepers = 1;	/* us - see -1 above */
   29.81 -		spin_unlock_irq(&semaphore_lock);
   29.82 -
   29.83 -		schedule();
   29.84 -		tsk->state = TASK_UNINTERRUPTIBLE;
   29.85 -		spin_lock_irq(&semaphore_lock);
   29.86 -	}
   29.87 -	spin_unlock_irq(&semaphore_lock);
   29.88 -	remove_wait_queue(&sem->wait, &wait);
   29.89 -	tsk->state = TASK_RUNNING;
   29.90 -	wake_up(&sem->wait);
   29.91 -}
   29.92 -
   29.93 -int __down_interruptible(struct semaphore * sem)
   29.94 -{
   29.95 -	int retval = 0;
   29.96 -	struct task_struct *tsk = current;
   29.97 -	DECLARE_WAITQUEUE(wait, tsk);
   29.98 -	tsk->state = TASK_INTERRUPTIBLE;
   29.99 -	add_wait_queue_exclusive(&sem->wait, &wait);
  29.100 -
  29.101 -	spin_lock_irq(&semaphore_lock);
  29.102 -	sem->sleepers ++;
  29.103 -	for (;;) {
  29.104 -		int sleepers = sem->sleepers;
  29.105 -
  29.106 -		/*
  29.107 -		 * With signals pending, this turns into
  29.108 -		 * the trylock failure case - we won't be
  29.109 -		 * sleeping, and we* can't get the lock as
  29.110 -		 * it has contention. Just correct the count
  29.111 -		 * and exit.
  29.112 -		 */
  29.113 -		if (signal_pending(current)) {
  29.114 -			retval = -EINTR;
  29.115 -			sem->sleepers = 0;
  29.116 -			atomic_add(sleepers, &sem->count);
  29.117 -			break;
  29.118 -		}
  29.119 -
  29.120 -		/*
  29.121 -		 * Add "everybody else" into it. They aren't
  29.122 -		 * playing, because we own the spinlock. The
  29.123 -		 * "-1" is because we're still hoping to get
  29.124 -		 * the lock.
  29.125 -		 */
  29.126 -		if (!atomic_add_negative(sleepers - 1, &sem->count)) {
  29.127 -			sem->sleepers = 0;
  29.128 -			break;
  29.129 -		}
  29.130 -		sem->sleepers = 1;	/* us - see -1 above */
  29.131 -		spin_unlock_irq(&semaphore_lock);
  29.132 -
  29.133 -		schedule();
  29.134 -		tsk->state = TASK_INTERRUPTIBLE;
  29.135 -		spin_lock_irq(&semaphore_lock);
  29.136 -	}
  29.137 -	spin_unlock_irq(&semaphore_lock);
  29.138 -	tsk->state = TASK_RUNNING;
  29.139 -	remove_wait_queue(&sem->wait, &wait);
  29.140 -	wake_up(&sem->wait);
  29.141 -	return retval;
  29.142 -}
  29.143 -
  29.144 -/*
  29.145 - * Trylock failed - make sure we correct for
  29.146 - * having decremented the count.
  29.147 - *
  29.148 - * We could have done the trylock with a
  29.149 - * single "cmpxchg" without failure cases,
  29.150 - * but then it wouldn't work on a 386.
  29.151 - */
  29.152 -int __down_trylock(struct semaphore * sem)
  29.153 -{
  29.154 -	int sleepers;
  29.155 -	unsigned long flags;
  29.156 -
  29.157 -	spin_lock_irqsave(&semaphore_lock, flags);
  29.158 -	sleepers = sem->sleepers + 1;
  29.159 -	sem->sleepers = 0;
  29.160 -
  29.161 -	/*
  29.162 -	 * Add "everybody else" and us into it. They aren't
  29.163 -	 * playing, because we own the spinlock.
  29.164 -	 */
  29.165 -	if (!atomic_add_negative(sleepers, &sem->count))
  29.166 -		wake_up(&sem->wait);
  29.167 -
  29.168 -	spin_unlock_irqrestore(&semaphore_lock, flags);
  29.169 -	return 1;
  29.170 -}
  29.171 -
  29.172 -
  29.173 -/*
  29.174 - * The semaphore operations have a special calling sequence that
  29.175 - * allow us to do a simpler in-line version of them. These routines
  29.176 - * need to convert that sequence back into the C sequence when
  29.177 - * there is contention on the semaphore.
  29.178 - *
  29.179 - * %ecx contains the semaphore pointer on entry. Save the C-clobbered
  29.180 - * registers (%eax, %edx and %ecx) except %eax when used as a return
  29.181 - * value..
  29.182 - */
  29.183 -asm(
  29.184 -".text\n"
  29.185 -".align 4\n"
  29.186 -".globl __down_failed\n"
  29.187 -"__down_failed:\n\t"
  29.188 -#if defined(CONFIG_FRAME_POINTER)
  29.189 -	"pushl %ebp\n\t"
  29.190 -	"movl  %esp,%ebp\n\t"
  29.191 -#endif
  29.192 -	"pushl %eax\n\t"
  29.193 -	"pushl %edx\n\t"
  29.194 -	"pushl %ecx\n\t"
  29.195 -	"call __down\n\t"
  29.196 -	"popl %ecx\n\t"
  29.197 -	"popl %edx\n\t"
  29.198 -	"popl %eax\n\t"
  29.199 -#if defined(CONFIG_FRAME_POINTER)
  29.200 -	"movl %ebp,%esp\n\t"
  29.201 -	"popl %ebp\n\t"
  29.202 -#endif
  29.203 -	"ret"
  29.204 -);
  29.205 -
  29.206 -asm(
  29.207 -".text\n"
  29.208 -".align 4\n"
  29.209 -".globl __down_failed_interruptible\n"
  29.210 -"__down_failed_interruptible:\n\t"
  29.211 -#if defined(CONFIG_FRAME_POINTER)
  29.212 -	"pushl %ebp\n\t"
  29.213 -	"movl  %esp,%ebp\n\t"
  29.214 -#endif
  29.215 -	"pushl %edx\n\t"
  29.216 -	"pushl %ecx\n\t"
  29.217 -	"call __down_interruptible\n\t"
  29.218 -	"popl %ecx\n\t"
  29.219 -	"popl %edx\n\t"
  29.220 -#if defined(CONFIG_FRAME_POINTER)
  29.221 -	"movl %ebp,%esp\n\t"
  29.222 -	"popl %ebp\n\t"
  29.223 -#endif
  29.224 -	"ret"
  29.225 -);
  29.226 -
  29.227 -asm(
  29.228 -".text\n"
  29.229 -".align 4\n"
  29.230 -".globl __down_failed_trylock\n"
  29.231 -"__down_failed_trylock:\n\t"
  29.232 -#if defined(CONFIG_FRAME_POINTER)
  29.233 -	"pushl %ebp\n\t"
  29.234 -	"movl  %esp,%ebp\n\t"
  29.235 -#endif
  29.236 -	"pushl %edx\n\t"
  29.237 -	"pushl %ecx\n\t"
  29.238 -	"call __down_trylock\n\t"
  29.239 -	"popl %ecx\n\t"
  29.240 -	"popl %edx\n\t"
  29.241 -#if defined(CONFIG_FRAME_POINTER)
  29.242 -	"movl %ebp,%esp\n\t"
  29.243 -	"popl %ebp\n\t"
  29.244 -#endif
  29.245 -	"ret"
  29.246 -);
  29.247 -
  29.248 -asm(
  29.249 -".text\n"
  29.250 -".align 4\n"
  29.251 -".globl __up_wakeup\n"
  29.252 -"__up_wakeup:\n\t"
  29.253 -	"pushl %eax\n\t"
  29.254 -	"pushl %edx\n\t"
  29.255 -	"pushl %ecx\n\t"
  29.256 -	"call __up\n\t"
  29.257 -	"popl %ecx\n\t"
  29.258 -	"popl %edx\n\t"
  29.259 -	"popl %eax\n\t"
  29.260 -	"ret"
  29.261 -);
  29.262 -
  29.263 -/*
  29.264 - * rw spinlock fallbacks
  29.265 - */
  29.266 -#if defined(CONFIG_SMP)
  29.267 -asm(
  29.268 -".text\n"
  29.269 -".align	4\n"
  29.270 -".globl	__write_lock_failed\n"
  29.271 -"__write_lock_failed:\n\t"
  29.272 -	LOCK "addl	$" RW_LOCK_BIAS_STR ",(%eax)\n"
  29.273 -"1:	rep; nop\n\t"
  29.274 -	"cmpl	$" RW_LOCK_BIAS_STR ",(%eax)\n\t"
  29.275 -	"jne	1b\n\t"
  29.276 -	LOCK "subl	$" RW_LOCK_BIAS_STR ",(%eax)\n\t"
  29.277 -	"jnz	__write_lock_failed\n\t"
  29.278 -	"ret"
  29.279 -);
  29.280 -
  29.281 -asm(
  29.282 -".text\n"
  29.283 -".align	4\n"
  29.284 -".globl	__read_lock_failed\n"
  29.285 -"__read_lock_failed:\n\t"
  29.286 -	LOCK "incl	(%eax)\n"
  29.287 -"1:	rep; nop\n\t"
  29.288 -	"cmpl	$1,(%eax)\n\t"
  29.289 -	"js	1b\n\t"
  29.290 -	LOCK "decl	(%eax)\n\t"
  29.291 -	"js	__read_lock_failed\n\t"
  29.292 -	"ret"
  29.293 -);
  29.294 -#endif
    30.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/kernel/sys_i386.c	Fri Mar 14 15:48:09 2003 +0000
    30.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.3 @@ -1,256 +0,0 @@
    30.4 -/*
    30.5 - * linux/arch/i386/kernel/sys_i386.c
    30.6 - *
    30.7 - * This file contains various random system calls that
    30.8 - * have a non-standard calling sequence on the Linux/i386
    30.9 - * platform.
   30.10 - */
   30.11 -
   30.12 -#include <linux/errno.h>
   30.13 -#include <linux/sched.h>
   30.14 -#include <linux/mm.h>
   30.15 -#include <linux/smp.h>
   30.16 -#include <linux/smp_lock.h>
   30.17 -#include <linux/sem.h>
   30.18 -#include <linux/msg.h>
   30.19 -#include <linux/shm.h>
   30.20 -#include <linux/stat.h>
   30.21 -#include <linux/mman.h>
   30.22 -#include <linux/file.h>
   30.23 -#include <linux/utsname.h>
   30.24 -
   30.25 -#include <asm/uaccess.h>
   30.26 -#include <asm/ipc.h>
   30.27 -
   30.28 -/*
   30.29 - * sys_pipe() is the normal C calling standard for creating
   30.30 - * a pipe. It's not the way Unix traditionally does this, though.
   30.31 - */
   30.32 -asmlinkage int sys_pipe(unsigned long * fildes)
   30.33 -{
   30.34 -	int fd[2];
   30.35 -	int error;
   30.36 -
   30.37 -	error = do_pipe(fd);
   30.38 -	if (!error) {
   30.39 -		if (copy_to_user(fildes, fd, 2*sizeof(int)))
   30.40 -			error = -EFAULT;
   30.41 -	}
   30.42 -	return error;
   30.43 -}
   30.44 -
   30.45 -/* common code for old and new mmaps */
   30.46 -static inline long do_mmap2(
   30.47 -	unsigned long addr, unsigned long len,
   30.48 -	unsigned long prot, unsigned long flags,
   30.49 -	unsigned long fd, unsigned long pgoff)
   30.50 -{
   30.51 -	int error = -EBADF;
   30.52 -	struct file * file = NULL;
   30.53 -
   30.54 -	flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
   30.55 -	if (!(flags & MAP_ANONYMOUS)) {
   30.56 -		file = fget(fd);
   30.57 -		if (!file)
   30.58 -			goto out;
   30.59 -	}
   30.60 -
   30.61 -	down_write(&current->mm->mmap_sem);
   30.62 -	error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
   30.63 -	up_write(&current->mm->mmap_sem);
   30.64 -
   30.65 -	if (file)
   30.66 -		fput(file);
   30.67 -out:
   30.68 -	return error;
   30.69 -}
   30.70 -
   30.71 -asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
   30.72 -	unsigned long prot, unsigned long flags,
   30.73 -	unsigned long fd, unsigned long pgoff)
   30.74 -{
   30.75 -	return do_mmap2(addr, len, prot, flags, fd, pgoff);
   30.76 -}
   30.77 -
   30.78 -/*
   30.79 - * Perform the select(nd, in, out, ex, tv) and mmap() system
   30.80 - * calls. Linux/i386 didn't use to be able to handle more than
   30.81 - * 4 system call parameters, so these system calls used a memory
   30.82 - * block for parameter passing..
   30.83 - */
   30.84 -
   30.85 -struct mmap_arg_struct {
   30.86 -	unsigned long addr;
   30.87 -	unsigned long len;
   30.88 -	unsigned long prot;
   30.89 -	unsigned long flags;
   30.90 -	unsigned long fd;
   30.91 -	unsigned long offset;
   30.92 -};
   30.93 -
   30.94 -asmlinkage int old_mmap(struct mmap_arg_struct *arg)
   30.95 -{
   30.96 -	struct mmap_arg_struct a;
   30.97 -	int err = -EFAULT;
   30.98 -
   30.99 -	if (copy_from_user(&a, arg, sizeof(a)))
  30.100 -		goto out;
  30.101 -
  30.102 -	err = -EINVAL;
  30.103 -	if (a.offset & ~PAGE_MASK)
  30.104 -		goto out;
  30.105 -
  30.106 -	err = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT);
  30.107 -out:
  30.108 -	return err;
  30.109 -}
  30.110 -
  30.111 -
  30.112 -extern asmlinkage int sys_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
  30.113 -
  30.114 -struct sel_arg_struct {
  30.115 -	unsigned long n;
  30.116 -	fd_set *inp, *outp, *exp;
  30.117 -	struct timeval *tvp;
  30.118 -};
  30.119 -
  30.120 -asmlinkage int old_select(struct sel_arg_struct *arg)
  30.121 -{
  30.122 -	struct sel_arg_struct a;
  30.123 -
  30.124 -	if (copy_from_user(&a, arg, sizeof(a)))
  30.125 -		return -EFAULT;
  30.126 -	/* sys_select() does the appropriate kernel locking */
  30.127 -	return sys_select(a.n, a.inp, a.outp, a.exp, a.tvp);
  30.128 -}
  30.129 -
  30.130 -/*
  30.131 - * sys_ipc() is the de-multiplexer for the SysV IPC calls..
  30.132 - *
  30.133 - * This is really horribly ugly.
  30.134 - */
  30.135 -asmlinkage int sys_ipc (uint call, int first, int second,
  30.136 -			int third, void *ptr, long fifth)
  30.137 -{
  30.138 -	int version, ret;
  30.139 -
  30.140 -	version = call >> 16; /* hack for backward compatibility */
  30.141 -	call &= 0xffff;
  30.142 -
  30.143 -	switch (call) {
  30.144 -	case SEMOP:
  30.145 -		return sys_semop (first, (struct sembuf *)ptr, second);
  30.146 -	case SEMGET:
  30.147 -		return sys_semget (first, second, third);
  30.148 -	case SEMCTL: {
  30.149 -		union semun fourth;
  30.150 -		if (!ptr)
  30.151 -			return -EINVAL;
  30.152 -		if (get_user(fourth.__pad, (void **) ptr))
  30.153 -			return -EFAULT;
  30.154 -		return sys_semctl (first, second, third, fourth);
  30.155 -	}
  30.156 -
  30.157 -	case MSGSND:
  30.158 -		return sys_msgsnd (first, (struct msgbuf *) ptr, 
  30.159 -				   second, third);
  30.160 -	case MSGRCV:
  30.161 -		switch (version) {
  30.162 -		case 0: {
  30.163 -			struct ipc_kludge tmp;
  30.164 -			if (!ptr)
  30.165 -				return -EINVAL;
  30.166 -			
  30.167 -			if (copy_from_user(&tmp,
  30.168 -					   (struct ipc_kludge *) ptr, 
  30.169 -					   sizeof (tmp)))
  30.170 -				return -EFAULT;
  30.171 -			return sys_msgrcv (first, tmp.msgp, second,
  30.172 -					   tmp.msgtyp, third);
  30.173 -		}
  30.174 -		default:
  30.175 -			return sys_msgrcv (first,
  30.176 -					   (struct msgbuf *) ptr,
  30.177 -					   second, fifth, third);
  30.178 -		}
  30.179 -	case MSGGET:
  30.180 -		return sys_msgget ((key_t) first, second);
  30.181 -	case MSGCTL:
  30.182 -		return sys_msgctl (first, second, (struct msqid_ds *) ptr);
  30.183 -
  30.184 -	case SHMAT:
  30.185 -		switch (version) {
  30.186 -		default: {
  30.187 -			ulong raddr;
  30.188 -			ret = sys_shmat (first, (char *) ptr, second, &raddr);
  30.189 -			if (ret)
  30.190 -				return ret;
  30.191 -			return put_user (raddr, (ulong *) third);
  30.192 -		}
  30.193 -		case 1:	/* iBCS2 emulator entry point */
  30.194 -			if (!segment_eq(get_fs(), get_ds()))
  30.195 -				return -EINVAL;
  30.196 -			return sys_shmat (first, (char *) ptr, second, (ulong *) third);
  30.197 -		}
  30.198 -	case SHMDT: 
  30.199 -		return sys_shmdt ((char *)ptr);
  30.200 -	case SHMGET:
  30.201 -		return sys_shmget (first, second, third);
  30.202 -	case SHMCTL:
  30.203 -		return sys_shmctl (first, second,
  30.204 -				   (struct shmid_ds *) ptr);
  30.205 -	default:
  30.206 -		return -EINVAL;
  30.207 -	}
  30.208 -}
  30.209 -
  30.210 -/*
  30.211 - * Old cruft
  30.212 - */
  30.213 -asmlinkage int sys_uname(struct old_utsname * name)
  30.214 -{
  30.215 -	int err;
  30.216 -	if (!name)
  30.217 -		return -EFAULT;
  30.218 -	down_read(&uts_sem);
  30.219 -	err=copy_to_user(name, &system_utsname, sizeof (*name));
  30.220 -	up_read(&uts_sem);
  30.221 -	return err?-EFAULT:0;
  30.222 -}
  30.223 -
  30.224 -asmlinkage int sys_olduname(struct oldold_utsname * name)
  30.225 -{
  30.226 -	int error;
  30.227 -
  30.228 -	if (!name)
  30.229 -		return -EFAULT;
  30.230 -	if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname)))
  30.231 -		return -EFAULT;
  30.232 -  
  30.233 -  	down_read(&uts_sem);
  30.234 -	
  30.235 -	error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN);
  30.236 -	error |= __put_user(0,name->sysname+__OLD_UTS_LEN);
  30.237 -	error |= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);
  30.238 -	error |= __put_user(0,name->nodename+__OLD_UTS_LEN);
  30.239 -	error |= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN);
  30.240 -	error |= __put_user(0,name->release+__OLD_UTS_LEN);
  30.241 -	error |= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN);
  30.242 -	error |= __put_user(0,name->version+__OLD_UTS_LEN);
  30.243 -	error |= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);
  30.244 -	error |= __put_user(0,name->machine+__OLD_UTS_LEN);
  30.245 -	
  30.246 -	up_read(&uts_sem);
  30.247 -	
  30.248 -	error = error ? -EFAULT : 0;
  30.249 -
  30.250 -	return error;
  30.251 -}
  30.252 -
  30.253 -asmlinkage int sys_pause(void)
  30.254 -{
  30.255 -	current->state = TASK_INTERRUPTIBLE;
  30.256 -	schedule();
  30.257 -	return -ERESTARTNOHAND;
  30.258 -}
  30.259 -
    31.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/checksum.S	Fri Mar 14 15:48:09 2003 +0000
    31.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.3 @@ -1,496 +0,0 @@
    31.4 -/*
    31.5 - * INET		An implementation of the TCP/IP protocol suite for the LINUX
    31.6 - *		operating system.  INET is implemented using the  BSD Socket
    31.7 - *		interface as the means of communication with the user level.
    31.8 - *
    31.9 - *		IP/TCP/UDP checksumming routines
   31.10 - *
   31.11 - * Authors:	Jorge Cwik, <jorge@laser.satlink.net>
   31.12 - *		Arnt Gulbrandsen, <agulbra@nvg.unit.no>
   31.13 - *		Tom May, <ftom@netcom.com>
   31.14 - *              Pentium Pro/II routines:
   31.15 - *              Alexander Kjeldaas <astor@guardian.no>
   31.16 - *              Finn Arne Gangstad <finnag@guardian.no>
   31.17 - *		Lots of code moved from tcp.c and ip.c; see those files
   31.18 - *		for more names.
   31.19 - *
   31.20 - * Changes:     Ingo Molnar, converted csum_partial_copy() to 2.1 exception
   31.21 - *			     handling.
   31.22 - *		Andi Kleen,  add zeroing on error
   31.23 - *                   converted to pure assembler
   31.24 - *
   31.25 - *		This program is free software; you can redistribute it and/or
   31.26 - *		modify it under the terms of the GNU General Public License
   31.27 - *		as published by the Free Software Foundation; either version
   31.28 - *		2 of the License, or (at your option) any later version.
   31.29 - */
   31.30 -
   31.31 -#include <linux/config.h>
   31.32 -#include <asm/errno.h>
   31.33 -				
   31.34 -/*
   31.35 - * computes a partial checksum, e.g. for TCP/UDP fragments
   31.36 - */
   31.37 -
   31.38 -/*	
   31.39 -unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum)
   31.40 - */
   31.41 -		
   31.42 -.text
   31.43 -.align 4
   31.44 -.globl csum_partial								
   31.45 -		
   31.46 -#ifndef CONFIG_X86_USE_PPRO_CHECKSUM
   31.47 -
   31.48 -	  /*		
   31.49 -	   * Experiments with Ethernet and SLIP connections show that buff
   31.50 -	   * is aligned on either a 2-byte or 4-byte boundary.  We get at
   31.51 -	   * least a twofold speedup on 486 and Pentium if it is 4-byte aligned.
   31.52 -	   * Fortunately, it is easy to convert 2-byte alignment to 4-byte
   31.53 -	   * alignment for the unrolled loop.
   31.54 -	   */		
   31.55 -csum_partial:	
   31.56 -	pushl %esi
   31.57 -	pushl %ebx
   31.58 -	movl 20(%esp),%eax	# Function arg: unsigned int sum
   31.59 -	movl 16(%esp),%ecx	# Function arg: int len
   31.60 -	movl 12(%esp),%esi	# Function arg: unsigned char *buff
   31.61 -	testl $3, %esi		# Check alignment.
   31.62 -	jz 2f			# Jump if alignment is ok.
   31.63 -	testl $1, %esi		# Check alignment.
   31.64 -	jz 10f			# Jump if alignment is boundary of 2bytes.
   31.65 -
   31.66 -	# buf is odd
   31.67 -	dec %ecx
   31.68 -	jl 8f
   31.69 -	movzbl (%esi), %ebx
   31.70 -	adcl %ebx, %eax
   31.71 -	roll $8, %eax
   31.72 -	inc %esi
   31.73 -	testl $2, %esi
   31.74 -	jz 2f
   31.75 -10:
   31.76 -	subl $2, %ecx		# Alignment uses up two bytes.
   31.77 -	jae 1f			# Jump if we had at least two bytes.
   31.78 -	addl $2, %ecx		# ecx was < 2.  Deal with it.
   31.79 -	jmp 4f
   31.80 -1:	movw (%esi), %bx
   31.81 -	addl $2, %esi
   31.82 -	addw %bx, %ax
   31.83 -	adcl $0, %eax
   31.84 -2:
   31.85 -	movl %ecx, %edx
   31.86 -	shrl $5, %ecx
   31.87 -	jz 2f
   31.88 -	testl %esi, %esi
   31.89 -1:	movl (%esi), %ebx
   31.90 -	adcl %ebx, %eax
   31.91 -	movl 4(%esi), %ebx
   31.92 -	adcl %ebx, %eax
   31.93 -	movl 8(%esi), %ebx
   31.94 -	adcl %ebx, %eax
   31.95 -	movl 12(%esi), %ebx
   31.96 -	adcl %ebx, %eax
   31.97 -	movl 16(%esi), %ebx
   31.98 -	adcl %ebx, %eax
   31.99 -	movl 20(%esi), %ebx
  31.100 -	adcl %ebx, %eax
  31.101 -	movl 24(%esi), %ebx
  31.102 -	adcl %ebx, %eax
  31.103 -	movl 28(%esi), %ebx
  31.104 -	adcl %ebx, %eax
  31.105 -	lea 32(%esi), %esi
  31.106 -	dec %ecx
  31.107 -	jne 1b
  31.108 -	adcl $0, %eax
  31.109 -2:	movl %edx, %ecx
  31.110 -	andl $0x1c, %edx
  31.111 -	je 4f
  31.112 -	shrl $2, %edx		# This clears CF
  31.113 -3:	adcl (%esi), %eax
  31.114 -	lea 4(%esi), %esi
  31.115 -	dec %edx
  31.116 -	jne 3b
  31.117 -	adcl $0, %eax
  31.118 -4:	andl $3, %ecx
  31.119 -	jz 7f
  31.120 -	cmpl $2, %ecx
  31.121 -	jb 5f
  31.122 -	movw (%esi),%cx
  31.123 -	leal 2(%esi),%esi
  31.124 -	je 6f
  31.125 -	shll $16,%ecx
  31.126 -5:	movb (%esi),%cl
  31.127 -6:	addl %ecx,%eax
  31.128 -	adcl $0, %eax 
  31.129 -7:	
  31.130 -	testl $1, 12(%esp)
  31.131 -	jz 8f
  31.132 -	roll $8, %eax
  31.133 -8:
  31.134 -	popl %ebx
  31.135 -	popl %esi
  31.136 -	ret
  31.137 -
  31.138 -#else
  31.139 -
  31.140 -/* Version for PentiumII/PPro */
  31.141 -
  31.142 -csum_partial:
  31.143 -	pushl %esi
  31.144 -	pushl %ebx
  31.145 -	movl 20(%esp),%eax	# Function arg: unsigned int sum
  31.146 -	movl 16(%esp),%ecx	# Function arg: int len
  31.147 -	movl 12(%esp),%esi	# Function arg:	const unsigned char *buf
  31.148 -
  31.149 -	testl $3, %esi         
  31.150 -	jnz 25f                 
  31.151 -10:
  31.152 -	movl %ecx, %edx
  31.153 -	movl %ecx, %ebx
  31.154 -	andl $0x7c, %ebx
  31.155 -	shrl $7, %ecx
  31.156 -	addl %ebx,%esi
  31.157 -	shrl $2, %ebx  
  31.158 -	negl %ebx
  31.159 -	lea 45f(%ebx,%ebx,2), %ebx
  31.160 -	testl %esi, %esi
  31.161 -	jmp *%ebx
  31.162 -
  31.163 -	# Handle 2-byte-aligned regions
  31.164 -20:	addw (%esi), %ax
  31.165 -	lea 2(%esi), %esi
  31.166 -	adcl $0, %eax
  31.167 -	jmp 10b
  31.168 -25:
  31.169 -	testl $1, %esi         
  31.170 -	jz 30f                 
  31.171 -	# buf is odd
  31.172 -	dec %ecx
  31.173 -	jl 90f
  31.174 -	movzbl (%esi), %ebx
  31.175 -	addl %ebx, %eax
  31.176 -	adcl $0, %eax
  31.177 -	roll $8, %eax
  31.178 -	inc %esi
  31.179 -	testl $2, %esi
  31.180 -	jz 10b
  31.181 -
  31.182 -30:	subl $2, %ecx          
  31.183 -	ja 20b                 
  31.184 -	je 32f
  31.185 -	addl $2, %ecx
  31.186 -	jz 80f
  31.187 -	movzbl (%esi),%ebx	# csumming 1 byte, 2-aligned
  31.188 -	addl %ebx, %eax
  31.189 -	adcl $0, %eax
  31.190 -	jmp 80f
  31.191 -32:
  31.192 -	addw (%esi), %ax	# csumming 2 bytes, 2-aligned
  31.193 -	adcl $0, %eax
  31.194 -	jmp 80f
  31.195 -
  31.196 -40: 
  31.197 -	addl -128(%esi), %eax
  31.198 -	adcl -124(%esi), %eax
  31.199 -	adcl -120(%esi), %eax
  31.200 -	adcl -116(%esi), %eax   
  31.201 -	adcl -112(%esi), %eax   
  31.202 -	adcl -108(%esi), %eax
  31.203 -	adcl -104(%esi), %eax
  31.204 -	adcl -100(%esi), %eax
  31.205 -	adcl -96(%esi), %eax
  31.206 -	adcl -92(%esi), %eax
  31.207 -	adcl -88(%esi), %eax
  31.208 -	adcl -84(%esi), %eax
  31.209 -	adcl -80(%esi), %eax
  31.210 -	adcl -76(%esi), %eax
  31.211 -	adcl -72(%esi), %eax
  31.212 -	adcl -68(%esi), %eax
  31.213 -	adcl -64(%esi), %eax     
  31.214 -	adcl -60(%esi), %eax     
  31.215 -	adcl -56(%esi), %eax     
  31.216 -	adcl -52(%esi), %eax   
  31.217 -	adcl -48(%esi), %eax   
  31.218 -	adcl -44(%esi), %eax
  31.219 -	adcl -40(%esi), %eax
  31.220 -	adcl -36(%esi), %eax
  31.221 -	adcl -32(%esi), %eax
  31.222 -	adcl -28(%esi), %eax
  31.223 -	adcl -24(%esi), %eax
  31.224 -	adcl -20(%esi), %eax
  31.225 -	adcl -16(%esi), %eax
  31.226 -	adcl -12(%esi), %eax
  31.227 -	adcl -8(%esi), %eax
  31.228 -	adcl -4(%esi), %eax
  31.229 -45:
  31.230 -	lea 128(%esi), %esi
  31.231 -	adcl $0, %eax
  31.232 -	dec %ecx
  31.233 -	jge 40b
  31.234 -	movl %edx, %ecx
  31.235 -50:	andl $3, %ecx
  31.236 -	jz 80f
  31.237 -
  31.238 -	# Handle the last 1-3 bytes without jumping
  31.239 -	notl %ecx		# 1->2, 2->1, 3->0, higher bits are masked
  31.240 -	movl $0xffffff,%ebx	# by the shll and shrl instructions
  31.241 -	shll $3,%ecx
  31.242 -	shrl %cl,%ebx
  31.243 -	andl -128(%esi),%ebx	# esi is 4-aligned so should be ok
  31.244 -	addl %ebx,%eax
  31.245 -	adcl $0,%eax
  31.246 -80: 
  31.247 -	testl $1, 12(%esp)
  31.248 -	jz 90f
  31.249 -	roll $8, %eax
  31.250 -90: 
  31.251 -	popl %ebx
  31.252 -	popl %esi
  31.253 -	ret
  31.254 -				
  31.255 -#endif
  31.256 -
  31.257 -/*
  31.258 -unsigned int csum_partial_copy_generic (const char *src, char *dst,
  31.259 -				  int len, int sum, int *src_err_ptr, int *dst_err_ptr)
  31.260 - */ 
  31.261 -
  31.262 -/*
  31.263 - * Copy from ds while checksumming, otherwise like csum_partial
  31.264 - *
  31.265 - * The macros SRC and DST specify the type of access for the instruction.
  31.266 - * thus we can call a custom exception handler for all access types.
  31.267 - *
  31.268 - * FIXME: could someone double-check whether I haven't mixed up some SRC and
  31.269 - *	  DST definitions? It's damn hard to trigger all cases.  I hope I got
  31.270 - *	  them all but there's no guarantee.
  31.271 - */
  31.272 -
  31.273 -#define SRC(y...)			\
  31.274 -	9999: y;			\
  31.275 -	.section __ex_table, "a";	\
  31.276 -	.long 9999b, 6001f	;	\
  31.277 -	.previous
  31.278 -
  31.279 -#define DST(y...)			\
  31.280 -	9999: y;			\
  31.281 -	.section __ex_table, "a";	\
  31.282 -	.long 9999b, 6002f	;	\
  31.283 -	.previous
  31.284 -
  31.285 -.align 4
  31.286 -.globl csum_partial_copy_generic
  31.287 -				
  31.288 -#ifndef CONFIG_X86_USE_PPRO_CHECKSUM
  31.289 -
  31.290 -#define ARGBASE 16		
  31.291 -#define FP		12
  31.292 -		
  31.293 -csum_partial_copy_generic:
  31.294 -	subl  $4,%esp	
  31.295 -	pushl %edi
  31.296 -	pushl %esi
  31.297 -	pushl %ebx
  31.298 -	movl ARGBASE+16(%esp),%eax	# sum
  31.299 -	movl ARGBASE+12(%esp),%ecx	# len
  31.300 -	movl ARGBASE+4(%esp),%esi	# src
  31.301 -	movl ARGBASE+8(%esp),%edi	# dst
  31.302 -
  31.303 -	testl $2, %edi			# Check alignment. 
  31.304 -	jz 2f				# Jump if alignment is ok.
  31.305 -	subl $2, %ecx			# Alignment uses up two bytes.
  31.306 -	jae 1f				# Jump if we had at least two bytes.
  31.307 -	addl $2, %ecx			# ecx was < 2.  Deal with it.
  31.308 -	jmp 4f
  31.309 -SRC(1:	movw (%esi), %bx	)
  31.310 -	addl $2, %esi
  31.311 -DST(	movw %bx, (%edi)	)
  31.312 -	addl $2, %edi
  31.313 -	addw %bx, %ax	
  31.314 -	adcl $0, %eax
  31.315 -2:
  31.316 -	movl %ecx, FP(%esp)
  31.317 -	shrl $5, %ecx
  31.318 -	jz 2f
  31.319 -	testl %esi, %esi
  31.320 -SRC(1:	movl (%esi), %ebx	)
  31.321 -SRC(	movl 4(%esi), %edx	)
  31.322 -	adcl %ebx, %eax
  31.323 -DST(	movl %ebx, (%edi)	)
  31.324 -	adcl %edx, %eax
  31.325 -DST(	movl %edx, 4(%edi)	)
  31.326 -
  31.327 -SRC(	movl 8(%esi), %ebx	)
  31.328 -SRC(	movl 12(%esi), %edx	)
  31.329 -	adcl %ebx, %eax
  31.330 -DST(	movl %ebx, 8(%edi)	)
  31.331 -	adcl %edx, %eax
  31.332 -DST(	movl %edx, 12(%edi)	)
  31.333 -
  31.334 -SRC(	movl 16(%esi), %ebx 	)
  31.335 -SRC(	movl 20(%esi), %edx	)
  31.336 -	adcl %ebx, %eax
  31.337 -DST(	movl %ebx, 16(%edi)	)
  31.338 -	adcl %edx, %eax
  31.339 -DST(	movl %edx, 20(%edi)	)
  31.340 -
  31.341 -SRC(	movl 24(%esi), %ebx	)
  31.342 -SRC(	movl 28(%esi), %edx	)
  31.343 -	adcl %ebx, %eax
  31.344 -DST(	movl %ebx, 24(%edi)	)
  31.345 -	adcl %edx, %eax
  31.346 -DST(	movl %edx, 28(%edi)	)
  31.347 -
  31.348 -	lea 32(%esi), %esi
  31.349 -	lea 32(%edi), %edi
  31.350 -	dec %ecx
  31.351 -	jne 1b
  31.352 -	adcl $0, %eax
  31.353 -2:	movl FP(%esp), %edx
  31.354 -	movl %edx, %ecx
  31.355 -	andl $0x1c, %edx
  31.356 -	je 4f
  31.357 -	shrl $2, %edx			# This clears CF
  31.358 -SRC(3:	movl (%esi), %ebx	)
  31.359 -	adcl %ebx, %eax
  31.360 -DST(	movl %ebx, (%edi)	)
  31.361 -	lea 4(%esi), %esi
  31.362 -	lea 4(%edi), %edi
  31.363 -	dec %edx
  31.364 -	jne 3b
  31.365 -	adcl $0, %eax
  31.366 -4:	andl $3, %ecx
  31.367 -	jz 7f
  31.368 -	cmpl $2, %ecx
  31.369 -	jb 5f
  31.370 -SRC(	movw (%esi), %cx	)
  31.371 -	leal 2(%esi), %esi
  31.372 -DST(	movw %cx, (%edi)	)
  31.373 -	leal 2(%edi), %edi
  31.374 -	je 6f
  31.375 -	shll $16,%ecx
  31.376 -SRC(5:	movb (%esi), %cl	)
  31.377 -DST(	movb %cl, (%edi)	)
  31.378 -6:	addl %ecx, %eax
  31.379 -	adcl $0, %eax
  31.380 -7:
  31.381 -5000:
  31.382 -
  31.383 -# Exception handler:
  31.384 -.section .fixup, "ax"							
  31.385 -
  31.386 -6001:
  31.387 -	movl ARGBASE+20(%esp), %ebx	# src_err_ptr
  31.388 -	movl $-EFAULT, (%ebx)
  31.389 -
  31.390 -	# zero the complete destination - computing the rest
  31.391 -	# is too much work 
  31.392 -	movl ARGBASE+8(%esp), %edi	# dst
  31.393 -	movl ARGBASE+12(%esp), %ecx	# len
  31.394 -	xorl %eax,%eax
  31.395 -	rep ; stosb
  31.396 -
  31.397 -	jmp 5000b
  31.398 -
  31.399 -6002:
  31.400 -	movl ARGBASE+24(%esp), %ebx	# dst_err_ptr
  31.401 -	movl $-EFAULT,(%ebx)
  31.402 -	jmp 5000b
  31.403 -
  31.404 -.previous
  31.405 -
  31.406 -	popl %ebx
  31.407 -	popl %esi
  31.408 -	popl %edi
  31.409 -	popl %ecx			# equivalent to addl $4,%esp
  31.410 -	ret	
  31.411 -
  31.412 -#else
  31.413 -
  31.414 -/* Version for PentiumII/PPro */
  31.415 -
  31.416 -#define ROUND1(x) \
  31.417 -	SRC(movl x(%esi), %ebx	)	;	\
  31.418 -	addl %ebx, %eax			;	\
  31.419 -	DST(movl %ebx, x(%edi)	)	; 
  31.420 -
  31.421 -#define ROUND(x) \
  31.422 -	SRC(movl x(%esi), %ebx	)	;	\
  31.423 -	adcl %ebx, %eax			;	\
  31.424 -	DST(movl %ebx, x(%edi)	)	;
  31.425 -
  31.426 -#define ARGBASE 12
  31.427 -		
  31.428 -csum_partial_copy_generic:
  31.429 -	pushl %ebx
  31.430 -	pushl %edi
  31.431 -	pushl %esi
  31.432 -	movl ARGBASE+4(%esp),%esi	#src
  31.433 -	movl ARGBASE+8(%esp),%edi	#dst	
  31.434 -	movl ARGBASE+12(%esp),%ecx	#len
  31.435 -	movl ARGBASE+16(%esp),%eax	#sum
  31.436 -#	movl %ecx, %edx  
  31.437 -	movl %ecx, %ebx  
  31.438 -	movl %esi, %edx
  31.439 -	shrl $6, %ecx     
  31.440 -	andl $0x3c, %ebx  
  31.441 -	negl %ebx
  31.442 -	subl %ebx, %esi  
  31.443 -	subl %ebx, %edi  
  31.444 -	lea  -1(%esi),%edx
  31.445 -	andl $-32,%edx
  31.446 -	lea 3f(%ebx,%ebx), %ebx
  31.447 -	testl %esi, %esi 
  31.448 -	jmp *%ebx
  31.449 -1:	addl $64,%esi
  31.450 -	addl $64,%edi 
  31.451 -	SRC(movb -32(%edx),%bl)	; SRC(movb (%edx),%bl)
  31.452 -	ROUND1(-64) ROUND(-60) ROUND(-56) ROUND(-52)	
  31.453 -	ROUND (-48) ROUND(-44) ROUND(-40) ROUND(-36)	
  31.454 -	ROUND (-32) ROUND(-28) ROUND(-24) ROUND(-20)	
  31.455 -	ROUND (-16) ROUND(-12) ROUND(-8)  ROUND(-4)	
  31.456 -3:	adcl $0,%eax
  31.457 -	addl $64, %edx
  31.458 -	dec %ecx
  31.459 -	jge 1b
  31.460 -4:	movl ARGBASE+12(%esp),%edx	#len
  31.461 -	andl $3, %edx
  31.462 -	jz 7f
  31.463 -	cmpl $2, %edx
  31.464 -	jb 5f
  31.465 -SRC(	movw (%esi), %dx         )
  31.466 -	leal 2(%esi), %esi
  31.467 -DST(	movw %dx, (%edi)         )
  31.468 -	leal 2(%edi), %edi
  31.469 -	je 6f
  31.470 -	shll $16,%edx
  31.471 -5:
  31.472 -SRC(	movb (%esi), %dl         )
  31.473 -DST(	movb %dl, (%edi)         )
  31.474 -6:	addl %edx, %eax
  31.475 -	adcl $0, %eax
  31.476 -7:
  31.477 -.section .fixup, "ax"
  31.478 -6001:	movl	ARGBASE+20(%esp), %ebx	# src_err_ptr	
  31.479 -	movl $-EFAULT, (%ebx)
  31.480 -	# zero the complete destination (computing the rest is too much work)
  31.481 -	movl ARGBASE+8(%esp),%edi	# dst
  31.482 -	movl ARGBASE+12(%esp),%ecx	# len
  31.483 -	xorl %eax,%eax
  31.484 -	rep; stosb
  31.485 -	jmp 7b
  31.486 -6002:	movl ARGBASE+24(%esp), %ebx	# dst_err_ptr
  31.487 -	movl $-EFAULT, (%ebx)
  31.488 -	jmp  7b			
  31.489 -.previous				
  31.490 -
  31.491 -	popl %esi
  31.492 -	popl %edi
  31.493 -	popl %ebx
  31.494 -	ret
  31.495 -				
  31.496 -#undef ROUND
  31.497 -#undef ROUND1		
  31.498 -		
  31.499 -#endif
    32.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/dec_and_lock.c	Fri Mar 14 15:48:09 2003 +0000
    32.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.3 @@ -1,40 +0,0 @@
    32.4 -/*
    32.5 - * x86 version of "atomic_dec_and_lock()" using
    32.6 - * the atomic "cmpxchg" instruction.
    32.7 - *
    32.8 - * (For CPU's lacking cmpxchg, we use the slow
    32.9 - * generic version, and this one never even gets
   32.10 - * compiled).
   32.11 - */
   32.12 -
   32.13 -#include <linux/spinlock.h>
   32.14 -#include <asm/atomic.h>
   32.15 -
   32.16 -int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock)
   32.17 -{
   32.18 -	int counter;
   32.19 -	int newcount;
   32.20 -
   32.21 -repeat:
   32.22 -	counter = atomic_read(atomic);
   32.23 -	newcount = counter-1;
   32.24 -
   32.25 -	if (!newcount)
   32.26 -		goto slow_path;
   32.27 -
   32.28 -	asm volatile("lock; cmpxchgl %1,%2"
   32.29 -		:"=a" (newcount)
   32.30 -		:"r" (newcount), "m" (atomic->counter), "0" (counter));
   32.31 -
   32.32 -	/* If the above failed, "eax" will have changed */
   32.33 -	if (newcount != counter)
   32.34 -		goto repeat;
   32.35 -	return 0;
   32.36 -
   32.37 -slow_path:
   32.38 -	spin_lock(lock);
   32.39 -	if (atomic_dec_and_test(atomic))
   32.40 -		return 1;
   32.41 -	spin_unlock(lock);
   32.42 -	return 0;
   32.43 -}
    33.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/getuser.S	Fri Mar 14 15:48:09 2003 +0000
    33.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.3 @@ -1,73 +0,0 @@
    33.4 -/*
    33.5 - * __get_user functions.
    33.6 - *
    33.7 - * (C) Copyright 1998 Linus Torvalds
    33.8 - *
    33.9 - * These functions have a non-standard call interface
   33.10 - * to make them more efficient, especially as they
   33.11 - * return an error value in addition to the "real"
   33.12 - * return value.
   33.13 - */
   33.14 -
   33.15 -/*
   33.16 - * __get_user_X
   33.17 - *
   33.18 - * Inputs:	%eax contains the address
   33.19 - *
   33.20 - * Outputs:	%eax is error code (0 or -EFAULT)
   33.21 - *		%edx contains zero-extended value
   33.22 - *
   33.23 - * These functions should not modify any other registers,
   33.24 - * as they get called from within inline assembly.
   33.25 - */
   33.26 -
   33.27 -addr_limit = 12
   33.28 -
   33.29 -.text
   33.30 -.align 4
   33.31 -.globl __get_user_1
   33.32 -__get_user_1:
   33.33 -	movl %esp,%edx
   33.34 -	andl $0xffffe000,%edx
   33.35 -	cmpl addr_limit(%edx),%eax
   33.36 -	jae bad_get_user
   33.37 -1:	movzbl (%eax),%edx
   33.38 -	xorl %eax,%eax
   33.39 -	ret
   33.40 -
   33.41 -.align 4
   33.42 -.globl __get_user_2
   33.43 -__get_user_2:
   33.44 -	addl $1,%eax
   33.45 -	movl %esp,%edx
   33.46 -	jc bad_get_user
   33.47 -	andl $0xffffe000,%edx
   33.48 -	cmpl addr_limit(%edx),%eax
   33.49 -	jae bad_get_user
   33.50 -2:	movzwl -1(%eax),%edx
   33.51 -	xorl %eax,%eax
   33.52 -	ret
   33.53 -
   33.54 -.align 4
   33.55 -.globl __get_user_4
   33.56 -__get_user_4:
   33.57 -	addl $3,%eax
   33.58 -	movl %esp,%edx
   33.59 -	jc bad_get_user
   33.60 -	andl $0xffffe000,%edx
   33.61 -	cmpl addr_limit(%edx),%eax
   33.62 -	jae bad_get_user
   33.63 -3:	movl -3(%eax),%edx
   33.64 -	xorl %eax,%eax
   33.65 -	ret
   33.66 -
   33.67 -bad_get_user:
   33.68 -	xorl %edx,%edx
   33.69 -	movl $-14,%eax
   33.70 -	ret
   33.71 -
   33.72 -.section __ex_table,"a"
   33.73 -	.long 1b,bad_get_user
   33.74 -	.long 2b,bad_get_user
   33.75 -	.long 3b,bad_get_user
   33.76 -.previous
    34.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/iodebug.c	Fri Mar 14 15:48:09 2003 +0000
    34.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.3 @@ -1,19 +0,0 @@
    34.4 -#include <asm/io.h>
    34.5 -
    34.6 -void * __io_virt_debug(unsigned long x, const char *file, int line)
    34.7 -{
    34.8 -	if (x < PAGE_OFFSET) {
    34.9 -		printk("io mapaddr 0x%05lx not valid at %s:%d!\n", x, file, line);
   34.10 -		return __va(x);
   34.11 -	}
   34.12 -	return (void *)x;
   34.13 -}
   34.14 -
   34.15 -unsigned long __io_phys_debug(unsigned long x, const char *file, int line)
   34.16 -{
   34.17 -	if (x < PAGE_OFFSET) {
   34.18 -		printk("io mapaddr 0x%05lx not valid at %s:%d!\n", x, file, line);
   34.19 -		return x;
   34.20 -	}
   34.21 -	return __pa(x);
   34.22 -}
    35.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/memcpy.c	Fri Mar 14 15:48:09 2003 +0000
    35.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.3 @@ -1,19 +0,0 @@
    35.4 -#include <linux/config.h>
    35.5 -#include <linux/string.h>
    35.6 -
    35.7 -#undef memcpy
    35.8 -#undef memset
    35.9 -
   35.10 -void * memcpy(void * to, const void * from, size_t n)
   35.11 -{
   35.12 -#ifdef CONFIG_X86_USE_3DNOW
   35.13 -	return __memcpy3d(to, from, n);
   35.14 -#else
   35.15 -	return __memcpy(to, from, n);
   35.16 -#endif
   35.17 -}
   35.18 -
   35.19 -void * memset(void * s, int c, size_t count)
   35.20 -{
   35.21 -	return __memset(s, c, count);
   35.22 -}
    36.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/mmx.c	Fri Mar 14 15:48:09 2003 +0000
    36.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.3 @@ -1,399 +0,0 @@
    36.4 -#include <linux/config.h>
    36.5 -#include <linux/types.h>
    36.6 -#include <linux/string.h>
    36.7 -#include <linux/sched.h>
    36.8 -
    36.9 -#include <asm/i387.h>
   36.10 -#include <asm/hardirq.h> 
   36.11 -
   36.12 -
   36.13 -/*
   36.14 - *	MMX 3DNow! library helper functions
   36.15 - *
   36.16 - *	To do:
   36.17 - *	We can use MMX just for prefetch in IRQ's. This may be a win. 
   36.18 - *		(reported so on K6-III)
   36.19 - *	We should use a better code neutral filler for the short jump
   36.20 - *		leal ebx. [ebx] is apparently best for K6-2, but Cyrix ??
   36.21 - *	We also want to clobber the filler register so we dont get any
   36.22 - *		register forwarding stalls on the filler. 
   36.23 - *
   36.24 - *	Add *user handling. Checksums are not a win with MMX on any CPU
   36.25 - *	tested so far for any MMX solution figured.
   36.26 - *
   36.27 - *	22/09/2000 - Arjan van de Ven 
   36.28 - *		Improved for non-egineering-sample Athlons 
   36.29 - *
   36.30 - */
   36.31 - 
   36.32 -void *_mmx_memcpy(void *to, const void *from, size_t len)
   36.33 -{
   36.34 -	void *p;
   36.35 -	int i;
   36.36 -
   36.37 -	if (in_interrupt())
   36.38 -		return __memcpy(to, from, len);
   36.39 -
   36.40 -	p = to;
   36.41 -	i = len >> 6; /* len/64 */
   36.42 -
   36.43 -	kernel_fpu_begin();
   36.44 -
   36.45 -	__asm__ __volatile__ (
   36.46 -		"1: prefetch (%0)\n"		/* This set is 28 bytes */
   36.47 -		"   prefetch 64(%0)\n"
   36.48 -		"   prefetch 128(%0)\n"
   36.49 -		"   prefetch 192(%0)\n"
   36.50 -		"   prefetch 256(%0)\n"
   36.51 -		"2:  \n"
   36.52 -		".section .fixup, \"ax\"\n"
   36.53 -		"3: movw $0x1AEB, 1b\n"	/* jmp on 26 bytes */
   36.54 -		"   jmp 2b\n"
   36.55 -		".previous\n"
   36.56 -		".section __ex_table,\"a\"\n"
   36.57 -		"	.align 4\n"
   36.58 -		"	.long 1b, 3b\n"
   36.59 -		".previous"
   36.60 -		: : "r" (from) );
   36.61 -		
   36.62 -	
   36.63 -	for(; i>5; i--)
   36.64 -	{
   36.65 -		__asm__ __volatile__ (
   36.66 -		"1:  prefetch 320(%0)\n"
   36.67 -		"2:  movq (%0), %%mm0\n"
   36.68 -		"  movq 8(%0), %%mm1\n"
   36.69 -		"  movq 16(%0), %%mm2\n"
   36.70 -		"  movq 24(%0), %%mm3\n"
   36.71 -		"  movq %%mm0, (%1)\n"
   36.72 -		"  movq %%mm1, 8(%1)\n"
   36.73 -		"  movq %%mm2, 16(%1)\n"
   36.74 -		"  movq %%mm3, 24(%1)\n"
   36.75 -		"  movq 32(%0), %%mm0\n"
   36.76 -		"  movq 40(%0), %%mm1\n"
   36.77 -		"  movq 48(%0), %%mm2\n"
   36.78 -		"  movq 56(%0), %%mm3\n"
   36.79 -		"  movq %%mm0, 32(%1)\n"
   36.80 -		"  movq %%mm1, 40(%1)\n"
   36.81 -		"  movq %%mm2, 48(%1)\n"
   36.82 -		"  movq %%mm3, 56(%1)\n"
   36.83 -		".section .fixup, \"ax\"\n"
   36.84 -		"3: movw $0x05EB, 1b\n"	/* jmp on 5 bytes */
   36.85 -		"   jmp 2b\n"
   36.86 -		".previous\n"
   36.87 -		".section __ex_table,\"a\"\n"
   36.88 -		"	.align 4\n"
   36.89 -		"	.long 1b, 3b\n"
   36.90 -		".previous"
   36.91 -		: : "r" (from), "r" (to) : "memory");
   36.92 -		from+=64;
   36.93 -		to+=64;
   36.94 -	}
   36.95 -
   36.96 -	for(; i>0; i--)
   36.97 -	{
   36.98 -		__asm__ __volatile__ (
   36.99 -		"  movq (%0), %%mm0\n"
  36.100 -		"  movq 8(%0), %%mm1\n"
  36.101 -		"  movq 16(%0), %%mm2\n"
  36.102 -		"  movq 24(%0), %%mm3\n"
  36.103 -		"  movq %%mm0, (%1)\n"
  36.104 -		"  movq %%mm1, 8(%1)\n"
  36.105 -		"  movq %%mm2, 16(%1)\n"
  36.106 -		"  movq %%mm3, 24(%1)\n"
  36.107 -		"  movq 32(%0), %%mm0\n"
  36.108 -		"  movq 40(%0), %%mm1\n"
  36.109 -		"  movq 48(%0), %%mm2\n"
  36.110 -		"  movq 56(%0), %%mm3\n"
  36.111 -		"  movq %%mm0, 32(%1)\n"
  36.112 -		"  movq %%mm1, 40(%1)\n"
  36.113 -		"  movq %%mm2, 48(%1)\n"
  36.114 -		"  movq %%mm3, 56(%1)\n"
  36.115 -		: : "r" (from), "r" (to) : "memory");
  36.116 -		from+=64;
  36.117 -		to+=64;
  36.118 -	}
  36.119 -	/*
  36.120 -	 *	Now do the tail of the block
  36.121 -	 */
  36.122 -	__memcpy(to, from, len&63);
  36.123 -	kernel_fpu_end();
  36.124 -	return p;
  36.125 -}
  36.126 -
  36.127 -#ifdef CONFIG_MK7
  36.128 -
  36.129 -/*
  36.130 - *	The K7 has streaming cache bypass load/store. The Cyrix III, K6 and
  36.131 - *	other MMX using processors do not.
  36.132 - */
  36.133 -
  36.134 -static void fast_clear_page(void *page)
  36.135 -{
  36.136 -	int i;
  36.137 -
  36.138 -	kernel_fpu_begin();
  36.139 -	
  36.140 -	__asm__ __volatile__ (
  36.141 -		"  pxor %%mm0, %%mm0\n" : :
  36.142 -	);
  36.143 -
  36.144 -	for(i=0;i<4096/64;i++)
  36.145 -	{
  36.146 -		__asm__ __volatile__ (
  36.147 -		"  movntq %%mm0, (%0)\n"
  36.148 -		"  movntq %%mm0, 8(%0)\n"
  36.149 -		"  movntq %%mm0, 16(%0)\n"
  36.150 -		"  movntq %%mm0, 24(%0)\n"
  36.151 -		"  movntq %%mm0, 32(%0)\n"
  36.152 -		"  movntq %%mm0, 40(%0)\n"
  36.153 -		"  movntq %%mm0, 48(%0)\n"
  36.154 -		"  movntq %%mm0, 56(%0)\n"
  36.155 -		: : "r" (page) : "memory");
  36.156 -		page+=64;
  36.157 -	}
  36.158 -	/* since movntq is weakly-ordered, a "sfence" is needed to become
  36.159 -	 * ordered again.
  36.160 -	 */
  36.161 -	__asm__ __volatile__ (
  36.162 -		"  sfence \n" : :
  36.163 -	);
  36.164 -	kernel_fpu_end();
  36.165 -}
  36.166 -
  36.167 -static void fast_copy_page(void *to, void *from)
  36.168 -{
  36.169 -	int i;
  36.170 -
  36.171 -	kernel_fpu_begin();
  36.172 -
  36.173 -	/* maybe the prefetch stuff can go before the expensive fnsave...
  36.174 -	 * but that is for later. -AV
  36.175 -	 */
  36.176 -	__asm__ __volatile__ (
  36.177 -		"1: prefetch (%0)\n"
  36.178 -		"   prefetch 64(%0)\n"
  36.179 -		"   prefetch 128(%0)\n"
  36.180 -		"   prefetch 192(%0)\n"
  36.181 -		"   prefetch 256(%0)\n"
  36.182 -		"2:  \n"
  36.183 -		".section .fixup, \"ax\"\n"
  36.184 -		"3: movw $0x1AEB, 1b\n"	/* jmp on 26 bytes */
  36.185 -		"   jmp 2b\n"
  36.186 -		".previous\n"
  36.187 -		".section __ex_table,\"a\"\n"
  36.188 -		"	.align 4\n"
  36.189 -		"	.long 1b, 3b\n"
  36.190 -		".previous"
  36.191 -		: : "r" (from) );
  36.192 -
  36.193 -	for(i=0; i<(4096-320)/64; i++)
  36.194 -	{
  36.195 -		__asm__ __volatile__ (
  36.196 -		"1: prefetch 320(%0)\n"
  36.197 -		"2: movq (%0), %%mm0\n"
  36.198 -		"   movntq %%mm0, (%1)\n"
  36.199 -		"   movq 8(%0), %%mm1\n"
  36.200 -		"   movntq %%mm1, 8(%1)\n"
  36.201 -		"   movq 16(%0), %%mm2\n"
  36.202 -		"   movntq %%mm2, 16(%1)\n"
  36.203 -		"   movq 24(%0), %%mm3\n"
  36.204 -		"   movntq %%mm3, 24(%1)\n"
  36.205 -		"   movq 32(%0), %%mm4\n"
  36.206 -		"   movntq %%mm4, 32(%1)\n"
  36.207 -		"   movq 40(%0), %%mm5\n"
  36.208 -		"   movntq %%mm5, 40(%1)\n"
  36.209 -		"   movq 48(%0), %%mm6\n"
  36.210 -		"   movntq %%mm6, 48(%1)\n"
  36.211 -		"   movq 56(%0), %%mm7\n"
  36.212 -		"   movntq %%mm7, 56(%1)\n"
  36.213 -		".section .fixup, \"ax\"\n"
  36.214 -		"3: movw $0x05EB, 1b\n"	/* jmp on 5 bytes */
  36.215 -		"   jmp 2b\n"
  36.216 -		".previous\n"
  36.217 -		".section __ex_table,\"a\"\n"
  36.218 -		"	.align 4\n"
  36.219 -		"	.long 1b, 3b\n"
  36.220 -		".previous"
  36.221 -		: : "r" (from), "r" (to) : "memory");
  36.222 -		from+=64;
  36.223 -		to+=64;
  36.224 -	}
  36.225 -	for(i=(4096-320)/64; i<4096/64; i++)
  36.226 -	{
  36.227 -		__asm__ __volatile__ (
  36.228 -		"2: movq (%0), %%mm0\n"
  36.229 -		"   movntq %%mm0, (%1)\n"
  36.230 -		"   movq 8(%0), %%mm1\n"
  36.231 -		"   movntq %%mm1, 8(%1)\n"
  36.232 -		"   movq 16(%0), %%mm2\n"
  36.233 -		"   movntq %%mm2, 16(%1)\n"
  36.234 -		"   movq 24(%0), %%mm3\n"
  36.235 -		"   movntq %%mm3, 24(%1)\n"
  36.236 -		"   movq 32(%0), %%mm4\n"
  36.237 -		"   movntq %%mm4, 32(%1)\n"
  36.238 -		"   movq 40(%0), %%mm5\n"
  36.239 -		"   movntq %%mm5, 40(%1)\n"
  36.240 -		"   movq 48(%0), %%mm6\n"
  36.241 -		"   movntq %%mm6, 48(%1)\n"
  36.242 -		"   movq 56(%0), %%mm7\n"
  36.243 -		"   movntq %%mm7, 56(%1)\n"
  36.244 -		: : "r" (from), "r" (to) : "memory");
  36.245 -		from+=64;
  36.246 -		to+=64;
  36.247 -	}
  36.248 -	/* since movntq is weakly-ordered, a "sfence" is needed to become
  36.249 -	 * ordered again.
  36.250 -	 */
  36.251 -	__asm__ __volatile__ (
  36.252 -		"  sfence \n" : :
  36.253 -	);
  36.254 -	kernel_fpu_end();
  36.255 -}
  36.256 -
  36.257 -#else
  36.258 -
  36.259 -/*
  36.260 - *	Generic MMX implementation without K7 specific streaming
  36.261 - */
  36.262 - 
  36.263 -static void fast_clear_page(void *page)
  36.264 -{
  36.265 -	int i;
  36.266 -	
  36.267 -	kernel_fpu_begin();
  36.268 -	
  36.269 -	__asm__ __volatile__ (
  36.270 -		"  pxor %%mm0, %%mm0\n" : :
  36.271 -	);
  36.272 -
  36.273 -	for(i=0;i<4096/128;i++)
  36.274 -	{
  36.275 -		__asm__ __volatile__ (
  36.276 -		"  movq %%mm0, (%0)\n"
  36.277 -		"  movq %%mm0, 8(%0)\n"
  36.278 -		"  movq %%mm0, 16(%0)\n"
  36.279 -		"  movq %%mm0, 24(%0)\n"
  36.280 -		"  movq %%mm0, 32(%0)\n"
  36.281 -		"  movq %%mm0, 40(%0)\n"
  36.282 -		"  movq %%mm0, 48(%0)\n"
  36.283 -		"  movq %%mm0, 56(%0)\n"
  36.284 -		"  movq %%mm0, 64(%0)\n"
  36.285 -		"  movq %%mm0, 72(%0)\n"
  36.286 -		"  movq %%mm0, 80(%0)\n"
  36.287 -		"  movq %%mm0, 88(%0)\n"
  36.288 -		"  movq %%mm0, 96(%0)\n"
  36.289 -		"  movq %%mm0, 104(%0)\n"
  36.290 -		"  movq %%mm0, 112(%0)\n"
  36.291 -		"  movq %%mm0, 120(%0)\n"
  36.292 -		: : "r" (page) : "memory");
  36.293 -		page+=128;
  36.294 -	}
  36.295 -
  36.296 -	kernel_fpu_end();
  36.297 -}
  36.298 -
  36.299 -static void fast_copy_page(void *to, void *from)
  36.300 -{
  36.301 -	int i;
  36.302 -	
  36.303 -	
  36.304 -	kernel_fpu_begin();
  36.305 -
  36.306 -	__asm__ __volatile__ (
  36.307 -		"1: prefetch (%0)\n"
  36.308 -		"   prefetch 64(%0)\n"
  36.309 -		"   prefetch 128(%0)\n"
  36.310 -		"   prefetch 192(%0)\n"
  36.311 -		"   prefetch 256(%0)\n"
  36.312 -		"2:  \n"
  36.313 -		".section .fixup, \"ax\"\n"
  36.314 -		"3: movw $0x1AEB, 1b\n"	/* jmp on 26 bytes */
  36.315 -		"   jmp 2b\n"
  36.316 -		".previous\n"
  36.317 -		".section __ex_table,\"a\"\n"
  36.318 -		"	.align 4\n"
  36.319 -		"	.long 1b, 3b\n"
  36.320 -		".previous"
  36.321 -		: : "r" (from) );
  36.322 -
  36.323 -	for(i=0; i<4096/64; i++)
  36.324 -	{
  36.325 -		__asm__ __volatile__ (
  36.326 -		"1: prefetch 320(%0)\n"
  36.327 -		"2: movq (%0), %%mm0\n"
  36.328 -		"   movq 8(%0), %%mm1\n"
  36.329 -		"   movq 16(%0), %%mm2\n"
  36.330 -		"   movq 24(%0), %%mm3\n"
  36.331 -		"   movq %%mm0, (%1)\n"
  36.332 -		"   movq %%mm1, 8(%1)\n"
  36.333 -		"   movq %%mm2, 16(%1)\n"
  36.334 -		"   movq %%mm3, 24(%1)\n"
  36.335 -		"   movq 32(%0), %%mm0\n"
  36.336 -		"   movq 40(%0), %%mm1\n"
  36.337 -		"   movq 48(%0), %%mm2\n"
  36.338 -		"   movq 56(%0), %%mm3\n"
  36.339 -		"   movq %%mm0, 32(%1)\n"
  36.340 -		"   movq %%mm1, 40(%1)\n"
  36.341 -		"   movq %%mm2, 48(%1)\n"
  36.342 -		"   movq %%mm3, 56(%1)\n"
  36.343 -		".section .fixup, \"ax\"\n"
  36.344 -		"3: movw $0x05EB, 1b\n"	/* jmp on 5 bytes */
  36.345 -		"   jmp 2b\n"
  36.346 -		".previous\n"
  36.347 -		".section __ex_table,\"a\"\n"
  36.348 -		"	.align 4\n"
  36.349 -		"	.long 1b, 3b\n"
  36.350 -		".previous"
  36.351 -		: : "r" (from), "r" (to) : "memory");
  36.352 -		from+=64;
  36.353 -		to+=64;
  36.354 -	}
  36.355 -	kernel_fpu_end();
  36.356 -}
  36.357 -
  36.358 -
  36.359 -#endif
  36.360 -
  36.361 -/*
  36.362 - *	Favour MMX for page clear and copy. 
  36.363 - */
  36.364 -
  36.365 -static void slow_zero_page(void * page)
  36.366 -{
  36.367 -	int d0, d1;
  36.368 -	__asm__ __volatile__( \
  36.369 -		"cld\n\t" \
  36.370 -		"rep ; stosl" \
  36.371 -		: "=&c" (d0), "=&D" (d1)
  36.372 -		:"a" (0),"1" (page),"0" (1024)
  36.373 -		:"memory");
  36.374 -}
  36.375 - 
  36.376 -void mmx_clear_page(void * page)
  36.377 -{
  36.378 -	if(in_interrupt())
  36.379 -		slow_zero_page(page);
  36.380 -	else
  36.381 -		fast_clear_page(page);
  36.382 -}
  36.383 -
  36.384 -static void slow_copy_page(void *to, void *from)
  36.385 -{
  36.386 -	int d0, d1, d2;
  36.387 -	__asm__ __volatile__( \
  36.388 -		"cld\n\t" \
  36.389 -		"rep ; movsl" \
  36.390 -		: "=&c" (d0), "=&D" (d1), "=&S" (d2) \
  36.391 -		: "0" (1024),"1" ((long) to),"2" ((long) from) \
  36.392 -		: "memory");
  36.393 -}
  36.394 -  
  36.395 -
  36.396 -void mmx_copy_page(void *to, void *from)
  36.397 -{
  36.398 -	if(in_interrupt())
  36.399 -		slow_copy_page(to, from);
  36.400 -	else
  36.401 -		fast_copy_page(to, from);
  36.402 -}
    37.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/old-checksum.c	Fri Mar 14 15:48:09 2003 +0000
    37.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.3 @@ -1,19 +0,0 @@
    37.4 -/*
    37.5 - * FIXME: old compatibility stuff, will be removed soon.
    37.6 - */
    37.7 -
    37.8 -#include <net/checksum.h>
    37.9 -
   37.10 -unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum)
   37.11 -{
   37.12 -	int src_err=0, dst_err=0;
   37.13 -
   37.14 -	sum = csum_partial_copy_generic ( src, dst, len, sum, &src_err, &dst_err);
   37.15 -
   37.16 -	if (src_err || dst_err)
   37.17 -		printk("old csum_partial_copy_fromuser(), tell mingo to convert me.\n");
   37.18 -
   37.19 -	return sum;
   37.20 -}
   37.21 -
   37.22 -
    38.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/strstr.c	Fri Mar 14 15:48:09 2003 +0000
    38.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    38.3 @@ -1,31 +0,0 @@
    38.4 -#include <linux/string.h>
    38.5 -
    38.6 -char * strstr(const char * cs,const char * ct)
    38.7 -{
    38.8 -int	d0, d1;
    38.9 -register char * __res;
   38.10 -__asm__ __volatile__(
   38.11 -	"movl %6,%%edi\n\t"
   38.12 -	"repne\n\t"
   38.13 -	"scasb\n\t"
   38.14 -	"notl %%ecx\n\t"
   38.15 -	"decl %%ecx\n\t"	/* NOTE! This also sets Z if searchstring='' */
   38.16 -	"movl %%ecx,%%edx\n"
   38.17 -	"1:\tmovl %6,%%edi\n\t"
   38.18 -	"movl %%esi,%%eax\n\t"
   38.19 -	"movl %%edx,%%ecx\n\t"
   38.20 -	"repe\n\t"
   38.21 -	"cmpsb\n\t"
   38.22 -	"je 2f\n\t"		/* also works for empty string, see above */
   38.23 -	"xchgl %%eax,%%esi\n\t"
   38.24 -	"incl %%esi\n\t"
   38.25 -	"cmpb $0,-1(%%eax)\n\t"
   38.26 -	"jne 1b\n\t"
   38.27 -	"xorl %%eax,%%eax\n\t"
   38.28 -	"2:"
   38.29 -	:"=a" (__res), "=&c" (d0), "=&S" (d1)
   38.30 -	:"0" (0), "1" (0xffffffff), "2" (cs), "g" (ct)
   38.31 -	:"dx", "di");
   38.32 -return __res;
   38.33 -}
   38.34 -
    39.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/lib/usercopy.c	Fri Mar 14 15:48:09 2003 +0000
    39.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    39.3 @@ -1,190 +0,0 @@
    39.4 -/* 
    39.5 - * User address space access functions.
    39.6 - * The non inlined parts of asm-i386/uaccess.h are here.
    39.7 - *
    39.8 - * Copyright 1997 Andi Kleen <ak@muc.de>
    39.9 - * Copyright 1997 Linus Torvalds
   39.10 - */
   39.11 -#include <linux/config.h>
   39.12 -#include <asm/uaccess.h>
   39.13 -#include <asm/mmx.h>
   39.14 -
   39.15 -#ifdef CONFIG_X86_USE_3DNOW_AND_WORKS
   39.16 -
   39.17 -unsigned long
   39.18 -__generic_copy_to_user(void *to, const void *from, unsigned long n)
   39.19 -{
   39.20 -	if (access_ok(VERIFY_WRITE, to, n))
   39.21 -	{
   39.22 -		if(n<512)
   39.23 -			__copy_user(to,from,n);
   39.24 -		else
   39.25 -			mmx_copy_user(to,from,n);
   39.26 -	}
   39.27 -	return n;
   39.28 -}
   39.29 -
   39.30 -unsigned long
   39.31 -__generic_copy_from_user(void *to, const void *from, unsigned long n)
   39.32 -{
   39.33 -	if (access_ok(VERIFY_READ, from, n))
   39.34 -	{
   39.35 -		if(n<512)
   39.36 -			__copy_user_zeroing(to,from,n);
   39.37 -		else
   39.38 -			mmx_copy_user_zeroing(to, from, n);
   39.39 -	}
   39.40 -	else
   39.41 -		memset(to, 0, n);
   39.42 -	return n;
   39.43 -}
   39.44 -
   39.45 -#else
   39.46 -
   39.47 -unsigned long
   39.48 -__generic_copy_to_user(void *to, const void *from, unsigned long n)
   39.49 -{
   39.50 -	prefetch(from);
   39.51 -	if (access_ok(VERIFY_WRITE, to, n))
   39.52 -		__copy_user(to,from,n);
   39.53 -	return n;
   39.54 -}
   39.55 -
   39.56 -unsigned long
   39.57 -__generic_copy_from_user(void *to, const void *from, unsigned long n)
   39.58 -{
   39.59 -	prefetchw(to);
   39.60 -	if (access_ok(VERIFY_READ, from, n))
   39.61 -		__copy_user_zeroing(to,from,n);
   39.62 -	else
   39.63 -		memset(to, 0, n);
   39.64 -	return n;
   39.65 -}
   39.66 -
   39.67 -#endif
   39.68 -
   39.69 -/*
   39.70 - * Copy a null terminated string from userspace.
   39.71 - */
   39.72 -
   39.73 -#define __do_strncpy_from_user(dst,src,count,res)			   \
   39.74 -do {									   \
   39.75 -	int __d0, __d1, __d2;						   \
   39.76 -	__asm__ __volatile__(						   \
   39.77 -		"	testl %1,%1\n"					   \
   39.78 -		"	jz 2f\n"					   \
   39.79 -		"0:	lodsb\n"					   \
   39.80 -		"	stosb\n"					   \
   39.81 -		"	testb %%al,%%al\n"				   \
   39.82 -		"	jz 1f\n"					   \
   39.83 -		"	decl %1\n"					   \
   39.84 -		"	jnz 0b\n"					   \
   39.85 -		"1:	subl %1,%0\n"					   \
   39.86 -		"2:\n"							   \
   39.87 -		".section .fixup,\"ax\"\n"				   \
   39.88 -		"3:	movl %5,%0\n"					   \
   39.89 -		"	jmp 2b\n"					   \
   39.90 -		".previous\n"						   \
   39.91 -		".section __ex_table,\"a\"\n"				   \
   39.92 -		"	.align 4\n"					   \
   39.93 -		"	.long 0b,3b\n"					   \
   39.94 -		".previous"						   \
   39.95 -		: "=d"(res), "=c"(count), "=&a" (__d0), "=&S" (__d1),	   \
   39.96 -		  "=&D" (__d2)						   \
   39.97 -		: "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \
   39.98 -		: "memory");						   \
   39.99 -} while (0)
  39.100 -
  39.101 -long
  39.102 -__strncpy_from_user(char *dst, const char *src, long count)
  39.103 -{
  39.104 -	long res;
  39.105 -	__do_strncpy_from_user(dst, src, count, res);
  39.106 -	return res;
  39.107 -}
  39.108 -
  39.109 -long
  39.110 -strncpy_from_user(char *dst, const char *src, long count)
  39.111 -{
  39.112 -	long res = -EFAULT;
  39.113 -	if (access_ok(VERIFY_READ, src, 1))
  39.114 -		__do_strncpy_from_user(dst, src, count, res);
  39.115 -	return res;
  39.116 -}
  39.117 -
  39.118 -
  39.119 -/*
  39.120 - * Zero Userspace
  39.121 - */
  39.122 -
  39.123 -#define __do_clear_user(addr,size)					\
  39.124 -do {									\
  39.125 -	int __d0;							\
  39.126 -  	__asm__ __volatile__(						\
  39.127 -		"0:	rep; stosl\n"					\
  39.128 -		"	movl %2,%0\n"					\
  39.129 -		"1:	rep; stosb\n"					\
  39.130 -		"2:\n"							\
  39.131 -		".section .fixup,\"ax\"\n"				\
  39.132 -		"3:	lea 0(%2,%0,4),%0\n"				\
  39.133 -		"	jmp 2b\n"					\
  39.134 -		".previous\n"						\
  39.135 -		".section __ex_table,\"a\"\n"				\
  39.136 -		"	.align 4\n"					\
  39.137 -		"	.long 0b,3b\n"					\
  39.138 -		"	.long 1b,2b\n"					\
  39.139 -		".previous"						\
  39.140 -		: "=&c"(size), "=&D" (__d0)				\
  39.141 -		: "r"(size & 3), "0"(size / 4), "1"(addr), "a"(0));	\
  39.142 -} while (0)
  39.143 -
  39.144 -unsigned long
  39.145 -clear_user(void *to, unsigned long n)
  39.146 -{
  39.147 -	if (access_ok(VERIFY_WRITE, to, n))
  39.148 -		__do_clear_user(to, n);
  39.149 -	return n;
  39.150 -}
  39.151 -
  39.152 -unsigned long
  39.153 -__clear_user(void *to, unsigned long n)
  39.154 -{
  39.155 -	__do_clear_user(to, n);
  39.156 -	return n;
  39.157 -}
  39.158 -
  39.159 -/*
  39.160 - * Return the size of a string (including the ending 0)
  39.161 - *
  39.162 - * Return 0 on exception, a value greater than N if too long
  39.163 - */
  39.164 -
  39.165 -long strnlen_user(const char *s, long n)
  39.166 -{
  39.167 -	unsigned long mask = -__addr_ok(s);
  39.168 -	unsigned long res, tmp;
  39.169 -
  39.170 -	__asm__ __volatile__(
  39.171 -		"	testl %0, %0\n"
  39.172 -		"	jz 3f\n"
  39.173 -		"	andl %0,%%ecx\n"
  39.174 -		"0:	repne; scasb\n"
  39.175 -		"	setne %%al\n"
  39.176 -		"	subl %%ecx,%0\n"
  39.177 -		"	addl %0,%%eax\n"
  39.178 -		"1:\n"
  39.179 -		".section .fixup,\"ax\"\n"
  39.180 -		"2:	xorl %%eax,%%eax\n"
  39.181 -		"	jmp 1b\n"
  39.182 -		"3:	movb $1,%%al\n"
  39.183 -		"	jmp 1b\n"
  39.184 -		".previous\n"
  39.185 -		".section __ex_table,\"a\"\n"
  39.186 -		"	.align 4\n"
  39.187 -		"	.long 0b,2b\n"
  39.188 -		".previous"
  39.189 -		:"=r" (n), "=D" (s), "=a" (res), "=c" (tmp)
  39.190 -		:"0" (n), "1" (s), "2" (0), "3" (mask)
  39.191 -		:"cc");
  39.192 -	return res & mask;
  39.193 -}
    40.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/extable.c	Fri Mar 14 15:48:09 2003 +0000
    40.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    40.3 @@ -1,62 +0,0 @@
    40.4 -/*
    40.5 - * linux/arch/i386/mm/extable.c
    40.6 - */
    40.7 -
    40.8 -#include <linux/config.h>
    40.9 -#include <linux/module.h>
   40.10 -#include <linux/spinlock.h>
   40.11 -#include <asm/uaccess.h>
   40.12 -
   40.13 -extern const struct exception_table_entry __start___ex_table[];
   40.14 -extern const struct exception_table_entry __stop___ex_table[];
   40.15 -
   40.16 -static inline unsigned long
   40.17 -search_one_table(const struct exception_table_entry *first,
   40.18 -		 const struct exception_table_entry *last,
   40.19 -		 unsigned long value)
   40.20 -{
   40.21 -        while (first <= last) {
   40.22 -		const struct exception_table_entry *mid;
   40.23 -		long diff;
   40.24 -
   40.25 -		mid = (last - first) / 2 + first;
   40.26 -		diff = mid->insn - value;
   40.27 -                if (diff == 0)
   40.28 -                        return mid->fixup;
   40.29 -                else if (diff < 0)
   40.30 -                        first = mid+1;
   40.31 -                else
   40.32 -                        last = mid-1;
   40.33 -        }
   40.34 -        return 0;
   40.35 -}
   40.36 -
   40.37 -extern spinlock_t modlist_lock;
   40.38 -
   40.39 -unsigned long
   40.40 -search_exception_table(unsigned long addr)
   40.41 -{
   40.42 -	unsigned long ret = 0;
   40.43 -	
   40.44 -#ifndef CONFIG_MODULES
   40.45 -	/* There is only the kernel to search.  */
   40.46 -	ret = search_one_table(__start___ex_table, __stop___ex_table-1, addr);
   40.47 -	return ret;
   40.48 -#else
   40.49 -	unsigned long flags;
   40.50 -	/* The kernel is the last "module" -- no need to treat it special.  */
   40.51 -	struct module *mp;
   40.52 -
   40.53 -	spin_lock_irqsave(&modlist_lock, flags);
   40.54 -	for (mp = module_list; mp != NULL; mp = mp->next) {
   40.55 -		if (mp->ex_table_start == NULL || !(mp->flags&(MOD_RUNNING|MOD_INITIALIZING)))
   40.56 -			continue;
   40.57 -		ret = search_one_table(mp->ex_table_start,
   40.58 -				       mp->ex_table_end - 1, addr);
   40.59 -		if (ret)
   40.60 -			break;
   40.61 -	}
   40.62 -	spin_unlock_irqrestore(&modlist_lock, flags);
   40.63 -	return ret;
   40.64 -#endif
   40.65 -}
    41.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/mm/pageattr.c	Fri Mar 14 15:48:09 2003 +0000
    41.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    41.3 @@ -1,175 +0,0 @@
    41.4 -/* 
    41.5 - * Copyright 2002 Andi Kleen, SuSE Labs. 
    41.6 - * Thanks to Ben LaHaise for precious feedback.
    41.7 - */ 
    41.8 -
    41.9 -#include <linux/config.h>
   41.10 -#include <linux/mm.h>
   41.11 -#include <linux/sched.h>
   41.12 -#include <linux/highmem.h>
   41.13 -#include <linux/module.h>
   41.14 -#include <asm/uaccess.h>
   41.15 -#include <asm/processor.h>
   41.16 -
   41.17 -/* Should move most of this stuff into the appropiate includes */
   41.18 -#define LARGE_PAGE_MASK (~(LARGE_PAGE_SIZE-1))
   41.19 -#define LARGE_PAGE_SIZE (1UL << PMD_SHIFT)
   41.20 -
   41.21 -static inline pte_t *lookup_address(unsigned long address) 
   41.22 -{ 
   41.23 -	pmd_t *pmd;	
   41.24 -	pgd_t *pgd = pgd_offset(&init_mm, address); 
   41.25 -
   41.26 -	if (pgd_none(*pgd))
   41.27 -		return NULL; 
   41.28 -	if (pgd_val(*pgd) & _PAGE_PSE)
   41.29 -		return (pte_t *)pgd; 
   41.30 -	pmd = pmd_offset(pgd, address); 	       
   41.31 -	if (pmd_none(*pmd))
   41.32 -		return NULL; 
   41.33 -	if (pmd_val(*pmd) & _PAGE_PSE) 
   41.34 -		return (pte_t *)pmd; 
   41.35 -    return pte_offset(pmd, address);
   41.36 -} 
   41.37 -
   41.38 -static struct page *split_large_page(unsigned long address, pgprot_t prot)
   41.39 -{ 
   41.40 -	int i; 
   41.41 -	unsigned long addr;
   41.42 -	struct page *base = alloc_pages(GFP_KERNEL, 0);
   41.43 -	pte_t *pbase;
   41.44 -	if (!base) 
   41.45 -		return NULL;
   41.46 -	address = __pa(address);
   41.47 -	addr = address & LARGE_PAGE_MASK; 
   41.48 -	pbase = (pte_t *)page_address(base);
   41.49 -	for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) {
   41.50 -		pbase[i] = mk_pte_phys(addr, 
   41.51 -				      addr == address ? prot : PAGE_KERNEL);
   41.52 -	}
   41.53 -	return base;
   41.54 -} 
   41.55 -
   41.56 -static void flush_kernel_map(void * address) 
   41.57 -{ 
   41.58 -	if (!test_bit(X86_FEATURE_SELFSNOOP, boot_cpu_data.x86_capability)) {
   41.59 -		/* Could use CLFLUSH here if the CPU supports it (Hammer,P4) */
   41.60 -		if (boot_cpu_data.x86_model >= 4) 
   41.61 -			asm volatile("wbinvd":::"memory"); 	
   41.62 -	} 
   41.63 -
   41.64 -	/* Do global flush here to work around large page flushing errata 
   41.65 -	   in some early Athlons */
   41.66 -	__flush_tlb_all(); 	
   41.67 -}
   41.68 -
   41.69 -static void set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte) 
   41.70 -{ 
   41.71 -	set_pte_atomic(kpte, pte); 	/* change init_mm */
   41.72 -#ifndef CONFIG_X86_PAE
   41.73 -	{
   41.74 -		struct list_head *l;
   41.75 -		spin_lock(&mmlist_lock);
   41.76 -		list_for_each(l, &init_mm.mmlist) { 
   41.77 -			struct mm_struct *mm = list_entry(l, struct mm_struct, mmlist);
   41.78 -			pmd_t *pmd = pmd_offset(pgd_offset(mm, address), address);
   41.79 -			set_pte_atomic((pte_t *)pmd, pte);
   41.80 -		} 
   41.81 -		spin_unlock(&mmlist_lock);
   41.82 -	}
   41.83 -#endif
   41.84 -}
   41.85 -
   41.86 -/* no more special protections in this 2/4MB area - revert to a
   41.87 -   large page again. */
   41.88 -static inline void revert_page(struct page *kpte_page, unsigned long address)
   41.89 -{
   41.90 -	pte_t *linear = (pte_t *) 
   41.91 -		pmd_offset(pgd_offset(&init_mm, address), address);
   41.92 -	set_pmd_pte(linear,  address,
   41.93 -		mk_pte_phys(__pa(address & LARGE_PAGE_MASK),
   41.94 -			    MAKE_GLOBAL(_KERNPG_TABLE|_PAGE_PSE)));
   41.95 -}	
   41.96 - 
   41.97 -/*
   41.98 - * Change the page attributes of an page in the linear mapping.
   41.99 - *
  41.100 - * This should be used when a page is mapped with a different caching policy
  41.101 - * than write-back somewhere - some CPUs do not like it when mappings with
  41.102 - * different caching policies exist. This changes the page attributes of the
  41.103 - * in kernel linear mapping too.
  41.104 - * 
  41.105 - * The caller needs to ensure that there are no conflicting mappings elsewhere.
  41.106 - * This function only deals with the kernel linear map.
  41.107 - * When page is in highmem it must never be kmap'ed.
  41.108 - */
  41.109 -static int 
  41.110 -__change_page_attr(struct page *page, pgprot_t prot, struct page **oldpage) 
  41.111 -{ 
  41.112 -	pte_t *kpte; 
  41.113 -	unsigned long address;
  41.114 -	struct page *kpte_page;
  41.115 -
  41.116 -#ifdef CONFIG_HIGHMEM
  41.117 -	if (page >= highmem_start_page) 
  41.118 -		BUG(); 
  41.119 -#endif
  41.120 -	address = (unsigned long)page_address(page);
  41.121 -	kpte = lookup_address(address);
  41.122 -	if (!kpte) 
  41.123 -		return -EINVAL; 
  41.124 -	kpte_page = virt_to_page(((unsigned long)kpte) & PAGE_MASK);
  41.125 -	if (pgprot_val(prot) != pgprot_val(PAGE_KERNEL)) { 
  41.126 -		if ((pte_val(*kpte) & _PAGE_PSE) == 0) {
  41.127 -			pte_t old = *kpte;
  41.128 -			pte_t standard = mk_pte(page, PAGE_KERNEL); 
  41.129 -
  41.130 -			set_pte_atomic(kpte, mk_pte(page, prot)); 
  41.131 -			if (pte_same(old,standard))
  41.132 -				atomic_inc(&kpte_page->count);
  41.133 -		} else {
  41.134 -			struct page *split = split_large_page(address, prot); 
  41.135 -			if (!split)
  41.136 -				return -ENOMEM;
  41.137 -			atomic_inc(&kpte_page->count); 	
  41.138 -			set_pmd_pte(kpte,address,mk_pte(split, PAGE_KERNEL));
  41.139 -		}	
  41.140 -	} else if ((pte_val(*kpte) & _PAGE_PSE) == 0) { 
  41.141 -		set_pte_atomic(kpte, mk_pte(page, PAGE_KERNEL));
  41.142 -		atomic_dec(&kpte_page->count); 
  41.143 -	}
  41.144 -
  41.145 -	if (cpu_has_pse && (atomic_read(&kpte_page->count) == 1)) { 
  41.146 -		*oldpage = kpte_page;
  41.147 -		revert_page(kpte_page, address);
  41.148 -	} 
  41.149 -	return 0;
  41.150 -} 
  41.151 -
  41.152 -int change_page_attr(struct page *page, int numpages, pgprot_t prot)
  41.153 -{
  41.154 -	int err = 0; 
  41.155 -	struct page *fpage; 
  41.156 -	int i; 
  41.157 -
  41.158 -	down_write(&init_mm.mmap_sem);
  41.159 -	for (i = 0; i < numpages; i++, page++) { 
  41.160 -		fpage = NULL;
  41.161 -		err = __change_page_attr(page, prot, &fpage); 
  41.162 -		if (err) 
  41.163 -			break; 
  41.164 -		if (fpage || i == numpages-1) { 
  41.165 -			void *address = page_address(page);
  41.166 -#ifdef CONFIG_SMP 
  41.167 -			smp_call_function(flush_kernel_map, address, 1, 1);
  41.168 -#endif	
  41.169 -			flush_kernel_map(address);
  41.170 -			if (fpage)
  41.171 -				__free_page(fpage);
  41.172 -		} 
  41.173 -	} 	
  41.174 -	up_write(&init_mm.mmap_sem); 
  41.175 -	return err;
  41.176 -}
  41.177 -
  41.178 -EXPORT_SYMBOL(change_page_attr);
    42.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/a.out.h	Fri Mar 14 15:48:09 2003 +0000
    42.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    42.3 @@ -1,26 +0,0 @@
    42.4 -#ifndef __I386_A_OUT_H__
    42.5 -#define __I386_A_OUT_H__
    42.6 -
    42.7 -struct exec
    42.8 -{
    42.9 -  unsigned long a_info;		/* Use macros N_MAGIC, etc for access */
   42.10 -  unsigned a_text;		/* length of text, in bytes */
   42.11 -  unsigned a_data;		/* length of data, in bytes */
   42.12 -  unsigned a_bss;		/* length of uninitialized data area for file, in bytes */
   42.13 -  unsigned a_syms;		/* length of symbol table data in file, in bytes */
   42.14 -  unsigned a_entry;		/* start address */
   42.15 -  unsigned a_trsize;		/* length of relocation info for text, in bytes */
   42.16 -  unsigned a_drsize;		/* length of relocation info for data, in bytes */
   42.17 -};
   42.18 -
   42.19 -#define N_TRSIZE(a)	((a).a_trsize)
   42.20 -#define N_DRSIZE(a)	((a).a_drsize)
   42.21 -#define N_SYMSIZE(a)	((a).a_syms)
   42.22 -
   42.23 -#ifdef __KERNEL__
   42.24 -
   42.25 -#define STACK_TOP	TASK_SIZE
   42.26 -
   42.27 -#endif
   42.28 -
   42.29 -#endif /* __A_OUT_GNU_H__ */
    43.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apic.h	Fri Mar 14 15:48:09 2003 +0000
    43.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    43.3 @@ -1,99 +0,0 @@
    43.4 -#ifndef __ASM_APIC_H
    43.5 -#define __ASM_APIC_H
    43.6 -
    43.7 -#include <linux/config.h>
    43.8 -#include <linux/pm.h>
    43.9 -#include <asm/apicdef.h>
   43.10 -#include <asm/system.h>
   43.11 -
   43.12 -#ifdef CONFIG_X86_LOCAL_APIC
   43.13 -
   43.14 -#define APIC_DEBUG 0
   43.15 -
   43.16 -#if APIC_DEBUG
   43.17 -#define Dprintk(x...) printk(x)
   43.18 -#else
   43.19 -#define Dprintk(x...)
   43.20 -#endif
   43.21 -
   43.22 -/*
   43.23 - * Basic functions accessing APICs.
   43.24 - */
   43.25 -
   43.26 -static __inline void apic_write(unsigned long reg, unsigned long v)
   43.27 -{
   43.28 -	*((volatile unsigned long *)(APIC_BASE+reg)) = v;
   43.29 -}
   43.30 -
   43.31 -static __inline void apic_write_atomic(unsigned long reg, unsigned long v)
   43.32 -{
   43.33 -	xchg((volatile unsigned long *)(APIC_BASE+reg), v);
   43.34 -}
   43.35 -
   43.36 -static __inline unsigned long apic_read(unsigned long reg)
   43.37 -{
   43.38 -	return *((volatile unsigned long *)(APIC_BASE+reg));
   43.39 -}
   43.40 -
   43.41 -static __inline__ void apic_wait_icr_idle(void)
   43.42 -{
   43.43 -	do { } while ( apic_read( APIC_ICR ) & APIC_ICR_BUSY );
   43.44 -}
   43.45 -
   43.46 -#ifdef CONFIG_X86_GOOD_APIC
   43.47 -# define FORCE_READ_AROUND_WRITE 0
   43.48 -# define apic_read_around(x)
   43.49 -# define apic_write_around(x,y) apic_write((x),(y))
   43.50 -#else
   43.51 -# define FORCE_READ_AROUND_WRITE 1
   43.52 -# define apic_read_around(x) apic_read(x)
   43.53 -# define apic_write_around(x,y) apic_write_atomic((x),(y))
   43.54 -#endif
   43.55 -
   43.56 -static inline void ack_APIC_irq(void)
   43.57 -{
   43.58 -	/*
   43.59 -	 * ack_APIC_irq() actually gets compiled as a single instruction:
   43.60 -	 * - a single rmw on Pentium/82489DX
   43.61 -	 * - a single write on P6+ cores (CONFIG_X86_GOOD_APIC)
   43.62 -	 * ... yummie.
   43.63 -	 */
   43.64 -
   43.65 -	/* Docs say use 0 for future compatibility */
   43.66 -	apic_write_around(APIC_EOI, 0);
   43.67 -}
   43.68 -
   43.69 -extern int get_maxlvt(void);
   43.70 -extern void clear_local_APIC(void);
   43.71 -extern void connect_bsp_APIC (void);
   43.72 -extern void disconnect_bsp_APIC (void);
   43.73 -extern void disable_local_APIC (void);
   43.74 -extern int verify_local_APIC (void);
   43.75 -extern void cache_APIC_registers (void);
   43.76 -extern void sync_Arb_IDs (void);
   43.77 -extern void init_bsp_APIC (void);
   43.78 -extern void setup_local_APIC (void);
   43.79 -extern void init_apic_mappings (void);
   43.80 -extern void smp_local_timer_interrupt (struct pt_regs * regs);
   43.81 -extern void setup_APIC_clocks (void);
   43.82 -extern void setup_apic_nmi_watchdog (void);
   43.83 -extern inline void nmi_watchdog_tick (struct pt_regs * regs);
   43.84 -extern int APIC_init_uniprocessor (void);
   43.85 -extern void disable_APIC_timer(void);
   43.86 -extern void enable_APIC_timer(void);
   43.87 -
   43.88 -extern struct pm_dev *apic_pm_register(pm_dev_t, unsigned long, pm_callback);
   43.89 -extern void apic_pm_unregister(struct pm_dev*);
   43.90 -
   43.91 -extern unsigned int apic_timer_irqs [NR_CPUS];
   43.92 -extern int check_nmi_watchdog (void);
   43.93 -
   43.94 -extern unsigned int nmi_watchdog;
   43.95 -#define NMI_NONE	0
   43.96 -#define NMI_IO_APIC	1
   43.97 -#define NMI_LOCAL_APIC	2
   43.98 -#define NMI_INVALID	3
   43.99 -
  43.100 -#endif /* CONFIG_X86_LOCAL_APIC */
  43.101 -
  43.102 -#endif /* __ASM_APIC_H */
    44.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/apicdef.h	Fri Mar 14 15:48:09 2003 +0000
    44.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    44.3 @@ -1,378 +0,0 @@
    44.4 -#ifndef __ASM_APICDEF_H
    44.5 -#define __ASM_APICDEF_H
    44.6 -
    44.7 -/*
    44.8 - * Constants for various Intel APICs. (local APIC, IOAPIC, etc.)
    44.9 - *
   44.10 - * Alan Cox <Alan.Cox@linux.org>, 1995.
   44.11 - * Ingo Molnar <mingo@redhat.com>, 1999, 2000
   44.12 - */
   44.13 -
   44.14 -#define		APIC_DEFAULT_PHYS_BASE	0xfee00000
   44.15 - 
   44.16 -#define		APIC_ID		0x20
   44.17 -#define			APIC_ID_MASK		(0x0F<<24)
   44.18 -#define			GET_APIC_ID(x)		(((x)>>24)&0x0F)
   44.19 -#define		APIC_LVR	0x30
   44.20 -#define			APIC_LVR_MASK		0xFF00FF
   44.21 -#define			GET_APIC_VERSION(x)	((x)&0xFF)
   44.22 -#define			GET_APIC_MAXLVT(x)	(((x)>>16)&0xFF)
   44.23 -#define			APIC_INTEGRATED(x)	((x)&0xF0)
   44.24 -#define		APIC_TASKPRI	0x80
   44.25 -#define			APIC_TPRI_MASK		0xFF
   44.26 -#define		APIC_ARBPRI	0x90
   44.27 -#define			APIC_ARBPRI_MASK	0xFF
   44.28 -#define		APIC_PROCPRI	0xA0
   44.29 -#define		APIC_EOI	0xB0
   44.30 -#define			APIC_EIO_ACK		0x0		/* Write this to the EOI register */
   44.31 -#define		APIC_RRR	0xC0
   44.32 -#define		APIC_LDR	0xD0
   44.33 -#define			APIC_LDR_MASK		(0xFF<<24)
   44.34 -#define			GET_APIC_LOGICAL_ID(x)	(((x)>>24)&0xFF)
   44.35 -#define			SET_APIC_LOGICAL_ID(x)	(((x)<<24))
   44.36 -#define			APIC_ALL_CPUS		0xFF
   44.37 -#define		APIC_DFR	0xE0
   44.38 -#define			APIC_DFR_CLUSTER	0x0FFFFFFFul	/* Clustered */
   44.39 -#define			APIC_DFR_FLAT		0xFFFFFFFFul	/* Flat mode */
   44.40 -#define		APIC_SPIV	0xF0
   44.41 -#define			APIC_SPIV_FOCUS_DISABLED	(1<<9)
   44.42 -#define			APIC_SPIV_APIC_ENABLED		(1<<8)
   44.43 -#define		APIC_ISR	0x100
   44.44 -#define		APIC_TMR	0x180
   44.45 -#define 	APIC_IRR	0x200
   44.46 -#define 	APIC_ESR	0x280
   44.47 -#define			APIC_ESR_SEND_CS	0x00001
   44.48 -#define			APIC_ESR_RECV_CS	0x00002
   44.49 -#define			APIC_ESR_SEND_ACC	0x00004
   44.50 -#define			APIC_ESR_RECV_ACC	0x00008
   44.51 -#define			APIC_ESR_SENDILL	0x00020
   44.52 -#define			APIC_ESR_RECVILL	0x00040
   44.53 -#define			APIC_ESR_ILLREGA	0x00080
   44.54 -#define		APIC_ICR	0x300
   44.55 -#define			APIC_DEST_SELF		0x40000
   44.56 -#define			APIC_DEST_ALLINC	0x80000
   44.57 -#define			APIC_DEST_ALLBUT	0xC0000
   44.58 -#define			APIC_ICR_RR_MASK	0x30000
   44.59 -#define			APIC_ICR_RR_INVALID	0x00000
   44.60 -#define			APIC_ICR_RR_INPROG	0x10000
   44.61 -#define			APIC_ICR_RR_VALID	0x20000
   44.62 -#define			APIC_INT_LEVELTRIG	0x08000
   44.63 -#define			APIC_INT_ASSERT		0x04000
   44.64 -#define			APIC_ICR_BUSY		0x01000
   44.65 -#define			APIC_DEST_PHYSICAL	0x00000
   44.66 -#define			APIC_DEST_LOGICAL	0x00800
   44.67 -#define			APIC_DM_FIXED		0x00000
   44.68 -#define			APIC_DM_LOWEST		0x00100
   44.69 -#define			APIC_DM_SMI		0x00200
   44.70 -#define			APIC_DM_REMRD		0x00300
   44.71 -#define			APIC_DM_NMI		0x00400
   44.72 -#define			APIC_DM_INIT		0x00500
   44.73 -#define			APIC_DM_STARTUP		0x00600
   44.74 -#define			APIC_DM_EXTINT		0x00700
   44.75 -#define			APIC_VECTOR_MASK	0x000FF
   44.76 -#define		APIC_ICR2	0x310
   44.77 -#define			GET_APIC_DEST_FIELD(x)	(((x)>>24)&0xFF)
   44.78 -#define			SET_APIC_DEST_FIELD(x)	((x)<<24)
   44.79 -#define		APIC_LVTT	0x320
   44.80 -#define		APIC_LVTPC	0x340
   44.81 -#define		APIC_LVT0	0x350
   44.82 -#define			APIC_LVT_TIMER_BASE_MASK	(0x3<<18)
   44.83 -#define			GET_APIC_TIMER_BASE(x)		(((x)>>18)&0x3)
   44.84 -#define			SET_APIC_TIMER_BASE(x)		(((x)<<18))
   44.85 -#define			APIC_TIMER_BASE_CLKIN		0x0
   44.86 -#define			APIC_TIMER_BASE_TMBASE		0x1
   44.87 -#define			APIC_TIMER_BASE_DIV		0x2
   44.88 -#define			APIC_LVT_TIMER_PERIODIC		(1<<17)
   44.89 -#define			APIC_LVT_MASKED			(1<<16)
   44.90 -#define			APIC_LVT_LEVEL_TRIGGER		(1<<15)
   44.91 -#define			APIC_LVT_REMOTE_IRR		(1<<14)
   44.92 -#define			APIC_INPUT_POLARITY		(1<<13)
   44.93 -#define			APIC_SEND_PENDING		(1<<12)
   44.94 -#define			GET_APIC_DELIVERY_MODE(x)	(((x)>>8)&0x7)
   44.95 -#define			SET_APIC_DELIVERY_MODE(x,y)	(((x)&~0x700)|((y)<<8))
   44.96 -#define				APIC_MODE_FIXED		0x0
   44.97 -#define				APIC_MODE_NMI		0x4
   44.98 -#define				APIC_MODE_EXINT		0x7
   44.99 -#define 	APIC_LVT1	0x360
  44.100 -#define		APIC_LVTERR	0x370
  44.101 -#define		APIC_TMICT	0x380
  44.102 -#define		APIC_TMCCT	0x390
  44.103 -#define		APIC_TDCR	0x3E0
  44.104 -#define			APIC_TDR_DIV_TMBASE	(1<<2)
  44.105 -#define			APIC_TDR_DIV_1		0xB
  44.106 -#define			APIC_TDR_DIV_2		0x0
  44.107 -#define			APIC_TDR_DIV_4		0x1
  44.108 -#define			APIC_TDR_DIV_8		0x2
  44.109 -#define			APIC_TDR_DIV_16		0x3
  44.110 -#define			APIC_TDR_DIV_32		0x8
  44.111 -#define			APIC_TDR_DIV_64		0x9
  44.112 -#define			APIC_TDR_DIV_128	0xA
  44.113 -
  44.114 -#define APIC_BASE (fix_to_virt(FIX_APIC_BASE))
  44.115 -
  44.116 -#ifdef CONFIG_X86_CLUSTERED_APIC
  44.117 -#define MAX_IO_APICS 32
  44.118 -#else
  44.119 -#define MAX_IO_APICS 8
  44.120 -#endif
  44.121 -
  44.122 -
  44.123 -/*
  44.124 - * The broadcast ID is 0xF for old APICs and 0xFF for xAPICs.  SAPICs
  44.125 - * don't broadcast (yet?), but if they did, they might use 0xFFFF.
  44.126 - */
  44.127 -#define APIC_BROADCAST_ID_XAPIC (0xFF)
  44.128 -#define APIC_BROADCAST_ID_APIC  (0x0F)
  44.129 -
  44.130 -/*
  44.131 - * the local APIC register structure, memory mapped. Not terribly well
  44.132 - * tested, but we might eventually use this one in the future - the
  44.133 - * problem why we cannot use it right now is the P5 APIC, it has an
  44.134 - * errata which cannot take 8-bit reads and writes, only 32-bit ones ...
  44.135 - */
  44.136 -#define u32 unsigned int
  44.137 -
  44.138 -#define lapic ((volatile struct local_apic *)APIC_BASE)
  44.139 -
  44.140 -struct local_apic {
  44.141 -
  44.142 -/*000*/	struct { u32 __reserved[4]; } __reserved_01;
  44.143 -
  44.144 -/*010*/	struct { u32 __reserved[4]; } __reserved_02;
  44.145 -
  44.146 -/*020*/	struct { /* APIC ID Register */
  44.147 -		u32   __reserved_1	: 24,
  44.148 -			phys_apic_id	:  4,
  44.149 -			__reserved_2	:  4;
  44.150 -		u32 __reserved[3];
  44.151 -	} id;
  44.152 -
  44.153 -/*030*/	const
  44.154 -	struct { /* APIC Version Register */
  44.155 -		u32   version		:  8,
  44.156 -			__reserved_1	:  8,
  44.157 -			max_lvt		:  8,
  44.158 -			__reserved_2	:  8;
  44.159 -		u32 __reserved[3];
  44.160 -	} version;
  44.161 -
  44.162 -/*040*/	struct { u32 __reserved[4]; } __reserved_03;
  44.163 -
  44.164 -/*050*/	struct { u32 __reserved[4]; } __reserved_04;
  44.165 -
  44.166 -/*060*/	struct { u32 __reserved[4]; } __reserved_05;
  44.167 -
  44.168 -/*070*/	struct { u32 __reserved[4]; } __reserved_06;
  44.169 -
  44.170 -/*080*/	struct { /* Task Priority Register */
  44.171 -		u32   priority	:  8,
  44.172 -			__reserved_1	: 24;
  44.173 -		u32 __reserved_2[3];
  44.174 -	} tpr;
  44.175 -
  44.176 -/*090*/	const
  44.177 -	struct { /* Arbitration Priority Register */
  44.178 -		u32   priority	:  8,
  44.179 -			__reserved_1	: 24;
  44.180 -		u32 __reserved_2[3];
  44.181 -	} apr;
  44.182 -
  44.183 -/*0A0*/	const
  44.184 -	struct { /* Processor Priority Register */
  44.185 -		u32   priority	:  8,
  44.186 -			__reserved_1	: 24;
  44.187 -		u32 __reserved_2[3];
  44.188 -	} ppr;
  44.189 -
  44.190 -/*0B0*/	struct { /* End Of Interrupt Register */
  44.191 -		u32   eoi;
  44.192 -		u32 __reserved[3];
  44.193 -	} eoi;
  44.194 -
  44.195 -/*0C0*/	struct { u32 __reserved[4]; } __reserved_07;
  44.196 -
  44.197 -/*0D0*/	struct { /* Logical Destination Register */
  44.198 -		u32   __reserved_1	: 24,
  44.199 -			logical_dest	:  8;
  44.200 -		u32 __reserved_2[3];
  44.201 -	} ldr;
  44.202 -
  44.203 -/*0E0*/	struct { /* Destination Format Register */
  44.204 -		u32   __reserved_1	: 28,
  44.205 -			model		:  4;
  44.206 -		u32 __reserved_2[3];
  44.207 -	} dfr;
  44.208 -
  44.209 -/*0F0*/	struct { /* Spurious Interrupt Vector Register */
  44.210 -		u32	spurious_vector	:  8,
  44.211 -			apic_enabled	:  1,
  44.212 -			focus_cpu	:  1,
  44.213 -			__reserved_2	: 22;
  44.214 -		u32 __reserved_3[3];
  44.215 -	} svr;
  44.216 -
  44.217 -/*100*/	struct { /* In Service Register */
  44.218 -/*170*/		u32 bitfield;
  44.219 -		u32 __reserved[3];
  44.220 -	} isr [8];
  44.221 -
  44.222 -/*180*/	struct { /* Trigger Mode Register */
  44.223 -/*1F0*/		u32 bitfield;
  44.224 -		u32 __reserved[3];
  44.225 -	} tmr [8];
  44.226 -
  44.227 -/*200*/	struct { /* Interrupt Request Register */
  44.228 -/*270*/		u32 bitfield;
  44.229 -		u32 __reserved[3];
  44.230 -	} irr [8];
  44.231 -
  44.232 -/*280*/	union { /* Error Status Register */
  44.233 -		struct {
  44.234 -			u32   send_cs_error			:  1,
  44.235 -				receive_cs_error		:  1,
  44.236 -				send_accept_error		:  1,
  44.237 -				receive_accept_error		:  1,
  44.238 -				__reserved_1			:  1,
  44.239 -				send_illegal_vector		:  1,
  44.240 -				receive_illegal_vector		:  1,
  44.241 -				illegal_register_address	:  1,
  44.242 -				__reserved_2			: 24;
  44.243 -			u32 __reserved_3[3];
  44.244 -		} error_bits;
  44.245 -		struct {
  44.246 -			u32 errors;
  44.247 -			u32 __reserved_3[3];
  44.248 -		} all_errors;
  44.249 -	} esr;
  44.250 -
  44.251 -/*290*/	struct { u32 __reserved[4]; } __reserved_08;
  44.252 -
  44.253 -/*2A0*/	struct { u32 __reserved[4]; } __reserved_09;
  44.254 -
  44.255 -/*2B0*/	struct { u32 __reserved[4]; } __reserved_10;
  44.256 -
  44.257 -/*2C0*/	struct { u32 __reserved[4]; } __reserved_11;
  44.258 -
  44.259 -/*2D0*/	struct { u32 __reserved[4]; } __reserved_12;
  44.260 -
  44.261 -/*2E0*/	struct { u32 __reserved[4]; } __reserved_13;
  44.262 -
  44.263 -/*2F0*/	struct { u32 __reserved[4]; } __reserved_14;
  44.264 -
  44.265 -/*300*/	struct { /* Interrupt Command Register 1 */
  44.266 -		u32   vector			:  8,
  44.267 -			delivery_mode		:  3,
  44.268 -			destination_mode	:  1,
  44.269 -			delivery_status		:  1,
  44.270 -			__reserved_1		:  1,
  44.271 -			level			:  1,
  44.272 -			trigger			:  1,
  44.273 -			__reserved_2		:  2,
  44.274 -			shorthand		:  2,
  44.275 -			__reserved_3		:  12;
  44.276 -		u32 __reserved_4[3];
  44.277 -	} icr1;
  44.278 -
  44.279 -/*310*/	struct { /* Interrupt Command Register 2 */
  44.280 -		union {
  44.281 -			u32   __reserved_1	: 24,
  44.282 -				phys_dest	:  4,
  44.283 -				__reserved_2	:  4;
  44.284 -			u32   __reserved_3	: 24,
  44.285 -				logical_dest	:  8;
  44.286 -		} dest;
  44.287 -		u32 __reserved_4[3];
  44.288 -	} icr2;
  44.289 -
  44.290 -/*320*/	struct { /* LVT - Timer */
  44.291 -		u32   vector		:  8,
  44.292 -			__reserved_1	:  4,
  44.293 -			delivery_status	:  1,
  44.294 -			__reserved_2	:  3,
  44.295 -			mask		:  1,
  44.296 -			timer_mode	:  1,
  44.297 -			__reserved_3	: 14;
  44.298 -		u32 __reserved_4[3];
  44.299 -	} lvt_timer;
  44.300 -
  44.301 -/*330*/	struct { u32 __reserved[4]; } __reserved_15;
  44.302 -
  44.303 -/*340*/	struct { /* LVT - Performance Counter */
  44.304 -		u32   vector		:  8,
  44.305 -			delivery_mode	:  3,
  44.306 -			__reserved_1	:  1,
  44.307 -			delivery_status	:  1,
  44.308 -			__reserved_2	:  3,
  44.309 -			mask		:  1,
  44.310 -			__reserved_3	: 15;
  44.311 -		u32 __reserved_4[3];
  44.312 -	} lvt_pc;
  44.313 -
  44.314 -/*350*/	struct { /* LVT - LINT0 */
  44.315 -		u32   vector		:  8,
  44.316 -			delivery_mode	:  3,
  44.317 -			__reserved_1	:  1,
  44.318 -			delivery_status	:  1,
  44.319 -			polarity	:  1,
  44.320 -			remote_irr	:  1,
  44.321 -			trigger		:  1,
  44.322 -			mask		:  1,
  44.323 -			__reserved_2	: 15;
  44.324 -		u32 __reserved_3[3];
  44.325 -	} lvt_lint0;
  44.326 -
  44.327 -/*360*/	struct { /* LVT - LINT1 */
  44.328 -		u32   vector		:  8,
  44.329 -			delivery_mode	:  3,
  44.330 -			__reserved_1	:  1,
  44.331 -			delivery_status	:  1,
  44.332 -			polarity	:  1,
  44.333 -			remote_irr	:  1,
  44.334 -			trigger		:  1,
  44.335 -			mask		:  1,
  44.336 -			__reserved_2	: 15;
  44.337 -		u32 __reserved_3[3];
  44.338 -	} lvt_lint1;
  44.339 -
  44.340 -/*370*/	struct { /* LVT - Error */
  44.341 -		u32   vector		:  8,
  44.342 -			__reserved_1	:  4,
  44.343 -			delivery_status	:  1,
  44.344 -			__reserved_2	:  3,
  44.345 -			mask		:  1,
  44.346 -			__reserved_3	: 15;
  44.347 -		u32 __reserved_4[3];
  44.348 -	} lvt_error;
  44.349 -
  44.350 -/*380*/	struct { /* Timer Initial Count Register */
  44.351 -		u32   initial_count;
  44.352 -		u32 __reserved_2[3];
  44.353 -	} timer_icr;
  44.354 -
  44.355 -/*390*/	const
  44.356 -	struct { /* Timer Current Count Register */
  44.357 -		u32   curr_count;
  44.358 -		u32 __reserved_2[3];
  44.359 -	} timer_ccr;
  44.360 -
  44.361 -/*3A0*/	struct { u32 __reserved[4]; } __reserved_16;
  44.362 -
  44.363 -/*3B0*/	struct { u32 __reserved[4]; } __reserved_17;
  44.364 -
  44.365 -/*3C0*/	struct { u32 __reserved[4]; } __reserved_18;
  44.366 -
  44.367 -/*3D0*/	struct { u32 __reserved[4]; } __reserved_19;
  44.368 -
  44.369 -/*3E0*/	struct { /* Timer Divide Configuration Register */
  44.370 -		u32   divisor		:  4,
  44.371 -			__reserved_1	: 28;
  44.372 -		u32 __reserved_2[3];
  44.373 -	} timer_dcr;
  44.374 -
  44.375 -/*3F0*/	struct { u32 __reserved[4]; } __reserved_20;
  44.376 -
  44.377 -} __attribute__ ((packed));
  44.378 -
  44.379 -#undef u32
  44.380 -
  44.381 -#endif
    45.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/atomic.h	Fri Mar 14 15:48:09 2003 +0000
    45.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    45.3 @@ -1,204 +0,0 @@
    45.4 -#ifndef __ARCH_I386_ATOMIC__
    45.5 -#define __ARCH_I386_ATOMIC__
    45.6 -
    45.7 -#include <linux/config.h>
    45.8 -
    45.9 -/*
   45.10 - * Atomic operations that C can't guarantee us.  Useful for
   45.11 - * resource counting etc..
   45.12 - */
   45.13 -
   45.14 -#ifdef CONFIG_SMP
   45.15 -#define LOCK "lock ; "
   45.16 -#else
   45.17 -#define LOCK ""
   45.18 -#endif
   45.19 -
   45.20 -/*
   45.21 - * Make sure gcc doesn't try to be clever and move things around
   45.22 - * on us. We need to use _exactly_ the address the user gave us,
   45.23 - * not some alias that contains the same information.
   45.24 - */
   45.25 -typedef struct { volatile int counter; } atomic_t;
   45.26 -
   45.27 -#define ATOMIC_INIT(i)	{ (i) }
   45.28 -
   45.29 -/**
   45.30 - * atomic_read - read atomic variable
   45.31 - * @v: pointer of type atomic_t
   45.32 - * 
   45.33 - * Atomically reads the value of @v.  Note that the guaranteed
   45.34 - * useful range of an atomic_t is only 24 bits.
   45.35 - */ 
   45.36 -#define atomic_read(v)		((v)->counter)
   45.37 -
   45.38 -/**
   45.39 - * atomic_set - set atomic variable
   45.40 - * @v: pointer of type atomic_t
   45.41 - * @i: required value
   45.42 - * 
   45.43 - * Atomically sets the value of @v to @i.  Note that the guaranteed
   45.44 - * useful range of an atomic_t is only 24 bits.
   45.45 - */ 
   45.46 -#define atomic_set(v,i)		(((v)->counter) = (i))
   45.47 -
   45.48 -/**
   45.49 - * atomic_add - add integer to atomic variable
   45.50 - * @i: integer value to add
   45.51 - * @v: pointer of type atomic_t
   45.52 - * 
   45.53 - * Atomically adds @i to @v.  Note that the guaranteed useful range
   45.54 - * of an atomic_t is only 24 bits.
   45.55 - */
   45.56 -static __inline__ void atomic_add(int i, atomic_t *v)
   45.57 -{
   45.58 -	__asm__ __volatile__(
   45.59 -		LOCK "addl %1,%0"
   45.60 -		:"=m" (v->counter)
   45.61 -		:"ir" (i), "m" (v->counter));
   45.62 -}
   45.63 -
   45.64 -/**
   45.65 - * atomic_sub - subtract the atomic variable
   45.66 - * @i: integer value to subtract
   45.67 - * @v: pointer of type atomic_t
   45.68 - * 
   45.69 - * Atomically subtracts @i from @v.  Note that the guaranteed
   45.70 - * useful range of an atomic_t is only 24 bits.
   45.71 - */
   45.72 -static __inline__ void atomic_sub(int i, atomic_t *v)
   45.73 -{
   45.74 -	__asm__ __volatile__(
   45.75 -		LOCK "subl %1,%0"
   45.76 -		:"=m" (v->counter)
   45.77 -		:"ir" (i), "m" (v->counter));
   45.78 -}
   45.79 -
   45.80 -/**
   45.81 - * atomic_sub_and_test - subtract value from variable and test result
   45.82 - * @i: integer value to subtract
   45.83 - * @v: pointer of type atomic_t
   45.84 - * 
   45.85 - * Atomically subtracts @i from @v and returns
   45.86 - * true if the result is zero, or false for all
   45.87 - * other cases.  Note that the guaranteed
   45.88 - * useful range of an atomic_t is only 24 bits.
   45.89 - */
   45.90 -static __inline__ int atomic_sub_and_test(int i, atomic_t *v)
   45.91 -{
   45.92 -	unsigned char c;
   45.93 -
   45.94 -	__asm__ __volatile__(
   45.95 -		LOCK "subl %2,%0; sete %1"
   45.96 -		:"=m" (v->counter), "=qm" (c)
   45.97 -		:"ir" (i), "m" (v->counter) : "memory");
   45.98 -	return c;
   45.99 -}
  45.100 -
  45.101 -/**
  45.102 - * atomic_inc - increment atomic variable
  45.103 - * @v: pointer of type atomic_t
  45.104 - * 
  45.105 - * Atomically increments @v by 1.  Note that the guaranteed
  45.106 - * useful range of an atomic_t is only 24 bits.
  45.107 - */ 
  45.108 -static __inline__ void atomic_inc(atomic_t *v)
  45.109 -{
  45.110 -	__asm__ __volatile__(
  45.111 -		LOCK "incl %0"
  45.112 -		:"=m" (v->counter)
  45.113 -		:"m" (v->counter));
  45.114 -}
  45.115 -
  45.116 -/**
  45.117 - * atomic_dec - decrement atomic variable
  45.118 - * @v: pointer of type atomic_t
  45.119 - * 
  45.120 - * Atomically decrements @v by 1.  Note that the guaranteed
  45.121 - * useful range of an atomic_t is only 24 bits.
  45.122 - */ 
  45.123 -static __inline__ void atomic_dec(atomic_t *v)
  45.124 -{
  45.125 -	__asm__ __volatile__(
  45.126 -		LOCK "decl %0"
  45.127 -		:"=m" (v->counter)
  45.128 -		:"m" (v->counter));
  45.129 -}
  45.130 -
  45.131 -/**
  45.132 - * atomic_dec_and_test - decrement and test
  45.133 - * @v: pointer of type atomic_t
  45.134 - * 
  45.135 - * Atomically decrements @v by 1 and
  45.136 - * returns true if the result is 0, or false for all other
  45.137 - * cases.  Note that the guaranteed
  45.138 - * useful range of an atomic_t is only 24 bits.
  45.139 - */ 
  45.140 -static __inline__ int atomic_dec_and_test(atomic_t *v)
  45.141 -{
  45.142 -	unsigned char c;
  45.143 -
  45.144 -	__asm__ __volatile__(
  45.145 -		LOCK "decl %0; sete %1"
  45.146 -		:"=m" (v->counter), "=qm" (c)
  45.147 -		:"m" (v->counter) : "memory");
  45.148 -	return c != 0;
  45.149 -}
  45.150 -
  45.151 -/**
  45.152 - * atomic_inc_and_test - increment and test 
  45.153 - * @v: pointer of type atomic_t
  45.154 - * 
  45.155 - * Atomically increments @v by 1
  45.156 - * and returns true if the result is zero, or false for all
  45.157 - * other cases.  Note that the guaranteed
  45.158 - * useful range of an atomic_t is only 24 bits.
  45.159 - */ 
  45.160 -static __inline__ int atomic_inc_and_test(atomic_t *v)
  45.161 -{
  45.162 -	unsigned char c;
  45.163 -
  45.164 -	__asm__ __volatile__(
  45.165 -		LOCK "incl %0; sete %1"
  45.166 -		:"=m" (v->counter), "=qm" (c)
  45.167 -		:"m" (v->counter) : "memory");
  45.168 -	return c != 0;
  45.169 -}
  45.170 -
  45.171 -/**
  45.172 - * atomic_add_negative - add and test if negative
  45.173 - * @v: pointer of type atomic_t
  45.174 - * @i: integer value to add
  45.175 - * 
  45.176 - * Atomically adds @i to @v and returns true
  45.177 - * if the result is negative, or false when
  45.178 - * result is greater than or equal to zero.  Note that the guaranteed
  45.179 - * useful range of an atomic_t is only 24 bits.
  45.180 - */ 
  45.181 -static __inline__ int atomic_add_negative(int i, atomic_t *v)
  45.182 -{
  45.183 -	unsigned char c;
  45.184 -
  45.185 -	__asm__ __volatile__(
  45.186 -		LOCK "addl %2,%0; sets %1"
  45.187 -		:"=m" (v->counter), "=qm" (c)
  45.188 -		:"ir" (i), "m" (v->counter) : "memory");
  45.189 -	return c;
  45.190 -}
  45.191 -
  45.192 -/* These are x86-specific, used by some header files */
  45.193 -#define atomic_clear_mask(mask, addr) \
  45.194 -__asm__ __volatile__(LOCK "andl %0,%1" \
  45.195 -: : "r" (~(mask)),"m" (*addr) : "memory")
  45.196 -
  45.197 -#define atomic_set_mask(mask, addr) \
  45.198 -__asm__ __volatile__(LOCK "orl %0,%1" \
  45.199 -: : "r" (mask),"m" (*addr) : "memory")
  45.200 -
  45.201 -/* Atomic operations are already serializing on x86 */
  45.202 -#define smp_mb__before_atomic_dec()	barrier()
  45.203 -#define smp_mb__after_atomic_dec()	barrier()
  45.204 -#define smp_mb__before_atomic_inc()	barrier()
  45.205 -#define smp_mb__after_atomic_inc()	barrier()
  45.206 -
  45.207 -#endif
    46.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/bitops.h	Fri Mar 14 15:48:09 2003 +0000
    46.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    46.3 @@ -1,384 +0,0 @@
    46.4 -#ifndef _I386_BITOPS_H
    46.5 -#define _I386_BITOPS_H
    46.6 -
    46.7 -/*
    46.8 - * Copyright 1992, Linus Torvalds.
    46.9 - */
   46.10 -
   46.11 -#include <linux/config.h>
   46.12 -
   46.13 -/*
   46.14 - * These have to be done with inline assembly: that way the bit-setting
   46.15 - * is guaranteed to be atomic. All bit operations return 0 if the bit
   46.16 - * was cleared before the operation and != 0 if it was not.
   46.17 - *
   46.18 - * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
   46.19 - */
   46.20 -
   46.21 -#ifdef CONFIG_SMP
   46.22 -#define LOCK_PREFIX "lock ; "
   46.23 -#else
   46.24 -#define LOCK_PREFIX ""
   46.25 -#endif
   46.26 -
   46.27 -#define ADDR (*(volatile long *) addr)
   46.28 -
   46.29 -/**
   46.30 - * set_bit - Atomically set a bit in memory
   46.31 - * @nr: the bit to set
   46.32 - * @addr: the address to start counting from
   46.33 - *
   46.34 - * This function is atomic and may not be reordered.  See __set_bit()
   46.35 - * if you do not require the atomic guarantees.
   46.36 - * Note that @nr may be almost arbitrarily large; this function is not
   46.37 - * restricted to acting on a single-word quantity.
   46.38 - */
   46.39 -static __inline__ void set_bit(int nr, volatile void * addr)
   46.40 -{
   46.41 -	__asm__ __volatile__( LOCK_PREFIX
   46.42 -		"btsl %1,%0"
   46.43 -		:"=m" (ADDR)
   46.44 -		:"Ir" (nr));
   46.45 -}
   46.46 -
   46.47 -/**
   46.48 - * __set_bit - Set a bit in memory
   46.49 - * @nr: the bit to set
   46.50 - * @addr: the address to start counting from
   46.51 - *
   46.52 - * Unlike set_bit(), this function is non-atomic and may be reordered.
   46.53 - * If it's called on the same region of memory simultaneously, the effect
   46.54 - * may be that only one operation succeeds.
   46.55 - */
   46.56 -static __inline__ void __set_bit(int nr, volatile void * addr)
   46.57 -{
   46.58 -	__asm__(
   46.59 -		"btsl %1,%0"
   46.60 -		:"=m" (ADDR)
   46.61 -		:"Ir" (nr));
   46.62 -}
   46.63 -
   46.64 -/**
   46.65 - * clear_bit - Clears a bit in memory
   46.66 - * @nr: Bit to clear
   46.67 - * @addr: Address to start counting from
   46.68 - *
   46.69 - * clear_bit() is atomic and may not be reordered.  However, it does
   46.70 - * not contain a memory barrier, so if it is used for locking purposes,
   46.71 - * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
   46.72 - * in order to ensure changes are visible on other processors.
   46.73 - */
   46.74 -static __inline__ void clear_bit(int nr, volatile void * addr)
   46.75 -{
   46.76 -	__asm__ __volatile__( LOCK_PREFIX
   46.77 -		"btrl %1,%0"
   46.78 -		:"=m" (ADDR)
   46.79 -		:"Ir" (nr));
   46.80 -}
   46.81 -#define smp_mb__before_clear_bit()	barrier()
   46.82 -#define smp_mb__after_clear_bit()	barrier()
   46.83 -
   46.84 -/**
   46.85 - * __change_bit - Toggle a bit in memory
   46.86 - * @nr: the bit to set
   46.87 - * @addr: the address to start counting from
   46.88 - *
   46.89 - * Unlike change_bit(), this function is non-atomic and may be reordered.
   46.90 - * If it's called on the same region of memory simultaneously, the effect
   46.91 - * may be that only one operation succeeds.
   46.92 - */
   46.93 -static __inline__ void __change_bit(int nr, volatile void * addr)
   46.94 -{
   46.95 -	__asm__ __volatile__(
   46.96 -		"btcl %1,%0"
   46.97 -		:"=m" (ADDR)
   46.98 -		:"Ir" (nr));
   46.99 -}
  46.100 -
  46.101 -/**
  46.102 - * change_bit - Toggle a bit in memory
  46.103 - * @nr: Bit to clear
  46.104 - * @addr: Address to start counting from
  46.105 - *
  46.106 - * change_bit() is atomic and may not be reordered.
  46.107 - * Note that @nr may be almost arbitrarily large; this function is not
  46.108 - * restricted to acting on a single-word quantity.
  46.109 - */
  46.110 -static __inline__ void change_bit(int nr, volatile void * addr)
  46.111 -{
  46.112 -	__asm__ __volatile__( LOCK_PREFIX
  46.113 -		"btcl %1,%0"
  46.114 -		:"=m" (ADDR)
  46.115 -		:"Ir" (nr));
  46.116 -}
  46.117 -
  46.118 -/**
  46.119 - * test_and_set_bit - Set a bit and return its old value
  46.120 - * @nr: Bit to set
  46.121 - * @addr: Address to count from
  46.122 - *
  46.123 - * This operation is atomic and cannot be reordered.  
  46.124 - * It also implies a memory barrier.
  46.125 - */
  46.126 -static __inline__ int test_and_set_bit(int nr, volatile void * addr)
  46.127 -{
  46.128 -	int oldbit;
  46.129 -
  46.130 -	__asm__ __volatile__( LOCK_PREFIX
  46.131 -		"btsl %2,%1\n\tsbbl %0,%0"
  46.132 -		:"=r" (oldbit),"=m" (ADDR)
  46.133 -		:"Ir" (nr) : "memory");
  46.134 -	return oldbit;
  46.135 -}
  46.136 -
  46.137 -/**
  46.138 - * __test_and_set_bit - Set a bit and return its old value
  46.139 - * @nr: Bit to set
  46.140 - * @addr: Address to count from
  46.141 - *
  46.142 - * This operation is non-atomic and can be reordered.  
  46.143 - * If two examples of this operation race, one can appear to succeed
  46.144 - * but actually fail.  You must protect multiple accesses with a lock.
  46.145 - */
  46.146 -static __inline__ int __test_and_set_bit(int nr, volatile void * addr)
  46.147 -{
  46.148 -	int oldbit;
  46.149 -
  46.150 -	__asm__(
  46.151 -		"btsl %2,%1\n\tsbbl %0,%0"
  46.152 -		:"=r" (oldbit),"=m" (ADDR)
  46.153 -		:"Ir" (nr));
  46.154 -	return oldbit;
  46.155 -}
  46.156 -
  46.157 -/**
  46.158 - * test_and_clear_bit - Clear a bit and return its old value
  46.159 - * @nr: Bit to set
  46.160 - * @addr: Address to count from
  46.161 - *
  46.162 - * This operation is atomic and cannot be reordered.  
  46.163 - * It also implies a memory barrier.
  46.164 - */
  46.165 -static __inline__ int test_and_clear_bit(int nr, volatile void * addr)
  46.166 -{
  46.167 -	int oldbit;
  46.168 -
  46.169 -	__asm__ __volatile__( LOCK_PREFIX
  46.170 -		"btrl %2,%1\n\tsbbl %0,%0"
  46.171 -		:"=r" (oldbit),"=m" (ADDR)
  46.172 -		:"Ir" (nr) : "memory");
  46.173 -	return oldbit;
  46.174 -}
  46.175 -
  46.176 -/**
  46.177 - * __test_and_clear_bit - Clear a bit and return its old value
  46.178 - * @nr: Bit to set
  46.179 - * @addr: Address to count from
  46.180 - *
  46.181 - * This operation is non-atomic and can be reordered.  
  46.182 - * If two examples of this operation race, one can appear to succeed
  46.183 - * but actually fail.  You must protect multiple accesses with a lock.
  46.184 - */
  46.185 -static __inline__ int __test_and_clear_bit(int nr, volatile void * addr)
  46.186 -{
  46.187 -	int oldbit;
  46.188 -
  46.189 -	__asm__(
  46.190 -		"btrl %2,%1\n\tsbbl %0,%0"
  46.191 -		:"=r" (oldbit),"=m" (ADDR)
  46.192 -		:"Ir" (nr));
  46.193 -	return oldbit;
  46.194 -}
  46.195 -
  46.196 -/* WARNING: non atomic and it can be reordered! */
  46.197 -static __inline__ int __test_and_change_bit(int nr, volatile void * addr)
  46.198 -{
  46.199 -	int oldbit;
  46.200 -
  46.201 -	__asm__ __volatile__(
  46.202 -		"btcl %2,%1\n\tsbbl %0,%0"
  46.203 -		:"=r" (oldbit),"=m" (ADDR)
  46.204 -		:"Ir" (nr) : "memory");
  46.205 -	return oldbit;
  46.206 -}
  46.207 -
  46.208 -/**
  46.209 - * test_and_change_bit - Change a bit and return its new value
  46.210 - * @nr: Bit to set
  46.211 - * @addr: Address to count from
  46.212 - *
  46.213 - * This operation is atomic and cannot be reordered.  
  46.214 - * It also implies a memory barrier.
  46.215 - */
  46.216 -static __inline__ int test_and_change_bit(int nr, volatile void * addr)
  46.217 -{
  46.218 -	int oldbit;
  46.219 -
  46.220 -	__asm__ __volatile__( LOCK_PREFIX
  46.221 -		"btcl %2,%1\n\tsbbl %0,%0"
  46.222 -		:"=r" (oldbit),"=m" (ADDR)
  46.223 -		:"Ir" (nr) : "memory");
  46.224 -	return oldbit;
  46.225 -}
  46.226 -
  46.227 -#if 0 /* Fool kernel-doc since it doesn't do macros yet */
  46.228 -/**
  46.229 - * test_bit - Determine whether a bit is set
  46.230 - * @nr: bit number to test
  46.231 - * @addr: Address to start counting from
  46.232 - */
  46.233 -static int test_bit(int nr, const volatile void * addr);
  46.234 -#endif
  46.235 -
  46.236 -static __inline__ int constant_test_bit(int nr, const volatile void * addr)
  46.237 -{
  46.238 -	return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0;
  46.239 -}
  46.240 -
  46.241 -static __inline__ int variable_test_bit(int nr, volatile void * addr)
  46.242 -{
  46.243 -	int oldbit;
  46.244 -
  46.245 -	__asm__ __volatile__(
  46.246 -		"btl %2,%1\n\tsbbl %0,%0"
  46.247 -		:"=r" (oldbit)
  46.248 -		:"m" (ADDR),"Ir" (nr));
  46.249 -	return oldbit;
  46.250 -}
  46.251 -
  46.252 -#define test_bit(nr,addr) \
  46.253 -(__builtin_constant_p(nr) ? \
  46.254 - constant_test_bit((nr),(addr)) : \
  46.255 - variable_test_bit((nr),(addr)))
  46.256 -
  46.257 -/**
  46.258 - * find_first_zero_bit - find the first zero bit in a memory region
  46.259 - * @addr: The address to start the search at
  46.260 - * @size: The maximum size to search
  46.261 - *
  46.262 - * Returns the bit-number of the first zero bit, not the number of the byte
  46.263 - * containing a bit.
  46.264 - */
  46.265 -static __inline__ int find_first_zero_bit(void * addr, unsigned size)
  46.266 -{
  46.267 -	int d0, d1, d2;
  46.268 -	int res;
  46.269 -
  46.270 -	if (!size)
  46.271 -		return 0;
  46.272 -	/* This looks at memory. Mark it volatile to tell gcc not to move it around */
  46.273 -	__asm__ __volatile__(
  46.274 -		"movl $-1,%%eax\n\t"
  46.275 -		"xorl %%edx,%%edx\n\t"
  46.276 -		"repe; scasl\n\t"
  46.277 -		"je 1f\n\t"
  46.278 -		"xorl -4(%%edi),%%eax\n\t"
  46.279 -		"subl $4,%%edi\n\t"
  46.280 -		"bsfl %%eax,%%edx\n"
  46.281 -		"1:\tsubl %%ebx,%%edi\n\t"
  46.282 -		"shll $3,%%edi\n\t"
  46.283 -		"addl %%edi,%%edx"
  46.284 -		:"=d" (res), "=&c" (d0), "=&D" (d1), "=&a" (d2)
  46.285 -		:"1" ((size + 31) >> 5), "2" (addr), "b" (addr));
  46.286 -	return res;
  46.287 -}
  46.288 -
  46.289 -/**
  46.290 - * find_next_zero_bit - find the first zero bit in a memory region
  46.291 - * @addr: The address to base the search on
  46.292 - * @offset: The bitnumber to start searching at
  46.293 - * @size: The maximum size to search
  46.294 - */
  46.295 -static __inline__ int find_next_zero_bit (void * addr, int size, int offset)
  46.296 -{
  46.297 -	unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
  46.298 -	int set = 0, bit = offset & 31, res;
  46.299 -	
  46.300 -	if (bit) {
  46.301 -		/*
  46.302 -		 * Look for zero in first byte
  46.303 -		 */
  46.304 -		__asm__("bsfl %1,%0\n\t"
  46.305 -			"jne 1f\n\t"
  46.306 -			"movl $32, %0\n"
  46.307 -			"1:"
  46.308 -			: "=r" (set)
  46.309 -			: "r" (~(*p >> bit)));
  46.310 -		if (set < (32 - bit))
  46.311 -			return set + offset;
  46.312 -		set = 32 - bit;
  46.313 -		p++;
  46.314 -	}
  46.315 -	/*
  46.316 -	 * No zero yet, search remaining full bytes for a zero
  46.317 -	 */
  46.318 -	res = find_first_zero_bit (p, size - 32 * (p - (unsigned long *) addr));
  46.319 -	return (offset + set + res);
  46.320 -}
  46.321 -
  46.322 -/**
  46.323 - * ffz - find first zero in word.
  46.324 - * @word: The word to search
  46.325 - *
  46.326 - * Undefined if no zero exists, so code should check against ~0UL first.
  46.327 - */
  46.328 -static __inline__ unsigned long ffz(unsigned long word)
  46.329 -{
  46.330 -	__asm__("bsfl %1,%0"
  46.331 -		:"=r" (word)
  46.332 -		:"r" (~word));
  46.333 -	return word;
  46.334 -}
  46.335 -
  46.336 -#ifdef __KERNEL__
  46.337 -
  46.338 -/**
  46.339 - * ffs - find first bit set
  46.340 - * @x: the word to search
  46.341 - *
  46.342 - * This is defined the same way as
  46.343 - * the libc and compiler builtin ffs routines, therefore
  46.344 - * differs in spirit from the above ffz (man ffs).
  46.345 - */
  46.346 -static __inline__ int ffs(int x)
  46.347 -{
  46.348 -	int r;
  46.349 -
  46.350 -	__asm__("bsfl %1,%0\n\t"
  46.351 -		"jnz 1f\n\t"
  46.352 -		"movl $-1,%0\n"
  46.353 -		"1:" : "=r" (r) : "rm" (x));
  46.354 -	return r+1;
  46.355 -}
  46.356 -
  46.357 -/**
  46.358 - * hweightN - returns the hamming weight of a N-bit word
  46.359 - * @x: the word to weigh
  46.360 - *
  46.361 - * The Hamming Weight of a number is the total number of bits set in it.
  46.362 - */
  46.363 -
  46.364 -#define hweight32(x) generic_hweight32(x)
  46.365 -#define hweight16(x) generic_hweight16(x)
  46.366 -#define hweight8(x) generic_hweight8(x)
  46.367 -
  46.368 -#endif /* __KERNEL__ */
  46.369 -
  46.370 -#ifdef __KERNEL__
  46.371 -
  46.372 -#define ext2_set_bit                 __test_and_set_bit
  46.373 -#define ext2_clear_bit               __test_and_clear_bit
  46.374 -#define ext2_test_bit                test_bit
  46.375 -#define ext2_find_first_zero_bit     find_first_zero_bit
  46.376 -#define ext2_find_next_zero_bit      find_next_zero_bit
  46.377 -
  46.378 -/* Bitmap functions for the minix filesystem.  */
  46.379 -#define minix_test_and_set_bit(nr,addr) __test_and_set_bit(nr,addr)
  46.380 -#define minix_set_bit(nr,addr) __set_bit(nr,addr)
  46.381 -#define minix_test_and_clear_bit(nr,addr) __test_and_clear_bit(nr,addr)
  46.382 -#define minix_test_bit(nr,addr) test_bit(nr,addr)
  46.383 -#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
  46.384 -
  46.385 -#endif /* __KERNEL__ */
  46.386 -
  46.387 -#endif /* _I386_BITOPS_H */
    47.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/boot.h	Fri Mar 14 15:48:09 2003 +0000
    47.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    47.3 @@ -1,15 +0,0 @@
    47.4 -#ifndef _LINUX_BOOT_H
    47.5 -#define _LINUX_BOOT_H
    47.6 -
    47.7 -/* Don't touch these, unless you really know what you're doing. */
    47.8 -#define DEF_INITSEG	0x9000
    47.9 -#define DEF_SYSSEG	0x1000
   47.10 -#define DEF_SETUPSEG	0x9020
   47.11 -#define DEF_SYSSIZE	0x7F00
   47.12 -
   47.13 -/* Internal svga startup constants */
   47.14 -#define NORMAL_VGA	0xffff		/* 80x25 mode */
   47.15 -#define EXTENDED_VGA	0xfffe		/* 80x50 mode */
   47.16 -#define ASK_VGA		0xfffd		/* ask for it at bootup */
   47.17 -
   47.18 -#endif
    48.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/byteorder.h	Fri Mar 14 15:48:09 2003 +0000
    48.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    48.3 @@ -1,47 +0,0 @@
    48.4 -#ifndef _I386_BYTEORDER_H
    48.5 -#define _I386_BYTEORDER_H
    48.6 -
    48.7 -#include <asm/types.h>
    48.8 -
    48.9 -#ifdef __GNUC__
   48.10 -
   48.11 -/* For avoiding bswap on i386 */
   48.12 -#ifdef __KERNEL__
   48.13 -#include <linux/config.h>
   48.14 -#endif
   48.15 -
   48.16 -static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
   48.17 -{
   48.18 -#ifdef CONFIG_X86_BSWAP
   48.19 -	__asm__("bswap %0" : "=r" (x) : "0" (x));
   48.20 -#else
   48.21 -	__asm__("xchgb %b0,%h0\n\t"	/* swap lower bytes	*/
   48.22 -		"rorl $16,%0\n\t"	/* swap words		*/
   48.23 -		"xchgb %b0,%h0"		/* swap higher bytes	*/
   48.24 -		:"=q" (x)
   48.25 -		: "0" (x));
   48.26 -#endif
   48.27 -	return x;
   48.28 -}
   48.29 -
   48.30 -static __inline__ __const__ __u16 ___arch__swab16(__u16 x)
   48.31 -{
   48.32 -	__asm__("xchgb %b0,%h0"		/* swap bytes		*/ \
   48.33 -		: "=q" (x) \
   48.34 -		:  "0" (x)); \
   48.35 -		return x;
   48.36 -}
   48.37 -
   48.38 -#define __arch__swab32(x) ___arch__swab32(x)
   48.39 -#define __arch__swab16(x) ___arch__swab16(x)
   48.40 -
   48.41 -#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
   48.42 -#  define __BYTEORDER_HAS_U64__
   48.43 -#  define __SWAB_64_THRU_32__
   48.44 -#endif
   48.45 -
   48.46 -#endif /* __GNUC__ */
   48.47 -
   48.48 -#include <linux/byteorder/little_endian.h>
   48.49 -
   48.50 -#endif /* _I386_BYTEORDER_H */
    49.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cache.h	Fri Mar 14 15:48:09 2003 +0000
    49.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    49.3 @@ -1,13 +0,0 @@
    49.4 -/*
    49.5 - * include/asm-i386/cache.h
    49.6 - */
    49.7 -#ifndef __ARCH_I386_CACHE_H
    49.8 -#define __ARCH_I386_CACHE_H
    49.9 -
   49.10 -#include <linux/config.h>
   49.11 -
   49.12 -/* L1 cache line size */
   49.13 -#define L1_CACHE_SHIFT	(CONFIG_X86_L1_CACHE_SHIFT)
   49.14 -#define L1_CACHE_BYTES	(1 << L1_CACHE_SHIFT)
   49.15 -
   49.16 -#endif
    50.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/checksum.h	Fri Mar 14 15:48:09 2003 +0000
    50.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    50.3 @@ -1,195 +0,0 @@
    50.4 -#ifndef _I386_CHECKSUM_H
    50.5 -#define _I386_CHECKSUM_H
    50.6 -
    50.7 -
    50.8 -/*
    50.9 - * computes the checksum of a memory block at buff, length len,
   50.10 - * and adds in "sum" (32-bit)
   50.11 - *
   50.12 - * returns a 32-bit number suitable for feeding into itself
   50.13 - * or csum_tcpudp_magic
   50.14 - *
   50.15 - * this function must be called with even lengths, except
   50.16 - * for the last fragment, which may be odd
   50.17 - *
   50.18 - * it's best to have buff aligned on a 32-bit boundary
   50.19 - */
   50.20 -asmlinkage unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum);
   50.21 -
   50.22 -/*
   50.23 - * the same as csum_partial, but copies from src while it
   50.24 - * checksums, and handles user-space pointer exceptions correctly, when needed.
   50.25 - *
   50.26 - * here even more important to align src and dst on a 32-bit (or even
   50.27 - * better 64-bit) boundary
   50.28 - */
   50.29 -
   50.30 -asmlinkage unsigned int csum_partial_copy_generic( const char *src, char *dst, int len, int sum,
   50.31 -						   int *src_err_ptr, int *dst_err_ptr);
   50.32 -
   50.33 -/*
   50.34 - *	Note: when you get a NULL pointer exception here this means someone
   50.35 - *	passed in an incorrect kernel address to one of these functions.
   50.36 - *
   50.37 - *	If you use these functions directly please don't forget the
   50.38 - *	verify_area().
   50.39 - */
   50.40 -static __inline__
   50.41 -unsigned int csum_partial_copy_nocheck ( const char *src, char *dst,
   50.42 -					int len, int sum)
   50.43 -{
   50.44 -	return csum_partial_copy_generic ( src, dst, len, sum, NULL, NULL);
   50.45 -}
   50.46 -
   50.47 -static __inline__
   50.48 -unsigned int csum_partial_copy_from_user ( const char *src, char *dst,
   50.49 -						int len, int sum, int *err_ptr)
   50.50 -{
   50.51 -	return csum_partial_copy_generic ( src, dst, len, sum, err_ptr, NULL);
   50.52 -}
   50.53 -
   50.54 -/*
   50.55 - * These are the old (and unsafe) way of doing checksums, a warning message will be
   50.56 - * printed if they are used and an exeption occurs.
   50.57 - *
   50.58 - * these functions should go away after some time.
   50.59 - */
   50.60 -
   50.61 -#define csum_partial_copy_fromuser csum_partial_copy
   50.62 -unsigned int csum_partial_copy( const char *src, char *dst, int len, int sum);
   50.63 -
   50.64 -/*
   50.65 - *	This is a version of ip_compute_csum() optimized for IP headers,
   50.66 - *	which always checksum on 4 octet boundaries.
   50.67 - *
   50.68 - *	By Jorge Cwik <jorge@laser.satlink.net>, adapted for linux by
   50.69 - *	Arnt Gulbrandsen.
   50.70 - */
   50.71 -static inline unsigned short ip_fast_csum(unsigned char * iph,
   50.72 -					  unsigned int ihl)
   50.73 -{
   50.74 -	unsigned int sum;
   50.75 -
   50.76 -	__asm__ __volatile__(
   50.77 -	    "movl (%1), %0	;\n"
   50.78 -	    "subl $4, %2	;\n"
   50.79 -	    "jbe 2f		;\n"
   50.80 -	    "addl 4(%1), %0	;\n"
   50.81 -	    "adcl 8(%1), %0	;\n"
   50.82 -	    "adcl 12(%1), %0	;\n"
   50.83 -"1:	    adcl 16(%1), %0	;\n"
   50.84 -	    "lea 4(%1), %1	;\n"
   50.85 -	    "decl %2		;\n"
   50.86 -	    "jne 1b		;\n"
   50.87 -	    "adcl $0, %0	;\n"
   50.88 -	    "movl %0, %2	;\n"
   50.89 -	    "shrl $16, %0	;\n"
   50.90 -	    "addw %w2, %w0	;\n"
   50.91 -	    "adcl $0, %0	;\n"
   50.92 -	    "notl %0		;\n"
   50.93 -"2:				;\n"
   50.94 -	/* Since the input registers which are loaded with iph and ipl
   50.95 -	   are modified, we must also specify them as outputs, or gcc
   50.96 -	   will assume they contain their original values. */
   50.97 -	: "=r" (sum), "=r" (iph), "=r" (ihl)
   50.98 -	: "1" (iph), "2" (ihl));
   50.99 -	return(sum);
  50.100 -}
  50.101 -
  50.102 -/*
  50.103 - *	Fold a partial checksum
  50.104 - */
  50.105 -
  50.106 -static inline unsigned int csum_fold(unsigned int sum)
  50.107 -{
  50.108 -	__asm__(
  50.109 -		"addl %1, %0		;\n"
  50.110 -		"adcl $0xffff, %0	;\n"
  50.111 -		: "=r" (sum)
  50.112 -		: "r" (sum << 16), "0" (sum & 0xffff0000)
  50.113 -	);
  50.114 -	return (~sum) >> 16;
  50.115 -}
  50.116 -
  50.117 -static inline unsigned long csum_tcpudp_nofold(unsigned long saddr,
  50.118 -						   unsigned long daddr,
  50.119 -						   unsigned short len,
  50.120 -						   unsigned short proto,
  50.121 -						   unsigned int sum)
  50.122 -{
  50.123 -    __asm__(
  50.124 -	"addl %1, %0	;\n"
  50.125 -	"adcl %2, %0	;\n"
  50.126 -	"adcl %3, %0	;\n"
  50.127 -	"adcl $0, %0	;\n"
  50.128 -	: "=r" (sum)
  50.129 -	: "g" (daddr), "g"(saddr), "g"((ntohs(len)<<16)+proto*256), "0"(sum));
  50.130 -    return sum;
  50.131 -}
  50.132 -
  50.133 -/*
  50.134 - * computes the checksum of the TCP/UDP pseudo-header
  50.135 - * returns a 16-bit checksum, already complemented
  50.136 - */
  50.137 -static inline unsigned short int csum_tcpudp_magic(unsigned long saddr,
  50.138 -						   unsigned long daddr,
  50.139 -						   unsigned short len,
  50.140 -						   unsigned short proto,
  50.141 -						   unsigned int sum)
  50.142 -{
  50.143 -	return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
  50.144 -}
  50.145 -
  50.146 -/*
  50.147 - * this routine is used for miscellaneous IP-like checksums, mainly
  50.148 - * in icmp.c
  50.149 - */
  50.150 -
  50.151 -static inline unsigned short ip_compute_csum(unsigned char * buff, int len)
  50.152 -{
  50.153 -    return csum_fold (csum_partial(buff, len, 0));
  50.154 -}
  50.155 -
  50.156 -#define _HAVE_ARCH_IPV6_CSUM
  50.157 -static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
  50.158 -						     struct in6_addr *daddr,
  50.159 -						     __u32 len,
  50.160 -						     unsigned short proto,
  50.161 -						     unsigned int sum)
  50.162 -{
  50.163 -	__asm__(
  50.164 -		"addl 0(%1), %0		;\n"
  50.165 -		"adcl 4(%1), %0		;\n"
  50.166 -		"adcl 8(%1), %0		;\n"
  50.167 -		"adcl 12(%1), %0	;\n"
  50.168 -		"adcl 0(%2), %0		;\n"
  50.169 -		"adcl 4(%2), %0		;\n"
  50.170 -		"adcl 8(%2), %0		;\n"
  50.171 -		"adcl 12(%2), %0	;\n"
  50.172 -		"adcl %3, %0		;\n"
  50.173 -		"adcl %4, %0		;\n"
  50.174 -		"adcl $0, %0		;\n"
  50.175 -		: "=&r" (sum)
  50.176 -		: "r" (saddr), "r" (daddr),
  50.177 -		  "r"(htonl(len)), "r"(htonl(proto)), "0"(sum));
  50.178 -
  50.179 -	return csum_fold(sum);
  50.180 -}
  50.181 -
  50.182 -/*
  50.183 - *	Copy and checksum to user
  50.184 - */
  50.185 -#define HAVE_CSUM_COPY_USER
  50.186 -static __inline__ unsigned int csum_and_copy_to_user(const char *src, char *dst,
  50.187 -				    int len, int sum, int *err_ptr)
  50.188 -{
  50.189 -	if (access_ok(VERIFY_WRITE, dst, len))
  50.190 -		return csum_partial_copy_generic(src, dst, len, sum, NULL, err_ptr);
  50.191 -
  50.192 -	if (len)
  50.193 -		*err_ptr = -EFAULT;
  50.194 -
  50.195 -	return -1; /* invalid checksum */
  50.196 -}
  50.197 -
  50.198 -#endif
    51.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/cpufeature.h	Fri Mar 14 15:48:09 2003 +0000
    51.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    51.3 @@ -1,76 +0,0 @@
    51.4 -/*
    51.5 - * cpufeature.h
    51.6 - *
    51.7 - * Defines x86 CPU feature bits
    51.8 - */
    51.9 -
   51.10 -#ifndef __ASM_I386_CPUFEATURE_H
   51.11 -#define __ASM_I386_CPUFEATURE_H
   51.12 -
   51.13 -/* Sample usage: CPU_FEATURE_P(cpu.x86_capability, FPU) */
   51.14 -#define CPU_FEATURE_P(CAP, FEATURE) test_bit(CAP, X86_FEATURE_##FEATURE ##_BIT)
   51.15 -
   51.16 -#define NCAPINTS	4	/* Currently we have 4 32-bit words worth of info */
   51.17 -
   51.18 -/* Intel-defined CPU features, CPUID level 0x00000001, word 0 */
   51.19 -#define X86_FEATURE_FPU		(0*32+ 0) /* Onboard FPU */
   51.20 -#define X86_FEATURE_VME		(0*32+ 1) /* Virtual Mode Extensions */
   51.21 -#define X86_FEATURE_DE		(0*32+ 2) /* Debugging Extensions */
   51.22 -#define X86_FEATURE_PSE 	(0*32+ 3) /* Page Size Extensions */
   51.23 -#define X86_FEATURE_TSC		(0*32+ 4) /* Time Stamp Counter */
   51.24 -#define X86_FEATURE_MSR		(0*32+ 5) /* Model-Specific Registers, RDMSR, WRMSR */
   51.25 -#define X86_FEATURE_PAE		(0*32+ 6) /* Physical Address Extensions */
   51.26 -#define X86_FEATURE_MCE		(0*32+ 7) /* Machine Check Architecture */
   51.27 -#define X86_FEATURE_CX8		(0*32+ 8) /* CMPXCHG8 instruction */
   51.28 -#define X86_FEATURE_APIC	(0*32+ 9) /* Onboard APIC */
   51.29 -#define X86_FEATURE_SEP		(0*32+11) /* SYSENTER/SYSEXIT */
   51.30 -#define X86_FEATURE_MTRR	(0*32+12) /* Memory Type Range Registers */
   51.31 -#define X86_FEATURE_PGE		(0*32+13) /* Page Global Enable */
   51.32 -#define X86_FEATURE_MCA		(0*32+14) /* Machine Check Architecture */
   51.33 -#define X86_FEATURE_CMOV	(0*32+15) /* CMOV instruction (FCMOVCC and FCOMI too if FPU present) */
   51.34 -#define X86_FEATURE_PAT		(0*32+16) /* Page Attribute Table */
   51.35 -#define X86_FEATURE_PSE36	(0*32+17) /* 36-bit PSEs */
   51.36 -#define X86_FEATURE_PN		(0*32+18) /* Processor serial number */
   51.37 -#define X86_FEATURE_CLFLSH	(0*32+19) /* Supports the CLFLUSH instruction */
   51.38 -#define X86_FEATURE_DTES	(0*32+21) /* Debug Trace Store */
   51.39 -#define X86_FEATURE_ACPI	(0*32+22) /* ACPI via MSR */
   51.40 -#define X86_FEATURE_MMX		(0*32+23) /* Multimedia Extensions */
   51.41 -#define X86_FEATURE_FXSR	(0*32+24) /* FXSAVE and FXRSTOR instructions (fast save and restore */
   51.42 -				          /* of FPU context), and CR4.OSFXSR available */
   51.43 -#define X86_FEATURE_XMM		(0*32+25) /* Streaming SIMD Extensions */
   51.44 -#define X86_FEATURE_XMM2	(0*32+26) /* Streaming SIMD Extensions-2 */
   51.45 -#define X86_FEATURE_SELFSNOOP	(0*32+27) /* CPU self snoop */
   51.46 -#define X86_FEATURE_HT		(0*32+28) /* Hyper-Threading */
   51.47 -#define X86_FEATURE_ACC		(0*32+29) /* Automatic clock control */
   51.48 -#define X86_FEATURE_IA64	(0*32+30) /* IA-64 processor */
   51.49 -
   51.50 -/* AMD-defined CPU features, CPUID level 0x80000001, word 1 */
   51.51 -/* Don't duplicate feature flags which are redundant with Intel! */
   51.52 -#define X86_FEATURE_SYSCALL	(1*32+11) /* SYSCALL/SYSRET */
   51.53 -#define X86_FEATURE_MMXEXT	(1*32+22) /* AMD MMX extensions */
   51.54 -#define X86_FEATURE_LM		(1*32+29) /* Long Mode (x86-64) */
   51.55 -#define X86_FEATURE_3DNOWEXT	(1*32+30) /* AMD 3DNow! extensions */
   51.56 -#define X86_FEATURE_3DNOW	(1*32+31) /* 3DNow! */
   51.57 -
   51.58 -/* Transmeta-defined CPU features, CPUID level 0x80860001, word 2 */
   51.59 -#define X86_FEATURE_RECOVERY	(2*32+ 0) /* CPU in recovery mode */
   51.60 -#define X86_FEATURE_LONGRUN	(2*32+ 1) /* Longrun power control */
   51.61 -#define X86_FEATURE_LRTI	(2*32+ 3) /* LongRun table interface */
   51.62 -
   51.63 -/* Other features, Linux-defined mapping, word 3 */
   51.64 -/* This range is used for feature bits which conflict or are synthesized */
   51.65 -#define X86_FEATURE_CXMMX	(3*32+ 0) /* Cyrix MMX extensions */
   51.66 -#define X86_FEATURE_K6_MTRR	(3*32+ 1) /* AMD K6 nonstandard MTRRs */
   51.67 -#define X86_FEATURE_CYRIX_ARR	(3*32+ 2) /* Cyrix ARRs (= MTRRs) */
   51.68 -#define X86_FEATURE_CENTAUR_MCR	(3*32+ 3) /* Centaur MCRs (= MTRRs) */
   51.69 -
   51.70 -#define cpu_has(c, bit)            test_bit(bit, (c)->x86_capability)
   51.71 -
   51.72 -#endif /* __ASM_I386_CPUFEATURE_H */
   51.73 -
   51.74 -/* 
   51.75 - * Local Variables:
   51.76 - * mode:c
   51.77 - * comment-column:42
   51.78 - * End:
   51.79 - */
    52.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/current.h	Fri Mar 14 15:48:09 2003 +0000
    52.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    52.3 @@ -1,15 +0,0 @@
    52.4 -#ifndef _I386_CURRENT_H
    52.5 -#define _I386_CURRENT_H
    52.6 -
    52.7 -struct task_struct;
    52.8 -
    52.9 -static inline struct task_struct * get_current(void)
   52.10 -{
   52.11 -	struct task_struct *current;
   52.12 -	__asm__("andl %%esp,%0; ":"=r" (current) : "0" (~8191UL));
   52.13 -	return current;
   52.14 - }
   52.15 - 
   52.16 -#define current get_current()
   52.17 -
   52.18 -#endif /* !(_I386_CURRENT_H) */
    53.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/debugreg.h	Fri Mar 14 15:48:09 2003 +0000
    53.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    53.3 @@ -1,64 +0,0 @@
    53.4 -#ifndef _I386_DEBUGREG_H
    53.5 -#define _I386_DEBUGREG_H
    53.6 -
    53.7 -
    53.8 -/* Indicate the register numbers for a number of the specific
    53.9 -   debug registers.  Registers 0-3 contain the addresses we wish to trap on */
   53.10 -#define DR_FIRSTADDR 0        /* u_debugreg[DR_FIRSTADDR] */
   53.11 -#define DR_LASTADDR 3         /* u_debugreg[DR_LASTADDR]  */
   53.12 -
   53.13 -#define DR_STATUS 6           /* u_debugreg[DR_STATUS]     */
   53.14 -#define DR_CONTROL 7          /* u_debugreg[DR_CONTROL] */
   53.15 -
   53.16 -/* Define a few things for the status register.  We can use this to determine
   53.17 -   which debugging register was responsible for the trap.  The other bits
   53.18 -   are either reserved or not of interest to us. */
   53.19 -
   53.20 -#define DR_TRAP0	(0x1)		/* db0 */
   53.21 -#define DR_TRAP1	(0x2)		/* db1 */
   53.22 -#define DR_TRAP2	(0x4)		/* db2 */
   53.23 -#define DR_TRAP3	(0x8)		/* db3 */
   53.24 -
   53.25 -#define DR_STEP		(0x4000)	/* single-step */
   53.26 -#define DR_SWITCH	(0x8000)	/* task switch */
   53.27 -
   53.28 -/* Now define a bunch of things for manipulating the control register.
   53.29 -   The top two bytes of the control register consist of 4 fields of 4
   53.30 -   bits - each field corresponds to one of the four debug registers,
   53.31 -   and indicates what types of access we trap on, and how large the data
   53.32 -   field is that we are looking at */
   53.33 -
   53.34 -#define DR_CONTROL_SHIFT 16 /* Skip this many bits in ctl register */
   53.35 -#define DR_CONTROL_SIZE 4   /* 4 control bits per register */
   53.36 -
   53.37 -#define DR_RW_EXECUTE (0x0)   /* Settings for the access types to trap on */
   53.38 -#define DR_RW_WRITE (0x1)
   53.39 -#define DR_RW_READ (0x3)
   53.40 -
   53.41 -#define DR_LEN_1 (0x0) /* Settings for data length to trap on */
   53.42 -#define DR_LEN_2 (0x4)
   53.43 -#define DR_LEN_4 (0xC)
   53.44 -
   53.45 -/* The low byte to the control register determine which registers are
   53.46 -   enabled.  There are 4 fields of two bits.  One bit is "local", meaning
   53.47 -   that the processor will reset the bit after a task switch and the other
   53.48 -   is global meaning that we have to explicitly reset the bit.  With linux,
   53.49 -   you can use either one, since we explicitly zero the register when we enter
   53.50 -   kernel mode. */
   53.51 -
   53.52 -#define DR_LOCAL_ENABLE_SHIFT 0    /* Extra shift to the local enable bit */
   53.53 -#define DR_GLOBAL_ENABLE_SHIFT 1   /* Extra shift to the global enable bit */
   53.54 -#define DR_ENABLE_SIZE 2           /* 2 enable bits per register */
   53.55 -
   53.56 -#define DR_LOCAL_ENABLE_MASK (0x55)  /* Set  local bits for all 4 regs */
   53.57 -#define DR_GLOBAL_ENABLE_MASK (0xAA) /* Set global bits for all 4 regs */
   53.58 -
   53.59 -/* The second byte to the control register has a few special things.
   53.60 -   We can slow the instruction pipeline for instructions coming via the
   53.61 -   gdt or the ldt if we want to.  I am not sure why this is an advantage */
   53.62 -
   53.63 -#define DR_CONTROL_RESERVED (0xFC00) /* Reserved by Intel */
   53.64 -#define DR_LOCAL_SLOWDOWN (0x100)   /* Local slow the pipeline */
   53.65 -#define DR_GLOBAL_SLOWDOWN (0x200)  /* Global slow the pipeline */
   53.66 -
   53.67 -#endif
    54.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/delay.h	Fri Mar 14 15:48:09 2003 +0000
    54.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    54.3 @@ -1,20 +0,0 @@
    54.4 -#ifndef _I386_DELAY_H
    54.5 -#define _I386_DELAY_H
    54.6 -
    54.7 -/*
    54.8 - * Copyright (C) 1993 Linus Torvalds
    54.9 - *
   54.10 - * Delay routines calling functions in arch/i386/lib/delay.c
   54.11 - */
   54.12 - 
   54.13 -extern void __bad_udelay(void);
   54.14 -
   54.15 -extern void __udelay(unsigned long usecs);
   54.16 -extern void __const_udelay(unsigned long usecs);
   54.17 -extern void __delay(unsigned long loops);
   54.18 -
   54.19 -#define udelay(n) (__builtin_constant_p(n) ? \
   54.20 -	((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \
   54.21 -	__udelay(n))
   54.22 -
   54.23 -#endif /* defined(_I386_DELAY_H) */
    55.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/div64.h	Fri Mar 14 15:48:09 2003 +0000
    55.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    55.3 @@ -1,17 +0,0 @@
    55.4 -#ifndef __I386_DIV64
    55.5 -#define __I386_DIV64
    55.6 -
    55.7 -#define do_div(n,base) ({ \
    55.8 -	unsigned long __upper, __low, __high, __mod; \
    55.9 -	asm("":"=a" (__low), "=d" (__high):"A" (n)); \
   55.10 -	__upper = __high; \
   55.11 -	if (__high) { \
   55.12 -		__upper = __high % (base); \
   55.13 -		__high = __high / (base); \
   55.14 -	} \
   55.15 -	asm("divl %2":"=a" (__low), "=d" (__mod):"rm" (base), "0" (__low), "1" (__upper)); \
   55.16 -	asm("":"=A" (n):"a" (__low),"d" (__high)); \
   55.17 -	__mod; \
   55.18 -})
   55.19 -
   55.20 -#endif
    56.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/dma.h	Fri Mar 14 15:48:09 2003 +0000
    56.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    56.3 @@ -1,298 +0,0 @@
    56.4 -/* $Id: dma.h,v 1.7 1992/12/14 00:29:34 root Exp root $
    56.5 - * linux/include/asm/dma.h: Defines for using and allocating dma channels.
    56.6 - * Written by Hennus Bergman, 1992.
    56.7 - * High DMA channel support & info by Hannu Savolainen
    56.8 - * and John Boyd, Nov. 1992.
    56.9 - */
   56.10 -
   56.11 -#ifndef _ASM_DMA_H
   56.12 -#define _ASM_DMA_H
   56.13 -
   56.14 -#include <linux/config.h>
   56.15 -#include <linux/spinlock.h>	/* And spinlocks */
   56.16 -#include <asm/io.h>		/* need byte IO */
   56.17 -#include <linux/delay.h>
   56.18 -
   56.19 -
   56.20 -#ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER
   56.21 -#define dma_outb	outb_p
   56.22 -#else
   56.23 -#define dma_outb	outb
   56.24 -#endif
   56.25 -
   56.26 -#define dma_inb		inb
   56.27 -
   56.28 -/*
   56.29 - * NOTES about DMA transfers:
   56.30 - *
   56.31 - *  controller 1: channels 0-3, byte operations, ports 00-1F
   56.32 - *  controller 2: channels 4-7, word operations, ports C0-DF
   56.33 - *
   56.34 - *  - ALL registers are 8 bits only, regardless of transfer size
   56.35 - *  - channel 4 is not used - cascades 1 into 2.
   56.36 - *  - channels 0-3 are byte - addresses/counts are for physical bytes
   56.37 - *  - channels 5-7 are word - addresses/counts are for physical words
   56.38 - *  - transfers must not cross physical 64K (0-3) or 128K (5-7) boundaries
   56.39 - *  - transfer count loaded to registers is 1 less than actual count
   56.40 - *  - controller 2 offsets are all even (2x offsets for controller 1)
   56.41 - *  - page registers for 5-7 don't use data bit 0, represent 128K pages
   56.42 - *  - page registers for 0-3 use bit 0, represent 64K pages
   56.43 - *
   56.44 - * DMA transfers are limited to the lower 16MB of _physical_ memory.  
   56.45 - * Note that addresses loaded into registers must be _physical_ addresses,
   56.46 - * not logical addresses (which may differ if paging is active).
   56.47 - *
   56.48 - *  Address mapping for channels 0-3:
   56.49 - *
   56.50 - *   A23 ... A16 A15 ... A8  A7 ... A0    (Physical addresses)
   56.51 - *    |  ...  |   |  ... |   |  ... |
   56.52 - *    |  ...  |   |  ... |   |  ... |
   56.53 - *    |  ...  |   |  ... |   |  ... |
   56.54 - *   P7  ...  P0  A7 ... A0  A7 ... A0   
   56.55 - * |    Page    | Addr MSB | Addr LSB |   (DMA registers)
   56.56 - *
   56.57 - *  Address mapping for channels 5-7:
   56.58 - *
   56.59 - *   A23 ... A17 A16 A15 ... A9 A8 A7 ... A1 A0    (Physical addresses)
   56.60 - *    |  ...  |   \   \   ... \  \  \  ... \  \
   56.61 - *    |  ...  |    \   \   ... \  \  \  ... \  (not used)
   56.62 - *    |  ...  |     \   \   ... \  \  \  ... \
   56.63 - *   P7  ...  P1 (0) A7 A6  ... A0 A7 A6 ... A0   
   56.64 - * |      Page      |  Addr MSB   |  Addr LSB  |   (DMA registers)
   56.65 - *
   56.66 - * Again, channels 5-7 transfer _physical_ words (16 bits), so addresses
   56.67 - * and counts _must_ be word-aligned (the lowest address bit is _ignored_ at
   56.68 - * the hardware level, so odd-byte transfers aren't possible).
   56.69 - *
   56.70 - * Transfer count (_not # bytes_) is limited to 64K, represented as actual
   56.71 - * count - 1 : 64K => 0xFFFF, 1 => 0x0000.  Thus, count is always 1 or more,
   56.72 - * and up to 128K bytes may be transferred on channels 5-7 in one operation. 
   56.73 - *
   56.74 - */
   56.75 -
   56.76 -#define MAX_DMA_CHANNELS	8
   56.77 -
   56.78 -/* The maximum address that we can perform a DMA transfer to on this platform */
   56.79 -#define MAX_DMA_ADDRESS      (PAGE_OFFSET+0x1000000)
   56.80 -
   56.81 -/* 8237 DMA controllers */
   56.82 -#define IO_DMA1_BASE	0x00	/* 8 bit slave DMA, channels 0..3 */
   56.83 -#define IO_DMA2_BASE	0xC0	/* 16 bit master DMA, ch 4(=slave input)..7 */
   56.84 -
   56.85 -/* DMA controller registers */
   56.86 -#define DMA1_CMD_REG		0x08	/* command register (w) */
   56.87 -#define DMA1_STAT_REG		0x08	/* status register (r) */
   56.88 -#define DMA1_REQ_REG            0x09    /* request register (w) */
   56.89 -#define DMA1_MASK_REG		0x0A	/* single-channel mask (w) */
   56.90 -#define DMA1_MODE_REG		0x0B	/* mode register (w) */
   56.91 -#define DMA1_CLEAR_FF_REG	0x0C	/* clear pointer flip-flop (w) */
   56.92 -#define DMA1_TEMP_REG           0x0D    /* Temporary Register (r) */
   56.93 -#define DMA1_RESET_REG		0x0D	/* Master Clear (w) */
   56.94 -#define DMA1_CLR_MASK_REG       0x0E    /* Clear Mask */
   56.95 -#define DMA1_MASK_ALL_REG       0x0F    /* all-channels mask (w) */
   56.96 -
   56.97 -#define DMA2_CMD_REG		0xD0	/* command register (w) */
   56.98 -#define DMA2_STAT_REG		0xD0	/* status register (r) */
   56.99 -#define DMA2_REQ_REG            0xD2    /* request register (w) */
  56.100 -#define DMA2_MASK_REG		0xD4	/* single-channel mask (w) */
  56.101 -#define DMA2_MODE_REG		0xD6	/* mode register (w) */
  56.102 -#define DMA2_CLEAR_FF_REG	0xD8	/* clear pointer flip-flop (w) */
  56.103 -#define DMA2_TEMP_REG           0xDA    /* Temporary Register (r) */
  56.104 -#define DMA2_RESET_REG		0xDA	/* Master Clear (w) */
  56.105 -#define DMA2_CLR_MASK_REG       0xDC    /* Clear Mask */
  56.106 -#define DMA2_MASK_ALL_REG       0xDE    /* all-channels mask (w) */
  56.107 -
  56.108 -#define DMA_ADDR_0              0x00    /* DMA address registers */
  56.109 -#define DMA_ADDR_1              0x02
  56.110 -#define DMA_ADDR_2              0x04
  56.111 -#define DMA_ADDR_3              0x06
  56.112 -#define DMA_ADDR_4              0xC0
  56.113 -#define DMA_ADDR_5              0xC4
  56.114 -#define DMA_ADDR_6              0xC8
  56.115 -#define DMA_ADDR_7              0xCC
  56.116 -
  56.117 -#define DMA_CNT_0               0x01    /* DMA count registers */
  56.118 -#define DMA_CNT_1               0x03
  56.119 -#define DMA_CNT_2               0x05
  56.120 -#define DMA_CNT_3               0x07
  56.121 -#define DMA_CNT_4               0xC2
  56.122 -#define DMA_CNT_5               0xC6
  56.123 -#define DMA_CNT_6               0xCA
  56.124 -#define DMA_CNT_7               0xCE
  56.125 -
  56.126 -#define DMA_PAGE_0              0x87    /* DMA page registers */
  56.127 -#define DMA_PAGE_1              0x83
  56.128 -#define DMA_PAGE_2              0x81
  56.129 -#define DMA_PAGE_3              0x82
  56.130 -#define DMA_PAGE_5              0x8B
  56.131 -#define DMA_PAGE_6              0x89
  56.132 -#define DMA_PAGE_7              0x8A
  56.133 -
  56.134 -#define DMA_MODE_READ	0x44	/* I/O to memory, no autoinit, increment, single mode */
  56.135 -#define DMA_MODE_WRITE	0x48	/* memory to I/O, no autoinit, increment, single mode */
  56.136 -#define DMA_MODE_CASCADE 0xC0   /* pass thru DREQ->HRQ, DACK<-HLDA only */
  56.137 -
  56.138 -#define DMA_AUTOINIT	0x10
  56.139 -
  56.140 -
  56.141 -extern spinlock_t  dma_spin_lock;
  56.142 -
  56.143 -static __inline__ unsigned long claim_dma_lock(void)
  56.144 -{
  56.145 -	unsigned long flags;
  56.146 -	spin_lock_irqsave(&dma_spin_lock, flags);
  56.147 -	return flags;
  56.148 -}
  56.149 -
  56.150 -static __inline__ void release_dma_lock(unsigned long flags)
  56.151 -{
  56.152 -	spin_unlock_irqrestore(&dma_spin_lock, flags);
  56.153 -}
  56.154 -
  56.155 -/* enable/disable a specific DMA channel */
  56.156 -static __inline__ void enable_dma(unsigned int dmanr)
  56.157 -{
  56.158 -	if (dmanr<=3)
  56.159 -		dma_outb(dmanr,  DMA1_MASK_REG);
  56.160 -	else
  56.161 -		dma_outb(dmanr & 3,  DMA2_MASK_REG);
  56.162 -}
  56.163 -
  56.164 -static __inline__ void disable_dma(unsigned int dmanr)
  56.165 -{
  56.166 -	if (dmanr<=3)
  56.167 -		dma_outb(dmanr | 4,  DMA1_MASK_REG);
  56.168 -	else
  56.169 -		dma_outb((dmanr & 3) | 4,  DMA2_MASK_REG);
  56.170 -}
  56.171 -
  56.172 -/* Clear the 'DMA Pointer Flip Flop'.
  56.173 - * Write 0 for LSB/MSB, 1 for MSB/LSB access.
  56.174 - * Use this once to initialize the FF to a known state.
  56.175 - * After that, keep track of it. :-)
  56.176 - * --- In order to do that, the DMA routines below should ---
  56.177 - * --- only be used while holding the DMA lock ! ---
  56.178 - */
  56.179 -static __inline__ void clear_dma_ff(unsigned int dmanr)
  56.180 -{
  56.181 -	if (dmanr<=3)
  56.182 -		dma_outb(0,  DMA1_CLEAR_FF_REG);
  56.183 -	else
  56.184 -		dma_outb(0,  DMA2_CLEAR_FF_REG);
  56.185 -}
  56.186 -
  56.187 -/* set mode (above) for a specific DMA channel */
  56.188 -static __inline__ void set_dma_mode(unsigned int dmanr, char mode)
  56.189 -{
  56.190 -	if (dmanr<=3)
  56.191 -		dma_outb(mode | dmanr,  DMA1_MODE_REG);
  56.192 -	else
  56.193 -		dma_outb(mode | (dmanr&3),  DMA2_MODE_REG);
  56.194 -}
  56.195 -
  56.196 -/* Set only the page register bits of the transfer address.
  56.197 - * This is used for successive transfers when we know the contents of
  56.198 - * the lower 16 bits of the DMA current address register, but a 64k boundary
  56.199 - * may have been crossed.
  56.200 - */
  56.201 -static __inline__ void set_dma_page(unsigned int dmanr, char pagenr)
  56.202 -{
  56.203 -	switch(dmanr) {
  56.204 -		case 0:
  56.205 -			dma_outb(pagenr, DMA_PAGE_0);
  56.206 -			break;
  56.207 -		case 1:
  56.208 -			dma_outb(pagenr, DMA_PAGE_1);
  56.209 -			break;
  56.210 -		case 2:
  56.211 -			dma_outb(pagenr, DMA_PAGE_2);
  56.212 -			break;
  56.213 -		case 3:
  56.214 -			dma_outb(pagenr, DMA_PAGE_3);
  56.215 -			break;
  56.216 -		case 5:
  56.217 -			dma_outb(pagenr & 0xfe, DMA_PAGE_5);
  56.218 -			break;
  56.219 -		case 6:
  56.220 -			dma_outb(pagenr & 0xfe, DMA_PAGE_6);
  56.221 -			break;
  56.222 -		case 7:
  56.223 -			dma_outb(pagenr & 0xfe, DMA_PAGE_7);
  56.224 -			break;
  56.225 -	}
  56.226 -}
  56.227 -
  56.228 -
  56.229 -/* Set transfer address & page bits for specific DMA channel.
  56.230 - * Assumes dma flipflop is clear.
  56.231 - */
  56.232 -static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a)
  56.233 -{
  56.234 -	set_dma_page(dmanr, a>>16);
  56.235 -	if (dmanr <= 3)  {
  56.236 -	    dma_outb( a & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE );
  56.237 -            dma_outb( (a>>8) & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE );
  56.238 -	}  else  {
  56.239 -	    dma_outb( (a>>1) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE );
  56.240 -	    dma_outb( (a>>9) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE );
  56.241 -	}
  56.242 -}
  56.243 -
  56.244 -
  56.245 -/* Set transfer size (max 64k for DMA1..3, 128k for DMA5..7) for
  56.246 - * a specific DMA channel.
  56.247 - * You must ensure the parameters are valid.
  56.248 - * NOTE: from a manual: "the number of transfers is one more
  56.249 - * than the initial word count"! This is taken into account.
  56.250 - * Assumes dma flip-flop is clear.
  56.251 - * NOTE 2: "count" represents _bytes_ and must be even for channels 5-7.
  56.252 - */
  56.253 -static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count)
  56.254 -{
  56.255 -        count--;
  56.256 -	if (dmanr <= 3)  {
  56.257 -	    dma_outb( count & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE );
  56.258 -	    dma_outb( (count>>8) & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE );
  56.259 -        } else {
  56.260 -	    dma_outb( (count>>1) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE );
  56.261 -	    dma_outb( (count>>9) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE );
  56.262 -        }
  56.263 -}
  56.264 -
  56.265 -
  56.266 -/* Get DMA residue count. After a DMA transfer, this
  56.267 - * should return zero. Reading this while a DMA transfer is
  56.268 - * still in progress will return unpredictable results.
  56.269 - * If called before the channel has been used, it may return 1.
  56.270 - * Otherwise, it returns the number of _bytes_ left to transfer.
  56.271 - *
  56.272 - * Assumes DMA flip-flop is clear.
  56.273 - */
  56.274 -static __inline__ int get_dma_residue(unsigned int dmanr)
  56.275 -{
  56.276 -	unsigned int io_port = (dmanr<=3)? ((dmanr&3)<<1) + 1 + IO_DMA1_BASE
  56.277 -					 : ((dmanr&3)<<2) + 2 + IO_DMA2_BASE;
  56.278 -
  56.279 -	/* using short to get 16-bit wrap around */
  56.280 -	unsigned short count;
  56.281 -
  56.282 -	count = 1 + dma_inb(io_port);
  56.283 -	count += dma_inb(io_port) << 8;
  56.284 -	
  56.285 -	return (dmanr<=3)? count : (count<<1);
  56.286 -}
  56.287 -
  56.288 -
  56.289 -/* These are in kernel/dma.c: */
  56.290 -extern int request_dma(unsigned int dmanr, const char * device_id);	/* reserve a DMA channel */
  56.291 -extern void free_dma(unsigned int dmanr);	/* release it again */
  56.292 -
  56.293 -/* From PCI */
  56.294 -
  56.295 -#ifdef CONFIG_PCI
  56.296 -extern int isa_dma_bridge_buggy;
  56.297 -#else
  56.298 -#define isa_dma_bridge_buggy 	(0)
  56.299 -#endif
  56.300 -
  56.301 -#endif /* _ASM_DMA_H */
    57.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/elf.h	Fri Mar 14 15:48:09 2003 +0000
    57.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    57.3 @@ -1,104 +0,0 @@
    57.4 -#ifndef __ASMi386_ELF_H
    57.5 -#define __ASMi386_ELF_H
    57.6 -
    57.7 -/*
    57.8 - * ELF register definitions..
    57.9 - */
   57.10 -
   57.11 -#include <asm/ptrace.h>
   57.12 -#include <asm/user.h>
   57.13 -
   57.14 -#include <linux/utsname.h>
   57.15 -
   57.16 -typedef unsigned long elf_greg_t;
   57.17 -
   57.18 -#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
   57.19 -typedef elf_greg_t elf_gregset_t[ELF_NGREG];
   57.20 -
   57.21 -typedef struct user_i387_struct elf_fpregset_t;
   57.22 -typedef struct user_fxsr_struct elf_fpxregset_t;
   57.23 -
   57.24 -/*
   57.25 - * This is used to ensure we don't load something for the wrong architecture.
   57.26 - */
   57.27 -#define elf_check_arch(x) \
   57.28 -	(((x)->e_machine == EM_386) || ((x)->e_machine == EM_486))
   57.29 -
   57.30 -/*
   57.31 - * These are used to set parameters in the core dumps.
   57.32 - */
   57.33 -#define ELF_CLASS	ELFCLASS32
   57.34 -#define ELF_DATA	ELFDATA2LSB
   57.35 -#define ELF_ARCH	EM_386
   57.36 -
   57.37 -/* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx
   57.38 -   contains a pointer to a function which might be registered using `atexit'.
   57.39 -   This provides a mean for the dynamic linker to call DT_FINI functions for
   57.40 -   shared libraries that have been loaded before the code runs.
   57.41 -
   57.42 -   A value of 0 tells we have no such handler. 
   57.43 -
   57.44 -   We might as well make sure everything else is cleared too (except for %esp),
   57.45 -   just to make things more deterministic.
   57.46 - */
   57.47 -#define ELF_PLAT_INIT(_r)	do { \
   57.48 -	_r->ebx = 0; _r->ecx = 0; _r->edx = 0; \
   57.49 -	_r->esi = 0; _r->edi = 0; _r->ebp = 0; \
   57.50 -	_r->eax = 0; \
   57.51 -} while (0)
   57.52 -
   57.53 -#define USE_ELF_CORE_DUMP
   57.54 -#define ELF_EXEC_PAGESIZE	4096
   57.55 -
   57.56 -/* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
   57.57 -   use of this is to invoke "./ld.so someprog" to test out a new version of
   57.58 -   the loader.  We need to make sure that it is out of the way of the program
   57.59 -   that it will "exec", and that there is sufficient room for the brk.  */
   57.60 -
   57.61 -#define ELF_ET_DYN_BASE         (TASK_SIZE / 3 * 2)
   57.62 -
   57.63 -/* Wow, the "main" arch needs arch dependent functions too.. :) */
   57.64 -
   57.65 -/* regs is struct pt_regs, pr_reg is elf_gregset_t (which is
   57.66 -   now struct_user_regs, they are different) */
   57.67 -
   57.68 -#define ELF_CORE_COPY_REGS(pr_reg, regs)		\
   57.69 -	pr_reg[0] = regs->ebx;				\
   57.70 -	pr_reg[1] = regs->ecx;				\
   57.71 -	pr_reg[2] = regs->edx;				\
   57.72 -	pr_reg[3] = regs->esi;				\
   57.73 -	pr_reg[4] = regs->edi;				\
   57.74 -	pr_reg[5] = regs->ebp;				\
   57.75 -	pr_reg[6] = regs->eax;				\
   57.76 -	pr_reg[7] = regs->xds;				\
   57.77 -	pr_reg[8] = regs->xes;				\
   57.78 -	/* fake once used fs and gs selectors? */	\
   57.79 -	pr_reg[9] = regs->xds;	/* was fs and __fs */	\
   57.80 -	pr_reg[10] = regs->xds;	/* was gs and __gs */	\
   57.81 -	pr_reg[11] = regs->orig_eax;			\
   57.82 -	pr_reg[12] = regs->eip;				\
   57.83 -	pr_reg[13] = regs->xcs;				\
   57.84 -	pr_reg[14] = regs->eflags;			\
   57.85 -	pr_reg[15] = regs->esp;				\
   57.86 -	pr_reg[16] = regs->xss;
   57.87 -
   57.88 -/* This yields a mask that user programs can use to figure out what
   57.89 -   instruction set this CPU supports.  This could be done in user space,
   57.90 -   but it's not easy, and we've already done it here.  */
   57.91 -
   57.92 -#define ELF_HWCAP	(boot_cpu_data.x86_capability[0])
   57.93 -
   57.94 -/* This yields a string that ld.so will use to load implementation
   57.95 -   specific libraries for optimization.  This is more specific in
   57.96 -   intent than poking at uname or /proc/cpuinfo.
   57.97 -
   57.98 -   For the moment, we have only optimizations for the Intel generations,
   57.99 -   but that could change... */
  57.100 -
  57.101 -#define ELF_PLATFORM  (system_utsname.machine)
  57.102 -
  57.103 -#ifdef __KERNEL__
  57.104 -#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
  57.105 -#endif
  57.106 -
  57.107 -#endif
    58.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/errno.h	Fri Mar 14 15:48:09 2003 +0000
    58.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    58.3 @@ -1,132 +0,0 @@
    58.4 -#ifndef _I386_ERRNO_H
    58.5 -#define _I386_ERRNO_H
    58.6 -
    58.7 -#define	EPERM		 1	/* Operation not permitted */
    58.8 -#define	ENOENT		 2	/* No such file or directory */
    58.9 -#define	ESRCH		 3	/* No such process */
   58.10 -#define	EINTR		 4	/* Interrupted system call */
   58.11 -#define	EIO		 5	/* I/O error */
   58.12 -#define	ENXIO		 6	/* No such device or address */
   58.13 -#define	E2BIG		 7	/* Argument list too long */
   58.14 -#define	ENOEXEC		 8	/* Exec format error */
   58.15 -#define	EBADF		 9	/* Bad file number */
   58.16 -#define	ECHILD		10	/* No child processes */
   58.17 -#define	EAGAIN		11	/* Try again */
   58.18 -#define	ENOMEM		12	/* Out of memory */
   58.19 -#define	EACCES		13	/* Permission denied */
   58.20 -#define	EFAULT		14	/* Bad address */
   58.21 -#define	ENOTBLK		15	/* Block device required */
   58.22 -#define	EBUSY		16	/* Device or resource busy */
   58.23 -#define	EEXIST		17	/* File exists */
   58.24 -#define	EXDEV		18	/* Cross-device link */
   58.25 -#define	ENODEV		19	/* No such device */
   58.26 -#define	ENOTDIR		20	/* Not a directory */
   58.27 -#define	EISDIR		21	/* Is a directory */
   58.28 -#define	EINVAL		22	/* Invalid argument */
   58.29 -#define	ENFILE		23	/* File table overflow */
   58.30 -#define	EMFILE		24	/* Too many open files */
   58.31 -#define	ENOTTY		25	/* Not a typewriter */
   58.32 -#define	ETXTBSY		26	/* Text file busy */
   58.33 -#define	EFBIG		27	/* File too large */
   58.34 -#define	ENOSPC		28	/* No space left on device */
   58.35 -#define	ESPIPE		29	/* Illegal seek */
   58.36 -#define	EROFS		30	/* Read-only file system */
   58.37 -#define	EMLINK		31	/* Too many links */
   58.38 -#define	EPIPE		32	/* Broken pipe */
   58.39 -#define	EDOM		33	/* Math argument out of domain of func */
   58.40 -#define	ERANGE		34	/* Math result not representable */
   58.41 -#define	EDEADLK		35	/* Resource deadlock would occur */
   58.42 -#define	ENAMETOOLONG	36	/* File name too long */
   58.43 -#define	ENOLCK		37	/* No record locks available */
   58.44 -#define	ENOSYS		38	/* Function not implemented */
   58.45 -#define	ENOTEMPTY	39	/* Directory not empty */
   58.46 -#define	ELOOP		40	/* Too many symbolic links encountered */
   58.47 -#define	EWOULDBLOCK	EAGAIN	/* Operation would block */
   58.48 -#define	ENOMSG		42	/* No message of desired type */
   58.49 -#define	EIDRM		43	/* Identifier removed */
   58.50 -#define	ECHRNG		44	/* Channel number out of range */
   58.51 -#define	EL2NSYNC	45	/* Level 2 not synchronized */
   58.52 -#define	EL3HLT		46	/* Level 3 halted */
   58.53 -#define	EL3RST		47	/* Level 3 reset */
   58.54 -#define	ELNRNG		48	/* Link number out of range */
   58.55 -#define	EUNATCH		49	/* Protocol driver not attached */
   58.56 -#define	ENOCSI		50	/* No CSI structure available */
   58.57 -#define	EL2HLT		51	/* Level 2 halted */
   58.58 -#define	EBADE		52	/* Invalid exchange */
   58.59 -#define	EBADR		53	/* Invalid request descriptor */
   58.60 -#define	EXFULL		54	/* Exchange full */
   58.61 -#define	ENOANO		55	/* No anode */
   58.62 -#define	EBADRQC		56	/* Invalid request code */
   58.63 -#define	EBADSLT		57	/* Invalid slot */
   58.64 -
   58.65 -#define	EDEADLOCK	EDEADLK
   58.66 -
   58.67 -#define	EBFONT		59	/* Bad font file format */
   58.68 -#define	ENOSTR		60	/* Device not a stream */
   58.69 -#define	ENODATA		61	/* No data available */
   58.70 -#define	ETIME		62	/* Timer expired */
   58.71 -#define	ENOSR		63	/* Out of streams resources */
   58.72 -#define	ENONET		64	/* Machine is not on the network */
   58.73 -#define	ENOPKG		65	/* Package not installed */
   58.74 -#define	EREMOTE		66	/* Object is remote */
   58.75 -#define	ENOLINK		67	/* Link has been severed */
   58.76 -#define	EADV		68	/* Advertise error */
   58.77 -#define	ESRMNT		69	/* Srmount error */
   58.78 -#define	ECOMM		70	/* Communication error on send */
   58.79 -#define	EPROTO		71	/* Protocol error */
   58.80 -#define	EMULTIHOP	72	/* Multihop attempted */
   58.81 -#define	EDOTDOT		73	/* RFS specific error */
   58.82 -#define	EBADMSG		74	/* Not a data message */
   58.83 -#define	EOVERFLOW	75	/* Value too large for defined data type */
   58.84 -#define	ENOTUNIQ	76	/* Name not unique on network */
   58.85 -#define	EBADFD		77	/* File descriptor in bad state */
   58.86 -#define	EREMCHG		78	/* Remote address changed */
   58.87 -#define	ELIBACC		79	/* Can not access a needed shared library */
   58.88 -#define	ELIBBAD		80	/* Accessing a corrupted shared library */
   58.89 -#define	ELIBSCN		81	/* .lib section in a.out corrupted */
   58.90 -#define	ELIBMAX		82	/* Attempting to link in too many shared libraries */
   58.91 -#define	ELIBEXEC	83	/* Cannot exec a shared library directly */
   58.92 -#define	EILSEQ		84	/* Illegal byte sequence */
   58.93 -#define	ERESTART	85	/* Interrupted system call should be restarted */
   58.94 -#define	ESTRPIPE	86	/* Streams pipe error */
   58.95 -#define	EUSERS		87	/* Too many users */
   58.96 -#define	ENOTSOCK	88	/* Socket operation on non-socket */
   58.97 -#define	EDESTADDRREQ	89	/* Destination address required */
   58.98 -#define	EMSGSIZE	90	/* Message too long */
   58.99 -#define	EPROTOTYPE	91	/* Protocol wrong type for socket */
  58.100 -#define	ENOPROTOOPT	92	/* Protocol not available */
  58.101 -#define	EPROTONOSUPPORT	93	/* Protocol not supported */
  58.102 -#define	ESOCKTNOSUPPORT	94	/* Socket type not supported */
  58.103 -#define	EOPNOTSUPP	95	/* Operation not supported on transport endpoint */
  58.104 -#define	EPFNOSUPPORT	96	/* Protocol family not supported */
  58.105 -#define	EAFNOSUPPORT	97	/* Address family not supported by protocol */
  58.106 -#define	EADDRINUSE	98	/* Address already in use */
  58.107 -#define	EADDRNOTAVAIL	99	/* Cannot assign requested address */
  58.108 -#define	ENETDOWN	100	/* Network is down */
  58.109 -#define	ENETUNREACH	101	/* Network is unreachable */
  58.110 -#define	ENETRESET	102	/* Network dropped connection because of reset */
  58.111 -#define	ECONNABORTED	103	/* Software caused connection abort */
  58.112 -#define	ECONNRESET	104	/* Connection reset by peer */
  58.113 -#define	ENOBUFS		105	/* No buffer space available */
  58.114 -#define	EISCONN		106	/* Transport endpoint is already connected */
  58.115 -#define	ENOTCONN	107	/* Transport endpoint is not connected */
  58.116 -#define	ESHUTDOWN	108	/* Cannot send after transport endpoint shutdown */
  58.117 -#define	ETOOMANYREFS	109	/* Too many references: cannot splice */
  58.118 -#define	ETIMEDOUT	110	/* Connection timed out */
  58.119 -#define	ECONNREFUSED	111	/* Connection refused */
  58.120 -#define	EHOSTDOWN	112	/* Host is down */
  58.121 -#define	EHOSTUNREACH	113	/* No route to host */
  58.122 -#define	EALREADY	114	/* Operation already in progress */
  58.123 -#define	EINPROGRESS	115	/* Operation now in progress */
  58.124 -#define	ESTALE		116	/* Stale NFS file handle */
  58.125 -#define	EUCLEAN		117	/* Structure needs cleaning */
  58.126 -#define	ENOTNAM		118	/* Not a XENIX named type file */
  58.127 -#define	ENAVAIL		119	/* No XENIX semaphores available */
  58.128 -#define	EISNAM		120	/* Is a named type file */
  58.129 -#define	EREMOTEIO	121	/* Remote I/O error */
  58.130 -#define	EDQUOT		122	/* Quota exceeded */
  58.131 -
  58.132 -#define	ENOMEDIUM	123	/* No medium found */
  58.133 -#define	EMEDIUMTYPE	124	/* Wrong medium type */
  58.134 -
  58.135 -#endif
    59.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/fcntl.h	Fri Mar 14 15:48:09 2003 +0000
    59.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    59.3 @@ -1,87 +0,0 @@
    59.4 -#ifndef _I386_FCNTL_H
    59.5 -#define _I386_FCNTL_H
    59.6 -
    59.7 -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
    59.8 -   located on an ext2 file system */
    59.9 -#define O_ACCMODE	   0003
   59.10 -#define O_RDONLY	     00
   59.11 -#define O_WRONLY	     01
   59.12 -#define O_RDWR		     02
   59.13 -#define O_CREAT		   0100	/* not fcntl */
   59.14 -#define O_EXCL		   0200	/* not fcntl */
   59.15 -#define O_NOCTTY	   0400	/* not fcntl */
   59.16 -#define O_TRUNC		  01000	/* not fcntl */
   59.17 -#define O_APPEND	  02000
   59.18 -#define O_NONBLOCK	  04000
   59.19 -#define O_NDELAY	O_NONBLOCK
   59.20 -#define O_SYNC		 010000
   59.21 -#define FASYNC		 020000	/* fcntl, for BSD compatibility */
   59.22 -#define O_DIRECT	 040000	/* direct disk access hint */
   59.23 -#define O_LARGEFILE	0100000
   59.24 -#define O_DIRECTORY	0200000	/* must be a directory */
   59.25 -#define O_NOFOLLOW	0400000 /* don't follow links */
   59.26 -
   59.27 -#define F_DUPFD		0	/* dup */
   59.28 -#define F_GETFD		1	/* get close_on_exec */
   59.29 -#define F_SETFD		2	/* set/clear close_on_exec */
   59.30 -#define F_GETFL		3	/* get file->f_flags */
   59.31 -#define F_SETFL		4	/* set file->f_flags */
   59.32 -#define F_GETLK		5
   59.33 -#define F_SETLK		6
   59.34 -#define F_SETLKW	7
   59.35 -
   59.36 -#define F_SETOWN	8	/*  for sockets. */
   59.37 -#define F_GETOWN	9	/*  for sockets. */
   59.38 -#define F_SETSIG	10	/*  for sockets. */
   59.39 -#define F_GETSIG	11	/*  for sockets. */
   59.40 -
   59.41 -#define F_GETLK64	12	/*  using 'struct flock64' */
   59.42 -#define F_SETLK64	13
   59.43 -#define F_SETLKW64	14
   59.44 -
   59.45 -/* for F_[GET|SET]FL */
   59.46 -#define FD_CLOEXEC	1	/* actually anything with low bit set goes */
   59.47 -
   59.48 -/* for posix fcntl() and lockf() */
   59.49 -#define F_RDLCK		0
   59.50 -#define F_WRLCK		1
   59.51 -#define F_UNLCK		2
   59.52 -
   59.53 -/* for old implementation of bsd flock () */
   59.54 -#define F_EXLCK		4	/* or 3 */
   59.55 -#define F_SHLCK		8	/* or 4 */
   59.56 -
   59.57 -/* for leases */
   59.58 -#define F_INPROGRESS	16
   59.59 -
   59.60 -/* operations for bsd flock(), also used by the kernel implementation */
   59.61 -#define LOCK_SH		1	/* shared lock */
   59.62 -#define LOCK_EX		2	/* exclusive lock */
   59.63 -#define LOCK_NB		4	/* or'd with one of the above to prevent
   59.64 -				   blocking */
   59.65 -#define LOCK_UN		8	/* remove lock */
   59.66 -
   59.67 -#define LOCK_MAND	32	/* This is a mandatory flock */
   59.68 -#define LOCK_READ	64	/* ... Which allows concurrent read operations */
   59.69 -#define LOCK_WRITE	128	/* ... Which allows concurrent write operations */
   59.70 -#define LOCK_RW		192	/* ... Which allows concurrent read & write ops */
   59.71 -
   59.72 -struct flock {
   59.73 -	short l_type;
   59.74 -	short l_whence;
   59.75 -	off_t l_start;
   59.76 -	off_t l_len;
   59.77 -	pid_t l_pid;
   59.78 -};
   59.79 -
   59.80 -struct flock64 {
   59.81 -	short  l_type;
   59.82 -	short  l_whence;
   59.83 -	loff_t l_start;
   59.84 -	loff_t l_len;
   59.85 -	pid_t  l_pid;
   59.86 -};
   59.87 -
   59.88 -#define F_LINUX_SPECIFIC_BASE	1024
   59.89 -
   59.90 -#endif
    60.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/floppy.h	Fri Mar 14 15:48:09 2003 +0000
    60.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    60.3 @@ -1,320 +0,0 @@
    60.4 -/*
    60.5 - * Architecture specific parts of the Floppy driver
    60.6 - *
    60.7 - * This file is subject to the terms and conditions of the GNU General Public
    60.8 - * License.  See the file "COPYING" in the main directory of this archive
    60.9 - * for more details.
   60.10 - *
   60.11 - * Copyright (C) 1995
   60.12 - */
   60.13 -#ifndef __ASM_I386_FLOPPY_H
   60.14 -#define __ASM_I386_FLOPPY_H
   60.15 -
   60.16 -#include <linux/vmalloc.h>
   60.17 -
   60.18 -
   60.19 -/*
   60.20 - * The DMA channel used by the floppy controller cannot access data at
   60.21 - * addresses >= 16MB
   60.22 - *
   60.23 - * Went back to the 1MB limit, as some people had problems with the floppy
   60.24 - * driver otherwise. It doesn't matter much for performance anyway, as most
   60.25 - * floppy accesses go through the track buffer.
   60.26 - */
   60.27 -#define _CROSS_64KB(a,s,vdma) \
   60.28 -(!vdma && ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64))
   60.29 -
   60.30 -#define CROSS_64KB(a,s) _CROSS_64KB(a,s,use_virtual_dma & 1)
   60.31 -
   60.32 -
   60.33 -#define SW fd_routine[use_virtual_dma&1]
   60.34 -#define CSW fd_routine[can_use_virtual_dma & 1]
   60.35 -
   60.36 -
   60.37 -#define fd_inb(port)			inb_p(port)
   60.38 -#define fd_outb(port,value)		outb_p(port,value)
   60.39 -
   60.40 -#define fd_request_dma()        CSW._request_dma(FLOPPY_DMA,"floppy")
   60.41 -#define fd_free_dma()           CSW._free_dma(FLOPPY_DMA)
   60.42 -#define fd_enable_irq()         enable_irq(FLOPPY_IRQ)
   60.43 -#define fd_disable_irq()        disable_irq(FLOPPY_IRQ)
   60.44 -#define fd_free_irq()		free_irq(FLOPPY_IRQ, NULL)
   60.45 -#define fd_get_dma_residue()    SW._get_dma_residue(FLOPPY_DMA)
   60.46 -#define fd_dma_mem_alloc(size)	SW._dma_mem_alloc(size)
   60.47 -#define fd_dma_setup(addr, size, mode, io) SW._dma_setup(addr, size, mode, io)
   60.48 -
   60.49 -#define FLOPPY_CAN_FALLBACK_ON_NODMA
   60.50 -
   60.51 -static int virtual_dma_count;
   60.52 -static int virtual_dma_residue;
   60.53 -static char *virtual_dma_addr;
   60.54 -static int virtual_dma_mode;
   60.55 -static int doing_pdma;
   60.56 -
   60.57 -static void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
   60.58 -{
   60.59 -	register unsigned char st;
   60.60 -
   60.61 -#undef TRACE_FLPY_INT
   60.62 -#define NO_FLOPPY_ASSEMBLER
   60.63 -
   60.64 -#ifdef TRACE_FLPY_INT
   60.65 -	static int calls=0;
   60.66 -	static int bytes=0;
   60.67 -	static int dma_wait=0;
   60.68 -#endif
   60.69 -	if(!doing_pdma) {
   60.70 -		floppy_interrupt(irq, dev_id, regs);
   60.71 -		return;
   60.72 -	}
   60.73 -
   60.74 -#ifdef TRACE_FLPY_INT
   60.75 -	if(!calls)
   60.76 -		bytes = virtual_dma_count;
   60.77 -#endif
   60.78 -
   60.79 -#ifndef NO_FLOPPY_ASSEMBLER
   60.80 -	__asm__ (
   60.81 -       "testl %1,%1"
   60.82 -	"je 3f"
   60.83 -"1:	inb %w4,%b0"
   60.84 -	"andb $160,%b0"
   60.85 -	"cmpb $160,%b0"
   60.86 -	"jne 2f"
   60.87 -	"incw %w4"
   60.88 -	"testl %3,%3"
   60.89 -	"jne 4f"
   60.90 -	"inb %w4,%b0"
   60.91 -	"movb %0,(%2)"
   60.92 -	"jmp 5f"
   60.93 -"4:    	movb (%2),%0"
   60.94 -	"outb %b0,%w4"
   60.95 -"5:	decw %w4"
   60.96 -	"outb %0,$0x80"
   60.97 -	"decl %1"
   60.98 -	"incl %2"
   60.99 -	"testl %1,%1"
  60.100 -	"jne 1b"
  60.101 -"3:	inb %w4,%b0"
  60.102 -"2:	"
  60.103 -       : "=a" ((char) st), 
  60.104 -       "=c" ((long) virtual_dma_count), 
  60.105 -       "=S" ((long) virtual_dma_addr)
  60.106 -       : "b" ((long) virtual_dma_mode),
  60.107 -       "d" ((short) virtual_dma_port+4), 
  60.108 -       "1" ((long) virtual_dma_count),
  60.109 -       "2" ((long) virtual_dma_addr));
  60.110 -#else	
  60.111 -	{
  60.112 -		register int lcount;
  60.113 -		register char *lptr;
  60.114 -
  60.115 -		st = 1;
  60.116 -		for(lcount=virtual_dma_count, lptr=virtual_dma_addr; 
  60.117 -		    lcount; lcount--, lptr++) {
  60.118 -			st=inb(virtual_dma_port+4) & 0xa0 ;
  60.119 -			if(st != 0xa0) 
  60.120 -				break;
  60.121 -			if(virtual_dma_mode)
  60.122 -				outb_p(*lptr, virtual_dma_port+5);
  60.123 -			else
  60.124 -				*lptr = inb_p(virtual_dma_port+5);
  60.125 -		}
  60.126 -		virtual_dma_count = lcount;
  60.127 -		virtual_dma_addr = lptr;
  60.128 -		st = inb(virtual_dma_port+4);
  60.129 -	}
  60.130 -#endif
  60.131 -
  60.132 -#ifdef TRACE_FLPY_INT
  60.133 -	calls++;
  60.134 -#endif
  60.135 -	if(st == 0x20)
  60.136 -		return;
  60.137 -	if(!(st & 0x20)) {
  60.138 -		virtual_dma_residue += virtual_dma_count;
  60.139 -		virtual_dma_count=0;
  60.140 -#ifdef TRACE_FLPY_INT
  60.141 -		printk("count=%x, residue=%x calls=%d bytes=%d dma_wait=%d\n", 
  60.142 -		       virtual_dma_count, virtual_dma_residue, calls, bytes,
  60.143 -		       dma_wait);
  60.144 -		calls = 0;
  60.145 -		dma_wait=0;
  60.146 -#endif
  60.147 -		doing_pdma = 0;
  60.148 -		floppy_interrupt(irq, dev_id, regs);
  60.149 -		return;
  60.150 -	}
  60.151 -#ifdef TRACE_FLPY_INT
  60.152 -	if(!virtual_dma_count)
  60.153 -		dma_wait++;
  60.154 -#endif
  60.155 -}
  60.156 -
  60.157 -static void fd_disable_dma(void)
  60.158 -{
  60.159 -	if(! (can_use_virtual_dma & 1))
  60.160 -		disable_dma(FLOPPY_DMA);
  60.161 -	doing_pdma = 0;
  60.162 -	virtual_dma_residue += virtual_dma_count;
  60.163 -	virtual_dma_count=0;
  60.164 -}
  60.165 -
  60.166 -static int vdma_request_dma(unsigned int dmanr, const char * device_id)
  60.167 -{
  60.168 -	return 0;
  60.169 -}
  60.170 -
  60.171 -static void vdma_nop(unsigned int dummy)
  60.172 -{
  60.173 -}
  60.174 -
  60.175 -
  60.176 -static int vdma_get_dma_residue(unsigned int dummy)
  60.177 -{
  60.178 -	return virtual_dma_count + virtual_dma_residue;
  60.179 -}
  60.180 -
  60.181 -
  60.182 -static int fd_request_irq(void)
  60.183 -{
  60.184 -	if(can_use_virtual_dma)
  60.185 -		return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT,
  60.186 -						   "floppy", NULL);
  60.187 -	else
  60.188 -		return request_irq(FLOPPY_IRQ, floppy_interrupt,
  60.189 -						   SA_INTERRUPT|SA_SAMPLE_RANDOM,
  60.190 -						   "floppy", NULL);	
  60.191 -
  60.192 -}
  60.193 -
  60.194 -static unsigned long dma_mem_alloc(unsigned long size)
  60.195 -{
  60.196 -	return __get_dma_pages(GFP_KERNEL,get_order(size));
  60.197 -}
  60.198 -
  60.199 -
  60.200 -static unsigned long vdma_mem_alloc(unsigned long size)
  60.201 -{
  60.202 -	return (unsigned long) vmalloc(size);
  60.203 -
  60.204 -}
  60.205 -
  60.206 -#define nodma_mem_alloc(size) vdma_mem_alloc(size)
  60.207 -
  60.208 -static void _fd_dma_mem_free(unsigned long addr, unsigned long size)
  60.209 -{
  60.210 -	if((unsigned int) addr >= (unsigned int) high_memory)
  60.211 -		return vfree((void *)addr);
  60.212 -	else
  60.213 -		free_pages(addr, get_order(size));		
  60.214 -}
  60.215 -
  60.216 -#define fd_dma_mem_free(addr, size)  _fd_dma_mem_free(addr, size) 
  60.217 -
  60.218 -static void _fd_chose_dma_mode(char *addr, unsigned long size)
  60.219 -{
  60.220 -	if(can_use_virtual_dma == 2) {
  60.221 -		if((unsigned int) addr >= (unsigned int) high_memory ||
  60.222 -		   virt_to_bus(addr) >= 0x1000000 ||
  60.223 -		   _CROSS_64KB(addr, size, 0))
  60.224 -			use_virtual_dma = 1;
  60.225 -		else
  60.226 -			use_virtual_dma = 0;
  60.227 -	} else {
  60.228 -		use_virtual_dma = can_use_virtual_dma & 1;
  60.229 -	}
  60.230 -}
  60.231 -
  60.232 -#define fd_chose_dma_mode(addr, size) _fd_chose_dma_mode(addr, size)
  60.233 -
  60.234 -
  60.235 -static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io)
  60.236 -{
  60.237 -	doing_pdma = 1;
  60.238 -	virtual_dma_port = io;
  60.239 -	virtual_dma_mode = (mode  == DMA_MODE_WRITE);
  60.240 -	virtual_dma_addr = addr;
  60.241 -	virtual_dma_count = size;
  60.242 -	virtual_dma_residue = 0;
  60.243 -	return 0;
  60.244 -}
  60.245 -
  60.246 -static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
  60.247 -{
  60.248 -#ifdef FLOPPY_SANITY_CHECK
  60.249 -	if (CROSS_64KB(addr, size)) {
  60.250 -		printk("DMA crossing 64-K boundary %p-%p\n", addr, addr+size);
  60.251 -		return -1;
  60.252 -	}
  60.253 -#endif
  60.254 -	/* actual, physical DMA */
  60.255 -	doing_pdma = 0;
  60.256 -	clear_dma_ff(FLOPPY_DMA);
  60.257 -	set_dma_mode(FLOPPY_DMA,mode);
  60.258 -	set_dma_addr(FLOPPY_DMA,virt_to_bus(addr));
  60.259 -	set_dma_count(FLOPPY_DMA,size);
  60.260 -	enable_dma(FLOPPY_DMA);
  60.261 -	return 0;
  60.262 -}
  60.263 -
  60.264 -struct fd_routine_l {
  60.265 -	int (*_request_dma)(unsigned int dmanr, const char * device_id);
  60.266 -	void (*_free_dma)(unsigned int dmanr);
  60.267 -	int (*_get_dma_residue)(unsigned int dummy);
  60.268 -	unsigned long (*_dma_mem_alloc) (unsigned long size);
  60.269 -	int (*_dma_setup)(char *addr, unsigned long size, int mode, int io);
  60.270 -} fd_routine[] = {
  60.271 -	{
  60.272 -		request_dma,
  60.273 -		free_dma,
  60.274 -		get_dma_residue,
  60.275 -		dma_mem_alloc,
  60.276 -		hard_dma_setup
  60.277 -	},
  60.278 -	{
  60.279 -		vdma_request_dma,
  60.280 -		vdma_nop,
  60.281 -		vdma_get_dma_residue,
  60.282 -		vdma_mem_alloc,
  60.283 -		vdma_dma_setup
  60.284 -	}
  60.285 -};
  60.286 -
  60.287 -
  60.288 -static int FDC1 = 0x3f0;
  60.289 -static int FDC2 = -1;
  60.290 -
  60.291 -/*
  60.292 - * Floppy types are stored in the rtc's CMOS RAM and so rtc_lock
  60.293 - * is needed to prevent corrupted CMOS RAM in case "insmod floppy"
  60.294 - * coincides with another rtc CMOS user.		Paul G.
  60.295 - */
  60.296 -#define FLOPPY0_TYPE	({				\
  60.297 -	unsigned long flags;				\
  60.298 -	unsigned char val;				\
  60.299 -	spin_lock_irqsave(&rtc_lock, flags);		\
  60.300 -	val = (CMOS_READ(0x10) >> 4) & 15;		\
  60.301 -	spin_unlock_irqrestore(&rtc_lock, flags);	\
  60.302 -	val;						\
  60.303 -})
  60.304 -
  60.305 -#define FLOPPY1_TYPE	({				\
  60.306 -	unsigned long flags;				\
  60.307 -	unsigned char val;				\
  60.308 -	spin_lock_irqsave(&rtc_lock, flags);		\
  60.309 -	val = CMOS_READ(0x10) & 15;			\
  60.310 -	spin_unlock_irqrestore(&rtc_lock, flags);	\
  60.311 -	val;						\
  60.312 -})
  60.313 -
  60.314 -#define N_FDC 2
  60.315 -#define N_DRIVE 8
  60.316 -
  60.317 -#define FLOPPY_MOTOR_MASK 0xf0
  60.318 -
  60.319 -#define AUTO_DMA
  60.320 -
  60.321 -#define EXTRA_FLOPPY_PARAMS
  60.322 -
  60.323 -#endif /* __ASM_I386_FLOPPY_H */
    61.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hardirq.h	Fri Mar 14 15:48:09 2003 +0000
    61.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    61.3 @@ -1,91 +0,0 @@
    61.4 -#ifndef __ASM_HARDIRQ_H
    61.5 -#define __ASM_HARDIRQ_H
    61.6 -
    61.7 -#include <linux/config.h>
    61.8 -#include <linux/threads.h>
    61.9 -#include <linux/irq.h>
   61.10 -
   61.11 -/* assembly code in softirq.h is sensitive to the offsets of these fields */
   61.12 -typedef struct {
   61.13 -	unsigned int __softirq_pending;
   61.14 -	unsigned int __local_irq_count;
   61.15 -	unsigned int __local_bh_count;
   61.16 -	unsigned int __syscall_count;
   61.17 -	struct task_struct * __ksoftirqd_task; /* waitqueue is too large */
   61.18 -	unsigned int __nmi_count;	/* arch dependent */
   61.19 -} ____cacheline_aligned irq_cpustat_t;
   61.20 -
   61.21 -#include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */
   61.22 -
   61.23 -/*
   61.24 - * Are we in an interrupt context? Either doing bottom half
   61.25 - * or hardware interrupt processing?
   61.26 - */
   61.27 -#define in_interrupt() ({ int __cpu = smp_processor_id(); \
   61.28 -	(local_irq_count(__cpu) + local_bh_count(__cpu) != 0); })
   61.29 -
   61.30 -#define in_irq() (local_irq_count(smp_processor_id()) != 0)
   61.31 -
   61.32 -#ifndef CONFIG_SMP
   61.33 -
   61.34 -#define hardirq_trylock(cpu)	(local_irq_count(cpu) == 0)
   61.35 -#define hardirq_endlock(cpu)	do { } while (0)
   61.36 -
   61.37 -#define irq_enter(cpu, irq)	(local_irq_count(cpu)++)
   61.38 -#define irq_exit(cpu, irq)	(local_irq_count(cpu)--)
   61.39 -
   61.40 -#define synchronize_irq()	barrier()
   61.41 -
   61.42 -#else
   61.43 -
   61.44 -#include <asm/atomic.h>
   61.45 -#include <asm/smp.h>
   61.46 -
   61.47 -extern unsigned char global_irq_holder;
   61.48 -extern unsigned volatile long global_irq_lock; /* long for set_bit -RR */
   61.49 -
   61.50 -static inline int irqs_running (void)
   61.51 -{
   61.52 -	int i;
   61.53 -
   61.54 -	for (i = 0; i < smp_num_cpus; i++)
   61.55 -		if (local_irq_count(i))
   61.56 -			return 1;
   61.57 -	return 0;
   61.58 -}
   61.59 -
   61.60 -static inline void release_irqlock(int cpu)
   61.61 -{
   61.62 -	/* if we didn't own the irq lock, just ignore.. */
   61.63 -	if (global_irq_holder == (unsigned char) cpu) {
   61.64 -		global_irq_holder = NO_PROC_ID;
   61.65 -		clear_bit(0,&global_irq_lock);
   61.66 -	}
   61.67 -}
   61.68 -
   61.69 -static inline void irq_enter(int cpu, int irq)
   61.70 -{
   61.71 -	++local_irq_count(cpu);
   61.72 -
   61.73 -	while (test_bit(0,&global_irq_lock)) {
   61.74 -		cpu_relax();
   61.75 -	}
   61.76 -}
   61.77 -
   61.78 -static inline void irq_exit(int cpu, int irq)
   61.79 -{
   61.80 -	--local_irq_count(cpu);
   61.81 -}
   61.82 -
   61.83 -static inline int hardirq_trylock(int cpu)
   61.84 -{
   61.85 -	return !local_irq_count(cpu) && !test_bit(0,&global_irq_lock);
   61.86 -}
   61.87 -
   61.88 -#define hardirq_endlock(cpu)	do { } while (0)
   61.89 -
   61.90 -extern void synchronize_irq(void);
   61.91 -
   61.92 -#endif /* CONFIG_SMP */
   61.93 -
   61.94 -#endif /* __ASM_HARDIRQ_H */
    62.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/hdreg.h	Fri Mar 14 15:48:09 2003 +0000
    62.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    62.3 @@ -1,13 +0,0 @@
    62.4 -/*
    62.5 - *  linux/include/asm-i386/hdreg.h
    62.6 - *
    62.7 - *  Copyright (C) 1994-1996  Linus Torvalds & authors
    62.8 - */
    62.9 -
   62.10 -#ifndef __ASMi386_HDREG_H
   62.11 -#define __ASMi386_HDREG_H
   62.12 -
   62.13 -//typedef unsigned short ide_ioreg_t;
   62.14 -typedef unsigned long ide_ioreg_t;
   62.15 -
   62.16 -#endif /* __ASMi386_HDREG_H */
    63.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/i387.h	Fri Mar 14 15:48:09 2003 +0000
    63.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    63.3 @@ -1,89 +0,0 @@
    63.4 -/*
    63.5 - * include/asm-i386/i387.h
    63.6 - *
    63.7 - * Copyright (C) 1994 Linus Torvalds
    63.8 - *
    63.9 - * Pentium III FXSR, SSE support
   63.10 - * General FPU state handling cleanups
   63.11 - *	Gareth Hughes <gareth@valinux.com>, May 2000
   63.12 - */
   63.13 -
   63.14 -#ifndef __ASM_I386_I387_H
   63.15 -#define __ASM_I386_I387_H
   63.16 -
   63.17 -#include <linux/sched.h>
   63.18 -#include <asm/processor.h>
   63.19 -#include <asm/sigcontext.h>
   63.20 -#include <asm/user.h>
   63.21 -
   63.22 -extern void init_fpu(void);
   63.23 -/*
   63.24 - * FPU lazy state save handling...
   63.25 - */
   63.26 -extern void save_init_fpu( struct task_struct *tsk );
   63.27 -extern void restore_fpu( struct task_struct *tsk );
   63.28 -
   63.29 -extern void kernel_fpu_begin(void);
   63.30 -#define kernel_fpu_end() stts()
   63.31 -
   63.32 -
   63.33 -#define unlazy_fpu( tsk ) do { \
   63.34 -	if ( tsk->flags & PF_USEDFPU ) \
   63.35 -		save_init_fpu( tsk ); \
   63.36 -} while (0)
   63.37 -
   63.38 -#define clear_fpu( tsk ) do { \
   63.39 -	if ( tsk->flags & PF_USEDFPU ) { \
   63.40 -		asm volatile("fwait"); \
   63.41 -		tsk->flags &= ~PF_USEDFPU; \
   63.42 -		stts(); \
   63.43 -	} \
   63.44 -} while (0)
   63.45 -
   63.46 -/*
   63.47 - * FPU state interaction...
   63.48 - */
   63.49 -extern unsigned short get_fpu_cwd( struct task_struct *tsk );
   63.50 -extern unsigned short get_fpu_swd( struct task_struct *tsk );
   63.51 -extern unsigned short get_fpu_twd( struct task_struct *tsk );
   63.52 -extern unsigned short get_fpu_mxcsr( struct task_struct *tsk );
   63.53 -
   63.54 -extern void set_fpu_cwd( struct task_struct *tsk, unsigned short cwd );
   63.55 -extern void set_fpu_swd( struct task_struct *tsk, unsigned short swd );
   63.56 -extern void set_fpu_twd( struct task_struct *tsk, unsigned short twd );
   63.57 -extern void set_fpu_mxcsr( struct task_struct *tsk, unsigned short mxcsr );
   63.58 -
   63.59 -#define load_mxcsr( val ) do { \
   63.60 -	unsigned long __mxcsr = ((unsigned long)(val) & 0xffbf); \
   63.61 -	asm volatile( "ldmxcsr %0" : : "m" (__mxcsr) ); \
   63.62 -} while (0)
   63.63 -
   63.64 -/*
   63.65 - * Signal frame handlers...
   63.66 - */
   63.67 -extern int save_i387( struct _fpstate *buf );
   63.68 -extern int restore_i387( struct _fpstate *buf );
   63.69 -
   63.70 -/*
   63.71 - * ptrace request handers...
   63.72 - */
   63.73 -extern int get_fpregs( struct user_i387_struct *buf,
   63.74 -		       struct task_struct *tsk );
   63.75 -extern int set_fpregs( struct task_struct *tsk,
   63.76 -		       struct user_i387_struct *buf );
   63.77 -
   63.78 -extern int get_fpxregs( struct user_fxsr_struct *buf,
   63.79 -			struct task_struct *tsk );
   63.80 -extern int set_fpxregs( struct task_struct *tsk,
   63.81 -			struct user_fxsr_struct *buf );
   63.82 -extern void load_empty_fpu(struct task_struct *);
   63.83 -
   63.84 -/*
   63.85 - * FPU state for core dumps...
   63.86 - */
   63.87 -extern int dump_fpu( struct pt_regs *regs,
   63.88 -		     struct user_i387_struct *fpu );
   63.89 -extern int dump_extended_fpu( struct pt_regs *regs,
   63.90 -			      struct user_fxsr_struct *fpu );
   63.91 -
   63.92 -#endif /* __ASM_I386_I387_H */
    64.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ide.h	Fri Mar 14 15:48:09 2003 +0000
    64.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    64.3 @@ -1,92 +0,0 @@
    64.4 -/*
    64.5 - *  linux/include/asm-i386/ide.h
    64.6 - *
    64.7 - *  Copyright (C) 1994-1996  Linus Torvalds & authors
    64.8 - */
    64.9 -
   64.10 -/*
   64.11 - *  This file contains the i386 architecture specific IDE code.
   64.12 - */
   64.13 -
   64.14 -#ifndef __ASMi386_IDE_H
   64.15 -#define __ASMi386_IDE_H
   64.16 -
   64.17 -#ifdef __KERNEL__
   64.18 -
   64.19 -#include <linux/config.h>
   64.20 -
   64.21 -#ifndef MAX_HWIFS
   64.22 -# ifdef CONFIG_BLK_DEV_IDEPCI
   64.23 -#define MAX_HWIFS	10
   64.24 -# else
   64.25 -#define MAX_HWIFS	6
   64.26 -# endif
   64.27 -#endif
   64.28 -
   64.29 -static __inline__ int ide_default_irq(ide_ioreg_t base)
   64.30 -{
   64.31 -	switch (base) {
   64.32 -		case 0x1f0: return 14;
   64.33 -		case 0x170: return 15;
   64.34 -		case 0x1e8: return 11;
   64.35 -		case 0x168: return 10;
   64.36 -		case 0x1e0: return 8;
   64.37 -		case 0x160: return 12;
   64.38 -		default:
   64.39 -			return 0;
   64.40 -	}
   64.41 -}
   64.42 -
   64.43 -static __inline__ ide_ioreg_t ide_default_io_base(int index)
   64.44 -{
   64.45 -	switch (index) {
   64.46 -		case 0:	return 0x1f0;
   64.47 -		case 1:	return 0x170;
   64.48 -		case 2: return 0x1e8;
   64.49 -		case 3: return 0x168;
   64.50 -		case 4: return 0x1e0;
   64.51 -		case 5: return 0x160;
   64.52 -		default:
   64.53 -			return 0;
   64.54 -	}
   64.55 -}
   64.56 -
   64.57 -static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq)
   64.58 -{
   64.59 -	ide_ioreg_t reg = data_port;
   64.60 -	int i;
   64.61 -
   64.62 -	for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
   64.63 -		hw->io_ports[i] = reg;
   64.64 -		reg += 1;
   64.65 -	}
   64.66 -	if (ctrl_port) {
   64.67 -		hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
   64.68 -	} else {
   64.69 -		hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206;
   64.70 -	}
   64.71 -	if (irq != NULL)
   64.72 -		*irq = 0;
   64.73 -	hw->io_ports[IDE_IRQ_OFFSET] = 0;
   64.74 -}
   64.75 -
   64.76 -static __inline__ void ide_init_default_hwifs(void)
   64.77 -{
   64.78 -#ifndef CONFIG_BLK_DEV_IDEPCI
   64.79 -	hw_regs_t hw;
   64.80 -	int index;
   64.81 -
   64.82 -	for(index = 0; index < MAX_HWIFS; index++) {
   64.83 -		memset(&hw, 0, sizeof hw);
   64.84 -		ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
   64.85 -		hw.irq = ide_default_irq(ide_default_io_base(index));
   64.86 -		ide_register_hw(&hw, NULL);
   64.87 -	}
   64.88 -#endif /* CONFIG_BLK_DEV_IDEPCI */
   64.89 -}
   64.90 -
   64.91 -#include <asm-generic/ide_iops.h>
   64.92 -
   64.93 -#endif /* __KERNEL__ */
   64.94 -
   64.95 -#endif /* __ASMi386_IDE_H */
    65.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/init.h	Fri Mar 14 15:48:09 2003 +0000
    65.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    65.3 @@ -1,1 +0,0 @@
    65.4 -#error "<asm/init.h> should never be used - use <linux/init.h> instead"
    66.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/io_apic.h	Fri Mar 14 15:48:09 2003 +0000
    66.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    66.3 @@ -1,148 +0,0 @@
    66.4 -#ifndef __ASM_IO_APIC_H
    66.5 -#define __ASM_IO_APIC_H
    66.6 -
    66.7 -#include <linux/config.h>
    66.8 -#include <asm/types.h>
    66.9 -
   66.10 -/*
   66.11 - * Intel IO-APIC support for SMP and UP systems.
   66.12 - *
   66.13 - * Copyright (C) 1997, 1998, 1999, 2000 Ingo Molnar
   66.14 - */
   66.15 -
   66.16 -#ifdef CONFIG_X86_IO_APIC
   66.17 -
   66.18 -#define APIC_MISMATCH_DEBUG
   66.19 -
   66.20 -#define IO_APIC_BASE(idx) \
   66.21 -		((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + idx) \
   66.22 -		+ (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK)))
   66.23 -
   66.24 -/*
   66.25 - * The structure of the IO-APIC:
   66.26 - */
   66.27 -struct IO_APIC_reg_00 {
   66.28 -	__u32	__reserved_2	: 24,
   66.29 -		ID		:  4,
   66.30 -		__reserved_1	:  4;
   66.31 -} __attribute__ ((packed));
   66.32 -
   66.33 -struct IO_APIC_reg_01 {
   66.34 -	__u32	version		:  8,
   66.35 -		__reserved_2	:  7,
   66.36 -		PRQ		:  1,
   66.37 -		entries		:  8,
   66.38 -		__reserved_1	:  8;
   66.39 -} __attribute__ ((packed));
   66.40 -
   66.41 -struct IO_APIC_reg_02 {
   66.42 -	__u32	__reserved_2	: 24,
   66.43 -		arbitration	:  4,
   66.44 -		__reserved_1	:  4;
   66.45 -} __attribute__ ((packed));
   66.46 -
   66.47 -/*
   66.48 - * # of IO-APICs and # of IRQ routing registers
   66.49 - */
   66.50 -extern int nr_ioapics;
   66.51 -extern int nr_ioapic_registers[MAX_IO_APICS];
   66.52 -
   66.53 -enum ioapic_irq_destination_types {
   66.54 -	dest_Fixed = 0,
   66.55 -	dest_LowestPrio = 1,
   66.56 -	dest_SMI = 2,
   66.57 -	dest__reserved_1 = 3,
   66.58 -	dest_NMI = 4,
   66.59 -	dest_INIT = 5,
   66.60 -	dest__reserved_2 = 6,
   66.61 -	dest_ExtINT = 7
   66.62 -};
   66.63 -
   66.64 -struct IO_APIC_route_entry {
   66.65 -	__u32	vector		:  8,
   66.66 -		delivery_mode	:  3,	/* 000: FIXED
   66.67 -					 * 001: lowest prio
   66.68 -					 * 111: ExtINT
   66.69 -					 */
   66.70 -		dest_mode	:  1,	/* 0: physical, 1: logical */
   66.71 -		delivery_status	:  1,
   66.72 -		polarity	:  1,
   66.73 -		irr		:  1,
   66.74 -		trigger		:  1,	/* 0: edge, 1: level */
   66.75 -		mask		:  1,	/* 0: enabled, 1: disabled */
   66.76 -		__reserved_2	: 15;
   66.77 -
   66.78 -	union {		struct { __u32
   66.79 -					__reserved_1	: 24,
   66.80 -					physical_dest	:  4,
   66.81 -					__reserved_2	:  4;
   66.82 -			} physical;
   66.83 -
   66.84 -			struct { __u32
   66.85 -					__reserved_1	: 24,
   66.86 -					logical_dest	:  8;
   66.87 -			} logical;
   66.88 -	} dest;
   66.89 -
   66.90 -} __attribute__ ((packed));
   66.91 -
   66.92 -/*
   66.93 - * MP-BIOS irq configuration table structures:
   66.94 - */
   66.95 -
   66.96 -/* I/O APIC entries */
   66.97 -extern struct mpc_config_ioapic mp_ioapics[MAX_IO_APICS];
   66.98 -
   66.99 -/* # of MP IRQ source entries */
  66.100 -extern int mp_irq_entries;
  66.101 -
  66.102 -/* MP IRQ source entries */
  66.103 -extern struct mpc_config_intsrc *mp_irqs;
  66.104 -
  66.105 -/* non-0 if default (table-less) MP configuration */
  66.106 -extern int mpc_default_type;
  66.107 -
  66.108 -static inline unsigned int io_apic_read(unsigned int apic, unsigned int reg)
  66.109 -{
  66.110 -	*IO_APIC_BASE(apic) = reg;
  66.111 -	return *(IO_APIC_BASE(apic)+4);
  66.112 -}
  66.113 -
  66.114 -static inline void io_apic_write(unsigned int apic, unsigned int reg, unsigned int value)
  66.115 -{
  66.116 -	*IO_APIC_BASE(apic) = reg;
  66.117 -	*(IO_APIC_BASE(apic)+4) = value;
  66.118 -}
  66.119 -
  66.120 -/*
  66.121 - * Re-write a value: to be used for read-modify-write
  66.122 - * cycles where the read already set up the index register.
  66.123 - */
  66.124 -static inline void io_apic_modify(unsigned int apic, unsigned int value)
  66.125 -{
  66.126 -	*(IO_APIC_BASE(apic)+4) = value;
  66.127 -}
  66.128 -
  66.129 -/*
  66.130 - * Synchronize the IO-APIC and the CPU by doing
  66.131 - * a dummy read from the IO-APIC
  66.132 - */
  66.133 -static inline void io_apic_sync(unsigned int apic)
  66.134 -{
  66.135 -	(void) *(IO_APIC_BASE(apic)+4);
  66.136 -}
  66.137 -
  66.138 -/* 1 if "noapic" boot option passed */
  66.139 -extern int skip_ioapic_setup;
  66.140 -
  66.141 -/*
  66.142 - * If we use the IO-APIC for IRQ routing, disable automatic
  66.143 - * assignment of PCI IRQ's.
  66.144 - */
  66.145 -#define io_apic_assign_pci_irqs (mp_irq_entries && !skip_ioapic_setup)
  66.146 -
  66.147 -#else  /* !CONFIG_X86_IO_APIC */
  66.148 -#define io_apic_assign_pci_irqs 0
  66.149 -#endif
  66.150 -
  66.151 -#endif
    67.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctl.h	Fri Mar 14 15:48:09 2003 +0000
    67.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    67.3 @@ -1,75 +0,0 @@
    67.4 -/* $Id: ioctl.h,v 1.5 1993/07/19 21:53:50 root Exp root $
    67.5 - *
    67.6 - * linux/ioctl.h for Linux by H.H. Bergman.
    67.7 - */
    67.8 -
    67.9 -#ifndef _ASMI386_IOCTL_H
   67.10 -#define _ASMI386_IOCTL_H
   67.11 -
   67.12 -/* ioctl command encoding: 32 bits total, command in lower 16 bits,
   67.13 - * size of the parameter structure in the lower 14 bits of the
   67.14 - * upper 16 bits.
   67.15 - * Encoding the size of the parameter structure in the ioctl request
   67.16 - * is useful for catching programs compiled with old versions
   67.17 - * and to avoid overwriting user space outside the user buffer area.
   67.18 - * The highest 2 bits are reserved for indicating the ``access mode''.
   67.19 - * NOTE: This limits the max parameter size to 16kB -1 !
   67.20 - */
   67.21 -
   67.22 -/*
   67.23 - * The following is for compatibility across the various Linux
   67.24 - * platforms.  The i386 ioctl numbering scheme doesn't really enforce
   67.25 - * a type field.  De facto, however, the top 8 bits of the lower 16
   67.26 - * bits are indeed used as a type field, so we might just as well make
   67.27 - * this explicit here.  Please be sure to use the decoding macros
   67.28 - * below from now on.
   67.29 - */
   67.30 -#define _IOC_NRBITS	8
   67.31 -#define _IOC_TYPEBITS	8
   67.32 -#define _IOC_SIZEBITS	14
   67.33 -#define _IOC_DIRBITS	2
   67.34 -
   67.35 -#define _IOC_NRMASK	((1 << _IOC_NRBITS)-1)
   67.36 -#define _IOC_TYPEMASK	((1 << _IOC_TYPEBITS)-1)
   67.37 -#define _IOC_SIZEMASK	((1 << _IOC_SIZEBITS)-1)
   67.38 -#define _IOC_DIRMASK	((1 << _IOC_DIRBITS)-1)
   67.39 -
   67.40 -#define _IOC_NRSHIFT	0
   67.41 -#define _IOC_TYPESHIFT	(_IOC_NRSHIFT+_IOC_NRBITS)
   67.42 -#define _IOC_SIZESHIFT	(_IOC_TYPESHIFT+_IOC_TYPEBITS)
   67.43 -#define _IOC_DIRSHIFT	(_IOC_SIZESHIFT+_IOC_SIZEBITS)
   67.44 -
   67.45 -/*
   67.46 - * Direction bits.
   67.47 - */
   67.48 -#define _IOC_NONE	0U
   67.49 -#define _IOC_WRITE	1U
   67.50 -#define _IOC_READ	2U
   67.51 -
   67.52 -#define _IOC(dir,type,nr,size) \
   67.53 -	(((dir)  << _IOC_DIRSHIFT) | \
   67.54 -	 ((type) << _IOC_TYPESHIFT) | \
   67.55 -	 ((nr)   << _IOC_NRSHIFT) | \
   67.56 -	 ((size) << _IOC_SIZESHIFT))
   67.57 -
   67.58 -/* used to create numbers */
   67.59 -#define _IO(type,nr)		_IOC(_IOC_NONE,(type),(nr),0)
   67.60 -#define _IOR(type,nr,size)	_IOC(_IOC_READ,(type),(nr),sizeof(size))
   67.61 -#define _IOW(type,nr,size)	_IOC(_IOC_WRITE,(type),(nr),sizeof(size))
   67.62 -#define _IOWR(type,nr,size)	_IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
   67.63 -
   67.64 -/* used to decode ioctl numbers.. */
   67.65 -#define _IOC_DIR(nr)		(((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
   67.66 -#define _IOC_TYPE(nr)		(((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
   67.67 -#define _IOC_NR(nr)		(((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
   67.68 -#define _IOC_SIZE(nr)		(((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
   67.69 -
   67.70 -/* ...and for the drivers/sound files... */
   67.71 -
   67.72 -#define IOC_IN		(_IOC_WRITE << _IOC_DIRSHIFT)
   67.73 -#define IOC_OUT		(_IOC_READ << _IOC_DIRSHIFT)
   67.74 -#define IOC_INOUT	((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
   67.75 -#define IOCSIZE_MASK	(_IOC_SIZEMASK << _IOC_SIZESHIFT)
   67.76 -#define IOCSIZE_SHIFT	(_IOC_SIZESHIFT)
   67.77 -
   67.78 -#endif /* _ASMI386_IOCTL_H */
    68.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ioctls.h	Fri Mar 14 15:48:09 2003 +0000
    68.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    68.3 @@ -1,82 +0,0 @@
    68.4 -#ifndef __ARCH_I386_IOCTLS_H__
    68.5 -#define __ARCH_I386_IOCTLS_H__
    68.6 -
    68.7 -#include <asm/ioctl.h>
    68.8 -
    68.9 -/* 0x54 is just a magic number to make these relatively unique ('T') */
   68.10 -
   68.11 -#define TCGETS		0x5401
   68.12 -#define TCSETS		0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */
   68.13 -#define TCSETSW		0x5403
   68.14 -#define TCSETSF		0x5404
   68.15 -#define TCGETA		0x5405
   68.16 -#define TCSETA		0x5406
   68.17 -#define TCSETAW		0x5407
   68.18 -#define TCSETAF		0x5408
   68.19 -#define TCSBRK		0x5409
   68.20 -#define TCXONC		0x540A
   68.21 -#define TCFLSH		0x540B
   68.22 -#define TIOCEXCL	0x540C
   68.23 -#define TIOCNXCL	0x540D
   68.24 -#define TIOCSCTTY	0x540E
   68.25 -#define TIOCGPGRP	0x540F
   68.26 -#define TIOCSPGRP	0x5410
   68.27 -#define TIOCOUTQ	0x5411
   68.28 -#define TIOCSTI		0x5412
   68.29 -#define TIOCGWINSZ	0x5413
   68.30 -#define TIOCSWINSZ	0x5414
   68.31 -#define TIOCMGET	0x5415
   68.32 -#define TIOCMBIS	0x5416
   68.33 -#define TIOCMBIC	0x5417
   68.34 -#define TIOCMSET	0x5418
   68.35 -#define TIOCGSOFTCAR	0x5419
   68.36 -#define TIOCSSOFTCAR	0x541A
   68.37 -#define FIONREAD	0x541B
   68.38 -#define TIOCINQ		FIONREAD
   68.39 -#define TIOCLINUX	0x541C
   68.40 -#define TIOCCONS	0x541D
   68.41 -#define TIOCGSERIAL	0x541E
   68.42 -#define TIOCSSERIAL	0x541F
   68.43 -#define TIOCPKT		0x5420
   68.44 -#define FIONBIO		0x5421
   68.45 -#define TIOCNOTTY	0x5422
   68.46 -#define TIOCSETD	0x5423
   68.47 -#define TIOCGETD	0x5424
   68.48 -#define TCSBRKP		0x5425	/* Needed for POSIX tcsendbreak() */
   68.49 -#define TIOCTTYGSTRUCT	0x5426  /* For debugging only */
   68.50 -#define TIOCSBRK	0x5427  /* BSD compatibility */
   68.51 -#define TIOCCBRK	0x5428  /* BSD compatibility */
   68.52 -#define TIOCGSID	0x5429  /* Return the session ID of FD */
   68.53 -#define TIOCGPTN	_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
   68.54 -#define TIOCSPTLCK	_IOW('T',0x31, int)  /* Lock/unlock Pty */
   68.55 -
   68.56 -#define FIONCLEX	0x5450  /* these numbers need to be adjusted. */
   68.57 -#define FIOCLEX		0x5451
   68.58 -#define FIOASYNC	0x5452
   68.59 -#define TIOCSERCONFIG	0x5453
   68.60 -#define TIOCSERGWILD	0x5454
   68.61 -#define TIOCSERSWILD	0x5455
   68.62 -#define TIOCGLCKTRMIOS	0x5456
   68.63 -#define TIOCSLCKTRMIOS	0x5457
   68.64 -#define TIOCSERGSTRUCT	0x5458 /* For debugging only */
   68.65 -#define TIOCSERGETLSR   0x5459 /* Get line status register */
   68.66 -#define TIOCSERGETMULTI 0x545A /* Get multiport config  */
   68.67 -#define TIOCSERSETMULTI 0x545B /* Set multiport config */
   68.68 -
   68.69 -#define TIOCMIWAIT	0x545C	/* wait for a change on serial input line(s) */
   68.70 -#define TIOCGICOUNT	0x545D	/* read serial port inline interrupt counts */
   68.71 -#define TIOCGHAYESESP   0x545E  /* Get Hayes ESP configuration */
   68.72 -#define TIOCSHAYESESP   0x545F  /* Set Hayes ESP configuration */
   68.73 -
   68.74 -/* Used for packet mode */
   68.75 -#define TIOCPKT_DATA		 0
   68.76 -#define TIOCPKT_FLUSHREAD	 1
   68.77 -#define TIOCPKT_FLUSHWRITE	 2
   68.78 -#define TIOCPKT_STOP		 4
   68.79 -#define TIOCPKT_START		 8
   68.80 -#define TIOCPKT_NOSTOP		16
   68.81 -#define TIOCPKT_DOSTOP		32
   68.82 -
   68.83 -#define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
   68.84 -
   68.85 -#endif
    69.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipc.h	Fri Mar 14 15:48:09 2003 +0000
    69.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    69.3 @@ -1,31 +0,0 @@
    69.4 -#ifndef __i386_IPC_H__
    69.5 -#define __i386_IPC_H__
    69.6 -
    69.7 -/* 
    69.8 - * These are used to wrap system calls on x86.
    69.9 - *
   69.10 - * See arch/i386/kernel/sys_i386.c for ugly details..
   69.11 - */
   69.12 -struct ipc_kludge {
   69.13 -	struct msgbuf *msgp;
   69.14 -	long msgtyp;
   69.15 -};
   69.16 -
   69.17 -#define SEMOP		 1
   69.18 -#define SEMGET		 2
   69.19 -#define SEMCTL		 3
   69.20 -#define MSGSND		11
   69.21 -#define MSGRCV		12
   69.22 -#define MSGGET		13
   69.23 -#define MSGCTL		14
   69.24 -#define SHMAT		21
   69.25 -#define SHMDT		22
   69.26 -#define SHMGET		23
   69.27 -#define SHMCTL		24
   69.28 -
   69.29 -/* Used by the DIPC package, try and avoid reusing it */
   69.30 -#define DIPC            25
   69.31 -
   69.32 -#define IPCCALL(version,op)	((version)<<16 | (op))
   69.33 -
   69.34 -#endif
    70.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ipcbuf.h	Fri Mar 14 15:48:09 2003 +0000
    70.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    70.3 @@ -1,29 +0,0 @@
    70.4 -#ifndef __i386_IPCBUF_H__
    70.5 -#define __i386_IPCBUF_H__
    70.6 -
    70.7 -/*
    70.8 - * The ipc64_perm structure for i386 architecture.
    70.9 - * Note extra padding because this structure is passed back and forth
   70.10 - * between kernel and user space.
   70.11 - *
   70.12 - * Pad space is left for:
   70.13 - * - 32-bit mode_t and seq
   70.14 - * - 2 miscellaneous 32-bit values
   70.15 - */
   70.16 -
   70.17 -struct ipc64_perm
   70.18 -{
   70.19 -	__kernel_key_t		key;
   70.20 -	__kernel_uid32_t	uid;
   70.21 -	__kernel_gid32_t	gid;
   70.22 -	__kernel_uid32_t	cuid;
   70.23 -	__kernel_gid32_t	cgid;
   70.24 -	__kernel_mode_t		mode;
   70.25 -	unsigned short		__pad1;
   70.26 -	unsigned short		seq;
   70.27 -	unsigned short		__pad2;
   70.28 -	unsigned long		__unused1;
   70.29 -	unsigned long		__unused2;
   70.30 -};
   70.31 -
   70.32 -#endif /* __i386_IPCBUF_H__ */
    71.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/keyboard.h	Fri Mar 14 15:48:09 2003 +0000
    71.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    71.3 @@ -1,72 +0,0 @@
    71.4 -/*
    71.5 - *  linux/include/asm-i386/keyboard.h
    71.6 - *
    71.7 - *  Created 3 Nov 1996 by Geert Uytterhoeven
    71.8 - */
    71.9 -
   71.10 -/*
   71.11 - *  This file contains the i386 architecture specific keyboard definitions
   71.12 - */
   71.13 -
   71.14 -#ifndef _I386_KEYBOARD_H
   71.15 -#define _I386_KEYBOARD_H
   71.16 -
   71.17 -#ifdef __KERNEL__
   71.18 -
   71.19 -#include <linux/kernel.h>
   71.20 -#include <linux/ioport.h>
   71.21 -#include <linux/kd.h>
   71.22 -#include <linux/pm.h>
   71.23 -#include <asm/io.h>
   71.24 -
   71.25 -#define KEYBOARD_IRQ			1
   71.26 -#define DISABLE_KBD_DURING_INTERRUPTS	0
   71.27 -
   71.28 -extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode);
   71.29 -extern int pckbd_getkeycode(unsigned int scancode);
   71.30 -extern int pckbd_translate(unsigned char scancode, unsigned char *keycode,
   71.31 -			   char raw_mode);
   71.32 -extern char pckbd_unexpected_up(unsigned char keycode);
   71.33 -extern void pckbd_leds(unsigned char leds);
   71.34 -extern void pckbd_init_hw(void);
   71.35 -extern int pckbd_pm_resume(struct pm_dev *, pm_request_t, void *);
   71.36 -extern pm_callback pm_kbd_request_override;
   71.37 -extern unsigned char pckbd_sysrq_xlate[128];
   71.38 -
   71.39 -#define kbd_setkeycode		pckbd_setkeycode
   71.40 -#define kbd_getkeycode		pckbd_getkeycode
   71.41 -#define kbd_translate		pckbd_translate
   71.42 -#define kbd_unexpected_up	pckbd_unexpected_up
   71.43 -#define kbd_leds		pckbd_leds
   71.44 -#define kbd_init_hw		pckbd_init_hw
   71.45 -#define kbd_sysrq_xlate		pckbd_sysrq_xlate
   71.46 -
   71.47 -#define SYSRQ_KEY 0x54
   71.48 -
   71.49 -/* resource allocation */
   71.50 -#define kbd_request_region()
   71.51 -#define kbd_request_irq(handler) request_irq(KEYBOARD_IRQ, handler, 0, \
   71.52 -                                             "keyboard", NULL)
   71.53 -
   71.54 -/* How to access the keyboard macros on this platform.  */
   71.55 -#define kbd_read_input() inb(KBD_DATA_REG)
   71.56 -#define kbd_read_status() inb(KBD_STATUS_REG)
   71.57 -#define kbd_write_output(val) outb(val, KBD_DATA_REG)
   71.58 -#define kbd_write_command(val) outb(val, KBD_CNTL_REG)
   71.59 -
   71.60 -/* Some stoneage hardware needs delays after some operations.  */
   71.61 -#define kbd_pause() do { } while(0)
   71.62 -
   71.63 -/*
   71.64 - * Machine specific bits for the PS/2 driver
   71.65 - */
   71.66 -
   71.67 -#define AUX_IRQ 12
   71.68 -
   71.69 -#define aux_request_irq(hand, dev_id)					\
   71.70 -	request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id)
   71.71 -
   71.72 -#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)
   71.73 -
   71.74 -#endif /* __KERNEL__ */
   71.75 -#endif /* _I386_KEYBOARD_H */
    72.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/kmap_types.h	Fri Mar 14 15:48:09 2003 +0000
    72.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    72.3 @@ -1,14 +0,0 @@
    72.4 -#ifndef _ASM_KMAP_TYPES_H
    72.5 -#define _ASM_KMAP_TYPES_H
    72.6 -
    72.7 -enum km_type {
    72.8 -	KM_BOUNCE_READ,
    72.9 -	KM_SKB_SUNRPC_DATA,
   72.10 -	KM_SKB_DATA_SOFTIRQ,
   72.11 -	KM_USER0,
   72.12 -	KM_USER1,
   72.13 -	KM_BH_IRQ,
   72.14 -	KM_TYPE_NR
   72.15 -};
   72.16 -
   72.17 -#endif
    73.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/ldt.h	Fri Mar 14 15:48:09 2003 +0000
    73.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    73.3 @@ -1,32 +0,0 @@
    73.4 -/*
    73.5 - * ldt.h
    73.6 - *
    73.7 - * Definitions of structures used with the modify_ldt system call.
    73.8 - */
    73.9 -#ifndef _LINUX_LDT_H
   73.10 -#define _LINUX_LDT_H
   73.11 -
   73.12 -/* Maximum number of LDT entries supported. */
   73.13 -#define LDT_ENTRIES	8192
   73.14 -/* The size of each LDT entry. */
   73.15 -#define LDT_ENTRY_SIZE	8
   73.16 -
   73.17 -#ifndef __ASSEMBLY__
   73.18 -struct modify_ldt_ldt_s {
   73.19 -	unsigned int  entry_number;
   73.20 -	unsigned long base_addr;
   73.21 -	unsigned int  limit;
   73.22 -	unsigned int  seg_32bit:1;
   73.23 -	unsigned int  contents:2;
   73.24 -	unsigned int  read_exec_only:1;
   73.25 -	unsigned int  limit_in_pages:1;
   73.26 -	unsigned int  seg_not_present:1;
   73.27 -	unsigned int  useable:1;
   73.28 -};
   73.29 -
   73.30 -#define MODIFY_LDT_CONTENTS_DATA	0
   73.31 -#define MODIFY_LDT_CONTENTS_STACK	1
   73.32 -#define MODIFY_LDT_CONTENTS_CODE	2
   73.33 -
   73.34 -#endif /* !__ASSEMBLY__ */
   73.35 -#endif
    74.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/linux_logo.h	Fri Mar 14 15:48:09 2003 +0000
    74.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    74.3 @@ -1,27 +0,0 @@
    74.4 -/* $Id: linux_logo.h,v 1.8 1998/07/30 16:30:24 jj Exp $
    74.5 - * include/asm-i386/linux_logo.h: This is a linux logo
    74.6 - *                                to be displayed on boot.
    74.7 - *
    74.8 - * Copyright (C) 1996 Larry Ewing (lewing@isc.tamu.edu)
    74.9 - * Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
   74.10 - *
   74.11 - * You can put anything here, but:
   74.12 - * LINUX_LOGO_COLORS has to be less than 224
   74.13 - * image size has to be 80x80
   74.14 - * values have to start from 0x20
   74.15 - * (i.e. RGB(linux_logo_red[0],
   74.16 - *	     linux_logo_green[0],
   74.17 - *	     linux_logo_blue[0]) is color 0x20)
   74.18 - * BW image has to be 80x80 as well, with MS bit
   74.19 - * on the left
   74.20 - * Serial_console ascii image can be any size,
   74.21 - * but should contain %s to display the version
   74.22 - */
   74.23 - 
   74.24 -#include <linux/init.h>
   74.25 -#include <linux/version.h>
   74.26 -
   74.27 -#define linux_logo_banner "Linux/ia32 version " UTS_RELEASE
   74.28 -
   74.29 -#include <linux/linux_logo.h>
   74.30 -
    75.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/locks.h	Fri Mar 14 15:48:09 2003 +0000
    75.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    75.3 @@ -1,135 +0,0 @@
    75.4 -/*
    75.5 - *	SMP locks primitives for building ix86 locks
    75.6 - *	(not yet used).
    75.7 - *
    75.8 - *		Alan Cox, alan@redhat.com, 1995
    75.9 - */
   75.10 - 
   75.11 -/*
   75.12 - *	This would be much easier but far less clear and easy
   75.13 - *	to borrow for other processors if it was just assembler.
   75.14 - */
   75.15 -
   75.16 -static __inline__ void prim_spin_lock(struct spinlock *sp)
   75.17 -{
   75.18 -	int processor=smp_processor_id();
   75.19 -	
   75.20 -	/*
   75.21 -	 *	Grab the lock bit
   75.22 -	 */
   75.23 -	 
   75.24 -	while(lock_set_bit(0,&sp->lock))
   75.25 -	{
   75.26 -		/*
   75.27 -		 *	Failed, but that's cos we own it!
   75.28 -		 */
   75.29 -		 
   75.30 -		if(sp->cpu==processor)
   75.31 -		{
   75.32 -			sp->users++;
   75.33 -			return 0;
   75.34 -		}
   75.35 -		/*
   75.36 -		 *	Spin in the cache S state if possible
   75.37 -		 */
   75.38 -		while(sp->lock)
   75.39 -		{
   75.40 -			/*
   75.41 -			 *	Wait for any invalidates to go off
   75.42 -			 */
   75.43 -			 
   75.44 -			if(smp_invalidate_needed&(1<<processor))
   75.45 -				while(lock_clear_bit(processor,&smp_invalidate_needed))
   75.46 -					local_flush_tlb();
   75.47 -			sp->spins++;
   75.48 -		}
   75.49 -		/*
   75.50 -		 *	Someone wrote the line, we go 'I' and get
   75.51 -		 *	the cache entry. Now try to regrab
   75.52 -		 */
   75.53 -	}
   75.54 -	sp->users++;sp->cpu=processor;
   75.55 -	return 1;
   75.56 -}
   75.57 -
   75.58 -/*
   75.59 - *	Release a spin lock
   75.60 - */
   75.61 - 
   75.62 -static __inline__ int prim_spin_unlock(struct spinlock *sp)
   75.63 -{
   75.64 -	/* This is safe. The decrement is still guarded by the lock. A multilock would
   75.65 -	   not be safe this way */
   75.66 -	if(!--sp->users)
   75.67 -	{
   75.68 -		sp->cpu= NO_PROC_ID;lock_clear_bit(0,&sp->lock);
   75.69 -		return 1;
   75.70 -	}
   75.71 -	return 0;
   75.72 -}
   75.73 -
   75.74 -
   75.75 -/*
   75.76 - *	Non blocking lock grab
   75.77 - */
   75.78 - 
   75.79 -static __inline__ int prim_spin_lock_nb(struct spinlock *sp)
   75.80 -{
   75.81 -	if(lock_set_bit(0,&sp->lock))
   75.82 -		return 0;		/* Locked already */
   75.83 -	sp->users++;
   75.84 -	return 1;			/* We got the lock */
   75.85 -}
   75.86 -
   75.87 -
   75.88 -/*
   75.89 - *	These wrap the locking primitives up for usage
   75.90 - */
   75.91 - 
   75.92 -static __inline__ void spinlock(struct spinlock *sp)
   75.93 -{
   75.94 -	if(sp->priority<current->lock_order)
   75.95 -		panic("lock order violation: %s (%d)\n", sp->name, current->lock_order);
   75.96 -	if(prim_spin_lock(sp))
   75.97 -	{
   75.98 -		/*
   75.99 -		 *	We got a new lock. Update the priority chain
  75.100 -		 */
  75.101 -		sp->oldpri=current->lock_order;
  75.102 -		current->lock_order=sp->priority;
  75.103 -	}
  75.104 -}
  75.105 -
  75.106 -static __inline__ void spinunlock(struct spinlock *sp)
  75.107 -{
  75.108 -	int pri;
  75.109 -	if(current->lock_order!=sp->priority)
  75.110 -		panic("lock release order violation %s (%d)\n", sp->name, current->lock_order);
  75.111 -	pri=sp->oldpri;
  75.112 -	if(prim_spin_unlock(sp))
  75.113 -	{
  75.114 -		/*
  75.115 -		 *	Update the debugging lock priority chain. We dumped
  75.116 -		 *	our last right to the lock.
  75.117 -		 */
  75.118 -		current->lock_order=sp->pri;
  75.119 -	}	
  75.120 -}
  75.121 -
  75.122 -static __inline__ void spintestlock(struct spinlock *sp)
  75.123 -{
  75.124 -	/*
  75.125 -	 *	We do no sanity checks, it's legal to optimistically
  75.126 -	 *	get a lower lock.
  75.127 -	 */
  75.128 -	prim_spin_lock_nb(sp);
  75.129 -}
  75.130 -
  75.131 -static __inline__ void spintestunlock(struct spinlock *sp)
  75.132 -{
  75.133 -	/*
  75.134 -	 *	A testlock doesn't update the lock chain so we
  75.135 -	 *	must not update it on free
  75.136 -	 */
  75.137 -	prim_spin_unlock(sp);
  75.138 -}
    76.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/math_emu.h	Fri Mar 14 15:48:09 2003 +0000
    76.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    76.3 @@ -1,35 +0,0 @@
    76.4 -#ifndef _I386_MATH_EMU_H
    76.5 -#define _I386_MATH_EMU_H
    76.6 -
    76.7 -#include <asm/sigcontext.h>
    76.8 -
    76.9 -int restore_i387_soft(void *s387, struct _fpstate *buf);
   76.10 -int save_i387_soft(void *s387, struct _fpstate * buf);
   76.11 -
   76.12 -/* This structure matches the layout of the data saved to the stack
   76.13 -   following a device-not-present interrupt, part of it saved
   76.14 -   automatically by the 80386/80486.
   76.15 -   */
   76.16 -struct info {
   76.17 -	long ___orig_eip;
   76.18 -	long ___ebx;
   76.19 -	long ___ecx;
   76.20 -	long ___edx;
   76.21 -	long ___esi;
   76.22 -	long ___edi;
   76.23 -	long ___ebp;
   76.24 -	long ___eax;
   76.25 -	long ___ds;
   76.26 -	long ___es;
   76.27 -	long ___orig_eax;
   76.28 -	long ___eip;
   76.29 -	long ___cs;
   76.30 -	long ___eflags;
   76.31 -	long ___esp;
   76.32 -	long ___ss;
   76.33 -	long ___vm86_es; /* This and the following only in vm86 mode */
   76.34 -	long ___vm86_ds;
   76.35 -	long ___vm86_fs;
   76.36 -	long ___vm86_gs;
   76.37 -};
   76.38 -#endif
    77.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mc146818rtc.h	Fri Mar 14 15:48:09 2003 +0000
    77.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    77.3 @@ -1,29 +0,0 @@
    77.4 -/*
    77.5 - * Machine dependent access functions for RTC registers.
    77.6 - */
    77.7 -#ifndef _ASM_MC146818RTC_H
    77.8 -#define _ASM_MC146818RTC_H
    77.9 -
   77.10 -#include <asm/io.h>
   77.11 -
   77.12 -#ifndef RTC_PORT
   77.13 -#define RTC_PORT(x)	(0x70 + (x))
   77.14 -#define RTC_ALWAYS_BCD	1	/* RTC operates in binary mode */
   77.15 -#endif
   77.16 -
   77.17 -/*
   77.18 - * The yet supported machines all access the RTC index register via
   77.19 - * an ISA port access but the way to access the date register differs ...
   77.20 - */
   77.21 -#define CMOS_READ(addr) ({ \
   77.22 -outb_p((addr),RTC_PORT(0)); \
   77.23 -inb_p(RTC_PORT(1)); \
   77.24 -})
   77.25 -#define CMOS_WRITE(val, addr) ({ \
   77.26 -outb_p((addr),RTC_PORT(0)); \
   77.27 -outb_p((val),RTC_PORT(1)); \
   77.28 -})
   77.29 -
   77.30 -#define RTC_IRQ 8
   77.31 -
   77.32 -#endif /* _ASM_MC146818RTC_H */
    78.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mca_dma.h	Fri Mar 14 15:48:09 2003 +0000
    78.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    78.3 @@ -1,202 +0,0 @@
    78.4 -#ifndef MCA_DMA_H
    78.5 -#define MCA_DMA_H
    78.6 -
    78.7 -#include <asm/io.h>
    78.8 -#include <linux/ioport.h>
    78.9 -
   78.10 -/*
   78.11 - * Microchannel specific DMA stuff.  DMA on an MCA machine is fairly similar to
   78.12 - *   standard PC dma, but it certainly has its quirks.  DMA register addresses
   78.13 - *   are in a different place and there are some added functions.  Most of this
   78.14 - *   should be pretty obvious on inspection.  Note that the user must divide
   78.15 - *   count by 2 when using 16-bit dma; that is not handled by these functions.
   78.16 - *
   78.17 - * Ramen Noodles are yummy.
   78.18 - * 
   78.19 - *  1998 Tymm Twillman <tymm@computer.org>  
   78.20 - */
   78.21 -
   78.22 -/*
   78.23 - * Registers that are used by the DMA controller; FN is the function register 
   78.24 - *   (tell the controller what to do) and EXE is the execution register (how
   78.25 - *   to do it)
   78.26 - */
   78.27 -
   78.28 -#define MCA_DMA_REG_FN  0x18
   78.29 -#define MCA_DMA_REG_EXE 0x1A 
   78.30 -
   78.31 -/*
   78.32 - * Functions that the DMA controller can do
   78.33 - */
   78.34 -
   78.35 -#define MCA_DMA_FN_SET_IO       0x00
   78.36 -#define MCA_DMA_FN_SET_ADDR     0x20
   78.37 -#define MCA_DMA_FN_GET_ADDR     0x30
   78.38 -#define MCA_DMA_FN_SET_COUNT    0x40
   78.39 -#define MCA_DMA_FN_GET_COUNT    0x50
   78.40 -#define MCA_DMA_FN_GET_STATUS   0x60
   78.41 -#define MCA_DMA_FN_SET_MODE     0x70
   78.42 -#define MCA_DMA_FN_SET_ARBUS    0x80
   78.43 -#define MCA_DMA_FN_MASK         0x90
   78.44 -#define MCA_DMA_FN_RESET_MASK   0xA0
   78.45 -#define MCA_DMA_FN_MASTER_CLEAR 0xD0
   78.46 -
   78.47 -/*
   78.48 - * Modes (used by setting MCA_DMA_FN_MODE in the function register)
   78.49 - * 
   78.50 - * Note that the MODE_READ is read from memory (write to device), and
   78.51 - *   MODE_WRITE is vice-versa.  
   78.52 - */
   78.53 -
   78.54 -#define MCA_DMA_MODE_XFER  0x04  /* read by default */
   78.55 -#define MCA_DMA_MODE_READ  0x04  /* same as XFER */
   78.56 -#define MCA_DMA_MODE_WRITE 0x08  /* OR with MODE_XFER to use */
   78.57 -#define MCA_DMA_MODE_IO    0x01  /* DMA from IO register */
   78.58 -#define MCA_DMA_MODE_16    0x40  /* 16 bit xfers */
   78.59 -
   78.60 -
   78.61 -/**
   78.62 - *	mca_enable_dma	-	channel to enable DMA on
   78.63 - *	@dmanr: DMA channel
   78.64 - *
   78.65 - *	Enable the MCA bus DMA on a channel. This can be called from
   78.66 - *	IRQ context.
   78.67 - */
   78.68 -
   78.69 -static __inline__ void mca_enable_dma(unsigned int dmanr)
   78.70 -{
   78.71 -	outb(MCA_DMA_FN_RESET_MASK | dmanr, MCA_DMA_REG_FN);
   78.72 -}
   78.73 -
   78.74 -/**
   78.75 - *	mca_disble_dma	-	channel to disable DMA on
   78.76 - *	@dmanr: DMA channel
   78.77 - *
   78.78 - *	Enable the MCA bus DMA on a channel. This can be called from
   78.79 - *	IRQ context.
   78.80 - */
   78.81 -
   78.82 -static __inline__ void mca_disable_dma(unsigned int dmanr)
   78.83 -{
   78.84 -	outb(MCA_DMA_FN_MASK | dmanr, MCA_DMA_REG_FN);
   78.85 -}
   78.86 -
   78.87 -/**
   78.88 - *	mca_set_dma_addr -	load a 24bit DMA address
   78.89 - *	@dmanr: DMA channel
   78.90 - *	@a: 24bit bus address
   78.91 - *
   78.92 - *	Load the address register in the DMA controller. This has a 24bit
   78.93 - *	limitation (16Mb). 
   78.94 - */
   78.95 -
   78.96 -static __inline__ void mca_set_dma_addr(unsigned int dmanr, unsigned int a)
   78.97 -{
   78.98 -	outb(MCA_DMA_FN_SET_ADDR | dmanr, MCA_DMA_REG_FN);
   78.99 -	outb(a & 0xff, MCA_DMA_REG_EXE);
  78.100 -	outb((a >> 8) & 0xff, MCA_DMA_REG_EXE);
  78.101 -	outb((a >> 16) & 0xff, MCA_DMA_REG_EXE);
  78.102 -}
  78.103 -
  78.104 -/**
  78.105 - *	mca_get_dma_addr -	load a 24bit DMA address
  78.106 - *	@dmanr: DMA channel
  78.107 - *
  78.108 - *	Read the address register in the DMA controller. This has a 24bit
  78.109 - *	limitation (16Mb). The return is a bus address.
  78.110 - */
  78.111 -
  78.112 -static __inline__ unsigned int mca_get_dma_addr(unsigned int dmanr)
  78.113 -{
  78.114 -	unsigned int addr;
  78.115 -
  78.116 -	outb(MCA_DMA_FN_GET_ADDR | dmanr, MCA_DMA_REG_FN);
  78.117 -	addr = inb(MCA_DMA_REG_EXE);
  78.118 -	addr |= inb(MCA_DMA_REG_EXE) << 8;
  78.119 -	addr |= inb(MCA_DMA_REG_EXE) << 16;  
  78.120 -
  78.121 -	return addr;
  78.122 -}
  78.123 -
  78.124 -/**
  78.125 - *	mca_set_dma_count -	load a 16bit transfer count
  78.126 - *	@dmanr: DMA channel
  78.127 - *	@count: count
  78.128 - *
  78.129 - *	Set the DMA count for this channel. This can be up to 64Kbytes.
  78.130 - *	Setting a count of zero will not do what you expect.
  78.131 - */
  78.132 -
  78.133 -static __inline__ void mca_set_dma_count(unsigned int dmanr, unsigned int count)
  78.134 -{
  78.135 -	count--;  /* transfers one more than count -- correct for this */
  78.136 -
  78.137 -	outb(MCA_DMA_FN_SET_COUNT | dmanr, MCA_DMA_REG_FN);
  78.138 -	outb(count & 0xff, MCA_DMA_REG_EXE);
  78.139 -	outb((count >> 8) & 0xff, MCA_DMA_REG_EXE);
  78.140 -}
  78.141 -
  78.142 -/**
  78.143 - *	mca_get_dma_residue -	get the remaining bytes to transfer
  78.144 - *	@dmanr: DMA channel
  78.145 - *
  78.146 - *	This function returns the number of bytes left to transfer
  78.147 - *	on this DMA channel.
  78.148 - */
  78.149 -
  78.150 -static __inline__ unsigned int mca_get_dma_residue(unsigned int dmanr)
  78.151 -{
  78.152 -	unsigned short count;
  78.153 -
  78.154 -	outb(MCA_DMA_FN_GET_COUNT | dmanr, MCA_DMA_REG_FN);
  78.155 -	count = 1 + inb(MCA_DMA_REG_EXE);
  78.156 -	count += inb(MCA_DMA_REG_EXE) << 8;
  78.157 -
  78.158 -	return count;
  78.159 -}
  78.160 -
  78.161 -/**
  78.162 - *	mca_set_dma_io -	set the port for an I/O transfer
  78.163 - *	@dmanr: DMA channel
  78.164 - *	@io_addr: an I/O port number
  78.165 - *
  78.166 - *	Unlike the ISA bus DMA controllers the DMA on MCA bus can transfer
  78.167 - *	with an I/O port target.
  78.168 - */
  78.169 -
  78.170 -static __inline__ void mca_set_dma_io(unsigned int dmanr, unsigned int io_addr)
  78.171 -{
  78.172 -	/*
  78.173 -	 * DMA from a port address -- set the io address
  78.174 -	 */
  78.175 -	
  78.176 -	outb(MCA_DMA_FN_SET_IO | dmanr, MCA_DMA_REG_FN);
  78.177 -	outb(io_addr & 0xff, MCA_DMA_REG_EXE);
  78.178 -	outb((io_addr >>  8) & 0xff, MCA_DMA_REG_EXE);
  78.179 -}
  78.180 -
  78.181 -/**
  78.182 - *	mca_set_dma_mode -	set the DMA mode
  78.183 - *	@dmanr: DMA channel
  78.184 - *	@mode: mode to set
  78.185 - *
  78.186 - *	The DMA controller supports several modes. The mode values you can
  78.187 - *	set are :
  78.188 - *
  78.189 - *	%MCA_DMA_MODE_READ when reading from the DMA device.
  78.190 - *
  78.191 - *	%MCA_DMA_MODE_WRITE to writing to the DMA device.
  78.192 - *
  78.193 - *	%MCA_DMA_MODE_IO to do DMA to or from an I/O port.
  78.194 - *
  78.195 - *	%MCA_DMA_MODE_16 to do 16bit transfers.
  78.196 - *
  78.197 - */
  78.198 -
  78.199 -static __inline__ void mca_set_dma_mode(unsigned int dmanr, unsigned int mode)
  78.200 -{
  78.201 -	outb(MCA_DMA_FN_SET_MODE | dmanr, MCA_DMA_REG_FN);
  78.202 -	outb(mode, MCA_DMA_REG_EXE);
  78.203 -}
  78.204 -
  78.205 -#endif /* MCA_DMA_H */
    79.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mman.h	Fri Mar 14 15:48:09 2003 +0000
    79.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    79.3 @@ -1,38 +0,0 @@
    79.4 -#ifndef __I386_MMAN_H__
    79.5 -#define __I386_MMAN_H__
    79.6 -
    79.7 -#define PROT_READ	0x1		/* page can be read */
    79.8 -#define PROT_WRITE	0x2		/* page can be written */
    79.9 -#define PROT_EXEC	0x4		/* page can be executed */
   79.10 -#define PROT_NONE	0x0		/* page can not be accessed */
   79.11 -
   79.12 -#define MAP_SHARED	0x01		/* Share changes */
   79.13 -#define MAP_PRIVATE	0x02		/* Changes are private */
   79.14 -#define MAP_TYPE	0x0f		/* Mask for type of mapping */
   79.15 -#define MAP_FIXED	0x10		/* Interpret addr exactly */
   79.16 -#define MAP_ANONYMOUS	0x20		/* don't use a file */
   79.17 -
   79.18 -#define MAP_GROWSDOWN	0x0100		/* stack-like segment */
   79.19 -#define MAP_DENYWRITE	0x0800		/* ETXTBSY */
   79.20 -#define MAP_EXECUTABLE	0x1000		/* mark it as an executable */
   79.21 -#define MAP_LOCKED	0x2000		/* pages are locked */
   79.22 -#define MAP_NORESERVE	0x4000		/* don't check for reservations */
   79.23 -
   79.24 -#define MS_ASYNC	1		/* sync memory asynchronously */
   79.25 -#define MS_INVALIDATE	2		/* invalidate the caches */
   79.26 -#define MS_SYNC		4		/* synchronous memory sync */
   79.27 -
   79.28 -#define MCL_CURRENT	1		/* lock all current mappings */
   79.29 -#define MCL_FUTURE	2		/* lock all future mappings */
   79.30 -
   79.31 -#define MADV_NORMAL	0x0		/* default page-in behavior */
   79.32 -#define MADV_RANDOM	0x1		/* page-in minimum required */
   79.33 -#define MADV_SEQUENTIAL	0x2		/* read-ahead aggressively */
   79.34 -#define MADV_WILLNEED	0x3		/* pre-fault pages */
   79.35 -#define MADV_DONTNEED	0x4		/* discard these pages */
   79.36 -
   79.37 -/* compatibility flags */
   79.38 -#define MAP_ANON	MAP_ANONYMOUS
   79.39 -#define MAP_FILE	0
   79.40 -
   79.41 -#endif /* __I386_MMAN_H__ */
    80.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mmx.h	Fri Mar 14 15:48:09 2003 +0000
    80.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    80.3 @@ -1,14 +0,0 @@
    80.4 -#ifndef _ASM_MMX_H
    80.5 -#define _ASM_MMX_H
    80.6 -
    80.7 -/*
    80.8 - *	MMX 3Dnow! helper operations
    80.9 - */
   80.10 -
   80.11 -#include <linux/types.h>
   80.12 - 
   80.13 -extern void *_mmx_memcpy(void *to, const void *from, size_t size);
   80.14 -extern void mmx_clear_page(void *page);
   80.15 -extern void mmx_copy_page(void *to, void *from);
   80.16 -
   80.17 -#endif
    81.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/module.h	Fri Mar 14 15:48:09 2003 +0000
    81.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    81.3 @@ -1,12 +0,0 @@
    81.4 -#ifndef _ASM_I386_MODULE_H
    81.5 -#define _ASM_I386_MODULE_H
    81.6 -/*
    81.7 - * This file contains the i386 architecture specific module code.
    81.8 - */
    81.9 -
   81.10 -#define module_map(x)		vmalloc(x)
   81.11 -#define module_unmap(x)		vfree(x)
   81.12 -#define module_arch_init(x)	(0)
   81.13 -#define arch_init_modules(x)	do { } while (0)
   81.14 -
   81.15 -#endif /* _ASM_I386_MODULE_H */
    82.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mpspec.h	Fri Mar 14 15:48:09 2003 +0000
    82.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    82.3 @@ -1,223 +0,0 @@
    82.4 -#ifndef __ASM_MPSPEC_H
    82.5 -#define __ASM_MPSPEC_H
    82.6 -
    82.7 -/*
    82.8 - * Structure definitions for SMP machines following the
    82.9 - * Intel Multiprocessing Specification 1.1 and 1.4.
   82.10 - */
   82.11 -
   82.12 -/*
   82.13 - * This tag identifies where the SMP configuration
   82.14 - * information is. 
   82.15 - */
   82.16 - 
   82.17 -#define SMP_MAGIC_IDENT	(('_'<<24)|('P'<<16)|('M'<<8)|'_')
   82.18 -
   82.19 -/*
   82.20 - * a maximum of 16 APICs with the current APIC ID architecture.
   82.21 - * xAPICs can have up to 256.  SAPICs have 16 ID bits.
   82.22 - */
   82.23 -#ifdef CONFIG_X86_CLUSTERED_APIC
   82.24 -#define MAX_APICS 256
   82.25 -#else
   82.26 -#define MAX_APICS 16
   82.27 -#endif
   82.28 -
   82.29 -#define MAX_MPC_ENTRY 1024
   82.30 -
   82.31 -struct intel_mp_floating
   82.32 -{
   82.33 -	char mpf_signature[4];		/* "_MP_" 			*/
   82.34 -	unsigned long mpf_physptr;	/* Configuration table address	*/
   82.35 -	unsigned char mpf_length;	/* Our length (paragraphs)	*/
   82.36 -	unsigned char mpf_specification;/* Specification version	*/
   82.37 -	unsigned char mpf_checksum;	/* Checksum (makes sum 0)	*/
   82.38 -	unsigned char mpf_feature1;	/* Standard or configuration ? 	*/
   82.39 -	unsigned char mpf_feature2;	/* Bit7 set for IMCR|PIC	*/
   82.40 -	unsigned char mpf_feature3;	/* Unused (0)			*/
   82.41 -	unsigned char mpf_feature4;	/* Unused (0)			*/
   82.42 -	unsigned char mpf_feature5;	/* Unused (0)			*/
   82.43 -};
   82.44 -
   82.45 -struct mp_config_table
   82.46 -{
   82.47 -	char mpc_signature[4];
   82.48 -#define MPC_SIGNATURE "PCMP"
   82.49 -	unsigned short mpc_length;	/* Size of table */
   82.50 -	char  mpc_spec;			/* 0x01 */
   82.51 -	char  mpc_checksum;
   82.52 -	char  mpc_oem[8];
   82.53 -	char  mpc_productid[12];
   82.54 -	unsigned long mpc_oemptr;	/* 0 if not present */
   82.55 -	unsigned short mpc_oemsize;	/* 0 if not present */
   82.56 -	unsigned short mpc_oemcount;
   82.57 -	unsigned long mpc_lapic;	/* APIC address */
   82.58 -	unsigned long reserved;
   82.59 -};
   82.60 -
   82.61 -/* Followed by entries */
   82.62 -
   82.63 -#define	MP_PROCESSOR	0
   82.64 -#define	MP_BUS		1
   82.65 -#define	MP_IOAPIC	2
   82.66 -#define	MP_INTSRC	3
   82.67 -#define	MP_LINTSRC	4
   82.68 -#define	MP_TRANSLATION  192  /* Used by IBM NUMA-Q to describe node locality */
   82.69 -
   82.70 -struct mpc_config_processor
   82.71 -{
   82.72 -	unsigned char mpc_type;
   82.73 -	unsigned char mpc_apicid;	/* Local APIC number */
   82.74 -	unsigned char mpc_apicver;	/* Its versions */
   82.75 -	unsigned char mpc_cpuflag;
   82.76 -#define CPU_ENABLED		1	/* Processor is available */
   82.77 -#define CPU_BOOTPROCESSOR	2	/* Processor is the BP */
   82.78 -	unsigned long mpc_cpufeature;		
   82.79 -#define CPU_STEPPING_MASK 0x0F
   82.80 -#define CPU_MODEL_MASK	0xF0
   82.81 -#define CPU_FAMILY_MASK	0xF00
   82.82 -	unsigned long mpc_featureflag;	/* CPUID feature value */
   82.83 -	unsigned long mpc_reserved[2];
   82.84 -};
   82.85 -
   82.86 -struct mpc_config_bus
   82.87 -{
   82.88 -	unsigned char mpc_type;
   82.89 -	unsigned char mpc_busid;
   82.90 -	unsigned char mpc_bustype[6] __attribute((packed));
   82.91 -};
   82.92 -
   82.93 -/* List of Bus Type string values, Intel MP Spec. */
   82.94 -#define BUSTYPE_EISA	"EISA"
   82.95 -#define BUSTYPE_ISA	"ISA"
   82.96 -#define BUSTYPE_INTERN	"INTERN"	/* Internal BUS */
   82.97 -#define BUSTYPE_MCA	"MCA"
   82.98 -#define BUSTYPE_VL	"VL"		/* Local bus */
   82.99 -#define BUSTYPE_PCI	"PCI"
  82.100 -#define BUSTYPE_PCMCIA	"PCMCIA"
  82.101 -#define BUSTYPE_CBUS	"CBUS"
  82.102 -#define BUSTYPE_CBUSII	"CBUSII"
  82.103 -#define BUSTYPE_FUTURE	"FUTURE"
  82.104 -#define BUSTYPE_MBI	"MBI"
  82.105 -#define BUSTYPE_MBII	"MBII"
  82.106 -#define BUSTYPE_MPI	"MPI"
  82.107 -#define BUSTYPE_MPSA	"MPSA"
  82.108 -#define BUSTYPE_NUBUS	"NUBUS"
  82.109 -#define BUSTYPE_TC	"TC"
  82.110 -#define BUSTYPE_VME	"VME"
  82.111 -#define BUSTYPE_XPRESS	"XPRESS"
  82.112 -
  82.113 -struct mpc_config_ioapic
  82.114 -{
  82.115 -	unsigned char mpc_type;
  82.116 -	unsigned char mpc_apicid;
  82.117 -	unsigned char mpc_apicver;
  82.118 -	unsigned char mpc_flags;
  82.119 -#define MPC_APIC_USABLE		0x01
  82.120 -	unsigned long mpc_apicaddr;
  82.121 -};
  82.122 -
  82.123 -struct mpc_config_intsrc
  82.124 -{
  82.125 -	unsigned char mpc_type;
  82.126 -	unsigned char mpc_irqtype;
  82.127 -	unsigned short mpc_irqflag;
  82.128 -	unsigned char mpc_srcbus;
  82.129 -	unsigned char mpc_srcbusirq;
  82.130 -	unsigned char mpc_dstapic;
  82.131 -	unsigned char mpc_dstirq;
  82.132 -};
  82.133 -
  82.134 -enum mp_irq_source_types {
  82.135 -	mp_INT = 0,
  82.136 -	mp_NMI = 1,
  82.137 -	mp_SMI = 2,
  82.138 -	mp_ExtINT = 3
  82.139 -};
  82.140 -
  82.141 -#define MP_IRQDIR_DEFAULT	0
  82.142 -#define MP_IRQDIR_HIGH		1
  82.143 -#define MP_IRQDIR_LOW		3
  82.144 -
  82.145 -
  82.146 -struct mpc_config_lintsrc
  82.147 -{
  82.148 -	unsigned char mpc_type;
  82.149 -	unsigned char mpc_irqtype;
  82.150 -	unsigned short mpc_irqflag;
  82.151 -	unsigned char mpc_srcbusid;
  82.152 -	unsigned char mpc_srcbusirq;
  82.153 -	unsigned char mpc_destapic;	
  82.154 -#define MP_APIC_ALL	0xFF
  82.155 -	unsigned char mpc_destapiclint;
  82.156 -};
  82.157 -
  82.158 -struct mp_config_oemtable
  82.159 -{
  82.160 -	char oem_signature[4];
  82.161 -#define MPC_OEM_SIGNATURE "_OEM"
  82.162 -	unsigned short oem_length;	/* Size of table */
  82.163 -	char  oem_rev;			/* 0x01 */
  82.164 -	char  oem_checksum;
  82.165 -	char  mpc_oem[8];
  82.166 -};
  82.167 -
  82.168 -struct mpc_config_translation
  82.169 -{
  82.170 -        unsigned char mpc_type;
  82.171 -        unsigned char trans_len;
  82.172 -        unsigned char trans_type;
  82.173 -        unsigned char trans_quad;
  82.174 -        unsigned char trans_global;
  82.175 -        unsigned char trans_local;
  82.176 -        unsigned short trans_reserved;
  82.177 -};
  82.178 -
  82.179 -/*
  82.180 - *	Default configurations
  82.181 - *
  82.182 - *	1	2 CPU ISA 82489DX
  82.183 - *	2	2 CPU EISA 82489DX neither IRQ 0 timer nor IRQ 13 DMA chaining
  82.184 - *	3	2 CPU EISA 82489DX
  82.185 - *	4	2 CPU MCA 82489DX
  82.186 - *	5	2 CPU ISA+PCI
  82.187 - *	6	2 CPU EISA+PCI
  82.188 - *	7	2 CPU MCA+PCI
  82.189 - */
  82.190 -
  82.191 -#ifdef CONFIG_MULTIQUAD
  82.192 -#define MAX_IRQ_SOURCES 512
  82.193 -#else /* !CONFIG_MULTIQUAD */
  82.194 -#define MAX_IRQ_SOURCES 256
  82.195 -#endif /* CONFIG_MULTIQUAD */
  82.196 -
  82.197 -#define MAX_MP_BUSSES 32
  82.198 -enum mp_bustype {
  82.199 -	MP_BUS_ISA = 1,
  82.200 -	MP_BUS_EISA,
  82.201 -	MP_BUS_PCI,
  82.202 -	MP_BUS_MCA
  82.203 -};
  82.204 -extern int *mp_bus_id_to_type;
  82.205 -extern int *mp_bus_id_to_node;
  82.206 -extern int *mp_bus_id_to_local;
  82.207 -extern int *mp_bus_id_to_pci_bus;
  82.208 -extern int quad_local_to_mp_bus_id [NR_CPUS/4][4];
  82.209 -
  82.210 -extern unsigned int boot_cpu_physical_apicid;
  82.211 -extern unsigned long phys_cpu_present_map;
  82.212 -extern int smp_found_config;
  82.213 -extern void find_smp_config (void);
  82.214 -extern void get_smp_config (void);
  82.215 -extern int nr_ioapics;
  82.216 -extern int apic_version [MAX_APICS];
  82.217 -extern int mp_irq_entries;
  82.218 -extern struct mpc_config_intsrc *mp_irqs;
  82.219 -extern int mpc_default_type;
  82.220 -extern int mp_current_pci_id;
  82.221 -extern unsigned long mp_lapic_addr;
  82.222 -extern int pic_mode;
  82.223 -extern int using_apic_timer;
  82.224 -
  82.225 -#endif
  82.226 -
    83.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msgbuf.h	Fri Mar 14 15:48:09 2003 +0000
    83.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    83.3 @@ -1,31 +0,0 @@
    83.4 -#ifndef _I386_MSGBUF_H
    83.5 -#define _I386_MSGBUF_H
    83.6 -
    83.7 -/* 
    83.8 - * The msqid64_ds structure for i386 architecture.
    83.9 - * Note extra padding because this structure is passed back and forth
   83.10 - * between kernel and user space.
   83.11 - *
   83.12 - * Pad space is left for:
   83.13 - * - 64-bit time_t to solve y2038 problem
   83.14 - * - 2 miscellaneous 32-bit values
   83.15 - */
   83.16 -
   83.17 -struct msqid64_ds {
   83.18 -	struct ipc64_perm msg_perm;
   83.19 -	__kernel_time_t msg_stime;	/* last msgsnd time */
   83.20 -	unsigned long	__unused1;
   83.21 -	__kernel_time_t msg_rtime;	/* last msgrcv time */
   83.22 -	unsigned long	__unused2;
   83.23 -	__kernel_time_t msg_ctime;	/* last change time */
   83.24 -	unsigned long	__unused3;
   83.25 -	unsigned long  msg_cbytes;	/* current number of bytes on queue */
   83.26 -	unsigned long  msg_qnum;	/* number of messages in queue */
   83.27 -	unsigned long  msg_qbytes;	/* max number of bytes on queue */
   83.28 -	__kernel_pid_t msg_lspid;	/* pid of last msgsnd */
   83.29 -	__kernel_pid_t msg_lrpid;	/* last receive pid */
   83.30 -	unsigned long  __unused4;
   83.31 -	unsigned long  __unused5;
   83.32 -};
   83.33 -
   83.34 -#endif /* _I386_MSGBUF_H */
    84.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/msr.h	Fri Mar 14 15:48:09 2003 +0000
    84.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    84.3 @@ -1,121 +0,0 @@
    84.4 -#ifndef __ASM_MSR_H
    84.5 -#define __ASM_MSR_H
    84.6 -
    84.7 -/*
    84.8 - * Access to machine-specific registers (available on 586 and better only)
    84.9 - * Note: the rd* operations modify the parameters directly (without using
   84.10 - * pointer indirection), this allows gcc to optimize better
   84.11 - */
   84.12 -
   84.13 -#define rdmsr(msr,val1,val2) \
   84.14 -     __asm__ __volatile__("rdmsr" \
   84.15 -			  : "=a" (val1), "=d" (val2) \
   84.16 -			  : "c" (msr))
   84.17 -
   84.18 -#define wrmsr(msr,val1,val2) \
   84.19 -     __asm__ __volatile__("wrmsr" \
   84.20 -			  : /* no outputs */ \
   84.21 -			  : "c" (msr), "a" (val1), "d" (val2))
   84.22 -
   84.23 -#define rdtsc(low,high) \
   84.24 -     __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))
   84.25 -
   84.26 -#define rdtscl(low) \
   84.27 -     __asm__ __volatile__("rdtsc" : "=a" (low) : : "edx")
   84.28 -
   84.29 -#define rdtscll(val) \
   84.30 -     __asm__ __volatile__("rdtsc" : "=A" (val))
   84.31 -
   84.32 -#define write_tsc(val1,val2) wrmsr(0x10, val1, val2)
   84.33 -
   84.34 -#define rdpmc(counter,low,high) \
   84.35 -     __asm__ __volatile__("rdpmc" \
   84.36 -			  : "=a" (low), "=d" (high) \
   84.37 -			  : "c" (counter))
   84.38 -
   84.39 -/* symbolic names for some interesting MSRs */
   84.40 -/* Intel defined MSRs. */
   84.41 -#define MSR_IA32_P5_MC_ADDR		0
   84.42 -#define MSR_IA32_P5_MC_TYPE		1
   84.43 -#define MSR_IA32_PLATFORM_ID		0x17
   84.44 -#define MSR_IA32_EBL_CR_POWERON		0x2a
   84.45 -
   84.46 -#define MSR_IA32_APICBASE		0x1b
   84.47 -#define MSR_IA32_APICBASE_BSP		(1<<8)
   84.48 -#define MSR_IA32_APICBASE_ENABLE	(1<<11)
   84.49 -#define MSR_IA32_APICBASE_BASE		(0xfffff<<12)
   84.50 -
   84.51 -#define MSR_IA32_UCODE_WRITE		0x79
   84.52 -#define MSR_IA32_UCODE_REV		0x8b
   84.53 -
   84.54 -#define MSR_IA32_BBL_CR_CTL		0x119
   84.55 -
   84.56 -#define MSR_IA32_MCG_CAP		0x179
   84.57 -#define MSR_IA32_MCG_STATUS		0x17a
   84.58 -#define MSR_IA32_MCG_CTL		0x17b
   84.59 -
   84.60 -#define MSR_IA32_THERM_CONTROL		0x19a
   84.61 -#define MSR_IA32_THERM_INTERRUPT	0x19b
   84.62 -#define MSR_IA32_THERM_STATUS		0x19c
   84.63 -#define MSR_IA32_MISC_ENABLE		0x1a0
   84.64 -
   84.65 -#define MSR_IA32_DEBUGCTLMSR		0x1d9
   84.66 -#define MSR_IA32_LASTBRANCHFROMIP	0x1db
   84.67 -#define MSR_IA32_LASTBRANCHTOIP		0x1dc
   84.68 -#define MSR_IA32_LASTINTFROMIP		0x1dd
   84.69 -#define MSR_IA32_LASTINTTOIP		0x1de
   84.70 -
   84.71 -#define MSR_IA32_MC0_CTL		0x400
   84.72 -#define MSR_IA32_MC0_STATUS		0x401
   84.73 -#define MSR_IA32_MC0_ADDR		0x402
   84.74 -#define MSR_IA32_MC0_MISC		0x403
   84.75 -
   84.76 -#define MSR_P6_PERFCTR0			0xc1
   84.77 -#define MSR_P6_PERFCTR1			0xc2
   84.78 -#define MSR_P6_EVNTSEL0			0x186
   84.79 -#define MSR_P6_EVNTSEL1			0x187
   84.80 -
   84.81 -/* AMD Defined MSRs */
   84.82 -#define MSR_K6_EFER			0xC0000080
   84.83 -#define MSR_K6_STAR			0xC0000081
   84.84 -#define MSR_K6_WHCR			0xC0000082
   84.85 -#define MSR_K6_UWCCR			0xC0000085
   84.86 -#define MSR_K6_EPMR			0xC0000086
   84.87 -#define MSR_K6_PSOR			0xC0000087
   84.88 -#define MSR_K6_PFIR			0xC0000088
   84.89 -
   84.90 -#define MSR_K7_EVNTSEL0			0xC0010000
   84.91 -#define MSR_K7_PERFCTR0			0xC0010004
   84.92 -#define MSR_K7_HWCR			0xC0010015
   84.93 -#define MSR_K7_CLK_CTL			0xC001001b
   84.94 -#define MSR_K7_FID_VID_CTL		0xC0010041
   84.95 -#define MSR_K7_VID_STATUS		0xC0010042
   84.96 -
   84.97 -/* Centaur-Hauls/IDT defined MSRs. */
   84.98 -#define MSR_IDT_FCR1			0x107
   84.99 -#define MSR_IDT_FCR2			0x108
  84.100 -#define MSR_IDT_FCR3			0x109
  84.101 -#define MSR_IDT_FCR4			0x10a
  84.102 -
  84.103 -#define MSR_IDT_MCR0			0x110
  84.104 -#define MSR_IDT_MCR1			0x111
  84.105 -#define MSR_IDT_MCR2			0x112
  84.106 -#define MSR_IDT_MCR3			0x113
  84.107 -#define MSR_IDT_MCR4			0x114
  84.108 -#define MSR_IDT_MCR5			0x115
  84.109 -#define MSR_IDT_MCR6			0x116
  84.110 -#define MSR_IDT_MCR7			0x117
  84.111 -#define MSR_IDT_MCR_CTRL		0x120
  84.112 -
  84.113 -/* VIA Cyrix defined MSRs*/
  84.114 -#define MSR_VIA_FCR			0x1107
  84.115 -#define MSR_VIA_LONGHAUL		0x110a
  84.116 -#define MSR_VIA_BCR2			0x1147
  84.117 -
  84.118 -/* Transmeta defined MSRs */
  84.119 -#define MSR_TMTA_LONGRUN_CTRL		0x80868010
  84.120 -#define MSR_TMTA_LONGRUN_FLAGS		0x80868011
  84.121 -#define MSR_TMTA_LRTI_READOUT		0x80868018
  84.122 -#define MSR_TMTA_LRTI_VOLT_MHZ		0x8086801a
  84.123 -
  84.124 -#endif /* __ASM_MSR_H */
    85.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/mtrr.h	Fri Mar 14 15:48:09 2003 +0000
    85.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    85.3 @@ -1,127 +0,0 @@
    85.4 -/*  Generic MTRR (Memory Type Range Register) ioctls.
    85.5 -
    85.6 -    Copyright (C) 1997-1999  Richard Gooch
    85.7 -
    85.8 -    This library is free software; you can redistribute it and/or
    85.9 -    modify it under the terms of the GNU Library General Public
   85.10 -    License as published by the Free Software Foundation; either
   85.11 -    version 2 of the License, or (at your option) any later version.
   85.12 -
   85.13 -    This library is distributed in the hope that it will be useful,
   85.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   85.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   85.16 -    Library General Public License for more details.
   85.17 -
   85.18 -    You should have received a copy of the GNU Library General Public
   85.19 -    License along with this library; if not, write to the Free
   85.20 -    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   85.21 -
   85.22 -    Richard Gooch may be reached by email at  rgooch@atnf.csiro.au
   85.23 -    The postal address is:
   85.24 -      Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.
   85.25 -*/
   85.26 -#ifndef _LINUX_MTRR_H
   85.27 -#define _LINUX_MTRR_H
   85.28 -
   85.29 -#include <linux/config.h>
   85.30 -#include <linux/ioctl.h>
   85.31 -
   85.32 -#define	MTRR_IOCTL_BASE	'M'
   85.33 -
   85.34 -struct mtrr_sentry
   85.35 -{
   85.36 -    unsigned long base;    /*  Base address     */
   85.37 -    unsigned long size;    /*  Size of region   */
   85.38 -    unsigned int type;     /*  Type of region   */
   85.39 -};
   85.40 -
   85.41 -struct mtrr_gentry
   85.42 -{
   85.43 -    unsigned int regnum;   /*  Register number  */
   85.44 -    unsigned long base;    /*  Base address     */
   85.45 -    unsigned long size;    /*  Size of region   */
   85.46 -    unsigned int type;     /*  Type of region   */
   85.47 -};
   85.48 -
   85.49 -/*  These are the various ioctls  */
   85.50 -#define MTRRIOC_ADD_ENTRY        _IOW(MTRR_IOCTL_BASE,  0, struct mtrr_sentry)
   85.51 -#define MTRRIOC_SET_ENTRY        _IOW(MTRR_IOCTL_BASE,  1, struct mtrr_sentry)
   85.52 -#define MTRRIOC_DEL_ENTRY        _IOW(MTRR_IOCTL_BASE,  2, struct mtrr_sentry)
   85.53 -#define MTRRIOC_GET_ENTRY        _IOWR(MTRR_IOCTL_BASE, 3, struct mtrr_gentry)
   85.54 -#define MTRRIOC_KILL_ENTRY       _IOW(MTRR_IOCTL_BASE,  4, struct mtrr_sentry)
   85.55 -#define MTRRIOC_ADD_PAGE_ENTRY   _IOW(MTRR_IOCTL_BASE,  5, struct mtrr_sentry)
   85.56 -#define MTRRIOC_SET_PAGE_ENTRY   _IOW(MTRR_IOCTL_BASE,  6, struct mtrr_sentry)
   85.57 -#define MTRRIOC_DEL_PAGE_ENTRY   _IOW(MTRR_IOCTL_BASE,  7, struct mtrr_sentry)
   85.58 -#define MTRRIOC_GET_PAGE_ENTRY   _IOWR(MTRR_IOCTL_BASE, 8, struct mtrr_gentry)
   85.59 -#define MTRRIOC_KILL_PAGE_ENTRY  _IOW(MTRR_IOCTL_BASE,  9, struct mtrr_sentry)
   85.60 -
   85.61 -/*  These are the region types  */
   85.62 -#define MTRR_TYPE_UNCACHABLE 0
   85.63 -#define MTRR_TYPE_WRCOMB     1
   85.64 -/*#define MTRR_TYPE_         2*/
   85.65 -/*#define MTRR_TYPE_         3*/
   85.66 -#define MTRR_TYPE_WRTHROUGH  4
   85.67 -#define MTRR_TYPE_WRPROT     5
   85.68 -#define MTRR_TYPE_WRBACK     6
   85.69 -#define MTRR_NUM_TYPES       7
   85.70 -
   85.71 -#ifdef MTRR_NEED_STRINGS
   85.72 -static char *mtrr_strings[MTRR_NUM_TYPES] =
   85.73 -{
   85.74 -    "uncachable",               /* 0 */
   85.75 -    "write-combining",          /* 1 */
   85.76 -    "?",                        /* 2 */
   85.77 -    "?",                        /* 3 */
   85.78 -    "write-through",            /* 4 */
   85.79 -    "write-protect",            /* 5 */
   85.80 -    "write-back",               /* 6 */
   85.81 -};
   85.82 -#endif
   85.83 -
   85.84 -#ifdef __KERNEL__
   85.85 -
   85.86 -/*  The following functions are for use by other drivers  */
   85.87 -# ifdef CONFIG_MTRR
   85.88 -extern int mtrr_add (unsigned long base, unsigned long size,
   85.89 -		     unsigned int type, char increment);
   85.90 -extern int mtrr_add_page (unsigned long base, unsigned long size,
   85.91 -		     unsigned int type, char increment);
   85.92 -extern int mtrr_del (int reg, unsigned long base, unsigned long size);
   85.93 -extern int mtrr_del_page (int reg, unsigned long base, unsigned long size);
   85.94 -extern void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi);
   85.95 -#  else
   85.96 -static __inline__ int mtrr_add (unsigned long base, unsigned long size,
   85.97 -				unsigned int type, char increment)
   85.98 -{
   85.99 -    return -ENODEV;
  85.100 -}
  85.101 -static __inline__ int mtrr_add_page (unsigned long base, unsigned long size,
  85.102 -				unsigned int type, char increment)
  85.103 -{
  85.104 -    return -ENODEV;
  85.105 -}
  85.106 -static __inline__ int mtrr_del (int reg, unsigned long base,
  85.107 -				unsigned long size)
  85.108 -{
  85.109 -    return -ENODEV;
  85.110 -}
  85.111 -static __inline__ int mtrr_del_page (int reg, unsigned long base,
  85.112 -				unsigned long size)
  85.113 -{
  85.114 -    return -ENODEV;
  85.115 -}
  85.116 -
  85.117 -static __inline__ void mtrr_centaur_report_mcr(int mcr, u32 lo, u32 hi) {;}
  85.118 -
  85.119 -#  endif
  85.120 -
  85.121 -/*  The following functions are for initialisation: don't use them!  */
  85.122 -extern int mtrr_init (void);
  85.123 -#  if defined(CONFIG_SMP) && defined(CONFIG_MTRR)
  85.124 -extern void mtrr_init_boot_cpu (void);
  85.125 -extern void mtrr_init_secondary_cpu (void);
  85.126 -#  endif
  85.127 -
  85.128 -#endif
  85.129 -
  85.130 -#endif  /*  _LINUX_MTRR_H  */
    86.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/namei.h	Fri Mar 14 15:48:09 2003 +0000
    86.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    86.3 @@ -1,17 +0,0 @@
    86.4 -/* $Id: namei.h,v 1.1 1996/12/13 14:48:21 jj Exp $
    86.5 - * linux/include/asm-i386/namei.h
    86.6 - *
    86.7 - * Included from linux/fs/namei.c
    86.8 - */
    86.9 -
   86.10 -#ifndef __I386_NAMEI_H
   86.11 -#define __I386_NAMEI_H
   86.12 -
   86.13 -/* This dummy routine maybe changed to something useful
   86.14 - * for /usr/gnemul/ emulation stuff.
   86.15 - * Look at asm-sparc/namei.h for details.
   86.16 - */
   86.17 -
   86.18 -#define __emul_prefix() NULL
   86.19 -
   86.20 -#endif /* __I386_NAMEI_H */
    87.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/param.h	Fri Mar 14 15:48:09 2003 +0000
    87.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    87.3 @@ -1,24 +0,0 @@
    87.4 -#ifndef _ASMi386_PARAM_H
    87.5 -#define _ASMi386_PARAM_H
    87.6 -
    87.7 -#ifndef HZ
    87.8 -#define HZ 100
    87.9 -#endif
   87.10 -
   87.11 -#define EXEC_PAGESIZE	4096
   87.12 -
   87.13 -#ifndef NGROUPS
   87.14 -#define NGROUPS		32
   87.15 -#endif
   87.16 -
   87.17 -#ifndef NOGROUP
   87.18 -#define NOGROUP		(-1)
   87.19 -#endif
   87.20 -
   87.21 -#define MAXHOSTNAMELEN	64	/* max length of hostname */
   87.22 -
   87.23 -#ifdef __KERNEL__
   87.24 -# define CLOCKS_PER_SEC	100	/* frequency at which times() counts */
   87.25 -#endif
   87.26 -
   87.27 -#endif
    88.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/parport.h	Fri Mar 14 15:48:09 2003 +0000
    88.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    88.3 @@ -1,18 +0,0 @@
    88.4 -/*
    88.5 - * parport.h: ia32-specific parport initialisation
    88.6 - *
    88.7 - * Copyright (C) 1999, 2000  Tim Waugh <tim@cyberelk.demon.co.uk>
    88.8 - *
    88.9 - * This file should only be included by drivers/parport/parport_pc.c.
   88.10 - */
   88.11 -
   88.12 -#ifndef _ASM_I386_PARPORT_H
   88.13 -#define _ASM_I386_PARPORT_H 1
   88.14 -
   88.15 -static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
   88.16 -static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
   88.17 -{
   88.18 -	return parport_pc_find_isa_ports (autoirq, autodma);
   88.19 -}
   88.20 -
   88.21 -#endif /* !(_ASM_I386_PARPORT_H) */
    89.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/poll.h	Fri Mar 14 15:48:09 2003 +0000
    89.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    89.3 @@ -1,25 +0,0 @@
    89.4 -#ifndef __i386_POLL_H
    89.5 -#define __i386_POLL_H
    89.6 -
    89.7 -/* These are specified by iBCS2 */
    89.8 -#define POLLIN		0x0001
    89.9 -#define POLLPRI		0x0002
   89.10 -#define POLLOUT		0x0004
   89.11 -#define POLLERR		0x0008
   89.12 -#define POLLHUP		0x0010
   89.13 -#define POLLNVAL	0x0020
   89.14 -
   89.15 -/* The rest seem to be more-or-less nonstandard. Check them! */
   89.16 -#define POLLRDNORM	0x0040
   89.17 -#define POLLRDBAND	0x0080
   89.18 -#define POLLWRNORM	0x0100
   89.19 -#define POLLWRBAND	0x0200
   89.20 -#define POLLMSG		0x0400
   89.21 -
   89.22 -struct pollfd {
   89.23 -	int fd;
   89.24 -	short events;
   89.25 -	short revents;
   89.26 -};
   89.27 -
   89.28 -#endif
    90.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/posix_types.h	Fri Mar 14 15:48:09 2003 +0000
    90.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    90.3 @@ -1,80 +0,0 @@
    90.4 -#ifndef __ARCH_I386_POSIX_TYPES_H
    90.5 -#define __ARCH_I386_POSIX_TYPES_H
    90.6 -
    90.7 -/*
    90.8 - * This file is generally used by user-level software, so you need to
    90.9 - * be a little careful about namespace pollution etc.  Also, we cannot
   90.10 - * assume GCC is being used.
   90.11 - */
   90.12 -
   90.13 -typedef unsigned short	__kernel_dev_t;
   90.14 -typedef unsigned long	__kernel_ino_t;
   90.15 -typedef unsigned short	__kernel_mode_t;
   90.16 -typedef unsigned short	__kernel_nlink_t;
   90.17 -typedef long		__kernel_off_t;
   90.18 -typedef int		__kernel_pid_t;
   90.19 -typedef unsigned short	__kernel_ipc_pid_t;
   90.20 -typedef unsigned short	__kernel_uid_t;
   90.21 -typedef unsigned short	__kernel_gid_t;
   90.22 -typedef unsigned int	__kernel_size_t;
   90.23 -typedef int		__kernel_ssize_t;
   90.24 -typedef int		__kernel_ptrdiff_t;
   90.25 -typedef long		__kernel_time_t;
   90.26 -typedef long		__kernel_suseconds_t;
   90.27 -typedef long		__kernel_clock_t;
   90.28 -typedef int		__kernel_daddr_t;
   90.29 -typedef char *		__kernel_caddr_t;
   90.30 -typedef unsigned short	__kernel_uid16_t;
   90.31 -typedef unsigned short	__kernel_gid16_t;
   90.32 -typedef unsigned int	__kernel_uid32_t;
   90.33 -typedef unsigned int	__kernel_gid32_t;
   90.34 -
   90.35 -typedef unsigned short	__kernel_old_uid_t;
   90.36 -typedef unsigned short	__kernel_old_gid_t;
   90.37 -
   90.38 -#ifdef __GNUC__
   90.39 -typedef long long	__kernel_loff_t;
   90.40 -#endif
   90.41 -
   90.42 -typedef struct {
   90.43 -#if defined(__KERNEL__) || defined(__USE_ALL)
   90.44 -	int	val[2];
   90.45 -#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
   90.46 -	int	__val[2];
   90.47 -#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
   90.48 -} __kernel_fsid_t;
   90.49 -
   90.50 -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
   90.51 -
   90.52 -#undef	__FD_SET
   90.53 -#define __FD_SET(fd,fdsetp) \
   90.54 -		__asm__ __volatile__("btsl %1,%0": \
   90.55 -			"=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
   90.56 -
   90.57 -#undef	__FD_CLR
   90.58 -#define __FD_CLR(fd,fdsetp) \
   90.59 -		__asm__ __volatile__("btrl %1,%0": \
   90.60 -			"=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
   90.61 -
   90.62 -#undef	__FD_ISSET
   90.63 -#define __FD_ISSET(fd,fdsetp) (__extension__ ({ \
   90.64 -		unsigned char __result; \
   90.65 -		__asm__ __volatile__("btl %1,%2 ; setb %0" \
   90.66 -			:"=q" (__result) :"r" ((int) (fd)), \
   90.67 -			"m" (*(__kernel_fd_set *) (fdsetp))); \
   90.68 -		__result; }))
   90.69 -
   90.70 -#undef	__FD_ZERO
   90.71 -#define __FD_ZERO(fdsetp) \
   90.72 -do { \
   90.73 -	int __d0, __d1; \
   90.74 -	__asm__ __volatile__("cld ; rep ; stosl" \
   90.75 -			:"=m" (*(__kernel_fd_set *) (fdsetp)), \
   90.76 -			  "=&c" (__d0), "=&D" (__d1) \
   90.77 -			:"a" (0), "1" (__FDSET_LONGS), \
   90.78 -			"2" ((__kernel_fd_set *) (fdsetp)) : "memory"); \
   90.79 -} while (0)
   90.80 -
   90.81 -#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
   90.82 -
   90.83 -#endif
    91.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/resource.h	Fri Mar 14 15:48:09 2003 +0000
    91.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    91.3 @@ -1,47 +0,0 @@
    91.4 -#ifndef _I386_RESOURCE_H
    91.5 -#define _I386_RESOURCE_H
    91.6 -
    91.7 -/*
    91.8 - * Resource limits
    91.9 - */
   91.10 -
   91.11 -#define RLIMIT_CPU	0		/* CPU time in ms */
   91.12 -#define RLIMIT_FSIZE	1		/* Maximum filesize */
   91.13 -#define RLIMIT_DATA	2		/* max data size */
   91.14 -#define RLIMIT_STACK	3		/* max stack size */
   91.15 -#define RLIMIT_CORE	4		/* max core file size */
   91.16 -#define RLIMIT_RSS	5		/* max resident set size */
   91.17 -#define RLIMIT_NPROC	6		/* max number of processes */
   91.18 -#define RLIMIT_NOFILE	7		/* max number of open files */
   91.19 -#define RLIMIT_MEMLOCK	8		/* max locked-in-memory address space */
   91.20 -#define RLIMIT_AS	9		/* address space limit */
   91.21 -#define RLIMIT_LOCKS	10		/* maximum file locks held */
   91.22 -
   91.23 -#define RLIM_NLIMITS	11
   91.24 -
   91.25 -/*
   91.26 - * SuS says limits have to be unsigned.
   91.27 - * Which makes a ton more sense anyway.
   91.28 - */
   91.29 -#define RLIM_INFINITY	(~0UL)
   91.30 -
   91.31 -#ifdef __KERNEL__
   91.32 -
   91.33 -#define INIT_RLIMITS					\
   91.34 -{							\
   91.35 -	{ RLIM_INFINITY, RLIM_INFINITY },		\
   91.36 -	{ RLIM_INFINITY, RLIM_INFINITY },		\
   91.37 -	{ RLIM_INFINITY, RLIM_INFINITY },		\
   91.38 -	{      _STK_LIM, RLIM_INFINITY },		\
   91.39 -	{             0, RLIM_INFINITY },		\
   91.40 -	{ RLIM_INFINITY, RLIM_INFINITY },		\
   91.41 -	{             0,             0 },		\
   91.42 -	{      INR_OPEN,     INR_OPEN  },		\
   91.43 -	{ RLIM_INFINITY, RLIM_INFINITY },		\
   91.44 -	{ RLIM_INFINITY, RLIM_INFINITY },		\
   91.45 -        { RLIM_INFINITY, RLIM_INFINITY },		\
   91.46 -}
   91.47 -
   91.48 -#endif /* __KERNEL__ */
   91.49 -
   91.50 -#endif
    92.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwlock.h	Fri Mar 14 15:48:09 2003 +0000
    92.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    92.3 @@ -1,83 +0,0 @@
    92.4 -/* include/asm-i386/rwlock.h
    92.5 - *
    92.6 - *	Helpers used by both rw spinlocks and rw semaphores.
    92.7 - *
    92.8 - *	Based in part on code from semaphore.h and
    92.9 - *	spinlock.h Copyright 1996 Linus Torvalds.
   92.10 - *
   92.11 - *	Copyright 1999 Red Hat, Inc.
   92.12 - *
   92.13 - *	Written by Benjamin LaHaise.
   92.14 - *
   92.15 - *	This program is free software; you can redistribute it and/or
   92.16 - *	modify it under the terms of the GNU General Public License
   92.17 - *	as published by the Free Software Foundation; either version
   92.18 - *	2 of the License, or (at your option) any later version.
   92.19 - */
   92.20 -#ifndef _ASM_I386_RWLOCK_H
   92.21 -#define _ASM_I386_RWLOCK_H
   92.22 -
   92.23 -#define RW_LOCK_BIAS		 0x01000000
   92.24 -#define RW_LOCK_BIAS_STR	"0x01000000"
   92.25 -
   92.26 -#define __build_read_lock_ptr(rw, helper)   \
   92.27 -	asm volatile(LOCK "subl $1,(%0)\n\t" \
   92.28 -		     "js 2f\n" \
   92.29 -		     "1:\n" \
   92.30 -		     LOCK_SECTION_START("") \
   92.31 -		     "2:\tcall " helper "\n\t" \
   92.32 -		     "jmp 1b\n" \
   92.33 -		     LOCK_SECTION_END \
   92.34 -		     ::"a" (rw) : "memory")
   92.35 -
   92.36 -#define __build_read_lock_const(rw, helper)   \
   92.37 -	asm volatile(LOCK "subl $1,%0\n\t" \
   92.38 -		     "js 2f\n" \
   92.39 -		     "1:\n" \
   92.40 -		     LOCK_SECTION_START("") \
   92.41 -		     "2:\tpushl %%eax\n\t" \
   92.42 -		     "leal %0,%%eax\n\t" \
   92.43 -		     "call " helper "\n\t" \
   92.44 -		     "popl %%eax\n\t" \
   92.45 -		     "jmp 1b\n" \
   92.46 -		     LOCK_SECTION_END \
   92.47 -		     :"=m" (*(volatile int *)rw) : : "memory")
   92.48 -
   92.49 -#define __build_read_lock(rw, helper)	do { \
   92.50 -						if (__builtin_constant_p(rw)) \
   92.51 -							__build_read_lock_const(rw, helper); \
   92.52 -						else \
   92.53 -							__build_read_lock_ptr(rw, helper); \
   92.54 -					} while (0)
   92.55 -
   92.56 -#define __build_write_lock_ptr(rw, helper) \
   92.57 -	asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
   92.58 -		     "jnz 2f\n" \
   92.59 -		     "1:\n" \
   92.60 -		     LOCK_SECTION_START("") \
   92.61 -		     "2:\tcall " helper "\n\t" \
   92.62 -		     "jmp 1b\n" \
   92.63 -		     LOCK_SECTION_END \
   92.64 -		     ::"a" (rw) : "memory")
   92.65 -
   92.66 -#define __build_write_lock_const(rw, helper) \
   92.67 -	asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
   92.68 -		     "jnz 2f\n" \
   92.69 -		     "1:\n" \
   92.70 -		     LOCK_SECTION_START("") \
   92.71 -		     "2:\tpushl %%eax\n\t" \
   92.72 -		     "leal %0,%%eax\n\t" \
   92.73 -		     "call " helper "\n\t" \
   92.74 -		     "popl %%eax\n\t" \
   92.75 -		     "jmp 1b\n" \
   92.76 -		     LOCK_SECTION_END \
   92.77 -		     :"=m" (*(volatile int *)rw) : : "memory")
   92.78 -
   92.79 -#define __build_write_lock(rw, helper)	do { \
   92.80 -						if (__builtin_constant_p(rw)) \
   92.81 -							__build_write_lock_const(rw, helper); \
   92.82 -						else \
   92.83 -							__build_write_lock_ptr(rw, helper); \
   92.84 -					} while (0)
   92.85 -
   92.86 -#endif
    93.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/rwsem.h	Fri Mar 14 15:48:09 2003 +0000
    93.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    93.3 @@ -1,264 +0,0 @@
    93.4 -/* rwsem.h: R/W semaphores implemented using XADD/CMPXCHG for i486+
    93.5 - *
    93.6 - * Written by David Howells (dhowells@redhat.com).
    93.7 - *
    93.8 - * Derived from asm-i386/semaphore.h
    93.9 - *
   93.10 - * Trylock by Brian Watson (Brian.J.Watson@compaq.com).
   93.11 - *
   93.12 - *
   93.13 - * The MSW of the count is the negated number of active writers and waiting
   93.14 - * lockers, and the LSW is the total number of active locks
   93.15 - *
   93.16 - * The lock count is initialized to 0 (no active and no waiting lockers).
   93.17 - *
   93.18 - * When a writer subtracts WRITE_BIAS, it'll get 0xffff0001 for the case of an
   93.19 - * uncontended lock. This can be determined because XADD returns the old value.
   93.20 - * Readers increment by 1 and see a positive value when uncontended, negative
   93.21 - * if there are writers (and maybe) readers waiting (in which case it goes to
   93.22 - * sleep).
   93.23 - *
   93.24 - * The value of WAITING_BIAS supports up to 32766 waiting processes. This can
   93.25 - * be extended to 65534 by manually checking the whole MSW rather than relying
   93.26 - * on the S flag.
   93.27 - *
   93.28 - * The value of ACTIVE_BIAS supports up to 65535 active processes.
   93.29 - *
   93.30 - * This should be totally fair - if anything is waiting, a process that wants a
   93.31 - * lock will go to the back of the queue. When the currently active lock is
   93.32 - * released, if there's a writer at the front of the queue, then that and only
   93.33 - * that will be woken up; if there's a bunch of consequtive readers at the
   93.34 - * front, then they'll all be woken up, but no other readers will be.
   93.35 - */
   93.36 -
   93.37 -#ifndef _I386_RWSEM_H
   93.38 -#define _I386_RWSEM_H
   93.39 -
   93.40 -#ifndef _LINUX_RWSEM_H
   93.41 -#error please dont include asm/rwsem.h directly, use linux/rwsem.h instead
   93.42 -#endif
   93.43 -
   93.44 -#ifdef __KERNEL__
   93.45 -
   93.46 -#include <linux/list.h>
   93.47 -#include <linux/spinlock.h>
   93.48 -
   93.49 -struct rwsem_waiter;
   93.50 -
   93.51 -extern struct rw_semaphore *FASTCALL(rwsem_down_read_failed(struct rw_semaphore *sem));
   93.52 -extern struct rw_semaphore *FASTCALL(rwsem_down_write_failed(struct rw_semaphore *sem));
   93.53 -extern struct rw_semaphore *FASTCALL(rwsem_wake(struct rw_semaphore *));
   93.54 -
   93.55 -/*
   93.56 - * the semaphore definition
   93.57 - */
   93.58 -struct rw_semaphore {
   93.59 -	signed long		count;
   93.60 -#define RWSEM_UNLOCKED_VALUE		0x00000000
   93.61 -#define RWSEM_ACTIVE_BIAS		0x00000001
   93.62 -#define RWSEM_ACTIVE_MASK		0x0000ffff
   93.63 -#define RWSEM_WAITING_BIAS		(-0x00010000)
   93.64 -#define RWSEM_ACTIVE_READ_BIAS		RWSEM_ACTIVE_BIAS
   93.65 -#define RWSEM_ACTIVE_WRITE_BIAS		(RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
   93.66 -	spinlock_t		wait_lock;
   93.67 -	struct list_head	wait_list;
   93.68 -#if RWSEM_DEBUG
   93.69 -	int			debug;
   93.70 -#endif
   93.71 -};
   93.72 -
   93.73 -/*
   93.74 - * initialisation
   93.75 - */
   93.76 -#if RWSEM_DEBUG
   93.77 -#define __RWSEM_DEBUG_INIT      , 0
   93.78 -#else
   93.79 -#define __RWSEM_DEBUG_INIT	/* */
   93.80 -#endif
   93.81 -
   93.82 -#define __RWSEM_INITIALIZER(name) \
   93.83 -{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) \
   93.84 -	__RWSEM_DEBUG_INIT }
   93.85 -
   93.86 -#define DECLARE_RWSEM(name) \
   93.87 -	struct rw_semaphore name = __RWSEM_INITIALIZER(name)
   93.88 -
   93.89 -static inline void init_rwsem(struct rw_semaphore *sem)
   93.90 -{
   93.91 -	sem->count = RWSEM_UNLOCKED_VALUE;
   93.92 -	spin_lock_init(&sem->wait_lock);
   93.93 -	INIT_LIST_HEAD(&sem->wait_list);
   93.94 -#if RWSEM_DEBUG
   93.95 -	sem->debug = 0;
   93.96 -#endif
   93.97 -}
   93.98 -
   93.99 -/*
  93.100 - * lock for reading
  93.101 - */
  93.102 -static inline void __down_read(struct rw_semaphore *sem)
  93.103 -{
  93.104 -	__asm__ __volatile__(
  93.105 -		"# beginning down_read\n\t"
  93.106 -LOCK_PREFIX	"  incl      (%%eax)\n\t" /* adds 0x00000001, returns the old value */
  93.107 -		"  js        2f\n\t" /* jump if we weren't granted the lock */
  93.108 -		"1:\n\t"
  93.109 -		LOCK_SECTION_START("")
  93.110 -		"2:\n\t"
  93.111 -		"  pushl     %%ecx\n\t"
  93.112 -		"  pushl     %%edx\n\t"
  93.113 -		"  call      rwsem_down_read_failed\n\t"
  93.114 -		"  popl      %%edx\n\t"
  93.115 -		"  popl      %%ecx\n\t"
  93.116 -		"  jmp       1b\n"
  93.117 -		LOCK_SECTION_END
  93.118 -		"# ending down_read\n\t"
  93.119 -		: "+m"(sem->count)
  93.120 -		: "a"(sem)
  93.121 -		: "memory", "cc");
  93.122 -}
  93.123 -
  93.124 -/*
  93.125 - * trylock for reading -- returns 1 if successful, 0 if contention
  93.126 - */
  93.127 -static inline int __down_read_trylock(struct rw_semaphore *sem)
  93.128 -{
  93.129 -	__s32 result, tmp;
  93.130 -	__asm__ __volatile__(
  93.131 -		"# beginning __down_read_trylock\n\t"
  93.132 -		"  movl      %0,%1\n\t"
  93.133 -		"1:\n\t"
  93.134 -		"  movl	     %1,%2\n\t"
  93.135 -		"  addl      %3,%2\n\t"
  93.136 -		"  jle	     2f\n\t"
  93.137 -LOCK_PREFIX	"  cmpxchgl  %2,%0\n\t"
  93.138 -		"  jnz	     1b\n\t"
  93.139 -		"2:\n\t"
  93.140 -		"# ending __down_read_trylock\n\t"
  93.141 -		: "+m"(sem->count), "=&a"(result), "=&r"(tmp)
  93.142 -		: "i"(RWSEM_ACTIVE_READ_BIAS)
  93.143 -		: "memory", "cc");
  93.144 -	return result>=0 ? 1 : 0;
  93.145 -}
  93.146 -
  93.147 -/*
  93.148 - * lock for writing
  93.149 - */
  93.150 -static inline void __down_write(struct rw_semaphore *sem)
  93.151 -{
  93.152 -	int tmp;
  93.153 -
  93.154 -	tmp = RWSEM_ACTIVE_WRITE_BIAS;
  93.155 -	__asm__ __volatile__(
  93.156 -		"# beginning down_write\n\t"
  93.157 -LOCK_PREFIX	"  xadd      %0,(%%eax)\n\t" /* subtract 0x0000ffff, returns the old value */
  93.158 -		"  testl     %0,%0\n\t" /* was the count 0 before? */
  93.159 -		"  jnz       2f\n\t" /* jump if we weren't granted the lock */
  93.160 -		"1:\n\t"
  93.161 -		LOCK_SECTION_START("")
  93.162 -		"2:\n\t"
  93.163 -		"  pushl     %%ecx\n\t"
  93.164 -		"  call      rwsem_down_write_failed\n\t"
  93.165 -		"  popl      %%ecx\n\t"
  93.166 -		"  jmp       1b\n"
  93.167 -		LOCK_SECTION_END
  93.168 -		"# ending down_write"
  93.169 -		: "+d"(tmp), "+m"(sem->count)
  93.170 -		: "a"(sem)
  93.171 -		: "memory", "cc");
  93.172 -}
  93.173 -
  93.174 -/*
  93.175 - * trylock for writing -- returns 1 if successful, 0 if contention
  93.176 - */
  93.177 -static inline int __down_write_trylock(struct rw_semaphore *sem)
  93.178 -{
  93.179 -	signed long ret = cmpxchg(&sem->count,
  93.180 -				  RWSEM_UNLOCKED_VALUE, 
  93.181 -				  RWSEM_ACTIVE_WRITE_BIAS);
  93.182 -	if (ret == RWSEM_UNLOCKED_VALUE)
  93.183 -		return 1;
  93.184 -	return 0;
  93.185 -}
  93.186 -
  93.187 -/*
  93.188 - * unlock after reading
  93.189 - */
  93.190 -static inline void __up_read(struct rw_semaphore *sem)
  93.191 -{
  93.192 -	__s32 tmp = -RWSEM_ACTIVE_READ_BIAS;
  93.193 -	__asm__ __volatile__(
  93.194 -		"# beginning __up_read\n\t"
  93.195 -LOCK_PREFIX	"  xadd      %%edx,(%%eax)\n\t" /* subtracts 1, returns the old value */
  93.196 -		"  js        2f\n\t" /* jump if the lock is being waited upon */
  93.197 -		"1:\n\t"
  93.198 -		LOCK_SECTION_START("")
  93.199 -		"2:\n\t"
  93.200 -		"  decw      %%dx\n\t" /* do nothing if still outstanding active readers */
  93.201 -		"  jnz       1b\n\t"
  93.202 -		"  pushl     %%ecx\n\t"
  93.203 -		"  call      rwsem_wake\n\t"
  93.204 -		"  popl      %%ecx\n\t"
  93.205 -		"  jmp       1b\n"
  93.206 -		LOCK_SECTION_END
  93.207 -		"# ending __up_read\n"
  93.208 -		: "+m"(sem->count), "+d"(tmp)
  93.209 -		: "a"(sem)
  93.210 -		: "memory", "cc");
  93.211 -}
  93.212 -
  93.213 -/*
  93.214 - * unlock after writing
  93.215 - */
  93.216 -static inline void __up_write(struct rw_semaphore *sem)
  93.217 -{
  93.218 -	__asm__ __volatile__(
  93.219 -		"# beginning __up_write\n\t"
  93.220 -		"  movl      %2,%%edx\n\t"
  93.221 -LOCK_PREFIX	"  xaddl     %%edx,(%%eax)\n\t" /* tries to transition 0xffff0001 -> 0x00000000 */
  93.222 -		"  jnz       2f\n\t" /* jump if the lock is being waited upon */
  93.223 -		"1:\n\t"
  93.224 -		LOCK_SECTION_START("")
  93.225 -		"2:\n\t"
  93.226 -		"  decw      %%dx\n\t" /* did the active count reduce to 0? */
  93.227 -		"  jnz       1b\n\t" /* jump back if not */
  93.228 -		"  pushl     %%ecx\n\t"
  93.229 -		"  call      rwsem_wake\n\t"
  93.230 -		"  popl      %%ecx\n\t"
  93.231 -		"  jmp       1b\n"
  93.232 -		LOCK_SECTION_END
  93.233 -		"# ending __up_write\n"
  93.234 -		: "+m"(sem->count)
  93.235 -		: "a"(sem), "i"(-RWSEM_ACTIVE_WRITE_BIAS)
  93.236 -		: "memory", "cc", "edx");
  93.237 -}
  93.238 -
  93.239 -/*
  93.240 - * implement atomic add functionality
  93.241 - */
  93.242 -static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem)
  93.243 -{
  93.244 -	__asm__ __volatile__(
  93.245 -LOCK_PREFIX	"addl %1,%0"
  93.246 -		:"=m"(sem->count)
  93.247 -		:"ir"(delta), "m"(sem->count));
  93.248 -}
  93.249 -
  93.250 -/*
  93.251 - * implement exchange and add functionality
  93.252 - */
  93.253 -static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem)
  93.254 -{
  93.255 -	int tmp = delta;
  93.256 -
  93.257 -	__asm__ __volatile__(
  93.258 -LOCK_PREFIX	"xadd %0,(%2)"
  93.259 -		: "+r"(tmp), "=m"(sem->count)
  93.260 -		: "r"(sem), "m"(sem->count)
  93.261 -		: "memory");
  93.262 -
  93.263 -	return tmp+delta;
  93.264 -}
  93.265 -
  93.266 -#endif /* __KERNEL__ */
  93.267 -#endif /* _I386_RWSEM_H */
    94.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/scatterlist.h	Fri Mar 14 15:48:09 2003 +0000
    94.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    94.3 @@ -1,34 +0,0 @@
    94.4 -#ifndef _I386_SCATTERLIST_H
    94.5 -#define _I386_SCATTERLIST_H
    94.6 -
    94.7 -/*
    94.8 - * Drivers must set either ->address or (preferred) ->page and ->offset
    94.9 - * to indicate where data must be transferred to/from.
   94.10 - *
   94.11 - * Using ->page is recommended since it handles highmem data as well as
   94.12 - * low mem. ->address is restricted to data which has a virtual mapping, and
   94.13 - * it will go away in the future. Updating to ->page can be automated very
   94.14 - * easily -- something like
   94.15 - *
   94.16 - * sg->address = some_ptr;
   94.17 - *
   94.18 - * can be rewritten as
   94.19 - *
   94.20 - * sg->page = virt_to_page(some_ptr);
   94.21 - * sg->offset = (unsigned long) some_ptr & ~PAGE_MASK;
   94.22 - *
   94.23 - * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens
   94.24 - */
   94.25 -struct scatterlist {
   94.26 -    char *  address;    /* Location data is to be transferred to, NULL for
   94.27 -			 * highmem page */
   94.28 -    struct page * page; /* Location for highmem page, if any */
   94.29 -    unsigned int offset;/* for highmem, page offset */
   94.30 -
   94.31 -    dma_addr_t dma_address;
   94.32 -    unsigned int length;
   94.33 -};
   94.34 -
   94.35 -#define ISA_DMA_THRESHOLD (0x00ffffff)
   94.36 -
   94.37 -#endif /* !(_I386_SCATTERLIST_H) */
    95.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/semaphore.h	Fri Mar 14 15:48:09 2003 +0000
    95.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    95.3 @@ -1,222 +0,0 @@
    95.4 -#ifndef _I386_SEMAPHORE_H
    95.5 -#define _I386_SEMAPHORE_H
    95.6 -
    95.7 -#include <linux/linkage.h>
    95.8 -
    95.9 -#ifdef __KERNEL__
   95.10 -
   95.11 -/*
   95.12 - * SMP- and interrupt-safe semaphores..
   95.13 - *
   95.14 - * (C) Copyright 1996 Linus Torvalds
   95.15 - *
   95.16 - * Modified 1996-12-23 by Dave Grothe <dave@gcom.com> to fix bugs in
   95.17 - *                     the original code and to make semaphore waits
   95.18 - *                     interruptible so that processes waiting on
   95.19 - *                     semaphores can be killed.
   95.20 - * Modified 1999-02-14 by Andrea Arcangeli, split the sched.c helper
   95.21 - *		       functions in asm/sempahore-helper.h while fixing a
   95.22 - *		       potential and subtle race discovered by Ulrich Schmid
   95.23 - *		       in down_interruptible(). Since I started to play here I
   95.24 - *		       also implemented the `trylock' semaphore operation.
   95.25 - *          1999-07-02 Artur Skawina <skawina@geocities.com>
   95.26 - *                     Optimized "0(ecx)" -> "(ecx)" (the assembler does not
   95.27 - *                     do this). Changed calling sequences from push/jmp to
   95.28 - *                     traditional call/ret.
   95.29 - * Modified 2001-01-01 Andreas Franck <afranck@gmx.de>
   95.30 - *		       Some hacks to ensure compatibility with recent
   95.31 - *		       GCC snapshots, to avoid stack corruption when compiling
   95.32 - *		       with -fomit-frame-pointer. It's not sure if this will
   95.33 - *		       be fixed in GCC, as our previous implementation was a
   95.34 - *		       bit dubious.
   95.35 - *
   95.36 - * If you would like to see an analysis of this implementation, please
   95.37 - * ftp to gcom.com and download the file
   95.38 - * /pub/linux/src/semaphore/semaphore-2.0.24.tar.gz.
   95.39 - *
   95.40 - */
   95.41 -
   95.42 -#include <asm/system.h>
   95.43 -#include <asm/atomic.h>
   95.44 -#include <linux/wait.h>
   95.45 -#include <linux/rwsem.h>
   95.46 -
   95.47 -struct semaphore {
   95.48 -	atomic_t count;
   95.49 -	int sleepers;
   95.50 -	wait_queue_head_t wait;
   95.51 -#if WAITQUEUE_DEBUG
   95.52 -	long __magic;
   95.53 -#endif
   95.54 -};
   95.55 -
   95.56 -#if WAITQUEUE_DEBUG
   95.57 -# define __SEM_DEBUG_INIT(name) \
   95.58 -		, (int)&(name).__magic
   95.59 -#else
   95.60 -# define __SEM_DEBUG_INIT(name)
   95.61 -#endif
   95.62 -
   95.63 -#define __SEMAPHORE_INITIALIZER(name,count) \
   95.64 -{ ATOMIC_INIT(count), 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
   95.65 -	__SEM_DEBUG_INIT(name) }
   95.66 -
   95.67 -#define __MUTEX_INITIALIZER(name) \
   95.68 -	__SEMAPHORE_INITIALIZER(name,1)
   95.69 -
   95.70 -#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
   95.71 -	struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
   95.72 -
   95.73 -#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
   95.74 -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
   95.75 -
   95.76 -static inline void sema_init (struct semaphore *sem, int val)
   95.77 -{
   95.78 -/*
   95.79 - *	*sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
   95.80 - *
   95.81 - * i'd rather use the more flexible initialization above, but sadly
   95.82 - * GCC 2.7.2.3 emits a bogus warning. EGCS doesnt. Oh well.
   95.83 - */
   95.84 -	atomic_set(&sem->count, val);
   95.85 -	sem->sleepers = 0;
   95.86 -	init_waitqueue_head(&sem->wait);
   95.87 -#if WAITQUEUE_DEBUG
   95.88 -	sem->__magic = (int)&sem->__magic;
   95.89 -#endif
   95.90 -}
   95.91 -
   95.92 -static inline void init_MUTEX (struct semaphore *sem)
   95.93 -{
   95.94 -	sema_init(sem, 1);
   95.95 -}
   95.96 -
   95.97 -static inline void init_MUTEX_LOCKED (struct semaphore *sem)
   95.98 -{
   95.99 -	sema_init(sem, 0);
  95.100 -}
  95.101 -
  95.102 -asmlinkage void __down_failed(void /* special register calling convention */);
  95.103 -asmlinkage int  __down_failed_interruptible(void  /* params in registers */);
  95.104 -asmlinkage int  __down_failed_trylock(void  /* params in registers */);
  95.105 -asmlinkage void __up_wakeup(void /* special register calling convention */);
  95.106 -
  95.107 -asmlinkage void __down(struct semaphore * sem);
  95.108 -asmlinkage int  __down_interruptible(struct semaphore * sem);
  95.109 -asmlinkage int  __down_trylock(struct semaphore * sem);
  95.110 -asmlinkage void __up(struct semaphore * sem);
  95.111 -
  95.112 -/*
  95.113 - * This is ugly, but we want the default case to fall through.
  95.114 - * "__down_failed" is a special asm handler that calls the C
  95.115 - * routine that actually waits. See arch/i386/kernel/semaphore.c
  95.116 - */
  95.117 -static inline void down(struct semaphore * sem)
  95.118 -{
  95.119 -#if WAITQUEUE_DEBUG
  95.120 -	CHECK_MAGIC(sem->__magic);
  95.121 -#endif
  95.122 -
  95.123 -	__asm__ __volatile__(
  95.124 -		"# atomic down operation\n\t"
  95.125 -		LOCK "decl %0\n\t"     /* --sem->count */
  95.126 -		"js 2f\n"
  95.127 -		"1:\n"
  95.128 -		LOCK_SECTION_START("")
  95.129 -		"2:\tcall __down_failed\n\t"
  95.130 -		"jmp 1b\n"
  95.131 -		LOCK_SECTION_END
  95.132 -		:"=m" (sem->count)
  95.133 -		:"c" (sem)
  95.134 -		:"memory");
  95.135 -}
  95.136 -
  95.137 -/*
  95.138 - * Interruptible try to acquire a semaphore.  If we obtained
  95.139 - * it, return zero.  If we were interrupted, returns -EINTR
  95.140 - */
  95.141 -static inline int down_interruptible(struct semaphore * sem)
  95.142 -{
  95.143 -	int result;
  95.144 -
  95.145 -#if WAITQUEUE_DEBUG
  95.146 -	CHECK_MAGIC(sem->__magic);
  95.147 -#endif
  95.148 -
  95.149 -	__asm__ __volatile__(
  95.150 -		"# atomic interruptible down operation\n\t"
  95.151 -		LOCK "decl %1\n\t"     /* --sem->count */
  95.152 -		"js 2f\n\t"
  95.153 -		"xorl %0,%0\n"
  95.154 -		"1:\n"
  95.155 -		LOCK_SECTION_START("")
  95.156 -		"2:\tcall __down_failed_interruptible\n\t"
  95.157 -		"jmp 1b\n"
  95.158 -		LOCK_SECTION_END
  95.159 -		:"=a" (result), "=m" (sem->count)
  95.160 -		:"c" (sem)
  95.161 -		:"memory");
  95.162 -	return result;
  95.163 -}
  95.164 -
  95.165 -/*
  95.166 - * Non-blockingly attempt to down() a semaphore.
  95.167 - * Returns zero if we acquired it
  95.168 - */
  95.169 -static inline int down_trylock(struct semaphore * sem)
  95.170 -{
  95.171 -	int result;
  95.172 -
  95.173 -#if WAITQUEUE_DEBUG
  95.174 -	CHECK_MAGIC(sem->__magic);
  95.175 -#endif
  95.176 -
  95.177 -	__asm__ __volatile__(
  95.178 -		"# atomic interruptible down operation\n\t"
  95.179 -		LOCK "decl %1\n\t"     /* --sem->count */
  95.180 -		"js 2f\n\t"
  95.181 -		"xorl %0,%0\n"
  95.182 -		"1:\n"
  95.183 -		LOCK_SECTION_START("")
  95.184 -		"2:\tcall __down_failed_trylock\n\t"
  95.185 -		"jmp 1b\n"
  95.186 -		LOCK_SECTION_END
  95.187 -		:"=a" (result), "=m" (sem->count)
  95.188 -		:"c" (sem)
  95.189 -		:"memory");
  95.190 -	return result;
  95.191 -}
  95.192 -
  95.193 -/*
  95.194 - * Note! This is subtle. We jump to wake people up only if
  95.195 - * the semaphore was negative (== somebody was waiting on it).
  95.196 - * The default case (no contention) will result in NO
  95.197 - * jumps for both down() and up().
  95.198 - */
  95.199 -static inline void up(struct semaphore * sem)
  95.200 -{
  95.201 -#if WAITQUEUE_DEBUG
  95.202 -	CHECK_MAGIC(sem->__magic);
  95.203 -#endif
  95.204 -	__asm__ __volatile__(
  95.205 -		"# atomic up operation\n\t"
  95.206 -		LOCK "incl %0\n\t"     /* ++sem->count */
  95.207 -		"jle 2f\n"
  95.208 -		"1:\n"
  95.209 -		LOCK_SECTION_START("")
  95.210 -		"2:\tcall __up_wakeup\n\t"
  95.211 -		"jmp 1b\n"
  95.212 -		LOCK_SECTION_END
  95.213 -		".subsection 0\n"
  95.214 -		:"=m" (sem->count)
  95.215 -		:"c" (sem)
  95.216 -		:"memory");
  95.217 -}
  95.218 -
  95.219 -static inline int sem_getcount(struct semaphore *sem)
  95.220 -{
  95.221 -	return atomic_read(&sem->count);
  95.222 -}
  95.223 -
  95.224 -#endif
  95.225 -#endif
    96.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sembuf.h	Fri Mar 14 15:48:09 2003 +0000
    96.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    96.3 @@ -1,25 +0,0 @@
    96.4 -#ifndef _I386_SEMBUF_H
    96.5 -#define _I386_SEMBUF_H
    96.6 -
    96.7 -/* 
    96.8 - * The semid64_ds structure for i386 architecture.
    96.9 - * Note extra padding because this structure is passed back and forth
   96.10 - * between kernel and user space.
   96.11 - *
   96.12 - * Pad space is left for:
   96.13 - * - 64-bit time_t to solve y2038 problem
   96.14 - * - 2 miscellaneous 32-bit values
   96.15 - */
   96.16 -
   96.17 -struct semid64_ds {
   96.18 -	struct ipc64_perm sem_perm;		/* permissions .. see ipc.h */
   96.19 -	__kernel_time_t	sem_otime;		/* last semop time */
   96.20 -	unsigned long	__unused1;
   96.21 -	__kernel_time_t	sem_ctime;		/* last change time */
   96.22 -	unsigned long	__unused2;
   96.23 -	unsigned long	sem_nsems;		/* no. of semaphores in array */
   96.24 -	unsigned long	__unused3;
   96.25 -	unsigned long	__unused4;
   96.26 -};
   96.27 -
   96.28 -#endif /* _I386_SEMBUF_H */
    97.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/serial.h	Fri Mar 14 15:48:09 2003 +0000
    97.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    97.3 @@ -1,148 +0,0 @@
    97.4 -/*
    97.5 - * include/asm-i386/serial.h
    97.6 - */
    97.7 -
    97.8 -#include <linux/config.h>
    97.9 -
   97.10 -/*
   97.11 - * This assumes you have a 1.8432 MHz clock for your UART.
   97.12 - *
   97.13 - * It'd be nice if someone built a serial card with a 24.576 MHz
   97.14 - * clock, since the 16550A is capable of handling a top speed of 1.5
   97.15 - * megabits/second; but this requires the faster clock.
   97.16 - */
   97.17 -#define BASE_BAUD ( 1843200 / 16 )
   97.18 -
   97.19 -/* Standard COM flags (except for COM4, because of the 8514 problem) */
   97.20 -#ifdef CONFIG_SERIAL_DETECT_IRQ
   97.21 -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
   97.22 -#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
   97.23 -#else
   97.24 -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
   97.25 -#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
   97.26 -#endif
   97.27 -
   97.28 -#ifdef CONFIG_SERIAL_MANY_PORTS
   97.29 -#define FOURPORT_FLAGS ASYNC_FOURPORT
   97.30 -#define ACCENT_FLAGS 0
   97.31 -#define BOCA_FLAGS 0
   97.32 -#define HUB6_FLAGS 0
   97.33 -#define RS_TABLE_SIZE	64
   97.34 -#else
   97.35 -#define RS_TABLE_SIZE
   97.36 -#endif
   97.37 -
   97.38 -#define MCA_COM_FLAGS	(STD_COM_FLAGS|ASYNC_BOOT_ONLYMCA)
   97.39 -
   97.40 -/*
   97.41 - * The following define the access methods for the HUB6 card. All
   97.42 - * access is through two ports for all 24 possible chips. The card is
   97.43 - * selected through the high 2 bits, the port on that card with the
   97.44 - * "middle" 3 bits, and the register on that port with the bottom
   97.45 - * 3 bits.
   97.46 - *
   97.47 - * While the access port and interrupt is configurable, the default
   97.48 - * port locations are 0x302 for the port control register, and 0x303
   97.49 - * for the data read/write register. Normally, the interrupt is at irq3
   97.50 - * but can be anything from 3 to 7 inclusive. Note that using 3 will
   97.51 - * require disabling com2.
   97.52 - */
   97.53 -
   97.54 -#define C_P(card,port) (((card)<<6|(port)<<3) + 1)
   97.55 -
   97.56 -#define STD_SERIAL_PORT_DEFNS			\
   97.57 -	/* UART CLK   PORT IRQ     FLAGS        */			\
   97.58 -	{ 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS },	/* ttyS0 */	\
   97.59 -	{ 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS },	/* ttyS1 */	\
   97.60 -	{ 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS },	/* ttyS2 */	\
   97.61 -	{ 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS },	/* ttyS3 */
   97.62 -
   97.63 -/*
   97.64 - * HCDP_SERIAL_PORT_DEFNS should be placed in exactly the same slot 
   97.65 - * in rs_table as defined by HCDP_SERIAL_CONSOLE_PORT in 
   97.66 - * include/linux/serial.h
   97.67 - */
   97.68 -#define HCDP_SERIAL_PORT_DEFNS	\
   97.69 -	{ 0, BASE_BAUD, -1, 0, STD_COM_FLAGS},		/* ttySx device
   97.70 -							   in comments sucks.
   97.71 -							   You add an entry
   97.72 -							   and you get to edit 
   97.73 -							   boatloads of these 
   97.74 -							   comments. Not worth
   97.75 -							   it */
   97.76 -
   97.77 -
   97.78 -#ifdef CONFIG_SERIAL_MANY_PORTS
   97.79 -#define EXTRA_SERIAL_PORT_DEFNS			\
   97.80 -	{ 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, 	/* ttyS4 */	\
   97.81 -	{ 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS },	/* ttyS5 */	\
   97.82 -	{ 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS },	/* ttyS6 */	\
   97.83 -	{ 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS },	/* ttyS7 */	\
   97.84 -	{ 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS },	/* ttyS8 */	\
   97.85 -	{ 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS },	/* ttyS9 */	\
   97.86 -	{ 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS },	/* ttyS10 */	\
   97.87 -	{ 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS },	/* ttyS11 */	\
   97.88 -	{ 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS },	/* ttyS12 */	\
   97.89 -	{ 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS },	/* ttyS13 */	\
   97.90 -	{ 0, BASE_BAUD, 0x000, 0, 0 },	/* ttyS14 (spare) */		\
   97.91 -	{ 0, BASE_BAUD, 0x000, 0, 0 },	/* ttyS15 (spare) */		\
   97.92 -	{ 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS },	/* ttyS16 */	\
   97.93 -	{ 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS },	/* ttyS17 */	\
   97.94 -	{ 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS },	/* ttyS18 */	\
   97.95 -	{ 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS },	/* ttyS19 */	\
   97.96 -	{ 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS },	/* ttyS20 */	\
   97.97 -	{ 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS },	/* ttyS21 */	\
   97.98 -	{ 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS },	/* ttyS22 */	\
   97.99 -	{ 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS },	/* ttyS23 */	\
  97.100 -	{ 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS },	/* ttyS24 */	\
  97.101 -	{ 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS },	/* ttyS25 */	\
  97.102 -	{ 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS },	/* ttyS26 */	\
  97.103 -	{ 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS },	/* ttyS27 */	\
  97.104 -	{ 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS },	/* ttyS28 */	\
  97.105 -	{ 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS },	/* ttyS29 */	\
  97.106 -	{ 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS },	/* ttyS30 */	\
  97.107 -	{ 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS },	/* ttyS31 */
  97.108 -#else
  97.109 -#define EXTRA_SERIAL_PORT_DEFNS
  97.110 -#endif
  97.111 -
  97.112 -/* You can have up to four HUB6's in the system, but I've only
  97.113 - * included two cards here for a total of twelve ports.
  97.114 - */
  97.115 -#if (defined(CONFIG_HUB6) && defined(CONFIG_SERIAL_MANY_PORTS))
  97.116 -#define HUB6_SERIAL_PORT_DFNS		\
  97.117 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,0) },  /* ttyS32 */	\
  97.118 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,1) },  /* ttyS33 */	\
  97.119 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,2) },  /* ttyS34 */	\
  97.120 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,3) },  /* ttyS35 */	\
  97.121 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,4) },  /* ttyS36 */	\
  97.122 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,5) },  /* ttyS37 */	\
  97.123 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,0) },  /* ttyS38 */	\
  97.124 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,1) },  /* ttyS39 */	\
  97.125 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,2) },  /* ttyS40 */	\
  97.126 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,3) },  /* ttyS41 */	\
  97.127 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,4) },  /* ttyS42 */	\
  97.128 -	{ 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,5) },  /* ttyS43 */
  97.129 -#else
  97.130 -#define HUB6_SERIAL_PORT_DFNS
  97.131 -#endif
  97.132 -
  97.133 -#ifdef CONFIG_MCA
  97.134 -#define MCA_SERIAL_PORT_DFNS			\
  97.135 -	{ 0, BASE_BAUD, 0x3220, 3, MCA_COM_FLAGS },	\
  97.136 -	{ 0, BASE_BAUD, 0x3228, 3, MCA_COM_FLAGS },	\
  97.137 -	{ 0, BASE_BAUD, 0x4220, 3, MCA_COM_FLAGS },	\
  97.138 -	{ 0, BASE_BAUD, 0x4228, 3, MCA_COM_FLAGS },	\
  97.139 -	{ 0, BASE_BAUD, 0x5220, 3, MCA_COM_FLAGS },	\
  97.140 -	{ 0, BASE_BAUD, 0x5228, 3, MCA_COM_FLAGS },
  97.141 -#else
  97.142 -#define MCA_SERIAL_PORT_DFNS
  97.143 -#endif
  97.144 -
  97.145 -#define SERIAL_PORT_DFNS		\
  97.146 -	STD_SERIAL_PORT_DEFNS		\
  97.147 -	HCDP_SERIAL_PORT_DEFNS		\
  97.148 -	EXTRA_SERIAL_PORT_DEFNS		\
  97.149 -	HUB6_SERIAL_PORT_DFNS		\
  97.150 -	MCA_SERIAL_PORT_DFNS
  97.151 -
    98.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/setup.h	Fri Mar 14 15:48:09 2003 +0000
    98.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    98.3 @@ -1,10 +0,0 @@
    98.4 -/*
    98.5 - *	Just a place holder. We don't want to have to test x86 before
    98.6 - *	we include stuff
    98.7 - */
    98.8 -
    98.9 -#ifndef _i386_SETUP_H
   98.10 -#define _i386_SETUP_H
   98.11 -
   98.12 -
   98.13 -#endif /* _i386_SETUP_H */
    99.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmbuf.h	Fri Mar 14 15:48:09 2003 +0000
    99.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    99.3 @@ -1,42 +0,0 @@
    99.4 -#ifndef _I386_SHMBUF_H
    99.5 -#define _I386_SHMBUF_H
    99.6 -
    99.7 -/* 
    99.8 - * The shmid64_ds structure for i386 architecture.
    99.9 - * Note extra padding because this structure is passed back and forth
   99.10 - * between kernel and user space.
   99.11 - *
   99.12 - * Pad space is left for:
   99.13 - * - 64-bit time_t to solve y2038 problem
   99.14 - * - 2 miscellaneous 32-bit values
   99.15 - */
   99.16 -
   99.17 -struct shmid64_ds {
   99.18 -	struct ipc64_perm	shm_perm;	/* operation perms */
   99.19 -	size_t			shm_segsz;	/* size of segment (bytes) */
   99.20 -	__kernel_time_t		shm_atime;	/* last attach time */
   99.21 -	unsigned long		__unused1;
   99.22 -	__kernel_time_t		shm_dtime;	/* last detach time */
   99.23 -	unsigned long		__unused2;
   99.24 -	__kernel_time_t		shm_ctime;	/* last change time */
   99.25 -	unsigned long		__unused3;
   99.26 -	__kernel_pid_t		shm_cpid;	/* pid of creator */
   99.27 -	__kernel_pid_t		shm_lpid;	/* pid of last operator */
   99.28 -	unsigned long		shm_nattch;	/* no. of current attaches */
   99.29 -	unsigned long		__unused4;
   99.30 -	unsigned long		__unused5;
   99.31 -};
   99.32 -
   99.33 -struct shminfo64 {
   99.34 -	unsigned long	shmmax;
   99.35 -	unsigned long	shmmin;
   99.36 -	unsigned long	shmmni;
   99.37 -	unsigned long	shmseg;
   99.38 -	unsigned long	shmall;
   99.39 -	unsigned long	__unused1;
   99.40 -	unsigned long	__unused2;
   99.41 -	unsigned long	__unused3;
   99.42 -	unsigned long	__unused4;
   99.43 -};
   99.44 -
   99.45 -#endif /* _I386_SHMBUF_H */
   100.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/shmparam.h	Fri Mar 14 15:48:09 2003 +0000
   100.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   100.3 @@ -1,6 +0,0 @@
   100.4 -#ifndef _ASMI386_SHMPARAM_H
   100.5 -#define _ASMI386_SHMPARAM_H
   100.6 -
   100.7 -#define	SHMLBA PAGE_SIZE		 /* attach addr a multiple of this */
   100.8 -
   100.9 -#endif /* _ASMI386_SHMPARAM_H */
   101.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sigcontext.h	Fri Mar 14 15:48:09 2003 +0000
   101.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   101.3 @@ -1,83 +0,0 @@
   101.4 -#ifndef _ASMi386_SIGCONTEXT_H
   101.5 -#define _ASMi386_SIGCONTEXT_H
   101.6 -
   101.7 -/*
   101.8 - * As documented in the iBCS2 standard..
   101.9 - *
  101.10 - * The first part of "struct _fpstate" is just the normal i387
  101.11 - * hardware setup, the extra "status" word is used to save the
  101.12 - * coprocessor status word before entering the handler.
  101.13 - *
  101.14 - * Pentium III FXSR, SSE support
  101.15 - *	Gareth Hughes <gareth@valinux.com>, May 2000
  101.16 - *
  101.17 - * The FPU state data structure has had to grow to accomodate the
  101.18 - * extended FPU state required by the Streaming SIMD Extensions.
  101.19 - * There is no documented standard to accomplish this at the moment.
  101.20 - */
  101.21 -struct _fpreg {
  101.22 -	unsigned short significand[4];
  101.23 -	unsigned short exponent;
  101.24 -};
  101.25 -
  101.26 -struct _fpxreg {
  101.27 -	unsigned short significand[4];
  101.28 -	unsigned short exponent;
  101.29 -	unsigned short padding[3];
  101.30 -};
  101.31 -
  101.32 -struct _xmmreg {
  101.33 -	unsigned long element[4];
  101.34 -};
  101.35 -
  101.36 -struct _fpstate {
  101.37 -	/* Regular FPU environment */
  101.38 -	unsigned long 	cw;
  101.39 -	unsigned long	sw;
  101.40 -	unsigned long	tag;
  101.41 -	unsigned long	ipoff;
  101.42 -	unsigned long	cssel;
  101.43 -	unsigned long	dataoff;
  101.44 -	unsigned long	datasel;
  101.45 -	struct _fpreg	_st[8];
  101.46 -	unsigned short	status;
  101.47 -	unsigned short	magic;		/* 0xffff = regular FPU data only */
  101.48 -
  101.49 -	/* FXSR FPU environment */
  101.50 -	unsigned long	_fxsr_env[6];	/* FXSR FPU env is ignored */
  101.51 -	unsigned long	mxcsr;
  101.52 -	unsigned long	reserved;
  101.53 -	struct _fpxreg	_fxsr_st[8];	/* FXSR FPU reg data is ignored */
  101.54 -	struct _xmmreg	_xmm[8];
  101.55 -	unsigned long	padding[56];
  101.56 -};
  101.57 -
  101.58 -#define X86_FXSR_MAGIC		0x0000
  101.59 -
  101.60 -struct sigcontext {
  101.61 -	unsigned short gs, __gsh;
  101.62 -	unsigned short fs, __fsh;
  101.63 -	unsigned short es, __esh;
  101.64 -	unsigned short ds, __dsh;
  101.65 -	unsigned long edi;
  101.66 -	unsigned long esi;
  101.67 -	unsigned long ebp;
  101.68 -	unsigned long esp;
  101.69 -	unsigned long ebx;
  101.70 -	unsigned long edx;
  101.71 -	unsigned long ecx;
  101.72 -	unsigned long eax;
  101.73 -	unsigned long trapno;
  101.74 -	unsigned long err;
  101.75 -	unsigned long eip;
  101.76 -	unsigned short cs, __csh;
  101.77 -	unsigned long eflags;
  101.78 -	unsigned long esp_at_signal;
  101.79 -	unsigned short ss, __ssh;
  101.80 -	struct _fpstate * fpstate;
  101.81 -	unsigned long oldmask;
  101.82 -	unsigned long cr2;
  101.83 -};
  101.84 -
  101.85 -
  101.86 -#endif
   102.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/siginfo.h	Fri Mar 14 15:48:09 2003 +0000
   102.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   102.3 @@ -1,233 +0,0 @@
   102.4 -#ifndef _I386_SIGINFO_H
   102.5 -#define _I386_SIGINFO_H
   102.6 -
   102.7 -#include <linux/types.h>
   102.8 -
   102.9 -/* XXX: This structure was copied from the Alpha; is there an iBCS version?  */
  102.10 -
  102.11 -typedef union sigval {
  102.12 -	int sival_int;
  102.13 -	void *sival_ptr;
  102.14 -} sigval_t;
  102.15 -
  102.16 -#define SI_MAX_SIZE	128
  102.17 -#define SI_PAD_SIZE	((SI_MAX_SIZE/sizeof(int)) - 3)
  102.18 -
  102.19 -typedef struct siginfo {
  102.20 -	int si_signo;
  102.21 -	int si_errno;
  102.22 -	int si_code;
  102.23 -
  102.24 -	union {
  102.25 -		int _pad[SI_PAD_SIZE];
  102.26 -
  102.27 -		/* kill() */
  102.28 -		struct {
  102.29 -			pid_t _pid;		/* sender's pid */
  102.30 -			uid_t _uid;		/* sender's uid */
  102.31 -		} _kill;
  102.32 -
  102.33 -		/* POSIX.1b timers */
  102.34 -		struct {
  102.35 -			unsigned int _timer1;
  102.36 -			unsigned int _timer2;
  102.37 -		} _timer;
  102.38 -
  102.39 -		/* POSIX.1b signals */
  102.40 -		struct {
  102.41 -			pid_t _pid;		/* sender's pid */
  102.42 -			uid_t _uid;		/* sender's uid */
  102.43 -			sigval_t _sigval;
  102.44 -		} _rt;
  102.45 -
  102.46 -		/* SIGCHLD */
  102.47 -		struct {
  102.48 -			pid_t _pid;		/* which child */
  102.49 -			uid_t _uid;		/* sender's uid */
  102.50 -			int _status;		/* exit code */
  102.51 -			clock_t _utime;
  102.52 -			clock_t _stime;
  102.53 -		} _sigchld;
  102.54 -
  102.55 -		/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
  102.56 -		struct {
  102.57 -			void *_addr; /* faulting insn/memory ref. */
  102.58 -		} _sigfault;
  102.59 -
  102.60 -		/* SIGPOLL */
  102.61 -		struct {
  102.62 -			int _band;	/* POLL_IN, POLL_OUT, POLL_MSG */
  102.63 -			int _fd;
  102.64 -		} _sigpoll;
  102.65 -	} _sifields;
  102.66 -} siginfo_t;
  102.67 -
  102.68 -/*
  102.69 - * How these fields are to be accessed.
  102.70 - */
  102.71 -#define si_pid		_sifields._kill._pid
  102.72 -#define si_uid		_sifields._kill._uid
  102.73 -#define si_status	_sifields._sigchld._status
  102.74 -#define si_utime	_sifields._sigchld._utime
  102.75 -#define si_stime	_sifields._sigchld._stime
  102.76 -#define si_value	_sifields._rt._sigval
  102.77 -#define si_int		_sifields._rt._sigval.sival_int
  102.78 -#define si_ptr		_sifields._rt._sigval.sival_ptr
  102.79 -#define si_addr		_sifields._sigfault._addr
  102.80 -#define si_band		_sifields._sigpoll._band
  102.81 -#define si_fd		_sifields._sigpoll._fd
  102.82 -
  102.83 -#ifdef __KERNEL__
  102.84 -#define __SI_MASK	0xffff0000
  102.85 -#define __SI_KILL	(0 << 16)
  102.86 -#define __SI_TIMER	(1 << 16)
  102.87 -#define __SI_POLL	(2 << 16)
  102.88 -#define __SI_FAULT	(3 << 16)
  102.89 -#define __SI_CHLD	(4 << 16)
  102.90 -#define __SI_RT		(5 << 16)
  102.91 -#define __SI_CODE(T,N)	((T) << 16 | ((N) & 0xffff))
  102.92 -#else
  102.93 -#define __SI_KILL	0
  102.94 -#define __SI_TIMER	0
  102.95 -#define __SI_POLL	0
  102.96 -#define __SI_FAULT	0
  102.97 -#define __SI_CHLD	0
  102.98 -#define __SI_RT		0
  102.99 -#define __SI_CODE(T,N)	(N)
 102.100 -#endif
 102.101 -
 102.102 -/*
 102.103 - * si_code values
 102.104 - * Digital reserves positive values for kernel-generated signals.
 102.105 - */
 102.106 -#define SI_USER		0		/* sent by kill, sigsend, raise */
 102.107 -#define SI_KERNEL	0x80		/* sent by the kernel from somewhere */
 102.108 -#define SI_QUEUE	-1		/* sent by sigqueue */
 102.109 -#define SI_TIMER __SI_CODE(__SI_TIMER,-2) /* sent by timer expiration */
 102.110 -#define SI_MESGQ	-3		/* sent by real time mesq state change */
 102.111 -#define SI_ASYNCIO	-4		/* sent by AIO completion */
 102.112 -#define SI_SIGIO	-5		/* sent by queued SIGIO */
 102.113 -#define SI_TKILL	-6		/* sent by tkill system call */
 102.114 -
 102.115 -#define SI_FROMUSER(siptr)	((siptr)->si_code <= 0)
 102.116 -#define SI_FROMKERNEL(siptr)	((siptr)->si_code > 0)
 102.117 -
 102.118 -/*
 102.119 - * SIGILL si_codes
 102.120 - */
 102.121 -#define ILL_ILLOPC	(__SI_FAULT|1)	/* illegal opcode */
 102.122 -#define ILL_ILLOPN	(__SI_FAULT|2)	/* illegal operand */
 102.123 -#define ILL_ILLADR	(__SI_FAULT|3)	/* illegal addressing mode */
 102.124 -#define ILL_ILLTRP	(__SI_FAULT|4)	/* illegal trap */
 102.125 -#define ILL_PRVOPC	(__SI_FAULT|5)	/* privileged opcode */
 102.126 -#define ILL_PRVREG	(__SI_FAULT|6)	/* privileged register */
 102.127 -#define ILL_COPROC	(__SI_FAULT|7)	/* coprocessor error */
 102.128 -#define ILL_BADSTK	(__SI_FAULT|8)	/* internal stack error */
 102.129 -#define NSIGILL		8
 102.130 -
 102.131 -/*
 102.132 - * SIGFPE si_codes
 102.133 - */
 102.134 -#define FPE_INTDIV	(__SI_FAULT|1)	/* integer divide by zero */
 102.135 -#define FPE_INTOVF	(__SI_FAULT|2)	/* integer overflow */
 102.136 -#define FPE_FLTDIV	(__SI_FAULT|3)	/* floating point divide by zero */
 102.137 -#define FPE_FLTOVF	(__SI_FAULT|4)	/* floating point overflow */
 102.138 -#define FPE_FLTUND	(__SI_FAULT|5)	/* floating point underflow */
 102.139 -#define FPE_FLTRES	(__SI_FAULT|6)	/* floating point inexact result */
 102.140 -#define FPE_FLTINV	(__SI_FAULT|7)	/* floating point invalid operation */
 102.141 -#define FPE_FLTSUB	(__SI_FAULT|8)	/* subscript out of range */
 102.142 -#define NSIGFPE		8
 102.143 -
 102.144 -/*
 102.145 - * SIGSEGV si_codes
 102.146 - */
 102.147 -#define SEGV_MAPERR	(__SI_FAULT|1)	/* address not mapped to object */
 102.148 -#define SEGV_ACCERR	(__SI_FAULT|2)	/* invalid permissions for mapped object */
 102.149 -#define NSIGSEGV	2
 102.150 -
 102.151 -/*
 102.152 - * SIGBUS si_codes
 102.153 - */
 102.154 -#define BUS_ADRALN	(__SI_FAULT|1)	/* invalid address alignment */
 102.155 -#define BUS_ADRERR	(__SI_FAULT|2)	/* non-existant physical address */
 102.156 -#define BUS_OBJERR	(__SI_FAULT|3)	/* object specific hardware error */
 102.157 -#define NSIGBUS		3
 102.158 -
 102.159 -/*
 102.160 - * SIGTRAP si_codes
 102.161 - */
 102.162 -#define TRAP_BRKPT	(__SI_FAULT|1)	/* process breakpoint */
 102.163 -#define TRAP_TRACE	(__SI_FAULT|2)	/* process trace trap */
 102.164 -#define NSIGTRAP	2
 102.165 -
 102.166 -/*
 102.167 - * SIGCHLD si_codes
 102.168 - */
 102.169 -#define CLD_EXITED	(__SI_CHLD|1)	/* child has exited */
 102.170 -#define CLD_KILLED	(__SI_CHLD|2)	/* child was killed */
 102.171 -#define CLD_DUMPED	(__SI_CHLD|3)	/* child terminated abnormally */
 102.172 -#define CLD_TRAPPED	(__SI_CHLD|4)	/* traced child has trapped */
 102.173 -#define CLD_STOPPED	(__SI_CHLD|5)	/* child has stopped */
 102.174 -#define CLD_CONTINUED	(__SI_CHLD|6)	/* stopped child has continued */
 102.175 -#define NSIGCHLD	6
 102.176 -
 102.177 -/*
 102.178 - * SIGPOLL si_codes
 102.179 - */
 102.180 -#define POLL_IN		(__SI_POLL|1)	/* data input available */
 102.181 -#define POLL_OUT	(__SI_POLL|2)	/* output buffers available */
 102.182 -#define POLL_MSG	(__SI_POLL|3)	/* input message available */
 102.183 -#define POLL_ERR	(__SI_POLL|4)	/* i/o error */
 102.184 -#define POLL_PRI	(__SI_POLL|5)	/* high priority input available */
 102.185 -#define POLL_HUP	(__SI_POLL|6)	/* device disconnected */
 102.186 -#define NSIGPOLL	6
 102.187 -
 102.188 -/*
 102.189 - * sigevent definitions
 102.190 - * 
 102.191 - * It seems likely that SIGEV_THREAD will have to be handled from 
 102.192 - * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the
 102.193 - * thread manager then catches and does the appropriate nonsense.
 102.194 - * However, everything is written out here so as to not get lost.
 102.195 - */
 102.196 -#define SIGEV_SIGNAL	0	/* notify via signal */
 102.197 -#define SIGEV_NONE	1	/* other notification: meaningless */
 102.198 -#define SIGEV_THREAD	2	/* deliver via thread creation */
 102.199 -
 102.200 -#define SIGEV_MAX_SIZE	64
 102.201 -#define SIGEV_PAD_SIZE	((SIGEV_MAX_SIZE/sizeof(int)) - 3)
 102.202 -
 102.203 -typedef struct sigevent {
 102.204 -	sigval_t sigev_value;
 102.205 -	int sigev_signo;
 102.206 -	int sigev_notify;
 102.207 -	union {
 102.208 -		int _pad[SIGEV_PAD_SIZE];
 102.209 -
 102.210 -		struct {
 102.211 -			void (*_function)(sigval_t);
 102.212 -			void *_attribute;	/* really pthread_attr_t */
 102.213 -		} _sigev_thread;
 102.214 -	} _sigev_un;
 102.215 -} sigevent_t;
 102.216 -
 102.217 -#define sigev_notify_function	_sigev_un._sigev_thread._function
 102.218 -#define sigev_notify_attributes	_sigev_un._sigev_thread._attribute
 102.219 -
 102.220 -#ifdef __KERNEL__
 102.221 -#include <linux/string.h>
 102.222 -
 102.223 -static inline void copy_siginfo(siginfo_t *to, siginfo_t *from)
 102.224 -{
 102.225 -	if (from->si_code < 0)
 102.226 -		memcpy(to, from, sizeof(siginfo_t));
 102.227 -	else
 102.228 -		/* _sigchld is currently the largest know union member */
 102.229 -		memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
 102.230 -}
 102.231 -
 102.232 -extern int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from);
 102.233 -
 102.234 -#endif /* __KERNEL__ */
 102.235 -
 102.236 -#endif
   103.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/signal.h	Fri Mar 14 15:48:09 2003 +0000
   103.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   103.3 @@ -1,221 +0,0 @@
   103.4 -#ifndef _ASMi386_SIGNAL_H
   103.5 -#define _ASMi386_SIGNAL_H
   103.6 -
   103.7 -#include <linux/types.h>
   103.8 -
   103.9 -/* Avoid too many header ordering problems.  */
  103.10 -struct siginfo;
  103.11 -
  103.12 -#ifdef __KERNEL__
  103.13 -/* Most things should be clean enough to redefine this at will, if care
  103.14 -   is taken to make libc match.  */
  103.15 -
  103.16 -#define _NSIG		64
  103.17 -#define _NSIG_BPW	32
  103.18 -#define _NSIG_WORDS	(_NSIG / _NSIG_BPW)
  103.19 -
  103.20 -typedef unsigned long old_sigset_t;		/* at least 32 bits */
  103.21 -
  103.22 -typedef struct {
  103.23 -	unsigned long sig[_NSIG_WORDS];
  103.24 -} sigset_t;
  103.25 -
  103.26 -#else
  103.27 -/* Here we must cater to libcs that poke about in kernel headers.  */
  103.28 -
  103.29 -#define NSIG		32
  103.30 -typedef unsigned long sigset_t;
  103.31 -
  103.32 -#endif /* __KERNEL__ */
  103.33 -
  103.34 -#define SIGHUP		 1
  103.35 -#define SIGINT		 2
  103.36 -#define SIGQUIT		 3
  103.37 -#define SIGILL		 4
  103.38 -#define SIGTRAP		 5
  103.39 -#define SIGABRT		 6
  103.40 -#define SIGIOT		 6
  103.41 -#define SIGBUS		 7
  103.42 -#define SIGFPE		 8
  103.43 -#define SIGKILL		 9
  103.44 -#define SIGUSR1		10
  103.45 -#define SIGSEGV		11
  103.46 -#define SIGUSR2		12
  103.47 -#define SIGPIPE		13
  103.48 -#define SIGALRM		14
  103.49 -#define SIGTERM		15
  103.50 -#define SIGSTKFLT	16
  103.51 -#define SIGCHLD		17
  103.52 -#define SIGCONT		18
  103.53 -#define SIGSTOP		19
  103.54 -#define SIGTSTP		20
  103.55 -#define SIGTTIN		21
  103.56 -#define SIGTTOU		22
  103.57 -#define SIGURG		23
  103.58 -#define SIGXCPU		24
  103.59 -#define SIGXFSZ		25
  103.60 -#define SIGVTALRM	26
  103.61 -#define SIGPROF		27
  103.62 -#define SIGWINCH	28
  103.63 -#define SIGIO		29
  103.64 -#define SIGPOLL		SIGIO
  103.65 -/*
  103.66 -#define SIGLOST		29
  103.67 -*/
  103.68 -#define SIGPWR		30
  103.69 -#define SIGSYS		31
  103.70 -#define	SIGUNUSED	31
  103.71 -
  103.72 -/* These should not be considered constants from userland.  */
  103.73 -#define SIGRTMIN	32
  103.74 -#define SIGRTMAX	(_NSIG-1)
  103.75 -
  103.76 -/*
  103.77 - * SA_FLAGS values:
  103.78 - *
  103.79 - * SA_ONSTACK indicates that a registered stack_t will be used.
  103.80 - * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
  103.81 - * SA_RESTART flag to get restarting signals (which were the default long ago)
  103.82 - * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
  103.83 - * SA_RESETHAND clears the handler when the signal is delivered.
  103.84 - * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
  103.85 - * SA_NODEFER prevents the current signal from being masked in the handler.
  103.86 - *
  103.87 - * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
  103.88 - * Unix names RESETHAND and NODEFER respectively.
  103.89 - */
  103.90 -#define SA_NOCLDSTOP	0x00000001
  103.91 -#define SA_NOCLDWAIT	0x00000002 /* not supported yet */
  103.92 -#define SA_SIGINFO	0x00000004
  103.93 -#define SA_ONSTACK	0x08000000
  103.94 -#define SA_RESTART	0x10000000
  103.95 -#define SA_NODEFER	0x40000000
  103.96 -#define SA_RESETHAND	0x80000000
  103.97 -
  103.98 -#define SA_NOMASK	SA_NODEFER
  103.99 -#define SA_ONESHOT	SA_RESETHAND
 103.100 -#define SA_INTERRUPT	0x20000000 /* dummy -- ignored */
 103.101 -
 103.102 -#define SA_RESTORER	0x04000000
 103.103 -
 103.104 -/* 
 103.105 - * sigaltstack controls
 103.106 - */
 103.107 -#define SS_ONSTACK	1
 103.108 -#define SS_DISABLE	2
 103.109 -
 103.110 -#define MINSIGSTKSZ	2048
 103.111 -#define SIGSTKSZ	8192
 103.112 -
 103.113 -#ifdef __KERNEL__
 103.114 -
 103.115 -/*
 103.116 - * These values of sa_flags are used only by the kernel as part of the
 103.117 - * irq handling routines.
 103.118 - *
 103.119 - * SA_INTERRUPT is also used by the irq handling routines.
 103.120 - * SA_SHIRQ is for shared interrupt support on PCI and EISA.
 103.121 - */
 103.122 -#define SA_PROBE		SA_ONESHOT
 103.123 -#define SA_SAMPLE_RANDOM	SA_RESTART
 103.124 -#define SA_SHIRQ		0x04000000
 103.125 -#endif
 103.126 -
 103.127 -#define SIG_BLOCK          0	/* for blocking signals */
 103.128 -#define SIG_UNBLOCK        1	/* for unblocking signals */
 103.129 -#define SIG_SETMASK        2	/* for setting the signal mask */
 103.130 -
 103.131 -/* Type of a signal handler.  */
 103.132 -typedef void (*__sighandler_t)(int);
 103.133 -
 103.134 -#define SIG_DFL	((__sighandler_t)0)	/* default signal handling */
 103.135 -#define SIG_IGN	((__sighandler_t)1)	/* ignore signal */
 103.136 -#define SIG_ERR	((__sighandler_t)-1)	/* error return from signal */
 103.137 -
 103.138 -#ifdef __KERNEL__
 103.139 -struct old_sigaction {
 103.140 -	__sighandler_t sa_handler;
 103.141 -	old_sigset_t sa_mask;
 103.142 -	unsigned long sa_flags;
 103.143 -	void (*sa_restorer)(void);
 103.144 -};
 103.145 -
 103.146 -struct sigaction {
 103.147 -	__sighandler_t sa_handler;
 103.148 -	unsigned long sa_flags;
 103.149 -	void (*sa_restorer)(void);
 103.150 -	sigset_t sa_mask;		/* mask last for extensibility */
 103.151 -};
 103.152 -
 103.153 -struct k_sigaction {
 103.154 -	struct sigaction sa;
 103.155 -};
 103.156 -#else
 103.157 -/* Here we must cater to libcs that poke about in kernel headers.  */
 103.158 -
 103.159 -struct sigaction {
 103.160 -	union {
 103.161 -	  __sighandler_t _sa_handler;
 103.162 -	  void (*_sa_sigaction)(int, struct siginfo *, void *);
 103.163 -	} _u;
 103.164 -	sigset_t sa_mask;
 103.165 -	unsigned long sa_flags;
 103.166 -	void (*sa_restorer)(void);
 103.167 -};
 103.168 -
 103.169 -#define sa_handler	_u._sa_handler
 103.170 -#define sa_sigaction	_u._sa_sigaction
 103.171 -
 103.172 -#endif /* __KERNEL__ */
 103.173 -
 103.174 -typedef struct sigaltstack {
 103.175 -	void *ss_sp;
 103.176 -	int ss_flags;
 103.177 -	size_t ss_size;
 103.178 -} stack_t;
 103.179 -
 103.180 -#ifdef __KERNEL__
 103.181 -#include <asm/sigcontext.h>
 103.182 -
 103.183 -#define __HAVE_ARCH_SIG_BITOPS
 103.184 -
 103.185 -static __inline__ void sigaddset(sigset_t *set, int _sig)
 103.186 -{
 103.187 -	__asm__("btsl %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc");
 103.188 -}
 103.189 -
 103.190 -static __inline__ void sigdelset(sigset_t *set, int _sig)
 103.191 -{
 103.192 -	__asm__("btrl %1,%0" : "=m"(*set) : "Ir"(_sig - 1) : "cc");
 103.193 -}
 103.194 -
 103.195 -static __inline__ int __const_sigismember(sigset_t *set, int _sig)
 103.196 -{
 103.197 -	unsigned long sig = _sig - 1;
 103.198 -	return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW));
 103.199 -}
 103.200 -
 103.201 -static __inline__ int __gen_sigismember(sigset_t *set, int _sig)
 103.202 -{
 103.203 -	int ret;
 103.204 -	__asm__("btl %2,%1\n\tsbbl %0,%0"
 103.205 -		: "=r"(ret) : "m"(*set), "Ir"(_sig-1) : "cc");
 103.206 -	return ret;
 103.207 -}
 103.208 -
 103.209 -#define sigismember(set,sig)			\
 103.210 -	(__builtin_constant_p(sig) ?		\
 103.211 -	 __const_sigismember((set),(sig)) :	\
 103.212 -	 __gen_sigismember((set),(sig)))
 103.213 -
 103.214 -#define sigmask(sig)	(1UL << ((sig) - 1))
 103.215 -
 103.216 -static __inline__ int sigfindinword(unsigned long word)
 103.217 -{
 103.218 -	__asm__("bsfl %1,%0" : "=r"(word) : "rm"(word) : "cc");
 103.219 -	return word;
 103.220 -}
 103.221 -
 103.222 -#endif /* __KERNEL__ */
 103.223 -
 103.224 -#endif
   104.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/smplock.h	Fri Mar 14 15:48:09 2003 +0000
   104.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   104.3 @@ -1,81 +0,0 @@
   104.4 -#ifndef __ASM_SMPLOCK_H
   104.5 -#define __ASM_SMPLOCK_H
   104.6 -
   104.7 -/*
   104.8 - * <asm/smplock.h>
   104.9 - *
  104.10 - * i386 SMP lock implementation
  104.11 - */
  104.12 -#include <linux/interrupt.h>
  104.13 -#include <linux/spinlock.h>
  104.14 -#include <linux/sched.h>
  104.15 -#include <asm/current.h>
  104.16 -
  104.17 -extern spinlock_cacheline_t kernel_flag_cacheline;  
  104.18 -#define kernel_flag kernel_flag_cacheline.lock      
  104.19 -
  104.20 -#define kernel_locked()		spin_is_locked(&kernel_flag)
  104.21 -
  104.22 -/*
  104.23 - * Release global kernel lock and global interrupt lock
  104.24 - */
  104.25 -#define release_kernel_lock(task, cpu) \
  104.26 -do { \
  104.27 -	if (task->lock_depth >= 0) \
  104.28 -		spin_unlock(&kernel_flag); \
  104.29 -	release_irqlock(cpu); \
  104.30 -	__sti(); \
  104.31 -} while (0)
  104.32 -
  104.33 -/*
  104.34 - * Re-acquire the kernel lock
  104.35 - */
  104.36 -#define reacquire_kernel_lock(task) \
  104.37 -do { \
  104.38 -	if (task->lock_depth >= 0) \
  104.39 -		spin_lock(&kernel_flag); \
  104.40 -} while (0)
  104.41 -
  104.42 -
  104.43 -/*
  104.44 - * Getting the big kernel lock.
  104.45 - *
  104.46 - * This cannot happen asynchronously,
  104.47 - * so we only need to worry about other
  104.48 - * CPU's.
  104.49 - */
  104.50 -static __inline__ void lock_kernel(void)
  104.51 -{
  104.52 -#if 1
  104.53 -	if (!++current->lock_depth)
  104.54 -		spin_lock(&kernel_flag);
  104.55 -#else
  104.56 -	__asm__ __volatile__(
  104.57 -		"incl %1\n\t"
  104.58 -		"jne 9f"
  104.59 -		spin_lock_string
  104.60 -		"\n9:"
  104.61 -		:"=m" (__dummy_lock(&kernel_flag)),
  104.62 -		 "=m" (current->lock_depth));
  104.63 -#endif
  104.64 -}
  104.65 -
  104.66 -static __inline__ void unlock_kernel(void)
  104.67 -{
  104.68 -	if (current->lock_depth < 0)
  104.69 -		out_of_line_bug();
  104.70 -#if 1
  104.71 -	if (--current->lock_depth < 0)
  104.72 -		spin_unlock(&kernel_flag);
  104.73 -#else
  104.74 -	__asm__ __volatile__(
  104.75 -		"decl %1\n\t"
  104.76 -		"jns 9f\n\t"
  104.77 -		spin_unlock_string
  104.78 -		"\n9:"
  104.79 -		:"=m" (__dummy_lock(&kernel_flag)),
  104.80 -		 "=m" (current->lock_depth));
  104.81 -#endif
  104.82 -}
  104.83 -
  104.84 -#endif /* __ASM_SMPLOCK_H */
   105.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/socket.h	Fri Mar 14 15:48:09 2003 +0000
   105.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   105.3 @@ -1,64 +0,0 @@
   105.4 -#ifndef _ASM_SOCKET_H
   105.5 -#define _ASM_SOCKET_H
   105.6 -
   105.7 -#include <asm/sockios.h>
   105.8 -
   105.9 -/* For setsockopt(2) */
  105.10 -#define SOL_SOCKET	1
  105.11 -
  105.12 -#define SO_DEBUG	1
  105.13 -#define SO_REUSEADDR	2
  105.14 -#define SO_TYPE		3
  105.15 -#define SO_ERROR	4
  105.16 -#define SO_DONTROUTE	5
  105.17 -#define SO_BROADCAST	6
  105.18 -#define SO_SNDBUF	7
  105.19 -#define SO_RCVBUF	8
  105.20 -#define SO_KEEPALIVE	9
  105.21 -#define SO_OOBINLINE	10
  105.22 -#define SO_NO_CHECK	11
  105.23 -#define SO_PRIORITY	12
  105.24 -#define SO_LINGER	13
  105.25 -#define SO_BSDCOMPAT	14
  105.26 -/* To add :#define SO_REUSEPORT 15 */
  105.27 -#define SO_PASSCRED	16
  105.28 -#define SO_PEERCRED	17
  105.29 -#define SO_RCVLOWAT	18
  105.30 -#define SO_SNDLOWAT	19
  105.31 -#define SO_RCVTIMEO	20
  105.32 -#define SO_SNDTIMEO	21
  105.33 -
  105.34 -/* Security levels - as per NRL IPv6 - don't actually do anything */
  105.35 -#define SO_SECURITY_AUTHENTICATION		22
  105.36 -#define SO_SECURITY_ENCRYPTION_TRANSPORT	23
  105.37 -#define SO_SECURITY_ENCRYPTION_NETWORK		24
  105.38 -
  105.39 -#define SO_BINDTODEVICE	25
  105.40 -
  105.41 -/* Socket filtering */
  105.42 -#define SO_ATTACH_FILTER        26
  105.43 -#define SO_DETACH_FILTER        27
  105.44 -
  105.45 -#define SO_PEERNAME		28
  105.46 -#define SO_TIMESTAMP		29
  105.47 -#define SCM_TIMESTAMP		SO_TIMESTAMP
  105.48 -
  105.49 -#define SO_ACCEPTCONN		30
  105.50 -
  105.51 -/* Nasty libc5 fixup - bletch */
  105.52 -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
  105.53 -/* Socket types. */
  105.54 -#define SOCK_STREAM	1		/* stream (connection) socket	*/
  105.55 -#define SOCK_DGRAM	2		/* datagram (conn.less) socket	*/
  105.56 -#define SOCK_RAW	3		/* raw socket			*/
  105.57 -#define SOCK_RDM	4		/* reliably-delivered message	*/
  105.58 -#define SOCK_SEQPACKET	5		/* sequential packet socket	*/
  105.59 -#define SOCK_PACKET	10		/* linux specific way of	*/
  105.60 -					/* getting packets at the dev	*/
  105.61 -					/* level.  For writing rarp and	*/
  105.62 -					/* other similar things on the	*/
  105.63 -					/* user level.			*/
  105.64 -#define	SOCK_MAX	(SOCK_PACKET+1)
  105.65 -#endif
  105.66 -
  105.67 -#endif /* _ASM_SOCKET_H */
   106.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/sockios.h	Fri Mar 14 15:48:09 2003 +0000
   106.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   106.3 @@ -1,12 +0,0 @@
   106.4 -#ifndef __ARCH_I386_SOCKIOS__
   106.5 -#define __ARCH_I386_SOCKIOS__
   106.6 -
   106.7 -/* Socket-level I/O control calls. */
   106.8 -#define FIOSETOWN 	0x8901
   106.9 -#define SIOCSPGRP	0x8902
  106.10 -#define FIOGETOWN	0x8903
  106.11 -#define SIOCGPGRP	0x8904
  106.12 -#define SIOCATMARK	0x8905
  106.13 -#define SIOCGSTAMP	0x8906		/* Get stamp */
  106.14 -
  106.15 -#endif
   107.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/softirq.h	Fri Mar 14 15:48:09 2003 +0000
   107.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   107.3 @@ -1,48 +0,0 @@
   107.4 -#ifndef __ASM_SOFTIRQ_H
   107.5 -#define __ASM_SOFTIRQ_H
   107.6 -
   107.7 -#include <asm/atomic.h>
   107.8 -#include <asm/hardirq.h>
   107.9 -
  107.10 -#define __cpu_bh_enable(cpu) \
  107.11 -		do { barrier(); local_bh_count(cpu)--; } while (0)
  107.12 -#define cpu_bh_disable(cpu) \
  107.13 -		do { local_bh_count(cpu)++; barrier(); } while (0)
  107.14 -
  107.15 -#define local_bh_disable()	cpu_bh_disable(smp_processor_id())
  107.16 -#define __local_bh_enable()	__cpu_bh_enable(smp_processor_id())
  107.17 -
  107.18 -#define in_softirq() (local_bh_count(smp_processor_id()) != 0)
  107.19 -
  107.20 -/*
  107.21 - * NOTE: this assembly code assumes:
  107.22 - *
  107.23 - *    (char *)&local_bh_count - 8 == (char *)&softirq_pending
  107.24 - *
  107.25 - * If you change the offsets in irq_stat then you have to
  107.26 - * update this code as well.
  107.27 - */
  107.28 -#define local_bh_enable()						\
  107.29 -do {									\
  107.30 -	unsigned int *ptr = &local_bh_count(smp_processor_id());	\
  107.31 -									\
  107.32 -	barrier();							\
  107.33 -	if (!--*ptr)							\
  107.34 -		__asm__ __volatile__ (					\
  107.35 -			"cmpl $0, -8(%0);"				\
  107.36 -			"jnz 2f;"					\
  107.37 -			"1:;"						\
  107.38 -									\
  107.39 -			LOCK_SECTION_START("")				\
  107.40 -			"2: pushl %%eax; pushl %%ecx; pushl %%edx;"	\
  107.41 -			"call %c1;"					\
  107.42 -			"popl %%edx; popl %%ecx; popl %%eax;"		\
  107.43 -			"jmp 1b;"					\
  107.44 -			LOCK_SECTION_END				\
  107.45 -									\
  107.46 -		: /* no output */					\
  107.47 -		: "r" (ptr), "i" (do_softirq)				\
  107.48 -		/* no registers clobbered */ );				\
  107.49 -} while (0)
  107.50 -
  107.51 -#endif	/* __ASM_SOFTIRQ_H */
   108.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/spinlock.h	Fri Mar 14 15:48:09 2003 +0000
   108.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   108.3 @@ -1,212 +0,0 @@
   108.4 -#ifndef __ASM_SPINLOCK_H
   108.5 -#define __ASM_SPINLOCK_H
   108.6 -
   108.7 -#include <asm/atomic.h>
   108.8 -#include <asm/rwlock.h>
   108.9 -#include <asm/page.h>
  108.10 -#include <linux/config.h>
  108.11 -
  108.12 -extern int printk(const char * fmt, ...)
  108.13 -	__attribute__ ((format (printf, 1, 2)));
  108.14 -
  108.15 -/* It seems that people are forgetting to
  108.16 - * initialize their spinlocks properly, tsk tsk.
  108.17 - * Remember to turn this off in 2.4. -ben
  108.18 - */
  108.19 -#if defined(CONFIG_DEBUG_SPINLOCK)
  108.20 -#define SPINLOCK_DEBUG	1
  108.21 -#else
  108.22 -#define SPINLOCK_DEBUG	0
  108.23 -#endif
  108.24 -
  108.25 -/*
  108.26 - * Your basic SMP spinlocks, allowing only a single CPU anywhere
  108.27 - */
  108.28 -
  108.29 -typedef struct {
  108.30 -	volatile unsigned int lock;
  108.31 -#if SPINLOCK_DEBUG
  108.32 -	unsigned magic;
  108.33 -#endif
  108.34 -} spinlock_t;
  108.35 -
  108.36 -#define SPINLOCK_MAGIC	0xdead4ead
  108.37 -
  108.38 -#if SPINLOCK_DEBUG
  108.39 -#define SPINLOCK_MAGIC_INIT	, SPINLOCK_MAGIC
  108.40 -#else
  108.41 -#define SPINLOCK_MAGIC_INIT	/* */
  108.42 -#endif
  108.43 -
  108.44 -#define SPIN_LOCK_UNLOCKED (spinlock_t) { 1 SPINLOCK_MAGIC_INIT }
  108.45 -
  108.46 -#define spin_lock_init(x)	do { *(x) = SPIN_LOCK_UNLOCKED; } while(0)
  108.47 -
  108.48 -/*
  108.49 - * Simple spin lock operations.  There are two variants, one clears IRQ's
  108.50 - * on the local processor, one does not.
  108.51 - *
  108.52 - * We make no fairness assumptions. They have a cost.
  108.53 - */
  108.54 -
  108.55 -#define spin_is_locked(x)	(*(volatile signed char *)(&(x)->lock) <= 0)
  108.56 -#define spin_unlock_wait(x)	do { barrier(); } while(spin_is_locked(x))
  108.57 -
  108.58 -#define spin_lock_string \
  108.59 -	"\n1:\t" \
  108.60 -	"lock ; decb %0\n\t" \
  108.61 -	"js 2f\n" \
  108.62 -	LOCK_SECTION_START("") \
  108.63 -	"2:\t" \
  108.64 -	"cmpb $0,%0\n\t" \
  108.65 -	"rep;nop\n\t" \
  108.66 -	"jle 2b\n\t" \
  108.67 -	"jmp 1b\n" \
  108.68 -	LOCK_SECTION_END
  108.69 -
  108.70 -/*
  108.71 - * This works. Despite all the confusion.
  108.72 - * (except on PPro SMP or if we are using OOSTORE)
  108.73 - * (PPro errata 66, 92)
  108.74 - */
  108.75 - 
  108.76 -#if !defined(CONFIG_X86_OOSTORE) && !defined(CONFIG_X86_PPRO_FENCE)
  108.77 -
  108.78 -#define spin_unlock_string \
  108.79 -	"movb $1,%0" \
  108.80 -		:"=m" (lock->lock) : : "memory"
  108.81 -
  108.82 -
  108.83 -static inline void spin_unlock(spinlock_t *lock)
  108.84 -{
  108.85 -#if SPINLOCK_DEBUG
  108.86 -	if (lock->magic != SPINLOCK_MAGIC)
  108.87 -		BUG();
  108.88 -	if (!spin_is_locked(lock))
  108.89 -		BUG();
  108.90 -#endif
  108.91 -	__asm__ __volatile__(
  108.92 -		spin_unlock_string
  108.93 -	);
  108.94 -}
  108.95 -
  108.96 -#else
  108.97 -
  108.98 -#define spin_unlock_string \
  108.99 -	"xchgb %b0, %1" \
 108.100 -		:"=q" (oldval), "=m" (lock->lock) \
 108.101 -		:"0" (oldval) : "memory"
 108.102 -
 108.103 -static inline void spin_unlock(spinlock_t *lock)
 108.104 -{
 108.105 -	char oldval = 1;
 108.106 -#if SPINLOCK_DEBUG
 108.107 -	if (lock->magic != SPINLOCK_MAGIC)
 108.108 -		BUG();
 108.109 -	if (!spin_is_locked(lock))
 108.110 -		BUG();
 108.111 -#endif
 108.112 -	__asm__ __volatile__(
 108.113 -		spin_unlock_string
 108.114 -	);
 108.115 -}
 108.116 -
 108.117 -#endif
 108.118 -
 108.119 -static inline int spin_trylock(spinlock_t *lock)
 108.120 -{
 108.121 -	char oldval;
 108.122 -	__asm__ __volatile__(
 108.123 -		"xchgb %b0,%1"
 108.124 -		:"=q" (oldval), "=m" (lock->lock)
 108.125 -		:"0" (0) : "memory");
 108.126 -	return oldval > 0;
 108.127 -}
 108.128 -
 108.129 -static inline void spin_lock(spinlock_t *lock)
 108.130 -{
 108.131 -#if SPINLOCK_DEBUG
 108.132 -	__label__ here;
 108.133 -here:
 108.134 -	if (lock->magic != SPINLOCK_MAGIC) {
 108.135 -printk("eip: %p\n", &&here);
 108.136 -		BUG();
 108.137 -	}
 108.138 -#endif
 108.139 -	__asm__ __volatile__(
 108.140 -		spin_lock_string
 108.141 -		:"=m" (lock->lock) : : "memory");
 108.142 -}
 108.143 -
 108.144 -
 108.145 -/*
 108.146 - * Read-write spinlocks, allowing multiple readers
 108.147 - * but only one writer.
 108.148 - *
 108.149 - * NOTE! it is quite common to have readers in interrupts
 108.150 - * but no interrupt writers. For those circumstances we
 108.151 - * can "mix" irq-safe locks - any writer needs to get a
 108.152 - * irq-safe write-lock, but readers can get non-irqsafe
 108.153 - * read-locks.
 108.154 - */
 108.155 -typedef struct {
 108.156 -	volatile unsigned int lock;
 108.157 -#if SPINLOCK_DEBUG
 108.158 -	unsigned magic;
 108.159 -#endif
 108.160 -} rwlock_t;
 108.161 -
 108.162 -#define RWLOCK_MAGIC	0xdeaf1eed
 108.163 -
 108.164 -#if SPINLOCK_DEBUG
 108.165 -#define RWLOCK_MAGIC_INIT	, RWLOCK_MAGIC
 108.166 -#else
 108.167 -#define RWLOCK_MAGIC_INIT	/* */
 108.168 -#endif
 108.169 -
 108.170 -#define RW_LOCK_UNLOCKED (rwlock_t) { RW_LOCK_BIAS RWLOCK_MAGIC_INIT }
 108.171 -
 108.172 -#define rwlock_init(x)	do { *(x) = RW_LOCK_UNLOCKED; } while(0)
 108.173 -
 108.174 -/*
 108.175 - * On x86, we implement read-write locks as a 32-bit counter
 108.176 - * with the high bit (sign) being the "contended" bit.
 108.177 - *
 108.178 - * The inline assembly is non-obvious. Think about it.
 108.179 - *
 108.180 - * Changed to use the same technique as rw semaphores.  See
 108.181 - * semaphore.h for details.  -ben
 108.182 - */
 108.183 -/* the spinlock helpers are in arch/i386/kernel/semaphore.c */
 108.184 -
 108.185 -static inline void read_lock(rwlock_t *rw)
 108.186 -{
 108.187 -#if SPINLOCK_DEBUG
 108.188 -	if (rw->magic != RWLOCK_MAGIC)
 108.189 -		BUG();
 108.190 -#endif
 108.191 -	__build_read_lock(rw, "__read_lock_failed");
 108.192 -}
 108.193 -
 108.194 -static inline void write_lock(rwlock_t *rw)
 108.195 -{
 108.196 -#if SPINLOCK_DEBUG
 108.197 -	if (rw->magic != RWLOCK_MAGIC)
 108.198 -		BUG();
 108.199 -#endif
 108.200 -	__build_write_lock(rw, "__write_lock_failed");
 108.201 -}
 108.202 -
 108.203 -#define read_unlock(rw)		asm volatile("lock ; incl %0" :"=m" ((rw)->lock) : : "memory")
 108.204 -#define write_unlock(rw)	asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ",%0":"=m" ((rw)->lock) : : "memory")
 108.205 -
 108.206 -static inline int write_trylock(rwlock_t *lock)
 108.207 -{
 108.208 -	atomic_t *count = (atomic_t *)lock;
 108.209 -	if (atomic_sub_and_test(RW_LOCK_BIAS, count))
 108.210 -		return 1;
 108.211 -	atomic_add(RW_LOCK_BIAS, count);
 108.212 -	return 0;
 108.213 -}
 108.214 -
 108.215 -#endif /* __ASM_SPINLOCK_H */
   109.1 --- a/xenolinux-2.4.21-pre4-sparse/include/asm-xeno/stat.h	Fri Mar 14 15:48:09 2003 +0000
   109.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   109.3 @@ -1,78 +0,0 @@
   109.4 -#ifndef _I386_STAT_H
   109.5 -#define _I386_STAT_H
   109.6 -
   109.7 -struct __old_kernel_stat {
   109.8 -	unsigned short st_dev;
   109.9 -	unsigned short st_ino;
  109.10 -	unsigned short st_mode;
  109.11 -	unsigned short st_nlink;
  109.12 -	unsigned short st_uid;
  109.13 -	unsigned short st_gid;
  109.14 -	unsigned short st_rdev;
  109.15 -	unsigned long  st_size;
  109.16 -	unsigned long  st_atime;
  109.17 -	unsigned long  st_mtime;
  109.18 -	unsigned long  st_ctime;
  109.19 -};
  109.20 -
  109.21 -struct stat {
  109.22 -	unsigned short st_dev;
  109.23 -	unsigned short __pad1;
  109.24 -	unsigned long st_ino;
  109.25 -	unsigned short st_mode;
  109.26 -	unsigned short st_nlink;
  109.27 -	unsigned short st_uid;
  109.28 -	unsigned short st_gid;
  109.29 -	unsigned short st_rdev;
  109.30 -	unsigned short __pad2;
  109.31 -	unsigned long  st_size;
  109.32 -	unsigned long  st_blksize;
  109.33 -	unsigned long  st_blocks;
  109.34 -	unsigned long  st_atime;
  109.35 -	unsigned long  __unused1;
  109.36 -	unsigned long  st_mtime;
  109.37 -	unsigned long  __unused2;
  109.38 -	unsigned long  st_ctime;
  109.39 -	unsigned long  __unused3;
  109.40 -	unsigned long  __unused4;
  109.41 -	unsigned long  __unused5;
  109.42 -};
  109.43 -
  109.44 -/* This matches struct stat64 in glibc2.1, hence the absolutely
  109.45 - * insane amounts of padding around dev_t's.
  109.46 - */
  109.47 -struct stat64 {
  109.48 -	unsigned short	st_dev;
  109.49 -	unsigned char	__pad0[10];
  109.50 -
  109.51 -#define STAT64_HAS_BROKEN_ST_INO	1
  109.52 -	unsigned long	__st_ino