direct-io.hg

changeset 2329:370d1b1c5ac8

bitkeeper revision 1.1159.49.1 (412915f94Ju9wyp48cLKhK-yYaCqgA)

Upgrade to linux 2.4.27
author iap10@tetris.cl.cam.ac.uk
date Sun Aug 22 21:54:01 2004 +0000 (2004-08-22)
parents 9afec5bc14ae
children d5ce93aeedc5
files .rootkeys linux-2.4.26-xen-sparse/Makefile linux-2.4.26-xen-sparse/arch/xen/Makefile linux-2.4.26-xen-sparse/arch/xen/boot/Makefile linux-2.4.26-xen-sparse/arch/xen/config.in linux-2.4.26-xen-sparse/arch/xen/defconfig-xen0 linux-2.4.26-xen-sparse/arch/xen/defconfig-xenU linux-2.4.26-xen-sparse/arch/xen/drivers/balloon/Makefile linux-2.4.26-xen-sparse/arch/xen/drivers/balloon/balloon.c linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/Makefile linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/backend/Makefile linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/frontend/Makefile linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/frontend/common.h linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/frontend/vbd.c linux-2.4.26-xen-sparse/arch/xen/drivers/console/Makefile linux-2.4.26-xen-sparse/arch/xen/drivers/dom0/Makefile linux-2.4.26-xen-sparse/arch/xen/drivers/evtchn/Makefile linux-2.4.26-xen-sparse/arch/xen/drivers/netif/Makefile linux-2.4.26-xen-sparse/arch/xen/drivers/netif/backend/Makefile linux-2.4.26-xen-sparse/arch/xen/drivers/netif/frontend/Makefile linux-2.4.26-xen-sparse/arch/xen/kernel/Makefile linux-2.4.26-xen-sparse/arch/xen/kernel/entry.S linux-2.4.26-xen-sparse/arch/xen/kernel/head.S linux-2.4.26-xen-sparse/arch/xen/kernel/i386_ksyms.c linux-2.4.26-xen-sparse/arch/xen/kernel/irq.c linux-2.4.26-xen-sparse/arch/xen/kernel/ldt.c linux-2.4.26-xen-sparse/arch/xen/kernel/pci-pc.c linux-2.4.26-xen-sparse/arch/xen/kernel/process.c linux-2.4.26-xen-sparse/arch/xen/kernel/setup.c linux-2.4.26-xen-sparse/arch/xen/kernel/signal.c linux-2.4.26-xen-sparse/arch/xen/kernel/time.c linux-2.4.26-xen-sparse/arch/xen/kernel/traps.c linux-2.4.26-xen-sparse/arch/xen/lib/Makefile linux-2.4.26-xen-sparse/arch/xen/lib/delay.c linux-2.4.26-xen-sparse/arch/xen/mm/Makefile linux-2.4.26-xen-sparse/arch/xen/mm/fault.c linux-2.4.26-xen-sparse/arch/xen/mm/init.c linux-2.4.26-xen-sparse/arch/xen/mm/ioremap.c linux-2.4.26-xen-sparse/arch/xen/vmlinux.lds linux-2.4.26-xen-sparse/drivers/block/ll_rw_blk.c linux-2.4.26-xen-sparse/drivers/char/Makefile linux-2.4.26-xen-sparse/drivers/char/mem.c linux-2.4.26-xen-sparse/drivers/char/tty_io.c linux-2.4.26-xen-sparse/drivers/scsi/aic7xxx/Makefile linux-2.4.26-xen-sparse/fs/exec.c linux-2.4.26-xen-sparse/include/asm-xen/bugs.h linux-2.4.26-xen-sparse/include/asm-xen/desc.h linux-2.4.26-xen-sparse/include/asm-xen/fixmap.h linux-2.4.26-xen-sparse/include/asm-xen/highmem.h linux-2.4.26-xen-sparse/include/asm-xen/hw_irq.h linux-2.4.26-xen-sparse/include/asm-xen/io.h linux-2.4.26-xen-sparse/include/asm-xen/irq.h linux-2.4.26-xen-sparse/include/asm-xen/keyboard.h linux-2.4.26-xen-sparse/include/asm-xen/mmu_context.h linux-2.4.26-xen-sparse/include/asm-xen/module.h linux-2.4.26-xen-sparse/include/asm-xen/msr.h linux-2.4.26-xen-sparse/include/asm-xen/page.h linux-2.4.26-xen-sparse/include/asm-xen/pci.h linux-2.4.26-xen-sparse/include/asm-xen/pgalloc.h linux-2.4.26-xen-sparse/include/asm-xen/pgtable-2level.h linux-2.4.26-xen-sparse/include/asm-xen/pgtable.h linux-2.4.26-xen-sparse/include/asm-xen/processor.h linux-2.4.26-xen-sparse/include/asm-xen/queues.h linux-2.4.26-xen-sparse/include/asm-xen/segment.h linux-2.4.26-xen-sparse/include/asm-xen/smp.h linux-2.4.26-xen-sparse/include/asm-xen/synch_bitops.h linux-2.4.26-xen-sparse/include/asm-xen/system.h linux-2.4.26-xen-sparse/include/asm-xen/vga.h linux-2.4.26-xen-sparse/include/asm-xen/xor.h linux-2.4.26-xen-sparse/include/linux/blk.h linux-2.4.26-xen-sparse/include/linux/mm.h linux-2.4.26-xen-sparse/include/linux/sched.h linux-2.4.26-xen-sparse/include/linux/skbuff.h linux-2.4.26-xen-sparse/include/linux/timer.h linux-2.4.26-xen-sparse/kernel/time.c linux-2.4.26-xen-sparse/kernel/timer.c linux-2.4.26-xen-sparse/mkbuildtree linux-2.4.26-xen-sparse/mm/highmem.c linux-2.4.26-xen-sparse/mm/memory.c linux-2.4.26-xen-sparse/mm/mprotect.c linux-2.4.26-xen-sparse/mm/mremap.c linux-2.4.26-xen-sparse/mm/page_alloc.c linux-2.4.26-xen-sparse/mm/swapfile.c linux-2.4.26-xen-sparse/mm/vmalloc.c linux-2.4.27-xen-sparse/Makefile linux-2.4.27-xen-sparse/arch/xen/Makefile linux-2.4.27-xen-sparse/arch/xen/boot/Makefile linux-2.4.27-xen-sparse/arch/xen/config.in linux-2.4.27-xen-sparse/arch/xen/defconfig-xen0 linux-2.4.27-xen-sparse/arch/xen/defconfig-xenU linux-2.4.27-xen-sparse/arch/xen/drivers/balloon/Makefile linux-2.4.27-xen-sparse/arch/xen/drivers/balloon/balloon.c linux-2.4.27-xen-sparse/arch/xen/drivers/blkif/Makefile linux-2.4.27-xen-sparse/arch/xen/drivers/blkif/backend/Makefile linux-2.4.27-xen-sparse/arch/xen/drivers/blkif/frontend/Makefile linux-2.4.27-xen-sparse/arch/xen/drivers/blkif/frontend/common.h linux-2.4.27-xen-sparse/arch/xen/drivers/blkif/frontend/vbd.c linux-2.4.27-xen-sparse/arch/xen/drivers/console/Makefile linux-2.4.27-xen-sparse/arch/xen/drivers/dom0/Makefile linux-2.4.27-xen-sparse/arch/xen/drivers/evtchn/Makefile linux-2.4.27-xen-sparse/arch/xen/drivers/netif/Makefile linux-2.4.27-xen-sparse/arch/xen/drivers/netif/backend/Makefile linux-2.4.27-xen-sparse/arch/xen/drivers/netif/frontend/Makefile linux-2.4.27-xen-sparse/arch/xen/kernel/Makefile linux-2.4.27-xen-sparse/arch/xen/kernel/entry.S linux-2.4.27-xen-sparse/arch/xen/kernel/head.S linux-2.4.27-xen-sparse/arch/xen/kernel/i386_ksyms.c linux-2.4.27-xen-sparse/arch/xen/kernel/irq.c linux-2.4.27-xen-sparse/arch/xen/kernel/ldt.c linux-2.4.27-xen-sparse/arch/xen/kernel/pci-pc.c linux-2.4.27-xen-sparse/arch/xen/kernel/process.c linux-2.4.27-xen-sparse/arch/xen/kernel/setup.c linux-2.4.27-xen-sparse/arch/xen/kernel/signal.c linux-2.4.27-xen-sparse/arch/xen/kernel/time.c linux-2.4.27-xen-sparse/arch/xen/kernel/traps.c linux-2.4.27-xen-sparse/arch/xen/lib/Makefile linux-2.4.27-xen-sparse/arch/xen/lib/delay.c linux-2.4.27-xen-sparse/arch/xen/mm/Makefile linux-2.4.27-xen-sparse/arch/xen/mm/fault.c linux-2.4.27-xen-sparse/arch/xen/mm/init.c linux-2.4.27-xen-sparse/arch/xen/mm/ioremap.c linux-2.4.27-xen-sparse/arch/xen/vmlinux.lds linux-2.4.27-xen-sparse/drivers/block/ll_rw_blk.c linux-2.4.27-xen-sparse/drivers/char/Makefile linux-2.4.27-xen-sparse/drivers/char/mem.c linux-2.4.27-xen-sparse/drivers/char/tty_io.c linux-2.4.27-xen-sparse/drivers/scsi/aic7xxx/Makefile linux-2.4.27-xen-sparse/fs/exec.c linux-2.4.27-xen-sparse/include/asm-xen/bugs.h linux-2.4.27-xen-sparse/include/asm-xen/desc.h linux-2.4.27-xen-sparse/include/asm-xen/fixmap.h linux-2.4.27-xen-sparse/include/asm-xen/highmem.h linux-2.4.27-xen-sparse/include/asm-xen/hw_irq.h linux-2.4.27-xen-sparse/include/asm-xen/io.h linux-2.4.27-xen-sparse/include/asm-xen/irq.h linux-2.4.27-xen-sparse/include/asm-xen/keyboard.h linux-2.4.27-xen-sparse/include/asm-xen/mmu_context.h linux-2.4.27-xen-sparse/include/asm-xen/module.h linux-2.4.27-xen-sparse/include/asm-xen/msr.h linux-2.4.27-xen-sparse/include/asm-xen/page.h linux-2.4.27-xen-sparse/include/asm-xen/pci.h linux-2.4.27-xen-sparse/include/asm-xen/pgalloc.h linux-2.4.27-xen-sparse/include/asm-xen/pgtable-2level.h linux-2.4.27-xen-sparse/include/asm-xen/pgtable.h linux-2.4.27-xen-sparse/include/asm-xen/processor.h linux-2.4.27-xen-sparse/include/asm-xen/queues.h linux-2.4.27-xen-sparse/include/asm-xen/segment.h linux-2.4.27-xen-sparse/include/asm-xen/smp.h linux-2.4.27-xen-sparse/include/asm-xen/synch_bitops.h linux-2.4.27-xen-sparse/include/asm-xen/system.h linux-2.4.27-xen-sparse/include/asm-xen/vga.h linux-2.4.27-xen-sparse/include/asm-xen/xor.h linux-2.4.27-xen-sparse/include/linux/blk.h linux-2.4.27-xen-sparse/include/linux/mm.h linux-2.4.27-xen-sparse/include/linux/sched.h linux-2.4.27-xen-sparse/include/linux/skbuff.h linux-2.4.27-xen-sparse/include/linux/timer.h linux-2.4.27-xen-sparse/kernel/time.c linux-2.4.27-xen-sparse/kernel/timer.c linux-2.4.27-xen-sparse/mkbuildtree linux-2.4.27-xen-sparse/mm/highmem.c linux-2.4.27-xen-sparse/mm/memory.c linux-2.4.27-xen-sparse/mm/mprotect.c linux-2.4.27-xen-sparse/mm/mremap.c linux-2.4.27-xen-sparse/mm/page_alloc.c linux-2.4.27-xen-sparse/mm/swapfile.c linux-2.4.27-xen-sparse/mm/vmalloc.c
line diff
     1.1 --- a/.rootkeys	Sat Aug 21 10:28:38 2004 +0000
     1.2 +++ b/.rootkeys	Sun Aug 22 21:54:01 2004 +0000
     1.3 @@ -42,89 +42,89 @@ 3f815145AYE58Kpmsj5U7oHDpVDZJA extras/mi
     1.4  3f815145CB8XdPUqsmhAjSDFuwOoqA extras/mini-os/mm.c
     1.5  3f815145vGYx1WY79voKkZB9yKwJKQ extras/mini-os/time.c
     1.6  3f815145xlKBAQmal9oces3G_Mvxqw extras/mini-os/traps.c
     1.7 -3e5a4e6589G-U42lFKs43plskXoFxQ linux-2.4.26-xen-sparse/Makefile
     1.8 -3e5a4e65IEPjnWPZ5w3TxS5scV8Ewg linux-2.4.26-xen-sparse/arch/xen/Makefile
     1.9 -3e5a4e65n-KhsEAs-A4ULiStBp-r6w linux-2.4.26-xen-sparse/arch/xen/boot/Makefile
    1.10 -3e5a4e65OV_j_DBtjzt5vej771AJsA linux-2.4.26-xen-sparse/arch/xen/config.in
    1.11 -40648526SxcA4lGIHB_k7ID8VlRSzw linux-2.4.26-xen-sparse/arch/xen/defconfig-xen0
    1.12 -40c73c77QesbL7eIvG-fJGAtVwhGRg linux-2.4.26-xen-sparse/arch/xen/defconfig-xenU
    1.13 -3e6377f5xwPfYZkPHPrDbEq1PRN7uQ linux-2.4.26-xen-sparse/arch/xen/drivers/balloon/Makefile
    1.14 -3e6377f8Me8IqtvEhb70XFgOvqQH7A linux-2.4.26-xen-sparse/arch/xen/drivers/balloon/balloon.c
    1.15 -4083dc16z0jvZEH4PiVDbDRreaNp6w linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/Makefile
    1.16 -4083dc16KQus88a4U3uCV6qVCA6_8Q linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/backend/Makefile
    1.17 -4075806dI5kfeMD5RV-DA0PYoThx_w linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/frontend/Makefile
    1.18 -4075806d4-j7vN0Mn0bklI1cRUX1vQ linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/frontend/common.h
    1.19 -4075806dibjCcfuXv6CINMhxWTw3jQ linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/frontend/vbd.c
    1.20 -3e5a4e65G3e2s0ghPMgiJ-gBTUJ0uQ linux-2.4.26-xen-sparse/arch/xen/drivers/console/Makefile
    1.21 -3e5a4e656nfFISThfbyXQOA6HN6YHw linux-2.4.26-xen-sparse/arch/xen/drivers/dom0/Makefile
    1.22 -40420a6ebRqDjufoN1WSJvolEW2Wjw linux-2.4.26-xen-sparse/arch/xen/drivers/evtchn/Makefile
    1.23 -4083dc16-Kd5y9psK_yk161sme5j5Q linux-2.4.26-xen-sparse/arch/xen/drivers/netif/Makefile
    1.24 -4083dc16UmHXxS9g_UFVnkUpN-oP2Q linux-2.4.26-xen-sparse/arch/xen/drivers/netif/backend/Makefile
    1.25 -405853f2wg7JXZJNltspMwOZJklxgw linux-2.4.26-xen-sparse/arch/xen/drivers/netif/frontend/Makefile
    1.26 -3e5a4e65lWzkiPXsZdzPt2RNnJGG1g linux-2.4.26-xen-sparse/arch/xen/kernel/Makefile
    1.27 -3e5a4e65_hqfuxtGG8IUy6wRM86Ecg linux-2.4.26-xen-sparse/arch/xen/kernel/entry.S
    1.28 -3e5a4e65Hy_1iUvMTPsNqGNXd9uFpg linux-2.4.26-xen-sparse/arch/xen/kernel/head.S
    1.29 -3e5a4e65RMGcuA-HCn3-wNx3fFQwdg linux-2.4.26-xen-sparse/arch/xen/kernel/i386_ksyms.c
    1.30 -3e5a4e653U6cELGv528IxOLHvCq8iA linux-2.4.26-xen-sparse/arch/xen/kernel/irq.c
    1.31 -3e5a4e65muT6SU3ck47IP87Q7Ti5hA linux-2.4.26-xen-sparse/arch/xen/kernel/ldt.c
    1.32 -4051db95N9N99FjsRwi49YKUNHWI8A linux-2.4.26-xen-sparse/arch/xen/kernel/pci-pc.c
    1.33 -3e5a4e65IGt3WwQDNiL4h-gYWgNTWQ linux-2.4.26-xen-sparse/arch/xen/kernel/process.c
    1.34 -3e5a4e66tR-qJMLj3MppcKqmvuI2XQ linux-2.4.26-xen-sparse/arch/xen/kernel/setup.c
    1.35 -3e5a4e66fWSTagLGU2P8BGFGRjhDiw linux-2.4.26-xen-sparse/arch/xen/kernel/signal.c
    1.36 -3e5a4e66N__lUXNwzQ-eADRzK9LXuQ linux-2.4.26-xen-sparse/arch/xen/kernel/time.c
    1.37 -3e5a4e66aHCbQ_F5QZ8VeyikLmuRZQ linux-2.4.26-xen-sparse/arch/xen/kernel/traps.c
    1.38 -3e5a4e66-9_NczrVMbuQkoSLyXckIw linux-2.4.26-xen-sparse/arch/xen/lib/Makefile
    1.39 -3e5a4e6637ZDk0BvFEC-aFQs599-ng linux-2.4.26-xen-sparse/arch/xen/lib/delay.c
    1.40 -3e5a4e66croVgpcJyJuF2ycQw0HuJw linux-2.4.26-xen-sparse/arch/xen/mm/Makefile
    1.41 -3e5a4e66l8Q5Tv-6B3lQIRmaVbFPzg linux-2.4.26-xen-sparse/arch/xen/mm/fault.c
    1.42 -3e5a4e661gLzzff25pJooKIIWe7IWg linux-2.4.26-xen-sparse/arch/xen/mm/init.c
    1.43 -3f0bed43UUdQichXAiVNrjV-y2Kzcg linux-2.4.26-xen-sparse/arch/xen/mm/ioremap.c
    1.44 -3e5a4e66qRlSTcjafidMB6ulECADvg linux-2.4.26-xen-sparse/arch/xen/vmlinux.lds
    1.45 -3e5a4e66mrtlmV75L1tjKDg8RaM5gA linux-2.4.26-xen-sparse/drivers/block/ll_rw_blk.c
    1.46 -40d70c24-Dy2HUMrwSZagfXvAPnI4w linux-2.4.26-xen-sparse/drivers/char/Makefile
    1.47 -3f108aeaLcGDgQdFAANLTUEid0a05w linux-2.4.26-xen-sparse/drivers/char/mem.c
    1.48 -3e5a4e66rw65CxyolW9PKz4GG42RcA linux-2.4.26-xen-sparse/drivers/char/tty_io.c
    1.49 -40c9c0c1pPwYE3-4i-oI3ubUu7UgvQ linux-2.4.26-xen-sparse/drivers/scsi/aic7xxx/Makefile
    1.50 -3e5a4e669uzIE54VwucPYtGwXLAbzA linux-2.4.26-xen-sparse/fs/exec.c
    1.51 -3e5a4e66wbeCpsJgVf_U8Jde-CNcsA linux-2.4.26-xen-sparse/include/asm-xen/bugs.h
    1.52 -3e5a4e66HdSkvIV6SJ1evG_xmTmXHA linux-2.4.26-xen-sparse/include/asm-xen/desc.h
    1.53 -3e5a4e66SYp_UpAVcF8Lc1wa3Qtgzw linux-2.4.26-xen-sparse/include/asm-xen/fixmap.h
    1.54 -406aeeaaQvl4RNtmd9hDEugBURbFpQ linux-2.4.26-xen-sparse/include/asm-xen/highmem.h
    1.55 -3e5a4e67YtcyDLQsShhCfQwPSELfvA linux-2.4.26-xen-sparse/include/asm-xen/hw_irq.h
    1.56 -4060044fVx7-tokvNLKBf_6qBB4lqQ linux-2.4.26-xen-sparse/include/asm-xen/io.h
    1.57 -3e5a4e673p7PEOyHFm3nHkYX6HQYBg linux-2.4.26-xen-sparse/include/asm-xen/irq.h
    1.58 -40d70c240tW7TWArl1VUgIFH2nVO1A linux-2.4.26-xen-sparse/include/asm-xen/keyboard.h
    1.59 -3e5a4e678ddsQOpbSiRdy1GRcDc9WA linux-2.4.26-xen-sparse/include/asm-xen/mmu_context.h
    1.60 -40d06e5b2YWInUX1Xv9amVANwd_2Xg linux-2.4.26-xen-sparse/include/asm-xen/module.h
    1.61 -3f8707e7ZmZ6TxyX0ZUEfvhA2Pb_xQ linux-2.4.26-xen-sparse/include/asm-xen/msr.h
    1.62 -3e5a4e67mnQfh-R8KcQCaVo2Oho6yg linux-2.4.26-xen-sparse/include/asm-xen/page.h
    1.63 -409ba2e7ZfV5hqTvIzxLtpClnxtIzg linux-2.4.26-xen-sparse/include/asm-xen/pci.h
    1.64 -3e5a4e67uTYU5oEnIDjxuaez8njjqg linux-2.4.26-xen-sparse/include/asm-xen/pgalloc.h
    1.65 -3e5a4e67X7JyupgdYkgDX19Huj2sAw linux-2.4.26-xen-sparse/include/asm-xen/pgtable-2level.h
    1.66 -3e5a4e67gr4NLGtQ5CvSLimMYZlkOA linux-2.4.26-xen-sparse/include/asm-xen/pgtable.h
    1.67 -3e5a4e676uK4xErTBDH6XJREn9LSyg linux-2.4.26-xen-sparse/include/asm-xen/processor.h
    1.68 -41224663YBCUMX1kVo_HRUtgaHTi7w linux-2.4.26-xen-sparse/include/asm-xen/queues.h
    1.69 -3e5a4e68uJz-xI0IBVMD7xRLQKJDFg linux-2.4.26-xen-sparse/include/asm-xen/segment.h
    1.70 -3e5a4e68Nfdh6QcOKUTGCaYkf2LmYA linux-2.4.26-xen-sparse/include/asm-xen/smp.h
    1.71 -4062f7e2PzFOUGT0PaE7A0VprTU3JQ linux-2.4.26-xen-sparse/include/asm-xen/synch_bitops.h
    1.72 -3e5a4e68mTr0zcp9SXDbnd-XLrrfxw linux-2.4.26-xen-sparse/include/asm-xen/system.h
    1.73 -3f1056a9L_kqHcFheV00KbKBzv9j5w linux-2.4.26-xen-sparse/include/asm-xen/vga.h
    1.74 -40659defgWA92arexpMGn8X3QMDj3w linux-2.4.26-xen-sparse/include/asm-xen/xor.h
    1.75 -3f056927gMHl7mWB89rb73JahbhQIA linux-2.4.26-xen-sparse/include/linux/blk.h
    1.76 -4124f66fPHG6yvB_vXmesjvzrJ3yMg linux-2.4.26-xen-sparse/include/linux/mm.h
    1.77 -401c0590D_kwJDU59X8NyvqSv_Cl2A linux-2.4.26-xen-sparse/include/linux/sched.h
    1.78 -40a248afgI0_JKthdYAe8beVfXSTpQ linux-2.4.26-xen-sparse/include/linux/skbuff.h
    1.79 -401c0592pLrp_aCbQRo9GXiYQQaVVA linux-2.4.26-xen-sparse/include/linux/timer.h
    1.80 -3f9d4b44247udoqWEgFkaHiWv6Uvyg linux-2.4.26-xen-sparse/kernel/time.c
    1.81 -401c059bjLBFYHRD4Py2uM3eA1D4zQ linux-2.4.26-xen-sparse/kernel/timer.c
    1.82 -3e6e7c1efbQe93xCvOpOVCnXTMmQ5w linux-2.4.26-xen-sparse/mkbuildtree
    1.83 -406aeeafkrnCuIVWLFv3kfn4uAD5Eg linux-2.4.26-xen-sparse/mm/highmem.c
    1.84 -3e5a4e68GxCIaFH4sy01v1wjapetaA linux-2.4.26-xen-sparse/mm/memory.c
    1.85 -3f108af5VxPkLv13tXpXgoRKALQtXQ linux-2.4.26-xen-sparse/mm/mprotect.c
    1.86 -3e5a4e681xMPdF9xCMwpyfuYMySU5g linux-2.4.26-xen-sparse/mm/mremap.c
    1.87 -409ba2e7akOFqQUg6Qyg2s28xcXiMg linux-2.4.26-xen-sparse/mm/page_alloc.c
    1.88 -3e5a4e683HKVU-sxtagrDasRB8eBVw linux-2.4.26-xen-sparse/mm/swapfile.c
    1.89 -41180721bNns9Na7w1nJ0ZVt8bhUNA linux-2.4.26-xen-sparse/mm/vmalloc.c
    1.90 +3e5a4e6589G-U42lFKs43plskXoFxQ linux-2.4.27-xen-sparse/Makefile
    1.91 +3e5a4e65IEPjnWPZ5w3TxS5scV8Ewg linux-2.4.27-xen-sparse/arch/xen/Makefile
    1.92 +3e5a4e65n-KhsEAs-A4ULiStBp-r6w linux-2.4.27-xen-sparse/arch/xen/boot/Makefile
    1.93 +3e5a4e65OV_j_DBtjzt5vej771AJsA linux-2.4.27-xen-sparse/arch/xen/config.in
    1.94 +40648526SxcA4lGIHB_k7ID8VlRSzw linux-2.4.27-xen-sparse/arch/xen/defconfig-xen0
    1.95 +40c73c77QesbL7eIvG-fJGAtVwhGRg linux-2.4.27-xen-sparse/arch/xen/defconfig-xenU
    1.96 +3e6377f5xwPfYZkPHPrDbEq1PRN7uQ linux-2.4.27-xen-sparse/arch/xen/drivers/balloon/Makefile
    1.97 +3e6377f8Me8IqtvEhb70XFgOvqQH7A linux-2.4.27-xen-sparse/arch/xen/drivers/balloon/balloon.c
    1.98 +4083dc16z0jvZEH4PiVDbDRreaNp6w linux-2.4.27-xen-sparse/arch/xen/drivers/blkif/Makefile
    1.99 +4083dc16KQus88a4U3uCV6qVCA6_8Q linux-2.4.27-xen-sparse/arch/xen/drivers/blkif/backend/Makefile
   1.100 +4075806dI5kfeMD5RV-DA0PYoThx_w linux-2.4.27-xen-sparse/arch/xen/drivers/blkif/frontend/Makefile
   1.101 +4075806d4-j7vN0Mn0bklI1cRUX1vQ linux-2.4.27-xen-sparse/arch/xen/drivers/blkif/frontend/common.h
   1.102 +4075806dibjCcfuXv6CINMhxWTw3jQ linux-2.4.27-xen-sparse/arch/xen/drivers/blkif/frontend/vbd.c
   1.103 +3e5a4e65G3e2s0ghPMgiJ-gBTUJ0uQ linux-2.4.27-xen-sparse/arch/xen/drivers/console/Makefile
   1.104 +3e5a4e656nfFISThfbyXQOA6HN6YHw linux-2.4.27-xen-sparse/arch/xen/drivers/dom0/Makefile
   1.105 +40420a6ebRqDjufoN1WSJvolEW2Wjw linux-2.4.27-xen-sparse/arch/xen/drivers/evtchn/Makefile
   1.106 +4083dc16-Kd5y9psK_yk161sme5j5Q linux-2.4.27-xen-sparse/arch/xen/drivers/netif/Makefile
   1.107 +4083dc16UmHXxS9g_UFVnkUpN-oP2Q linux-2.4.27-xen-sparse/arch/xen/drivers/netif/backend/Makefile
   1.108 +405853f2wg7JXZJNltspMwOZJklxgw linux-2.4.27-xen-sparse/arch/xen/drivers/netif/frontend/Makefile
   1.109 +3e5a4e65lWzkiPXsZdzPt2RNnJGG1g linux-2.4.27-xen-sparse/arch/xen/kernel/Makefile
   1.110 +3e5a4e65_hqfuxtGG8IUy6wRM86Ecg linux-2.4.27-xen-sparse/arch/xen/kernel/entry.S
   1.111 +3e5a4e65Hy_1iUvMTPsNqGNXd9uFpg linux-2.4.27-xen-sparse/arch/xen/kernel/head.S
   1.112 +3e5a4e65RMGcuA-HCn3-wNx3fFQwdg linux-2.4.27-xen-sparse/arch/xen/kernel/i386_ksyms.c
   1.113 +3e5a4e653U6cELGv528IxOLHvCq8iA linux-2.4.27-xen-sparse/arch/xen/kernel/irq.c
   1.114 +3e5a4e65muT6SU3ck47IP87Q7Ti5hA linux-2.4.27-xen-sparse/arch/xen/kernel/ldt.c
   1.115 +4051db95N9N99FjsRwi49YKUNHWI8A linux-2.4.27-xen-sparse/arch/xen/kernel/pci-pc.c
   1.116 +3e5a4e65IGt3WwQDNiL4h-gYWgNTWQ linux-2.4.27-xen-sparse/arch/xen/kernel/process.c
   1.117 +3e5a4e66tR-qJMLj3MppcKqmvuI2XQ linux-2.4.27-xen-sparse/arch/xen/kernel/setup.c
   1.118 +3e5a4e66fWSTagLGU2P8BGFGRjhDiw linux-2.4.27-xen-sparse/arch/xen/kernel/signal.c
   1.119 +3e5a4e66N__lUXNwzQ-eADRzK9LXuQ linux-2.4.27-xen-sparse/arch/xen/kernel/time.c
   1.120 +3e5a4e66aHCbQ_F5QZ8VeyikLmuRZQ linux-2.4.27-xen-sparse/arch/xen/kernel/traps.c
   1.121 +3e5a4e66-9_NczrVMbuQkoSLyXckIw linux-2.4.27-xen-sparse/arch/xen/lib/Makefile
   1.122 +3e5a4e6637ZDk0BvFEC-aFQs599-ng linux-2.4.27-xen-sparse/arch/xen/lib/delay.c
   1.123 +3e5a4e66croVgpcJyJuF2ycQw0HuJw linux-2.4.27-xen-sparse/arch/xen/mm/Makefile
   1.124 +3e5a4e66l8Q5Tv-6B3lQIRmaVbFPzg linux-2.4.27-xen-sparse/arch/xen/mm/fault.c
   1.125 +3e5a4e661gLzzff25pJooKIIWe7IWg linux-2.4.27-xen-sparse/arch/xen/mm/init.c
   1.126 +3f0bed43UUdQichXAiVNrjV-y2Kzcg linux-2.4.27-xen-sparse/arch/xen/mm/ioremap.c
   1.127 +3e5a4e66qRlSTcjafidMB6ulECADvg linux-2.4.27-xen-sparse/arch/xen/vmlinux.lds
   1.128 +3e5a4e66mrtlmV75L1tjKDg8RaM5gA linux-2.4.27-xen-sparse/drivers/block/ll_rw_blk.c
   1.129 +40d70c24-Dy2HUMrwSZagfXvAPnI4w linux-2.4.27-xen-sparse/drivers/char/Makefile
   1.130 +3f108aeaLcGDgQdFAANLTUEid0a05w linux-2.4.27-xen-sparse/drivers/char/mem.c
   1.131 +3e5a4e66rw65CxyolW9PKz4GG42RcA linux-2.4.27-xen-sparse/drivers/char/tty_io.c
   1.132 +40c9c0c1pPwYE3-4i-oI3ubUu7UgvQ linux-2.4.27-xen-sparse/drivers/scsi/aic7xxx/Makefile
   1.133 +3e5a4e669uzIE54VwucPYtGwXLAbzA linux-2.4.27-xen-sparse/fs/exec.c
   1.134 +3e5a4e66wbeCpsJgVf_U8Jde-CNcsA linux-2.4.27-xen-sparse/include/asm-xen/bugs.h
   1.135 +3e5a4e66HdSkvIV6SJ1evG_xmTmXHA linux-2.4.27-xen-sparse/include/asm-xen/desc.h
   1.136 +3e5a4e66SYp_UpAVcF8Lc1wa3Qtgzw linux-2.4.27-xen-sparse/include/asm-xen/fixmap.h
   1.137 +406aeeaaQvl4RNtmd9hDEugBURbFpQ linux-2.4.27-xen-sparse/include/asm-xen/highmem.h
   1.138 +3e5a4e67YtcyDLQsShhCfQwPSELfvA linux-2.4.27-xen-sparse/include/asm-xen/hw_irq.h
   1.139 +4060044fVx7-tokvNLKBf_6qBB4lqQ linux-2.4.27-xen-sparse/include/asm-xen/io.h
   1.140 +3e5a4e673p7PEOyHFm3nHkYX6HQYBg linux-2.4.27-xen-sparse/include/asm-xen/irq.h
   1.141 +40d70c240tW7TWArl1VUgIFH2nVO1A linux-2.4.27-xen-sparse/include/asm-xen/keyboard.h
   1.142 +3e5a4e678ddsQOpbSiRdy1GRcDc9WA linux-2.4.27-xen-sparse/include/asm-xen/mmu_context.h
   1.143 +40d06e5b2YWInUX1Xv9amVANwd_2Xg linux-2.4.27-xen-sparse/include/asm-xen/module.h
   1.144 +3f8707e7ZmZ6TxyX0ZUEfvhA2Pb_xQ linux-2.4.27-xen-sparse/include/asm-xen/msr.h
   1.145 +3e5a4e67mnQfh-R8KcQCaVo2Oho6yg linux-2.4.27-xen-sparse/include/asm-xen/page.h
   1.146 +409ba2e7ZfV5hqTvIzxLtpClnxtIzg linux-2.4.27-xen-sparse/include/asm-xen/pci.h
   1.147 +3e5a4e67uTYU5oEnIDjxuaez8njjqg linux-2.4.27-xen-sparse/include/asm-xen/pgalloc.h
   1.148 +3e5a4e67X7JyupgdYkgDX19Huj2sAw linux-2.4.27-xen-sparse/include/asm-xen/pgtable-2level.h
   1.149 +3e5a4e67gr4NLGtQ5CvSLimMYZlkOA linux-2.4.27-xen-sparse/include/asm-xen/pgtable.h
   1.150 +3e5a4e676uK4xErTBDH6XJREn9LSyg linux-2.4.27-xen-sparse/include/asm-xen/processor.h
   1.151 +41224663YBCUMX1kVo_HRUtgaHTi7w linux-2.4.27-xen-sparse/include/asm-xen/queues.h
   1.152 +3e5a4e68uJz-xI0IBVMD7xRLQKJDFg linux-2.4.27-xen-sparse/include/asm-xen/segment.h
   1.153 +3e5a4e68Nfdh6QcOKUTGCaYkf2LmYA linux-2.4.27-xen-sparse/include/asm-xen/smp.h
   1.154 +4062f7e2PzFOUGT0PaE7A0VprTU3JQ linux-2.4.27-xen-sparse/include/asm-xen/synch_bitops.h
   1.155 +3e5a4e68mTr0zcp9SXDbnd-XLrrfxw linux-2.4.27-xen-sparse/include/asm-xen/system.h
   1.156 +3f1056a9L_kqHcFheV00KbKBzv9j5w linux-2.4.27-xen-sparse/include/asm-xen/vga.h
   1.157 +40659defgWA92arexpMGn8X3QMDj3w linux-2.4.27-xen-sparse/include/asm-xen/xor.h
   1.158 +3f056927gMHl7mWB89rb73JahbhQIA linux-2.4.27-xen-sparse/include/linux/blk.h
   1.159 +4124f66fPHG6yvB_vXmesjvzrJ3yMg linux-2.4.27-xen-sparse/include/linux/mm.h
   1.160 +401c0590D_kwJDU59X8NyvqSv_Cl2A linux-2.4.27-xen-sparse/include/linux/sched.h
   1.161 +40a248afgI0_JKthdYAe8beVfXSTpQ linux-2.4.27-xen-sparse/include/linux/skbuff.h
   1.162 +401c0592pLrp_aCbQRo9GXiYQQaVVA linux-2.4.27-xen-sparse/include/linux/timer.h
   1.163 +3f9d4b44247udoqWEgFkaHiWv6Uvyg linux-2.4.27-xen-sparse/kernel/time.c
   1.164 +401c059bjLBFYHRD4Py2uM3eA1D4zQ linux-2.4.27-xen-sparse/kernel/timer.c
   1.165 +3e6e7c1efbQe93xCvOpOVCnXTMmQ5w linux-2.4.27-xen-sparse/mkbuildtree
   1.166 +406aeeafkrnCuIVWLFv3kfn4uAD5Eg linux-2.4.27-xen-sparse/mm/highmem.c
   1.167 +3e5a4e68GxCIaFH4sy01v1wjapetaA linux-2.4.27-xen-sparse/mm/memory.c
   1.168 +3f108af5VxPkLv13tXpXgoRKALQtXQ linux-2.4.27-xen-sparse/mm/mprotect.c
   1.169 +3e5a4e681xMPdF9xCMwpyfuYMySU5g linux-2.4.27-xen-sparse/mm/mremap.c
   1.170 +409ba2e7akOFqQUg6Qyg2s28xcXiMg linux-2.4.27-xen-sparse/mm/page_alloc.c
   1.171 +3e5a4e683HKVU-sxtagrDasRB8eBVw linux-2.4.27-xen-sparse/mm/swapfile.c
   1.172 +41180721bNns9Na7w1nJ0ZVt8bhUNA linux-2.4.27-xen-sparse/mm/vmalloc.c
   1.173  40f562372u3A7_kfbYYixPHJJxYUxA linux-2.6.7-xen-sparse/arch/xen/Kconfig
   1.174  40f56237utH41NPukqHksuNf29IC9A linux-2.6.7-xen-sparse/arch/xen/Kconfig.drivers
   1.175  40f56237penAAlWVBVDpeQZNFIg8CA linux-2.6.7-xen-sparse/arch/xen/Makefile
     2.1 --- a/linux-2.4.26-xen-sparse/Makefile	Sat Aug 21 10:28:38 2004 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,592 +0,0 @@
     2.4 -VERSION = 2
     2.5 -PATCHLEVEL = 4
     2.6 -SUBLEVEL = 26
     2.7 -EXTRAVERSION =
     2.8 -
     2.9 -KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
    2.10 -
    2.11 -# SUBARCH always tells us the underlying machine architecture.
    2.12 -# Unless overridden, by default ARCH is equivalent to SUBARCH.
    2.13 -# This will be overriden for Xen and UML builds.
    2.14 -SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
    2.15 -ARCH ?= $(SUBARCH)
    2.16 -
    2.17 -## XXX The following hack can be discarded after users have adjusted to the
    2.18 -## architectural name change 'xeno' -> 'xen'.
    2.19 -ifeq ($(ARCH),xeno)
    2.20 -  ARCH := xen
    2.21 -endif
    2.22 -
    2.23 -KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g")
    2.24 -
    2.25 -CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
    2.26 -	  else if [ -x /bin/bash ]; then echo /bin/bash; \
    2.27 -	  else echo sh; fi ; fi)
    2.28 -TOPDIR	:= $(shell /bin/pwd)
    2.29 -
    2.30 -HPATH   	= $(TOPDIR)/include
    2.31 -FINDHPATH	= $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net $(HPATH)/math-emu
    2.32 -
    2.33 -HOSTCC  	= gcc
    2.34 -HOSTCFLAGS	= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
    2.35 -
    2.36 -CROSS_COMPILE 	=
    2.37 -
    2.38 -#
    2.39 -# Include the make variables (CC, etc...)
    2.40 -#
    2.41 -
    2.42 -AS		= $(CROSS_COMPILE)as
    2.43 -LD		= $(CROSS_COMPILE)ld
    2.44 -CC		= $(CROSS_COMPILE)gcc
    2.45 -CPP		= $(CC) -E
    2.46 -AR		= $(CROSS_COMPILE)ar
    2.47 -NM		= $(CROSS_COMPILE)nm
    2.48 -STRIP		= $(CROSS_COMPILE)strip
    2.49 -OBJCOPY		= $(CROSS_COMPILE)objcopy
    2.50 -OBJDUMP		= $(CROSS_COMPILE)objdump
    2.51 -MAKEFILES	= $(TOPDIR)/.config
    2.52 -GENKSYMS	= /sbin/genksyms
    2.53 -DEPMOD		= /sbin/depmod
    2.54 -MODFLAGS	= -DMODULE
    2.55 -CFLAGS_KERNEL	=
    2.56 -PERL		= perl
    2.57 -AWK		= awk
    2.58 -RPM 		:= $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
    2.59 -		    	else echo rpm; fi)
    2.60 -
    2.61 -export	VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
    2.62 -	CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
    2.63 -	CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS PERL AWK
    2.64 -
    2.65 -all:	do-it-all
    2.66 -
    2.67 -#
    2.68 -# Make "config" the default target if there is no configuration file or
    2.69 -# "depend" the target if there is no top-level dependency information.
    2.70 -#
    2.71 -
    2.72 -ifeq (.config,$(wildcard .config))
    2.73 -include .config
    2.74 -ifeq (.depend,$(wildcard .depend))
    2.75 -include .depend
    2.76 -do-it-all:	Version vmlinux
    2.77 -else
    2.78 -CONFIGURATION = depend
    2.79 -do-it-all:	depend
    2.80 -endif
    2.81 -else
    2.82 -CONFIGURATION = config
    2.83 -do-it-all:	config
    2.84 -endif
    2.85 -
    2.86 -#
    2.87 -# INSTALL_PATH specifies where to place the updated kernel and system map
    2.88 -# images.  Uncomment if you want to place them anywhere other than root.
    2.89 -#
    2.90 -
    2.91 -#export	INSTALL_PATH=/boot
    2.92 -
    2.93 -#
    2.94 -# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
    2.95 -# relocations required by build roots.  This is not defined in the
    2.96 -# makefile but the arguement can be passed to make if needed.
    2.97 -#
    2.98 -
    2.99 -MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
   2.100 -export MODLIB
   2.101 -
   2.102 -#
   2.103 -# standard CFLAGS
   2.104 -#
   2.105 -
   2.106 -CPPFLAGS := -D__KERNEL__ -I$(HPATH)
   2.107 -
   2.108 -CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
   2.109 -	  -fno-strict-aliasing -fno-common
   2.110 -ifndef CONFIG_FRAME_POINTER
   2.111 -CFLAGS += -fomit-frame-pointer
   2.112 -endif
   2.113 -AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
   2.114 -
   2.115 -#
   2.116 -# ROOT_DEV specifies the default root-device when making the image.
   2.117 -# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
   2.118 -# the default of FLOPPY is used by 'build'.
   2.119 -# This is i386 specific.
   2.120 -#
   2.121 -
   2.122 -export ROOT_DEV = CURRENT
   2.123 -
   2.124 -#
   2.125 -# If you want to preset the SVGA mode, uncomment the next line and
   2.126 -# set SVGA_MODE to whatever number you want.
   2.127 -# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
   2.128 -# The number is the same as you would ordinarily press at bootup.
   2.129 -# This is i386 specific.
   2.130 -#
   2.131 -
   2.132 -export SVGA_MODE = -DSVGA_MODE=NORMAL_VGA
   2.133 -
   2.134 -#
   2.135 -# If you want the RAM disk device, define this to be the size in blocks.
   2.136 -# This is i386 specific.
   2.137 -#
   2.138 -
   2.139 -#export RAMDISK = -DRAMDISK=512
   2.140 -
   2.141 -CORE_FILES	=kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o
   2.142 -NETWORKS	=net/network.o
   2.143 -
   2.144 -LIBS		=$(TOPDIR)/lib/lib.a
   2.145 -SUBDIRS		=kernel drivers mm fs net ipc lib crypto
   2.146 -
   2.147 -DRIVERS-n :=
   2.148 -DRIVERS-y :=
   2.149 -DRIVERS-m :=
   2.150 -DRIVERS-  :=
   2.151 -
   2.152 -DRIVERS-$(CONFIG_ACPI_BOOT) += drivers/acpi/acpi.o
   2.153 -DRIVERS-$(CONFIG_PARPORT) += drivers/parport/driver.o
   2.154 -DRIVERS-y += drivers/char/char.o \
   2.155 -	drivers/block/block.o \
   2.156 -	drivers/misc/misc.o \
   2.157 -	drivers/net/net.o
   2.158 -DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o
   2.159 -DRIVERS-$(CONFIG_DRM_NEW) += drivers/char/drm/drm.o
   2.160 -DRIVERS-$(CONFIG_DRM_OLD) += drivers/char/drm-4.0/drm.o
   2.161 -DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a
   2.162 -DRIVERS-$(CONFIG_NET_FC) += drivers/net/fc/fc.o
   2.163 -DRIVERS-$(CONFIG_DEV_APPLETALK) += drivers/net/appletalk/appletalk.o
   2.164 -DRIVERS-$(CONFIG_TR) += drivers/net/tokenring/tr.o
   2.165 -DRIVERS-$(CONFIG_WAN) += drivers/net/wan/wan.o
   2.166 -DRIVERS-$(CONFIG_ARCNET) += drivers/net/arcnet/arcnetdrv.o
   2.167 -DRIVERS-$(CONFIG_ATM) += drivers/atm/atm.o
   2.168 -DRIVERS-$(CONFIG_IDE) += drivers/ide/idedriver.o
   2.169 -DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
   2.170 -DRIVERS-$(CONFIG_SCSI) += drivers/scsi/scsidrv.o
   2.171 -DRIVERS-$(CONFIG_FUSION_BOOT) += drivers/message/fusion/fusion.o
   2.172 -DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394drv.o
   2.173 -
   2.174 -ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR)$(CONFIG_PARIDE_PCD),)
   2.175 -DRIVERS-y += drivers/cdrom/driver.o
   2.176 -endif
   2.177 -
   2.178 -DRIVERS-$(CONFIG_SOUND) += drivers/sound/sounddrivers.o
   2.179 -DRIVERS-$(CONFIG_PCI) += drivers/pci/driver.o
   2.180 -DRIVERS-$(CONFIG_MTD) += drivers/mtd/mtdlink.o
   2.181 -DRIVERS-$(CONFIG_PCMCIA) += drivers/pcmcia/pcmcia.o
   2.182 -DRIVERS-$(CONFIG_NET_PCMCIA) += drivers/net/pcmcia/pcmcia_net.o
   2.183 -DRIVERS-$(CONFIG_NET_WIRELESS) += drivers/net/wireless/wireless_net.o
   2.184 -DRIVERS-$(CONFIG_PCMCIA_CHRDEV) += drivers/char/pcmcia/pcmcia_char.o
   2.185 -DRIVERS-$(CONFIG_DIO) += drivers/dio/dio.a
   2.186 -DRIVERS-$(CONFIG_SBUS) += drivers/sbus/sbus_all.o
   2.187 -DRIVERS-$(CONFIG_ZORRO) += drivers/zorro/driver.o
   2.188 -DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
   2.189 -DRIVERS-$(CONFIG_PPC32) += drivers/macintosh/macintosh.o
   2.190 -DRIVERS-$(CONFIG_MAC) += drivers/macintosh/macintosh.o
   2.191 -DRIVERS-$(CONFIG_ISAPNP) += drivers/pnp/pnp.o
   2.192 -DRIVERS-$(CONFIG_VT) += drivers/video/video.o
   2.193 -DRIVERS-$(CONFIG_PARIDE) += drivers/block/paride/paride.a
   2.194 -DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o
   2.195 -DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
   2.196 -DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
   2.197 -DRIVERS-$(CONFIG_USB_GADGET) += drivers/usb/gadget/built-in.o
   2.198 -DRIVERS-y +=drivers/media/media.o
   2.199 -DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o
   2.200 -DRIVERS-$(CONFIG_HIL) += drivers/hil/hil.o
   2.201 -DRIVERS-$(CONFIG_I2O) += drivers/message/i2o/i2o.o
   2.202 -DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda.o
   2.203 -DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o
   2.204 -DRIVERS-$(CONFIG_PHONE) += drivers/telephony/telephony.o
   2.205 -DRIVERS-$(CONFIG_MD) += drivers/md/mddev.o
   2.206 -DRIVERS-$(CONFIG_GSC) += drivers/gsc/gscbus.o
   2.207 -DRIVERS-$(CONFIG_BLUEZ) += drivers/bluetooth/bluetooth.o
   2.208 -DRIVERS-$(CONFIG_HOTPLUG_PCI) += drivers/hotplug/vmlinux-obj.o
   2.209 -DRIVERS-$(CONFIG_ISDN_BOOL) += drivers/isdn/vmlinux-obj.o
   2.210 -DRIVERS-$(CONFIG_CRYPTO) += crypto/crypto.o
   2.211 -
   2.212 -DRIVERS := $(DRIVERS-y)
   2.213 -
   2.214 -
   2.215 -# files removed with 'make clean'
   2.216 -CLEAN_FILES = \
   2.217 -	kernel/ksyms.lst include/linux/compile.h \
   2.218 -	vmlinux System.map \
   2.219 -	.tmp* \
   2.220 -	drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
   2.221 -	drivers/char/conmakehash \
   2.222 -	drivers/char/drm/*-mod.c \
   2.223 -	drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist \
   2.224 -	drivers/zorro/devlist.h drivers/zorro/gen-devlist \
   2.225 -	drivers/sound/bin2hex drivers/sound/hex2hex \
   2.226 -	drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2} \
   2.227 -	drivers/scsi/aic7xxx/aicasm/aicasm \
   2.228 -	drivers/scsi/aic7xxx/aicasm/aicasm_gram.c \
   2.229 -	drivers/scsi/aic7xxx/aicasm/aicasm_gram.h \
   2.230 -	drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.c \
   2.231 -	drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.h \
   2.232 -	drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.c \
   2.233 -	drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \
   2.234 -	drivers/scsi/aic7xxx/aicasm/aicdb.h \
   2.235 -	drivers/scsi/aic7xxx/aicasm/y.tab.h \
   2.236 -	drivers/scsi/53c700_d.h \
   2.237 -	drivers/tc/lk201-map.c \
   2.238 -	net/khttpd/make_times_h \
   2.239 -	net/khttpd/times.h \
   2.240 -	submenu* \
   2.241 -	drivers/ieee1394/oui.c
   2.242 -# directories removed with 'make clean'
   2.243 -CLEAN_DIRS = \
   2.244 -	modules
   2.245 -
   2.246 -# files removed with 'make mrproper'
   2.247 -MRPROPER_FILES = \
   2.248 -	include/linux/autoconf.h include/linux/version.h \
   2.249 -	lib/crc32table.h lib/gen_crc32table \
   2.250 -	drivers/net/hamradio/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h \
   2.251 -	drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h \
   2.252 -	drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h \
   2.253 -	drivers/net/hamradio/soundmodem/gentbl \
   2.254 -	drivers/sound/*_boot.h drivers/sound/.*.boot \
   2.255 -	drivers/sound/msndinit.c \
   2.256 -	drivers/sound/msndperm.c \
   2.257 -	drivers/sound/pndsperm.c \
   2.258 -	drivers/sound/pndspini.c \
   2.259 -	drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \
   2.260 -	.version .config* config.in config.old \
   2.261 -	scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \
   2.262 -	scripts/lxdialog/*.o scripts/lxdialog/lxdialog \
   2.263 -	.menuconfig.log \
   2.264 -	include/asm \
   2.265 -	.hdepend scripts/mkdep scripts/split-include scripts/docproc \
   2.266 -	$(TOPDIR)/include/linux/modversions.h \
   2.267 -	kernel.spec
   2.268 -
   2.269 -# directories removed with 'make mrproper'
   2.270 -MRPROPER_DIRS = \
   2.271 -	include/config \
   2.272 -	$(TOPDIR)/include/linux/modules
   2.273 -
   2.274 -
   2.275 -include arch/$(ARCH)/Makefile
   2.276 -
   2.277 -# Extra cflags for kbuild 2.4.  The default is to forbid includes by kernel code
   2.278 -# from user space headers.  Some UML code requires user space headers, in the
   2.279 -# UML Makefiles add 'kbuild_2_4_nostdinc :=' before include Rules.make.  No
   2.280 -# other kernel code should include user space headers, if you need
   2.281 -# 'kbuild_2_4_nostdinc :=' or -I/usr/include for kernel code and you are not UML
   2.282 -# then your code is broken!  KAO.
   2.283 -
   2.284 -kbuild_2_4_nostdinc	:= -nostdinc -iwithprefix include
   2.285 -export kbuild_2_4_nostdinc
   2.286 -
   2.287 -export	CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL
   2.288 -
   2.289 -export	NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS
   2.290 -
   2.291 -.S.s:
   2.292 -	$(CPP) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -o $*.s $<
   2.293 -.S.o:
   2.294 -	$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -c -o $*.o $<
   2.295 -
   2.296 -Version: dummy
   2.297 -	@rm -f include/linux/compile.h
   2.298 -
   2.299 -boot: vmlinux
   2.300 -	@$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C arch/$(ARCH)/boot
   2.301 -
   2.302 -vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o init/do_mounts.o linuxsubdirs
   2.303 -	$(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o init/do_mounts.o \
   2.304 -		--start-group \
   2.305 -		$(CORE_FILES) \
   2.306 -		$(DRIVERS) \
   2.307 -		$(NETWORKS) \
   2.308 -		$(LIBS) \
   2.309 -		--end-group \
   2.310 -		-o vmlinux
   2.311 -	$(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
   2.312 -
   2.313 -symlinks:
   2.314 -	rm -f include/asm
   2.315 -	( cd include ; ln -sf asm-$(ARCH) asm)
   2.316 -	@if [ ! -d include/linux/modules ]; then \
   2.317 -		mkdir include/linux/modules; \
   2.318 -	fi
   2.319 -
   2.320 -oldconfig: symlinks
   2.321 -	$(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
   2.322 -
   2.323 -xconfig: symlinks
   2.324 -	$(MAKE) -C scripts kconfig.tk
   2.325 -	wish -f scripts/kconfig.tk
   2.326 -
   2.327 -menuconfig: include/linux/version.h symlinks
   2.328 -	$(MAKE) -C scripts/lxdialog all
   2.329 -	$(CONFIG_SHELL) scripts/Menuconfig arch/$(ARCH)/config.in
   2.330 -
   2.331 -config: symlinks
   2.332 -	$(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in
   2.333 -
   2.334 -include/config/MARKER: scripts/split-include include/linux/autoconf.h
   2.335 -	scripts/split-include include/linux/autoconf.h include/config
   2.336 -	@ touch include/config/MARKER
   2.337 -
   2.338 -linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
   2.339 -
   2.340 -$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER
   2.341 -	$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
   2.342 -
   2.343 -$(TOPDIR)/include/linux/version.h: include/linux/version.h
   2.344 -$(TOPDIR)/include/linux/compile.h: include/linux/compile.h
   2.345 -
   2.346 -newversion:
   2.347 -	. scripts/mkversion > .tmpversion
   2.348 -	@mv -f .tmpversion .version
   2.349 -
   2.350 -uts_len		:= 64
   2.351 -uts_truncate	:= sed -e 's/\(.\{1,$(uts_len)\}\).*/\1/'
   2.352 -
   2.353 -include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion
   2.354 -	@echo -n \#`cat .version` > .ver1
   2.355 -	@if [ -n "$(CONFIG_SMP)" ] ; then echo -n " SMP" >> .ver1; fi
   2.356 -	@if [ -f .name ]; then  echo -n \-`cat .name` >> .ver1; fi
   2.357 -	@LANG=C echo ' '`date` >> .ver1
   2.358 -	@echo \#define UTS_VERSION \"`cat .ver1 | $(uts_truncate)`\" > .ver
   2.359 -	@LANG=C echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> .ver
   2.360 -	@echo \#define LINUX_COMPILE_BY \"`whoami`\" >> .ver
   2.361 -	@echo \#define LINUX_COMPILE_HOST \"`hostname | $(uts_truncate)`\" >> .ver
   2.362 -	@([ -x /bin/dnsdomainname ] && /bin/dnsdomainname > .ver1) || \
   2.363 -	 ([ -x /bin/domainname ] && /bin/domainname > .ver1) || \
   2.364 -	 echo > .ver1
   2.365 -	@echo \#define LINUX_COMPILE_DOMAIN \"`cat .ver1 | $(uts_truncate)`\" >> .ver
   2.366 -	@echo \#define LINUX_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -n 1`\" >> .ver
   2.367 -	@mv -f .ver $@
   2.368 -	@rm -f .ver1
   2.369 -
   2.370 -include/linux/version.h: ./Makefile
   2.371 -	@expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
   2.372 -	  (echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len) characters >&2; false)
   2.373 -	@echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
   2.374 -	@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
   2.375 -	@echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver
   2.376 -	@mv -f .ver $@
   2.377 -
   2.378 -comma	:= ,
   2.379 -
   2.380 -init/version.o: init/version.c include/linux/compile.h include/config/MARKER
   2.381 -	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(SUBARCH)"' -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o init/version.o init/version.c
   2.382 -
   2.383 -init/main.o: init/main.c include/config/MARKER
   2.384 -	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
   2.385 -
   2.386 -init/do_mounts.o: init/do_mounts.c include/config/MARKER
   2.387 -	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
   2.388 -
   2.389 -fs lib mm ipc kernel drivers net: dummy
   2.390 -	$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)
   2.391 -
   2.392 -TAGS: dummy
   2.393 -	{ find include/asm-${ARCH} -name '*.h' -print ; \
   2.394 -	find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print ; \
   2.395 -	find $(SUBDIRS) init arch/${ARCH} -name '*.[chS]' ; } | grep -v SCCS | grep -v '\.svn' | etags -
   2.396 -
   2.397 -# Exuberant ctags works better with -I
   2.398 -tags: dummy
   2.399 -	CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
   2.400 -	ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
   2.401 -	find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
   2.402 -	find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a
   2.403 -
   2.404 -ifdef CONFIG_MODULES
   2.405 -ifdef CONFIG_MODVERSIONS
   2.406 -MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
   2.407 -endif
   2.408 -
   2.409 -.PHONY: modules
   2.410 -modules: $(patsubst %, _mod_%, $(SUBDIRS))
   2.411 -
   2.412 -.PHONY: $(patsubst %, _mod_%, $(SUBDIRS))
   2.413 -$(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER
   2.414 -	$(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules
   2.415 -
   2.416 -.PHONY: modules_install
   2.417 -modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post
   2.418 -
   2.419 -.PHONY: _modinst_
   2.420 -_modinst_:
   2.421 -	@rm -rf $(MODLIB)/kernel
   2.422 -	@rm -f $(MODLIB)/build
   2.423 -	@mkdir -p $(MODLIB)/kernel
   2.424 -	@ln -s $(TOPDIR) $(MODLIB)/build
   2.425 -
   2.426 -# If System.map exists, run depmod.  This deliberately does not have a
   2.427 -# dependency on System.map since that would run the dependency tree on
   2.428 -# vmlinux.  This depmod is only for convenience to give the initial
   2.429 -# boot a modules.dep even before / is mounted read-write.  However the
   2.430 -# boot script depmod is the master version.
   2.431 -ifeq "$(strip $(INSTALL_MOD_PATH))" ""
   2.432 -depmod_opts	:=
   2.433 -else
   2.434 -depmod_opts	:= -b $(INSTALL_MOD_PATH) -r
   2.435 -endif
   2.436 -.PHONY: _modinst_post
   2.437 -_modinst_post: _modinst_post_pcmcia
   2.438 -	if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
   2.439 -
   2.440 -# Backwards compatibilty symlinks for people still using old versions
   2.441 -# of pcmcia-cs with hard coded pathnames on insmod.  Remove
   2.442 -# _modinst_post_pcmcia for kernel 2.4.1.
   2.443 -.PHONY: _modinst_post_pcmcia
   2.444 -_modinst_post_pcmcia:
   2.445 -	cd $(MODLIB); \
   2.446 -	mkdir -p pcmcia; \
   2.447 -	find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
   2.448 -
   2.449 -.PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
   2.450 -$(patsubst %, _modinst_%, $(SUBDIRS)) :
   2.451 -	$(MAKE) -C $(patsubst _modinst_%, %, $@) modules_install
   2.452 -
   2.453 -# modules disabled....
   2.454 -
   2.455 -else
   2.456 -modules modules_install: dummy
   2.457 -	@echo
   2.458 -	@echo "The present kernel configuration has modules disabled."
   2.459 -	@echo "Type 'make config' and enable loadable module support."
   2.460 -	@echo "Then build a kernel with module support enabled."
   2.461 -	@echo
   2.462 -	@exit 1
   2.463 -endif
   2.464 -
   2.465 -clean:	archclean
   2.466 -	find . \( -name '*.[oas]' -o -name core -o -name '.*.flags' \) -type f -print \
   2.467 -		| grep -v lxdialog/ | xargs rm -f
   2.468 -	rm -f $(CLEAN_FILES)
   2.469 -	rm -rf $(CLEAN_DIRS)
   2.470 -	$(MAKE) -C Documentation/DocBook clean
   2.471 -
   2.472 -mrproper: clean archmrproper
   2.473 -	find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f
   2.474 -	rm -f $(MRPROPER_FILES)
   2.475 -	rm -rf $(MRPROPER_DIRS)
   2.476 -	$(MAKE) -C Documentation/DocBook mrproper
   2.477 -
   2.478 -distclean: mrproper
   2.479 -	rm -f core `find . \( -not -type d \) -and \
   2.480 -		\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
   2.481 -		-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
   2.482 -		-o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
   2.483 -
   2.484 -backup: mrproper
   2.485 -	cd .. && tar cf - linux/ | gzip -9 > backup.gz
   2.486 -	sync
   2.487 -
   2.488 -sgmldocs: 
   2.489 -	chmod 755 $(TOPDIR)/scripts/docgen
   2.490 -	chmod 755 $(TOPDIR)/scripts/gen-all-syms
   2.491 -	chmod 755 $(TOPDIR)/scripts/kernel-doc
   2.492 -	$(MAKE) -C $(TOPDIR)/Documentation/DocBook books
   2.493 -
   2.494 -psdocs: sgmldocs
   2.495 -	$(MAKE) -C Documentation/DocBook ps
   2.496 -
   2.497 -pdfdocs: sgmldocs
   2.498 -	$(MAKE) -C Documentation/DocBook pdf
   2.499 -
   2.500 -htmldocs: sgmldocs
   2.501 -	$(MAKE) -C Documentation/DocBook html
   2.502 -
   2.503 -mandocs:
   2.504 -	chmod 755 $(TOPDIR)/scripts/kernel-doc
   2.505 -	chmod 755 $(TOPDIR)/scripts/split-man
   2.506 -	$(MAKE) -C Documentation/DocBook man
   2.507 -
   2.508 -sums:
   2.509 -	find . -type f -print | sort | xargs sum > .SUMS
   2.510 -
   2.511 -dep-files: scripts/mkdep archdep include/linux/version.h
   2.512 -	rm -f .depend .hdepend
   2.513 -	$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
   2.514 -ifdef CONFIG_MODVERSIONS
   2.515 -	$(MAKE) update-modverfile
   2.516 -endif
   2.517 -	scripts/mkdep -- `find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
   2.518 -	scripts/mkdep -- init/*.c > .depend
   2.519 -
   2.520 -ifdef CONFIG_MODVERSIONS
   2.521 -MODVERFILE := $(TOPDIR)/include/linux/modversions.h
   2.522 -else
   2.523 -MODVERFILE :=
   2.524 -endif
   2.525 -export	MODVERFILE
   2.526 -
   2.527 -depend dep: dep-files
   2.528 -
   2.529 -checkconfig:
   2.530 -	find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl
   2.531 -
   2.532 -checkhelp:
   2.533 -	find * -name [cC]onfig.in -print | sort | xargs $(PERL) -w scripts/checkhelp.pl
   2.534 -
   2.535 -checkincludes:
   2.536 -	find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl
   2.537 -
   2.538 -ifdef CONFIGURATION
   2.539 -..$(CONFIGURATION):
   2.540 -	@echo
   2.541 -	@echo "You have a bad or nonexistent" .$(CONFIGURATION) ": running 'make" $(CONFIGURATION)"'"
   2.542 -	@echo
   2.543 -	$(MAKE) $(CONFIGURATION)
   2.544 -	@echo
   2.545 -	@echo "Successful. Try re-making (ignore the error that follows)"
   2.546 -	@echo
   2.547 -	exit 1
   2.548 -
   2.549 -#dummy: ..$(CONFIGURATION)
   2.550 -dummy:
   2.551 -
   2.552 -else
   2.553 -
   2.554 -dummy:
   2.555 -
   2.556 -endif
   2.557 -
   2.558 -include Rules.make
   2.559 -
   2.560 -#
   2.561 -# This generates dependencies for the .h files.
   2.562 -#
   2.563 -
   2.564 -scripts/mkdep: scripts/mkdep.c
   2.565 -	$(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
   2.566 -
   2.567 -scripts/split-include: scripts/split-include.c
   2.568 -	$(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
   2.569 -
   2.570 -#
   2.571 -# RPM target
   2.572 -#
   2.573 -#	If you do a make spec before packing the tarball you can rpm -ta it
   2.574 -#
   2.575 -spec:
   2.576 -	. scripts/mkspec >kernel.spec
   2.577 -
   2.578 -#
   2.579 -#	Build a tar ball, generate an rpm from it and pack the result
   2.580 -#	There arw two bits of magic here
   2.581 -#	1) The use of /. to avoid tar packing just the symlink
   2.582 -#	2) Removing the .dep files as they have source paths in them that
   2.583 -#	   will become invalid
   2.584 -#
   2.585 -rpm:	clean spec
   2.586 -	find . \( -size 0 -o -name .depend -o -name .hdepend \) -type f -print | xargs rm -f
   2.587 -	set -e; \
   2.588 -	cd $(TOPDIR)/.. ; \
   2.589 -	ln -sf $(TOPDIR) $(KERNELPATH) ; \
   2.590 -	tar -cvz --exclude CVS -f $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \
   2.591 -	rm $(KERNELPATH) ; \
   2.592 -	cd $(TOPDIR) ; \
   2.593 -	. scripts/mkversion > .version ; \
   2.594 -	$(RPM) -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
   2.595 -	rm $(TOPDIR)/../$(KERNELPATH).tar.gz
     3.1 --- a/linux-2.4.26-xen-sparse/arch/xen/Makefile	Sat Aug 21 10:28:38 2004 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,135 +0,0 @@
     3.4 -#
     3.5 -# xen/Makefile
     3.6 -#
     3.7 -# This file is included by the global makefile so that you can add your own
     3.8 -# architecture-specific flags and dependencies. Remember to do have actions
     3.9 -# for "archclean" and "archdep" for cleaning up and making dependencies for
    3.10 -# this architecture
    3.11 -#
    3.12 -# This file is subject to the terms and conditions of the GNU General Public
    3.13 -# License.  See the file "COPYING" in the main directory of this archive
    3.14 -# for more details.
    3.15 -#
    3.16 -# Copyright (C) 1994 by Linus Torvalds
    3.17 -#
    3.18 -# 19990713  Artur Skawina <skawina@geocities.com>
    3.19 -#           Added '-march' and '-mpreferred-stack-boundary' support
    3.20 -#
    3.21 -
    3.22 -override EXTRAVERSION:=$(subst linux-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL),,$(shell basename $(TOPDIR)))$(EXTRAVERSION)
    3.23 -
    3.24 -# If no .config file exists then use the appropriate defconfig-* file
    3.25 -ifneq (.config,$(wildcard .config))
    3.26 -DUMMYX:=$(shell cp $(TOPDIR)/arch/xen/defconfig$(EXTRAVERSION) $(TOPDIR)/.config)
    3.27 --include $(TOPDIR)/.config
    3.28 -endif
    3.29 -
    3.30 -LD=$(CROSS_COMPILE)ld -m elf_i386
    3.31 -OBJCOPY=$(CROSS_COMPILE)objcopy -R .note -R .comment -S
    3.32 -LDFLAGS=-e stext
    3.33 -LINKFLAGS =-T $(TOPDIR)/arch/xen/vmlinux.lds $(LDFLAGS)
    3.34 -
    3.35 -CFLAGS += -pipe
    3.36 -
    3.37 -check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
    3.38 -
    3.39 -# prevent gcc from keeping the stack 16 byte aligned
    3.40 -CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,)
    3.41 -
    3.42 -ifdef CONFIG_M686
    3.43 -CFLAGS += -march=i686
    3.44 -endif
    3.45 -
    3.46 -ifdef CONFIG_MPENTIUMIII
    3.47 -CFLAGS += -march=i686
    3.48 -endif
    3.49 -
    3.50 -ifdef CONFIG_MPENTIUM4
    3.51 -CFLAGS += -march=i686
    3.52 -endif
    3.53 -
    3.54 -ifdef CONFIG_MK7
    3.55 -CFLAGS += $(call check_gcc,-march=athlon,-march=i686 -malign-functions=4)
    3.56 -endif
    3.57 -
    3.58 -HEAD := arch/xen/kernel/head.o arch/xen/kernel/init_task.o
    3.59 -
    3.60 -SUBDIRS += arch/xen/kernel arch/xen/mm arch/xen/lib
    3.61 -SUBDIRS += arch/xen/drivers/console 
    3.62 -SUBDIRS += arch/xen/drivers/evtchn
    3.63 -SUBDIRS += arch/xen/drivers/blkif
    3.64 -SUBDIRS += arch/xen/drivers/netif
    3.65 -SUBDIRS += arch/xen/drivers/balloon
    3.66 -ifdef CONFIG_XEN_PRIVILEGED_GUEST
    3.67 -SUBDIRS += arch/xen/drivers/dom0 
    3.68 -endif
    3.69 -
    3.70 -CORE_FILES += arch/xen/kernel/kernel.o arch/xen/mm/mm.o
    3.71 -CORE_FILES += arch/xen/drivers/evtchn/drv.o
    3.72 -CORE_FILES += arch/xen/drivers/console/drv.o
    3.73 -DRIVERS += arch/xen/drivers/blkif/drv.o
    3.74 -DRIVERS += arch/xen/drivers/netif/drv.o
    3.75 -ifdef CONFIG_XEN_PRIVILEGED_GUEST
    3.76 -CORE_FILES += arch/xen/drivers/dom0/drv.o
    3.77 -endif
    3.78 -CORE_FILES += arch/xen/drivers/balloon/drv.o
    3.79 -LIBS := $(TOPDIR)/arch/xen/lib/lib.a $(LIBS) $(TOPDIR)/arch/xen/lib/lib.a
    3.80 -
    3.81 -arch/xen/kernel: dummy
    3.82 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/kernel
    3.83 -
    3.84 -arch/xen/mm: dummy
    3.85 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/mm
    3.86 -
    3.87 -arch/xen/drivers/console: dummy
    3.88 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/console
    3.89 -
    3.90 -arch/xen/drivers/network: dummy
    3.91 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/network
    3.92 -
    3.93 -arch/xen/drivers/block: dummy
    3.94 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/block
    3.95 -
    3.96 -arch/xen/drivers/dom0: dummy
    3.97 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/dom0
    3.98 -
    3.99 -arch/xen/drivers/balloon: dummy
   3.100 -	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/balloon
   3.101 -
   3.102 -MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
   3.103 -
   3.104 -vmlinux: arch/xen/vmlinux.lds
   3.105 -
   3.106 -FORCE: ;
   3.107 -
   3.108 -.PHONY: bzImage compressed clean archclean archmrproper archdep
   3.109 -
   3.110 -
   3.111 -bzImage: vmlinux
   3.112 -	@$(MAKEBOOT) bzImage
   3.113 -
   3.114 -INSTALL_NAME ?= $(KERNELRELEASE)
   3.115 -install: bzImage
   3.116 -	mkdir -p $(INSTALL_PATH)/boot
   3.117 -	install -m0644 arch/$(ARCH)/boot/bzImage $(INSTALL_PATH)/boot/vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX)
   3.118 -	install -m0644 vmlinux $(INSTALL_PATH)/boot/vmlinux-syms-$(INSTALL_NAME)$(INSTALL_SUFFIX)
   3.119 -	install -m0664 .config $(INSTALL_PATH)/boot/config-$(INSTALL_NAME)$(INSTALL_SUFFIX)
   3.120 -	install -m0664 System.map $(INSTALL_PATH)/boot/System.map-$(INSTALL_NAME)$(INSTALL_SUFFIX)
   3.121 -
   3.122 -dist: 
   3.123 -	$(MAKE) INSTALL_PATH=../install install
   3.124 -
   3.125 -%_config: arch/xen/defconfig-%
   3.126 -	rm -f .config arch/xen/defconfig
   3.127 -	cp -f arch/xen/defconfig-$(@:_config=) arch/xen/defconfig
   3.128 -	cp -f arch/xen/defconfig-$(@:_config=) .config
   3.129 -
   3.130 -
   3.131 -archclean:
   3.132 -	@$(MAKEBOOT) clean
   3.133 -
   3.134 -archmrproper:
   3.135 -	rm -f include/asm-xen/hypervisor-ifs/arch
   3.136 -
   3.137 -archdep:
   3.138 -	@$(MAKEBOOT) dep
     4.1 --- a/linux-2.4.26-xen-sparse/arch/xen/boot/Makefile	Sat Aug 21 10:28:38 2004 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,13 +0,0 @@
     4.4 -#
     4.5 -# arch/xen/boot/Makefile
     4.6 -#
     4.7 -
     4.8 -bzImage: $(TOPDIR)/vmlinux
     4.9 -	$(OBJCOPY) $< Image
    4.10 -	gzip -f -9 < Image > $@
    4.11 -	rm -f Image
    4.12 -
    4.13 -dep:
    4.14 -
    4.15 -clean:
    4.16 -	rm -f bzImage Image
     5.1 --- a/linux-2.4.26-xen-sparse/arch/xen/config.in	Sat Aug 21 10:28:38 2004 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,322 +0,0 @@
     5.4 -#
     5.5 -# For a description of the syntax of this configuration file,
     5.6 -# see Documentation/kbuild/config-language.txt.
     5.7 -#
     5.8 -mainmenu_name "Linux Kernel Configuration"
     5.9 -
    5.10 -define_bool CONFIG_XEN y
    5.11 -
    5.12 -define_bool CONFIG_X86 y
    5.13 -define_bool CONFIG_ISA y
    5.14 -define_bool CONFIG_SBUS n
    5.15 -
    5.16 -define_bool CONFIG_UID16 y
    5.17 -
    5.18 -mainmenu_option next_comment
    5.19 -comment 'Xen'
    5.20 -bool 'Support for privileged operations (domain 0)' CONFIG_XEN_PRIVILEGED_GUEST
    5.21 -bool 'Device-driver domain (physical device access)' CONFIG_XEN_PHYSDEV_ACCESS
    5.22 -endmenu
    5.23 -# The IBM S/390 patch needs this.
    5.24 -define_bool CONFIG_NO_IDLE_HZ y
    5.25 -
    5.26 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" == "y" ]; then
    5.27 -   define_bool CONFIG_FOREIGN_PAGES y
    5.28 -else
    5.29 -   define_bool CONFIG_FOREIGN_PAGES n
    5.30 -   define_bool CONFIG_NETDEVICES y
    5.31 -   define_bool CONFIG_VT n
    5.32 -fi
    5.33 -
    5.34 -mainmenu_option next_comment
    5.35 -comment 'Code maturity level options'
    5.36 -bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
    5.37 -endmenu
    5.38 -
    5.39 -mainmenu_option next_comment
    5.40 -comment 'Loadable module support'
    5.41 -bool 'Enable loadable module support' CONFIG_MODULES
    5.42 -if [ "$CONFIG_MODULES" = "y" ]; then
    5.43 -   bool '  Set version information on all module symbols' CONFIG_MODVERSIONS
    5.44 -   bool '  Kernel module loader' CONFIG_KMOD
    5.45 -fi
    5.46 -endmenu
    5.47 -
    5.48 -mainmenu_option next_comment
    5.49 -comment 'Processor type and features'
    5.50 -choice 'Processor family' \
    5.51 -	"Pentium-Pro/Celeron/Pentium-II		CONFIG_M686 \
    5.52 -	 Pentium-III/Celeron(Coppermine)	CONFIG_MPENTIUMIII \
    5.53 -	 Pentium-4				CONFIG_MPENTIUM4 \
    5.54 -	 Athlon/Duron/K7			CONFIG_MK7 \
    5.55 -	 Opteron/Athlon64/Hammer/K8             CONFIG_MK8 \
    5.56 -	 VIA-C3-2                               CONFIG_MVIAC3_2" Pentium-Pro
    5.57 -
    5.58 -   define_bool CONFIG_X86_WP_WORKS_OK y
    5.59 -   define_bool CONFIG_X86_INVLPG y
    5.60 -   define_bool CONFIG_X86_CMPXCHG y
    5.61 -   define_bool CONFIG_X86_XADD y
    5.62 -   define_bool CONFIG_X86_BSWAP y
    5.63 -   define_bool CONFIG_X86_POPAD_OK y
    5.64 -   define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
    5.65 -   define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
    5.66 -
    5.67 -   define_bool CONFIG_X86_GOOD_APIC y
    5.68 -   define_bool CONFIG_X86_PGE y
    5.69 -   define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
    5.70 -   define_bool CONFIG_X86_TSC y
    5.71 -
    5.72 -if [ "$CONFIG_M686" = "y" ]; then
    5.73 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    5.74 -fi
    5.75 -if [ "$CONFIG_MPENTIUMIII" = "y" ]; then
    5.76 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    5.77 -fi
    5.78 -if [ "$CONFIG_MPENTIUM4" = "y" ]; then
    5.79 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 7
    5.80 -fi
    5.81 -if [ "$CONFIG_MK8" = "y" ]; then
    5.82 -   define_bool CONFIG_MK7 y
    5.83 -fi
    5.84 -if [ "$CONFIG_MK7" = "y" ]; then
    5.85 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 6
    5.86 -   define_bool CONFIG_X86_USE_3DNOW y
    5.87 -fi
    5.88 -if [ "$CONFIG_MVIAC3_2" = "y" ]; then
    5.89 -   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
    5.90 -fi
    5.91 -
    5.92 -#if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
    5.93 -#   tristate 'BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL)' CONFIG_EDD
    5.94 -#fi
    5.95 -
    5.96 -choice 'High Memory Support' \
    5.97 -	"off    CONFIG_NOHIGHMEM \
    5.98 -	 4GB    CONFIG_HIGHMEM4G" off
    5.99 -#	 64GB   CONFIG_HIGHMEM64G" off
   5.100 -if [ "$CONFIG_HIGHMEM4G" = "y" ]; then
   5.101 -   define_bool CONFIG_HIGHMEM y
   5.102 -fi
   5.103 -if [ "$CONFIG_HIGHMEM64G" = "y" ]; then
   5.104 -   define_bool CONFIG_HIGHMEM y
   5.105 -   define_bool CONFIG_X86_PAE y
   5.106 -fi
   5.107 -
   5.108 -if [ "$CONFIG_HIGHMEM" = "y" ]; then
   5.109 -   bool 'HIGHMEM I/O support' CONFIG_HIGHIO
   5.110 -fi
   5.111 -
   5.112 -define_int CONFIG_FORCE_MAX_ZONEORDER 11
   5.113 -
   5.114 -#bool 'Symmetric multi-processing support' CONFIG_SMP
   5.115 -#if [ "$CONFIG_SMP" = "y" -a "$CONFIG_X86_CMPXCHG" = "y" ]; then
   5.116 -#   define_bool CONFIG_HAVE_DEC_LOCK y
   5.117 -#fi
   5.118 -endmenu
   5.119 -
   5.120 -mainmenu_option next_comment
   5.121 -comment 'General setup'
   5.122 -
   5.123 -bool 'Networking support' CONFIG_NET
   5.124 -
   5.125 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
   5.126 -   bool 'PCI support' CONFIG_PCI
   5.127 -   source drivers/pci/Config.in
   5.128 -
   5.129 -   bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
   5.130 -
   5.131 -   if [ "$CONFIG_HOTPLUG" = "y" ] ; then
   5.132 -      source drivers/pcmcia/Config.in
   5.133 -      source drivers/hotplug/Config.in
   5.134 -   else
   5.135 -      define_bool CONFIG_PCMCIA n
   5.136 -      define_bool CONFIG_HOTPLUG_PCI n
   5.137 -   fi
   5.138 -fi
   5.139 -
   5.140 -bool 'System V IPC' CONFIG_SYSVIPC
   5.141 -bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
   5.142 -bool 'Sysctl support' CONFIG_SYSCTL
   5.143 -if [ "$CONFIG_PROC_FS" = "y" ]; then
   5.144 -   choice 'Kernel core (/proc/kcore) format' \
   5.145 -	"ELF		CONFIG_KCORE_ELF	\
   5.146 -	 A.OUT		CONFIG_KCORE_AOUT" ELF
   5.147 -fi
   5.148 -tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
   5.149 -tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
   5.150 -tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
   5.151 -bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER
   5.152 -
   5.153 -endmenu
   5.154 -
   5.155 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
   5.156 -   source drivers/mtd/Config.in
   5.157 -
   5.158 -   source drivers/parport/Config.in
   5.159 -
   5.160 -   source drivers/pnp/Config.in
   5.161 -
   5.162 -   source drivers/block/Config.in
   5.163 -
   5.164 -   source drivers/md/Config.in
   5.165 -fi
   5.166 -
   5.167 -if [ "$CONFIG_NET" = "y" ]; then
   5.168 -   source net/Config.in
   5.169 -fi
   5.170 -
   5.171 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
   5.172 -   mainmenu_option next_comment
   5.173 -   comment 'ATA/IDE/MFM/RLL support'
   5.174 -
   5.175 -   tristate 'ATA/IDE/MFM/RLL support' CONFIG_IDE
   5.176 -
   5.177 -   if [ "$CONFIG_IDE" != "n" ]; then
   5.178 -      source drivers/ide/Config.in
   5.179 -   else
   5.180 -      define_bool CONFIG_BLK_DEV_HD n
   5.181 -   fi
   5.182 -   endmenu
   5.183 -fi
   5.184 -
   5.185 -mainmenu_option next_comment
   5.186 -comment 'SCSI support'
   5.187 -
   5.188 -tristate 'SCSI support' CONFIG_SCSI
   5.189 -
   5.190 -if [ "$CONFIG_SCSI" != "n" ]; then
   5.191 -   source drivers/scsi/Config.in
   5.192 -fi
   5.193 -endmenu
   5.194 -
   5.195 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
   5.196 -   source drivers/message/fusion/Config.in
   5.197 -
   5.198 -   source drivers/ieee1394/Config.in
   5.199 -
   5.200 -   source drivers/message/i2o/Config.in
   5.201 -
   5.202 -   if [ "$CONFIG_NET" = "y" ]; then
   5.203 -      mainmenu_option next_comment
   5.204 -      comment 'Network device support'
   5.205 -
   5.206 -      bool 'Network device support' CONFIG_NETDEVICES
   5.207 -      if [ "$CONFIG_NETDEVICES" = "y" ]; then
   5.208 -         source drivers/net/Config.in
   5.209 -         if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
   5.210 -            source drivers/atm/Config.in
   5.211 -         fi
   5.212 -      fi
   5.213 -      endmenu
   5.214 -   fi
   5.215 -
   5.216 -   source net/ax25/Config.in
   5.217 -
   5.218 -   source net/irda/Config.in
   5.219 -
   5.220 -   mainmenu_option next_comment
   5.221 -   comment 'ISDN subsystem'
   5.222 -   if [ "$CONFIG_NET" != "n" ]; then
   5.223 -      tristate 'ISDN support' CONFIG_ISDN
   5.224 -      if [ "$CONFIG_ISDN" != "n" ]; then
   5.225 -         source drivers/isdn/Config.in
   5.226 -      fi
   5.227 -   fi
   5.228 -   endmenu
   5.229 -
   5.230 -   if [ "$CONFIG_ISA" = "y" ]; then
   5.231 -       mainmenu_option next_comment
   5.232 -       comment 'Old CD-ROM drivers (not SCSI, not IDE)'
   5.233 -   
   5.234 -       bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI
   5.235 -       if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
   5.236 -          source drivers/cdrom/Config.in
   5.237 -       fi
   5.238 -       endmenu
   5.239 -   fi
   5.240 -
   5.241 -   #
   5.242 -   # input before char - char/joystick depends on it. As does USB.
   5.243 -   #
   5.244 -   source drivers/input/Config.in
   5.245 -else
   5.246 -   #
   5.247 -   # Block device driver configuration
   5.248 -   #
   5.249 -   mainmenu_option next_comment
   5.250 -   comment 'Block devices'
   5.251 -   tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
   5.252 -   dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
   5.253 -   tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
   5.254 -   if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
   5.255 -      int '  Default RAM disk size' CONFIG_BLK_DEV_RAM_SIZE 4096
   5.256 -   fi
   5.257 -   dep_bool '  Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD $CONFIG_BLK_DEV_RAM
   5.258 -   bool 'Per partition statistics in /proc/partitions' CONFIG_BLK_STATS
   5.259 -   define_bool CONFIG_BLK_DEV_HD n
   5.260 -   endmenu
   5.261 -fi
   5.262 -
   5.263 -source drivers/char/Config.in
   5.264 -
   5.265 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
   5.266 -   source drivers/media/Config.in
   5.267 -fi
   5.268 -
   5.269 -source fs/Config.in
   5.270 -
   5.271 -mainmenu_option next_comment
   5.272 -comment 'Console drivers'
   5.273 -
   5.274 -bool 'Xen console support' CONFIG_XEN_CONSOLE
   5.275 -
   5.276 -if [ "$CONFIG_VT" = "y" ]; then
   5.277 -   bool 'VGA text console' CONFIG_VGA_CONSOLE
   5.278 -   bool 'Dummy console' CONFIG_DUMMY_CONSOLE 
   5.279 -   if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
   5.280 -      bool 'Video mode selection support' CONFIG_VIDEO_SELECT
   5.281 -      if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
   5.282 -         tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE
   5.283 -         source drivers/video/Config.in
   5.284 -      fi
   5.285 -   fi
   5.286 -fi
   5.287 -endmenu
   5.288 -
   5.289 -if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
   5.290 -   mainmenu_option next_comment
   5.291 -   comment 'Sound'
   5.292 -
   5.293 -   tristate 'Sound card support' CONFIG_SOUND
   5.294 -   if [ "$CONFIG_SOUND" != "n" ]; then
   5.295 -      source drivers/sound/Config.in
   5.296 -   fi
   5.297 -   endmenu
   5.298 -
   5.299 -   source drivers/usb/Config.in
   5.300 -
   5.301 -   source net/bluetooth/Config.in
   5.302 -fi
   5.303 -
   5.304 -mainmenu_option next_comment
   5.305 -comment 'Kernel hacking'
   5.306 -
   5.307 -bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
   5.308 -if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then
   5.309 -   bool '  Check for stack overflows' CONFIG_DEBUG_STACKOVERFLOW
   5.310 -   bool '  Debug high memory support' CONFIG_DEBUG_HIGHMEM
   5.311 -   bool '  Debug memory allocations' CONFIG_DEBUG_SLAB
   5.312 -   bool '  Memory mapped I/O debugging' CONFIG_DEBUG_IOVIRT
   5.313 -   bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ
   5.314 -   bool '  Spinlock debugging' CONFIG_DEBUG_SPINLOCK
   5.315 -   bool '  Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE
   5.316 -   bool '  Load all symbols for debugging' CONFIG_KALLSYMS
   5.317 -   bool '  Compile the kernel with frame pointers' CONFIG_FRAME_POINTER
   5.318 -fi
   5.319 -
   5.320 -int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0
   5.321 -
   5.322 -endmenu
   5.323 -
   5.324 -source crypto/Config.in
   5.325 -source lib/Config.in
     6.1 --- a/linux-2.4.26-xen-sparse/arch/xen/defconfig-xen0	Sat Aug 21 10:28:38 2004 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,934 +0,0 @@
     6.4 -#
     6.5 -# Automatically generated make config: don't edit
     6.6 -#
     6.7 -CONFIG_XEN=y
     6.8 -CONFIG_X86=y
     6.9 -CONFIG_ISA=y
    6.10 -# CONFIG_SBUS is not set
    6.11 -CONFIG_UID16=y
    6.12 -
    6.13 -#
    6.14 -# Xen
    6.15 -#
    6.16 -CONFIG_XEN_PRIVILEGED_GUEST=y
    6.17 -CONFIG_XEN_PHYSDEV_ACCESS=y
    6.18 -CONFIG_NO_IDLE_HZ=y
    6.19 -CONFIG_FOREIGN_PAGES=y
    6.20 -
    6.21 -#
    6.22 -# Code maturity level options
    6.23 -#
    6.24 -CONFIG_EXPERIMENTAL=y
    6.25 -
    6.26 -#
    6.27 -# Loadable module support
    6.28 -#
    6.29 -CONFIG_MODULES=y
    6.30 -CONFIG_MODVERSIONS=y
    6.31 -CONFIG_KMOD=y
    6.32 -
    6.33 -#
    6.34 -# Processor type and features
    6.35 -#
    6.36 -CONFIG_M686=y
    6.37 -# CONFIG_MPENTIUMIII is not set
    6.38 -# CONFIG_MPENTIUM4 is not set
    6.39 -# CONFIG_MK7 is not set
    6.40 -# CONFIG_MK8 is not set
    6.41 -# CONFIG_MVIAC3_2 is not set
    6.42 -CONFIG_X86_WP_WORKS_OK=y
    6.43 -CONFIG_X86_INVLPG=y
    6.44 -CONFIG_X86_CMPXCHG=y
    6.45 -CONFIG_X86_XADD=y
    6.46 -CONFIG_X86_BSWAP=y
    6.47 -CONFIG_X86_POPAD_OK=y
    6.48 -# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
    6.49 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y
    6.50 -CONFIG_X86_GOOD_APIC=y
    6.51 -CONFIG_X86_PGE=y
    6.52 -CONFIG_X86_USE_PPRO_CHECKSUM=y
    6.53 -CONFIG_X86_TSC=y
    6.54 -CONFIG_X86_L1_CACHE_SHIFT=5
    6.55 -CONFIG_NOHIGHMEM=y
    6.56 -# CONFIG_HIGHMEM4G is not set
    6.57 -CONFIG_FORCE_MAX_ZONEORDER=11
    6.58 -
    6.59 -#
    6.60 -# General setup
    6.61 -#
    6.62 -CONFIG_NET=y
    6.63 -CONFIG_PCI=y
    6.64 -CONFIG_PCI_NAMES=y
    6.65 -CONFIG_HOTPLUG=y
    6.66 -
    6.67 -#
    6.68 -# PCMCIA/CardBus support
    6.69 -#
    6.70 -# CONFIG_PCMCIA is not set
    6.71 -
    6.72 -#
    6.73 -# PCI Hotplug Support
    6.74 -#
    6.75 -# CONFIG_HOTPLUG_PCI is not set
    6.76 -# CONFIG_HOTPLUG_PCI_COMPAQ is not set
    6.77 -# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
    6.78 -CONFIG_SYSVIPC=y
    6.79 -# CONFIG_BSD_PROCESS_ACCT is not set
    6.80 -CONFIG_SYSCTL=y
    6.81 -CONFIG_KCORE_ELF=y
    6.82 -# CONFIG_KCORE_AOUT is not set
    6.83 -CONFIG_BINFMT_AOUT=y
    6.84 -CONFIG_BINFMT_ELF=y
    6.85 -# CONFIG_BINFMT_MISC is not set
    6.86 -# CONFIG_OOM_KILLER is not set
    6.87 -
    6.88 -#
    6.89 -# Memory Technology Devices (MTD)
    6.90 -#
    6.91 -# CONFIG_MTD is not set
    6.92 -
    6.93 -#
    6.94 -# Parallel port support
    6.95 -#
    6.96 -# CONFIG_PARPORT is not set
    6.97 -
    6.98 -#
    6.99 -# Plug and Play configuration
   6.100 -#
   6.101 -CONFIG_PNP=y
   6.102 -# CONFIG_ISAPNP is not set
   6.103 -
   6.104 -#
   6.105 -# Block devices
   6.106 -#
   6.107 -# CONFIG_BLK_DEV_FD is not set
   6.108 -# CONFIG_BLK_DEV_XD is not set
   6.109 -# CONFIG_PARIDE is not set
   6.110 -# CONFIG_BLK_CPQ_DA is not set
   6.111 -# CONFIG_BLK_CPQ_CISS_DA is not set
   6.112 -# CONFIG_CISS_SCSI_TAPE is not set
   6.113 -# CONFIG_CISS_MONITOR_THREAD is not set
   6.114 -# CONFIG_BLK_DEV_DAC960 is not set
   6.115 -# CONFIG_BLK_DEV_UMEM is not set
   6.116 -CONFIG_BLK_DEV_LOOP=y
   6.117 -CONFIG_BLK_DEV_NBD=y
   6.118 -CONFIG_BLK_DEV_RAM=y
   6.119 -CONFIG_BLK_DEV_RAM_SIZE=4096
   6.120 -CONFIG_BLK_DEV_INITRD=y
   6.121 -# CONFIG_BLK_STATS is not set
   6.122 -
   6.123 -#
   6.124 -# Multi-device support (RAID and LVM)
   6.125 -#
   6.126 -# CONFIG_MD is not set
   6.127 -# CONFIG_BLK_DEV_MD is not set
   6.128 -# CONFIG_MD_LINEAR is not set
   6.129 -# CONFIG_MD_RAID0 is not set
   6.130 -# CONFIG_MD_RAID1 is not set
   6.131 -# CONFIG_MD_RAID5 is not set
   6.132 -# CONFIG_MD_MULTIPATH is not set
   6.133 -# CONFIG_BLK_DEV_LVM is not set
   6.134 -
   6.135 -#
   6.136 -# Networking options
   6.137 -#
   6.138 -CONFIG_PACKET=y
   6.139 -CONFIG_PACKET_MMAP=y
   6.140 -# CONFIG_NETLINK_DEV is not set
   6.141 -CONFIG_NETFILTER=y
   6.142 -# CONFIG_NETFILTER_DEBUG is not set
   6.143 -CONFIG_FILTER=y
   6.144 -CONFIG_UNIX=y
   6.145 -CONFIG_INET=y
   6.146 -# CONFIG_IP_MULTICAST is not set
   6.147 -# CONFIG_IP_ADVANCED_ROUTER is not set
   6.148 -CONFIG_IP_PNP=y
   6.149 -CONFIG_IP_PNP_DHCP=y
   6.150 -# CONFIG_IP_PNP_BOOTP is not set
   6.151 -# CONFIG_IP_PNP_RARP is not set
   6.152 -# CONFIG_NET_IPIP is not set
   6.153 -# CONFIG_NET_IPGRE is not set
   6.154 -# CONFIG_ARPD is not set
   6.155 -# CONFIG_INET_ECN is not set
   6.156 -# CONFIG_SYN_COOKIES is not set
   6.157 -
   6.158 -#
   6.159 -#   IP: Netfilter Configuration
   6.160 -#
   6.161 -CONFIG_IP_NF_CONNTRACK=y
   6.162 -CONFIG_IP_NF_FTP=y
   6.163 -# CONFIG_IP_NF_AMANDA is not set
   6.164 -CONFIG_IP_NF_TFTP=y
   6.165 -CONFIG_IP_NF_IRC=y
   6.166 -# CONFIG_IP_NF_QUEUE is not set
   6.167 -CONFIG_IP_NF_IPTABLES=y
   6.168 -# CONFIG_IP_NF_MATCH_LIMIT is not set
   6.169 -# CONFIG_IP_NF_MATCH_MAC is not set
   6.170 -# CONFIG_IP_NF_MATCH_PKTTYPE is not set
   6.171 -# CONFIG_IP_NF_MATCH_MARK is not set
   6.172 -# CONFIG_IP_NF_MATCH_MULTIPORT is not set
   6.173 -# CONFIG_IP_NF_MATCH_TOS is not set
   6.174 -# CONFIG_IP_NF_MATCH_RECENT is not set
   6.175 -# CONFIG_IP_NF_MATCH_ECN is not set
   6.176 -# CONFIG_IP_NF_MATCH_DSCP is not set
   6.177 -# CONFIG_IP_NF_MATCH_AH_ESP is not set
   6.178 -# CONFIG_IP_NF_MATCH_LENGTH is not set
   6.179 -# CONFIG_IP_NF_MATCH_TTL is not set
   6.180 -# CONFIG_IP_NF_MATCH_TCPMSS is not set
   6.181 -# CONFIG_IP_NF_MATCH_HELPER is not set
   6.182 -CONFIG_IP_NF_MATCH_STATE=y
   6.183 -CONFIG_IP_NF_MATCH_CONNTRACK=y
   6.184 -# CONFIG_IP_NF_MATCH_UNCLEAN is not set
   6.185 -# CONFIG_IP_NF_MATCH_OWNER is not set
   6.186 -CONFIG_IP_NF_MATCH_PHYSDEV=y
   6.187 -CONFIG_IP_NF_FILTER=y
   6.188 -CONFIG_IP_NF_TARGET_REJECT=y
   6.189 -# CONFIG_IP_NF_TARGET_MIRROR is not set
   6.190 -CONFIG_IP_NF_NAT=y
   6.191 -CONFIG_IP_NF_NAT_NEEDED=y
   6.192 -CONFIG_IP_NF_TARGET_MASQUERADE=y
   6.193 -CONFIG_IP_NF_TARGET_REDIRECT=y
   6.194 -# CONFIG_IP_NF_NAT_LOCAL is not set
   6.195 -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
   6.196 -CONFIG_IP_NF_NAT_IRC=y
   6.197 -CONFIG_IP_NF_NAT_FTP=y
   6.198 -CONFIG_IP_NF_NAT_TFTP=y
   6.199 -# CONFIG_IP_NF_MANGLE is not set
   6.200 -CONFIG_IP_NF_TARGET_LOG=y
   6.201 -CONFIG_IP_NF_TARGET_ULOG=y
   6.202 -# CONFIG_IP_NF_TARGET_TCPMSS is not set
   6.203 -# CONFIG_IP_NF_ARPTABLES is not set
   6.204 -
   6.205 -#
   6.206 -#   IP: Virtual Server Configuration
   6.207 -#
   6.208 -# CONFIG_IP_VS is not set
   6.209 -# CONFIG_IPV6 is not set
   6.210 -# CONFIG_KHTTPD is not set
   6.211 -
   6.212 -#
   6.213 -#    SCTP Configuration (EXPERIMENTAL)
   6.214 -#
   6.215 -# CONFIG_IP_SCTP is not set
   6.216 -# CONFIG_ATM is not set
   6.217 -# CONFIG_VLAN_8021Q is not set
   6.218 -
   6.219 -#
   6.220 -#  
   6.221 -#
   6.222 -# CONFIG_IPX is not set
   6.223 -# CONFIG_ATALK is not set
   6.224 -
   6.225 -#
   6.226 -# Appletalk devices
   6.227 -#
   6.228 -# CONFIG_DEV_APPLETALK is not set
   6.229 -# CONFIG_DECNET is not set
   6.230 -CONFIG_BRIDGE=y
   6.231 -# CONFIG_BRIDGE_NF_EBTABLES is not set
   6.232 -# CONFIG_BRIDGE_EBT_T_FILTER is not set
   6.233 -# CONFIG_BRIDGE_EBT_T_NAT is not set
   6.234 -# CONFIG_BRIDGE_EBT_BROUTE is not set
   6.235 -# CONFIG_BRIDGE_EBT_LOG is not set
   6.236 -# CONFIG_BRIDGE_EBT_IPF is not set
   6.237 -# CONFIG_BRIDGE_EBT_ARPF is not set
   6.238 -# CONFIG_BRIDGE_EBT_AMONG is not set
   6.239 -# CONFIG_BRIDGE_EBT_LIMIT is not set
   6.240 -# CONFIG_BRIDGE_EBT_VLANF is not set
   6.241 -# CONFIG_BRIDGE_EBT_802_3 is not set
   6.242 -# CONFIG_BRIDGE_EBT_PKTTYPE is not set
   6.243 -# CONFIG_BRIDGE_EBT_STP is not set
   6.244 -# CONFIG_BRIDGE_EBT_MARKF is not set
   6.245 -# CONFIG_BRIDGE_EBT_ARPREPLY is not set
   6.246 -# CONFIG_BRIDGE_EBT_SNAT is not set
   6.247 -# CONFIG_BRIDGE_EBT_DNAT is not set
   6.248 -# CONFIG_BRIDGE_EBT_REDIRECT is not set
   6.249 -# CONFIG_BRIDGE_EBT_MARK_T is not set
   6.250 -# CONFIG_X25 is not set
   6.251 -# CONFIG_LAPB is not set
   6.252 -# CONFIG_LLC is not set
   6.253 -# CONFIG_NET_DIVERT is not set
   6.254 -# CONFIG_ECONET is not set
   6.255 -# CONFIG_WAN_ROUTER is not set
   6.256 -# CONFIG_NET_FASTROUTE is not set
   6.257 -# CONFIG_NET_HW_FLOWCONTROL is not set
   6.258 -
   6.259 -#
   6.260 -# QoS and/or fair queueing
   6.261 -#
   6.262 -# CONFIG_NET_SCHED is not set
   6.263 -
   6.264 -#
   6.265 -# Network testing
   6.266 -#
   6.267 -# CONFIG_NET_PKTGEN is not set
   6.268 -
   6.269 -#
   6.270 -# ATA/IDE/MFM/RLL support
   6.271 -#
   6.272 -CONFIG_IDE=y
   6.273 -
   6.274 -#
   6.275 -# IDE, ATA and ATAPI Block devices
   6.276 -#
   6.277 -CONFIG_BLK_DEV_IDE=y
   6.278 -
   6.279 -#
   6.280 -# Please see Documentation/ide.txt for help/info on IDE drives
   6.281 -#
   6.282 -# CONFIG_BLK_DEV_HD_IDE is not set
   6.283 -# CONFIG_BLK_DEV_HD is not set
   6.284 -CONFIG_BLK_DEV_IDEDISK=y
   6.285 -CONFIG_IDEDISK_MULTI_MODE=y
   6.286 -CONFIG_IDEDISK_STROKE=y
   6.287 -# CONFIG_BLK_DEV_IDECS is not set
   6.288 -CONFIG_BLK_DEV_IDECD=y
   6.289 -CONFIG_BLK_DEV_IDETAPE=y
   6.290 -CONFIG_BLK_DEV_IDEFLOPPY=y
   6.291 -CONFIG_BLK_DEV_IDESCSI=y
   6.292 -CONFIG_IDE_TASK_IOCTL=y
   6.293 -
   6.294 -#
   6.295 -# IDE chipset support/bugfixes
   6.296 -#
   6.297 -CONFIG_BLK_DEV_CMD640=y
   6.298 -CONFIG_BLK_DEV_CMD640_ENHANCED=y
   6.299 -# CONFIG_BLK_DEV_ISAPNP is not set
   6.300 -CONFIG_BLK_DEV_IDEPCI=y
   6.301 -CONFIG_BLK_DEV_GENERIC=y
   6.302 -CONFIG_IDEPCI_SHARE_IRQ=y
   6.303 -CONFIG_BLK_DEV_IDEDMA_PCI=y
   6.304 -CONFIG_BLK_DEV_OFFBOARD=y
   6.305 -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
   6.306 -CONFIG_IDEDMA_PCI_AUTO=y
   6.307 -# CONFIG_IDEDMA_ONLYDISK is not set
   6.308 -CONFIG_BLK_DEV_IDEDMA=y
   6.309 -# CONFIG_IDEDMA_PCI_WIP is not set
   6.310 -CONFIG_BLK_DEV_ADMA100=y
   6.311 -CONFIG_BLK_DEV_AEC62XX=y
   6.312 -CONFIG_BLK_DEV_ALI15X3=y
   6.313 -CONFIG_WDC_ALI15X3=y
   6.314 -CONFIG_BLK_DEV_AMD74XX=y
   6.315 -CONFIG_AMD74XX_OVERRIDE=y
   6.316 -# CONFIG_BLK_DEV_ATIIXP is not set
   6.317 -CONFIG_BLK_DEV_CMD64X=y
   6.318 -CONFIG_BLK_DEV_TRIFLEX=y
   6.319 -CONFIG_BLK_DEV_CY82C693=y
   6.320 -CONFIG_BLK_DEV_CS5530=y
   6.321 -CONFIG_BLK_DEV_HPT34X=y
   6.322 -# CONFIG_HPT34X_AUTODMA is not set
   6.323 -CONFIG_BLK_DEV_HPT366=y
   6.324 -CONFIG_BLK_DEV_PIIX=y
   6.325 -CONFIG_BLK_DEV_NS87415=y
   6.326 -# CONFIG_BLK_DEV_OPTI621 is not set
   6.327 -CONFIG_BLK_DEV_PDC202XX_OLD=y
   6.328 -CONFIG_PDC202XX_BURST=y
   6.329 -CONFIG_BLK_DEV_PDC202XX_NEW=y
   6.330 -CONFIG_PDC202XX_FORCE=y
   6.331 -CONFIG_BLK_DEV_RZ1000=y
   6.332 -CONFIG_BLK_DEV_SC1200=y
   6.333 -CONFIG_BLK_DEV_SVWKS=y
   6.334 -CONFIG_BLK_DEV_SIIMAGE=y
   6.335 -CONFIG_BLK_DEV_SIS5513=y
   6.336 -CONFIG_BLK_DEV_SLC90E66=y
   6.337 -CONFIG_BLK_DEV_TRM290=y
   6.338 -CONFIG_BLK_DEV_VIA82CXXX=y
   6.339 -CONFIG_IDE_CHIPSETS=y
   6.340 -
   6.341 -#
   6.342 -# Note: most of these also require special kernel boot parameters
   6.343 -#
   6.344 -# CONFIG_BLK_DEV_4DRIVES is not set
   6.345 -# CONFIG_BLK_DEV_ALI14XX is not set
   6.346 -# CONFIG_BLK_DEV_DTC2278 is not set
   6.347 -# CONFIG_BLK_DEV_HT6560B is not set
   6.348 -# CONFIG_BLK_DEV_PDC4030 is not set
   6.349 -# CONFIG_BLK_DEV_QD65XX is not set
   6.350 -# CONFIG_BLK_DEV_UMC8672 is not set
   6.351 -CONFIG_IDEDMA_AUTO=y
   6.352 -# CONFIG_IDEDMA_IVB is not set
   6.353 -# CONFIG_DMA_NONPCI is not set
   6.354 -CONFIG_BLK_DEV_PDC202XX=y
   6.355 -# CONFIG_BLK_DEV_ATARAID is not set
   6.356 -# CONFIG_BLK_DEV_ATARAID_PDC is not set
   6.357 -# CONFIG_BLK_DEV_ATARAID_HPT is not set
   6.358 -# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
   6.359 -# CONFIG_BLK_DEV_ATARAID_SII is not set
   6.360 -
   6.361 -#
   6.362 -# SCSI support
   6.363 -#
   6.364 -CONFIG_SCSI=y
   6.365 -
   6.366 -#
   6.367 -# SCSI support type (disk, tape, CD-ROM)
   6.368 -#
   6.369 -CONFIG_BLK_DEV_SD=y
   6.370 -CONFIG_SD_EXTRA_DEVS=40
   6.371 -# CONFIG_CHR_DEV_ST is not set
   6.372 -# CONFIG_CHR_DEV_OSST is not set
   6.373 -# CONFIG_BLK_DEV_SR is not set
   6.374 -CONFIG_CHR_DEV_SG=y
   6.375 -
   6.376 -#
   6.377 -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
   6.378 -#
   6.379 -# CONFIG_SCSI_DEBUG_QUEUES is not set
   6.380 -# CONFIG_SCSI_MULTI_LUN is not set
   6.381 -# CONFIG_SCSI_CONSTANTS is not set
   6.382 -# CONFIG_SCSI_LOGGING is not set
   6.383 -
   6.384 -#
   6.385 -# SCSI low-level drivers
   6.386 -#
   6.387 -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
   6.388 -# CONFIG_SCSI_7000FASST is not set
   6.389 -# CONFIG_SCSI_ACARD is not set
   6.390 -# CONFIG_SCSI_AHA152X is not set
   6.391 -# CONFIG_SCSI_AHA1542 is not set
   6.392 -# CONFIG_SCSI_AHA1740 is not set
   6.393 -CONFIG_SCSI_AACRAID=y
   6.394 -CONFIG_SCSI_AIC7XXX=y
   6.395 -CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
   6.396 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000
   6.397 -# CONFIG_AIC7XXX_PROBE_EISA_VL is not set
   6.398 -# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
   6.399 -# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
   6.400 -CONFIG_AIC7XXX_DEBUG_MASK=0
   6.401 -# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
   6.402 -CONFIG_SCSI_AIC79XX=y
   6.403 -CONFIG_AIC79XX_CMDS_PER_DEVICE=32
   6.404 -CONFIG_AIC79XX_RESET_DELAY_MS=15000
   6.405 -# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
   6.406 -# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
   6.407 -# CONFIG_AIC79XX_DEBUG_ENABLE is not set
   6.408 -CONFIG_AIC79XX_DEBUG_MASK=0
   6.409 -# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
   6.410 -# CONFIG_SCSI_DPT_I2O is not set
   6.411 -# CONFIG_SCSI_ADVANSYS is not set
   6.412 -# CONFIG_SCSI_IN2000 is not set
   6.413 -# CONFIG_SCSI_AM53C974 is not set
   6.414 -CONFIG_SCSI_MEGARAID=y
   6.415 -# CONFIG_SCSI_MEGARAID2 is not set
   6.416 -CONFIG_SCSI_BUSLOGIC=y
   6.417 -# CONFIG_SCSI_OMIT_FLASHPOINT is not set
   6.418 -# CONFIG_SCSI_CPQFCTS is not set
   6.419 -# CONFIG_SCSI_DMX3191D is not set
   6.420 -# CONFIG_SCSI_DTC3280 is not set
   6.421 -# CONFIG_SCSI_EATA is not set
   6.422 -# CONFIG_SCSI_EATA_DMA is not set
   6.423 -# CONFIG_SCSI_EATA_PIO is not set
   6.424 -# CONFIG_SCSI_FUTURE_DOMAIN is not set
   6.425 -# CONFIG_SCSI_GDTH is not set
   6.426 -# CONFIG_SCSI_GENERIC_NCR5380 is not set
   6.427 -# CONFIG_SCSI_IPS is not set
   6.428 -# CONFIG_SCSI_INITIO is not set
   6.429 -# CONFIG_SCSI_INIA100 is not set
   6.430 -# CONFIG_SCSI_NCR53C406A is not set
   6.431 -# CONFIG_SCSI_NCR53C7xx is not set
   6.432 -CONFIG_SCSI_SYM53C8XX_2=y
   6.433 -CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
   6.434 -CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
   6.435 -CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
   6.436 -# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
   6.437 -# CONFIG_SCSI_PAS16 is not set
   6.438 -# CONFIG_SCSI_PCI2000 is not set
   6.439 -# CONFIG_SCSI_PCI2220I is not set
   6.440 -# CONFIG_SCSI_PSI240I is not set
   6.441 -# CONFIG_SCSI_QLOGIC_FAS is not set
   6.442 -# CONFIG_SCSI_QLOGIC_ISP is not set
   6.443 -# CONFIG_SCSI_QLOGIC_FC is not set
   6.444 -# CONFIG_SCSI_QLOGIC_1280 is not set
   6.445 -# CONFIG_SCSI_SEAGATE is not set
   6.446 -# CONFIG_SCSI_SIM710 is not set
   6.447 -# CONFIG_SCSI_SYM53C416 is not set
   6.448 -# CONFIG_SCSI_DC390T is not set
   6.449 -# CONFIG_SCSI_T128 is not set
   6.450 -# CONFIG_SCSI_U14_34F is not set
   6.451 -# CONFIG_SCSI_ULTRASTOR is not set
   6.452 -# CONFIG_SCSI_NSP32 is not set
   6.453 -# CONFIG_SCSI_DEBUG is not set
   6.454 -
   6.455 -#
   6.456 -# Fusion MPT device support
   6.457 -#
   6.458 -# CONFIG_FUSION is not set
   6.459 -# CONFIG_FUSION_BOOT is not set
   6.460 -# CONFIG_FUSION_ISENSE is not set
   6.461 -# CONFIG_FUSION_CTL is not set
   6.462 -# CONFIG_FUSION_LAN is not set
   6.463 -
   6.464 -#
   6.465 -# IEEE 1394 (FireWire) support (EXPERIMENTAL)
   6.466 -#
   6.467 -# CONFIG_IEEE1394 is not set
   6.468 -
   6.469 -#
   6.470 -# I2O device support
   6.471 -#
   6.472 -# CONFIG_I2O is not set
   6.473 -# CONFIG_I2O_PCI is not set
   6.474 -# CONFIG_I2O_BLOCK is not set
   6.475 -# CONFIG_I2O_LAN is not set
   6.476 -# CONFIG_I2O_SCSI is not set
   6.477 -# CONFIG_I2O_PROC is not set
   6.478 -
   6.479 -#
   6.480 -# Network device support
   6.481 -#
   6.482 -CONFIG_NETDEVICES=y
   6.483 -
   6.484 -#
   6.485 -# ARCnet devices
   6.486 -#
   6.487 -# CONFIG_ARCNET is not set
   6.488 -# CONFIG_DUMMY is not set
   6.489 -# CONFIG_BONDING is not set
   6.490 -# CONFIG_EQUALIZER is not set
   6.491 -# CONFIG_TUN is not set
   6.492 -# CONFIG_ETHERTAP is not set
   6.493 -
   6.494 -#
   6.495 -# Ethernet (10 or 100Mbit)
   6.496 -#
   6.497 -CONFIG_NET_ETHERNET=y
   6.498 -# CONFIG_SUNLANCE is not set
   6.499 -# CONFIG_HAPPYMEAL is not set
   6.500 -# CONFIG_SUNBMAC is not set
   6.501 -# CONFIG_SUNQE is not set
   6.502 -# CONFIG_SUNGEM is not set
   6.503 -CONFIG_NET_VENDOR_3COM=y
   6.504 -# CONFIG_EL1 is not set
   6.505 -# CONFIG_EL2 is not set
   6.506 -# CONFIG_ELPLUS is not set
   6.507 -# CONFIG_EL16 is not set
   6.508 -# CONFIG_EL3 is not set
   6.509 -# CONFIG_3C515 is not set
   6.510 -# CONFIG_ELMC is not set
   6.511 -# CONFIG_ELMC_II is not set
   6.512 -CONFIG_VORTEX=y
   6.513 -# CONFIG_TYPHOON is not set
   6.514 -# CONFIG_LANCE is not set
   6.515 -# CONFIG_NET_VENDOR_SMC is not set
   6.516 -# CONFIG_NET_VENDOR_RACAL is not set
   6.517 -# CONFIG_AT1700 is not set
   6.518 -# CONFIG_DEPCA is not set
   6.519 -# CONFIG_HP100 is not set
   6.520 -# CONFIG_NET_ISA is not set
   6.521 -CONFIG_NET_PCI=y
   6.522 -CONFIG_PCNET32=y
   6.523 -# CONFIG_AMD8111_ETH is not set
   6.524 -# CONFIG_ADAPTEC_STARFIRE is not set
   6.525 -# CONFIG_AC3200 is not set
   6.526 -# CONFIG_APRICOT is not set
   6.527 -# CONFIG_B44 is not set
   6.528 -# CONFIG_CS89x0 is not set
   6.529 -# CONFIG_TULIP is not set
   6.530 -# CONFIG_DE4X5 is not set
   6.531 -# CONFIG_DGRS is not set
   6.532 -# CONFIG_DM9102 is not set
   6.533 -# CONFIG_EEPRO100 is not set
   6.534 -# CONFIG_EEPRO100_PIO is not set
   6.535 -CONFIG_E100=y
   6.536 -# CONFIG_LNE390 is not set
   6.537 -# CONFIG_FEALNX is not set
   6.538 -# CONFIG_NATSEMI is not set
   6.539 -# CONFIG_NE2K_PCI is not set
   6.540 -# CONFIG_FORCEDETH is not set
   6.541 -# CONFIG_NE3210 is not set
   6.542 -# CONFIG_ES3210 is not set
   6.543 -# CONFIG_8139CP is not set
   6.544 -# CONFIG_8139TOO is not set
   6.545 -# CONFIG_8139TOO_PIO is not set
   6.546 -# CONFIG_8139TOO_TUNE_TWISTER is not set
   6.547 -# CONFIG_8139TOO_8129 is not set
   6.548 -# CONFIG_8139_OLD_RX_RESET is not set
   6.549 -# CONFIG_SIS900 is not set
   6.550 -# CONFIG_EPIC100 is not set
   6.551 -# CONFIG_SUNDANCE is not set
   6.552 -# CONFIG_SUNDANCE_MMIO is not set
   6.553 -# CONFIG_TLAN is not set
   6.554 -# CONFIG_VIA_RHINE is not set
   6.555 -# CONFIG_VIA_RHINE_MMIO is not set
   6.556 -# CONFIG_WINBOND_840 is not set
   6.557 -# CONFIG_NET_POCKET is not set
   6.558 -
   6.559 -#
   6.560 -# Ethernet (1000 Mbit)
   6.561 -#
   6.562 -# CONFIG_ACENIC is not set
   6.563 -# CONFIG_DL2K is not set
   6.564 -CONFIG_E1000=y
   6.565 -# CONFIG_E1000_NAPI is not set
   6.566 -# CONFIG_MYRI_SBUS is not set
   6.567 -# CONFIG_NS83820 is not set
   6.568 -# CONFIG_HAMACHI is not set
   6.569 -# CONFIG_YELLOWFIN is not set
   6.570 -# CONFIG_R8169 is not set
   6.571 -# CONFIG_SK98LIN is not set
   6.572 -CONFIG_TIGON3=y
   6.573 -# CONFIG_FDDI is not set
   6.574 -# CONFIG_HIPPI is not set
   6.575 -# CONFIG_PLIP is not set
   6.576 -# CONFIG_PPP is not set
   6.577 -# CONFIG_SLIP is not set
   6.578 -
   6.579 -#
   6.580 -# Wireless LAN (non-hamradio)
   6.581 -#
   6.582 -# CONFIG_NET_RADIO is not set
   6.583 -
   6.584 -#
   6.585 -# Token Ring devices
   6.586 -#
   6.587 -# CONFIG_TR is not set
   6.588 -# CONFIG_NET_FC is not set
   6.589 -# CONFIG_RCPCI is not set
   6.590 -# CONFIG_SHAPER is not set
   6.591 -
   6.592 -#
   6.593 -# Wan interfaces
   6.594 -#
   6.595 -# CONFIG_WAN is not set
   6.596 -
   6.597 -#
   6.598 -# Amateur Radio support
   6.599 -#
   6.600 -# CONFIG_HAMRADIO is not set
   6.601 -
   6.602 -#
   6.603 -# IrDA (infrared) support
   6.604 -#
   6.605 -# CONFIG_IRDA is not set
   6.606 -
   6.607 -#
   6.608 -# ISDN subsystem
   6.609 -#
   6.610 -# CONFIG_ISDN is not set
   6.611 -
   6.612 -#
   6.613 -# Old CD-ROM drivers (not SCSI, not IDE)
   6.614 -#
   6.615 -# CONFIG_CD_NO_IDESCSI is not set
   6.616 -
   6.617 -#
   6.618 -# Input core support
   6.619 -#
   6.620 -# CONFIG_INPUT is not set
   6.621 -# CONFIG_INPUT_KEYBDEV is not set
   6.622 -# CONFIG_INPUT_MOUSEDEV is not set
   6.623 -# CONFIG_INPUT_JOYDEV is not set
   6.624 -# CONFIG_INPUT_EVDEV is not set
   6.625 -# CONFIG_INPUT_UINPUT is not set
   6.626 -
   6.627 -#
   6.628 -# Character devices
   6.629 -#
   6.630 -CONFIG_VT=y
   6.631 -CONFIG_VT_CONSOLE=y
   6.632 -# CONFIG_SERIAL is not set
   6.633 -# CONFIG_SERIAL_EXTENDED is not set
   6.634 -# CONFIG_SERIAL_NONSTANDARD is not set
   6.635 -CONFIG_UNIX98_PTYS=y
   6.636 -CONFIG_UNIX98_PTY_COUNT=256
   6.637 -
   6.638 -#
   6.639 -# I2C support
   6.640 -#
   6.641 -# CONFIG_I2C is not set
   6.642 -
   6.643 -#
   6.644 -# Mice
   6.645 -#
   6.646 -# CONFIG_BUSMOUSE is not set
   6.647 -CONFIG_MOUSE=y
   6.648 -CONFIG_PSMOUSE=y
   6.649 -# CONFIG_82C710_MOUSE is not set
   6.650 -# CONFIG_PC110_PAD is not set
   6.651 -# CONFIG_MK712_MOUSE is not set
   6.652 -
   6.653 -#
   6.654 -# Joysticks
   6.655 -#
   6.656 -# CONFIG_INPUT_GAMEPORT is not set
   6.657 -
   6.658 -#
   6.659 -# Input core support is needed for gameports
   6.660 -#
   6.661 -
   6.662 -#
   6.663 -# Input core support is needed for joysticks
   6.664 -#
   6.665 -# CONFIG_QIC02_TAPE is not set
   6.666 -# CONFIG_IPMI_HANDLER is not set
   6.667 -# CONFIG_IPMI_PANIC_EVENT is not set
   6.668 -# CONFIG_IPMI_DEVICE_INTERFACE is not set
   6.669 -# CONFIG_IPMI_KCS is not set
   6.670 -# CONFIG_IPMI_WATCHDOG is not set
   6.671 -
   6.672 -#
   6.673 -# Watchdog Cards
   6.674 -#
   6.675 -# CONFIG_WATCHDOG is not set
   6.676 -# CONFIG_SCx200 is not set
   6.677 -# CONFIG_SCx200_GPIO is not set
   6.678 -# CONFIG_AMD_RNG is not set
   6.679 -# CONFIG_INTEL_RNG is not set
   6.680 -# CONFIG_HW_RANDOM is not set
   6.681 -# CONFIG_AMD_PM768 is not set
   6.682 -# CONFIG_NVRAM is not set
   6.683 -# CONFIG_RTC is not set
   6.684 -# CONFIG_DTLK is not set
   6.685 -# CONFIG_R3964 is not set
   6.686 -# CONFIG_APPLICOM is not set
   6.687 -# CONFIG_SONYPI is not set
   6.688 -
   6.689 -#
   6.690 -# Ftape, the floppy tape device driver
   6.691 -#
   6.692 -# CONFIG_FTAPE is not set
   6.693 -# CONFIG_AGP is not set
   6.694 -
   6.695 -#
   6.696 -# Direct Rendering Manager (XFree86 DRI support)
   6.697 -#
   6.698 -# CONFIG_DRM is not set
   6.699 -# CONFIG_MWAVE is not set
   6.700 -# CONFIG_OBMOUSE is not set
   6.701 -
   6.702 -#
   6.703 -# Multimedia devices
   6.704 -#
   6.705 -# CONFIG_VIDEO_DEV is not set
   6.706 -
   6.707 -#
   6.708 -# File systems
   6.709 -#
   6.710 -# CONFIG_QUOTA is not set
   6.711 -# CONFIG_QFMT_V2 is not set
   6.712 -CONFIG_AUTOFS_FS=y
   6.713 -CONFIG_AUTOFS4_FS=y
   6.714 -# CONFIG_REISERFS_FS is not set
   6.715 -# CONFIG_REISERFS_CHECK is not set
   6.716 -# CONFIG_REISERFS_PROC_INFO is not set
   6.717 -# CONFIG_ADFS_FS is not set
   6.718 -# CONFIG_ADFS_FS_RW is not set
   6.719 -# CONFIG_AFFS_FS is not set
   6.720 -# CONFIG_HFS_FS is not set
   6.721 -# CONFIG_HFSPLUS_FS is not set
   6.722 -# CONFIG_BEFS_FS is not set
   6.723 -# CONFIG_BEFS_DEBUG is not set
   6.724 -# CONFIG_BFS_FS is not set
   6.725 -CONFIG_EXT3_FS=y
   6.726 -CONFIG_JBD=y
   6.727 -# CONFIG_JBD_DEBUG is not set
   6.728 -CONFIG_FAT_FS=y
   6.729 -CONFIG_MSDOS_FS=y
   6.730 -CONFIG_UMSDOS_FS=y
   6.731 -CONFIG_VFAT_FS=y
   6.732 -# CONFIG_EFS_FS is not set
   6.733 -# CONFIG_JFFS_FS is not set
   6.734 -# CONFIG_JFFS2_FS is not set
   6.735 -# CONFIG_CRAMFS is not set
   6.736 -CONFIG_TMPFS=y
   6.737 -CONFIG_RAMFS=y
   6.738 -CONFIG_ISO9660_FS=y
   6.739 -CONFIG_JOLIET=y
   6.740 -CONFIG_ZISOFS=y
   6.741 -# CONFIG_JFS_FS is not set
   6.742 -# CONFIG_JFS_DEBUG is not set
   6.743 -# CONFIG_JFS_STATISTICS is not set
   6.744 -# CONFIG_MINIX_FS is not set
   6.745 -# CONFIG_VXFS_FS is not set
   6.746 -# CONFIG_NTFS_FS is not set
   6.747 -# CONFIG_NTFS_RW is not set
   6.748 -# CONFIG_HPFS_FS is not set
   6.749 -CONFIG_PROC_FS=y
   6.750 -# CONFIG_DEVFS_FS is not set
   6.751 -# CONFIG_DEVFS_MOUNT is not set
   6.752 -# CONFIG_DEVFS_DEBUG is not set
   6.753 -CONFIG_DEVPTS_FS=y
   6.754 -# CONFIG_QNX4FS_FS is not set
   6.755 -# CONFIG_QNX4FS_RW is not set
   6.756 -# CONFIG_ROMFS_FS is not set
   6.757 -CONFIG_EXT2_FS=y
   6.758 -# CONFIG_SYSV_FS is not set
   6.759 -# CONFIG_UDF_FS is not set
   6.760 -# CONFIG_UDF_RW is not set
   6.761 -# CONFIG_UFS_FS is not set
   6.762 -# CONFIG_UFS_FS_WRITE is not set
   6.763 -# CONFIG_XFS_FS is not set
   6.764 -# CONFIG_XFS_QUOTA is not set
   6.765 -# CONFIG_XFS_RT is not set
   6.766 -# CONFIG_XFS_TRACE is not set
   6.767 -# CONFIG_XFS_DEBUG is not set
   6.768 -
   6.769 -#
   6.770 -# Network File Systems
   6.771 -#
   6.772 -# CONFIG_CODA_FS is not set
   6.773 -# CONFIG_INTERMEZZO_FS is not set
   6.774 -CONFIG_NFS_FS=y
   6.775 -CONFIG_NFS_V3=y
   6.776 -# CONFIG_NFS_DIRECTIO is not set
   6.777 -CONFIG_ROOT_NFS=y
   6.778 -CONFIG_NFSD=y
   6.779 -CONFIG_NFSD_V3=y
   6.780 -# CONFIG_NFSD_TCP is not set
   6.781 -CONFIG_SUNRPC=y
   6.782 -CONFIG_LOCKD=y
   6.783 -CONFIG_LOCKD_V4=y
   6.784 -# CONFIG_SMB_FS is not set
   6.785 -# CONFIG_NCP_FS is not set
   6.786 -# CONFIG_NCPFS_PACKET_SIGNING is not set
   6.787 -# CONFIG_NCPFS_IOCTL_LOCKING is not set
   6.788 -# CONFIG_NCPFS_STRONG is not set
   6.789 -# CONFIG_NCPFS_NFS_NS is not set
   6.790 -# CONFIG_NCPFS_OS2_NS is not set
   6.791 -# CONFIG_NCPFS_SMALLDOS is not set
   6.792 -# CONFIG_NCPFS_NLS is not set
   6.793 -# CONFIG_NCPFS_EXTRAS is not set
   6.794 -CONFIG_ZISOFS_FS=y
   6.795 -
   6.796 -#
   6.797 -# Partition Types
   6.798 -#
   6.799 -CONFIG_PARTITION_ADVANCED=y
   6.800 -# CONFIG_ACORN_PARTITION is not set
   6.801 -# CONFIG_OSF_PARTITION is not set
   6.802 -# CONFIG_AMIGA_PARTITION is not set
   6.803 -# CONFIG_ATARI_PARTITION is not set
   6.804 -# CONFIG_MAC_PARTITION is not set
   6.805 -CONFIG_MSDOS_PARTITION=y
   6.806 -# CONFIG_BSD_DISKLABEL is not set
   6.807 -# CONFIG_MINIX_SUBPARTITION is not set
   6.808 -# CONFIG_SOLARIS_X86_PARTITION is not set
   6.809 -# CONFIG_UNIXWARE_DISKLABEL is not set
   6.810 -# CONFIG_LDM_PARTITION is not set
   6.811 -# CONFIG_SGI_PARTITION is not set
   6.812 -# CONFIG_ULTRIX_PARTITION is not set
   6.813 -# CONFIG_SUN_PARTITION is not set
   6.814 -# CONFIG_EFI_PARTITION is not set
   6.815 -# CONFIG_SMB_NLS is not set
   6.816 -CONFIG_NLS=y
   6.817 -
   6.818 -#
   6.819 -# Native Language Support
   6.820 -#
   6.821 -CONFIG_NLS_DEFAULT="iso8559-1"
   6.822 -# CONFIG_NLS_CODEPAGE_437 is not set
   6.823 -# CONFIG_NLS_CODEPAGE_737 is not set
   6.824 -# CONFIG_NLS_CODEPAGE_775 is not set
   6.825 -# CONFIG_NLS_CODEPAGE_850 is not set
   6.826 -# CONFIG_NLS_CODEPAGE_852 is not set
   6.827 -# CONFIG_NLS_CODEPAGE_855 is not set
   6.828 -# CONFIG_NLS_CODEPAGE_857 is not set
   6.829 -# CONFIG_NLS_CODEPAGE_860 is not set
   6.830 -# CONFIG_NLS_CODEPAGE_861 is not set
   6.831 -# CONFIG_NLS_CODEPAGE_862 is not set
   6.832 -# CONFIG_NLS_CODEPAGE_863 is not set
   6.833 -# CONFIG_NLS_CODEPAGE_864 is not set
   6.834 -# CONFIG_NLS_CODEPAGE_865 is not set
   6.835 -# CONFIG_NLS_CODEPAGE_866 is not set
   6.836 -# CONFIG_NLS_CODEPAGE_869 is not set
   6.837 -# CONFIG_NLS_CODEPAGE_936 is not set
   6.838 -# CONFIG_NLS_CODEPAGE_950 is not set
   6.839 -# CONFIG_NLS_CODEPAGE_932 is not set
   6.840 -# CONFIG_NLS_CODEPAGE_949 is not set
   6.841 -# CONFIG_NLS_CODEPAGE_874 is not set
   6.842 -# CONFIG_NLS_ISO8859_8 is not set
   6.843 -# CONFIG_NLS_CODEPAGE_1250 is not set
   6.844 -# CONFIG_NLS_CODEPAGE_1251 is not set
   6.845 -CONFIG_NLS_ISO8859_1=y
   6.846 -# CONFIG_NLS_ISO8859_2 is not set
   6.847 -# CONFIG_NLS_ISO8859_3 is not set
   6.848 -# CONFIG_NLS_ISO8859_4 is not set
   6.849 -# CONFIG_NLS_ISO8859_5 is not set
   6.850 -# CONFIG_NLS_ISO8859_6 is not set
   6.851 -# CONFIG_NLS_ISO8859_7 is not set
   6.852 -# CONFIG_NLS_ISO8859_9 is not set
   6.853 -# CONFIG_NLS_ISO8859_13 is not set
   6.854 -# CONFIG_NLS_ISO8859_14 is not set
   6.855 -# CONFIG_NLS_ISO8859_15 is not set
   6.856 -# CONFIG_NLS_KOI8_R is not set
   6.857 -# CONFIG_NLS_KOI8_U is not set
   6.858 -# CONFIG_NLS_UTF8 is not set
   6.859 -
   6.860 -#
   6.861 -# Console drivers
   6.862 -#
   6.863 -CONFIG_XEN_CONSOLE=y
   6.864 -CONFIG_VGA_CONSOLE=y
   6.865 -CONFIG_DUMMY_CONSOLE=y
   6.866 -# CONFIG_VIDEO_SELECT is not set
   6.867 -# CONFIG_MDA_CONSOLE is not set
   6.868 -
   6.869 -#
   6.870 -# Frame-buffer support
   6.871 -#
   6.872 -# CONFIG_FB is not set
   6.873 -
   6.874 -#
   6.875 -# Sound
   6.876 -#
   6.877 -# CONFIG_SOUND is not set
   6.878 -
   6.879 -#
   6.880 -# USB support
   6.881 -#
   6.882 -# CONFIG_USB is not set
   6.883 -
   6.884 -#
   6.885 -# Support for USB gadgets
   6.886 -#
   6.887 -# CONFIG_USB_GADGET is not set
   6.888 -
   6.889 -#
   6.890 -# Bluetooth support
   6.891 -#
   6.892 -# CONFIG_BLUEZ is not set
   6.893 -
   6.894 -#
   6.895 -# Kernel hacking
   6.896 -#
   6.897 -CONFIG_DEBUG_KERNEL=y
   6.898 -# CONFIG_DEBUG_STACKOVERFLOW is not set
   6.899 -# CONFIG_DEBUG_HIGHMEM is not set
   6.900 -# CONFIG_DEBUG_SLAB is not set
   6.901 -# CONFIG_DEBUG_IOVIRT is not set
   6.902 -# CONFIG_MAGIC_SYSRQ is not set
   6.903 -# CONFIG_DEBUG_SPINLOCK is not set
   6.904 -# CONFIG_DEBUG_BUGVERBOSE is not set
   6.905 -CONFIG_KALLSYMS=y
   6.906 -# CONFIG_FRAME_POINTER is not set
   6.907 -CONFIG_LOG_BUF_SHIFT=0
   6.908 -
   6.909 -#
   6.910 -# Cryptographic options
   6.911 -#
   6.912 -CONFIG_CRYPTO=y
   6.913 -CONFIG_CRYPTO_HMAC=y
   6.914 -CONFIG_CRYPTO_NULL=m
   6.915 -CONFIG_CRYPTO_MD4=m
   6.916 -CONFIG_CRYPTO_MD5=m
   6.917 -CONFIG_CRYPTO_SHA1=m
   6.918 -CONFIG_CRYPTO_SHA256=m
   6.919 -CONFIG_CRYPTO_SHA512=m
   6.920 -CONFIG_CRYPTO_DES=m
   6.921 -CONFIG_CRYPTO_BLOWFISH=m
   6.922 -CONFIG_CRYPTO_TWOFISH=m
   6.923 -CONFIG_CRYPTO_SERPENT=m
   6.924 -CONFIG_CRYPTO_AES=m
   6.925 -CONFIG_CRYPTO_CAST5=m
   6.926 -CONFIG_CRYPTO_CAST6=m
   6.927 -CONFIG_CRYPTO_ARC4=m
   6.928 -CONFIG_CRYPTO_DEFLATE=m
   6.929 -# CONFIG_CRYPTO_TEST is not set
   6.930 -
   6.931 -#
   6.932 -# Library routines
   6.933 -#
   6.934 -# CONFIG_CRC32 is not set
   6.935 -CONFIG_ZLIB_INFLATE=y
   6.936 -CONFIG_ZLIB_DEFLATE=m
   6.937 -# CONFIG_FW_LOADER is not set
     7.1 --- a/linux-2.4.26-xen-sparse/arch/xen/defconfig-xenU	Sat Aug 21 10:28:38 2004 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,549 +0,0 @@
     7.4 -#
     7.5 -# Automatically generated make config: don't edit
     7.6 -#
     7.7 -CONFIG_XEN=y
     7.8 -CONFIG_X86=y
     7.9 -CONFIG_ISA=y
    7.10 -# CONFIG_SBUS is not set
    7.11 -CONFIG_UID16=y
    7.12 -
    7.13 -#
    7.14 -# Xen
    7.15 -#
    7.16 -# CONFIG_XEN_PRIVILEGED_GUEST is not set
    7.17 -# CONFIG_XEN_PHYSDEV_ACCESS is not set
    7.18 -CONFIG_NO_IDLE_HZ=y
    7.19 -# CONFIG_FOREIGN_PAGES is not set
    7.20 -CONFIG_NETDEVICES=y
    7.21 -# CONFIG_VT is not set
    7.22 -
    7.23 -#
    7.24 -# Code maturity level options
    7.25 -#
    7.26 -CONFIG_EXPERIMENTAL=y
    7.27 -
    7.28 -#
    7.29 -# Loadable module support
    7.30 -#
    7.31 -CONFIG_MODULES=y
    7.32 -CONFIG_MODVERSIONS=y
    7.33 -CONFIG_KMOD=y
    7.34 -
    7.35 -#
    7.36 -# Processor type and features
    7.37 -#
    7.38 -CONFIG_M686=y
    7.39 -# CONFIG_MPENTIUMIII is not set
    7.40 -# CONFIG_MPENTIUM4 is not set
    7.41 -# CONFIG_MK7 is not set
    7.42 -# CONFIG_MK8 is not set
    7.43 -# CONFIG_MVIAC3_2 is not set
    7.44 -CONFIG_X86_WP_WORKS_OK=y
    7.45 -CONFIG_X86_INVLPG=y
    7.46 -CONFIG_X86_CMPXCHG=y
    7.47 -CONFIG_X86_XADD=y
    7.48 -CONFIG_X86_BSWAP=y
    7.49 -CONFIG_X86_POPAD_OK=y
    7.50 -# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
    7.51 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y
    7.52 -CONFIG_X86_GOOD_APIC=y
    7.53 -CONFIG_X86_PGE=y
    7.54 -CONFIG_X86_USE_PPRO_CHECKSUM=y
    7.55 -CONFIG_X86_TSC=y
    7.56 -CONFIG_X86_L1_CACHE_SHIFT=5
    7.57 -CONFIG_NOHIGHMEM=y
    7.58 -# CONFIG_HIGHMEM4G is not set
    7.59 -
    7.60 -#
    7.61 -# General setup
    7.62 -#
    7.63 -CONFIG_NET=y
    7.64 -CONFIG_SYSVIPC=y
    7.65 -# CONFIG_BSD_PROCESS_ACCT is not set
    7.66 -CONFIG_SYSCTL=y
    7.67 -CONFIG_KCORE_ELF=y
    7.68 -# CONFIG_KCORE_AOUT is not set
    7.69 -CONFIG_BINFMT_AOUT=y
    7.70 -CONFIG_BINFMT_ELF=y
    7.71 -# CONFIG_BINFMT_MISC is not set
    7.72 -# CONFIG_OOM_KILLER is not set
    7.73 -
    7.74 -#
    7.75 -# Networking options
    7.76 -#
    7.77 -CONFIG_PACKET=y
    7.78 -CONFIG_PACKET_MMAP=y
    7.79 -# CONFIG_NETLINK_DEV is not set
    7.80 -CONFIG_NETFILTER=y
    7.81 -# CONFIG_NETFILTER_DEBUG is not set
    7.82 -CONFIG_FILTER=y
    7.83 -CONFIG_UNIX=y
    7.84 -CONFIG_INET=y
    7.85 -# CONFIG_IP_MULTICAST is not set
    7.86 -# CONFIG_IP_ADVANCED_ROUTER is not set
    7.87 -CONFIG_IP_PNP=y
    7.88 -CONFIG_IP_PNP_DHCP=y
    7.89 -# CONFIG_IP_PNP_BOOTP is not set
    7.90 -# CONFIG_IP_PNP_RARP is not set
    7.91 -# CONFIG_NET_IPIP is not set
    7.92 -# CONFIG_NET_IPGRE is not set
    7.93 -# CONFIG_ARPD is not set
    7.94 -# CONFIG_INET_ECN is not set
    7.95 -# CONFIG_SYN_COOKIES is not set
    7.96 -
    7.97 -#
    7.98 -#   IP: Netfilter Configuration
    7.99 -#
   7.100 -CONFIG_IP_NF_CONNTRACK=y
   7.101 -CONFIG_IP_NF_FTP=y
   7.102 -# CONFIG_IP_NF_AMANDA is not set
   7.103 -CONFIG_IP_NF_TFTP=y
   7.104 -CONFIG_IP_NF_IRC=y
   7.105 -# CONFIG_IP_NF_QUEUE is not set
   7.106 -CONFIG_IP_NF_IPTABLES=y
   7.107 -# CONFIG_IP_NF_MATCH_LIMIT is not set
   7.108 -# CONFIG_IP_NF_MATCH_MAC is not set
   7.109 -# CONFIG_IP_NF_MATCH_PKTTYPE is not set
   7.110 -# CONFIG_IP_NF_MATCH_MARK is not set
   7.111 -# CONFIG_IP_NF_MATCH_MULTIPORT is not set
   7.112 -# CONFIG_IP_NF_MATCH_TOS is not set
   7.113 -# CONFIG_IP_NF_MATCH_RECENT is not set
   7.114 -# CONFIG_IP_NF_MATCH_ECN is not set
   7.115 -# CONFIG_IP_NF_MATCH_DSCP is not set
   7.116 -# CONFIG_IP_NF_MATCH_AH_ESP is not set
   7.117 -# CONFIG_IP_NF_MATCH_LENGTH is not set
   7.118 -# CONFIG_IP_NF_MATCH_TTL is not set
   7.119 -# CONFIG_IP_NF_MATCH_TCPMSS is not set
   7.120 -# CONFIG_IP_NF_MATCH_HELPER is not set
   7.121 -CONFIG_IP_NF_MATCH_STATE=y
   7.122 -CONFIG_IP_NF_MATCH_CONNTRACK=y
   7.123 -# CONFIG_IP_NF_MATCH_UNCLEAN is not set
   7.124 -# CONFIG_IP_NF_MATCH_OWNER is not set
   7.125 -CONFIG_IP_NF_FILTER=y
   7.126 -CONFIG_IP_NF_TARGET_REJECT=y
   7.127 -# CONFIG_IP_NF_TARGET_MIRROR is not set
   7.128 -CONFIG_IP_NF_NAT=y
   7.129 -CONFIG_IP_NF_NAT_NEEDED=y
   7.130 -CONFIG_IP_NF_TARGET_MASQUERADE=y
   7.131 -CONFIG_IP_NF_TARGET_REDIRECT=y
   7.132 -# CONFIG_IP_NF_NAT_LOCAL is not set
   7.133 -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
   7.134 -CONFIG_IP_NF_NAT_IRC=y
   7.135 -CONFIG_IP_NF_NAT_FTP=y
   7.136 -CONFIG_IP_NF_NAT_TFTP=y
   7.137 -# CONFIG_IP_NF_MANGLE is not set
   7.138 -CONFIG_IP_NF_TARGET_LOG=y
   7.139 -CONFIG_IP_NF_TARGET_ULOG=y
   7.140 -# CONFIG_IP_NF_TARGET_TCPMSS is not set
   7.141 -# CONFIG_IP_NF_ARPTABLES is not set
   7.142 -
   7.143 -#
   7.144 -#   IP: Virtual Server Configuration
   7.145 -#
   7.146 -# CONFIG_IP_VS is not set
   7.147 -# CONFIG_IPV6 is not set
   7.148 -# CONFIG_KHTTPD is not set
   7.149 -
   7.150 -#
   7.151 -#    SCTP Configuration (EXPERIMENTAL)
   7.152 -#
   7.153 -# CONFIG_IP_SCTP is not set
   7.154 -# CONFIG_ATM is not set
   7.155 -# CONFIG_VLAN_8021Q is not set
   7.156 -
   7.157 -#
   7.158 -#  
   7.159 -#
   7.160 -# CONFIG_IPX is not set
   7.161 -# CONFIG_ATALK is not set
   7.162 -
   7.163 -#
   7.164 -# Appletalk devices
   7.165 -#
   7.166 -# CONFIG_DEV_APPLETALK is not set
   7.167 -# CONFIG_DECNET is not set
   7.168 -# CONFIG_BRIDGE is not set
   7.169 -# CONFIG_X25 is not set
   7.170 -# CONFIG_LAPB is not set
   7.171 -# CONFIG_LLC is not set
   7.172 -# CONFIG_NET_DIVERT is not set
   7.173 -# CONFIG_ECONET is not set
   7.174 -# CONFIG_WAN_ROUTER is not set
   7.175 -# CONFIG_NET_FASTROUTE is not set
   7.176 -# CONFIG_NET_HW_FLOWCONTROL is not set
   7.177 -
   7.178 -#
   7.179 -# QoS and/or fair queueing
   7.180 -#
   7.181 -# CONFIG_NET_SCHED is not set
   7.182 -
   7.183 -#
   7.184 -# Network testing
   7.185 -#
   7.186 -# CONFIG_NET_PKTGEN is not set
   7.187 -
   7.188 -#
   7.189 -# SCSI support
   7.190 -#
   7.191 -CONFIG_SCSI=y
   7.192 -
   7.193 -#
   7.194 -# SCSI support type (disk, tape, CD-ROM)
   7.195 -#
   7.196 -CONFIG_BLK_DEV_SD=y
   7.197 -CONFIG_SD_EXTRA_DEVS=40
   7.198 -# CONFIG_CHR_DEV_ST is not set
   7.199 -# CONFIG_CHR_DEV_OSST is not set
   7.200 -# CONFIG_BLK_DEV_SR is not set
   7.201 -CONFIG_CHR_DEV_SG=y
   7.202 -
   7.203 -#
   7.204 -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
   7.205 -#
   7.206 -# CONFIG_SCSI_DEBUG_QUEUES is not set
   7.207 -# CONFIG_SCSI_MULTI_LUN is not set
   7.208 -# CONFIG_SCSI_CONSTANTS is not set
   7.209 -# CONFIG_SCSI_LOGGING is not set
   7.210 -
   7.211 -#
   7.212 -# SCSI low-level drivers
   7.213 -#
   7.214 -# CONFIG_SCSI_7000FASST is not set
   7.215 -# CONFIG_SCSI_ACARD is not set
   7.216 -# CONFIG_SCSI_AHA152X is not set
   7.217 -# CONFIG_SCSI_AHA1542 is not set
   7.218 -# CONFIG_SCSI_AHA1740 is not set
   7.219 -# CONFIG_SCSI_AACRAID is not set
   7.220 -# CONFIG_SCSI_AIC7XXX is not set
   7.221 -# CONFIG_SCSI_AIC79XX is not set
   7.222 -# CONFIG_SCSI_AIC7XXX_OLD is not set
   7.223 -# CONFIG_SCSI_DPT_I2O is not set
   7.224 -# CONFIG_SCSI_ADVANSYS is not set
   7.225 -# CONFIG_SCSI_IN2000 is not set
   7.226 -# CONFIG_SCSI_AM53C974 is not set
   7.227 -# CONFIG_SCSI_MEGARAID is not set
   7.228 -# CONFIG_SCSI_MEGARAID2 is not set
   7.229 -# CONFIG_SCSI_BUSLOGIC is not set
   7.230 -# CONFIG_SCSI_DMX3191D is not set
   7.231 -# CONFIG_SCSI_DTC3280 is not set
   7.232 -# CONFIG_SCSI_EATA is not set
   7.233 -# CONFIG_SCSI_EATA_DMA is not set
   7.234 -# CONFIG_SCSI_EATA_PIO is not set
   7.235 -# CONFIG_SCSI_FUTURE_DOMAIN is not set
   7.236 -# CONFIG_SCSI_GDTH is not set
   7.237 -# CONFIG_SCSI_GENERIC_NCR5380 is not set
   7.238 -# CONFIG_SCSI_IPS is not set
   7.239 -# CONFIG_SCSI_INITIO is not set
   7.240 -# CONFIG_SCSI_INIA100 is not set
   7.241 -# CONFIG_SCSI_PPA is not set
   7.242 -# CONFIG_SCSI_IMM is not set
   7.243 -# CONFIG_SCSI_NCR53C406A is not set
   7.244 -# CONFIG_SCSI_NCR53C7xx is not set
   7.245 -# CONFIG_SCSI_PAS16 is not set
   7.246 -# CONFIG_SCSI_PCI2000 is not set
   7.247 -# CONFIG_SCSI_PCI2220I is not set
   7.248 -# CONFIG_SCSI_PSI240I is not set
   7.249 -# CONFIG_SCSI_QLOGIC_FAS is not set
   7.250 -# CONFIG_SCSI_SEAGATE is not set
   7.251 -# CONFIG_SCSI_SIM710 is not set
   7.252 -# CONFIG_SCSI_SYM53C416 is not set
   7.253 -# CONFIG_SCSI_T128 is not set
   7.254 -# CONFIG_SCSI_U14_34F is not set
   7.255 -# CONFIG_SCSI_ULTRASTOR is not set
   7.256 -# CONFIG_SCSI_NSP32 is not set
   7.257 -# CONFIG_SCSI_DEBUG is not set
   7.258 -
   7.259 -#
   7.260 -# Block devices
   7.261 -#
   7.262 -CONFIG_BLK_DEV_LOOP=y
   7.263 -CONFIG_BLK_DEV_NBD=y
   7.264 -CONFIG_BLK_DEV_RAM=y
   7.265 -CONFIG_BLK_DEV_RAM_SIZE=4096
   7.266 -CONFIG_BLK_DEV_INITRD=y
   7.267 -# CONFIG_BLK_STATS is not set
   7.268 -# CONFIG_BLK_DEV_HD is not set
   7.269 -
   7.270 -#
   7.271 -# Character devices
   7.272 -#
   7.273 -# CONFIG_VT is not set
   7.274 -# CONFIG_SERIAL is not set
   7.275 -# CONFIG_SERIAL_EXTENDED is not set
   7.276 -# CONFIG_SERIAL_NONSTANDARD is not set
   7.277 -CONFIG_UNIX98_PTYS=y
   7.278 -CONFIG_UNIX98_PTY_COUNT=256
   7.279 -# CONFIG_PRINTER is not set
   7.280 -# CONFIG_PPDEV is not set
   7.281 -# CONFIG_TIPAR is not set
   7.282 -
   7.283 -#
   7.284 -# I2C support
   7.285 -#
   7.286 -# CONFIG_I2C is not set
   7.287 -
   7.288 -#
   7.289 -# Mice
   7.290 -#
   7.291 -# CONFIG_BUSMOUSE is not set
   7.292 -CONFIG_MOUSE=y
   7.293 -CONFIG_PSMOUSE=y
   7.294 -# CONFIG_82C710_MOUSE is not set
   7.295 -# CONFIG_PC110_PAD is not set
   7.296 -# CONFIG_MK712_MOUSE is not set
   7.297 -
   7.298 -#
   7.299 -# Joysticks
   7.300 -#
   7.301 -# CONFIG_INPUT_GAMEPORT is not set
   7.302 -# CONFIG_INPUT_NS558 is not set
   7.303 -# CONFIG_INPUT_LIGHTNING is not set
   7.304 -# CONFIG_INPUT_PCIGAME is not set
   7.305 -# CONFIG_INPUT_CS461X is not set
   7.306 -# CONFIG_INPUT_EMU10K1 is not set
   7.307 -# CONFIG_INPUT_SERIO is not set
   7.308 -# CONFIG_INPUT_SERPORT is not set
   7.309 -
   7.310 -#
   7.311 -# Joysticks
   7.312 -#
   7.313 -# CONFIG_INPUT_ANALOG is not set
   7.314 -# CONFIG_INPUT_A3D is not set
   7.315 -# CONFIG_INPUT_ADI is not set
   7.316 -# CONFIG_INPUT_COBRA is not set
   7.317 -# CONFIG_INPUT_GF2K is not set
   7.318 -# CONFIG_INPUT_GRIP is not set
   7.319 -# CONFIG_INPUT_INTERACT is not set
   7.320 -# CONFIG_INPUT_TMDC is not set
   7.321 -# CONFIG_INPUT_SIDEWINDER is not set
   7.322 -# CONFIG_INPUT_IFORCE_USB is not set
   7.323 -# CONFIG_INPUT_IFORCE_232 is not set
   7.324 -# CONFIG_INPUT_WARRIOR is not set
   7.325 -# CONFIG_INPUT_MAGELLAN is not set
   7.326 -# CONFIG_INPUT_SPACEORB is not set
   7.327 -# CONFIG_INPUT_SPACEBALL is not set
   7.328 -# CONFIG_INPUT_STINGER is not set
   7.329 -# CONFIG_INPUT_DB9 is not set
   7.330 -# CONFIG_INPUT_GAMECON is not set
   7.331 -# CONFIG_INPUT_TURBOGRAFX is not set
   7.332 -# CONFIG_QIC02_TAPE is not set
   7.333 -# CONFIG_IPMI_HANDLER is not set
   7.334 -# CONFIG_IPMI_PANIC_EVENT is not set
   7.335 -# CONFIG_IPMI_DEVICE_INTERFACE is not set
   7.336 -# CONFIG_IPMI_KCS is not set
   7.337 -# CONFIG_IPMI_WATCHDOG is not set
   7.338 -
   7.339 -#
   7.340 -# Watchdog Cards
   7.341 -#
   7.342 -# CONFIG_WATCHDOG is not set
   7.343 -# CONFIG_SCx200 is not set
   7.344 -# CONFIG_SCx200_GPIO is not set
   7.345 -# CONFIG_AMD_RNG is not set
   7.346 -# CONFIG_INTEL_RNG is not set
   7.347 -# CONFIG_HW_RANDOM is not set
   7.348 -# CONFIG_AMD_PM768 is not set
   7.349 -# CONFIG_NVRAM is not set
   7.350 -# CONFIG_RTC is not set
   7.351 -# CONFIG_DTLK is not set
   7.352 -# CONFIG_R3964 is not set
   7.353 -# CONFIG_APPLICOM is not set
   7.354 -# CONFIG_SONYPI is not set
   7.355 -
   7.356 -#
   7.357 -# Ftape, the floppy tape device driver
   7.358 -#
   7.359 -# CONFIG_FTAPE is not set
   7.360 -# CONFIG_AGP is not set
   7.361 -
   7.362 -#
   7.363 -# Direct Rendering Manager (XFree86 DRI support)
   7.364 -#
   7.365 -# CONFIG_DRM is not set
   7.366 -# CONFIG_MWAVE is not set
   7.367 -# CONFIG_OBMOUSE is not set
   7.368 -
   7.369 -#
   7.370 -# File systems
   7.371 -#
   7.372 -# CONFIG_QUOTA is not set
   7.373 -# CONFIG_QFMT_V2 is not set
   7.374 -CONFIG_AUTOFS_FS=y
   7.375 -CONFIG_AUTOFS4_FS=y
   7.376 -# CONFIG_REISERFS_FS is not set
   7.377 -# CONFIG_REISERFS_CHECK is not set
   7.378 -# CONFIG_REISERFS_PROC_INFO is not set
   7.379 -# CONFIG_ADFS_FS is not set
   7.380 -# CONFIG_ADFS_FS_RW is not set
   7.381 -# CONFIG_AFFS_FS is not set
   7.382 -# CONFIG_HFS_FS is not set
   7.383 -# CONFIG_HFSPLUS_FS is not set
   7.384 -# CONFIG_BEFS_FS is not set
   7.385 -# CONFIG_BEFS_DEBUG is not set
   7.386 -# CONFIG_BFS_FS is not set
   7.387 -CONFIG_EXT3_FS=y
   7.388 -CONFIG_JBD=y
   7.389 -# CONFIG_JBD_DEBUG is not set
   7.390 -CONFIG_FAT_FS=y
   7.391 -CONFIG_MSDOS_FS=y
   7.392 -CONFIG_UMSDOS_FS=y
   7.393 -CONFIG_VFAT_FS=y
   7.394 -# CONFIG_EFS_FS is not set
   7.395 -# CONFIG_JFFS_FS is not set
   7.396 -# CONFIG_JFFS2_FS is not set
   7.397 -# CONFIG_CRAMFS is not set
   7.398 -CONFIG_TMPFS=y
   7.399 -CONFIG_RAMFS=y
   7.400 -CONFIG_ISO9660_FS=y
   7.401 -CONFIG_JOLIET=y
   7.402 -CONFIG_ZISOFS=y
   7.403 -# CONFIG_JFS_FS is not set
   7.404 -# CONFIG_JFS_DEBUG is not set
   7.405 -# CONFIG_JFS_STATISTICS is not set
   7.406 -# CONFIG_MINIX_FS is not set
   7.407 -# CONFIG_VXFS_FS is not set
   7.408 -# CONFIG_NTFS_FS is not set
   7.409 -# CONFIG_NTFS_RW is not set
   7.410 -# CONFIG_HPFS_FS is not set
   7.411 -CONFIG_PROC_FS=y
   7.412 -# CONFIG_DEVFS_FS is not set
   7.413 -# CONFIG_DEVFS_MOUNT is not set
   7.414 -# CONFIG_DEVFS_DEBUG is not set
   7.415 -CONFIG_DEVPTS_FS=y
   7.416 -# CONFIG_QNX4FS_FS is not set
   7.417 -# CONFIG_QNX4FS_RW is not set
   7.418 -# CONFIG_ROMFS_FS is not set
   7.419 -CONFIG_EXT2_FS=y
   7.420 -# CONFIG_SYSV_FS is not set
   7.421 -# CONFIG_UDF_FS is not set
   7.422 -# CONFIG_UDF_RW is not set
   7.423 -# CONFIG_UFS_FS is not set
   7.424 -# CONFIG_UFS_FS_WRITE is not set
   7.425 -# CONFIG_XFS_FS is not set
   7.426 -# CONFIG_XFS_QUOTA is not set
   7.427 -# CONFIG_XFS_RT is not set
   7.428 -# CONFIG_XFS_TRACE is not set
   7.429 -# CONFIG_XFS_DEBUG is not set
   7.430 -
   7.431 -#
   7.432 -# Network File Systems
   7.433 -#
   7.434 -# CONFIG_CODA_FS is not set
   7.435 -# CONFIG_INTERMEZZO_FS is not set
   7.436 -CONFIG_NFS_FS=y
   7.437 -CONFIG_NFS_V3=y
   7.438 -# CONFIG_NFS_DIRECTIO is not set
   7.439 -CONFIG_ROOT_NFS=y
   7.440 -CONFIG_NFSD=y
   7.441 -CONFIG_NFSD_V3=y
   7.442 -# CONFIG_NFSD_TCP is not set
   7.443 -CONFIG_SUNRPC=y
   7.444 -CONFIG_LOCKD=y
   7.445 -CONFIG_LOCKD_V4=y
   7.446 -# CONFIG_SMB_FS is not set
   7.447 -# CONFIG_NCP_FS is not set
   7.448 -# CONFIG_NCPFS_PACKET_SIGNING is not set
   7.449 -# CONFIG_NCPFS_IOCTL_LOCKING is not set
   7.450 -# CONFIG_NCPFS_STRONG is not set
   7.451 -# CONFIG_NCPFS_NFS_NS is not set
   7.452 -# CONFIG_NCPFS_OS2_NS is not set
   7.453 -# CONFIG_NCPFS_SMALLDOS is not set
   7.454 -# CONFIG_NCPFS_NLS is not set
   7.455 -# CONFIG_NCPFS_EXTRAS is not set
   7.456 -CONFIG_ZISOFS_FS=y
   7.457 -
   7.458 -#
   7.459 -# Partition Types
   7.460 -#
   7.461 -CONFIG_PARTITION_ADVANCED=y
   7.462 -# CONFIG_ACORN_PARTITION is not set
   7.463 -# CONFIG_OSF_PARTITION is not set
   7.464 -# CONFIG_AMIGA_PARTITION is not set
   7.465 -# CONFIG_ATARI_PARTITION is not set
   7.466 -# CONFIG_MAC_PARTITION is not set
   7.467 -CONFIG_MSDOS_PARTITION=y
   7.468 -# CONFIG_BSD_DISKLABEL is not set
   7.469 -# CONFIG_MINIX_SUBPARTITION is not set
   7.470 -# CONFIG_SOLARIS_X86_PARTITION is not set
   7.471 -# CONFIG_UNIXWARE_DISKLABEL is not set
   7.472 -# CONFIG_LDM_PARTITION is not set
   7.473 -# CONFIG_SGI_PARTITION is not set
   7.474 -# CONFIG_ULTRIX_PARTITION is not set
   7.475 -# CONFIG_SUN_PARTITION is not set
   7.476 -# CONFIG_EFI_PARTITION is not set
   7.477 -# CONFIG_SMB_NLS is not set
   7.478 -CONFIG_NLS=y
   7.479 -
   7.480 -#
   7.481 -# Native Language Support
   7.482 -#
   7.483 -CONFIG_NLS_DEFAULT="iso8559-1"
   7.484 -# CONFIG_NLS_CODEPAGE_437 is not set
   7.485 -# CONFIG_NLS_CODEPAGE_737 is not set
   7.486 -# CONFIG_NLS_CODEPAGE_775 is not set
   7.487 -# CONFIG_NLS_CODEPAGE_850 is not set
   7.488 -# CONFIG_NLS_CODEPAGE_852 is not set
   7.489 -# CONFIG_NLS_CODEPAGE_855 is not set
   7.490 -# CONFIG_NLS_CODEPAGE_857 is not set
   7.491 -# CONFIG_NLS_CODEPAGE_860 is not set
   7.492 -# CONFIG_NLS_CODEPAGE_861 is not set
   7.493 -# CONFIG_NLS_CODEPAGE_862 is not set
   7.494 -# CONFIG_NLS_CODEPAGE_863 is not set
   7.495 -# CONFIG_NLS_CODEPAGE_864 is not set
   7.496 -# CONFIG_NLS_CODEPAGE_865 is not set
   7.497 -# CONFIG_NLS_CODEPAGE_866 is not set
   7.498 -# CONFIG_NLS_CODEPAGE_869 is not set
   7.499 -# CONFIG_NLS_CODEPAGE_936 is not set
   7.500 -# CONFIG_NLS_CODEPAGE_950 is not set
   7.501 -# CONFIG_NLS_CODEPAGE_932 is not set
   7.502 -# CONFIG_NLS_CODEPAGE_949 is not set
   7.503 -# CONFIG_NLS_CODEPAGE_874 is not set
   7.504 -# CONFIG_NLS_ISO8859_8 is not set
   7.505 -# CONFIG_NLS_CODEPAGE_1250 is not set
   7.506 -# CONFIG_NLS_CODEPAGE_1251 is not set
   7.507 -CONFIG_NLS_ISO8859_1=y
   7.508 -# CONFIG_NLS_ISO8859_2 is not set
   7.509 -# CONFIG_NLS_ISO8859_3 is not set
   7.510 -# CONFIG_NLS_ISO8859_4 is not set
   7.511 -# CONFIG_NLS_ISO8859_5 is not set
   7.512 -# CONFIG_NLS_ISO8859_6 is not set
   7.513 -# CONFIG_NLS_ISO8859_7 is not set
   7.514 -# CONFIG_NLS_ISO8859_9 is not set
   7.515 -# CONFIG_NLS_ISO8859_13 is not set
   7.516 -# CONFIG_NLS_ISO8859_14 is not set
   7.517 -# CONFIG_NLS_ISO8859_15 is not set
   7.518 -# CONFIG_NLS_KOI8_R is not set
   7.519 -# CONFIG_NLS_KOI8_U is not set
   7.520 -# CONFIG_NLS_UTF8 is not set
   7.521 -
   7.522 -#
   7.523 -# Console drivers
   7.524 -#
   7.525 -CONFIG_XEN_CONSOLE=y
   7.526 -
   7.527 -#
   7.528 -# Kernel hacking
   7.529 -#
   7.530 -CONFIG_DEBUG_KERNEL=y
   7.531 -# CONFIG_DEBUG_STACKOVERFLOW is not set
   7.532 -# CONFIG_DEBUG_HIGHMEM is not set
   7.533 -# CONFIG_DEBUG_SLAB is not set
   7.534 -# CONFIG_DEBUG_IOVIRT is not set
   7.535 -# CONFIG_MAGIC_SYSRQ is not set
   7.536 -# CONFIG_DEBUG_SPINLOCK is not set
   7.537 -# CONFIG_DEBUG_BUGVERBOSE is not set
   7.538 -CONFIG_KALLSYMS=y
   7.539 -# CONFIG_FRAME_POINTER is not set
   7.540 -CONFIG_LOG_BUF_SHIFT=0
   7.541 -
   7.542 -#
   7.543 -# Cryptographic options
   7.544 -#
   7.545 -# CONFIG_CRYPTO is not set
   7.546 -
   7.547 -#
   7.548 -# Library routines
   7.549 -#
   7.550 -# CONFIG_CRC32 is not set
   7.551 -CONFIG_ZLIB_INFLATE=y
   7.552 -# CONFIG_ZLIB_DEFLATE is not set
     8.1 --- a/linux-2.4.26-xen-sparse/arch/xen/drivers/balloon/Makefile	Sat Aug 21 10:28:38 2004 +0000
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,3 +0,0 @@
     8.4 -O_TARGET := drv.o
     8.5 -obj-y := balloon.o
     8.6 -include $(TOPDIR)/Rules.make
     9.1 --- a/linux-2.4.26-xen-sparse/arch/xen/drivers/balloon/balloon.c	Sat Aug 21 10:28:38 2004 +0000
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,494 +0,0 @@
     9.4 -/******************************************************************************
     9.5 - * balloon.c
     9.6 - *
     9.7 - * Xen balloon driver - enables returning/claiming memory to/from Xen.
     9.8 - *
     9.9 - * Copyright (c) 2003, B Dragovic
    9.10 - */
    9.11 -
    9.12 -#include <linux/config.h>
    9.13 -#include <linux/module.h>
    9.14 -#include <linux/kernel.h>
    9.15 -#include <linux/sched.h>
    9.16 -#include <linux/errno.h>
    9.17 -#include <asm/xen_proc.h>
    9.18 -
    9.19 -#include <linux/mm.h>
    9.20 -#include <linux/mman.h>
    9.21 -#include <linux/smp_lock.h>
    9.22 -#include <linux/pagemap.h>
    9.23 -#include <linux/bootmem.h>
    9.24 -#include <linux/highmem.h>
    9.25 -#include <linux/vmalloc.h>
    9.26 -
    9.27 -#include <asm/hypervisor.h>
    9.28 -#include <asm/pgalloc.h>
    9.29 -#include <asm/pgtable.h>
    9.30 -#include <asm/uaccess.h>
    9.31 -#include <asm/tlb.h>
    9.32 -
    9.33 -/* USER DEFINES -- THESE SHOULD BE COPIED TO USER-SPACE TOOLS */
    9.34 -#define USER_INFLATE_BALLOON  1   /* return mem to hypervisor */
    9.35 -#define USER_DEFLATE_BALLOON  2   /* claim mem from hypervisor */
    9.36 -typedef struct user_balloon_op {
    9.37 -    unsigned int  op;
    9.38 -    unsigned long size;
    9.39 -} user_balloon_op_t;
    9.40 -/* END OF USER DEFINE */
    9.41 -
    9.42 -static struct proc_dir_entry *balloon_pde;
    9.43 -unsigned long credit;
    9.44 -static unsigned long current_pages, most_seen_pages;
    9.45 -
    9.46 -/*
    9.47 - * Dead entry written into balloon-owned entries in the PMT.
    9.48 - * It is deliberately different to INVALID_P2M_ENTRY.
    9.49 - */
    9.50 -#define DEAD 0xdead1234
    9.51 -
    9.52 -static inline pte_t *get_ptep(unsigned long addr)
    9.53 -{
    9.54 -    pgd_t *pgd; pmd_t *pmd; pte_t *ptep;
    9.55 -    pgd = pgd_offset_k(addr);
    9.56 -
    9.57 -    if ( pgd_none(*pgd) || pgd_bad(*pgd) ) BUG();
    9.58 -
    9.59 -    pmd = pmd_offset(pgd, addr);
    9.60 -    if ( pmd_none(*pmd) || pmd_bad(*pmd) ) BUG();
    9.61 -
    9.62 -    ptep = pte_offset(pmd, addr);
    9.63 -
    9.64 -    return ptep;
    9.65 -}
    9.66 -
    9.67 -/* Main function for relinquishing memory. */
    9.68 -static unsigned long inflate_balloon(unsigned long num_pages)
    9.69 -{
    9.70 -    unsigned long *parray;
    9.71 -    unsigned long *currp;
    9.72 -    unsigned long curraddr;
    9.73 -    unsigned long ret = 0;
    9.74 -    unsigned long i, j;
    9.75 -
    9.76 -    parray = (unsigned long *)vmalloc(num_pages * sizeof(unsigned long));
    9.77 -    if ( parray == NULL )
    9.78 -    {
    9.79 -        printk(KERN_ERR "inflate_balloon: Unable to vmalloc parray\n");
    9.80 -        return -EFAULT;
    9.81 -    }
    9.82 -
    9.83 -    currp = parray;
    9.84 -
    9.85 -    for ( i = 0; i < num_pages; i++, currp++ )
    9.86 -    {
    9.87 -	struct page *page = alloc_page(GFP_HIGHUSER);
    9.88 -	unsigned long pfn = page - mem_map;
    9.89 -
    9.90 -        /* If allocation fails then free all reserved pages. */
    9.91 -        if ( page == NULL )
    9.92 -        {
    9.93 -            printk(KERN_ERR "Unable to inflate balloon by %ld, only"
    9.94 -                   " %ld pages free.", num_pages, i);
    9.95 -            currp = parray;
    9.96 -            for ( j = 0; j < i; j++, currp++ )
    9.97 -                __free_page((struct page *) (mem_map + *currp));
    9.98 -	    ret = -EFAULT;
    9.99 -            goto cleanup;
   9.100 -        }
   9.101 -
   9.102 -        *currp = pfn;
   9.103 -    }
   9.104 -
   9.105 -
   9.106 -    for ( i = 0, currp = parray; i < num_pages; i++, currp++ )
   9.107 -    {
   9.108 -	unsigned long mfn = phys_to_machine_mapping[*currp];
   9.109 -        curraddr = (unsigned long)page_address(mem_map + *currp);
   9.110 -	if ( curraddr != 0 )
   9.111 -            queue_l1_entry_update(get_ptep(curraddr), 0);
   9.112 -        phys_to_machine_mapping[*currp] = DEAD;
   9.113 -        *currp = mfn;
   9.114 -    }
   9.115 -
   9.116 -    XEN_flush_page_update_queue();
   9.117 -
   9.118 -    ret = HYPERVISOR_dom_mem_op(MEMOP_decrease_reservation, 
   9.119 -                                parray, num_pages, 0);
   9.120 -    if ( unlikely(ret != num_pages) )
   9.121 -    {
   9.122 -        printk(KERN_ERR "Unable to inflate balloon, error %lx\n", ret);
   9.123 -        goto cleanup;
   9.124 -    }
   9.125 -
   9.126 -    credit += num_pages;
   9.127 -    ret = num_pages;
   9.128 -
   9.129 - cleanup:
   9.130 -    vfree(parray);
   9.131 -
   9.132 -    return ret;
   9.133 -}
   9.134 -
   9.135 -/*
   9.136 - * Install new mem pages obtained by deflate_balloon. function walks 
   9.137 - * phys->machine mapping table looking for DEAD entries and populates
   9.138 - * them.
   9.139 - */
   9.140 -static unsigned long process_returned_pages(unsigned long * parray, 
   9.141 -                                       unsigned long num)
   9.142 -{
   9.143 -    /* currently, this function is rather simplistic as 
   9.144 -     * it is assumed that domain reclaims only number of 
   9.145 -     * pages previously released. this is to change soon
   9.146 -     * and the code to extend page tables etc. will be 
   9.147 -     * incorporated here.
   9.148 -     */
   9.149 -     
   9.150 -    unsigned long tot_pages = most_seen_pages;   
   9.151 -    unsigned long * curr = parray;
   9.152 -    unsigned long num_installed;
   9.153 -    unsigned long i;
   9.154 -
   9.155 -    num_installed = 0;
   9.156 -    for ( i = 0; (i < tot_pages) && (num_installed < num); i++ )
   9.157 -    {
   9.158 -        if ( phys_to_machine_mapping[i] == DEAD )
   9.159 -        {
   9.160 -            phys_to_machine_mapping[i] = *curr;
   9.161 -            queue_machphys_update(*curr, i);
   9.162 -	    if (i<max_low_pfn)
   9.163 -              queue_l1_entry_update(
   9.164 -                get_ptep((unsigned long)__va(i << PAGE_SHIFT)),
   9.165 -                ((*curr) << PAGE_SHIFT) | pgprot_val(PAGE_KERNEL));
   9.166 -
   9.167 -            __free_page(mem_map + i);
   9.168 -
   9.169 -            curr++;
   9.170 -            num_installed++;
   9.171 -        }
   9.172 -    }
   9.173 -
   9.174 -    return num_installed;
   9.175 -}
   9.176 -
   9.177 -unsigned long deflate_balloon(unsigned long num_pages)
   9.178 -{
   9.179 -    unsigned long ret;
   9.180 -    unsigned long * parray;
   9.181 -
   9.182 -    if ( num_pages > credit )
   9.183 -    {
   9.184 -        printk(KERN_ERR "deflate_balloon: %lu pages > %lu credit.\n",
   9.185 -			num_pages, credit);
   9.186 -        return -EAGAIN;
   9.187 -    }
   9.188 -
   9.189 -    parray = (unsigned long *)vmalloc(num_pages * sizeof(unsigned long));
   9.190 -    if ( parray == NULL )
   9.191 -    {
   9.192 -        printk(KERN_ERR "deflate_balloon: Unable to vmalloc parray\n");
   9.193 -        return 0;
   9.194 -    }
   9.195 -
   9.196 -    XEN_flush_page_update_queue();
   9.197 -
   9.198 -    ret = HYPERVISOR_dom_mem_op(MEMOP_increase_reservation, 
   9.199 -                                parray, num_pages, 0);
   9.200 -    if ( unlikely(ret != num_pages) )
   9.201 -    {
   9.202 -        printk(KERN_ERR "deflate_balloon: xen increase_reservation err %lx\n",
   9.203 -			ret);
   9.204 -        goto cleanup;
   9.205 -    }
   9.206 -
   9.207 -    if ( (ret = process_returned_pages(parray, num_pages)) < num_pages )
   9.208 -    {
   9.209 -        printk(KERN_WARNING
   9.210 -	   "deflate_balloon: restored only %lx of %lx pages.\n",
   9.211 -           ret, num_pages);
   9.212 -        goto cleanup;
   9.213 -    }
   9.214 -
   9.215 -    ret = num_pages;
   9.216 -    credit -= num_pages;
   9.217 -
   9.218 - cleanup:
   9.219 -    vfree(parray);
   9.220 -
   9.221 -    return ret;
   9.222 -}
   9.223 -
   9.224 -#define PAGE_TO_MB_SHIFT 8
   9.225 -
   9.226 -/*
   9.227 - * pagetable_extend() mimics pagetable_init() from arch/xen/mm/init.c 
   9.228 - * The loops do go through all of low memory (ZONE_NORMAL).  The
   9.229 - * old pages have _PAGE_PRESENT set and so get skipped.
   9.230 - * If low memory is not full, the new pages are used to fill it, going
   9.231 - * from cur_low_pfn to low_pfn.   high memory is not direct mapped so
   9.232 - * no extension is needed for new high memory.
   9.233 - */
   9.234 -
   9.235 -static void pagetable_extend (int cur_low_pfn, int newpages)
   9.236 -{
   9.237 -    unsigned long vaddr, end;
   9.238 -    pgd_t *kpgd, *pgd, *pgd_base;
   9.239 -    int i, j, k;
   9.240 -    pmd_t *kpmd, *pmd;
   9.241 -    pte_t *kpte, *pte, *pte_base;
   9.242 -    int low_pfn = min(cur_low_pfn+newpages,(int)max_low_pfn);
   9.243 -
   9.244 -    /*
   9.245 -     * This can be zero as well - no problem, in that case we exit
   9.246 -     * the loops anyway due to the PTRS_PER_* conditions.
   9.247 -     */
   9.248 -    end = (unsigned long)__va(low_pfn*PAGE_SIZE);
   9.249 -
   9.250 -    pgd_base = init_mm.pgd;
   9.251 -    i = __pgd_offset(PAGE_OFFSET);
   9.252 -    pgd = pgd_base + i;
   9.253 -
   9.254 -    for (; i < PTRS_PER_PGD; pgd++, i++) {
   9.255 -        vaddr = i*PGDIR_SIZE;
   9.256 -        if (end && (vaddr >= end))
   9.257 -            break;
   9.258 -        pmd = (pmd_t *)pgd;
   9.259 -        for (j = 0; j < PTRS_PER_PMD; pmd++, j++) {
   9.260 -            vaddr = i*PGDIR_SIZE + j*PMD_SIZE;
   9.261 -            if (end && (vaddr >= end))
   9.262 -                break;
   9.263 -
   9.264 -            /* Filled in for us already? */
   9.265 -            if ( pmd_val(*pmd) & _PAGE_PRESENT )
   9.266 -                continue;
   9.267 -
   9.268 -            pte_base = pte = (pte_t *) __get_free_page(GFP_KERNEL);
   9.269 -
   9.270 -            for (k = 0; k < PTRS_PER_PTE; pte++, k++) {
   9.271 -                vaddr = i*PGDIR_SIZE + j*PMD_SIZE + k*PAGE_SIZE;
   9.272 -                if (end && (vaddr >= end))
   9.273 -                    break;
   9.274 -                *pte = mk_pte_phys(__pa(vaddr), PAGE_KERNEL);
   9.275 -            }
   9.276 -            kpgd = pgd_offset_k((unsigned long)pte_base);
   9.277 -            kpmd = pmd_offset(kpgd, (unsigned long)pte_base);
   9.278 -            kpte = pte_offset(kpmd, (unsigned long)pte_base);
   9.279 -            queue_l1_entry_update(kpte,
   9.280 -                                  (*(unsigned long *)kpte)&~_PAGE_RW);
   9.281 -            set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(pte_base)));
   9.282 -            XEN_flush_page_update_queue();
   9.283 -        }
   9.284 -    }
   9.285 -}
   9.286 -
   9.287 -/*
   9.288 - * claim_new_pages() asks xen to increase this domain's memory  reservation
   9.289 - * and return a list of the new pages of memory.  This new pages are
   9.290 - * added to the free list of the memory manager.
   9.291 - *
   9.292 - * Available RAM does not normally change while Linux runs.  To make this work,
   9.293 - * the linux mem= boottime command line param must say how big memory could
   9.294 - * possibly grow.  Then setup_arch() in arch/xen/kernel/setup.c
   9.295 - * sets max_pfn, max_low_pfn and the zones according to
   9.296 - * this max memory size.   The page tables themselves can only be
   9.297 - * extended after xen has assigned new pages to this domain.
   9.298 - */
   9.299 -
   9.300 -static unsigned long
   9.301 -claim_new_pages(unsigned long num_pages)
   9.302 -{
   9.303 -    unsigned long new_page_cnt, pfn;
   9.304 -    unsigned long * parray, *curr;
   9.305 -
   9.306 -    if (most_seen_pages+num_pages> max_pfn)
   9.307 -        num_pages = max_pfn-most_seen_pages;
   9.308 -    if (num_pages==0) return 0;
   9.309 -
   9.310 -    parray = (unsigned long *)vmalloc(num_pages * sizeof(unsigned long));
   9.311 -    if ( parray == NULL )
   9.312 -    {
   9.313 -        printk(KERN_ERR "claim_new_pages: Unable to vmalloc parray\n");
   9.314 -        return 0;
   9.315 -    }
   9.316 -
   9.317 -    XEN_flush_page_update_queue();
   9.318 -    new_page_cnt = HYPERVISOR_dom_mem_op(MEMOP_increase_reservation, 
   9.319 -                                parray, num_pages, 0);
   9.320 -    if ( new_page_cnt != num_pages )
   9.321 -    {
   9.322 -        printk(KERN_WARNING
   9.323 -            "claim_new_pages: xen granted only %lu of %lu requested pages\n",
   9.324 -            new_page_cnt, num_pages);
   9.325 -
   9.326 -	/* 
   9.327 -	 * Avoid xen lockup when user forgot to setdomainmaxmem. Xen
   9.328 -	 * usually can dribble out a few pages and then hangs.
   9.329 -	 */
   9.330 -	if ( new_page_cnt < 1000 )
   9.331 -        {
   9.332 -            printk(KERN_WARNING "Remember to use setdomainmaxmem\n");
   9.333 -	    HYPERVISOR_dom_mem_op(MEMOP_decrease_reservation, 
   9.334 -                                parray, new_page_cnt, 0);
   9.335 -            return -EFAULT;
   9.336 -	}
   9.337 -    }
   9.338 -    memcpy(phys_to_machine_mapping+most_seen_pages, parray,
   9.339 -           new_page_cnt * sizeof(unsigned long));
   9.340 -
   9.341 -    pagetable_extend(most_seen_pages,new_page_cnt);
   9.342 -
   9.343 -    for (pfn = most_seen_pages, curr = parray;
   9.344 -	    pfn < most_seen_pages+new_page_cnt;
   9.345 -            pfn++, curr++ )
   9.346 -    {
   9.347 -        struct page *page = mem_map + pfn;
   9.348 -
   9.349 -#ifndef CONFIG_HIGHMEM
   9.350 -	if (pfn>=max_low_pfn) {
   9.351 -            printk(KERN_WARNING "Warning only %ldMB will be used.\n",
   9.352 -               pfn>>PAGE_TO_MB_SHIFT);
   9.353 -            printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");
   9.354 -	    break;
   9.355 -	}
   9.356 -#endif
   9.357 -	queue_machphys_update(*curr, pfn);
   9.358 -	XEN_flush_page_update_queue();
   9.359 -	if (pfn<max_low_pfn)  {
   9.360 -		queue_l1_entry_update(get_ptep((unsigned long)__va(pfn << PAGE_SHIFT)),
   9.361 -			((*curr) << PAGE_SHIFT) | pgprot_val(PAGE_KERNEL));
   9.362 -		XEN_flush_page_update_queue();
   9.363 -		}
   9.364 -
   9.365 -        /* this next bit mimics arch/xen/mm/init.c:one_highpage_init() */
   9.366 -        ClearPageReserved(page);
   9.367 -        if (pfn>=max_low_pfn) set_bit(PG_highmem, &page->flags);
   9.368 -        set_page_count(page, 1);
   9.369 -        __free_page(page);
   9.370 -    }
   9.371 -
   9.372 -    vfree(parray);
   9.373 -
   9.374 -    return new_page_cnt;
   9.375 -}
   9.376 -
   9.377 -static int balloon_write(struct file *file, const char *buffer,
   9.378 -                         u_long count, void *data)
   9.379 -{
   9.380 -    char memstring[64], *endchar;
   9.381 -    int len, i;
   9.382 -    unsigned long target;
   9.383 -    unsigned long long targetbytes;
   9.384 -
   9.385 -    /* Only admin can play with the balloon :) */
   9.386 -    if ( !capable(CAP_SYS_ADMIN) )
   9.387 -        return -EPERM;
   9.388 -
   9.389 -    if (count>sizeof memstring) {
   9.390 -        return -EFBIG;
   9.391 -    }
   9.392 -
   9.393 -    len = strnlen_user(buffer, count);
   9.394 -    if (len==0) return -EBADMSG;
   9.395 -    if (len==1) return 1; /* input starts with a NUL char */
   9.396 -    if ( strncpy_from_user(memstring, buffer, len) < 0)
   9.397 -        return -EFAULT;
   9.398 -
   9.399 -    endchar = memstring;
   9.400 -    for(i=0; i<len; ++i,++endchar) {
   9.401 -        if ('0'>memstring[i] || memstring[i]>'9') break;
   9.402 -    }
   9.403 -    if (i==0) return -EBADMSG;
   9.404 -
   9.405 -    targetbytes = memparse(memstring,&endchar);
   9.406 -    target = targetbytes >> PAGE_SHIFT;
   9.407 -
   9.408 -    if (target < current_pages) {
   9.409 -        int change = inflate_balloon(current_pages-target);
   9.410 -        if (change<=0) return change;
   9.411 -
   9.412 -        current_pages -= change;
   9.413 -        printk(KERN_INFO "Relinquish %dMB to xen. Domain now has %luMB\n",
   9.414 -            change>>PAGE_TO_MB_SHIFT, current_pages>>PAGE_TO_MB_SHIFT);
   9.415 -    }
   9.416 -    else if (target > current_pages) {
   9.417 -        int change, reclaim = min(target,most_seen_pages) - current_pages;
   9.418 -
   9.419 -        if (reclaim) {
   9.420 -            change = deflate_balloon( reclaim);
   9.421 -            if (change<=0) return change;
   9.422 -            current_pages += change;
   9.423 -            printk(KERN_INFO "Reclaim %dMB from xen. Domain now has %luMB\n",
   9.424 -                change>>PAGE_TO_MB_SHIFT, current_pages>>PAGE_TO_MB_SHIFT);
   9.425 -        }
   9.426 -
   9.427 -        if (most_seen_pages<target) {
   9.428 -            int growth = claim_new_pages(target-most_seen_pages);
   9.429 -	    if (growth<=0) return growth;
   9.430 -            most_seen_pages += growth;
   9.431 -            current_pages += growth;
   9.432 -            printk(KERN_INFO "Granted %dMB new mem by xen. Domain now has %luMB\n",
   9.433 -                growth>>PAGE_TO_MB_SHIFT, current_pages>>PAGE_TO_MB_SHIFT);
   9.434 -        }
   9.435 -    }
   9.436 -
   9.437 -
   9.438 -    return len;
   9.439 -}
   9.440 -
   9.441 -
   9.442 -static int balloon_read(char *page, char **start, off_t off,
   9.443 -      int count, int *eof, void *data)
   9.444 -{
   9.445 -    int len;
   9.446 -    len = sprintf(page,"%lu\n",current_pages<<PAGE_SHIFT);
   9.447 -
   9.448 -    if (len <= off+count) *eof = 1;
   9.449 -    *start = page + off;
   9.450 -    len -= off;
   9.451 -    if (len>count) len = count;
   9.452 -    if (len<0) len = 0;
   9.453 -    return len;
   9.454 -}
   9.455 -
   9.456 -static int __init init_module(void)
   9.457 -{
   9.458 -    printk(KERN_ALERT "Starting Xen Balloon driver\n");
   9.459 -
   9.460 -    most_seen_pages = current_pages = min(start_info.nr_pages,max_pfn);
   9.461 -    if ( (balloon_pde = create_xen_proc_entry("memory_target", 0644)) == NULL )
   9.462 -    {
   9.463 -        printk(KERN_ALERT "Unable to create balloon driver proc entry!");
   9.464 -        return -1;
   9.465 -    }
   9.466 -
   9.467 -    balloon_pde->write_proc = balloon_write;
   9.468 -    balloon_pde->read_proc = balloon_read;
   9.469 -
   9.470 -    /* 
   9.471 -     * make a new phys map if mem= says xen can give us memory  to grow
   9.472 -     */
   9.473 -    if ( max_pfn > start_info.nr_pages )
   9.474 -    {
   9.475 -        extern unsigned long *phys_to_machine_mapping;
   9.476 -        unsigned long *newmap;
   9.477 -        newmap = (unsigned long *)vmalloc(max_pfn * sizeof(unsigned long));
   9.478 -        memset(newmap, ~0, max_pfn * sizeof(unsigned long));
   9.479 -        memcpy(newmap, phys_to_machine_mapping,
   9.480 -               start_info.nr_pages * sizeof(unsigned long));
   9.481 -        phys_to_machine_mapping = newmap;
   9.482 -    }
   9.483 -
   9.484 -    return 0;
   9.485 -}
   9.486 -
   9.487 -static void __exit cleanup_module(void)
   9.488 -{
   9.489 -    if ( balloon_pde != NULL )
   9.490 -    {
   9.491 -        remove_xen_proc_entry("balloon");
   9.492 -        balloon_pde = NULL;
   9.493 -    }
   9.494 -}
   9.495 -
   9.496 -module_init(init_module);
   9.497 -module_exit(cleanup_module);
    10.1 --- a/linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/Makefile	Sat Aug 21 10:28:38 2004 +0000
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,10 +0,0 @@
    10.4 -
    10.5 -O_TARGET := drv.o
    10.6 -
    10.7 -subdir-y += frontend
    10.8 -obj-y    += frontend/drv.o
    10.9 -
   10.10 -subdir-$(CONFIG_XEN_PHYSDEV_ACCESS) += backend
   10.11 -obj-$(CONFIG_XEN_PHYSDEV_ACCESS)    += backend/drv.o
   10.12 -
   10.13 -include $(TOPDIR)/Rules.make
    11.1 --- a/linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/backend/Makefile	Sat Aug 21 10:28:38 2004 +0000
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,3 +0,0 @@
    11.4 -O_TARGET := drv.o
    11.5 -obj-y := main.o control.o interface.o vbd.o
    11.6 -include $(TOPDIR)/Rules.make
    12.1 --- a/linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/frontend/Makefile	Sat Aug 21 10:28:38 2004 +0000
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,3 +0,0 @@
    12.4 -O_TARGET := drv.o
    12.5 -obj-y := blkfront.o vbd.o
    12.6 -include $(TOPDIR)/Rules.make
    13.1 --- a/linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/frontend/common.h	Sat Aug 21 10:28:38 2004 +0000
    13.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.3 @@ -1,79 +0,0 @@
    13.4 -/******************************************************************************
    13.5 - * arch/xen/drivers/blkif/frontend/common.h
    13.6 - * 
    13.7 - * Shared definitions between all levels of XenoLinux Virtual block devices.
    13.8 - */
    13.9 -
   13.10 -#ifndef __XEN_DRIVERS_COMMON_H__
   13.11 -#define __XEN_DRIVERS_COMMON_H__
   13.12 -
   13.13 -#include <linux/config.h>
   13.14 -#include <linux/module.h>
   13.15 -#include <linux/kernel.h>
   13.16 -#include <linux/sched.h>
   13.17 -#include <linux/slab.h>
   13.18 -#include <linux/string.h>
   13.19 -#include <linux/errno.h>
   13.20 -#include <linux/fs.h>
   13.21 -#include <linux/hdreg.h>
   13.22 -#include <linux/blkdev.h>
   13.23 -#include <linux/major.h>
   13.24 -#include <asm/hypervisor-ifs/hypervisor-if.h>
   13.25 -#include <asm/io.h>
   13.26 -#include <asm/atomic.h>
   13.27 -#include <asm/uaccess.h>
   13.28 -#include <asm-xen/hypervisor-ifs/io/blkif.h>
   13.29 -
   13.30 -#if 0
   13.31 -#define DPRINTK(_f, _a...) printk ( KERN_ALERT _f , ## _a )
   13.32 -#else
   13.33 -#define DPRINTK(_f, _a...) ((void)0)
   13.34 -#endif
   13.35 -
   13.36 -#if 0
   13.37 -#define DPRINTK_IOCTL(_f, _a...) printk ( KERN_ALERT _f , ## _a )
   13.38 -#else
   13.39 -#define DPRINTK_IOCTL(_f, _a...) ((void)0)
   13.40 -#endif
   13.41 -
   13.42 -/* Private gendisk->flags[] values. */
   13.43 -#define GENHD_FL_XEN        2 /* Is unit a Xen block device?  */
   13.44 -#define GENHD_FL_VIRT_PARTNS 4 /* Are unit partitions virtual? */
   13.45 -
   13.46 -/*
   13.47 - * We have one of these per vbd, whether ide, scsi or 'other'.
   13.48 - * They hang in an array off the gendisk structure. We may end up putting
   13.49 - * all kinds of interesting stuff here :-)
   13.50 - */
   13.51 -typedef struct xl_disk {
   13.52 -    int usage;
   13.53 -} xl_disk_t;
   13.54 -
   13.55 -extern int blkif_open(struct inode *inode, struct file *filep);
   13.56 -extern int blkif_release(struct inode *inode, struct file *filep);
   13.57 -extern int blkif_ioctl(struct inode *inode, struct file *filep,
   13.58 -                                 unsigned command, unsigned long argument);
   13.59 -extern int blkif_check(kdev_t dev);
   13.60 -extern int blkif_revalidate(kdev_t dev);
   13.61 -extern void blkif_control_send(blkif_request_t *req, blkif_response_t *rsp);
   13.62 -extern void do_blkif_request (request_queue_t *rq); 
   13.63 -
   13.64 -extern void xlvbd_update_vbds(void);
   13.65 -
   13.66 -static inline xl_disk_t *xldev_to_xldisk(kdev_t xldev)
   13.67 -{
   13.68 -    struct gendisk *gd = get_gendisk(xldev);
   13.69 -    
   13.70 -    if ( gd == NULL ) 
   13.71 -        return NULL;
   13.72 -    
   13.73 -    return (xl_disk_t *)gd->real_devices + 
   13.74 -        (MINOR(xldev) >> gd->minor_shift);
   13.75 -}
   13.76 -
   13.77 -
   13.78 -/* Virtual block-device subsystem. */
   13.79 -extern int  xlvbd_init(void);
   13.80 -extern void xlvbd_cleanup(void); 
   13.81 -
   13.82 -#endif /* __XEN_DRIVERS_COMMON_H__ */
    14.1 --- a/linux-2.4.26-xen-sparse/arch/xen/drivers/blkif/frontend/vbd.c	Sat Aug 21 10:28:38 2004 +0000
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,561 +0,0 @@
    14.4 -/******************************************************************************
    14.5 - * arch/xen/drivers/blkif/frontend/vbd.c
    14.6 - * 
    14.7 - * Xenolinux virtual block-device driver.
    14.8 - * 
    14.9 - * Copyright (c) 2003-2004, Keir Fraser & Steve Hand
   14.10 - * Modifications by Mark A. Williamson are (c) Intel Research Cambridge
   14.11 - */
   14.12 -
   14.13 -#include "common.h"
   14.14 -#include <linux/blk.h>
   14.15 -
   14.16 -/*
   14.17 - * For convenience we distinguish between ide, scsi and 'other' (i.e.
   14.18 - * potentially combinations of the two) in the naming scheme and in a few 
   14.19 - * other places (like default readahead, etc).
   14.20 - */
   14.21 -#define XLIDE_MAJOR_NAME  "hd"
   14.22 -#define XLSCSI_MAJOR_NAME "sd"
   14.23 -#define XLVBD_MAJOR_NAME "xvd"
   14.24 -
   14.25 -#define XLIDE_DEVS_PER_MAJOR   2
   14.26 -#define XLSCSI_DEVS_PER_MAJOR 16
   14.27 -#define XLVBD_DEVS_PER_MAJOR  16
   14.28 -
   14.29 -#define XLIDE_PARTN_SHIFT  6    /* amount to shift minor to get 'real' minor */
   14.30 -#define XLIDE_MAX_PART    (1 << XLIDE_PARTN_SHIFT)     /* minors per ide vbd */
   14.31 -
   14.32 -#define XLSCSI_PARTN_SHIFT 4    /* amount to shift minor to get 'real' minor */
   14.33 -#define XLSCSI_MAX_PART   (1 << XLSCSI_PARTN_SHIFT)   /* minors per scsi vbd */
   14.34 -
   14.35 -#define XLVBD_PARTN_SHIFT  4    /* amount to shift minor to get 'real' minor */
   14.36 -#define XLVBD_MAX_PART    (1 << XLVBD_PARTN_SHIFT) /* minors per 'other' vbd */
   14.37 -
   14.38 -/* The below are for the generic drivers/block/ll_rw_block.c code. */
   14.39 -static int xlide_blksize_size[256];
   14.40 -static int xlide_hardsect_size[256];
   14.41 -static int xlide_max_sectors[256];
   14.42 -static int xlscsi_blksize_size[256];
   14.43 -static int xlscsi_hardsect_size[256];
   14.44 -static int xlscsi_max_sectors[256];
   14.45 -static int xlvbd_blksize_size[256];
   14.46 -static int xlvbd_hardsect_size[256];
   14.47 -static int xlvbd_max_sectors[256];
   14.48 -
   14.49 -/* Information about our VBDs. */
   14.50 -#define MAX_VBDS 64
   14.51 -static int nr_vbds;
   14.52 -static vdisk_t *vbd_info;
   14.53 -
   14.54 -static struct block_device_operations xlvbd_block_fops = 
   14.55 -{
   14.56 -    open:               blkif_open,
   14.57 -    release:            blkif_release,
   14.58 -    ioctl:              blkif_ioctl,
   14.59 -    check_media_change: blkif_check,
   14.60 -    revalidate:         blkif_revalidate,
   14.61 -};
   14.62 -
   14.63 -static int xlvbd_get_vbd_info(vdisk_t *disk_info)
   14.64 -{
   14.65 -    vdisk_t         *buf = (vdisk_t *)__get_free_page(GFP_KERNEL);
   14.66 -    blkif_request_t  req;
   14.67 -    blkif_response_t rsp;
   14.68 -    int              nr;
   14.69 -
   14.70 -    memset(&req, 0, sizeof(req));
   14.71 -    req.operation   = BLKIF_OP_PROBE;
   14.72 -    req.nr_segments = 1;
   14.73 -    req.frame_and_sects[0] = virt_to_machine(buf) | 7;
   14.74 -
   14.75 -    blkif_control_send(&req, &rsp);
   14.76 -
   14.77 -    if ( rsp.status <= 0 )
   14.78 -    {
   14.79 -        printk(KERN_ALERT "Could not probe disks (%d)\n", rsp.status);
   14.80 -        return -1;
   14.81 -    }
   14.82 -
   14.83 -    if ( (nr = rsp.status) > MAX_VBDS )
   14.84 -         nr = MAX_VBDS;
   14.85 -    memcpy(disk_info, buf, nr * sizeof(vdisk_t));
   14.86 -
   14.87 -    return nr;
   14.88 -}
   14.89 -
   14.90 -/*
   14.91 - * xlvbd_init_device - initialise a VBD device
   14.92 - * @disk:              a vdisk_t describing the VBD
   14.93 - *
   14.94 - * Takes a vdisk_t * that describes a VBD the domain has access to.
   14.95 - * Performs appropriate initialisation and registration of the device.
   14.96 - *
   14.97 - * Care needs to be taken when making re-entrant calls to ensure that
   14.98 - * corruption does not occur.  Also, devices that are in use should not have
   14.99 - * their details updated.  This is the caller's responsibility.
  14.100 - */
  14.101 -static int xlvbd_init_device(vdisk_t *xd)
  14.102 -{
  14.103 -    int device = xd->device;
  14.104 -    int major  = MAJOR(device); 
  14.105 -    int minor  = MINOR(device);
  14.106 -    int is_ide = IDE_DISK_MAJOR(major);  /* is this an ide device? */
  14.107 -    int is_scsi= SCSI_BLK_MAJOR(major);  /* is this a scsi device? */
  14.108 -    char *major_name;
  14.109 -    struct gendisk *gd;
  14.110 -    struct block_device *bd;
  14.111 -    xl_disk_t *disk;
  14.112 -    int i, rc = 0, max_part, partno;
  14.113 -    unsigned long capacity;
  14.114 -
  14.115 -    unsigned char buf[64];
  14.116 -
  14.117 -    if ( (bd = bdget(device)) == NULL )
  14.118 -        return -1;
  14.119 -
  14.120 -    /*
  14.121 -     * Update of partition info, and check of usage count, is protected
  14.122 -     * by the per-block-device semaphore.
  14.123 -     */
  14.124 -    down(&bd->bd_sem);
  14.125 -
  14.126 -    if ( ((disk = xldev_to_xldisk(device)) != NULL) && (disk->usage != 0) )
  14.127 -    {
  14.128 -        printk(KERN_ALERT "VBD update failed - in use [dev=%x]\n", device);
  14.129 -        rc = -1;
  14.130 -        goto out;
  14.131 -    }
  14.132 -
  14.133 -    if ( is_ide ) {
  14.134 -
  14.135 -	major_name = XLIDE_MAJOR_NAME; 
  14.136 -	max_part   = XLIDE_MAX_PART;
  14.137 -
  14.138 -    } else if ( is_scsi ) {
  14.139 -
  14.140 -	major_name = XLSCSI_MAJOR_NAME;
  14.141 -	max_part   = XLSCSI_MAX_PART;
  14.142 -
  14.143 -    } else if (VDISK_VIRTUAL(xd->info)) {
  14.144 -
  14.145 -	major_name = XLVBD_MAJOR_NAME;
  14.146 -	max_part   = XLVBD_MAX_PART;
  14.147 -
  14.148 -    } else { 
  14.149 -
  14.150 -        /* SMH: hmm - probably a CCISS driver or sim; assume CCISS for now */
  14.151 -	printk(KERN_ALERT "Assuming device %02x:%02x is CCISS/SCSI\n", 
  14.152 -	       major, minor);
  14.153 -	is_scsi    = 1; 
  14.154 -	major_name = "cciss"; 
  14.155 -	max_part   = XLSCSI_MAX_PART;
  14.156 -
  14.157 -    }
  14.158 -    
  14.159 -    partno = minor & (max_part - 1); 
  14.160 -    
  14.161 -    if ( (gd = get_gendisk(device)) == NULL )
  14.162 -    {
  14.163 -        rc = register_blkdev(major, major_name, &xlvbd_block_fops);
  14.164 -        if ( rc < 0 )
  14.165 -        {
  14.166 -            printk(KERN_ALERT "XL VBD: can't get major %d\n", major);
  14.167 -            goto out;
  14.168 -        }
  14.169 -
  14.170 -        if ( is_ide )
  14.171 -        { 
  14.172 -            blksize_size[major]  = xlide_blksize_size;
  14.173 -            hardsect_size[major] = xlide_hardsect_size;
  14.174 -            max_sectors[major]   = xlide_max_sectors;
  14.175 -            read_ahead[major]    = 8; /* from drivers/ide/ide-probe.c */
  14.176 -        } 
  14.177 -        else if ( is_scsi )
  14.178 -        { 
  14.179 -            blksize_size[major]  = xlscsi_blksize_size;
  14.180 -            hardsect_size[major] = xlscsi_hardsect_size;
  14.181 -            max_sectors[major]   = xlscsi_max_sectors;
  14.182 -            read_ahead[major]    = 0; /* XXX 8; -- guessing */
  14.183 -        }
  14.184 -        else
  14.185 -        { 
  14.186 -            blksize_size[major]  = xlvbd_blksize_size;
  14.187 -            hardsect_size[major] = xlvbd_hardsect_size;
  14.188 -            max_sectors[major]   = xlvbd_max_sectors;
  14.189 -            read_ahead[major]    = 8;
  14.190 -        }
  14.191 -
  14.192 -        blk_init_queue(BLK_DEFAULT_QUEUE(major), do_blkif_request);
  14.193 -
  14.194 -        /*
  14.195 -         * Turn off barking 'headactive' mode. We dequeue buffer heads as
  14.196 -         * soon as we pass them to the back-end driver.
  14.197 -         */
  14.198 -        blk_queue_headactive(BLK_DEFAULT_QUEUE(major), 0);
  14.199 -
  14.200 -        /* Construct an appropriate gendisk structure. */
  14.201 -        gd             = kmalloc(sizeof(struct gendisk), GFP_KERNEL);
  14.202 -        gd->major      = major;
  14.203 -        gd->major_name = major_name; 
  14.204 -    
  14.205 -        gd->max_p      = max_part; 
  14.206 -        if ( is_ide )
  14.207 -        { 
  14.208 -            gd->minor_shift  = XLIDE_PARTN_SHIFT; 
  14.209 -            gd->nr_real      = XLIDE_DEVS_PER_MAJOR; 
  14.210 -        } 
  14.211 -        else if ( is_scsi )
  14.212 -        { 
  14.213 -            gd->minor_shift  = XLSCSI_PARTN_SHIFT; 
  14.214 -            gd->nr_real      = XLSCSI_DEVS_PER_MAJOR; 
  14.215 -        }
  14.216 -        else
  14.217 -        { 
  14.218 -            gd->minor_shift  = XLVBD_PARTN_SHIFT; 
  14.219 -            gd->nr_real      = XLVBD_DEVS_PER_MAJOR; 
  14.220 -        }
  14.221 -
  14.222 -        /* 
  14.223 -        ** The sizes[] and part[] arrays hold the sizes and other 
  14.224 -        ** information about every partition with this 'major' (i.e. 
  14.225 -        ** every disk sharing the 8 bit prefix * max partns per disk) 
  14.226 -        */
  14.227 -        gd->sizes = kmalloc(max_part*gd->nr_real*sizeof(int), GFP_KERNEL);
  14.228 -        gd->part  = kmalloc(max_part*gd->nr_real*sizeof(struct hd_struct), 
  14.229 -                            GFP_KERNEL);
  14.230 -        memset(gd->sizes, 0, max_part * gd->nr_real * sizeof(int));
  14.231 -        memset(gd->part,  0, max_part * gd->nr_real 
  14.232 -               * sizeof(struct hd_struct));
  14.233 -
  14.234 -
  14.235 -        gd->real_devices = kmalloc(gd->nr_real * sizeof(xl_disk_t), 
  14.236 -                                   GFP_KERNEL);
  14.237 -        memset(gd->real_devices, 0, gd->nr_real * sizeof(xl_disk_t));
  14.238 -
  14.239 -        gd->next   = NULL;            
  14.240 -        gd->fops   = &xlvbd_block_fops;
  14.241 -
  14.242 -        gd->de_arr = kmalloc(gd->nr_real * sizeof(*gd->de_arr), 
  14.243 -                             GFP_KERNEL);
  14.244 -        gd->flags  = kmalloc(gd->nr_real * sizeof(*gd->flags), GFP_KERNEL);
  14.245 -    
  14.246 -        memset(gd->de_arr, 0, gd->nr_real * sizeof(*gd->de_arr));
  14.247 -        memset(gd->flags, 0, gd->nr_real *  sizeof(*gd->flags));
  14.248 -
  14.249 -        add_gendisk(gd);
  14.250 -
  14.251 -        blk_size[major] = gd->sizes;
  14.252 -    }
  14.253 -
  14.254 -    if ( VDISK_READONLY(xd->info) )
  14.255 -        set_device_ro(device, 1); 
  14.256 -
  14.257 -    gd->flags[minor >> gd->minor_shift] |= GENHD_FL_XEN;
  14.258 -
  14.259 -    /* NB. Linux 2.4 only handles 32-bit sector offsets and capacities. */
  14.260 -    capacity = (unsigned long)xd->capacity;
  14.261 -
  14.262 -    if ( partno != 0 )
  14.263 -    {
  14.264 -        /*
  14.265 -         * If this was previously set up as a real disc we will have set 
  14.266 -         * up partition-table information. Virtual partitions override 
  14.267 -         * 'real' partitions, and the two cannot coexist on a device.
  14.268 -         */
  14.269 -        if ( !(gd->flags[minor >> gd->minor_shift] & GENHD_FL_VIRT_PARTNS) &&
  14.270 -             (gd->sizes[minor & ~(max_part-1)] != 0) )
  14.271 -        {
  14.272 -            /*
  14.273 -             * Any non-zero sub-partition entries must be cleaned out before
  14.274 -             * installing 'virtual' partition entries. The two types cannot
  14.275 -             * coexist, and virtual partitions are favoured.
  14.276 -             */
  14.277 -            kdev_t dev = device & ~(max_part-1);
  14.278 -            for ( i = max_part - 1; i > 0; i-- )
  14.279 -            {
  14.280 -                invalidate_device(dev+i, 1);
  14.281 -                gd->part[MINOR(dev+i)].start_sect = 0;
  14.282 -                gd->part[MINOR(dev+i)].nr_sects   = 0;
  14.283 -                gd->sizes[MINOR(dev+i)]           = 0;
  14.284 -            }
  14.285 -            printk(KERN_ALERT
  14.286 -                   "Virtual partitions found for /dev/%s - ignoring any "
  14.287 -                   "real partition information we may have found.\n",
  14.288 -                   disk_name(gd, MINOR(device), buf));
  14.289 -        }
  14.290 -
  14.291 -        /* Need to skankily setup 'partition' information */
  14.292 -        gd->part[minor].start_sect = 0; 
  14.293 -        gd->part[minor].nr_sects   = capacity; 
  14.294 -        gd->sizes[minor]           = capacity; 
  14.295 -
  14.296 -        gd->flags[minor >> gd->minor_shift] |= GENHD_FL_VIRT_PARTNS;
  14.297 -    }
  14.298 -    else
  14.299 -    {
  14.300 -        gd->part[minor].nr_sects = capacity;
  14.301 -        gd->sizes[minor] = capacity>>(BLOCK_SIZE_BITS-9);
  14.302 -        
  14.303 -        /* Some final fix-ups depending on the device type */
  14.304 -        switch ( VDISK_TYPE(xd->info) )
  14.305 -        { 
  14.306 -        case VDISK_TYPE_CDROM:
  14.307 -        case VDISK_TYPE_FLOPPY: 
  14.308 -        case VDISK_TYPE_TAPE:
  14.309 -            gd->flags[minor >> gd->minor_shift] |= GENHD_FL_REMOVABLE; 
  14.310 -            printk(KERN_ALERT 
  14.311 -                   "Skipping partition check on %s /dev/%s\n", 
  14.312 -                   VDISK_TYPE(xd->info)==VDISK_TYPE_CDROM ? "cdrom" : 
  14.313 -                   (VDISK_TYPE(xd->info)==VDISK_TYPE_TAPE ? "tape" : 
  14.314 -                    "floppy"), disk_name(gd, MINOR(device), buf)); 
  14.315 -            break; 
  14.316 -
  14.317 -        case VDISK_TYPE_DISK:
  14.318 -            /* Only check partitions on real discs (not virtual!). */
  14.319 -            if ( gd->flags[minor>>gd->minor_shift] & GENHD_FL_VIRT_PARTNS )
  14.320 -            {
  14.321 -                printk(KERN_ALERT
  14.322 -                       "Skipping partition check on virtual /dev/%s\n",
  14.323 -                       disk_name(gd, MINOR(device), buf));
  14.324 -                break;
  14.325 -            }
  14.326 -            register_disk(gd, device, gd->max_p, &xlvbd_block_fops, capacity);
  14.327 -            break; 
  14.328 -
  14.329 -        default:
  14.330 -            printk(KERN_ALERT "XenoLinux: unknown device type %d\n", 
  14.331 -                   VDISK_TYPE(xd->info)); 
  14.332 -            break; 
  14.333 -        }
  14.334 -    }
  14.335 -
  14.336 - out:
  14.337 -    up(&bd->bd_sem);
  14.338 -    bdput(bd);    
  14.339 -    return rc;
  14.340 -}
  14.341 -
  14.342 -
  14.343 -/*
  14.344 - * xlvbd_remove_device - remove a device node if possible
  14.345 - * @device:       numeric device ID
  14.346 - *
  14.347 - * Updates the gendisk structure and invalidates devices.
  14.348 - *
  14.349 - * This is OK for now but in future, should perhaps consider where this should
  14.350 - * deallocate gendisks / unregister devices.
  14.351 - */
  14.352 -static int xlvbd_remove_device(int device)
  14.353 -{
  14.354 -    int i, rc = 0, minor = MINOR(device);
  14.355 -    struct gendisk *gd;
  14.356 -    struct block_device *bd;
  14.357 -    xl_disk_t *disk = NULL;
  14.358 -
  14.359 -    if ( (bd = bdget(device)) == NULL )
  14.360 -        return -1;
  14.361 -
  14.362 -    /*
  14.363 -     * Update of partition info, and check of usage count, is protected
  14.364 -     * by the per-block-device semaphore.
  14.365 -     */
  14.366 -    down(&bd->bd_sem);
  14.367 -
  14.368 -    if ( ((gd = get_gendisk(device)) == NULL) ||
  14.369 -         ((disk = xldev_to_xldisk(device)) == NULL) )
  14.370 -        BUG();
  14.371 -
  14.372 -    if ( disk->usage != 0 )
  14.373 -    {
  14.374 -        printk(KERN_ALERT "VBD removal failed - in use [dev=%x]\n", device);
  14.375 -        rc = -1;
  14.376 -        goto out;
  14.377 -    }
  14.378 - 
  14.379 -    if ( (minor & (gd->max_p-1)) != 0 )
  14.380 -    {
  14.381 -        /* 1: The VBD is mapped to a partition rather than a whole unit. */
  14.382 -        invalidate_device(device, 1);
  14.383 -	gd->part[minor].start_sect = 0;
  14.384 -        gd->part[minor].nr_sects   = 0;
  14.385 -        gd->sizes[minor]           = 0;
  14.386 -
  14.387 -        /* Clear the consists-of-virtual-partitions flag if possible. */
  14.388 -        gd->flags[minor >> gd->minor_shift] &= ~GENHD_FL_VIRT_PARTNS;
  14.389 -        for ( i = 1; i < gd->max_p; i++ )
  14.390 -            if ( gd->sizes[(minor & ~(gd->max_p-1)) + i] != 0 )
  14.391 -                gd->flags[minor >> gd->minor_shift] |= GENHD_FL_VIRT_PARTNS;
  14.392 -
  14.393 -        /*
  14.394 -         * If all virtual partitions are now gone, and a 'whole unit' VBD is
  14.395 -         * present, then we can try to grok the unit's real partition table.
  14.396 -         */
  14.397 -        if ( !(gd->flags[minor >> gd->minor_shift] & GENHD_FL_VIRT_PARTNS) &&
  14.398 -             (gd->sizes[minor & ~(gd->max_p-1)] != 0) &&
  14.399 -             !(gd->flags[minor >> gd->minor_shift] & GENHD_FL_REMOVABLE) )
  14.400 -        {
  14.401 -            register_disk(gd,
  14.402 -                          device&~(gd->max_p-1), 
  14.403 -                          gd->max_p, 
  14.404 -                          &xlvbd_block_fops,
  14.405 -                          gd->part[minor&~(gd->max_p-1)].nr_sects);
  14.406 -        }
  14.407 -    }
  14.408 -    else
  14.409 -    {
  14.410 -        /*
  14.411 -         * 2: The VBD is mapped to an entire 'unit'. Clear all partitions.
  14.412 -         * NB. The partition entries are only cleared if there are no VBDs
  14.413 -         * mapped to individual partitions on this unit.
  14.414 -         */
  14.415 -        i = gd->max_p - 1; /* Default: clear subpartitions as well. */
  14.416 -        if ( gd->flags[minor >> gd->minor_shift] & GENHD_FL_VIRT_PARTNS )
  14.417 -            i = 0; /* 'Virtual' mode: only clear the 'whole unit' entry. */
  14.418 -        while ( i >= 0 )
  14.419 -        {
  14.420 -            invalidate_device(device+i, 1);
  14.421 -            gd->part[minor+i].start_sect = 0;
  14.422 -            gd->part[minor+i].nr_sects   = 0;
  14.423 -            gd->sizes[minor+i]           = 0;
  14.424 -            i--;
  14.425 -        }
  14.426 -    }
  14.427 -
  14.428 - out:
  14.429 -    up(&bd->bd_sem);
  14.430 -    bdput(bd);
  14.431 -    return rc;
  14.432 -}
  14.433 -
  14.434 -/*
  14.435 - * xlvbd_update_vbds - reprobes the VBD status and performs updates driver
  14.436 - * state. The VBDs need to be updated in this way when the domain is
  14.437 - * initialised and also each time we receive an XLBLK_UPDATE event.
  14.438 - */
  14.439 -void xlvbd_update_vbds(void)
  14.440 -{
  14.441 -    int i, j, k, old_nr, new_nr;
  14.442 -    vdisk_t *old_info, *new_info, *merged_info;
  14.443 -
  14.444 -    old_info = vbd_info;
  14.445 -    old_nr   = nr_vbds;
  14.446 -
  14.447 -    new_info = kmalloc(MAX_VBDS * sizeof(vdisk_t), GFP_KERNEL);
  14.448 -    if ( unlikely(new_nr = xlvbd_get_vbd_info(new_info)) < 0 )
  14.449 -    {
  14.450 -        kfree(new_info);
  14.451 -        return;
  14.452 -    }
  14.453 -
  14.454 -    /*
  14.455 -     * Final list maximum size is old list + new list. This occurs only when
  14.456 -     * old list and new list do not overlap at all, and we cannot yet destroy
  14.457 -     * VBDs in the old list because the usage counts are busy.
  14.458 -     */
  14.459 -    merged_info = kmalloc((old_nr + new_nr) * sizeof(vdisk_t), GFP_KERNEL);
  14.460 -
  14.461 -    /* @i tracks old list; @j tracks new list; @k tracks merged list. */
  14.462 -    i = j = k = 0;
  14.463 -
  14.464 -    while ( (i < old_nr) && (j < new_nr) )
  14.465 -    {
  14.466 -        if ( old_info[i].device < new_info[j].device )
  14.467 -        {
  14.468 -            if ( xlvbd_remove_device(old_info[i].device) != 0 )
  14.469 -                memcpy(&merged_info[k++], &old_info[i], sizeof(vdisk_t));
  14.470 -            i++;
  14.471 -        }
  14.472 -        else if ( old_info[i].device > new_info[j].device )
  14.473 -        {
  14.474 -            if ( xlvbd_init_device(&new_info[j]) == 0 )
  14.475 -                memcpy(&merged_info[k++], &new_info[j], sizeof(vdisk_t));
  14.476 -            j++;
  14.477 -        }
  14.478 -        else
  14.479 -        {
  14.480 -            if ( ((old_info[i].capacity == new_info[j].capacity) &&
  14.481 -                  (old_info[i].info == new_info[j].info)) ||
  14.482 -                 (xlvbd_remove_device(old_info[i].device) != 0) )
  14.483 -                memcpy(&merged_info[k++], &old_info[i], sizeof(vdisk_t));
  14.484 -            else if ( xlvbd_init_device(&new_info[j]) == 0 )
  14.485 -                memcpy(&merged_info[k++], &new_info[j], sizeof(vdisk_t));
  14.486 -            i++; j++;
  14.487 -        }
  14.488 -    }
  14.489 -
  14.490 -    for ( ; i < old_nr; i++ )
  14.491 -    {
  14.492 -        if ( xlvbd_remove_device(old_info[i].device) != 0 )
  14.493 -            memcpy(&merged_info[k++], &old_info[i], sizeof(vdisk_t));
  14.494 -    }
  14.495 -
  14.496 -    for ( ; j < new_nr; j++ )
  14.497 -    {
  14.498 -        if ( xlvbd_init_device(&new_info[j]) == 0 )
  14.499 -            memcpy(&merged_info[k++], &new_info[j], sizeof(vdisk_t));
  14.500 -    }
  14.501 -
  14.502 -    vbd_info = merged_info;
  14.503 -    nr_vbds  = k;
  14.504 -
  14.505 -    kfree(old_info);
  14.506 -    kfree(new_info);
  14.507 -}
  14.508 -
  14.509 -
  14.510 -/*
  14.511 - * Set up all the linux device goop for the virtual block devices (vbd's) that
  14.512 - * we know about. Note that although from the backend driver's p.o.v. VBDs are
  14.513 - * addressed simply an opaque 16-bit device number, the domain creation tools 
  14.514 - * conventionally allocate these numbers to correspond to those used by 'real' 
  14.515 - * linux -- this is just for convenience as it means e.g. that the same 
  14.516 - * /etc/fstab can be used when booting with or without Xen.
  14.517 - */
  14.518 -int xlvbd_init(void)
  14.519 -{
  14.520 -    int i;
  14.521 -    
  14.522 -    /*
  14.523 -     * If compiled as a module, we don't support unloading yet. We therefore 
  14.524 -     * permanently increment the reference count to disallow it.
  14.525 -     */
  14.526 -    SET_MODULE_OWNER(&xlvbd_block_fops);
  14.527 -    MOD_INC_USE_COUNT;
  14.528 -
  14.529 -    /* Initialize the global arrays. */
  14.530 -    for ( i = 0; i < 256; i++ ) 
  14.531 -    {
  14.532 -        /* from the generic ide code (drivers/ide/ide-probe.c, etc) */
  14.533 -        xlide_blksize_size[i]  = 1024;
  14.534 -        xlide_hardsect_size[i] = 512;
  14.535 -        xlide_max_sectors[i]   = 128;  /* 'hwif->rqsize' if we knew it */
  14.536 -
  14.537 -        /* from the generic scsi disk code (drivers/scsi/sd.c) */
  14.538 -        xlscsi_blksize_size[i]  = 1024; /* XXX 512; */
  14.539 -        xlscsi_hardsect_size[i] = 512;
  14.540 -        xlscsi_max_sectors[i]   = 128*8; /* XXX 128; */
  14.541 -
  14.542 -        /* we don't really know what to set these too since it depends */
  14.543 -        xlvbd_blksize_size[i]  = 512;
  14.544 -        xlvbd_hardsect_size[i] = 512;
  14.545 -        xlvbd_max_sectors[i]   = 128;
  14.546 -    }
  14.547 -
  14.548 -    vbd_info = kmalloc(MAX_VBDS * sizeof(vdisk_t), GFP_KERNEL);
  14.549 -    nr_vbds  = xlvbd_get_vbd_info(vbd_info);
  14.550 -
  14.551 -    if ( nr_vbds < 0 )
  14.552 -    {
  14.553 -        kfree(vbd_info);
  14.554 -        vbd_info = NULL;
  14.555 -        nr_vbds  = 0;
  14.556 -    }
  14.557 -    else
  14.558 -    {
  14.559 -        for ( i = 0; i < nr_vbds; i++ )
  14.560 -            xlvbd_init_device(&vbd_info[i]);
  14.561 -    }
  14.562 -
  14.563 -    return 0;
  14.564 -}
    15.1 --- a/linux-2.4.26-xen-sparse/arch/xen/drivers/console/Makefile	Sat Aug 21 10:28:38 2004 +0000
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,3 +0,0 @@
    15.4 -O_TARGET := drv.o
    15.5 -obj-$(CONFIG_XEN_CONSOLE) := console.o
    15.6 -include $(TOPDIR)/Rules.make
    16.1 --- a/linux-2.4.26-xen-sparse/arch/xen/drivers/dom0/Makefile	Sat Aug 21 10:28:38 2004 +0000
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,3 +0,0 @@
    16.4 -O_TARGET := drv.o
    16.5 -obj-y := core.o
    16.6 -include $(TOPDIR)/Rules.make
    17.1 --- a/linux-2.4.26-xen-sparse/arch/xen/drivers/evtchn/Makefile	Sat Aug 21 10:28:38 2004 +0000
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,3 +0,0 @@
    17.4 -O_TARGET := drv.o
    17.5 -obj-y := evtchn.o
    17.6 -include $(TOPDIR)/Rules.make
    18.1 --- a/linux-2.4.26-xen-sparse/arch/xen/drivers/netif/Makefile	Sat Aug 21 10:28:38 2004 +0000
    18.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.3 @@ -1,10 +0,0 @@
    18.4 -
    18.5 -O_TARGET := drv.o
    18.6 -
    18.7 -subdir-y += frontend
    18.8 -obj-y    += frontend/drv.o
    18.9 -
   18.10 -subdir-$(CONFIG_XEN_PHYSDEV_ACCESS) += backend
   18.11 -obj-$(CONFIG_XEN_PHYSDEV_ACCESS)    += backend/drv.o
   18.12 -
   18.13 -include $(TOPDIR)/Rules.make
    19.1 --- a/linux-2.4.26-xen-sparse/arch/xen/drivers/netif/backend/Makefile	Sat Aug 21 10:28:38 2004 +0000
    19.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.3 @@ -1,4 +0,0 @@
    19.4 -O_TARGET := drv.o
    19.5 -export-objs := interface.o
    19.6 -obj-y := main.o control.o interface.o
    19.7 -include $(TOPDIR)/Rules.make
    20.1 --- a/linux-2.4.26-xen-sparse/arch/xen/drivers/netif/frontend/Makefile	Sat Aug 21 10:28:38 2004 +0000
    20.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.3 @@ -1,3 +0,0 @@
    20.4 -O_TARGET := drv.o
    20.5 -obj-y := main.o
    20.6 -include $(TOPDIR)/Rules.make
    21.1 --- a/linux-2.4.26-xen-sparse/arch/xen/kernel/Makefile	Sat Aug 21 10:28:38 2004 +0000
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,20 +0,0 @@
    21.4 -
    21.5 -.S.o:
    21.6 -	$(CC) $(AFLAGS) -traditional -c $< -o $*.o
    21.7 -
    21.8 -all: kernel.o head.o init_task.o
    21.9 -
   21.10 -O_TARGET := kernel.o
   21.11 -
   21.12 -export-objs     := i386_ksyms.o
   21.13 -
   21.14 -obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o  \
   21.15 -		ptrace.o ioport.o ldt.o setup.o time.o sys_i386.o \
   21.16 -		i386_ksyms.o i387.o evtchn.o ctrl_if.o pci-dma.o \
   21.17 -		reboot.o fixup.o
   21.18 -
   21.19 -ifdef CONFIG_PCI
   21.20 -obj-y	+= pci-i386.o pci-pc.o
   21.21 -endif
   21.22 -
   21.23 -include $(TOPDIR)/Rules.make
    22.1 --- a/linux-2.4.26-xen-sparse/arch/xen/kernel/entry.S	Sat Aug 21 10:28:38 2004 +0000
    22.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.3 @@ -1,789 +0,0 @@
    22.4 -/*
    22.5 - *  linux/arch/i386/entry.S
    22.6 - *
    22.7 - *  Copyright (C) 1991, 1992  Linus Torvalds
    22.8 - */
    22.9 -
   22.10 -/*
   22.11 - * entry.S contains the system-call and fault low-level handling routines.
   22.12 - * This also contains the timer-interrupt handler, as well as all interrupts
   22.13 - * and faults that can result in a task-switch.
   22.14 - *
   22.15 - * NOTE: This code handles signal-recognition, which happens every time
   22.16 - * after a timer-interrupt and after each system call.
   22.17 - *
   22.18 - * I changed all the .align's to 4 (16 byte alignment), as that's faster
   22.19 - * on a 486.
   22.20 - *
   22.21 - * Stack layout in 'ret_to_user':
   22.22 - * 	ptrace needs to have all regs on the stack.
   22.23 - *	if the order here is changed, it needs to be
   22.24 - *	updated in fork.c:copy_process, signal.c:do_signal,
   22.25 - *	ptrace.c and ptrace.h
   22.26 - *
   22.27 - *	 0(%esp) - %ebx
   22.28 - *	 4(%esp) - %ecx
   22.29 - *	 8(%esp) - %edx
   22.30 - *       C(%esp) - %esi
   22.31 - *	10(%esp) - %edi
   22.32 - *	14(%esp) - %ebp
   22.33 - *	18(%esp) - %eax
   22.34 - *	1C(%esp) - %ds
   22.35 - *	20(%esp) - %es
   22.36 - *	24(%esp) - orig_eax
   22.37 - *	28(%esp) - %eip
   22.38 - *	2C(%esp) - %cs
   22.39 - *	30(%esp) - %eflags
   22.40 - *	34(%esp) - %oldesp
   22.41 - *	38(%esp) - %oldss
   22.42 - *
   22.43 - * "current" is in register %ebx during any slow entries.
   22.44 - */
   22.45 -
   22.46 -#include <linux/config.h>
   22.47 -#include <linux/sys.h>
   22.48 -#include <linux/linkage.h>
   22.49 -#include <asm/segment.h>
   22.50 -#include <asm/smp.h>
   22.51 -
   22.52 -EBX		= 0x00
   22.53 -ECX		= 0x04
   22.54 -EDX		= 0x08
   22.55 -ESI		= 0x0C
   22.56 -EDI		= 0x10
   22.57 -EBP		= 0x14
   22.58 -EAX		= 0x18
   22.59 -DS		= 0x1C
   22.60 -ES		= 0x20
   22.61 -ORIG_EAX	= 0x24
   22.62 -EIP		= 0x28
   22.63 -CS		= 0x2C
   22.64 -EFLAGS		= 0x30
   22.65 -OLDESP		= 0x34
   22.66 -OLDSS		= 0x38
   22.67 -
   22.68 -CF_MASK		= 0x00000001
   22.69 -TF_MASK		= 0x00000100
   22.70 -IF_MASK		= 0x00000200
   22.71 -DF_MASK		= 0x00000400
   22.72 -NT_MASK		= 0x00004000
   22.73 -
   22.74 -/* Offsets into task_struct. */
   22.75 -state		=  0
   22.76 -flags		=  4
   22.77 -sigpending	=  8
   22.78 -addr_limit	= 12
   22.79 -exec_domain	= 16
   22.80 -need_resched	= 20
   22.81 -tsk_ptrace	= 24
   22.82 -processor	= 52
   22.83 -
   22.84 -/* Offsets into shared_info_t. */
   22.85 -#define evtchn_upcall_pending /* 0 */
   22.86 -#define evtchn_upcall_mask       1
   22.87 -
   22.88 -ENOSYS = 38
   22.89 -
   22.90 -
   22.91 -#define SAVE_ALL \
   22.92 -	cld; \
   22.93 -	pushl %es; \
   22.94 -	pushl %ds; \
   22.95 -	pushl %eax; \
   22.96 -	pushl %ebp; \
   22.97 -	pushl %edi; \
   22.98 -	pushl %esi; \
   22.99 -	pushl %edx; \
  22.100 -	pushl %ecx; \
  22.101 -	pushl %ebx; \
  22.102 -	movl $(__KERNEL_DS),%edx; \
  22.103 -	movl %edx,%ds; \
  22.104 -	movl %edx,%es;
  22.105 -
  22.106 -#define RESTORE_ALL	\
  22.107 -	popl %ebx;	\
  22.108 -	popl %ecx;	\
  22.109 -	popl %edx;	\
  22.110 -	popl %esi;	\
  22.111 -	popl %edi;	\
  22.112 -	popl %ebp;	\
  22.113 -	popl %eax;	\
  22.114 -1:	popl %ds;	\
  22.115 -2:	popl %es;	\
  22.116 -	addl $4,%esp;	\
  22.117 -3:	iret;		\
  22.118 -.section .fixup,"ax";	\
  22.119 -4:	movl $0,(%esp);	\
  22.120 -	jmp 1b;		\
  22.121 -5:	movl $0,(%esp);	\
  22.122 -	jmp 2b;		\
  22.123 -6:	pushl %ss;	\
  22.124 -	popl %ds;	\
  22.125 -	pushl %ss;	\
  22.126 -	popl %es;	\
  22.127 -	pushl $11;	\
  22.128 -	call do_exit;	\
  22.129 -.previous;		\
  22.130 -.section __ex_table,"a";\
  22.131 -	.align 4;	\
  22.132 -	.long 1b,4b;	\
  22.133 -	.long 2b,5b;	\
  22.134 -	.long 3b,6b;	\
  22.135 -.previous
  22.136 -
  22.137 -#define GET_CURRENT(reg) \
  22.138 -	movl $-8192, reg; \
  22.139 -	andl %esp, reg
  22.140 -
  22.141 -ENTRY(lcall7)
  22.142 -	pushfl			# We get a different stack layout with call
  22.143 -	pushl %eax		# gates, which has to be cleaned up later..
  22.144 -	SAVE_ALL
  22.145 -	movl EIP(%esp),%eax	# due to call gates, this is eflags, not eip..
  22.146 -	movl CS(%esp),%edx	# this is eip..
  22.147 -	movl EFLAGS(%esp),%ecx	# and this is cs..
  22.148 -	movl %eax,EFLAGS(%esp)	#
  22.149 -	andl $~(NT_MASK|TF_MASK|DF_MASK), %eax
  22.150 -	pushl %eax
  22.151 -	popfl
  22.152 -	movl %edx,EIP(%esp)	# Now we move them to their "normal" places
  22.153 -	movl %ecx,CS(%esp)	#
  22.154 -	movl %esp,%ebx
  22.155 -	pushl %ebx
  22.156 -	andl $-8192,%ebx	# GET_CURRENT
  22.157 -	movl exec_domain(%ebx),%edx	# Get the execution domain
  22.158 -	movl 4(%edx),%edx	# Get the lcall7 handler for the domain
  22.159 -	pushl $0x7
  22.160 -	call *%edx
  22.161 -	addl $4, %esp
  22.162 -	popl %eax
  22.163 -	jmp ret_to_user
  22.164 -
  22.165 -ENTRY(lcall27)
  22.166 -	pushfl			# We get a different stack layout with call
  22.167 -	pushl %eax		# gates, which has to be cleaned up later..
  22.168 -	SAVE_ALL
  22.169 -	movl EIP(%esp),%eax	# due to call gates, this is eflags, not eip..
  22.170 -	movl CS(%esp),%edx	# this is eip..
  22.171 -	movl EFLAGS(%esp),%ecx	# and this is cs..
  22.172 -	movl %eax,EFLAGS(%esp)	#
  22.173 -	andl $~(NT_MASK|TF_MASK|DF_MASK), %eax
  22.174 -	pushl %eax
  22.175 -	popfl
  22.176 -	movl %edx,EIP(%esp)	# Now we move them to their "normal" places
  22.177 -	movl %ecx,CS(%esp)	#
  22.178 -	movl %esp,%ebx
  22.179 -	pushl %ebx
  22.180 -	andl $-8192,%ebx	# GET_CURRENT
  22.181 -	movl exec_domain(%ebx),%edx	# Get the execution domain
  22.182 -	movl 4(%edx),%edx	# Get the lcall7 handler for the domain
  22.183 -	pushl $0x27
  22.184 -	call *%edx
  22.185 -	addl $4, %esp
  22.186 -	popl %eax
  22.187 -	jmp ret_to_user
  22.188 -
  22.189 -ENTRY(ret_from_fork)
  22.190 -	pushl %ebx
  22.191 -	call SYMBOL_NAME(schedule_tail)
  22.192 -	addl $4, %esp
  22.193 -	GET_CURRENT(%ebx)
  22.194 -	testb $0x02,tsk_ptrace(%ebx)	# PT_TRACESYS
  22.195 -	jne tracesys_exit
  22.196 -	jmp ret_to_user
  22.197 -
  22.198 -/*
  22.199 - * Return to user mode is not as complex as all this looks,
  22.200 - * but we want the default path for a system call return to
  22.201 - * go as quickly as possible which is why some of this is
  22.202 - * less clear than it otherwise should be.
  22.203 - */
  22.204 -ENTRY(system_call)
  22.205 -	pushl %eax			# save orig_eax
  22.206 -	SAVE_ALL
  22.207 -	GET_CURRENT(%ebx)
  22.208 -	testb $0x02,tsk_ptrace(%ebx)	# PT_TRACESYS
  22.209 -	jne tracesys
  22.210 -	cmpl $(NR_syscalls),%eax
  22.211 -	jae badsys
  22.212 -	call *SYMBOL_NAME(sys_call_table)(,%eax,4)
  22.213 -	movl %eax,EAX(%esp)		# save the return value
  22.214 -ret_to_user:
  22.215 -        movl SYMBOL_NAME(HYPERVISOR_shared_info),%esi
  22.216 -        movb $1,evtchn_upcall_mask(%esi) # make tests atomic
  22.217 -ret_to_user_nocli:
  22.218 -	cmpl $0,need_resched(%ebx)
  22.219 -	jne  reschedule
  22.220 -	cmpl $0,sigpending(%ebx)
  22.221 -	je   safesti                    # ensure need_resched updates are seen
  22.222 -/*signal_return:*/
  22.223 -	movb $0,evtchn_upcall_mask(%esi) # reenable event callbacks
  22.224 -	movl %esp,%eax
  22.225 -	xorl %edx,%edx
  22.226 -	call SYMBOL_NAME(do_signal)
  22.227 -	jmp  safesti
  22.228 -
  22.229 -	ALIGN
  22.230 -restore_all:
  22.231 -	RESTORE_ALL
  22.232 -
  22.233 -	ALIGN
  22.234 -tracesys:
  22.235 -	movl $-ENOSYS,EAX(%esp)
  22.236 -	call SYMBOL_NAME(syscall_trace)
  22.237 -	movl ORIG_EAX(%esp),%eax
  22.238 -	cmpl $(NR_syscalls),%eax
  22.239 -	jae tracesys_exit
  22.240 -	call *SYMBOL_NAME(sys_call_table)(,%eax,4)
  22.241 -	movl %eax,EAX(%esp)		# save the return value
  22.242 -tracesys_exit:
  22.243 -	call SYMBOL_NAME(syscall_trace)
  22.244 -	jmp ret_to_user
  22.245 -badsys:
  22.246 -	movl $-ENOSYS,EAX(%esp)
  22.247 -	jmp ret_to_user
  22.248 -
  22.249 -	ALIGN
  22.250 -ENTRY(ret_from_intr)
  22.251 -	GET_CURRENT(%ebx)
  22.252 -ret_from_exception:
  22.253 -	movb CS(%esp),%al
  22.254 -	testl $2,%eax
  22.255 -	jne ret_to_user
  22.256 -	jmp restore_all
  22.257 -
  22.258 -	ALIGN
  22.259 -reschedule:
  22.260 -        movb $0,evtchn_upcall_mask(%esi)  # reenable event callbacks
  22.261 -	call SYMBOL_NAME(schedule)        # test
  22.262 -	jmp  ret_to_user
  22.263 -
  22.264 -ENTRY(divide_error)
  22.265 -	pushl $0		# no error code
  22.266 -	pushl $ SYMBOL_NAME(do_divide_error)
  22.267 -	ALIGN
  22.268 -error_code:
  22.269 -	pushl %ds
  22.270 -	pushl %eax
  22.271 -	xorl %eax,%eax
  22.272 -	pushl %ebp
  22.273 -	pushl %edi
  22.274 -	pushl %esi
  22.275 -	pushl %edx
  22.276 -	decl %eax			# eax = -1
  22.277 -	pushl %ecx
  22.278 -	pushl %ebx
  22.279 -	GET_CURRENT(%ebx)
  22.280 -	cld
  22.281 -	movl %es,%ecx
  22.282 -	movl ORIG_EAX(%esp), %esi	# get the error code
  22.283 -	movl ES(%esp), %edi		# get the function address
  22.284 -	movl %eax, ORIG_EAX(%esp)
  22.285 -	movl %ecx, ES(%esp)
  22.286 -	movl %esp,%edx
  22.287 -	pushl %esi			# push the error code
  22.288 -	pushl %edx			# push the pt_regs pointer
  22.289 -	movl $(__KERNEL_DS),%edx
  22.290 -	movl %edx,%ds
  22.291 -	movl %edx,%es
  22.292 -	call *%edi
  22.293 -	addl $8,%esp
  22.294 -	jmp ret_from_exception
  22.295 -
  22.296 -# A note on the "critical region" in our callback handler.
  22.297 -# We want to avoid stacking callback handlers due to events occurring
  22.298 -# during handling of the last event. To do this, we keep events disabled
  22.299 -# until we've done all processing. HOWEVER, we must enable events before
  22.300 -# popping the stack frame (can't be done atomically) and so it would still
  22.301 -# be possible to get enough handler activations to overflow the stack.
  22.302 -# Although unlikely, bugs of that kind are hard to track down, so we'd
  22.303 -# like to avoid the possibility.
  22.304 -# So, on entry to the handler we detect whether we interrupted an
  22.305 -# existing activation in its critical region -- if so, we pop the current
  22.306 -# activation and restart the handler using the previous one.
  22.307 -ENTRY(hypervisor_callback)
  22.308 -        pushl %eax
  22.309 -        SAVE_ALL
  22.310 -        GET_CURRENT(%ebx)
  22.311 -        movl EIP(%esp),%eax
  22.312 -        cmpl $scrit,%eax
  22.313 -        jb   11f
  22.314 -        cmpl $ecrit,%eax
  22.315 -        jb   critical_region_fixup
  22.316 -11:     push %esp
  22.317 -        call evtchn_do_upcall
  22.318 -        add  $4,%esp
  22.319 -        movl SYMBOL_NAME(HYPERVISOR_shared_info),%esi
  22.320 -        movb CS(%esp),%cl
  22.321 -	test $2,%cl          # slow return to ring 2 or 3
  22.322 -	jne  ret_to_user_nocli
  22.323 -safesti:movb $0,evtchn_upcall_mask(%esi) # reenable event callbacks
  22.324 -scrit:  /**** START OF CRITICAL REGION ****/
  22.325 -        testb $0xFF,evtchn_upcall_pending(%esi)
  22.326 -        jnz  14f              # process more events if necessary...
  22.327 -        RESTORE_ALL
  22.328 -14:     movb $1,evtchn_upcall_mask(%esi)
  22.329 -        jmp  11b
  22.330 -ecrit:  /**** END OF CRITICAL REGION ****/
  22.331 -# [How we do the fixup]. We want to merge the current stack frame with the
  22.332 -# just-interrupted frame. How we do this depends on where in the critical
  22.333 -# region the interrupted handler was executing, and so how many saved
  22.334 -# registers are in each frame. We do this quickly using the lookup table
  22.335 -# 'critical_fixup_table'. For each byte offset in the critical region, it
  22.336 -# provides the number of bytes which have already been popped from the
  22.337 -# interrupted stack frame. 
  22.338 -critical_region_fixup:
  22.339 -        addl $critical_fixup_table-scrit,%eax
  22.340 -        movzbl (%eax),%eax    # %eax contains num bytes popped
  22.341 -        mov  %esp,%esi
  22.342 -        add  %eax,%esi        # %esi points at end of src region
  22.343 -        mov  %esp,%edi
  22.344 -        add  $0x34,%edi       # %edi points at end of dst region
  22.345 -        mov  %eax,%ecx
  22.346 -        shr  $2,%ecx          # convert words to bytes
  22.347 -        je   16f              # skip loop if nothing to copy
  22.348 -15:     subl $4,%esi          # pre-decrementing copy loop
  22.349 -        subl $4,%edi
  22.350 -        movl (%esi),%eax
  22.351 -        movl %eax,(%edi)
  22.352 -        loop 15b
  22.353 -16:     movl %edi,%esp        # final %edi is top of merged stack
  22.354 -        jmp  11b
  22.355 -        
  22.356 -critical_fixup_table:        
  22.357 -        .byte 0x00,0x00,0x00                  # testb $0xFF,(%esi)
  22.358 -        .byte 0x00,0x00                       # jnz  14f
  22.359 -        .byte 0x00                            # pop  %ebx
  22.360 -        .byte 0x04                            # pop  %ecx
  22.361 -        .byte 0x08                            # pop  %edx
  22.362 -        .byte 0x0c                            # pop  %esi
  22.363 -        .byte 0x10                            # pop  %edi
  22.364 -        .byte 0x14                            # pop  %ebp
  22.365 -        .byte 0x18                            # pop  %eax
  22.366 -        .byte 0x1c                            # pop  %ds
  22.367 -        .byte 0x20                            # pop  %es
  22.368 -        .byte 0x24,0x24,0x24                  # add  $4,%esp
  22.369 -        .byte 0x28                            # iret
  22.370 -        .byte 0x00,0x00,0x00,0x00             # movb $1,4(%esi)
  22.371 -        .byte 0x00,0x00                       # jmp  11b
  22.372 -
  22.373 -# Hypervisor uses this for application faults while it executes.
  22.374 -ENTRY(failsafe_callback)
  22.375 -        pushal
  22.376 -        call SYMBOL_NAME(install_safe_pf_handler)
  22.377 -        movl 32(%esp),%ebx
  22.378 -1:      movl %ebx,%ds
  22.379 -        movl 36(%esp),%ebx
  22.380 -2:      movl %ebx,%es
  22.381 -        movl 40(%esp),%ebx
  22.382 -3:      movl %ebx,%fs
  22.383 -        movl 44(%esp),%ebx
  22.384 -4:      movl %ebx,%gs
  22.385 -        call SYMBOL_NAME(install_normal_pf_handler)
  22.386 -        popal
  22.387 -        addl $16,%esp
  22.388 -5:      iret
  22.389 -.section .fixup,"ax";	\
  22.390 -6:	xorl %ebx,%ebx;	\
  22.391 -	jmp 1b;		\
  22.392 -7:	xorl %ebx,%ebx;	\
  22.393 -	jmp 2b;		\
  22.394 -8:	xorl %ebx,%ebx;	\
  22.395 -	jmp 3b;		\
  22.396 -9:	xorl %ebx,%ebx;	\
  22.397 -	jmp 4b;		\
  22.398 -10:	pushl %ss;	\
  22.399 -	popl %ds;	\
  22.400 -	pushl %ss;	\
  22.401 -	popl %es;	\
  22.402 -	pushl $11;	\
  22.403 -	call do_exit;	\
  22.404 -.previous;		\
  22.405 -.section __ex_table,"a";\
  22.406 -	.align 4;	\
  22.407 -	.long 1b,6b;	\
  22.408 -	.long 2b,7b;	\
  22.409 -	.long 3b,8b;	\
  22.410 -	.long 4b,9b;	\
  22.411 -	.long 5b,10b;	\
  22.412 -.previous
  22.413 -        
  22.414 -ENTRY(coprocessor_error)
  22.415 -	pushl $0
  22.416 -	pushl $ SYMBOL_NAME(do_coprocessor_error)
  22.417 -	jmp error_code
  22.418 -
  22.419 -ENTRY(simd_coprocessor_error)
  22.420 -	pushl $0
  22.421 -	pushl $ SYMBOL_NAME(do_simd_coprocessor_error)
  22.422 -	jmp error_code
  22.423 -
  22.424 -ENTRY(device_not_available)
  22.425 -	pushl $-1		# mark this as an int
  22.426 -	SAVE_ALL
  22.427 -	GET_CURRENT(%ebx)
  22.428 -	call SYMBOL_NAME(math_state_restore)
  22.429 -	jmp ret_from_exception
  22.430 -
  22.431 -ENTRY(debug)
  22.432 -	pushl $0
  22.433 -	pushl $ SYMBOL_NAME(do_debug)
  22.434 -	jmp error_code
  22.435 -
  22.436 -ENTRY(int3)
  22.437 -	pushl $0
  22.438 -	pushl $ SYMBOL_NAME(do_int3)
  22.439 -	jmp error_code
  22.440 -
  22.441 -ENTRY(overflow)
  22.442 -	pushl $0
  22.443 -	pushl $ SYMBOL_NAME(do_overflow)
  22.444 -	jmp error_code
  22.445 -
  22.446 -ENTRY(bounds)
  22.447 -	pushl $0
  22.448 -	pushl $ SYMBOL_NAME(do_bounds)
  22.449 -	jmp error_code
  22.450 -
  22.451 -ENTRY(invalid_op)
  22.452 -	pushl $0
  22.453 -	pushl $ SYMBOL_NAME(do_invalid_op)
  22.454 -	jmp error_code
  22.455 -
  22.456 -ENTRY(coprocessor_segment_overrun)
  22.457 -	pushl $0
  22.458 -	pushl $ SYMBOL_NAME(do_coprocessor_segment_overrun)
  22.459 -	jmp error_code
  22.460 -
  22.461 -ENTRY(double_fault)
  22.462 -	pushl $ SYMBOL_NAME(do_double_fault)
  22.463 -	jmp error_code
  22.464 -
  22.465 -ENTRY(invalid_TSS)
  22.466 -	pushl $ SYMBOL_NAME(do_invalid_TSS)
  22.467 -	jmp error_code
  22.468 -
  22.469 -ENTRY(segment_not_present)
  22.470 -	pushl $ SYMBOL_NAME(do_segment_not_present)
  22.471 -	jmp error_code
  22.472 -
  22.473 -ENTRY(stack_segment)
  22.474 -	pushl $ SYMBOL_NAME(do_stack_segment)
  22.475 -	jmp error_code
  22.476 -
  22.477 -ENTRY(general_protection)
  22.478 -	pushl $ SYMBOL_NAME(do_general_protection)
  22.479 -	jmp error_code
  22.480 -
  22.481 -ENTRY(alignment_check)
  22.482 -	pushl $ SYMBOL_NAME(do_alignment_check)
  22.483 -	jmp error_code
  22.484 -
  22.485 -# This handler is special, because it gets an extra value on its stack,
  22.486 -# which is the linear faulting address.
  22.487 -#define PAGE_FAULT_STUB(_name1, _name2)                                  \
  22.488 -ENTRY(_name1)                                                            \
  22.489 -	pushl %ds                                                      ; \
  22.490 -	pushl %eax                                                     ; \
  22.491 -	xorl %eax,%eax                                                 ; \
  22.492 -	pushl %ebp                                                     ; \
  22.493 -	pushl %edi                                                     ; \
  22.494 -	pushl %esi                                                     ; \
  22.495 -	pushl %edx                                                     ; \
  22.496 -	decl %eax                      /* eax = -1 */                  ; \
  22.497 -	pushl %ecx                                                     ; \
  22.498 -	pushl %ebx                                                     ; \
  22.499 -	GET_CURRENT(%ebx)                                              ; \
  22.500 -	cld                                                            ; \
  22.501 -	movl %es,%ecx                                                  ; \
  22.502 -	movl ORIG_EAX(%esp), %esi      /* get the error code */        ; \
  22.503 -	movl ES(%esp), %edi            /* get the faulting address */  ; \
  22.504 -	movl %eax, ORIG_EAX(%esp)                                      ; \
  22.505 -	movl %ecx, ES(%esp)                                            ; \
  22.506 -	movl %esp,%edx                                                 ; \
  22.507 -        pushl %edi                     /* push the faulting address */ ; \
  22.508 -	pushl %esi                     /* push the error code */       ; \
  22.509 -	pushl %edx                     /* push the pt_regs pointer */  ; \
  22.510 -	movl $(__KERNEL_DS),%edx                                       ; \
  22.511 -	movl %edx,%ds                                                  ; \
  22.512 -	movl %edx,%es                                                  ; \
  22.513 -	call SYMBOL_NAME(_name2)                                       ; \
  22.514 -	addl $12,%esp                                                  ; \
  22.515 -	jmp ret_from_exception                                         ;
  22.516 -PAGE_FAULT_STUB(page_fault, do_page_fault)
  22.517 -PAGE_FAULT_STUB(safe_page_fault, do_safe_page_fault)
  22.518 -
  22.519 -ENTRY(machine_check)
  22.520 -	pushl $0
  22.521 -	pushl $ SYMBOL_NAME(do_machine_check)
  22.522 -	jmp error_code
  22.523 -
  22.524 -ENTRY(fixup_4gb_segment)
  22.525 -	pushl $ SYMBOL_NAME(do_fixup_4gb_segment)
  22.526 -	jmp error_code
  22.527 -
  22.528 -.data
  22.529 -ENTRY(sys_call_table)
  22.530 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 0  -  old "setup()" system call*/
  22.531 -	.long SYMBOL_NAME(sys_exit)
  22.532 -	.long SYMBOL_NAME(sys_fork)
  22.533 -	.long SYMBOL_NAME(sys_read)
  22.534 -	.long SYMBOL_NAME(sys_write)
  22.535 -	.long SYMBOL_NAME(sys_open)		/* 5 */
  22.536 -	.long SYMBOL_NAME(sys_close)
  22.537 -	.long SYMBOL_NAME(sys_waitpid)
  22.538 -	.long SYMBOL_NAME(sys_creat)
  22.539 -	.long SYMBOL_NAME(sys_link)
  22.540 -	.long SYMBOL_NAME(sys_unlink)		/* 10 */
  22.541 -	.long SYMBOL_NAME(sys_execve)
  22.542 -	.long SYMBOL_NAME(sys_chdir)
  22.543 -	.long SYMBOL_NAME(sys_time)
  22.544 -	.long SYMBOL_NAME(sys_mknod)
  22.545 -	.long SYMBOL_NAME(sys_chmod)		/* 15 */
  22.546 -	.long SYMBOL_NAME(sys_lchown16)
  22.547 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old break syscall holder */
  22.548 -	.long SYMBOL_NAME(sys_stat)
  22.549 -	.long SYMBOL_NAME(sys_lseek)
  22.550 -	.long SYMBOL_NAME(sys_getpid)		/* 20 */
  22.551 -	.long SYMBOL_NAME(sys_mount)
  22.552 -	.long SYMBOL_NAME(sys_oldumount)
  22.553 -	.long SYMBOL_NAME(sys_setuid16)
  22.554 -	.long SYMBOL_NAME(sys_getuid16)
  22.555 -	.long SYMBOL_NAME(sys_stime)		/* 25 */
  22.556 -	.long SYMBOL_NAME(sys_ptrace)
  22.557 -	.long SYMBOL_NAME(sys_alarm)
  22.558 -	.long SYMBOL_NAME(sys_fstat)
  22.559 -	.long SYMBOL_NAME(sys_pause)
  22.560 -	.long SYMBOL_NAME(sys_utime)		/* 30 */
  22.561 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old stty syscall holder */
  22.562 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old gtty syscall holder */
  22.563 -	.long SYMBOL_NAME(sys_access)
  22.564 -	.long SYMBOL_NAME(sys_nice)
  22.565 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 35 */		/* old ftime syscall holder */
  22.566 -	.long SYMBOL_NAME(sys_sync)
  22.567 -	.long SYMBOL_NAME(sys_kill)
  22.568 -	.long SYMBOL_NAME(sys_rename)
  22.569 -	.long SYMBOL_NAME(sys_mkdir)
  22.570 -	.long SYMBOL_NAME(sys_rmdir)		/* 40 */
  22.571 -	.long SYMBOL_NAME(sys_dup)
  22.572 -	.long SYMBOL_NAME(sys_pipe)
  22.573 -	.long SYMBOL_NAME(sys_times)
  22.574 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old prof syscall holder */
  22.575 -	.long SYMBOL_NAME(sys_brk)		/* 45 */
  22.576 -	.long SYMBOL_NAME(sys_setgid16)
  22.577 -	.long SYMBOL_NAME(sys_getgid16)
  22.578 -	.long SYMBOL_NAME(sys_signal)
  22.579 -	.long SYMBOL_NAME(sys_geteuid16)
  22.580 -	.long SYMBOL_NAME(sys_getegid16)	/* 50 */
  22.581 -	.long SYMBOL_NAME(sys_acct)
  22.582 -	.long SYMBOL_NAME(sys_umount)					/* recycled never used phys() */
  22.583 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old lock syscall holder */
  22.584 -	.long SYMBOL_NAME(sys_ioctl)
  22.585 -	.long SYMBOL_NAME(sys_fcntl)		/* 55 */
  22.586 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old mpx syscall holder */
  22.587 -	.long SYMBOL_NAME(sys_setpgid)
  22.588 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old ulimit syscall holder */
  22.589 -	.long SYMBOL_NAME(sys_olduname)
  22.590 -	.long SYMBOL_NAME(sys_umask)		/* 60 */
  22.591 -	.long SYMBOL_NAME(sys_chroot)
  22.592 -	.long SYMBOL_NAME(sys_ustat)
  22.593 -	.long SYMBOL_NAME(sys_dup2)
  22.594 -	.long SYMBOL_NAME(sys_getppid)
  22.595 -	.long SYMBOL_NAME(sys_getpgrp)		/* 65 */
  22.596 -	.long SYMBOL_NAME(sys_setsid)
  22.597 -	.long SYMBOL_NAME(sys_sigaction)
  22.598 -	.long SYMBOL_NAME(sys_sgetmask)
  22.599 -	.long SYMBOL_NAME(sys_ssetmask)
  22.600 -	.long SYMBOL_NAME(sys_setreuid16)	/* 70 */
  22.601 -	.long SYMBOL_NAME(sys_setregid16)
  22.602 -	.long SYMBOL_NAME(sys_sigsuspend)
  22.603 -	.long SYMBOL_NAME(sys_sigpending)
  22.604 -	.long SYMBOL_NAME(sys_sethostname)
  22.605 -	.long SYMBOL_NAME(sys_setrlimit)	/* 75 */
  22.606 -	.long SYMBOL_NAME(sys_old_getrlimit)
  22.607 -	.long SYMBOL_NAME(sys_getrusage)
  22.608 -	.long SYMBOL_NAME(sys_gettimeofday)
  22.609 -	.long SYMBOL_NAME(sys_settimeofday)
  22.610 -	.long SYMBOL_NAME(sys_getgroups16)	/* 80 */
  22.611 -	.long SYMBOL_NAME(sys_setgroups16)
  22.612 -	.long SYMBOL_NAME(old_select)
  22.613 -	.long SYMBOL_NAME(sys_symlink)
  22.614 -	.long SYMBOL_NAME(sys_lstat)
  22.615 -	.long SYMBOL_NAME(sys_readlink)		/* 85 */
  22.616 -	.long SYMBOL_NAME(sys_uselib)
  22.617 -	.long SYMBOL_NAME(sys_swapon)
  22.618 -	.long SYMBOL_NAME(sys_reboot)
  22.619 -	.long SYMBOL_NAME(old_readdir)
  22.620 -	.long SYMBOL_NAME(old_mmap)		/* 90 */
  22.621 -	.long SYMBOL_NAME(sys_munmap)
  22.622 -	.long SYMBOL_NAME(sys_truncate)
  22.623 -	.long SYMBOL_NAME(sys_ftruncate)
  22.624 -	.long SYMBOL_NAME(sys_fchmod)
  22.625 -	.long SYMBOL_NAME(sys_fchown16)		/* 95 */
  22.626 -	.long SYMBOL_NAME(sys_getpriority)
  22.627 -	.long SYMBOL_NAME(sys_setpriority)
  22.628 -	.long SYMBOL_NAME(sys_ni_syscall)				/* old profil syscall holder */
  22.629 -	.long SYMBOL_NAME(sys_statfs)
  22.630 -	.long SYMBOL_NAME(sys_fstatfs)		/* 100 */
  22.631 -	.long SYMBOL_NAME(sys_ioperm)
  22.632 -	.long SYMBOL_NAME(sys_socketcall)
  22.633 -	.long SYMBOL_NAME(sys_syslog)
  22.634 -	.long SYMBOL_NAME(sys_setitimer)
  22.635 -	.long SYMBOL_NAME(sys_getitimer)	/* 105 */
  22.636 -	.long SYMBOL_NAME(sys_newstat)
  22.637 -	.long SYMBOL_NAME(sys_newlstat)
  22.638 -	.long SYMBOL_NAME(sys_newfstat)
  22.639 -	.long SYMBOL_NAME(sys_uname)
  22.640 -	.long SYMBOL_NAME(sys_iopl)		/* 110 */
  22.641 -	.long SYMBOL_NAME(sys_vhangup)
  22.642 -	.long SYMBOL_NAME(sys_ni_syscall)	/* old "idle" system call */
  22.643 -	.long SYMBOL_NAME(sys_ni_syscall) /* was VM86 */
  22.644 -	.long SYMBOL_NAME(sys_wait4)
  22.645 -	.long SYMBOL_NAME(sys_swapoff)		/* 115 */
  22.646 -	.long SYMBOL_NAME(sys_sysinfo)
  22.647 -	.long SYMBOL_NAME(sys_ipc)
  22.648 -	.long SYMBOL_NAME(sys_fsync)
  22.649 -	.long SYMBOL_NAME(sys_sigreturn)
  22.650 -	.long SYMBOL_NAME(sys_clone)		/* 120 */
  22.651 -	.long SYMBOL_NAME(sys_setdomainname)
  22.652 -	.long SYMBOL_NAME(sys_newuname)
  22.653 -	.long SYMBOL_NAME(sys_modify_ldt)
  22.654 -	.long SYMBOL_NAME(sys_adjtimex)
  22.655 -	.long SYMBOL_NAME(sys_mprotect)		/* 125 */
  22.656 -	.long SYMBOL_NAME(sys_sigprocmask)
  22.657 -	.long SYMBOL_NAME(sys_create_module)
  22.658 -	.long SYMBOL_NAME(sys_init_module)
  22.659 -	.long SYMBOL_NAME(sys_delete_module)
  22.660 -	.long SYMBOL_NAME(sys_get_kernel_syms)	/* 130 */
  22.661 -	.long SYMBOL_NAME(sys_quotactl)
  22.662 -	.long SYMBOL_NAME(sys_getpgid)
  22.663 -	.long SYMBOL_NAME(sys_fchdir)
  22.664 -	.long SYMBOL_NAME(sys_bdflush)
  22.665 -	.long SYMBOL_NAME(sys_sysfs)		/* 135 */
  22.666 -	.long SYMBOL_NAME(sys_personality)
  22.667 -	.long SYMBOL_NAME(sys_ni_syscall)	/* for afs_syscall */
  22.668 -	.long SYMBOL_NAME(sys_setfsuid16)
  22.669 -	.long SYMBOL_NAME(sys_setfsgid16)
  22.670 -	.long SYMBOL_NAME(sys_llseek)		/* 140 */
  22.671 -	.long SYMBOL_NAME(sys_getdents)
  22.672 -	.long SYMBOL_NAME(sys_select)
  22.673 -	.long SYMBOL_NAME(sys_flock)
  22.674 -	.long SYMBOL_NAME(sys_msync)
  22.675 -	.long SYMBOL_NAME(sys_readv)		/* 145 */
  22.676 -	.long SYMBOL_NAME(sys_writev)
  22.677 -	.long SYMBOL_NAME(sys_getsid)
  22.678 -	.long SYMBOL_NAME(sys_fdatasync)
  22.679 -	.long SYMBOL_NAME(sys_sysctl)
  22.680 -	.long SYMBOL_NAME(sys_mlock)		/* 150 */
  22.681 -	.long SYMBOL_NAME(sys_munlock)
  22.682 -	.long SYMBOL_NAME(sys_mlockall)
  22.683 -	.long SYMBOL_NAME(sys_munlockall)
  22.684 -	.long SYMBOL_NAME(sys_sched_setparam)
  22.685 -	.long SYMBOL_NAME(sys_sched_getparam)   /* 155 */
  22.686 -	.long SYMBOL_NAME(sys_sched_setscheduler)
  22.687 -	.long SYMBOL_NAME(sys_sched_getscheduler)
  22.688 -	.long SYMBOL_NAME(sys_sched_yield)
  22.689 -	.long SYMBOL_NAME(sys_sched_get_priority_max)
  22.690 -	.long SYMBOL_NAME(sys_sched_get_priority_min)  /* 160 */
  22.691 -	.long SYMBOL_NAME(sys_sched_rr_get_interval)
  22.692 -	.long SYMBOL_NAME(sys_nanosleep)
  22.693 -	.long SYMBOL_NAME(sys_mremap)
  22.694 -	.long SYMBOL_NAME(sys_setresuid16)
  22.695 -	.long SYMBOL_NAME(sys_getresuid16)	/* 165 */
  22.696 -	.long SYMBOL_NAME(sys_ni_syscall) /* was VM86 */
  22.697 -	.long SYMBOL_NAME(sys_query_module)
  22.698 -	.long SYMBOL_NAME(sys_poll)
  22.699 -	.long SYMBOL_NAME(sys_nfsservctl)
  22.700 -	.long SYMBOL_NAME(sys_setresgid16)	/* 170 */
  22.701 -	.long SYMBOL_NAME(sys_getresgid16)
  22.702 -	.long SYMBOL_NAME(sys_prctl)
  22.703 -	.long SYMBOL_NAME(sys_rt_sigreturn)
  22.704 -	.long SYMBOL_NAME(sys_rt_sigaction)
  22.705 -	.long SYMBOL_NAME(sys_rt_sigprocmask)	/* 175 */
  22.706 -	.long SYMBOL_NAME(sys_rt_sigpending)
  22.707 -	.long SYMBOL_NAME(sys_rt_sigtimedwait)
  22.708 -	.long SYMBOL_NAME(sys_rt_sigqueueinfo)
  22.709 -	.long SYMBOL_NAME(sys_rt_sigsuspend)
  22.710 -	.long SYMBOL_NAME(sys_pread)		/* 180 */
  22.711 -	.long SYMBOL_NAME(sys_pwrite)
  22.712 -	.long SYMBOL_NAME(sys_chown16)
  22.713 -	.long SYMBOL_NAME(sys_getcwd)
  22.714 -	.long SYMBOL_NAME(sys_capget)
  22.715 -	.long SYMBOL_NAME(sys_capset)           /* 185 */
  22.716 -	.long SYMBOL_NAME(sys_sigaltstack)
  22.717 -	.long SYMBOL_NAME(sys_sendfile)
  22.718 -	.long SYMBOL_NAME(sys_ni_syscall)		/* streams1 */
  22.719 -	.long SYMBOL_NAME(sys_ni_syscall)		/* streams2 */
  22.720 -	.long SYMBOL_NAME(sys_vfork)            /* 190 */
  22.721 -	.long SYMBOL_NAME(sys_getrlimit)
  22.722 -	.long SYMBOL_NAME(sys_mmap2)
  22.723 -	.long SYMBOL_NAME(sys_truncate64)
  22.724 -	.long SYMBOL_NAME(sys_ftruncate64)
  22.725 -	.long SYMBOL_NAME(sys_stat64)		/* 195 */
  22.726 -	.long SYMBOL_NAME(sys_lstat64)
  22.727 -	.long SYMBOL_NAME(sys_fstat64)
  22.728 -	.long SYMBOL_NAME(sys_lchown)
  22.729 -	.long SYMBOL_NAME(sys_getuid)
  22.730 -	.long SYMBOL_NAME(sys_getgid)		/* 200 */
  22.731 -	.long SYMBOL_NAME(sys_geteuid)
  22.732 -	.long SYMBOL_NAME(sys_getegid)
  22.733 -	.long SYMBOL_NAME(sys_setreuid)
  22.734 -	.long SYMBOL_NAME(sys_setregid)
  22.735 -	.long SYMBOL_NAME(sys_getgroups)	/* 205 */
  22.736 -	.long SYMBOL_NAME(sys_setgroups)
  22.737 -	.long SYMBOL_NAME(sys_fchown)
  22.738 -	.long SYMBOL_NAME(sys_setresuid)
  22.739 -	.long SYMBOL_NAME(sys_getresuid)
  22.740 -	.long SYMBOL_NAME(sys_setresgid)	/* 210 */
  22.741 -	.long SYMBOL_NAME(sys_getresgid)
  22.742 -	.long SYMBOL_NAME(sys_chown)
  22.743 -	.long SYMBOL_NAME(sys_setuid)
  22.744 -	.long SYMBOL_NAME(sys_setgid)
  22.745 -	.long SYMBOL_NAME(sys_setfsuid)		/* 215 */
  22.746 -	.long SYMBOL_NAME(sys_setfsgid)
  22.747 -	.long SYMBOL_NAME(sys_pivot_root)
  22.748 -	.long SYMBOL_NAME(sys_mincore)
  22.749 -	.long SYMBOL_NAME(sys_madvise)
  22.750 -	.long SYMBOL_NAME(sys_getdents64)	/* 220 */
  22.751 -	.long SYMBOL_NAME(sys_fcntl64)
  22.752 -	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for TUX */
  22.753 -	.long SYMBOL_NAME(sys_ni_syscall)	/* Reserved for Security */
  22.754 -	.long SYMBOL_NAME(sys_gettid)
  22.755 -	.long SYMBOL_NAME(sys_readahead)	/* 225 */
  22.756 -	.long SYMBOL_NAME(sys_setxattr)
  22.757 -	.long SYMBOL_NAME(sys_lsetxattr)
  22.758 -	.long SYMBOL_NAME(sys_fsetxattr)
  22.759 -	.long SYMBOL_NAME(sys_getxattr)
  22.760 -	.long SYMBOL_NAME(sys_lgetxattr)	/* 230 */
  22.761 -	.long SYMBOL_NAME(sys_fgetxattr)
  22.762 -	.long SYMBOL_NAME(sys_listxattr)
  22.763 -	.long SYMBOL_NAME(sys_llistxattr)
  22.764 -	.long SYMBOL_NAME(sys_flistxattr)
  22.765 -	.long SYMBOL_NAME(sys_removexattr)	/* 235 */
  22.766 -	.long SYMBOL_NAME(sys_lremovexattr)
  22.767 -	.long SYMBOL_NAME(sys_fremovexattr)
  22.768 - 	.long SYMBOL_NAME(sys_tkill)
  22.769 -	.long SYMBOL_NAME(sys_sendfile64)
  22.770 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 240 reserved for futex */
  22.771 -	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for sched_setaffinity */
  22.772 -	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for sched_getaffinity */
  22.773 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_set_thread_area */
  22.774 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_get_thread_area */
  22.775 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 245 sys_io_setup */
  22.776 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_destroy */
  22.777 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_getevents */
  22.778 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_submit */
  22.779 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_cancel */
  22.780 -	.long SYMBOL_NAME(sys_ni_syscall)	/* 250 sys_alloc_hugepages */
  22.781 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_free_hugepages */
  22.782 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_exit_group */
  22.783 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_lookup_dcookie */
  22.784 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_epoll_create */
  22.785 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_epoll_ctl 255 */
  22.786 -	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_epoll_wait */
  22.787 - 	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_remap_file_pages */
  22.788 - 	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_set_tid_address */
  22.789 -
  22.790 -	.rept NR_syscalls-(.-sys_call_table)/4
  22.791 -		.long SYMBOL_NAME(sys_ni_syscall)
  22.792 -	.endr
    23.1 --- a/linux-2.4.26-xen-sparse/arch/xen/kernel/head.S	Sat Aug 21 10:28:38 2004 +0000
    23.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.3 @@ -1,39 +0,0 @@
    23.4 -
    23.5 -.section __xen_guest
    23.6 -    .asciz "GUEST_OS=linux,GUEST_VER=2.4,XEN_VER=1.3,VIRT_BASE=0xC0000000"
    23.7 -
    23.8 -.text
    23.9 -#include <linux/config.h>
   23.10 -#include <linux/threads.h>
   23.11 -#include <linux/linkage.h>
   23.12 -#include <asm/segment.h>
   23.13 -#include <asm/page.h>
   23.14 -#include <asm/pgtable.h>
   23.15 -#include <asm/desc.h>
   23.16 -
   23.17 -ENTRY(stext)
   23.18 -ENTRY(_stext)
   23.19 -        cld
   23.20 -        lss stack_start,%esp
   23.21 -        /* Copy the necessary stuff from start_info structure. */
   23.22 -        mov $SYMBOL_NAME(start_info_union),%edi
   23.23 -        mov $128,%ecx
   23.24 -        rep movsl
   23.25 -        jmp SYMBOL_NAME(start_kernel)
   23.26 -
   23.27 -ENTRY(stack_start)
   23.28 -	.long SYMBOL_NAME(init_task_union)+8192, __KERNEL_DS
   23.29 -
   23.30 -.org 0x1000
   23.31 -ENTRY(empty_zero_page)
   23.32 -
   23.33 -.org 0x2000
   23.34 -ENTRY(default_ldt)
   23.35 -
   23.36 -.org 0x3000
   23.37 -ENTRY(cpu0_pte_quicklist)
   23.38 -
   23.39 -.org 0x3400
   23.40 -ENTRY(cpu0_pgd_quicklist)
   23.41 -        
   23.42 -.org 0x3800
    24.1 --- a/linux-2.4.26-xen-sparse/arch/xen/kernel/i386_ksyms.c	Sat Aug 21 10:28:38 2004 +0000
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,180 +0,0 @@
    24.4 -#include <linux/config.h>
    24.5 -#include <linux/module.h>
    24.6 -#include <linux/smp.h>
    24.7 -#include <linux/user.h>
    24.8 -#include <linux/elfcore.h>
    24.9 -#include <linux/mca.h>
   24.10 -#include <linux/sched.h>
   24.11 -#include <linux/in6.h>
   24.12 -#include <linux/interrupt.h>
   24.13 -#include <linux/smp_lock.h>
   24.14 -#include <linux/pm.h>
   24.15 -#include <linux/pci.h>
   24.16 -#include <linux/apm_bios.h>
   24.17 -#include <linux/kernel.h>
   24.18 -#include <linux/string.h>
   24.19 -#include <linux/tty.h>
   24.20 -
   24.21 -#include <asm/semaphore.h>
   24.22 -#include <asm/processor.h>
   24.23 -#include <asm/i387.h>
   24.24 -#include <asm/uaccess.h>
   24.25 -#include <asm/checksum.h>
   24.26 -#include <asm/io.h>
   24.27 -#include <asm/hardirq.h>
   24.28 -#include <asm/delay.h>
   24.29 -#include <asm/irq.h>
   24.30 -#include <asm/mmx.h>
   24.31 -#include <asm/desc.h>
   24.32 -#include <asm/pgtable.h>
   24.33 -#include <asm/pgalloc.h>
   24.34 -
   24.35 -extern void dump_thread(struct pt_regs *, struct user *);
   24.36 -extern spinlock_t rtc_lock;
   24.37 -
   24.38 -#if defined(CONFIG_APMXXX) || defined(CONFIG_APM_MODULEXXX)
   24.39 -extern void machine_real_restart(unsigned char *, int);
   24.40 -EXPORT_SYMBOL(machine_real_restart);
   24.41 -extern void default_idle(void);
   24.42 -EXPORT_SYMBOL(default_idle);
   24.43 -#endif
   24.44 -
   24.45 -#ifdef CONFIG_SMP
   24.46 -extern void FASTCALL( __write_lock_failed(rwlock_t *rw));
   24.47 -extern void FASTCALL( __read_lock_failed(rwlock_t *rw));
   24.48 -#endif
   24.49 -
   24.50 -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
   24.51 -extern struct drive_info_struct drive_info;
   24.52 -EXPORT_SYMBOL(drive_info);
   24.53 -#endif
   24.54 -
   24.55 -// XXX extern unsigned long get_cmos_time(void);
   24.56 -
   24.57 -/* platform dependent support */
   24.58 -EXPORT_SYMBOL(boot_cpu_data);
   24.59 -EXPORT_SYMBOL(dump_thread);
   24.60 -EXPORT_SYMBOL(dump_fpu);
   24.61 -EXPORT_SYMBOL(dump_extended_fpu);
   24.62 -EXPORT_SYMBOL(__ioremap);
   24.63 -EXPORT_SYMBOL(iounmap);
   24.64 -EXPORT_SYMBOL(enable_irq);
   24.65 -EXPORT_SYMBOL(disable_irq);
   24.66 -EXPORT_SYMBOL(disable_irq_nosync);
   24.67 -EXPORT_SYMBOL(probe_irq_mask);
   24.68 -EXPORT_SYMBOL(kernel_thread);
   24.69 -EXPORT_SYMBOL(pm_idle);
   24.70 -EXPORT_SYMBOL(pm_power_off);
   24.71 -EXPORT_SYMBOL(apm_info);
   24.72 -//EXPORT_SYMBOL(gdt);
   24.73 -EXPORT_SYMBOL(empty_zero_page);
   24.74 -EXPORT_SYMBOL(phys_to_machine_mapping);
   24.75 -
   24.76 -
   24.77 -#ifdef CONFIG_DEBUG_IOVIRT
   24.78 -EXPORT_SYMBOL(__io_virt_debug);
   24.79 -#endif
   24.80 -
   24.81 -EXPORT_SYMBOL_NOVERS(__down_failed);
   24.82 -EXPORT_SYMBOL_NOVERS(__down_failed_interruptible);
   24.83 -EXPORT_SYMBOL_NOVERS(__down_failed_trylock);
   24.84 -EXPORT_SYMBOL_NOVERS(__up_wakeup);
   24.85 -/* Networking helper routines. */
   24.86 -EXPORT_SYMBOL(csum_partial_copy_generic);
   24.87 -/* Delay loops */
   24.88 -EXPORT_SYMBOL(__ndelay);
   24.89 -EXPORT_SYMBOL(__udelay);
   24.90 -EXPORT_SYMBOL(__delay);
   24.91 -EXPORT_SYMBOL(__const_udelay);
   24.92 -
   24.93 -EXPORT_SYMBOL_NOVERS(__get_user_1);
   24.94 -EXPORT_SYMBOL_NOVERS(__get_user_2);
   24.95 -EXPORT_SYMBOL_NOVERS(__get_user_4);
   24.96 -
   24.97 -EXPORT_SYMBOL(strtok);
   24.98 -EXPORT_SYMBOL(strpbrk);
   24.99 -EXPORT_SYMBOL(strstr);
  24.100 -
  24.101 -EXPORT_SYMBOL(strncpy_from_user);
  24.102 -EXPORT_SYMBOL(__strncpy_from_user);
  24.103 -EXPORT_SYMBOL(clear_user);
  24.104 -EXPORT_SYMBOL(__clear_user);
  24.105 -EXPORT_SYMBOL(__generic_copy_from_user);
  24.106 -EXPORT_SYMBOL(__generic_copy_to_user);
  24.107 -EXPORT_SYMBOL(strnlen_user);
  24.108 -
  24.109 -
  24.110 -EXPORT_SYMBOL(pci_alloc_consistent);
  24.111 -EXPORT_SYMBOL(pci_free_consistent);
  24.112 -
  24.113 -#ifdef CONFIG_PCI
  24.114 -EXPORT_SYMBOL(pcibios_penalize_isa_irq);
  24.115 -EXPORT_SYMBOL(pci_mem_start);
  24.116 -#endif
  24.117 -
  24.118 -
  24.119 -#ifdef CONFIG_X86_USE_3DNOW
  24.120 -EXPORT_SYMBOL(_mmx_memcpy);
  24.121 -EXPORT_SYMBOL(mmx_clear_page);
  24.122 -EXPORT_SYMBOL(mmx_copy_page);
  24.123 -#endif
  24.124 -
  24.125 -#ifdef CONFIG_SMP
  24.126 -EXPORT_SYMBOL(cpu_data);
  24.127 -EXPORT_SYMBOL(kernel_flag_cacheline);
  24.128 -EXPORT_SYMBOL(smp_num_cpus);
  24.129 -EXPORT_SYMBOL(cpu_online_map);
  24.130 -EXPORT_SYMBOL_NOVERS(__write_lock_failed);
  24.131 -EXPORT_SYMBOL_NOVERS(__read_lock_failed);
  24.132 -
  24.133 -/* Global SMP irq stuff */
  24.134 -EXPORT_SYMBOL(synchronize_irq);
  24.135 -EXPORT_SYMBOL(global_irq_holder);
  24.136 -EXPORT_SYMBOL(__global_cli);
  24.137 -EXPORT_SYMBOL(__global_sti);
  24.138 -EXPORT_SYMBOL(__global_save_flags);
  24.139 -EXPORT_SYMBOL(__global_restore_flags);
  24.140 -EXPORT_SYMBOL(smp_call_function);
  24.141 -
  24.142 -/* TLB flushing */
  24.143 -EXPORT_SYMBOL(flush_tlb_page);
  24.144 -
  24.145 -/* HT support */
  24.146 -EXPORT_SYMBOL(smp_num_siblings);
  24.147 -EXPORT_SYMBOL(cpu_sibling_map);
  24.148 -#endif
  24.149 -
  24.150 -#ifdef CONFIG_X86_IO_APIC
  24.151 -EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
  24.152 -#endif
  24.153 -
  24.154 -#ifdef CONFIG_VT
  24.155 -EXPORT_SYMBOL(screen_info);
  24.156 -#endif
  24.157 -
  24.158 -EXPORT_SYMBOL(get_wchan);
  24.159 -
  24.160 -EXPORT_SYMBOL(rtc_lock);
  24.161 -
  24.162 -#undef memcpy
  24.163 -#undef memset
  24.164 -extern void * memset(void *,int,__kernel_size_t);
  24.165 -extern void * memcpy(void *,const void *,__kernel_size_t);
  24.166 -EXPORT_SYMBOL_NOVERS(memcpy);
  24.167 -EXPORT_SYMBOL_NOVERS(memset);
  24.168 -
  24.169 -#ifdef CONFIG_HAVE_DEC_LOCK
  24.170 -EXPORT_SYMBOL(atomic_dec_and_lock);
  24.171 -#endif
  24.172 -
  24.173 -#ifdef CONFIG_MULTIQUAD
  24.174 -EXPORT_SYMBOL(xquad_portio);
  24.175 -#endif
  24.176 -
  24.177 -#include <asm/xen_proc.h>
  24.178 -EXPORT_SYMBOL(create_xen_proc_entry);
  24.179 -EXPORT_SYMBOL(remove_xen_proc_entry);
  24.180 -
  24.181 -EXPORT_SYMBOL(evtchn_do_upcall);
  24.182 -EXPORT_SYMBOL(force_evtchn_callback);
  24.183 -EXPORT_SYMBOL(HYPERVISOR_shared_info);
    25.1 --- a/linux-2.4.26-xen-sparse/arch/xen/kernel/irq.c	Sat Aug 21 10:28:38 2004 +0000
    25.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.3 @@ -1,1214 +0,0 @@
    25.4 -/*
    25.5 - *	linux/arch/i386/kernel/irq.c
    25.6 - *
    25.7 - *	Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
    25.8 - *
    25.9 - * This file contains the code used by various IRQ handling routines:
   25.10 - * asking for different IRQ's should be done through these routines
   25.11 - * instead of just grabbing them. Thus setups with different IRQ numbers
   25.12 - * shouldn't result in any weird surprises, and installing new handlers
   25.13 - * should be easier.
   25.14 - */
   25.15 -
   25.16 -/*
   25.17 - * (mostly architecture independent, will move to kernel/irq.c in 2.5.)
   25.18 - *
   25.19 - * IRQs are in fact implemented a bit like signal handlers for the kernel.
   25.20 - * Naturally it's not a 1:1 relation, but there are similarities.
   25.21 - */
   25.22 -
   25.23 -#include <linux/config.h>
   25.24 -#include <linux/ptrace.h>
   25.25 -#include <linux/errno.h>
   25.26 -#include <linux/signal.h>
   25.27 -#include <linux/sched.h>
   25.28 -#include <linux/ioport.h>
   25.29 -#include <linux/interrupt.h>
   25.30 -#include <linux/timex.h>
   25.31 -#include <linux/slab.h>
   25.32 -#include <linux/random.h>
   25.33 -#include <linux/smp_lock.h>
   25.34 -#include <linux/init.h>
   25.35 -#include <linux/kernel_stat.h>
   25.36 -#include <linux/irq.h>
   25.37 -#include <linux/proc_fs.h>
   25.38 -#include <linux/seq_file.h>
   25.39 -
   25.40 -#include <asm/atomic.h>
   25.41 -#include <asm/io.h>
   25.42 -#include <asm/smp.h>
   25.43 -#include <asm/system.h>
   25.44 -#include <asm/bitops.h>
   25.45 -#include <asm/uaccess.h>
   25.46 -#include <asm/pgalloc.h>
   25.47 -#include <asm/delay.h>
   25.48 -#include <asm/desc.h>
   25.49 -#include <asm/irq.h>
   25.50 -
   25.51 -
   25.52 -
   25.53 -/*
   25.54 - * Linux has a controller-independent x86 interrupt architecture.
   25.55 - * every controller has a 'controller-template', that is used
   25.56 - * by the main code to do the right thing. Each driver-visible
   25.57 - * interrupt source is transparently wired to the apropriate
   25.58 - * controller. Thus drivers need not be aware of the
   25.59 - * interrupt-controller.
   25.60 - *
   25.61 - * Various interrupt controllers we handle: 8259 PIC, SMP IO-APIC,
   25.62 - * PIIX4's internal 8259 PIC and SGI's Visual Workstation Cobalt (IO-)APIC.
   25.63 - * (IO-APICs assumed to be messaging to Pentium local-APICs)
   25.64 - *
   25.65 - * the code is designed to be easily extended with new/different
   25.66 - * interrupt controllers, without having to do assembly magic.
   25.67 - */
   25.68 -
   25.69 -/*
   25.70 - * Controller mappings for all interrupt sources:
   25.71 - */
   25.72 -irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned =
   25.73 -	{ [0 ... NR_IRQS-1] = { 0, &no_irq_type, NULL, 0, SPIN_LOCK_UNLOCKED}};
   25.74 -
   25.75 -static void register_irq_proc (unsigned int irq);
   25.76 -
   25.77 -/*
   25.78 - * Special irq handlers.
   25.79 - */
   25.80 -
   25.81 -void no_action(int cpl, void *dev_id, struct pt_regs *regs) { }
   25.82 -
   25.83 -/*
   25.84 - * Generic no controller code
   25.85 - */
   25.86 -
   25.87 -static void enable_none(unsigned int irq) { }
   25.88 -static unsigned int startup_none(unsigned int irq) { return 0; }
   25.89 -static void disable_none(unsigned int irq) { }
   25.90 -static void ack_none(unsigned int irq)
   25.91 -{
   25.92 -/*
   25.93 - * 'what should we do if we get a hw irq event on an illegal vector'.
   25.94 - * each architecture has to answer this themselves, it doesnt deserve
   25.95 - * a generic callback i think.
   25.96 - */
   25.97 -#if CONFIG_X86
   25.98 -	printk("unexpected IRQ trap at vector %02x\n", irq);
   25.99 -#ifdef CONFIG_X86_LOCAL_APIC
  25.100 -	/*
  25.101 -	 * Currently unexpected vectors happen only on SMP and APIC.
  25.102 -	 * We _must_ ack these because every local APIC has only N
  25.103 -	 * irq slots per priority level, and a 'hanging, unacked' IRQ
  25.104 -	 * holds up an irq slot - in excessive cases (when multiple
  25.105 -	 * unexpected vectors occur) that might lock up the APIC
  25.106 -	 * completely.
  25.107 -	 */
  25.108 -	ack_APIC_irq();
  25.109 -#endif
  25.110 -#endif
  25.111 -}
  25.112 -
  25.113 -/* startup is the same as "enable", shutdown is same as "disable" */
  25.114 -#define shutdown_none	disable_none
  25.115 -#define end_none	enable_none
  25.116 -
  25.117 -struct hw_interrupt_type no_irq_type = {
  25.118 -	"none",
  25.119 -	startup_none,
  25.120 -	shutdown_none,
  25.121 -	enable_none,
  25.122 -	disable_none,
  25.123 -	ack_none,
  25.124 -	end_none
  25.125 -};
  25.126 -
  25.127 -atomic_t irq_err_count;
  25.128 -#ifdef CONFIG_X86_IO_APIC
  25.129 -#ifdef APIC_MISMATCH_DEBUG
  25.130 -atomic_t irq_mis_count;
  25.131 -#endif
  25.132 -#endif
  25.133 -
  25.134 -/*
  25.135 - * Generic, controller-independent functions:
  25.136 - */
  25.137 -
  25.138 -int show_interrupts(struct seq_file *p, void *v)
  25.139 -{
  25.140 -	int i, j;
  25.141 -	struct irqaction * action;
  25.142 -
  25.143 -	seq_printf(p, "           ");
  25.144 -	for (j=0; j<smp_num_cpus; j++)
  25.145 -		seq_printf(p, "CPU%d       ",j);
  25.146 -	seq_putc(p,'\n');
  25.147 -
  25.148 -	for (i = 0 ; i < NR_IRQS ; i++) {
  25.149 -		action = irq_desc[i].action;
  25.150 -		if (!action) 
  25.151 -			continue;
  25.152 -		seq_printf(p, "%3d: ",i);
  25.153 -#ifndef CONFIG_SMP
  25.154 -		seq_printf(p, "%10u ", kstat_irqs(i));
  25.155 -#else
  25.156 -		for (j = 0; j < smp_num_cpus; j++)
  25.157 -			seq_printf(p, "%10u ",
  25.158 -				kstat.irqs[cpu_logical_map(j)][i]);
  25.159 -#endif
  25.160 -		seq_printf(p, " %14s", irq_desc[i].handler->typename);
  25.161 -		seq_printf(p, "  %s", action->name);
  25.162 -
  25.163 -		for (action=action->next; action; action = action->next)
  25.164 -			seq_printf(p, ", %s", action->name);
  25.165 -		seq_putc(p,'\n');
  25.166 -	}
  25.167 -	seq_printf(p, "NMI: ");
  25.168 -	for (j = 0; j < smp_num_cpus; j++)
  25.169 -		seq_printf(p, "%10u ",
  25.170 -			nmi_count(cpu_logical_map(j)));
  25.171 -	seq_printf(p, "\n");
  25.172 -#if CONFIG_X86_LOCAL_APIC
  25.173 -	seq_printf(p, "LOC: ");
  25.174 -	for (j = 0; j < smp_num_cpus; j++)
  25.175 -		seq_printf(p, "%10u ",
  25.176 -			apic_timer_irqs[cpu_logical_map(j)]);
  25.177 -	seq_printf(p, "\n");
  25.178 -#endif
  25.179 -	seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
  25.180 -#ifdef CONFIG_X86_IO_APIC
  25.181 -#ifdef APIC_MISMATCH_DEBUG
  25.182 -	seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
  25.183 -#endif
  25.184 -#endif
  25.185 -
  25.186 -	return 0;
  25.187 -}
  25.188 -
  25.189 -
  25.190 -/*
  25.191 - * Global interrupt locks for SMP. Allow interrupts to come in on any
  25.192 - * CPU, yet make cli/sti act globally to protect critical regions..
  25.193 - */
  25.194 -
  25.195 -#ifdef CONFIG_SMP
  25.196 -unsigned char global_irq_holder = NO_PROC_ID;
  25.197 -unsigned volatile long global_irq_lock; /* pendantic: long for set_bit --RR */
  25.198 -
  25.199 -extern void show_stack(unsigned long* esp);
  25.200 -
  25.201 -static void show(char * str)
  25.202 -{
  25.203 -	int i;
  25.204 -	int cpu = smp_processor_id();
  25.205 -
  25.206 -	printk("\n%s, CPU %d:\n", str, cpu);
  25.207 -	printk("irq:  %d [",irqs_running());
  25.208 -	for(i=0;i < smp_num_cpus;i++)
  25.209 -		printk(" %d",local_irq_count(i));
  25.210 -	printk(" ]\nbh:   %d [",spin_is_locked(&global_bh_lock) ? 1 : 0);
  25.211 -	for(i=0;i < smp_num_cpus;i++)
  25.212 -		printk(" %d",local_bh_count(i));
  25.213 -
  25.214 -	printk(" ]\nStack dumps:");
  25.215 -	for(i = 0; i < smp_num_cpus; i++) {
  25.216 -		unsigned long esp;
  25.217 -		if (i == cpu)
  25.218 -			continue;
  25.219 -		printk("\nCPU %d:",i);
  25.220 -		esp = init_tss[i].esp0;
  25.221 -		if (!esp) {
  25.222 -			/* tss->esp0 is set to NULL in cpu_init(),
  25.223 -			 * it's initialized when the cpu returns to user
  25.224 -			 * space. -- manfreds
  25.225 -			 */
  25.226 -			printk(" <unknown> ");
  25.227 -			continue;
  25.228 -		}
  25.229 -		esp &= ~(THREAD_SIZE-1);
  25.230 -		esp += sizeof(struct task_struct);
  25.231 -		show_stack((void*)esp);
  25.232 - 	}
  25.233 -	printk("\nCPU %d:",cpu);
  25.234 -	show_stack(NULL);
  25.235 -	printk("\n");
  25.236 -}
  25.237 -	
  25.238 -#define MAXCOUNT 100000000
  25.239 -
  25.240 -/*
  25.241 - * I had a lockup scenario where a tight loop doing
  25.242 - * spin_unlock()/spin_lock() on CPU#1 was racing with
  25.243 - * spin_lock() on CPU#0. CPU#0 should have noticed spin_unlock(), but
  25.244 - * apparently the spin_unlock() information did not make it
  25.245 - * through to CPU#0 ... nasty, is this by design, do we have to limit
  25.246 - * 'memory update oscillation frequency' artificially like here?
  25.247 - *
  25.248 - * Such 'high frequency update' races can be avoided by careful design, but
  25.249 - * some of our major constructs like spinlocks use similar techniques,
  25.250 - * it would be nice to clarify this issue. Set this define to 0 if you
  25.251 - * want to check whether your system freezes.  I suspect the delay done
  25.252 - * by SYNC_OTHER_CORES() is in correlation with 'snooping latency', but
  25.253 - * i thought that such things are guaranteed by design, since we use
  25.254 - * the 'LOCK' prefix.
  25.255 - */
  25.256 -#define SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND 0
  25.257 -
  25.258 -#if SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND
  25.259 -# define SYNC_OTHER_CORES(x) udelay(x+1)
  25.260 -#else
  25.261 -/*
  25.262 - * We have to allow irqs to arrive between __sti and __cli
  25.263 - */
  25.264 -# define SYNC_OTHER_CORES(x) __asm__ __volatile__ ("nop")
  25.265 -#endif
  25.266 -
  25.267 -static inline void wait_on_irq(int cpu)
  25.268 -{
  25.269 -	int count = MAXCOUNT;
  25.270 -
  25.271 -	for (;;) {
  25.272 -
  25.273 -		/*
  25.274 -		 * Wait until all interrupts are gone. Wait
  25.275 -		 * for bottom half handlers unless we're
  25.276 -		 * already executing in one..
  25.277 -		 */
  25.278 -		if (!irqs_running())
  25.279 -			if (local_bh_count(cpu) || !spin_is_locked(&global_bh_lock))
  25.280 -				break;
  25.281 -
  25.282 -		/* Duh, we have to loop. Release the lock to avoid deadlocks */
  25.283 -		clear_bit(0,&global_irq_lock);
  25.284 -
  25.285 -		for (;;) {
  25.286 -			if (!--count) {
  25.287 -				show("wait_on_irq");
  25.288 -				count = ~0;
  25.289 -			}
  25.290 -			__sti();
  25.291 -			SYNC_OTHER_CORES(cpu);
  25.292 -			__cli();
  25.293 -			if (irqs_running())
  25.294 -				continue;
  25.295 -			if (global_irq_lock)
  25.296 -				continue;
  25.297 -			if (!local_bh_count(cpu) && spin_is_locked(&global_bh_lock))
  25.298 -				continue;
  25.299 -			if (!test_and_set_bit(0,&global_irq_lock))
  25.300 -				break;
  25.301 -		}
  25.302 -	}
  25.303 -}
  25.304 -
  25.305 -/*
  25.306 - * This is called when we want to synchronize with
  25.307 - * interrupts. We may for example tell a device to
  25.308 - * stop sending interrupts: but to make sure there
  25.309 - * are no interrupts that are executing on another
  25.310 - * CPU we need to call this function.
  25.311 - */
  25.312 -void synchronize_irq(void)
  25.313 -{
  25.314 -	if (irqs_running()) {
  25.315 -		/* Stupid approach */
  25.316 -		cli();
  25.317 -		sti();
  25.318 -	}
  25.319 -}
  25.320 -
  25.321 -static inline void get_irqlock(int cpu)
  25.322 -{
  25.323 -	if (test_and_set_bit(0,&global_irq_lock)) {
  25.324 -		/* do we already hold the lock? */
  25.325 -		if ((unsigned char) cpu == global_irq_holder)
  25.326 -			return;
  25.327 -		/* Uhhuh.. Somebody else got it. Wait.. */
  25.328 -		do {
  25.329 -			do {
  25.330 -				rep_nop();
  25.331 -			} while (test_bit(0,&global_irq_lock));
  25.332 -		} while (test_and_set_bit(0,&global_irq_lock));		
  25.333 -	}
  25.334 -	/* 
  25.335 -	 * We also to make sure that nobody else is running
  25.336 -	 * in an interrupt context. 
  25.337 -	 */
  25.338 -	wait_on_irq(cpu);
  25.339 -
  25.340 -	/*
  25.341 -	 * Ok, finally..
  25.342 -	 */
  25.343 -	global_irq_holder = cpu;
  25.344 -}
  25.345 -
  25.346 -/*
  25.347 - * A global "cli()" while in an interrupt context
  25.348 - * turns into just a local cli(). Interrupts
  25.349 - * should use spinlocks for the (very unlikely)
  25.350 - * case that they ever want to protect against
  25.351 - * each other.
  25.352 - *
  25.353 - * If we already have local interrupts disabled,
  25.354 - * this will not turn a local disable into a
  25.355 - * global one (problems with spinlocks: this makes
  25.356 - * save_flags+cli+sti usable inside a spinlock).
  25.357 - */
  25.358 -void __global_cli(void)
  25.359 -{
  25.360 -	unsigned int flags;
  25.361 -
  25.362 -	__save_flags(flags);
  25.363 -	if (!flags) {
  25.364 -		int cpu = smp_processor_id();
  25.365 -		__cli();
  25.366 -		if (!local_irq_count(cpu))
  25.367 -			get_irqlock(cpu);
  25.368 -	}
  25.369 -}
  25.370 -
  25.371 -void __global_sti(void)
  25.372 -{
  25.373 -	int cpu = smp_processor_id();
  25.374 -
  25.375 -	if (!local_irq_count(cpu))
  25.376 -		release_irqlock(cpu);
  25.377 -	__sti();
  25.378 -}
  25.379 -
  25.380 -/*
  25.381 - * SMP flags value to restore to:
  25.382 - * 0 - global cli
  25.383 - * 1 - global sti
  25.384 - * 2 - local cli
  25.385 - * 3 - local sti
  25.386 - */
  25.387 -unsigned long __global_save_flags(void)
  25.388 -{
  25.389 -	int retval;
  25.390 -	int local_enabled;
  25.391 -	unsigned long flags;
  25.392 -	int cpu = smp_processor_id();
  25.393 -
  25.394 -	__save_flags(flags);
  25.395 -	local_enabled = !flags;
  25.396 -	/* default to local */
  25.397 -	retval = 2 + local_enabled;
  25.398 -
  25.399 -	/* check for global flags if we're not in an interrupt */
  25.400 -	if (!local_irq_count(cpu)) {
  25.401 -		if (local_enabled)
  25.402 -			retval = 1;
  25.403 -		if (global_irq_holder == cpu)
  25.404 -			retval = 0;
  25.405 -	}
  25.406 -	return retval;
  25.407 -}
  25.408 -
  25.409 -void __global_restore_flags(unsigned long flags)
  25.410 -{
  25.411 -	switch (flags) {
  25.412 -	case 0:
  25.413 -		__global_cli();
  25.414 -		break;
  25.415 -	case 1:
  25.416 -		__global_sti();
  25.417 -		break;
  25.418 -	case 2:
  25.419 -		__cli();
  25.420 -		break;
  25.421 -	case 3:
  25.422 -		__sti();
  25.423 -		break;
  25.424 -	default:
  25.425 -		printk("global_restore_flags: %08lx (%08lx)\n",
  25.426 -			flags, (&flags)[-1]);
  25.427 -	}
  25.428 -}
  25.429 -
  25.430 -#endif
  25.431 -
  25.432 -/*
  25.433 - * This should really return information about whether
  25.434 - * we should do bottom half handling etc. Right now we
  25.435 - * end up _always_ checking the bottom half, which is a
  25.436 - * waste of time and is not what some drivers would
  25.437 - * prefer.
  25.438 - */
  25.439 -int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action)
  25.440 -{
  25.441 -	int status;
  25.442 -	int cpu = smp_processor_id();
  25.443 -
  25.444 -	irq_enter(cpu, irq);
  25.445 -
  25.446 -	status = 1;	/* Force the "do bottom halves" bit */
  25.447 -
  25.448 -	if (!(action->flags & SA_INTERRUPT))
  25.449 -		__sti();
  25.450 -
  25.451 -	do {
  25.452 -		status |= action->flags;
  25.453 -		action->handler(irq, action->dev_id, regs);
  25.454 -		action = action->next;
  25.455 -	} while (action);
  25.456 -	if (status & SA_SAMPLE_RANDOM)
  25.457 -		add_interrupt_randomness(irq);
  25.458 -	__cli();
  25.459 -
  25.460 -	irq_exit(cpu, irq);
  25.461 -
  25.462 -	return status;
  25.463 -}
  25.464 -
  25.465 -/*
  25.466 - * Generic enable/disable code: this just calls
  25.467 - * down into the PIC-specific version for the actual
  25.468 - * hardware disable after having gotten the irq
  25.469 - * controller lock. 
  25.470 - */
  25.471 - 
  25.472 -/**
  25.473 - *	disable_irq_nosync - disable an irq without waiting
  25.474 - *	@irq: Interrupt to disable
  25.475 - *
  25.476 - *	Disable the selected interrupt line.  Disables and Enables are
  25.477 - *	nested.
  25.478 - *	Unlike disable_irq(), this function does not ensure existing
  25.479 - *	instances of the IRQ handler have completed before returning.
  25.480 - *
  25.481 - *	This function may be called from IRQ context.
  25.482 - */
  25.483 - 
  25.484 -inline void disable_irq_nosync(unsigned int irq)
  25.485 -{
  25.486 -	irq_desc_t *desc = irq_desc + irq;
  25.487 -	unsigned long flags;
  25.488 -
  25.489 -	spin_lock_irqsave(&desc->lock, flags);
  25.490 -	if (!desc->depth++) {
  25.491 -		desc->status |= IRQ_DISABLED;
  25.492 -		desc->handler->disable(irq);
  25.493 -	}
  25.494 -	spin_unlock_irqrestore(&desc->lock, flags);
  25.495 -}
  25.496 -
  25.497 -/**
  25.498 - *	disable_irq - disable an irq and wait for completion
  25.499 - *	@irq: Interrupt to disable
  25.500 - *
  25.501 - *	Disable the selected interrupt line.  Enables and Disables are
  25.502 - *	nested.
  25.503 - *	This function waits for any pending IRQ handlers for this interrupt
  25.504 - *	to complete before returning. If you use this function while
  25.505 - *	holding a resource the IRQ handler may need you will deadlock.
  25.506 - *
  25.507 - *	This function may be called - with care - from IRQ context.
  25.508 - */
  25.509 - 
  25.510 -void disable_irq(unsigned int irq)
  25.511 -{
  25.512 -	disable_irq_nosync(irq);
  25.513 -
  25.514 -	if (!local_irq_count(smp_processor_id())) {
  25.515 -		do {
  25.516 -			barrier();
  25.517 -			cpu_relax();
  25.518 -		} while (irq_desc[irq].status & IRQ_INPROGRESS);
  25.519 -	}
  25.520 -}
  25.521 -
  25.522 -/**
  25.523 - *	enable_irq - enable handling of an irq
  25.524 - *	@irq: Interrupt to enable
  25.525 - *
  25.526 - *	Undoes the effect of one call to disable_irq().  If this
  25.527 - *	matches the last disable, processing of interrupts on this
  25.528 - *	IRQ line is re-enabled.
  25.529 - *
  25.530 - *	This function may be called from IRQ context.
  25.531 - */
  25.532 - 
  25.533 -void enable_irq(unsigned int irq)
  25.534 -{
  25.535 -	irq_desc_t *desc = irq_desc + irq;
  25.536 -	unsigned long flags;
  25.537 -
  25.538 -	spin_lock_irqsave(&desc->lock, flags);
  25.539 -	switch (desc->depth) {
  25.540 -	case 1: {
  25.541 -		unsigned int status = desc->status & ~IRQ_DISABLED;
  25.542 -		desc->status = status;
  25.543 -		if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
  25.544 -			desc->status = status | IRQ_REPLAY;
  25.545 -			hw_resend_irq(desc->handler,irq);
  25.546 -		}
  25.547 -		desc->handler->enable(irq);
  25.548 -		/* fall-through */
  25.549 -	}
  25.550 -	default:
  25.551 -		desc->depth--;
  25.552 -		break;
  25.553 -	case 0:
  25.554 -		printk("enable_irq(%u) unbalanced from %p\n", irq,
  25.555 -		       __builtin_return_address(0));
  25.556 -	}
  25.557 -	spin_unlock_irqrestore(&desc->lock, flags);
  25.558 -}
  25.559 -
  25.560 -/*
  25.561 - * do_IRQ handles all normal device IRQ's (the special
  25.562 - * SMP cross-CPU interrupts have their own specific
  25.563 - * handlers).
  25.564 - */
  25.565 -asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs)
  25.566 -{	
  25.567 -	/* 
  25.568 -	 * We ack quickly, we don't want the irq controller
  25.569 -	 * thinking we're snobs just because some other CPU has
  25.570 -	 * disabled global interrupts (we have already done the
  25.571 -	 * INT_ACK cycles, it's too late to try to pretend to the
  25.572 -	 * controller that we aren't taking the interrupt).
  25.573 -	 *
  25.574 -	 * 0 return value means that this irq is already being
  25.575 -	 * handled by some other CPU. (or is disabled)
  25.576 -	 */
  25.577 -	int cpu = smp_processor_id();
  25.578 -	irq_desc_t *desc = irq_desc + irq;
  25.579 -	struct irqaction * action;
  25.580 -	unsigned int status;
  25.581 -#ifdef CONFIG_DEBUG_STACKOVERFLOW
  25.582 -	long esp;
  25.583 -
  25.584 -	/* Debugging check for stack overflow: is there less than 1KB free? */
  25.585 -	__asm__ __volatile__("andl %%esp,%0" : "=r" (esp) : "0" (8191));
  25.586 -	if (unlikely(esp < (sizeof(struct task_struct) + 1024))) {
  25.587 -		extern void show_stack(unsigned long *);
  25.588 -
  25.589 -		printk("do_IRQ: stack overflow: %ld\n",
  25.590 -			esp - sizeof(struct task_struct));
  25.591 -		__asm__ __volatile__("movl %%esp,%0" : "=r" (esp));
  25.592 -		show_stack((void *)esp);
  25.593 -	}
  25.594 -#endif
  25.595 -
  25.596 -	kstat.irqs[cpu][irq]++;
  25.597 -	spin_lock(&desc->lock);
  25.598 -	desc->handler->ack(irq);
  25.599 -	/*
  25.600 -	   REPLAY is when Linux resends an IRQ that was dropped earlier
  25.601 -	   WAITING is used by probe to mark irqs that are being tested
  25.602 -	   */
  25.603 -	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
  25.604 -	status |= IRQ_PENDING; /* we _want_ to handle it */
  25.605 -
  25.606 -	/*
  25.607 -	 * If the IRQ is disabled for whatever reason, we cannot
  25.608 -	 * use the action we have.
  25.609 -	 */
  25.610 -	action = NULL;
  25.611 -	if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
  25.612 -		action = desc->action;
  25.613 -		status &= ~IRQ_PENDING; /* we commit to handling */
  25.614 -		status |= IRQ_INPROGRESS; /* we are handling it */
  25.615 -	}
  25.616 -	desc->status = status;
  25.617 -
  25.618 -	/*
  25.619 -	 * If there is no IRQ handler or it was disabled, exit early.
  25.620 -	   Since we set PENDING, if another processor is handling
  25.621 -	   a different instance of this same irq, the other processor
  25.622 -	   will take care of it.
  25.623 -	 */
  25.624 -	if (!action)
  25.625 -		goto out;
  25.626 -
  25.627 -	/*
  25.628 -	 * Edge triggered interrupts need to remember
  25.629 -	 * pending events.
  25.630 -	 * This applies to any hw interrupts that allow a second
  25.631 -	 * instance of the same irq to arrive while we are in do_IRQ
  25.632 -	 * or in the handler. But the code here only handles the _second_
  25.633 -	 * instance of the irq, not the third or fourth. So it is mostly
  25.634 -	 * useful for irq hardware that does not mask cleanly in an
  25.635 -	 * SMP environment.
  25.636 -	 */
  25.637 -	for (;;) {
  25.638 -		spin_unlock(&desc->lock);
  25.639 -		handle_IRQ_event(irq, regs, action);
  25.640 -		spin_lock(&desc->lock);
  25.641 -		
  25.642 -		if (!(desc->status & IRQ_PENDING))
  25.643 -			break;
  25.644 -		desc->status &= ~IRQ_PENDING;
  25.645 -	}
  25.646 -	desc->status &= ~IRQ_INPROGRESS;
  25.647 -out:
  25.648 -	/*
  25.649 -	 * The ->end() handler has to deal with interrupts which got
  25.650 -	 * disabled while the handler was running.
  25.651 -	 */
  25.652 -	desc->handler->end(irq);
  25.653 -	spin_unlock(&desc->lock);
  25.654 -
  25.655 -	if (softirq_pending(cpu))
  25.656 -		do_softirq();
  25.657 -	return 1;
  25.658 -}
  25.659 -
  25.660 -/**
  25.661 - *	request_irq - allocate an interrupt line
  25.662 - *	@irq: Interrupt line to allocate
  25.663 - *	@handler: Function to be called when the IRQ occurs
  25.664 - *	@irqflags: Interrupt type flags
  25.665 - *	@devname: An ascii name for the claiming device
  25.666 - *	@dev_id: A cookie passed back to the handler function
  25.667 - *
  25.668 - *	This call allocates interrupt resources and enables the
  25.669 - *	interrupt line and IRQ handling. From the point this
  25.670 - *	call is made your handler function may be invoked. Since
  25.671 - *	your handler function must clear any interrupt the board 
  25.672 - *	raises, you must take care both to initialise your hardware
  25.673 - *	and to set up the interrupt handler in the right order.
  25.674 - *
  25.675 - *	Dev_id must be globally unique. Normally the address of the
  25.676 - *	device data structure is used as the cookie. Since the handler
  25.677 - *	receives this value it makes sense to use it.
  25.678 - *
  25.679 - *	If your interrupt is shared you must pass a non NULL dev_id
  25.680 - *	as this is required when freeing the interrupt.
  25.681 - *
  25.682 - *	Flags:
  25.683 - *
  25.684 - *	SA_SHIRQ		Interrupt is shared
  25.685 - *
  25.686 - *	SA_INTERRUPT		Disable local interrupts while processing
  25.687 - *
  25.688 - *	SA_SAMPLE_RANDOM	The interrupt can be used for entropy
  25.689 - *
  25.690 - */
  25.691 - 
  25.692 -int request_irq(unsigned int irq, 
  25.693 -		void (*handler)(int, void *, struct pt_regs *),
  25.694 -		unsigned long irqflags, 
  25.695 -		const char * devname,
  25.696 -		void *dev_id)
  25.697 -{
  25.698 -	int retval;
  25.699 -	struct irqaction * action;
  25.700 -
  25.701 -#if 1
  25.702 -	/*
  25.703 -	 * Sanity-check: shared interrupts should REALLY pass in
  25.704 -	 * a real dev-ID, otherwise we'll have trouble later trying
  25.705 -	 * to figure out which interrupt is which (messes up the
  25.706 -	 * interrupt freeing logic etc).
  25.707 -	 */
  25.708 -	if (irqflags & SA_SHIRQ) {
  25.709 -		if (!dev_id)
  25.710 -			printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", devname, (&irq)[-1]);
  25.711 -	}
  25.712 -#endif
  25.713 -
  25.714 -	if (irq >= NR_IRQS)
  25.715 -		return -EINVAL;
  25.716 -	if (!handler)
  25.717 -		return -EINVAL;
  25.718 -
  25.719 -	action = (struct irqaction *)
  25.720 -			kmalloc(sizeof(struct irqaction), GFP_KERNEL);
  25.721 -	if (!action)
  25.722 -		return -ENOMEM;
  25.723 -
  25.724 -	action->handler = handler;
  25.725 -	action->flags = irqflags;
  25.726 -	action->mask = 0;
  25.727 -	action->name = devname;
  25.728 -	action->next = NULL;
  25.729 -	action->dev_id = dev_id;
  25.730 -
  25.731 -	retval = setup_irq(irq, action);
  25.732 -	if (retval)
  25.733 -		kfree(action);
  25.734 -	return retval;
  25.735 -}
  25.736 -
  25.737 -/**
  25.738 - *	free_irq - free an interrupt
  25.739 - *	@irq: Interrupt line to free
  25.740 - *	@dev_id: Device identity to free
  25.741 - *
  25.742 - *	Remove an interrupt handler. The handler is removed and if the
  25.743 - *	interrupt line is no longer in use by any driver it is disabled.
  25.744 - *	On a shared IRQ the caller must ensure the interrupt is disabled
  25.745 - *	on the card it drives before calling this function. The function
  25.746 - *	does not return until any executing interrupts for this IRQ
  25.747 - *	have completed.
  25.748 - *
  25.749 - *	This function may be called from interrupt context. 
  25.750 - *
  25.751 - *	Bugs: Attempting to free an irq in a handler for the same irq hangs
  25.752 - *	      the machine.
  25.753 - */
  25.754 - 
  25.755 -void free_irq(unsigned int irq, void *dev_id)
  25.756 -{
  25.757 -	irq_desc_t *desc;
  25.758 -	struct irqaction **p;
  25.759 -	unsigned long flags;
  25.760 -
  25.761 -	if (irq >= NR_IRQS)
  25.762 -		return;
  25.763 -
  25.764 -	desc = irq_desc + irq;
  25.765 -	spin_lock_irqsave(&desc->lock,flags);
  25.766 -	p = &desc->action;
  25.767 -	for (;;) {
  25.768 -		struct irqaction * action = *p;
  25.769 -		if (action) {
  25.770 -			struct irqaction **pp = p;
  25.771 -			p = &action->next;
  25.772 -			if (action->dev_id != dev_id)
  25.773 -				continue;
  25.774 -
  25.775 -			/* Found it - now remove it from the list of entries */
  25.776 -			*pp = action->next;
  25.777 -			if (!desc->action) {
  25.778 -				desc->status |= IRQ_DISABLED;
  25.779 -				desc->handler->shutdown(irq);
  25.780 -			}
  25.781 -			spin_unlock_irqrestore(&desc->lock,flags);
  25.782 -
  25.783 -#ifdef CONFIG_SMP
  25.784 -			/* Wait to make sure it's not being used on another CPU */
  25.785 -			while (desc->status & IRQ_INPROGRESS) {
  25.786 -				barrier();
  25.787 -				cpu_relax();
  25.788 -			}
  25.789 -#endif
  25.790 -#define SA_STATIC_ACTION 0x01000000 /* Is it our duty to free the action? */
  25.791 -			if (!(action->flags & SA_STATIC_ACTION))
  25.792 -				kfree(action);
  25.793 -			return;
  25.794 -		}
  25.795 -		printk("Trying to free free IRQ%d\n",irq);
  25.796 -		spin_unlock_irqrestore(&desc->lock,flags);
  25.797 -		return;
  25.798 -	}
  25.799 -}
  25.800 -
  25.801 -/*
  25.802 - * IRQ autodetection code..
  25.803 - *
  25.804 - * This depends on the fact that any interrupt that
  25.805 - * comes in on to an unassigned handler will get stuck
  25.806 - * with "IRQ_WAITING" cleared and the interrupt
  25.807 - * disabled.
  25.808 - */
  25.809 -
  25.810 -static DECLARE_MUTEX(probe_sem);
  25.811 -
  25.812 -/**
  25.813 - *	probe_irq_on	- begin an interrupt autodetect
  25.814 - *
  25.815 - *	Commence probing for an interrupt. The interrupts are scanned
  25.816 - *	and a mask of potential interrupt lines is returned.
  25.817 - *
  25.818 - */
  25.819 - 
  25.820 -unsigned long probe_irq_on(void)
  25.821 -{
  25.822 -	unsigned int i;
  25.823 -	irq_desc_t *desc;
  25.824 -	unsigned long val;
  25.825 -	unsigned long delay;
  25.826 -
  25.827 -	down(&probe_sem);
  25.828 -	/* 
  25.829 -	 * something may have generated an irq long ago and we want to
  25.830 -	 * flush such a longstanding irq before considering it as spurious. 
  25.831 -	 */
  25.832 -	for (i = NR_PIRQS-1; i > 0; i--)  {
  25.833 -		desc = irq_desc + i;
  25.834 -
  25.835 -		spin_lock_irq(&desc->lock);
  25.836 -		if (!irq_desc[i].action) 
  25.837 -			irq_desc[i].handler->startup(i);
  25.838 -		spin_unlock_irq(&desc->lock);
  25.839 -	}
  25.840 -
  25.841 -	/* Wait for longstanding interrupts to trigger. */
  25.842 -	for (delay = jiffies + HZ/50; time_after(delay, jiffies); )
  25.843 -		/* about 20ms delay */ synchronize_irq();
  25.844 -
  25.845 -	/*
  25.846 -	 * enable any unassigned irqs
  25.847 -	 * (we must startup again here because if a longstanding irq
  25.848 -	 * happened in the previous stage, it may have masked itself)
  25.849 -	 */
  25.850 -	for (i = NR_PIRQS-1; i > 0; i--) {
  25.851 -		desc = irq_desc + i;
  25.852 -
  25.853 -		spin_lock_irq(&desc->lock);
  25.854 -		if (!desc->action) {
  25.855 -			desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
  25.856 -			if (desc->handler->startup(i))
  25.857 -				desc->status |= IRQ_PENDING;
  25.858 -		}
  25.859 -		spin_unlock_irq(&desc->lock);
  25.860 -	}
  25.861 -
  25.862 -	/*
  25.863 -	 * Wait for spurious interrupts to trigger
  25.864 -	 */
  25.865 -	for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
  25.866 -		/* about 100ms delay */ synchronize_irq();
  25.867 -
  25.868 -	/*
  25.869 -	 * Now filter out any obviously spurious interrupts
  25.870 -	 */
  25.871 -	val = 0;
  25.872 -	for (i = 0; i < NR_PIRQS; i++) {
  25.873 -		irq_desc_t *desc = irq_desc + i;
  25.874 -		unsigned int status;
  25.875 -
  25.876 -		spin_lock_irq(&desc->lock);
  25.877 -		status = desc->status;
  25.878 -
  25.879 -		if (status & IRQ_AUTODETECT) {
  25.880 -			/* It triggered already - consider it spurious. */
  25.881 -			if (!(status & IRQ_WAITING)) {
  25.882 -				desc->status = status & ~IRQ_AUTODETECT;
  25.883 -				desc->handler->shutdown(i);
  25.884 -			} else
  25.885 -				if (i < 32)
  25.886 -					val |= 1 << i;
  25.887 -		}
  25.888 -		spin_unlock_irq(&desc->lock);
  25.889 -	}
  25.890 -
  25.891 -	return val;
  25.892 -}
  25.893 -
  25.894 -/*
  25.895 - * Return a mask of triggered interrupts (this
  25.896 - * can handle only legacy ISA interrupts).
  25.897 - */
  25.898 - 
  25.899 -/**
  25.900 - *	probe_irq_mask - scan a bitmap of interrupt lines
  25.901 - *	@val:	mask of interrupts to consider
  25.902 - *
  25.903 - *	Scan the ISA bus interrupt lines and return a bitmap of
  25.904 - *	active interrupts. The interrupt probe logic state is then
  25.905 - *	returned to its previous value.
  25.906 - *
  25.907 - *	Note: we need to scan all the irq's even though we will
  25.908 - *	only return ISA irq numbers - just so that we reset them
  25.909 - *	all to a known state.
  25.910 - */
  25.911 -unsigned int probe_irq_mask(unsigned long val)
  25.912 -{
  25.913 -	int i;
  25.914 -	unsigned int mask;
  25.915 -
  25.916 -	mask = 0;
  25.917 -	for (i = 0; i < NR_PIRQS; i++) {
  25.918 -		irq_desc_t *desc = irq_desc + i;
  25.919 -		unsigned int status;
  25.920 -
  25.921 -		spin_lock_irq(&desc->lock);
  25.922 -		status = desc->status;
  25.923 -
  25.924 -		if (status & IRQ_AUTODETECT) {
  25.925 -			if (i < 16 && !(status & IRQ_WAITING))
  25.926 -				mask |= 1 << i;
  25.927 -
  25.928 -			desc->status = status & ~IRQ_AUTODETECT;
  25.929 -			desc->handler->shutdown(i);
  25.930 -		}
  25.931 -		spin_unlock_irq(&desc->lock);
  25.932 -	}
  25.933 -	up(&probe_sem);
  25.934 -
  25.935 -	return mask & val;
  25.936 -}
  25.937 -
  25.938 -/*
  25.939 - * Return the one interrupt that triggered (this can
  25.940 - * handle any interrupt source).
  25.941 - */
  25.942 -
  25.943 -/**
  25.944 - *	probe_irq_off	- end an interrupt autodetect
  25.945 - *	@val: mask of potential interrupts (unused)
  25.946 - *
  25.947 - *	Scans the unused interrupt lines and returns the line which
  25.948 - *	appears to have triggered the interrupt. If no interrupt was
  25.949 - *	found then zero is returned. If more than one interrupt is
  25.950 - *	found then minus the first candidate is returned to indicate
  25.951 - *	their is doubt.
  25.952 - *
  25.953 - *	The interrupt probe logic state is returned to its previous
  25.954 - *	value.
  25.955 - *
  25.956 - *	BUGS: When used in a module (which arguably shouldnt happen)
  25.957 - *	nothing prevents two IRQ probe callers from overlapping. The
  25.958 - *	results of this are non-optimal.
  25.959 - */
  25.960 - 
  25.961 -int probe_irq_off(unsigned long val)
  25.962 -{
  25.963 -	int i, irq_found, nr_irqs;
  25.964 -
  25.965 -	nr_irqs = 0;
  25.966 -	irq_found = 0;
  25.967 -	for (i = 0; i < NR_PIRQS; i++) {
  25.968 -		irq_desc_t *desc = irq_desc + i;
  25.969 -		unsigned int status;
  25.970 -
  25.971 -		spin_lock_irq(&desc->lock);
  25.972 -		status = desc->status;
  25.973 -
  25.974 -		if (status & IRQ_AUTODETECT) {
  25.975 -			if (!(status & IRQ_WAITING)) {
  25.976 -				if (!nr_irqs)
  25.977 -					irq_found = i;
  25.978 -				nr_irqs++;
  25.979 -			}
  25.980 -			desc->status = status & ~IRQ_AUTODETECT;
  25.981 -			desc->handler->shutdown(i);
  25.982 -		}
  25.983 -		spin_unlock_irq(&desc->lock);
  25.984 -	}
  25.985 -	up(&probe_sem);
  25.986 -
  25.987 -	if (nr_irqs > 1)
  25.988 -		irq_found = -irq_found;
  25.989 -	return irq_found;
  25.990 -}
  25.991 -
  25.992 -/* this was setup_x86_irq but it seems pretty generic */
  25.993 -int setup_irq(unsigned int irq, struct irqaction * new)
  25.994 -{
  25.995 -	int shared = 0;
  25.996 -	unsigned long flags;
  25.997 -	struct irqaction *old, **p;
  25.998 -	irq_desc_t *desc = irq_desc + irq;
  25.999 -
 25.1000 -	/*
 25.1001 -	 * Some drivers like serial.c use request_irq() heavily,
 25.1002 -	 * so we have to be careful not to interfere with a
 25.1003 -	 * running system.
 25.1004 -	 */
 25.1005 -	if (new->flags & SA_SAMPLE_RANDOM) {
 25.1006 -		/*
 25.1007 -		 * This function might sleep, we want to call it first,
 25.1008 -		 * outside of the atomic block.
 25.1009 -		 * Yes, this might clear the entropy pool if the wrong
 25.1010 -		 * driver is attempted to be loaded, without actually
 25.1011 -		 * installing a new handler, but is this really a problem,
 25.1012 -		 * only the sysadmin is able to do this.
 25.1013 -		 */
 25.1014 -		rand_initialize_irq(irq);
 25.1015 -	}
 25.1016 -
 25.1017 -	/*
 25.1018 -	 * The following block of code has to be executed atomically
 25.1019 -	 */
 25.1020 -	spin_lock_irqsave(&desc->lock,flags);
 25.1021 -	p = &desc->action;
 25.1022 -	if ((old = *p) != NULL) {
 25.1023 -		/* Can't share interrupts unless both agree to */
 25.1024 -		if (!(old->flags & new->flags & SA_SHIRQ)) {
 25.1025 -			spin_unlock_irqrestore(&desc->lock,flags);
 25.1026 -			return -EBUSY;
 25.1027 -		}
 25.1028 -
 25.1029 -		/* add new interrupt at end of irq queue */
 25.1030 -		do {
 25.1031 -			p = &old->next;
 25.1032 -			old = *p;
 25.1033 -		} while (old);
 25.1034 -		shared = 1;
 25.1035 -	}
 25.1036 -
 25.1037 -	*p = new;
 25.1038 -
 25.1039 -	if (!shared) {
 25.1040 -		desc->depth = 0;
 25.1041 -		desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
 25.1042 -		desc->handler->startup(irq);
 25.1043 -	}
 25.1044 -	spin_unlock_irqrestore(&desc->lock,flags);
 25.1045 -
 25.1046 -	register_irq_proc(irq);
 25.1047 -	return 0;
 25.1048 -}
 25.1049 -
 25.1050 -static struct proc_dir_entry * root_irq_dir;
 25.1051 -static struct proc_dir_entry * irq_dir [NR_IRQS];
 25.1052 -
 25.1053 -#define HEX_DIGITS 8
 25.1054 -
 25.1055 -static unsigned int parse_hex_value (const char *buffer,
 25.1056 -		unsigned long count, unsigned long *ret)
 25.1057 -{
 25.1058 -	unsigned char hexnum [HEX_DIGITS];
 25.1059 -	unsigned long value;
 25.1060 -	int i;
 25.1061 -
 25.1062 -	if (!count)
 25.1063 -		return -EINVAL;
 25.1064 -	if (count > HEX_DIGITS)
 25.1065 -		count = HEX_DIGITS;
 25.1066 -	if (copy_from_user(hexnum, buffer, count))
 25.1067 -		return -EFAULT;
 25.1068 -
 25.1069 -	/*
 25.1070 -	 * Parse the first 8 characters as a hex string, any non-hex char
 25.1071 -	 * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
 25.1072 -	 */
 25.1073 -	value = 0;
 25.1074 -
 25.1075 -	for (i = 0; i < count; i++) {
 25.1076 -		unsigned int c = hexnum[i];
 25.1077 -
 25.1078 -		switch (c) {
 25.1079 -			case '0' ... '9': c -= '0'; break;
 25.1080 -			case 'a' ... 'f': c -= 'a'-10; break;
 25.1081 -			case 'A' ... 'F': c -= 'A'-10; break;
 25.1082 -		default:
 25.1083 -			goto out;
 25.1084 -		}
 25.1085 -		value = (value << 4) | c;
 25.1086 -	}
 25.1087 -out:
 25.1088 -	*ret = value;
 25.1089 -	return 0;
 25.1090 -}
 25.1091 -
 25.1092 -#if CONFIG_SMP
 25.1093 -
 25.1094 -static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
 25.1095 -
 25.1096 -static unsigned long irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = ~0UL };
 25.1097 -static int irq_affinity_read_proc (char *page, char **start, off_t off,
 25.1098 -			int count, int *eof, void *data)
 25.1099 -{
 25.1100 -	if (count < HEX_DIGITS+1)
 25.1101 -		return -EINVAL;
 25.1102 -	return sprintf (page, "%08lx\n", irq_affinity[(long)data]);
 25.1103 -}
 25.1104 -
 25.1105 -static int irq_affinity_write_proc (struct file *file, const char *buffer,
 25.1106 -					unsigned long count, void *data)
 25.1107 -{
 25.1108 -	int irq = (long) data, full_count = count, err;
 25.1109 -	unsigned long new_value;
 25.1110 -
 25.1111 -	if (!irq_desc[irq].handler->set_affinity)
 25.1112 -		return -EIO;
 25.1113 -
 25.1114 -	err = parse_hex_value(buffer, count, &new_value);
 25.1115 -
 25.1116 -	/*
 25.1117 -	 * Do not allow disabling IRQs completely - it's a too easy
 25.1118 -	 * way to make the system unusable accidentally :-) At least
 25.1119 -	 * one online CPU still has to be targeted.
 25.1120 -	 */
 25.1121 -	if (!(new_value & cpu_online_map))
 25.1122 -		return -EINVAL;
 25.1123 -
 25.1124 -	irq_affinity[irq] = new_value;
 25.1125 -	irq_desc[irq].handler->set_affinity(irq, new_value);
 25.1126 -
 25.1127 -	return full_count;
 25.1128 -}
 25.1129 -
 25.1130 -#endif
 25.1131 -
 25.1132 -static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
 25.1133 -			int count, int *eof, void *data)
 25.1134 -{
 25.1135 -	unsigned long *mask = (unsigned long *) data;
 25.1136 -	if (count < HEX_DIGITS+1)
 25.1137 -		return -EINVAL;
 25.1138 -	return sprintf (page, "%08lx\n", *mask);
 25.1139 -}
 25.1140 -
 25.1141 -static int prof_cpu_mask_write_proc (struct file *file, const char *buffer,
 25.1142 -					unsigned long count, void *data)
 25.1143 -{
 25.1144 -	unsigned long *mask = (unsigned long *) data, full_count = count, err;
 25.1145 -	unsigned long new_value;
 25.1146 -
 25.1147 -	err = parse_hex_value(buffer, count, &new_value);
 25.1148 -	if (err)
 25.1149 -		return err;
 25.1150 -
 25.1151 -	*mask = new_value;
 25.1152 -	return full_count;
 25.1153 -}
 25.1154 -
 25.1155 -#define MAX_NAMELEN 10
 25.1156 -
 25.1157 -static void register_irq_proc (unsigned int irq)
 25.1158 -{
 25.1159 -	char name [MAX_NAMELEN];
 25.1160 -
 25.1161 -	if (!root_irq_dir || (irq_desc[irq].handler == &no_irq_type) ||
 25.1162 -			irq_dir[irq])
 25.1163 -		return;
 25.1164 -
 25.1165 -	memset(name, 0, MAX_NAMELEN);
 25.1166 -	sprintf(name, "%d", irq);
 25.1167 -
 25.1168 -	/* create /proc/irq/1234 */
 25.1169 -	irq_dir[irq] = proc_mkdir(name, root_irq_dir);
 25.1170 -
 25.1171 -#if CONFIG_SMP
 25.1172 -	{
 25.1173 -		struct proc_dir_entry *entry;
 25.1174 -
 25.1175 -		/* create /proc/irq/1234/smp_affinity */
 25.1176 -		entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]);
 25.1177 -
 25.1178 -		if (entry) {
 25.1179 -			entry->nlink = 1;
 25.1180 -			entry->data = (void *)(long)irq;
 25.1181 -			entry->read_proc = irq_affinity_read_proc;
 25.1182 -			entry->write_proc = irq_affinity_write_proc;
 25.1183 -		}
 25.1184 -
 25.1185 -		smp_affinity_entry[irq] = entry;
 25.1186 -	}
 25.1187 -#endif
 25.1188 -}
 25.1189 -
 25.1190 -unsigned long prof_cpu_mask = -1;
 25.1191 -
 25.1192 -void init_irq_proc (void)
 25.1193 -{
 25.1194 -	struct proc_dir_entry *entry;
 25.1195 -	int i;
 25.1196 -
 25.1197 -	/* create /proc/irq */
 25.1198 -	root_irq_dir = proc_mkdir("irq", 0);
 25.1199 -
 25.1200 -	/* create /proc/irq/prof_cpu_mask */
 25.1201 -	entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir);
 25.1202 -
 25.1203 -	if (!entry)
 25.1204 -	    return;
 25.1205 -
 25.1206 -	entry->nlink = 1;
 25.1207 -	entry->data = (void *)&prof_cpu_mask;
 25.1208 -	entry->read_proc = prof_cpu_mask_read_proc;
 25.1209 -	entry->write_proc = prof_cpu_mask_write_proc;
 25.1210 -
 25.1211 -	/*
 25.1212 -	 * Create entries for all existing IRQs.
 25.1213 -	 */
 25.1214 -	for (i = 0; i < NR_IRQS; i++)
 25.1215 -		register_irq_proc(i);
 25.1216 -}
 25.1217 -
    26.1 --- a/linux-2.4.26-xen-sparse/arch/xen/kernel/ldt.c	Sat Aug 21 10:28:38 2004 +0000
    26.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.3 @@ -1,271 +0,0 @@
    26.4 -/*
    26.5 - * linux/kernel/ldt.c
    26.6 - *
    26.7 - * Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
    26.8 - * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
    26.9 - */
   26.10 -
   26.11 -#include <linux/errno.h>
   26.12 -#include <linux/sched.h>
   26.13 -#include <linux/string.h>
   26.14 -#include <linux/mm.h>
   26.15 -#include <linux/smp.h>
   26.16 -#include <linux/smp_lock.h>
   26.17 -#include <linux/vmalloc.h>
   26.18 -#include <linux/slab.h>
   26.19 -
   26.20 -#include <asm/uaccess.h>
   26.21 -#include <asm/system.h>
   26.22 -#include <asm/ldt.h>
   26.23 -#include <asm/desc.h>
   26.24 -
   26.25 -#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
   26.26 -static void flush_ldt(void *mm)
   26.27 -{
   26.28 -	if (current->active_mm)
   26.29 -		load_LDT(&current->active_mm->context);
   26.30 -}
   26.31 -#endif
   26.32 -
   26.33 -static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
   26.34 -{
   26.35 -	void *oldldt;
   26.36 -	void *newldt;
   26.37 -	int oldsize;
   26.38 -
   26.39 -	if (mincount <= pc->size)
   26.40 -		return 0;
   26.41 -	oldsize = pc->size;
   26.42 -	mincount = (mincount+511)&(~511);
   26.43 -	if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE)
   26.44 -		newldt = vmalloc(mincount*LDT_ENTRY_SIZE);
   26.45 -	else
   26.46 -		newldt = kmalloc(mincount*LDT_ENTRY_SIZE, GFP_KERNEL);
   26.47 -
   26.48 -	if (!newldt)
   26.49 -		return -ENOMEM;
   26.50 -
   26.51 -	if (oldsize)
   26.52 -		memcpy(newldt, pc->ldt, oldsize*LDT_ENTRY_SIZE);
   26.53 -
   26.54 -	oldldt = pc->ldt;
   26.55 -	memset(newldt+oldsize*LDT_ENTRY_SIZE, 0, (mincount-oldsize)*LDT_ENTRY_SIZE);
   26.56 -	wmb();
   26.57 -	pc->ldt = newldt;
   26.58 -	pc->size = mincount;
   26.59 -	if (reload) {
   26.60 -		make_pages_readonly(
   26.61 -			pc->ldt,
   26.62 -			(pc->size*LDT_ENTRY_SIZE)/PAGE_SIZE);
   26.63 -		load_LDT(pc);
   26.64 -		flush_page_update_queue();
   26.65 -#ifdef CONFIG_SMP
   26.66 -		if (current->mm->cpu_vm_mask != (1<<smp_processor_id()))
   26.67 -			smp_call_function(flush_ldt, 0, 1, 1);
   26.68 -#endif
   26.69 -	}
   26.70 -	wmb();
   26.71 -	if (oldsize) {
   26.72 -		if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE)
   26.73 -			vfree(oldldt);
   26.74 -		else
   26.75 -			kfree(oldldt);
   26.76 -	}
   26.77 -	return 0;
   26.78 -}
   26.79 -
   26.80 -static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
   26.81 -{
   26.82 -	int err = alloc_ldt(new, old->size, 0);
   26.83 -	if (err < 0) {
   26.84 -		printk(KERN_WARNING "ldt allocation failed\n");
   26.85 -		new->size = 0;
   26.86 -		return err;
   26.87 -	}
   26.88 -	memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE);
   26.89 -	make_pages_readonly(new->ldt, (new->size*LDT_ENTRY_SIZE)/PAGE_SIZE);
   26.90 -	return 0;
   26.91 -}
   26.92 -
   26.93 -/*
   26.94 - * we do not have to muck with descriptors here, that is
   26.95 - * done in switch_mm() as needed.
   26.96 - */
   26.97 -int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
   26.98 -{
   26.99 -	struct mm_struct * old_mm;
  26.100 -	int retval = 0;
  26.101 -
  26.102 -	init_MUTEX(&mm->context.sem);
  26.103 -	mm->context.size = 0;
  26.104 -	old_mm = current->mm;
  26.105 -	if (old_mm && old_mm->context.size > 0) {
  26.106 -		down(&old_mm->context.sem);
  26.107 -		retval = copy_ldt(&mm->context, &old_mm->context);
  26.108 -		up(&old_mm->context.sem);
  26.109 -	}
  26.110 -	return retval;
  26.111 -}
  26.112 -
  26.113 -/*
  26.114 - * No need to lock the MM as we are the last user
  26.115 - * Do not touch the ldt register, we are already
  26.116 - * in the next thread.
  26.117 - */
  26.118 -void destroy_context(struct mm_struct *mm)
  26.119 -{
  26.120 -	if (mm->context.size) {
  26.121 -		make_pages_writeable(
  26.122 -			mm->context.ldt, 
  26.123 -			(mm->context.size*LDT_ENTRY_SIZE)/PAGE_SIZE);
  26.124 -		flush_page_update_queue();
  26.125 -		if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
  26.126 -			vfree(mm->context.ldt);
  26.127 -		else
  26.128 -			kfree(mm->context.ldt);
  26.129 -		mm->context.size = 0;
  26.130 -	}
  26.131 -}
  26.132 -
  26.133 -static int read_ldt(void * ptr, unsigned long bytecount)
  26.134 -{
  26.135 -	int err;
  26.136 -	unsigned long size;
  26.137 -	struct mm_struct * mm = current->mm;
  26.138 -
  26.139 -	if (!mm->context.size)
  26.140 -		return 0;
  26.141 -	if (bytecount > LDT_ENTRY_SIZE*LDT_ENTRIES)
  26.142 -		bytecount = LDT_ENTRY_SIZE*LDT_ENTRIES;
  26.143 -
  26.144 -	down(&mm->context.sem);
  26.145 -	size = mm->context.size*LDT_ENTRY_SIZE;
  26.146 -	if (size > bytecount)
  26.147 -		size = bytecount;
  26.148 -
  26.149 -	err = 0;
  26.150 -	if (copy_to_user(ptr, mm->context.ldt, size))
  26.151 -		err = -EFAULT;
  26.152 -	up(&mm->context.sem);
  26.153 -	if (err < 0)
  26.154 -		return err;
  26.155 -	if (size != bytecount) {
  26.156 -		/* zero-fill the rest */
  26.157 -		clear_user(ptr+size, bytecount-size);
  26.158 -	}
  26.159 -	return bytecount;
  26.160 -}
  26.161 -
  26.162 -static int read_default_ldt(void * ptr, unsigned long bytecount)
  26.163 -{
  26.164 -	int err;
  26.165 -	unsigned long size;
  26.166 -	void *address;
  26.167 -
  26.168 -	err = 0;
  26.169 -	address = &default_ldt[0];
  26.170 -	size = 5*sizeof(struct desc_struct);
  26.171 -	if (size > bytecount)
  26.172 -		size = bytecount;
  26.173 -
  26.174 -	err = size;
  26.175 -	if (copy_to_user(ptr, address, size))
  26.176 -		err = -EFAULT;
  26.177 -
  26.178 -	return err;
  26.179 -}
  26.180 -
  26.181 -static int write_ldt(void * ptr, unsigned long bytecount, int oldmode)
  26.182 -{
  26.183 -	struct mm_struct * mm = current->mm;
  26.184 -	__u32 entry_1, entry_2, *lp;
  26.185 -	unsigned long phys_lp;
  26.186 -	int error;
  26.187 -	struct modify_ldt_ldt_s ldt_info;
  26.188 -
  26.189 -	error = -EINVAL;
  26.190 -	if (bytecount != sizeof(ldt_info))
  26.191 -		goto out;
  26.192 -	error = -EFAULT; 	
  26.193 -	if (copy_from_user(&ldt_info, ptr, sizeof(ldt_info)))
  26.194 -		goto out;
  26.195 -
  26.196 -	error = -EINVAL;
  26.197 -	if (ldt_info.entry_number >= LDT_ENTRIES)
  26.198 -		goto out;
  26.199 -	if (ldt_info.contents == 3) {
  26.200 -		if (oldmode)
  26.201 -			goto out;
  26.202 -		if (ldt_info.seg_not_present == 0)
  26.203 -			goto out;
  26.204 -	}
  26.205 -
  26.206 -	down(&mm->context.sem);
  26.207 -	if (ldt_info.entry_number >= mm->context.size) {
  26.208 -		error = alloc_ldt(&current->mm->context, ldt_info.entry_number+1, 1);
  26.209 -		if (error < 0)
  26.210 -			goto out_unlock;
  26.211 -	}
  26.212 -
  26.213 -	lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.ldt);
  26.214 -	phys_lp = arbitrary_virt_to_phys(lp);
  26.215 -
  26.216 -   	/* Allow LDTs to be cleared by the user. */
  26.217 -   	if (ldt_info.base_addr == 0 && ldt_info.limit == 0) {
  26.218 -		if (oldmode ||
  26.219 -		    (ldt_info.contents == 0		&&
  26.220 -		     ldt_info.read_exec_only == 1	&&
  26.221 -		     ldt_info.seg_32bit == 0		&&
  26.222 -		     ldt_info.limit_in_pages == 0	&&
  26.223 -		     ldt_info.seg_not_present == 1	&&
  26.224 -		     ldt_info.useable == 0 )) {
  26.225 -			entry_1 = 0;
  26.226 -			entry_2 = 0;
  26.227 -			goto install;
  26.228 -		}
  26.229 -	}
  26.230 -
  26.231 -	entry_1 = ((ldt_info.base_addr & 0x0000ffff) << 16) |
  26.232 -		  (ldt_info.limit & 0x0ffff);
  26.233 -	entry_2 = (ldt_info.base_addr & 0xff000000) |
  26.234 -		  ((ldt_info.base_addr & 0x00ff0000) >> 16) |
  26.235 -		  (ldt_info.limit & 0xf0000) |
  26.236 -		  ((ldt_info.read_exec_only ^ 1) << 9) |
  26.237 -		  (ldt_info.contents << 10) |
  26.238 -		  ((ldt_info.seg_not_present ^ 1) << 15) |
  26.239 -		  (ldt_info.seg_32bit << 22) |
  26.240 -		  (ldt_info.limit_in_pages << 23) |
  26.241 -		  0x7000;
  26.242 -	if (!oldmode)
  26.243 -		entry_2 |= (ldt_info.useable << 20);
  26.244 -
  26.245 -	/* Install the new entry ...  */
  26.246 -install:
  26.247 -	error = HYPERVISOR_update_descriptor(phys_lp, entry_1, entry_2);
  26.248 -
  26.249 -out_unlock:
  26.250 -	up(&mm->context.sem);
  26.251 -out:
  26.252 -	return error;
  26.253 -}
  26.254 -
  26.255 -asmlinkage int sys_modify_ldt(int func, void *ptr, unsigned long bytecount)
  26.256 -{
  26.257 -	int ret = -ENOSYS;
  26.258 -
  26.259 -	switch (func) {
  26.260 -	case 0:
  26.261 -		ret = read_ldt(ptr, bytecount);
  26.262 -		break;
  26.263 -	case 1:
  26.264 -		ret = write_ldt(ptr, bytecount, 1);
  26.265 -		break;
  26.266 -	case 2:
  26.267 -		ret = read_default_ldt(ptr, bytecount);
  26.268 -		break;
  26.269 -	case 0x11:
  26.270 -		ret = write_ldt(ptr, bytecount, 0);
  26.271 -		break;
  26.272 -	}
  26.273 -	return ret;
  26.274 -}
    27.1 --- a/linux-2.4.26-xen-sparse/arch/xen/kernel/pci-pc.c	Sat Aug 21 10:28:38 2004 +0000
    27.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.3 @@ -1,260 +0,0 @@
    27.4 -/*
    27.5 - *	Low-Level PCI Support for PC
    27.6 - *
    27.7 - *	(c) 1999--2000 Martin Mares <mj@ucw.cz>
    27.8 - *
    27.9 - * Adjusted to use Xen's interface by Rolf Neugebauer, Intel Research Cambridge
   27.10 - * Further modifications by Keir Fraser, University of Cambridge
   27.11 - */
   27.12 -
   27.13 -#include <linux/config.h>
   27.14 -#include <linux/types.h>
   27.15 -#include <linux/kernel.h>
   27.16 -#include <linux/sched.h>
   27.17 -#include <linux/pci.h>
   27.18 -#include <linux/init.h>
   27.19 -#include <linux/ioport.h>
   27.20 -
   27.21 -#include <asm/segment.h>
   27.22 -#include <asm/io.h>
   27.23 -
   27.24 -#include <asm/hypervisor-ifs/hypervisor-if.h>
   27.25 -#include <asm/hypervisor-ifs/physdev.h>
   27.26 -
   27.27 -#include "pci-i386.h"
   27.28 -
   27.29 -/*
   27.30 - * NB. The following interface functions are not included here:
   27.31 - *  1. void eisa_set_level_irq(unsigned int irq)
   27.32 - *  2. irq_routing_table * __devinit pcibios_get_irq_routing_table(void)
   27.33 - *  3. int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
   27.34 - * All are used by the ACPI driver. This should be ported to Xen if it is
   27.35 - * ever required -- Xen is the ultimate source for IRQ-routing knowledge.
   27.36 - */
   27.37 -
   27.38 -struct pci_ops *pci_root_ops = NULL;
   27.39 -
   27.40 -int (*pci_config_read)(int seg, int bus, int dev, int fn, 
   27.41 -                       int reg, int len, u32 *value) = NULL;
   27.42 -int (*pci_config_write)(int seg, int bus, int dev, int fn,
   27.43 -                        int reg, int len, u32 value) = NULL;
   27.44 -
   27.45 -unsigned int pci_probe = PCI_PROBE_BIOS;
   27.46 -
   27.47 -struct pci_fixup pcibios_fixups[] = { { 0 } };
   27.48 -
   27.49 -static int pci_confx_read(int seg, int bus, int dev, int fn, int reg, 
   27.50 -                          int len, u32 *value)
   27.51 -{
   27.52 -    int ret;
   27.53 -    physdev_op_t op;
   27.54 -
   27.55 -    if (bus > 255 || dev > 31 || fn > 7 || reg > 255)
   27.56 -        return -EINVAL;
   27.57 -
   27.58 -    op.cmd = PHYSDEVOP_PCI_CFGREG_READ;
   27.59 -    op.u.pci_cfgreg_read.bus  = bus;
   27.60 -    op.u.pci_cfgreg_read.dev  = dev;
   27.61 -    op.u.pci_cfgreg_read.func = fn;
   27.62 -    op.u.pci_cfgreg_read.reg  = reg;
   27.63 -    op.u.pci_cfgreg_read.len  = len;
   27.64 -
   27.65 -    if ( (ret = HYPERVISOR_physdev_op(&op)) != 0 )
   27.66 -        return ret;
   27.67 -
   27.68 -    *value = op.u.pci_cfgreg_read.value;
   27.69 -
   27.70 -    return 0;
   27.71 -}
   27.72 -
   27.73 -static int pci_confx_write(int seg, int bus, int dev, int fn, int reg, 
   27.74 -                           int len, u32 value)
   27.75 -{
   27.76 -    int ret;
   27.77 -    physdev_op_t op;
   27.78 -
   27.79 -    if ((bus > 255 || dev > 31 || fn > 7 || reg > 255)) 
   27.80 -        return -EINVAL;
   27.81 -
   27.82 -    op.cmd = PHYSDEVOP_PCI_CFGREG_WRITE;
   27.83 -    op.u.pci_cfgreg_write.bus   = bus;
   27.84 -    op.u.pci_cfgreg_write.dev   = dev;
   27.85 -    op.u.pci_cfgreg_write.func  = fn;
   27.86 -    op.u.pci_cfgreg_write.reg   = reg;
   27.87 -    op.u.pci_cfgreg_write.len   = len;
   27.88 -    op.u.pci_cfgreg_write.value = value;
   27.89 -
   27.90 -    if ( (ret = HYPERVISOR_physdev_op(&op)) != 0 )
   27.91 -        return ret;
   27.92 -    return 0;
   27.93 -}
   27.94 -
   27.95 -
   27.96 -static int pci_confx_read_config_byte(struct pci_dev *dev, 
   27.97 -                                      int where, u8 *value)
   27.98 -{
   27.99 -    int result; 
  27.100 -    u32 data;
  27.101 -
  27.102 -    result = pci_confx_read(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  27.103 -                            PCI_FUNC(dev->devfn), where, 1, &data);
  27.104 -
  27.105 -    *value = (u8)data;
  27.106 -
  27.107 -    return result;
  27.108 -}
  27.109 -
  27.110 -static int pci_confx_read_config_word(struct pci_dev *dev, 
  27.111 -                                      int where, u16 *value)
  27.112 -{
  27.113 -    int result; 
  27.114 -    u32 data;
  27.115 -
  27.116 -    result = pci_confx_read(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  27.117 -                            PCI_FUNC(dev->devfn), where, 2, &data);
  27.118 -
  27.119 -    *value = (u16)data;
  27.120 -
  27.121 -    return result;
  27.122 -}
  27.123 -
  27.124 -static int pci_confx_read_config_dword(struct pci_dev *dev, 
  27.125 -                                       int where, u32 *value)
  27.126 -{
  27.127 -    return pci_confx_read(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  27.128 -                          PCI_FUNC(dev->devfn), where, 4, value);
  27.129 -}
  27.130 -
  27.131 -static int pci_confx_write_config_byte(struct pci_dev *dev, 
  27.132 -                                       int where, u8 value)
  27.133 -{
  27.134 -    return pci_confx_write(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  27.135 -                           PCI_FUNC(dev->devfn), where, 1, value);
  27.136 -}
  27.137 -
  27.138 -static int pci_confx_write_config_word(struct pci_dev *dev, 
  27.139 -                                       int where, u16 value)
  27.140 -{
  27.141 -    return pci_confx_write(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  27.142 -                           PCI_FUNC(dev->devfn), where, 2, value);
  27.143 -}
  27.144 -
  27.145 -static int pci_confx_write_config_dword(struct pci_dev *dev, 
  27.146 -                                        int where, u32 value)
  27.147 -{
  27.148 -    return pci_confx_write(0, dev->bus->number, PCI_SLOT(dev->devfn), 
  27.149 -                           PCI_FUNC(dev->devfn), where, 4, value);
  27.150 -}
  27.151 -
  27.152 -static struct pci_ops pci_conf_xen = {
  27.153 -    pci_confx_read_config_byte,
  27.154 -    pci_confx_read_config_word,
  27.155 -    pci_confx_read_config_dword,
  27.156 -    pci_confx_write_config_byte,
  27.157 -    pci_confx_write_config_word,
  27.158 -    pci_confx_write_config_dword
  27.159 -};
  27.160 -
  27.161 -void pcibios_penalize_isa_irq(int irq)
  27.162 -{ 
  27.163 -    /* nothing */
  27.164 -}
  27.165 -
  27.166 -void __devinit pcibios_fixup_bus(struct pci_bus *b)
  27.167 -{
  27.168 -    pci_read_bridge_bases(b);
  27.169 -}
  27.170 -
  27.171 -struct pci_bus * __devinit pcibios_scan_root(int busnum)
  27.172 -{
  27.173 -    struct list_head *list;
  27.174 -    struct pci_bus *bus;
  27.175 -
  27.176 -    list_for_each ( list, &pci_root_buses )
  27.177 -    {
  27.178 -        bus = pci_bus_b(list);
  27.179 -        if ( bus->number == busnum )
  27.180 -            return bus;
  27.181 -    }
  27.182 -
  27.183 -    printk("PCI: Probing PCI hardware (bus %02x)\n", busnum);
  27.184 -    return pci_scan_bus(busnum, pci_root_ops, NULL);
  27.185 -}
  27.186 -
  27.187 -void __init pcibios_init(void)
  27.188 -{
  27.189 -    int bus;
  27.190 -    physdev_op_t op;
  27.191 -
  27.192 -    if ( !pci_probe )
  27.193 -        return;
  27.194 -
  27.195 -    pci_root_ops     = &pci_conf_xen;
  27.196 -    pci_config_read  = pci_confx_read;
  27.197 -    pci_config_write = pci_confx_write;
  27.198 -
  27.199 -    pcibios_set_cacheline_size();
  27.200 -
  27.201 -    op.cmd = PHYSDEVOP_PCI_PROBE_ROOT_BUSES;
  27.202 -    if ( HYPERVISOR_physdev_op(&op) != 0 )
  27.203 -    {
  27.204 -        printk(KERN_WARNING "PCI: System does not support PCI\n");
  27.205 -        return;
  27.206 -    }
  27.207 -
  27.208 -    printk(KERN_INFO "PCI: Probing PCI hardware\n");
  27.209 -    for ( bus = 0; bus < 256; bus++ )
  27.210 -        if ( test_bit(bus, &op.u.pci_probe_root_buses.busmask[0]) )
  27.211 -            (void)pcibios_scan_root(bus);
  27.212 -
  27.213 -    pcibios_resource_survey();
  27.214 -}
  27.215 -
  27.216 -char * __devinit pcibios_setup(char *str)
  27.217 -{
  27.218 -    if ( !strcmp(str, "off") )
  27.219 -        pci_probe = 0;
  27.220 -    return NULL;
  27.221 -}
  27.222 -
  27.223 -unsigned int pcibios_assign_all_busses(void)
  27.224 -{
  27.225 -    return 0;
  27.226 -}
  27.227 -
  27.228 -int pcibios_enable_device(struct pci_dev *dev, int mask)
  27.229 -{
  27.230 -    int err;
  27.231 -    u8  pin;
  27.232 -    physdev_op_t op;
  27.233 -
  27.234 -    /* Inform Xen that we are going to use this device. */
  27.235 -    op.cmd = PHYSDEVOP_PCI_INITIALISE_DEVICE;
  27.236 -    op.u.pci_initialise_device.bus  = dev->bus->number;
  27.237 -    op.u.pci_initialise_device.dev  = PCI_SLOT(dev->devfn);
  27.238 -    op.u.pci_initialise_device.func = PCI_FUNC(dev->devfn);
  27.239 -    if ( (err = HYPERVISOR_physdev_op(&op)) != 0 )
  27.240 -        return err;
  27.241 -
  27.242 -    /* Now we can bind to the very final IRQ line. */
  27.243 -    pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &pin);
  27.244 -    dev->irq = pin;
  27.245 -
  27.246 -    /* Turn on device I/O and memory access as necessary. */
  27.247 -    if ( (err = pcibios_enable_resources(dev, mask)) < 0 )
  27.248 -        return err;
  27.249 -
  27.250 -    /* Sanity-check that an interrupt-producing device is routed to an IRQ. */
  27.251 -    pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
  27.252 -    if ( pin != 0 )
  27.253 -    {
  27.254 -        if ( dev->irq != 0 )
  27.255 -            printk(KERN_INFO "PCI: Obtained IRQ %d for device %s\n",
  27.256 -                   dev->irq, dev->slot_name);
  27.257 -        else
  27.258 -            printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of "
  27.259 -                   "device %s.\n", 'A' + pin - 1, dev->slot_name);
  27.260 -    }
  27.261 -
  27.262 -    return 0;
  27.263 -}
    28.1 --- a/linux-2.4.26-xen-sparse/arch/xen/kernel/process.c	Sat Aug 21 10:28:38 2004 +0000
    28.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.3 @@ -1,459 +0,0 @@
    28.4 -/*
    28.5 - *  linux/arch/i386/kernel/process.c
    28.6 - *
    28.7 - *  Copyright (C) 1995  Linus Torvalds
    28.8 - *
    28.9 - *  Pentium III FXSR, SSE support
   28.10 - *	Gareth Hughes <gareth@valinux.com>, May 2000
   28.11 - */
   28.12 -
   28.13 -/*
   28.14 - * This file handles the architecture-dependent parts of process handling..
   28.15 - */
   28.16 -
   28.17 -#define __KERNEL_SYSCALLS__
   28.18 -#include <stdarg.h>
   28.19 -
   28.20 -#include <linux/errno.h>
   28.21 -#include <linux/sched.h>
   28.22 -#include <linux/kernel.h>
   28.23 -#include <linux/mm.h>
   28.24 -#include <linux/smp.h>
   28.25 -#include <linux/smp_lock.h>
   28.26 -#include <linux/stddef.h>
   28.27 -#include <linux/unistd.h>
   28.28 -#include <linux/ptrace.h>
   28.29 -#include <linux/slab.h>
   28.30 -#include <linux/vmalloc.h>
   28.31 -#include <linux/user.h>
   28.32 -#include <linux/a.out.h>
   28.33 -#include <linux/interrupt.h>
   28.34 -#include <linux/config.h>
   28.35 -#include <linux/delay.h>
   28.36 -#include <linux/reboot.h>
   28.37 -#include <linux/init.h>
   28.38 -#include <linux/mc146818rtc.h>
   28.39 -
   28.40 -#include <asm/uaccess.h>
   28.41 -#include <asm/pgtable.h>
   28.42 -#include <asm/system.h>
   28.43 -#include <asm/io.h>
   28.44 -#include <asm/ldt.h>
   28.45 -#include <asm/processor.h>
   28.46 -#include <asm/i387.h>
   28.47 -#include <asm/desc.h>
   28.48 -#include <asm/mmu_context.h>
   28.49 -#include <asm/multicall.h>
   28.50 -#include <asm/hypervisor-ifs/dom0_ops.h>
   28.51 -
   28.52 -#include <linux/irq.h>
   28.53 -
   28.54 -asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
   28.55 -
   28.56 -int hlt_counter;
   28.57 -
   28.58 -/*
   28.59 - * Powermanagement idle function, if any..
   28.60 - */
   28.61 -void (*pm_idle)(void);
   28.62 -
   28.63 -/*
   28.64 - * Power off function, if any
   28.65 - */
   28.66 -void (*pm_power_off)(void);
   28.67 -
   28.68 -void disable_hlt(void)
   28.69 -{
   28.70 -    hlt_counter++;
   28.71 -}
   28.72 -
   28.73 -void enable_hlt(void)
   28.74 -{
   28.75 -    hlt_counter--;
   28.76 -}
   28.77 -
   28.78 -/*
   28.79 - * The idle thread. There's no useful work to be
   28.80 - * done, so just try to conserve power and have a
   28.81 - * low exit latency (ie sit in a loop waiting for
   28.82 - * somebody to say that they'd like to reschedule)
   28.83 - */
   28.84 -void cpu_idle (void)
   28.85 -{
   28.86 -    extern int set_timeout_timer(void);
   28.87 -
   28.88 -    /* Endless idle loop with no priority at all. */
   28.89 -    init_idle();
   28.90 -    current->nice = 20;
   28.91 -    current->counter = -100;
   28.92 -
   28.93 -    for ( ; ; )
   28.94 -    {
   28.95 -        while ( !current->need_resched )
   28.96 -        {
   28.97 -            __cli();
   28.98 -            if ( current->need_resched )
   28.99 -            {
  28.100 -                /* The race-free check for events failed. */
  28.101 -                __sti();
  28.102 -                break;
  28.103 -            }
  28.104 -            else if ( set_timeout_timer() == 0 )
  28.105 -            {
  28.106 -                /* NB. Blocking reenable events in a race-free manner. */
  28.107 -                HYPERVISOR_block();
  28.108 -            }
  28.109 -            else
  28.110 -            {
  28.111 -                /* No race here: yielding will get us the CPU again anyway. */
  28.112 -                __sti();
  28.113 -                HYPERVISOR_yield();
  28.114 -            }
  28.115 -        }
  28.116 -        schedule();
  28.117 -        check_pgt_cache();
  28.118 -    }
  28.119 -}
  28.120 -
  28.121 -extern void show_trace(unsigned long* esp);
  28.122 -
  28.123 -void show_regs(struct pt_regs * regs)
  28.124 -{
  28.125 -    printk("\n");
  28.126 -    printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
  28.127 -    printk("EIP: %04x:[<%08lx>] CPU: %d",0xffff & regs->xcs,regs->eip, smp_processor_id());
  28.128 -    if (regs->xcs & 2)
  28.129 -        printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
  28.130 -    printk(" EFLAGS: %08lx    %s\n",regs->eflags, print_tainted());
  28.131 -    printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
  28.132 -           regs->eax,regs->ebx,regs->ecx,regs->edx);
  28.133 -    printk("ESI: %08lx EDI: %08lx EBP: %08lx",
  28.134 -           regs->esi, regs->edi, regs->ebp);
  28.135 -    printk(" DS: %04x ES: %04x\n",
  28.136 -           0xffff & regs->xds,0xffff & regs->xes);
  28.137 -
  28.138 -    show_trace(&regs->esp);
  28.139 -}
  28.140 -
  28.141 -
  28.142 -/*
  28.143 - * Create a kernel thread
  28.144 - */
  28.145 -int arch_kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
  28.146 -{
  28.147 -    long retval, d0;
  28.148 -
  28.149 -    __asm__ __volatile__(
  28.150 -        "movl %%esp,%%esi\n\t"
  28.151 -        "int $0x80\n\t"		/* Linux/i386 system call */
  28.152 -        "cmpl %%esp,%%esi\n\t"	/* child or parent? */
  28.153 -        "je 1f\n\t"		/* parent - jump */
  28.154 -        /* Load the argument into eax, and push it.  That way, it does
  28.155 -         * not matter whether the called function is compiled with
  28.156 -         * -mregparm or not.  */
  28.157 -        "movl %4,%%eax\n\t"
  28.158 -        "pushl %%eax\n\t"		
  28.159 -        "call *%5\n\t"		/* call fn */
  28.160 -        "movl %3,%0\n\t"	/* exit */
  28.161 -        "int $0x80\n"
  28.162 -        "1:\t"
  28.163 -        :"=&a" (retval), "=&S" (d0)
  28.164 -        :"0" (__NR_clone), "i" (__NR_exit),
  28.165 -        "r" (arg), "r" (fn),
  28.166 -        "b" (flags | CLONE_VM)
  28.167 -        : "memory");
  28.168 -
  28.169 -    return retval;
  28.170 -}
  28.171 -
  28.172 -/*
  28.173 - * Free current thread data structures etc..
  28.174 - */
  28.175 -void exit_thread(void)
  28.176 -{
  28.177 -    /* nothing to do ... */
  28.178 -}
  28.179 -
  28.180 -void flush_thread(void)
  28.181 -{
  28.182 -    struct task_struct *tsk = current;
  28.183 -
  28.184 -    memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8);
  28.185 -
  28.186 -    /*
  28.187 -     * Forget coprocessor state..
  28.188 -     */
  28.189 -    clear_fpu(tsk);
  28.190 -    tsk->used_math = 0;
  28.191 -}
  28.192 -
  28.193 -void release_thread(struct task_struct *dead_task)
  28.194 -{
  28.195 -    if (dead_task->mm) {
  28.196 -        // temporary debugging check
  28.197 -        if (dead_task->mm->context.size) {
  28.198 -            printk("WARNING: dead process %8s still has LDT? <%p/%08x>\n",
  28.199 -                   dead_task->comm, 
  28.200 -		   dead_task->mm->context.ldt,
  28.201 -		   dead_task->mm->context.size);
  28.202 -            BUG();
  28.203 -        }
  28.204 -    }
  28.205 -    //release_x86_irqs(dead_task);
  28.206 -}
  28.207 -
  28.208 -
  28.209 -/*
  28.210 - * Save a segment.
  28.211 - */
  28.212 -#define savesegment(seg,value) \
  28.213 -	asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value)))
  28.214 -
  28.215 -int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
  28.216 -                unsigned long unused,
  28.217 -                struct task_struct * p, struct pt_regs * regs)
  28.218 -{
  28.219 -    struct pt_regs * childregs;
  28.220 -    unsigned long eflags;
  28.221 -
  28.222 -    childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p)) - 1;
  28.223 -    struct_cpy(childregs, regs);
  28.224 -    childregs->eax = 0;
  28.225 -    childregs->esp = esp;
  28.226 -
  28.227 -    p->thread.esp = (unsigned long) childregs;
  28.228 -    p->thread.esp0 = (unsigned long) (childregs+1);
  28.229 -
  28.230 -    p->thread.eip = (unsigned long) ret_from_fork;
  28.231 -
  28.232 -    savesegment(fs,p->thread.fs);
  28.233 -    savesegment(gs,p->thread.gs);
  28.234 -
  28.235 -    unlazy_fpu(current);
  28.236 -    struct_cpy(&p->thread.i387, &current->thread.i387);
  28.237 -
  28.238 -
  28.239 -    __asm__ __volatile__ ( "pushfl; popl %0" : "=r" (eflags) : );
  28.240 -    p->thread.io_pl = (eflags >> 12) & 3;
  28.241 -
  28.242 -    return 0;
  28.243 -}
  28.244 -
  28.245 -/*
  28.246 - * fill in the user structure for a core dump..
  28.247 - */
  28.248 -void dump_thread(struct pt_regs * regs, struct user * dump)
  28.249 -{
  28.250 -    int i;
  28.251 -
  28.252 -/* changed the size calculations - should hopefully work better. lbt */
  28.253 -    dump->magic = CMAGIC;
  28.254 -    dump->start_code = 0;
  28.255 -    dump->start_stack = regs->esp & ~(PAGE_SIZE - 1);
  28.256 -    dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
  28.257 -    dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> PAGE_SHIFT;
  28.258 -    dump->u_dsize -= dump->u_tsize;
  28.259 -    dump->u_ssize = 0;
  28.260 -    for (i = 0; i < 8; i++)
  28.261 -        dump->u_debugreg[i] = current->thread.debugreg[i];  
  28.262 -
  28.263 -    if (dump->start_stack < TASK_SIZE)
  28.264 -        dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
  28.265 -
  28.266 -    dump->regs.ebx = regs->ebx;
  28.267 -    dump->regs.ecx = regs->ecx;
  28.268 -    dump->regs.edx = regs->edx;
  28.269 -    dump->regs.esi = regs->esi;
  28.270 -    dump->regs.edi = regs->edi;
  28.271 -    dump->regs.ebp = regs->ebp;
  28.272 -    dump->regs.eax = regs->eax;
  28.273 -    dump->regs.ds = regs->xds;
  28.274 -    dump->regs.es = regs->xes;
  28.275 -    savesegment(fs,dump->regs.fs);
  28.276 -    savesegment(gs,dump->regs.gs);
  28.277 -    dump->regs.orig_eax = regs->orig_eax;
  28.278 -    dump->regs.eip = regs->eip;
  28.279 -    dump->regs.cs = regs->xcs;
  28.280 -    dump->regs.eflags = regs->eflags;
  28.281 -    dump->regs.esp = regs->esp;
  28.282 -    dump->regs.ss = regs->xss;
  28.283 -
  28.284 -    dump->u_fpvalid = dump_fpu (regs, &dump->i387);
  28.285 -}
  28.286 -
  28.287 -/*
  28.288 - *	switch_to(x,yn) should switch tasks from x to y.
  28.289 - *
  28.290 - * We fsave/fwait so that an exception goes off at the right time
  28.291 - * (as a call from the fsave or fwait in effect) rather than to
  28.292 - * the wrong process. Lazy FP saving no longer makes any sense
  28.293 - * with modern CPU's, and this simplifies a lot of things (SMP
  28.294 - * and UP become the same).
  28.295 - *
  28.296 - * NOTE! We used to use the x86 hardware context switching. The
  28.297 - * reason for not using it any more becomes apparent when you
  28.298 - * try to recover gracefully from saved state that is no longer
  28.299 - * valid (stale segment register values in particular). With the
  28.300 - * hardware task-switch, there is no way to fix up bad state in
  28.301 - * a reasonable manner.
  28.302 - *
  28.303 - * The fact that Intel documents the hardware task-switching to
  28.304 - * be slow is a fairly red herring - this code is not noticeably
  28.305 - * faster. However, there _is_ some room for improvement here,
  28.306 - * so the performance issues may eventually be a valid point.
  28.307 - * More important, however, is the fact that this allows us much
  28.308 - * more flexibility.
  28.309 - */
  28.310 -void __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
  28.311 -{
  28.312 -    struct thread_struct *next = &next_p->thread;
  28.313 -
  28.314 -    __cli();
  28.315 -
  28.316 -    /*
  28.317 -     * We clobber FS and GS here so that we avoid a GPF when restoring previous
  28.318 -     * task's FS/GS values in Xen when the LDT is switched. If we don't do this
  28.319 -     * then we can end up erroneously re-flushing the page-update queue when
  28.320 -     * we 'execute_multicall_list'.
  28.321 -     */
  28.322 -    __asm__ __volatile__ ( 
  28.323 -        "xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs" : : : "eax" );
  28.324 -
  28.325 -    MULTICALL_flush_page_update_queue();
  28.326 -
  28.327 -    /*
  28.328 -     * This is basically 'unlazy_fpu', except that we queue a multicall to 
  28.329 -     * indicate FPU task switch, rather than synchronously trapping to Xen.
  28.330 -     */
  28.331 -    if ( prev_p->flags & PF_USEDFPU )
  28.332 -    {
  28.333 -	if ( cpu_has_fxsr )
  28.334 -            asm volatile( "fxsave %0 ; fnclex"
  28.335 -                          : "=m" (prev_p->thread.i387.fxsave) );
  28.336 -	else
  28.337 -            asm volatile( "fnsave %0 ; fwait"
  28.338 -                          : "=m" (prev_p->thread.i387.fsave) );
  28.339 -	prev_p->flags &= ~PF_USEDFPU;
  28.340 -        queue_multicall0(__HYPERVISOR_fpu_taskswitch);
  28.341 -    }
  28.342 -
  28.343 -    queue_multicall2(__HYPERVISOR_stack_switch, __KERNEL_DS, next->esp0);
  28.344 -    if ( start_info.flags & SIF_PRIVILEGED ) 
  28.345 -    {
  28.346 -        dom0_op_t op;
  28.347 -        op.cmd           = DOM0_IOPL;
  28.348 -        op.u.iopl.domain = DOMID_SELF;
  28.349 -        op.u.iopl.iopl   = next->io_pl;
  28.350 -        queue_multicall1(__HYPERVISOR_dom0_op, (unsigned long)&op);
  28.351 -    }
  28.352 -
  28.353 -    /* EXECUTE ALL TASK SWITCH XEN SYSCALLS AT THIS POINT. */
  28.354 -    execute_multicall_list();
  28.355 -    __sti();
  28.356 -
  28.357 -    /*
  28.358 -     * Restore %fs and %gs.
  28.359 -     */
  28.360 -    loadsegment(fs, next->fs);
  28.361 -    loadsegment(gs, next->gs);
  28.362 -
  28.363 -    /*
  28.364 -     * Now maybe reload the debug registers
  28.365 -     */
  28.366 -    if ( next->debugreg[7] != 0 )
  28.367 -    {
  28.368 -        HYPERVISOR_set_debugreg(0, next->debugreg[0]);
  28.369 -        HYPERVISOR_set_debugreg(1, next->debugreg[1]);
  28.370 -        HYPERVISOR_set_debugreg(2, next->debugreg[2]);
  28.371 -        HYPERVISOR_set_debugreg(3, next->debugreg[3]);
  28.372 -        /* no 4 and 5 */
  28.373 -        HYPERVISOR_set_debugreg(6, next->debugreg[6]);
  28.374 -        HYPERVISOR_set_debugreg(7, next->debugreg[7]);
  28.375 -    }
  28.376 -}
  28.377 -
  28.378 -asmlinkage int sys_fork(struct pt_regs regs)
  28.379 -{
  28.380 -    return do_fork(SIGCHLD, regs.esp, &regs, 0);
  28.381 -}
  28.382 -
  28.383 -asmlinkage int sys_clone(struct pt_regs regs)
  28.384 -{
  28.385 -    unsigned long clone_flags;
  28.386 -    unsigned long newsp;
  28.387 -
  28.388 -    clone_flags = regs.ebx;
  28.389 -    newsp = regs.ecx;
  28.390 -    if (!newsp)
  28.391 -        newsp = regs.esp;
  28.392 -    return do_fork(clone_flags, newsp, &regs, 0);
  28.393 -}
  28.394 -
  28.395 -/*
  28.396 - * This is trivial, and on the face of it looks like it
  28.397 - * could equally well be done in user mode.
  28.398 - *
  28.399 - * Not so, for quite unobvious reasons - register pressure.
  28.400 - * In user mode vfork() cannot have a stack frame, and if
  28.401 - * done by calling the "clone()" system call directly, you
  28.402 - * do not have enough call-clobbered registers to hold all
  28.403 - * the information you need.
  28.404 - */
  28.405 -asmlinkage int sys_vfork(struct pt_regs regs)
  28.406 -{
  28.407 -    return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, &regs, 0);
  28.408 -}
  28.409 -
  28.410 -/*
  28.411 - * sys_execve() executes a new program.
  28.412 - */
  28.413 -asmlinkage int sys_execve(struct pt_regs regs)
  28.414 -{
  28.415 -    int error;
  28.416 -    char * filename;
  28.417 -
  28.418 -    filename = getname((char *) regs.ebx);
  28.419 -    error = PTR_ERR(filename);
  28.420 -    if (IS_ERR(filename))
  28.421 -        goto out;
  28.422 -    error = do_execve(filename, (char **) regs.ecx, (char **) regs.edx, &regs);
  28.423 -    if (error == 0)
  28.424 -        current->ptrace &= ~PT_DTRACE;
  28.425 -    putname(filename);
  28.426 - out:
  28.427 -    return error;
  28.428 -}
  28.429 -
  28.430 -/*
  28.431 - * These bracket the sleeping functions..
  28.432 - */
  28.433 -extern void scheduling_functions_start_here(void);
  28.434 -extern void scheduling_functions_end_here(void);
  28.435 -#define first_sched	((unsigned long) scheduling_functions_start_here)
  28.436 -#define last_sched	((unsigned long) scheduling_functions_end_here)
  28.437 -
  28.438 -unsigned long get_wchan(struct task_struct *p)
  28.439 -{
  28.440 -    unsigned long ebp, esp, eip;
  28.441 -    unsigned long stack_page;
  28.442 -    int count = 0;
  28.443 -    if (!p || p == current || p->state == TASK_RUNNING)
  28.444 -        return 0;
  28.445 -    stack_page = (unsigned long)p;
  28.446 -    esp = p->thread.esp;
  28.447 -    if (!stack_page || esp < stack_page || esp > 8188+stack_page)
  28.448 -        return 0;
  28.449 -    /* include/asm-i386/system.h:switch_to() pushes ebp last. */
  28.450 -    ebp = *(unsigned long *) esp;
  28.451 -    do {
  28.452 -        if (ebp < stack_page || ebp > 8184+stack_page)
  28.453 -            return 0;
  28.454 -        eip = *(unsigned long *) (ebp+4);
  28.455 -        if (eip < first_sched || eip >= last_sched)
  28.456 -            return eip;
  28.457 -        ebp = *(unsigned long *) ebp;
  28.458 -    } while (count++ < 16);
  28.459 -    return 0;
  28.460 -}
  28.461 -#undef last_sched
  28.462 -#undef first_sched
    29.1 --- a/linux-2.4.26-xen-sparse/arch/xen/kernel/setup.c	Sat Aug 21 10:28:38 2004 +0000
    29.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.3 @@ -1,1189 +0,0 @@
    29.4 -/*
    29.5 - *  linux/arch/i386/kernel/setup.c
    29.6 - *
    29.7 - *  Copyright (C) 1995  Linus Torvalds
    29.8 - */
    29.9 -
   29.10 -/*
   29.11 - * This file handles the architecture-dependent parts of initialization
   29.12 - */
   29.13 -
   29.14 -#define __KERNEL_SYSCALLS__
   29.15 -static int errno;
   29.16 -#include <linux/errno.h>
   29.17 -#include <linux/sched.h>
   29.18 -#include <linux/kernel.h>
   29.19 -#include <linux/mm.h>
   29.20 -#include <linux/stddef.h>
   29.21 -#include <linux/unistd.h>
   29.22 -#include <linux/ptrace.h>
   29.23 -#include <linux/slab.h>
   29.24 -#include <linux/user.h>
   29.25 -#include <linux/a.out.h>
   29.26 -#include <linux/tty.h>
   29.27 -#include <linux/ioport.h>
   29.28 -#include <linux/delay.h>
   29.29 -#include <linux/config.h>
   29.30 -#include <linux/init.h>
   29.31 -#include <linux/apm_bios.h>
   29.32 -#ifdef CONFIG_BLK_DEV_RAM
   29.33 -#include <linux/blk.h>
   29.34 -#endif
   29.35 -#include <linux/highmem.h>
   29.36 -#include <linux/bootmem.h>
   29.37 -#include <linux/seq_file.h>
   29.38 -#include <linux/reboot.h>
   29.39 -#include <asm/processor.h>
   29.40 -#include <linux/console.h>
   29.41 -#include <linux/module.h>
   29.42 -#include <asm/mtrr.h>
   29.43 -#include <asm/uaccess.h>
   29.44 -#include <asm/system.h>
   29.45 -#include <asm/io.h>
   29.46 -#include <asm/smp.h>
   29.47 -#include <asm/msr.h>
   29.48 -#include <asm/desc.h>
   29.49 -#include <asm/dma.h>
   29.50 -#include <asm/mpspec.h>
   29.51 -#include <asm/mmu_context.h>
   29.52 -#include <asm/ctrl_if.h>
   29.53 -#include <asm/hypervisor.h>
   29.54 -#include <asm/hypervisor-ifs/dom0_ops.h>
   29.55 -#include <linux/netdevice.h>
   29.56 -#include <linux/rtnetlink.h>
   29.57 -#include <linux/tqueue.h>
   29.58 -#include <net/pkt_sched.h> /* dev_(de)activate */
   29.59 -
   29.60 -/*
   29.61 - * Point at the empty zero page to start with. We map the real shared_info
   29.62 - * page as soon as fixmap is up and running.
   29.63 - */
   29.64 -shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
   29.65 -
   29.66 -unsigned long *phys_to_machine_mapping, *pfn_to_mfn_frame_list;
   29.67 -
   29.68 -multicall_entry_t multicall_list[8];
   29.69 -int nr_multicall_ents = 0;
   29.70 -
   29.71 -/*
   29.72 - * Machine setup..
   29.73 - */
   29.74 -
   29.75 -char ignore_irq13;		/* set if exception 16 works */
   29.76 -struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
   29.77 -
   29.78 -unsigned long mmu_cr4_features;
   29.79 -
   29.80 -unsigned char * vgacon_mmap;
   29.81 -
   29.82 -/*
   29.83 - * Bus types ..
   29.84 - */
   29.85 -#ifdef CONFIG_EISA
   29.86 -int EISA_bus;
   29.87 -#endif
   29.88 -int MCA_bus;
   29.89 -
   29.90 -/* for MCA, but anyone else can use it if they want */
   29.91 -unsigned int machine_id;
   29.92 -unsigned int machine_submodel_id;
   29.93 -unsigned int BIOS_revision;
   29.94 -unsigned int mca_pentium_flag;
   29.95 -
   29.96 -/* For PCI or other memory-mapped resources */
   29.97 -unsigned long pci_mem_start = 0x10000000;
   29.98 -
   29.99 -/*
  29.100 - * Setup options
  29.101 - */
  29.102 -struct drive_info_struct { char dummy[32]; } drive_info;
  29.103 -struct screen_info screen_info;
  29.104 -struct apm_info apm_info;
  29.105 -struct sys_desc_table_struct {
  29.106 -    unsigned short length;
  29.107 -    unsigned char table[0];
  29.108 -};
  29.109 -
  29.110 -unsigned char aux_device_present;
  29.111 -
  29.112 -extern int root_mountflags;
  29.113 -extern char _text, _etext, _edata, _end;
  29.114 -
  29.115 -extern int blk_nohighio;
  29.116 -
  29.117 -int enable_acpi_smp_table;
  29.118 -
  29.119 -/* Raw start-of-day parameters from the hypervisor. */
  29.120 -union start_info_union start_info_union;
  29.121 -
  29.122 -#define COMMAND_LINE_SIZE 256
  29.123 -static char command_line[COMMAND_LINE_SIZE];
  29.124 -char saved_command_line[COMMAND_LINE_SIZE];
  29.125 -
  29.126 -/* parse_mem_cmdline()
  29.127 - * returns the value of the mem= boot param converted to pages or 0
  29.128 - */ 
  29.129 -static int __init parse_mem_cmdline (char ** cmdline_p)
  29.130 -{
  29.131 -    char c = ' ', *to = command_line, *from = saved_command_line;
  29.132 -    int len = 0;
  29.133 -    unsigned long long bytes;
  29.134 -    int mem_param = 0;
  29.135 -
  29.136 -    /* Save unparsed command line copy for /proc/cmdline */
  29.137 -    memcpy(saved_command_line, start_info.cmd_line, COMMAND_LINE_SIZE);
  29.138 -    saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
  29.139 -
  29.140 -    for (;;) {
  29.141 -        /*
  29.142 -         * "mem=nopentium" disables the 4MB page tables.
  29.143 -         * "mem=XXX[kKmM]" defines a memory region from HIGH_MEM
  29.144 -         * to <mem>, overriding the bios size.
  29.145 -         * "mem=XXX[KkmM]@XXX[KkmM]" defines a memory region from
  29.146 -         * <start> to <start>+<mem>, overriding the bios size.
  29.147 -         */
  29.148 -        if (c == ' ' && !memcmp(from, "mem=", 4)) {
  29.149 -            if (to != command_line)
  29.150 -                to--;
  29.151 -            if (!memcmp(from+4, "nopentium", 9)) {
  29.152 -                from += 9+4;
  29.153 -            } else if (!memcmp(from+4, "exactmap", 8)) {
  29.154 -                from += 8+4;
  29.155 -            } else {
  29.156 -                bytes = memparse(from+4, &from);
  29.157 -                mem_param = bytes>>PAGE_SHIFT;
  29.158 -		if (*from == '@')
  29.159 -                    (void)memparse(from+1, &from);
  29.160 -            }
  29.161 -        }
  29.162 -
  29.163 -        c = *(from++);
  29.164 -        if (!c)
  29.165 -            break;
  29.166 -        if (COMMAND_LINE_SIZE <= ++len)
  29.167 -            break;
  29.168 -        *(to++) = c;
  29.169 -    }
  29.170 -    *to = '\0';
  29.171 -    *cmdline_p = command_line;
  29.172 -
  29.173 -    return mem_param;
  29.174 -}
  29.175 -
  29.176 -/*
  29.177 - * Every exception-fixup table is sorted (i.e., kernel main table, and every
  29.178 - * module table. Some elements may be out of order if they reference text.init,
  29.179 - * for example. 
  29.180 - */
  29.181 -static void sort_exception_table(struct exception_table_entry *start,
  29.182 -                                 struct exception_table_entry *end)
  29.183 -{
  29.184 -    struct exception_table_entry *p, *q, tmp;
  29.185 -
  29.186 -    for ( p = start; p < end; p++ )
  29.187 -    {
  29.188 -        for ( q = p-1; q > start; q-- )
  29.189 -            if ( p->insn > q->insn )
  29.190 -                break;
  29.191 -        if ( ++q != p )
  29.192 -        {
  29.193 -            tmp = *p;
  29.194 -            memmove(q+1, q, (p-q)*sizeof(*p));
  29.195 -            *q = tmp;
  29.196 -        }
  29.197 -    }
  29.198 -}
  29.199 -
  29.200 -int xen_module_init(struct module *mod)
  29.201 -{
  29.202 -    sort_exception_table(mod->ex_table_start, mod->ex_table_end);
  29.203 -    return 0;
  29.204 -}
  29.205 -
  29.206 -void __init setup_arch(char **cmdline_p)
  29.207 -{
  29.208 -    int i,j;
  29.209 -    unsigned long bootmap_size, start_pfn, lmax_low_pfn;
  29.210 -    int mem_param;  /* user specified memory size in pages */
  29.211 -    int boot_pfn;   /* low pages available for bootmem */
  29.212 -
  29.213 -    extern void hypervisor_callback(void);
  29.214 -    extern void failsafe_callback(void);
  29.215 -
  29.216 -    extern unsigned long cpu0_pte_quicklist[];
  29.217 -    extern unsigned long cpu0_pgd_quicklist[];
  29.218 -
  29.219 -    extern const struct exception_table_entry __start___ex_table[];
  29.220 -    extern const struct exception_table_entry __stop___ex_table[];
  29.221 -
  29.222 -    extern char _stext;
  29.223 -
  29.224 -    /* Force a quick death if the kernel panics. */
  29.225 -    extern int panic_timeout;
  29.226 -    if ( panic_timeout == 0 )
  29.227 -        panic_timeout = 1;
  29.228 -
  29.229 -    /* Ensure that the kernel exception-fixup table is sorted. */
  29.230 -    sort_exception_table(__start___ex_table, __stop___ex_table);
  29.231 -
  29.232 -#ifndef CONFIG_HIGHIO
  29.233 -    blk_nohighio = 1;
  29.234 -#endif
  29.235 -
  29.236 -    HYPERVISOR_vm_assist(VMASST_CMD_enable,
  29.237 -                         VMASST_TYPE_4gb_segments);
  29.238 -        
  29.239 -    HYPERVISOR_set_callbacks(
  29.240 -        __KERNEL_CS, (unsigned long)hypervisor_callback,
  29.241 -        __KERNEL_CS, (unsigned long)failsafe_callback);
  29.242 -
  29.243 -    boot_cpu_data.pgd_quick = cpu0_pgd_quicklist;
  29.244 -    boot_cpu_data.pte_quick = cpu0_pte_quicklist;
  29.245 -
  29.246 -    ROOT_DEV = MKDEV(RAMDISK_MAJOR,0);
  29.247 -    memset(&drive_info, 0, sizeof(drive_info));
  29.248 -    memset(&screen_info, 0, sizeof(screen_info));
  29.249 -    
  29.250 -    /* This is drawn from a dump from vgacon:startup in standard Linux. */
  29.251 -    screen_info.orig_video_mode = 3; 
  29.252 -    screen_info.orig_video_isVGA = 1;
  29.253 -    screen_info.orig_video_lines = 25;
  29.254 -    screen_info.orig_video_cols = 80;
  29.255 -    screen_info.orig_video_ega_bx = 3;
  29.256 -    screen_info.orig_video_points = 16;
  29.257 -
  29.258 -    memset(&apm_info.bios, 0, sizeof(apm_info.bios));
  29.259 -    aux_device_present = 0; 
  29.260 -#ifdef CONFIG_BLK_DEV_RAM
  29.261 -    rd_image_start = 0;
  29.262 -    rd_prompt = 0;
  29.263 -    rd_doload = 0;
  29.264 -#endif
  29.265 -
  29.266 -    root_mountflags &= ~MS_RDONLY;
  29.267 -    init_mm.start_code = (unsigned long) &_text;
  29.268 -    init_mm.end_code = (unsigned long) &_etext;
  29.269 -    init_mm.end_data = (unsigned long) &_edata;
  29.270 -    init_mm.brk = (unsigned long) &_end;
  29.271 -
  29.272 -    /* The mem= kernel command line param overrides the detected amount
  29.273 -     * of memory.   For xenolinux, if this override is larger than detected
  29.274 -     * memory, then boot using only detected memory and make provisions to
  29.275 -     * use all of the override value.   The hypervisor can give this
  29.276 -     * domain more memory later on and it will be added to the free
  29.277 -     * lists at that time.   See claim_new_pages() in
  29.278 -     * arch/xen/drivers/balloon/balloon.c
  29.279 -     */
  29.280 -    mem_param = parse_mem_cmdline(cmdline_p);
  29.281 -    if (!mem_param) mem_param = start_info.nr_pages;
  29.282 -
  29.283 -#define PFN_UP(x)	(((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
  29.284 -#define PFN_DOWN(x)	((x) >> PAGE_SHIFT)
  29.285 -#define PFN_PHYS(x)	((x) << PAGE_SHIFT)
  29.286 -
  29.287 -/*
  29.288 - * 128MB for vmalloc(), iomap(), kmap(), and fixaddr mappings.
  29.289 - */
  29.290 -#define VMALLOC_RESERVE	(unsigned long)(128 << 20)
  29.291 -#define MAXMEM		(unsigned long)(HYPERVISOR_VIRT_START-PAGE_OFFSET-VMALLOC_RESERVE)
  29.292 -#define MAXMEM_PFN	PFN_DOWN(MAXMEM)
  29.293 -#define MAX_NONPAE_PFN	(1 << 20)
  29.294 -
  29.295 -    /*
  29.296 -     * Determine low and high memory ranges:
  29.297 -     */
  29.298 -    lmax_low_pfn = max_pfn = mem_param;
  29.299 -    if (lmax_low_pfn > MAXMEM_PFN) {
  29.300 -        lmax_low_pfn = MAXMEM_PFN;
  29.301 -#ifndef CONFIG_HIGHMEM
  29.302 -        /* Maximum memory usable is what is directly addressable */
  29.303 -        printk(KERN_WARNING "Warning only %ldMB will be used.\n",
  29.304 -               MAXMEM>>20);
  29.305 -        if (max_pfn > MAX_NONPAE_PFN)
  29.306 -            printk(KERN_WARNING "Use a PAE enabled kernel.\n");
  29.307 -        else
  29.308 -            printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");
  29.309 -#else /* !CONFIG_HIGHMEM */
  29.310 -#ifndef CONFIG_X86_PAE
  29.311 -        if (max_pfn > MAX_NONPAE_PFN) {
  29.312 -            max_pfn = MAX_NONPAE_PFN;
  29.313 -            printk(KERN_WARNING "Warning only 4GB will be used.\n");
  29.314 -            printk(KERN_WARNING "Use a PAE enabled kernel.\n");
  29.315 -        }
  29.316 -#endif /* !CONFIG_X86_PAE */
  29.317 -#endif /* !CONFIG_HIGHMEM */
  29.318 -    }
  29.319 -
  29.320 -#ifdef CONFIG_HIGHMEM
  29.321 -    highstart_pfn = highend_pfn = max_pfn;
  29.322 -    if (max_pfn > MAXMEM_PFN) {
  29.323 -        highstart_pfn = MAXMEM_PFN;
  29.324 -        printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
  29.325 -               pages_to_mb(highend_pfn - highstart_pfn));
  29.326 -    }
  29.327 -#endif
  29.328 -
  29.329 -    phys_to_machine_mapping = (unsigned long *)start_info.mfn_list;
  29.330 -    cur_pgd = init_mm.pgd = (pgd_t *)start_info.pt_base;
  29.331 -
  29.332 -    start_pfn = (__pa(start_info.pt_base) >> PAGE_SHIFT) + 
  29.333 -        start_info.nr_pt_frames;
  29.334 -
  29.335 -    /*
  29.336 -     * Initialize the boot-time allocator, and free up all RAM. Then reserve 
  29.337 -     * space for OS image, initrd, phys->machine table, bootstrap page table,
  29.338 -     * and the bootmem bitmap. 
  29.339 -     * NB. There is definitely enough room for the bootmem bitmap in the
  29.340 -     * bootstrap page table. We are guaranteed to get >=512kB unused 'padding'
  29.341 -     * for our own use after all bootstrap elements (see hypervisor-if.h).
  29.342 -     */
  29.343 -    boot_pfn = min((int)start_info.nr_pages,lmax_low_pfn);
  29.344 -    bootmap_size = init_bootmem(start_pfn,boot_pfn);
  29.345 -    free_bootmem(0, PFN_PHYS(boot_pfn));
  29.346 -    reserve_bootmem(__pa(&_stext), 
  29.347 -                    PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1 - 
  29.348 -                    __pa(&_stext));
  29.349 -
  29.350 -    /* init_bootmem() set the global max_low_pfn to boot_pfn.  Now max_low_pfn 
  29.351 -     * can be set to the override value.
  29.352 -     */
  29.353 -    max_low_pfn = lmax_low_pfn;
  29.354 -
  29.355 -
  29.356 -
  29.357 -#ifdef CONFIG_BLK_DEV_INITRD
  29.358 -    if ( start_info.mod_start != 0 )
  29.359 -    {
  29.360 -        if ( (__pa(start_info.mod_start) + start_info.mod_len) <= 
  29.361 -             (max_low_pfn << PAGE_SHIFT) )
  29.362 -        {
  29.363 -            initrd_start = start_info.mod_start;
  29.364 -            initrd_end   = initrd_start + start_info.mod_len;
  29.365 -            initrd_below_start_ok = 1;
  29.366 -        }
  29.367 -        else
  29.368 -        {
  29.369 -            printk(KERN_ERR "initrd extends beyond end of memory "
  29.370 -                   "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
  29.371 -                   __pa(start_info.mod_start) + start_info.mod_len,
  29.372 -                   max_low_pfn << PAGE_SHIFT);
  29.373 -            initrd_start = 0;
  29.374 -        }
  29.375 -    }
  29.376 -#endif
  29.377 -
  29.378 -    paging_init();
  29.379 -
  29.380 -    pfn_to_mfn_frame_list = alloc_bootmem_low_pages(PAGE_SIZE);
  29.381 -    for ( i=0, j=0; i < max_pfn; i+=(PAGE_SIZE/sizeof(unsigned long)), j++ )
  29.382 -    {	
  29.383 -        pfn_to_mfn_frame_list[j] = 
  29.384 -            virt_to_machine(&phys_to_machine_mapping[i]) >> PAGE_SHIFT;
  29.385 -    }
  29.386 -    HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list =
  29.387 -	virt_to_machine(pfn_to_mfn_frame_list) >> PAGE_SHIFT;
  29.388 -
  29.389 -    /* If we are a privileged guest OS then we should request IO privileges. */
  29.390 -    if ( start_info.flags & SIF_PRIVILEGED ) 
  29.391 -    {
  29.392 -        dom0_op_t op;
  29.393 -        op.cmd           = DOM0_IOPL;
  29.394 -        op.u.iopl.domain = DOMID_SELF;
  29.395 -        op.u.iopl.iopl   = 1;
  29.396 -        if( HYPERVISOR_dom0_op(&op) != 0 )
  29.397 -            panic("Unable to obtain IOPL, despite being SIF_PRIVILEGED");
  29.398 -        current->thread.io_pl = 1;
  29.399 -    }
  29.400 -
  29.401 -    if (start_info.flags & SIF_INITDOMAIN )
  29.402 -    {
  29.403 -        if( !(start_info.flags & SIF_PRIVILEGED) )
  29.404 -            panic("Xen granted us console access but not privileged status");
  29.405 -
  29.406 -#if defined(CONFIG_VT)
  29.407 -#if defined(CONFIG_VGA_CONSOLE)
  29.408 -        conswitchp = &vga_con;
  29.409 -#elif defined(CONFIG_DUMMY_CONSOLE)
  29.410 -        conswitchp = &dummy_con;
  29.411 -#endif
  29.412 -#endif
  29.413 -    }
  29.414 -}
  29.415 -
  29.416 -static int cachesize_override __initdata = -1;
  29.417 -static int __init cachesize_setup(char *str)
  29.418 -{
  29.419 -    get_option (&str, &cachesize_override);
  29.420 -    return 1;
  29.421 -}
  29.422 -__setup("cachesize=", cachesize_setup);
  29.423 -
  29.424 -static int __init highio_setup(char *str)
  29.425 -{
  29.426 -    printk("i386: disabling HIGHMEM block I/O\n");
  29.427 -    blk_nohighio = 1;
  29.428 -    return 1;
  29.429 -}
  29.430 -__setup("nohighio", highio_setup);
  29.431 -
  29.432 -static int __init get_model_name(struct cpuinfo_x86 *c)
  29.433 -{
  29.434 -    unsigned int *v;
  29.435 -    char *p, *q;
  29.436 -
  29.437 -    if (cpuid_eax(0x80000000) < 0x80000004)
  29.438 -        return 0;
  29.439 -
  29.440 -    v = (unsigned int *) c->x86_model_id;
  29.441 -    cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]);
  29.442 -    cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]);
  29.443 -    cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]);
  29.444 -    c->x86_model_id[48] = 0;
  29.445 -
  29.446 -    /* Intel chips right-justify this string for some dumb reason;
  29.447 -       undo that brain damage */
  29.448 -    p = q = &c->x86_model_id[0];
  29.449 -    while ( *p == ' ' )
  29.450 -        p++;
  29.451 -    if ( p != q ) {
  29.452 -        while ( *p )
  29.453 -            *q++ = *p++;
  29.454 -        while ( q <= &c->x86_model_id[48] )
  29.455 -            *q++ = '\0';	/* Zero-pad the rest */
  29.456 -    }
  29.457 -
  29.458 -    return 1;
  29.459 -}
  29.460 -
  29.461 -
  29.462 -static void __init display_cacheinfo(struct cpuinfo_x86 *c)
  29.463 -{
  29.464 -    unsigned int n, dummy, ecx, edx, l2size;
  29.465 -
  29.466 -    n = cpuid_eax(0x80000000);
  29.467 -
  29.468 -    if (n >= 0x80000005) {
  29.469 -        cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
  29.470 -        printk(KERN_INFO "CPU: L1 I Cache: %dK (%d bytes/line), D cache %dK (%d bytes/line)\n",
  29.471 -               edx>>24, edx&0xFF, ecx>>24, ecx&0xFF);
  29.472 -        c->x86_cache_size=(ecx>>24)+(edx>>24);	
  29.473 -    }
  29.474 -
  29.475 -    if (n < 0x80000006)	/* Some chips just has a large L1. */
  29.476 -        return;
  29.477 -
  29.478 -    ecx = cpuid_ecx(0x80000006);
  29.479 -    l2size = ecx >> 16;
  29.480 -
  29.481 -    /* AMD errata T13 (order #21922) */
  29.482 -    if ((c->x86_vendor == X86_VENDOR_AMD) && (c->x86 == 6)) {
  29.483 -        if (c->x86_model == 3 && c->x86_mask == 0)	/* Duron Rev A0 */
  29.484 -            l2size = 64;
  29.485 -        if (c->x86_model == 4 &&
  29.486 -            (c->x86_mask==0 || c->x86_mask==1))	/* Tbird rev A1/A2 */
  29.487 -            l2size = 256;
  29.488 -    }
  29.489 -
  29.490 -    /* Intel PIII Tualatin. This comes in two flavours.
  29.491 -     * One has 256kb of cache, the other 512. We have no way
  29.492 -     * to determine which, so we use a boottime override
  29.493 -     * for the 512kb model, and assume 256 otherwise.
  29.494 -     */
  29.495 -    if ((c->x86_vendor == X86_VENDOR_INTEL) && (c->x86 == 6) &&
  29.496 -        (c->x86_model == 11) && (l2size == 0))
  29.497 -        l2size = 256;
  29.498 -
  29.499 -    if (c->x86_vendor == X86_VENDOR_CENTAUR) {
  29.500 -	/* VIA C3 CPUs (670-68F) need further shifting. */
  29.501 -	if ((c->x86 == 6) &&
  29.502 -	    ((c->x86_model == 7) || (c->x86_model == 8))) {
  29.503 -		l2size >>= 8;
  29.504 -	}
  29.505 -
  29.506 -	/* VIA also screwed up Nehemiah stepping 1, and made
  29.507 -	   it return '65KB' instead of '64KB'
  29.508 -	   - Note, it seems this may only be in engineering samples. */
  29.509 -	if ((c->x86==6) && (c->x86_model==9) &&
  29.510 -	    (c->x86_mask==1) && (l2size==65))
  29.511 -		l2size -= 1;
  29.512 -    }
  29.513 -
  29.514 -    /* Allow user to override all this if necessary. */
  29.515 -    if (cachesize_override != -1)
  29.516 -        l2size = cachesize_override;
  29.517 -
  29.518 -    if ( l2size == 0 )
  29.519 -        return;		/* Again, no L2 cache is possible */
  29.520 -
  29.521 -    c->x86_cache_size = l2size;
  29.522 -
  29.523 -    printk(KERN_INFO "CPU: L2 Cache: %dK (%d bytes/line)\n",
  29.524 -           l2size, ecx & 0xFF);
  29.525 -}
  29.526 -
  29.527 -static void __init init_c3(struct cpuinfo_x86 *c)
  29.528 -{
  29.529 -    /* Test for Centaur Extended Feature Flags presence */
  29.530 -    if (cpuid_eax(0xC0000000) >= 0xC0000001) {
  29.531 -        /* store Centaur Extended Feature Flags as
  29.532 -         * word 5 of the CPU capability bit array
  29.533 -         */
  29.534 -        c->x86_capability[5] = cpuid_edx(0xC0000001);
  29.535 -    }
  29.536 -   
  29.537 -    switch (c->x86_model) {
  29.538 -    case 9:	/* Nehemiah */
  29.539 -    default:
  29.540 -        get_model_name(c);
  29.541 -        display_cacheinfo(c);
  29.542 -        break;
  29.543 -    }
  29.544 -}
  29.545 -
  29.546 -static void __init init_centaur(struct cpuinfo_x86 *c)
  29.547 -{
  29.548 -    /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
  29.549 -       3DNow is IDd by bit 31 in extended CPUID (1*3231) anyway */
  29.550 -    clear_bit(0*32+31, &c->x86_capability);
  29.551 -  
  29.552 -    switch (c->x86) {
  29.553 -    case 6:
  29.554 -        init_c3(c);
  29.555 -        break;
  29.556 -    default:
  29.557 -        panic("Unsupported Centaur CPU (%i)\n", c->x86);
  29.558 -    }
  29.559 -}
  29.560 -
  29.561 -static int __init init_amd(struct cpuinfo_x86 *c)
  29.562 -{
  29.563 -    int r;
  29.564 -
  29.565 -    /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
  29.566 -       3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
  29.567 -    clear_bit(0*32+31, &c->x86_capability);
  29.568 -	
  29.569 -    r = get_model_name(c);
  29.570 -
  29.571 -    switch(c->x86)
  29.572 -    {
  29.573 -    case 5: /* We don't like AMD K6 */
  29.574 -        panic("Unsupported AMD processor\n");
  29.575 -    case 6:	/* An Athlon/Duron. We can trust the BIOS probably */
  29.576 -        break;
  29.577 -    }
  29.578 -
  29.579 -    display_cacheinfo(c);
  29.580 -    return r;
  29.581 -}
  29.582 -
  29.583 -
  29.584 -static void __init init_intel(struct cpuinfo_x86 *c)
  29.585 -{
  29.586 -    char *p = NULL;
  29.587 -    unsigned int l1i = 0, l1d = 0, l2 = 0, l3 = 0; /* Cache sizes */
  29.588 -
  29.589 -    if (c->cpuid_level > 1) {
  29.590 -        /* supports eax=2  call */
  29.591 -        int i, j, n;
  29.592 -        int regs[4];
  29.593 -        unsigned char *dp = (unsigned char *)regs;
  29.594 -
  29.595 -        /* Number of times to iterate */
  29.596 -        n = cpuid_eax(2) & 0xFF;
  29.597 -
  29.598 -        for ( i = 0 ; i < n ; i++ ) {
  29.599 -            cpuid(2, &regs[0], &regs[1], &regs[2], &regs[3]);
  29.600 -			
  29.601 -            /* If bit 31 is set, this is an unknown format */
  29.602 -            for ( j = 0 ; j < 3 ; j++ ) {
  29.603 -                if ( regs[j] < 0 ) regs[j] = 0;
  29.604 -            }
  29.605 -
  29.606 -            /* Byte 0 is level count, not a descriptor */
  29.607 -            for ( j = 1 ; j < 16 ; j++ ) {
  29.608 -                unsigned char des = dp[j];
  29.609 -                unsigned char dl, dh;
  29.610 -                unsigned int cs;
  29.611 -
  29.612 -                dh = des >> 4;
  29.613 -                dl = des & 0x0F;
  29.614 -
  29.615 -				/* Black magic... */
  29.616 -
  29.617 -                switch ( dh )
  29.618 -                {
  29.619 -                case 0:
  29.620 -                    switch ( dl ) {
  29.621 -                    case 6:
  29.622 -                        /* L1 I cache */
  29.623 -                        l1i += 8;
  29.624 -                        break;
  29.625 -                    case 8:
  29.626 -                        /* L1 I cache */
  29.627 -                        l1i += 16;
  29.628 -                        break;
  29.629 -                    case 10:
  29.630 -                        /* L1 D cache */
  29.631 -                        l1d += 8;
  29.632 -                        break;
  29.633 -                    case 12:
  29.634 -                        /* L1 D cache */
  29.635 -                        l1d += 16;
  29.636 -                        break;
  29.637 -                    default:;
  29.638 -                        /* TLB, or unknown */
  29.639 -                    }
  29.640 -                    break;
  29.641 -                case 2:
  29.642 -                    if ( dl ) {
  29.643 -                        /* L3 cache */
  29.644 -                        cs = (dl-1) << 9;
  29.645 -                        l3 += cs;
  29.646 -                    }
  29.647 -                    break;
  29.648 -                case 4:
  29.649 -                    if ( c->x86 > 6 && dl ) {
  29.650 -                        /* P4 family */
  29.651 -                        /* L3 cache */
  29.652 -                        cs = 128 << (dl-1);
  29.653 -                        l3 += cs;
  29.654 -                        break;
  29.655 -                    }
  29.656 -                    /* else same as 8 - fall through */
  29.657 -                case 8:
  29.658 -                    if ( dl ) {
  29.659 -                        /* L2 cache */
  29.660 -                        cs = 128 << (dl-1);
  29.661 -                        l2 += cs;
  29.662 -                    }
  29.663 -                    break;
  29.664 -                case 6:
  29.665 -                    if (dl > 5) {
  29.666 -                        /* L1 D cache */
  29.667 -                        cs = 8<<(dl-6);
  29.668 -                        l1d += cs;
  29.669 -                    }
  29.670 -                    break;
  29.671 -                case 7:
  29.672 -                    if ( dl >= 8 ) 
  29.673 -                    {
  29.674 -                        /* L2 cache */
  29.675 -                        cs = 64<<(dl-8);
  29.676 -                        l2 += cs;
  29.677 -                    } else {
  29.678 -                        /* L0 I cache, count as L1 */
  29.679 -                        cs = dl ? (16 << (dl-1)) : 12;
  29.680 -                        l1i += cs;
  29.681 -                    }
  29.682 -                    break;
  29.683 -                default:
  29.684 -                    /* TLB, or something else we don't know about */
  29.685 -                    break;
  29.686 -                }
  29.687 -            }
  29.688 -        }
  29.689 -        if ( l1i || l1d )
  29.690 -            printk(KERN_INFO "CPU: L1 I cache: %dK, L1 D cache: %dK\n",
  29.691 -                   l1i, l1d);
  29.692 -        if ( l2 )
  29.693 -            printk(KERN_INFO "CPU: L2 cache: %dK\n", l2);
  29.694 -        if ( l3 )
  29.695 -            printk(KERN_INFO "CPU: L3 cache: %dK\n", l3);
  29.696 -
  29.697 -        /*
  29.698 -         * This assumes the L3 cache is shared; it typically lives in
  29.699 -         * the northbridge.  The L1 caches are included by the L2
  29.700 -         * cache, and so should not be included for the purpose of
  29.701 -         * SMP switching weights.
  29.702 -         */
  29.703 -        c->x86_cache_size = l2 ? l2 : (l1i+l1d);
  29.704 -    }
  29.705 -
  29.706 -    /* SEP CPUID bug: Pentium Pro reports SEP but doesn't have it */
  29.707 -    if ( c->x86 == 6 && c->x86_model < 3 && c->x86_mask < 3 )
  29.708 -        clear_bit(X86_FEATURE_SEP, &c->x86_capability);
  29.709 -	
  29.710 -    /* Names for the Pentium II/Celeron processors 
  29.711 -       detectable only by also checking the cache size.
  29.712 -       Dixon is NOT a Celeron. */
  29.713 -    if (c->x86 == 6) {
  29.714 -        switch (c->x86_model) {
  29.715 -        case 5:
  29.716 -            if (l2 == 0)
  29.717 -                p = "Celeron (Covington)";
  29.718 -            if (l2 == 256)
  29.719 -                p = "Mobile Pentium II (Dixon)";
  29.720 -            break;
  29.721 -			
  29.722 -        case 6:
  29.723 -            if (l2 == 128)
  29.724 -                p = "Celeron (Mendocino)";
  29.725 -            break;
  29.726 -			
  29.727 -        case 8:
  29.728 -            if (l2 == 128)
  29.729 -                p = "Celeron (Coppermine)";
  29.730 -            break;
  29.731 -        }
  29.732 -    }
  29.733 -
  29.734 -    if ( p )
  29.735 -        strcpy(c->x86_model_id, p);
  29.736 -}
  29.737 -
  29.738 -void __init get_cpu_vendor(struct cpuinfo_x86 *c)
  29.739 -{
  29.740 -    char *v = c->x86_vendor_id;
  29.741 -
  29.742 -    if (!strcmp(v, "GenuineIntel"))
  29.743 -        c->x86_vendor = X86_VENDOR_INTEL;
  29.744 -    else if (!strcmp(v, "AuthenticAMD"))
  29.745 -        c->x86_vendor = X86_VENDOR_AMD;
  29.746 -    else if (!strcmp(v, "CentaurHauls"))
  29.747 -        c->x86_vendor = X86_VENDOR_CENTAUR;
  29.748 -    else
  29.749 -        c->x86_vendor = X86_VENDOR_UNKNOWN;
  29.750 -}
  29.751 -
  29.752 -struct cpu_model_info {
  29.753 -    int vendor;
  29.754 -    int family;
  29.755 -    char *model_names[16];
  29.756 -};
  29.757 -
  29.758 -/* Naming convention should be: <Name> [(<Codename>)] */
  29.759 -/* This table only is used unless init_<vendor>() below doesn't set it; */
  29.760 -/* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */
  29.761 -static struct cpu_model_info cpu_models[] __initdata = {
  29.762 -    { X86_VENDOR_INTEL,	6,
  29.763 -      { "Pentium Pro A-step", "Pentium Pro", NULL, "Pentium II (Klamath)", 
  29.764 -        NULL, "Pentium II (Deschutes)", "Mobile Pentium II",
  29.765 -        "Pentium III (Katmai)", "Pentium III (Coppermine)", NULL,
  29.766 -        "Pentium III (Cascades)", NULL, NULL, NULL, NULL }},
  29.767 -    { X86_VENDOR_AMD,	6, /* Is this this really necessary?? */
  29.768 -      { "Athlon", "Athlon",
  29.769 -        "Athlon", NULL, "Athlon", NULL,
  29.770 -        NULL, NULL, NULL,
  29.771 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL }}
  29.772 -};
  29.773 -
  29.774 -/* Look up CPU names by table lookup. */
  29.775 -static char __init *table_lookup_model(struct cpuinfo_x86 *c)
  29.776 -{
  29.777 -    struct cpu_model_info *info = cpu_models;
  29.778 -    int i;
  29.779 -
  29.780 -    if ( c->x86_model >= 16 )
  29.781 -        return NULL;	/* Range check */
  29.782 -
  29.783 -    for ( i = 0 ; i < sizeof(cpu_models)/sizeof(struct cpu_model_info) ; i++ ) {
  29.784 -        if ( info->vendor == c->x86_vendor &&
  29.785 -             info->family == c->x86 ) {
  29.786 -            return info->model_names[c->x86_model];
  29.787 -        }
  29.788 -        info++;
  29.789 -    }
  29.790 -    return NULL;		/* Not found */
  29.791 -}
  29.792 -
  29.793 -
  29.794 -
  29.795 -/* Standard macro to see if a specific flag is changeable */
  29.796 -static inline int flag_is_changeable_p(u32 flag)
  29.797 -{
  29.798 -    u32 f1, f2;
  29.799 -
  29.800 -    asm("pushfl\n\t"
  29.801 -        "pushfl\n\t"
  29.802 -        "popl %0\n\t"
  29.803 -        "movl %0,%1\n\t"
  29.804 -        "xorl %2,%0\n\t"
  29.805 -        "pushl %0\n\t"
  29.806 -        "popfl\n\t"
  29.807 -        "pushfl\n\t"
  29.808 -        "popl %0\n\t"
  29.809 -        "popfl\n\t"
  29.810 -        : "=&r" (f1), "=&r" (f2)
  29.811 -        : "ir" (flag));
  29.812 -
  29.813 -    return ((f1^f2) & flag) != 0;
  29.814 -}
  29.815 -
  29.816 -
  29.817 -/* Probe for the CPUID instruction */
  29.818 -static int __init have_cpuid_p(void)
  29.819 -{
  29.820 -    return flag_is_changeable_p(X86_EFLAGS_ID);
  29.821 -}
  29.822 -
  29.823 -
  29.824 -
  29.825 -#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
  29.826 -unsigned char eddnr;
  29.827 -struct edd_info edd[EDDMAXNR];
  29.828 -unsigned int edd_disk80_sig;
  29.829 -/**
  29.830 - * copy_edd() - Copy the BIOS EDD information
  29.831 - *              from empty_zero_page into a safe place.
  29.832 - *
  29.833 - */
  29.834 -static inline void copy_edd(void)
  29.835 -{
  29.836 -     eddnr = EDD_NR;
  29.837 -     memcpy(edd, EDD_BUF, sizeof(edd));
  29.838 -     edd_disk80_sig = DISK80_SIGNATURE_BUFFER;
  29.839 -}
  29.840 -#else
  29.841 -static inline void copy_edd(void) {}
  29.842 -#endif
  29.843 -
  29.844 -/*
  29.845 - * This does the hard work of actually picking apart the CPU stuff...
  29.846 - */
  29.847 -void __init identify_cpu(struct cpuinfo_x86 *c)
  29.848 -{
  29.849 -    int junk, i;
  29.850 -    u32 xlvl, tfms;
  29.851 -
  29.852 -    c->loops_per_jiffy = loops_per_jiffy;
  29.853 -    c->x86_cache_size = -1;
  29.854 -    c->x86_vendor = X86_VENDOR_UNKNOWN;
  29.855 -    c->cpuid_level = -1;	/* CPUID not detected */
  29.856 -    c->x86_model = c->x86_mask = 0;	/* So far unknown... */
  29.857 -    c->x86_vendor_id[0] = '\0'; /* Unset */
  29.858 -    c->x86_model_id[0] = '\0';  /* Unset */
  29.859 -    memset(&c->x86_capability, 0, sizeof c->x86_capability);
  29.860 -    c->hard_math = 1;
  29.861 -
  29.862 -    if ( !have_cpuid_p() ) {
  29.863 -        panic("Processor must support CPUID\n");
  29.864 -    } else {
  29.865 -        /* CPU does have CPUID */
  29.866 -
  29.867 -        /* Get vendor name */
  29.868 -        cpuid(0x00000000, &c->cpuid_level,
  29.869 -              (int *)&c->x86_vendor_id[0],
  29.870 -              (int *)&c->x86_vendor_id[8],
  29.871 -              (int *)&c->x86_vendor_id[4]);
  29.872 -		
  29.873 -        get_cpu_vendor(c);
  29.874 -        /* Initialize the standard set of capabilities */
  29.875 -        /* Note that the vendor-specific code below might override */
  29.876 -
  29.877 -        /* Intel-defined flags: level 0x00000001 */
  29.878 -        if ( c->cpuid_level >= 0x00000001 ) {
  29.879 -                        u32 capability, excap;
  29.880 -                        cpuid(0x00000001, &tfms, &junk, &excap, &capability);
  29.881 -                        c->x86_capability[0] = capability;
  29.882 -                        c->x86_capability[4] = excap;
  29.883 -                        c->x86 = (tfms >> 8) & 15;
  29.884 -                        c->x86_model = (tfms >> 4) & 15;
  29.885 -                        if (c->x86 == 0xf) {
  29.886 -                                c->x86 += (tfms >> 20) & 0xff;
  29.887 -                                c->x86_model += ((tfms >> 16) & 0xF) << 4;
  29.888 -                        }
  29.889 -                        c->x86_mask = tfms & 15;
  29.890 -        } else {
  29.891 -            /* Have CPUID level 0 only - unheard of */
  29.892 -            c->x86 = 4;
  29.893 -        }
  29.894 -
  29.895 -        /* AMD-defined flags: level 0x80000001 */
  29.896 -        xlvl = cpuid_eax(0x80000000);
  29.897 -        if ( (xlvl & 0xffff0000) == 0x80000000 ) {
  29.898 -            if ( xlvl >= 0x80000001 )
  29.899 -                c->x86_capability[1] = cpuid_edx(0x80000001);
  29.900 -            if ( xlvl >= 0x80000004 )
  29.901 -                get_model_name(c); /* Default name */
  29.902 -        }
  29.903 -
  29.904 -        /* Transmeta-defined flags: level 0x80860001 */
  29.905 -        xlvl = cpuid_eax(0x80860000);
  29.906 -        if ( (xlvl & 0xffff0000) == 0x80860000 ) {
  29.907 -            if (  xlvl >= 0x80860001 )
  29.908 -                c->x86_capability[2] = cpuid_edx(0x80860001);
  29.909 -        }
  29.910 -    }
  29.911 -
  29.912 -    printk(KERN_DEBUG "CPU: Before vendor init, caps: %08x %08x %08x, vendor = %d\n",
  29.913 -           c->x86_capability[0],
  29.914 -           c->x86_capability[1],
  29.915 -           c->x86_capability[2],
  29.916 -           c->x86_vendor);
  29.917 -
  29.918 -    /*
  29.919 -     * Vendor-specific initialization.  In this section we
  29.920 -     * canonicalize the feature flags, meaning if there are
  29.921 -     * features a certain CPU supports which CPUID doesn't
  29.922 -     * tell us, CPUID claiming incorrect flags, or other bugs,
  29.923 -     * we handle them here.
  29.924 -     *
  29.925 -     * At the end of this section, c->x86_capability better
  29.926 -     * indicate the features this CPU genuinely supports!
  29.927 -     */
  29.928 -    switch ( c->x86_vendor ) {
  29.929 -    case X86_VENDOR_AMD:
  29.930 -        init_amd(c);
  29.931 -        break;
  29.932 -
  29.933 -    case X86_VENDOR_INTEL:
  29.934 -        init_intel(c);
  29.935 -        break;
  29.936 -
  29.937 -    case X86_VENDOR_CENTAUR:
  29.938 -        init_centaur(c);
  29.939 -        break;
  29.940 -        
  29.941 -    default:
  29.942 -        printk("Unsupported CPU vendor (%d) -- please report!\n",
  29.943 -               c->x86_vendor);
  29.944 -    }
  29.945 -	
  29.946 -    printk(KERN_DEBUG "CPU: After vendor init, caps: %08x %08x %08x %08x\n",
  29.947 -           c->x86_capability[0],
  29.948 -           c->x86_capability[1],
  29.949 -           c->x86_capability[2],
  29.950 -           c->x86_capability[3]);
  29.951 -
  29.952 -
  29.953 -    /* If the model name is still unset, do table lookup. */
  29.954 -    if ( !c->x86_model_id[0] ) {
  29.955 -        char *p;
  29.956 -        p = table_lookup_model(c);
  29.957 -        if ( p )
  29.958 -            strcpy(c->x86_model_id, p);
  29.959 -        else
  29.960 -            /* Last resort... */
  29.961 -            sprintf(c->x86_model_id, "%02x/%02x",
  29.962 -                    c->x86_vendor, c->x86_model);
  29.963 -    }
  29.964 -
  29.965 -    /* Now the feature flags better reflect actual CPU features! */
  29.966 -
  29.967 -    printk(KERN_DEBUG "CPU:     After generic, caps: %08x %08x %08x %08x\n",
  29.968 -           c->x86_capability[0],
  29.969 -           c->x86_capability[1],
  29.970 -           c->x86_capability[2],
  29.971 -           c->x86_capability[3]);
  29.972 -
  29.973 -    /*
  29.974 -     * On SMP, boot_cpu_data holds the common feature set between
  29.975 -     * all CPUs; so make sure that we indicate which features are
  29.976 -     * common between the CPUs.  The first time this routine gets
  29.977 -     * executed, c == &boot_cpu_data.
  29.978 -     */
  29.979 -    if ( c != &boot_cpu_data ) {
  29.980 -        /* AND the already accumulated flags with these */
  29.981 -        for ( i = 0 ; i < NCAPINTS ; i++ )
  29.982 -            boot_cpu_data.x86_capability[i] &= c->x86_capability[i];
  29.983 -    }
  29.984 -
  29.985 -    printk(KERN_DEBUG "CPU:             Common caps: %08x %08x %08x %08x\n",
  29.986 -           boot_cpu_data.x86_capability[0],
  29.987 -           boot_cpu_data.x86_capability[1],
  29.988 -           boot_cpu_data.x86_capability[2],
  29.989 -           boot_cpu_data.x86_capability[3]);
  29.990 -}
  29.991 -
  29.992 -
  29.993 -/* These need to match <asm/processor.h> */
  29.994 -static char *cpu_vendor_names[] __initdata = {
  29.995 -    "Intel", "Cyrix", "AMD", "UMC", "NexGen", "Centaur", "Rise", "Transmeta" };
  29.996 -
  29.997 -
  29.998 -void __init print_cpu_info(struct cpuinfo_x86 *c)
  29.999 -{
 29.1000 -    char *vendor = NULL;
 29.1001 -
 29.1002 -    if (c->x86_vendor < sizeof(cpu_vendor_names)/sizeof(char *))
 29.1003 -        vendor = cpu_vendor_names[c->x86_vendor];
 29.1004 -    else if (c->cpuid_level >= 0)
 29.1005 -        vendor = c->x86_vendor_id;
 29.1006 -
 29.1007 -    if (vendor && strncmp(c->x86_model_id, vendor, strlen(vendor)))
 29.1008 -        printk("%s ", vendor);
 29.1009 -
 29.1010 -    if (!c->x86_model_id[0])
 29.1011 -        printk("%d86", c->x86);
 29.1012 -    else
 29.1013 -        printk("%s", c->x86_model_id);
 29.1014 -
 29.1015 -    if (c->x86_mask || c->cpuid_level >= 0) 
 29.1016 -        printk(" stepping %02x\n", c->x86_mask);
 29.1017 -    else
 29.1018 -        printk("\n");
 29.1019 -}
 29.1020 -
 29.1021 -/*
 29.1022 - *	Get CPU information for use by the procfs.
 29.1023 - */
 29.1024 -static int show_cpuinfo(struct seq_file *m, void *v)
 29.1025 -{
 29.1026 -    /* 
 29.1027 -     * These flag bits must match the definitions in <asm/cpufeature.h>.
 29.1028 -     * NULL means this bit is undefined or reserved; either way it doesn't
 29.1029 -     * have meaning as far as Linux is concerned.  Note that it's important
 29.1030 -     * to realize there is a difference between this table and CPUID -- if
 29.1031 -     * applications want to get the raw CPUID data, they should access
 29.1032 -     * /dev/cpu/<cpu_nr>/cpuid instead.
 29.1033 -	 */
 29.1034 -    static char *x86_cap_flags[] = {
 29.1035 -        /* Intel-defined */
 29.1036 -        "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce",
 29.1037 -        "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov",
 29.1038 -        "pat", "pse36", "pn", "clflush", NULL, "dts", "acpi", "mmx",
 29.1039 -        "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", "pbe",
 29.1040 -
 29.1041 -        /* AMD-defined */
 29.1042 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 29.1043 -        NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL,
 29.1044 -        NULL, NULL, NULL, "mp", NULL, NULL, "mmxext", NULL,
 29.1045 -        NULL, NULL, NULL, NULL, NULL, "lm", "3dnowext", "3dnow",
 29.1046 -
 29.1047 -        /* Transmeta-defined */
 29.1048 -        "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL,
 29.1049 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 29.1050 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 29.1051 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 29.1052 -
 29.1053 -        /* Other (Linux-defined) */
 29.1054 -        "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", 
 29.1055 -	NULL, NULL, NULL, NULL,
 29.1056 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 29.1057 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 29.1058 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 29.1059 -
 29.1060 -        /* Intel-defined (#2) */
 29.1061 -        "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "tm2",
 29.1062 -        "est", NULL, "cid", NULL, NULL, NULL, NULL, NULL,
 29.1063 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 29.1064 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 29.1065 -
 29.1066 -        /* VIA/Cyrix/Centaur-defined */
 29.1067 -        NULL, NULL, "xstore", NULL, NULL, NULL, NULL, NULL,
 29.1068 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 29.1069 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 29.1070 -        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 29.1071 -
 29.1072 -    };
 29.1073 -    struct cpuinfo_x86 *c = v;
 29.1074 -    int i, n = c - cpu_data;
 29.1075 -    int fpu_exception;
 29.1076 -
 29.1077 -#ifdef CONFIG_SMP
 29.1078 -    if (!(cpu_online_map & (1<<n)))
 29.1079 -        return 0;
 29.1080 -#endif
 29.1081 -    seq_printf(m, "processor\t: %d\n"
 29.1082 -               "vendor_id\t: %s\n"
 29.1083 -               "cpu family\t: %d\n"
 29.1084 -               "model\t\t: %d\n"
 29.1085 -               "model name\t: %s\n",
 29.1086 -               n,
 29.1087 -               c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown",
 29.1088 -               c->x86,
 29.1089 -               c->x86_model,
 29.1090 -               c->x86_model_id[0] ? c->x86_model_id : "unknown");
 29.1091 -
 29.1092 -    if (c->x86_mask || c->cpuid_level >= 0)
 29.1093 -        seq_printf(m, "stepping\t: %d\n", c->x86_mask);
 29.1094 -    else
 29.1095 -        seq_printf(m, "stepping\t: unknown\n");
 29.1096 -
 29.1097 -    if ( test_bit(X86_FEATURE_TSC, &c->x86_capability) ) {
 29.1098 -        seq_printf(m, "cpu MHz\t\t: %lu.%03lu\n",
 29.1099 -                   cpu_khz / 1000, (cpu_khz % 1000));
 29.1100 -    }
 29.1101 -
 29.1102 -    /* Cache size */
 29.1103 -    if (c->x86_cache_size >= 0)
 29.1104 -        seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
 29.1105 -	
 29.1106 -	/* We use exception 16 if we have hardware math and we've either seen it or the CPU claims it is internal */
 29.1107 -    fpu_exception = c->hard_math && (ignore_irq13 || cpu_has_fpu);
 29.1108 -    seq_printf(m, "fdiv_bug\t: %s\n"
 29.1109 -               "hlt_bug\t\t: %s\n"
 29.1110 -               "f00f_bug\t: %s\n"
 29.1111 -               "coma_bug\t: %s\n"
 29.1112 -               "fpu\t\t: %s\n"
 29.1113 -               "fpu_exception\t: %s\n"
 29.1114 -               "cpuid level\t: %d\n"
 29.1115 -               "wp\t\t: %s\n"
 29.1116 -               "flags\t\t:",
 29.1117 -               c->fdiv_bug ? "yes" : "no",
 29.1118 -               c->hlt_works_ok ? "no" : "yes",
 29.1119 -               c->f00f_bug ? "yes" : "no",
 29.1120 -               c->coma_bug ? "yes" : "no",
 29.1121 -               c->hard_math ? "yes" : "no",
 29.1122 -               fpu_exception ? "yes" : "no",
 29.1123 -               c->cpuid_level,
 29.1124 -               c->wp_works_ok ? "yes" : "no");
 29.1125 -
 29.1126 -    for ( i = 0 ; i < 32*NCAPINTS ; i++ )
 29.1127 -        if ( test_bit(i, &c->x86_capability) &&
 29.1128 -             x86_cap_flags[i] != NULL )
 29.1129 -            seq_printf(m, " %s", x86_cap_flags[i]);
 29.1130 -
 29.1131 -    seq_printf(m, "\nbogomips\t: %lu.%02lu\n\n",
 29.1132 -               c->loops_per_jiffy/(500000/HZ),
 29.1133 -               (c->loops_per_jiffy/(5000/HZ)) % 100);
 29.1134 -    return 0;
 29.1135 -}
 29.1136 -
 29.1137 -static void *c_start(struct seq_file *m, loff_t *pos)
 29.1138 -{
 29.1139 -    return *pos < NR_CPUS ? cpu_data + *pos : NULL;
 29.1140 -}
 29.1141 -static void *c_next(struct seq_file *m, void *v, loff_t *pos)
 29.1142 -{
 29.1143 -    ++*pos;
 29.1144 -    return c_start(m, pos);
 29.1145 -}
 29.1146 -static void c_stop(struct seq_file *m, void *v)
 29.1147 -{
 29.1148 -}
 29.1149 -struct seq_operations cpuinfo_op = {
 29.1150 -    start:	c_start,
 29.1151 -    next:	c_next,
 29.1152 -    stop:	c_stop,
 29.1153 -    show:	show_cpuinfo,
 29.1154 -};
 29.1155 -
 29.1156 -unsigned long cpu_initialized __initdata = 0;
 29.1157 -
 29.1158 -/*
 29.1159 - * cpu_init() initializes state that is per-CPU. Some data is already
 29.1160 - * initialized (naturally) in the bootstrap process, such as the GDT
 29.1161 - * and IDT. We reload them nevertheless, this function acts as a
 29.1162 - * 'CPU state barrier', nothing should get across.
 29.1163 - */
 29.1164 -void __init cpu_init (void)
 29.1165 -{
 29.1166 -    int nr = smp_processor_id();
 29.1167 -
 29.1168 -    if (test_and_set_bit(nr, &cpu_initialized)) {
 29.1169 -        printk(KERN_WARNING "CPU#%d already initialized!\n", nr);
 29.1170 -        for (;;) __sti();
 29.1171 -    }
 29.1172 -    printk(KERN_INFO "Initializing CPU#%d\n", nr);
 29.1173 -
 29.1174 -    /*
 29.1175 -     * set up and load the per-CPU TSS and LDT
 29.1176 -     */
 29.1177 -    atomic_inc(&init_mm.mm_count);
 29.1178 -    current->active_mm = &init_mm;
 29.1179 -    if(current->mm)
 29.1180 -        BUG();
 29.1181 -    enter_lazy_tlb(&init_mm, current, nr);
 29.1182 -
 29.1183 -    HYPERVISOR_stack_switch(__KERNEL_DS, current->thread.esp0);
 29.1184 -
 29.1185 -    load_LDT(&init_mm.context);
 29.1186 -    flush_page_update_queue();
 29.1187 -
 29.1188 -    /* Force FPU initialization. */
 29.1189 -    current->flags &= ~PF_USEDFPU;
 29.1190 -    current->used_math = 0;
 29.1191 -    stts();
 29.1192 -}
    30.1 --- a/linux-2.4.26-xen-sparse/arch/xen/kernel/signal.c	Sat Aug 21 10:28:38 2004 +0000
    30.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.3 @@ -1,717 +0,0 @@
    30.4 -/*
    30.5 - *  linux/arch/i386/kernel/signal.c
    30.6 - *
    30.7 - *  Copyright (C) 1991, 1992  Linus Torvalds
    30.8 - *
    30.9 - *  1997-11-28  Modified for POSIX.1b signals by Richard Henderson
   30.10 - *  2000-06-20  Pentium III FXSR, SSE support by Gareth Hughes
   30.11 - */
   30.12 -
   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/kernel.h>
   30.18 -#include <linux/signal.h>
   30.19 -#include <linux/errno.h>
   30.20 -#include <linux/wait.h>
   30.21 -#include <linux/ptrace.h>
   30.22 -#include <linux/unistd.h>
   30.23 -#include <linux/stddef.h>
   30.24 -#include <linux/tty.h>
   30.25 -#include <linux/personality.h>
   30.26 -#include <asm/ucontext.h>
   30.27 -#include <asm/uaccess.h>
   30.28 -#include <asm/i387.h>
   30.29 -
   30.30 -#define DEBUG_SIG 0
   30.31 -
   30.32 -#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
   30.33 -
   30.34 -int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset));
   30.35 -
   30.36 -int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
   30.37 -{
   30.38 -	if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t)))
   30.39 -		return -EFAULT;
   30.40 -	if (from->si_code < 0)
   30.41 -		return __copy_to_user(to, from, sizeof(siginfo_t));
   30.42 -	else {
   30.43 -		int err;
   30.44 -
   30.45 -		/* If you change siginfo_t structure, please be sure
   30.46 -		   this code is fixed accordingly.
   30.47 -		   It should never copy any pad contained in the structure
   30.48 -		   to avoid security leaks, but must copy the generic
   30.49 -		   3 ints plus the relevant union member.  */
   30.50 -		err = __put_user(from->si_signo, &to->si_signo);
   30.51 -		err |= __put_user(from->si_errno, &to->si_errno);
   30.52 -		err |= __put_user((short)from->si_code, &to->si_code);
   30.53 -		/* First 32bits of unions are always present.  */
   30.54 -		err |= __put_user(from->si_pid, &to->si_pid);
   30.55 -		switch (from->si_code >> 16) {
   30.56 -		case __SI_FAULT >> 16:
   30.57 -			break;
   30.58 -		case __SI_CHLD >> 16:
   30.59 -			err |= __put_user(from->si_utime, &to->si_utime);
   30.60 -			err |= __put_user(from->si_stime, &to->si_stime);
   30.61 -			err |= __put_user(from->si_status, &to->si_status);
   30.62 -		default:
   30.63 -			err |= __put_user(from->si_uid, &to->si_uid);
   30.64 -			break;
   30.65 -		/* case __SI_RT: This is not generated by the kernel as of now.  */
   30.66 -		}
   30.67 -		return err;
   30.68 -	}
   30.69 -}
   30.70 -
   30.71 -/*
   30.72 - * Atomically swap in the new signal mask, and wait for a signal.
   30.73 - */
   30.74 -asmlinkage int
   30.75 -sys_sigsuspend(int history0, int history1, old_sigset_t mask)
   30.76 -{
   30.77 -	struct pt_regs * regs = (struct pt_regs *) &history0;
   30.78 -	sigset_t saveset;
   30.79 -
   30.80 -	mask &= _BLOCKABLE;
   30.81 -	spin_lock_irq(&current->sigmask_lock);
   30.82 -	saveset = current->blocked;
   30.83 -	siginitset(&current->blocked, mask);
   30.84 -	recalc_sigpending(current);
   30.85 -	spin_unlock_irq(&current->sigmask_lock);
   30.86 -
   30.87 -	regs->eax = -EINTR;
   30.88 -	while (1) {
   30.89 -		current->state = TASK_INTERRUPTIBLE;
   30.90 -		schedule();
   30.91 -		if (do_signal(regs, &saveset))
   30.92 -			return -EINTR;
   30.93 -	}
   30.94 -}
   30.95 -
   30.96 -asmlinkage int
   30.97 -sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize)
   30.98 -{
   30.99 -	struct pt_regs * regs = (struct pt_regs *) &unewset;
  30.100 -	sigset_t saveset, newset;
  30.101 -
  30.102 -	/* XXX: Don't preclude handling different sized sigset_t's.  */
  30.103 -	if (sigsetsize != sizeof(sigset_t))
  30.104 -		return -EINVAL;
  30.105 -
  30.106 -	if (copy_from_user(&newset, unewset, sizeof(newset)))
  30.107 -		return -EFAULT;
  30.108 -	sigdelsetmask(&newset, ~_BLOCKABLE);
  30.109 -
  30.110 -	spin_lock_irq(&current->sigmask_lock);
  30.111 -	saveset = current->blocked;
  30.112 -	current->blocked = newset;
  30.113 -	recalc_sigpending(current);
  30.114 -	spin_unlock_irq(&current->sigmask_lock);
  30.115 -
  30.116 -	regs->eax = -EINTR;
  30.117 -	while (1) {
  30.118 -		current->state = TASK_INTERRUPTIBLE;
  30.119 -		schedule();
  30.120 -		if (do_signal(regs, &saveset))
  30.121 -			return -EINTR;
  30.122 -	}
  30.123 -}
  30.124 -
  30.125 -asmlinkage int 
  30.126 -sys_sigaction(int sig, const struct old_sigaction *act,
  30.127 -	      struct old_sigaction *oact)
  30.128 -{
  30.129 -	struct k_sigaction new_ka, old_ka;
  30.130 -	int ret;
  30.131 -
  30.132 -	if (act) {
  30.133 -		old_sigset_t mask;
  30.134 -		if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
  30.135 -		    __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
  30.136 -		    __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
  30.137 -			return -EFAULT;
  30.138 -		__get_user(new_ka.sa.sa_flags, &act->sa_flags);
  30.139 -		__get_user(mask, &act->sa_mask);
  30.140 -		siginitset(&new_ka.sa.sa_mask, mask);
  30.141 -	}
  30.142 -
  30.143 -	ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
  30.144 -
  30.145 -	if (!ret && oact) {
  30.146 -		if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
  30.147 -		    __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
  30.148 -		    __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
  30.149 -			return -EFAULT;
  30.150 -		__put_user(old_ka.sa.sa_flags, &oact->sa_flags);
  30.151 -		__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
  30.152 -	}
  30.153 -
  30.154 -	return ret;
  30.155 -}
  30.156 -
  30.157 -asmlinkage int
  30.158 -sys_sigaltstack(const stack_t *uss, stack_t *uoss)
  30.159 -{
  30.160 -	struct pt_regs *regs = (struct pt_regs *) &uss;
  30.161 -	return do_sigaltstack(uss, uoss, regs->esp);
  30.162 -}
  30.163 -
  30.164 -
  30.165 -/*
  30.166 - * Do a signal return; undo the signal stack.
  30.167 - */
  30.168 -
  30.169 -struct sigframe
  30.170 -{
  30.171 -	char *pretcode;
  30.172 -	int sig;
  30.173 -	struct sigcontext sc;
  30.174 -	struct _fpstate fpstate;
  30.175 -	unsigned long extramask[_NSIG_WORDS-1];
  30.176 -	char retcode[8];
  30.177 -};
  30.178 -
  30.179 -struct rt_sigframe
  30.180 -{
  30.181 -	char *pretcode;
  30.182 -	int sig;
  30.183 -	struct siginfo *pinfo;
  30.184 -	void *puc;
  30.185 -	struct siginfo info;
  30.186 -	struct ucontext uc;
  30.187 -	struct _fpstate fpstate;
  30.188 -	char retcode[8];
  30.189 -};
  30.190 -
  30.191 -static int
  30.192 -restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *peax)
  30.193 -{
  30.194 -	unsigned int err = 0;
  30.195 -
  30.196 -#define COPY(x)		err |= __get_user(regs->x, &sc->x)
  30.197 -
  30.198 -#define COPY_SEG(seg)							\
  30.199 -	{ unsigned short tmp;						\
  30.200 -	  err |= __get_user(tmp, &sc->seg);				\
  30.201 -	  regs->x##seg = tmp; }
  30.202 -
  30.203 -#define COPY_SEG_STRICT(seg)						\
  30.204 -	{ unsigned short tmp;						\
  30.205 -	  err |= __get_user(tmp, &sc->seg);				\
  30.206 -	  regs->x##seg = tmp|3; }
  30.207 -
  30.208 -#define GET_SEG(seg)							\
  30.209 -	{ unsigned short tmp;						\
  30.210 -	  err |= __get_user(tmp, &sc->seg);				\
  30.211 -	  loadsegment(seg,tmp); }
  30.212 -
  30.213 -	GET_SEG(gs);
  30.214 -	GET_SEG(fs);
  30.215 -	COPY_SEG(es);
  30.216 -	COPY_SEG(ds);
  30.217 -	COPY(edi);
  30.218 -	COPY(esi);
  30.219 -	COPY(ebp);
  30.220 -	COPY(esp);
  30.221 -	COPY(ebx);
  30.222 -	COPY(edx);
  30.223 -	COPY(ecx);
  30.224 -	COPY(eip);
  30.225 -	COPY_SEG_STRICT(cs);
  30.226 -	COPY_SEG_STRICT(ss);
  30.227 -	
  30.228 -	{
  30.229 -		unsigned int tmpflags;
  30.230 -		err |= __get_user(tmpflags, &sc->eflags);
  30.231 -		regs->eflags = (regs->eflags & ~0x40DD5) | (tmpflags & 0x40DD5);
  30.232 -		regs->orig_eax = -1;		/* disable syscall checks */
  30.233 -	}
  30.234 -
  30.235 -	{
  30.236 -		struct _fpstate * buf;
  30.237 -		err |= __get_user(buf, &sc->fpstate);
  30.238 -		if (buf) {
  30.239 -			if (verify_area(VERIFY_READ, buf, sizeof(*buf)))
  30.240 -				goto badframe;
  30.241 -			err |= restore_i387(buf);
  30.242 -		}
  30.243 -	}
  30.244 -
  30.245 -	err |= __get_user(*peax, &sc->eax);
  30.246 -	return err;
  30.247 -
  30.248 -badframe:
  30.249 -	return 1;
  30.250 -}
  30.251 -
  30.252 -asmlinkage int sys_sigreturn(unsigned long __unused)
  30.253 -{
  30.254 -	struct pt_regs *regs = (struct pt_regs *) &__unused;
  30.255 -	struct sigframe *frame = (struct sigframe *)(regs->esp - 8);
  30.256 -	sigset_t set;
  30.257 -	int eax;
  30.258 -
  30.259 -	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
  30.260 -		goto badframe;
  30.261 -	if (__get_user(set.sig[0], &frame->sc.oldmask)
  30.262 -	    || (_NSIG_WORDS > 1
  30.263 -		&& __copy_from_user(&set.sig[1], &frame->extramask,
  30.264 -				    sizeof(frame->extramask))))
  30.265 -		goto badframe;
  30.266 -
  30.267 -	sigdelsetmask(&set, ~_BLOCKABLE);
  30.268 -	spin_lock_irq(&current->sigmask_lock);
  30.269 -	current->blocked = set;
  30.270 -	recalc_sigpending(current);
  30.271 -	spin_unlock_irq(&current->sigmask_lock);
  30.272 -	
  30.273 -	if (restore_sigcontext(regs, &frame->sc, &eax))
  30.274 -		goto badframe;
  30.275 -	return eax;
  30.276 -
  30.277 -badframe:
  30.278 -	force_sig(SIGSEGV, current);
  30.279 -	return 0;
  30.280 -}	
  30.281 -
  30.282 -asmlinkage int sys_rt_sigreturn(unsigned long __unused)
  30.283 -{
  30.284 -	struct pt_regs *regs = (struct pt_regs *) &__unused;
  30.285 -	struct rt_sigframe *frame = (struct rt_sigframe *)(regs->esp - 4);
  30.286 -	sigset_t set;
  30.287 -	stack_t st;
  30.288 -	int eax;
  30.289 -
  30.290 -	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
  30.291 -		goto badframe;
  30.292 -	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
  30.293 -		goto badframe;
  30.294 -
  30.295 -	sigdelsetmask(&set, ~_BLOCKABLE);
  30.296 -	spin_lock_irq(&current->sigmask_lock);
  30.297 -	current->blocked = set;
  30.298 -	recalc_sigpending(current);
  30.299 -	spin_unlock_irq(&current->sigmask_lock);
  30.300 -	
  30.301 -	if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &eax))
  30.302 -		goto badframe;
  30.303 -
  30.304 -	if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st)))
  30.305 -		goto badframe;
  30.306 -	/* It is more difficult to avoid calling this function than to
  30.307 -	   call it and ignore errors.  */
  30.308 -	do_sigaltstack(&st, NULL, regs->esp);
  30.309 -
  30.310 -	return eax;
  30.311 -
  30.312 -badframe:
  30.313 -	force_sig(SIGSEGV, current);
  30.314 -	return 0;
  30.315 -}	
  30.316 -
  30.317 -/*
  30.318 - * Set up a signal frame.
  30.319 - */
  30.320 -
  30.321 -static int
  30.322 -setup_sigcontext(struct sigcontext *sc, struct _fpstate *fpstate,
  30.323 -		 struct pt_regs *regs, unsigned long mask)
  30.324 -{
  30.325 -	int tmp, err = 0;
  30.326 -
  30.327 -	tmp = 0;
  30.328 -	__asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp));
  30.329 -	err |= __put_user(tmp, (unsigned int *)&sc->gs);
  30.330 -	__asm__("movl %%fs,%0" : "=r"(tmp): "0"(tmp));
  30.331 -	err |= __put_user(tmp, (unsigned int *)&sc->fs);
  30.332 -
  30.333 -	err |= __put_user(regs->xes, (unsigned int *)&sc->es);
  30.334 -	err |= __put_user(regs->xds, (unsigned int *)&sc->ds);
  30.335 -	err |= __put_user(regs->edi, &sc->edi);
  30.336 -	err |= __put_user(regs->esi, &sc->esi);
  30.337 -	err |= __put_user(regs->ebp, &sc->ebp);
  30.338 -	err |= __put_user(regs->esp, &sc->esp);
  30.339 -	err |= __put_user(regs->ebx, &sc->ebx);
  30.340 -	err |= __put_user(regs->edx, &sc->edx);
  30.341 -	err |= __put_user(regs->ecx, &sc->ecx);
  30.342 -	err |= __put_user(regs->eax, &sc->eax);
  30.343 -	err |= __put_user(current->thread.trap_no, &sc->trapno);
  30.344 -	err |= __put_user(current->thread.error_code, &sc->err);
  30.345 -	err |= __put_user(regs->eip, &sc->eip);
  30.346 -	err |= __put_user(regs->xcs, (unsigned int *)&sc->cs);
  30.347 -	err |= __put_user(regs->eflags, &sc->eflags);
  30.348 -	err |= __put_user(regs->esp, &sc->esp_at_signal);
  30.349 -	err |= __put_user(regs->xss, (unsigned int *)&sc->ss);
  30.350 -
  30.351 -	tmp = save_i387(fpstate);
  30.352 -	if (tmp < 0)
  30.353 -	  err = 1;
  30.354 -	else
  30.355 -	  err |= __put_user(tmp ? fpstate : NULL, &sc->fpstate);
  30.356 -
  30.357 -	/* non-iBCS2 extensions.. */
  30.358 -	err |= __put_user(mask, &sc->oldmask);
  30.359 -	err |= __put_user(current->thread.cr2, &sc->cr2);
  30.360 -
  30.361 -	return err;
  30.362 -}
  30.363 -
  30.364 -/*
  30.365 - * Determine which stack to use..
  30.366 - */
  30.367 -static inline void *
  30.368 -get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
  30.369 -{
  30.370 -	unsigned long esp;
  30.371 -
  30.372 -	/* Default to using normal stack */
  30.373 -	esp = regs->esp;
  30.374 -
  30.375 -	/* This is the X/Open sanctioned signal stack switching.  */
  30.376 -	if (ka->sa.sa_flags & SA_ONSTACK) {
  30.377 -		if (sas_ss_flags(esp) == 0)
  30.378 -			esp = current->sas_ss_sp + current->sas_ss_size;
  30.379 -	}
  30.380 -
  30.381 -	/* This is the legacy signal stack switching. */
  30.382 -	else if ((regs->xss & 0xffff) != __USER_DS &&
  30.383 -		 !(ka->sa.sa_flags & SA_RESTORER) &&
  30.384 -		 ka->sa.sa_restorer) {
  30.385 -		esp = (unsigned long) ka->sa.sa_restorer;
  30.386 -	}
  30.387 -
  30.388 -	return (void *)((esp - frame_size) & -8ul);
  30.389 -}
  30.390 -
  30.391 -static void setup_frame(int sig, struct k_sigaction *ka,
  30.392 -			sigset_t *set, struct pt_regs * regs)
  30.393 -{
  30.394 -	struct sigframe *frame;
  30.395 -	int err = 0;
  30.396 -
  30.397 -	frame = get_sigframe(ka, regs, sizeof(*frame));
  30.398 -
  30.399 -	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
  30.400 -		goto give_sigsegv;
  30.401 -
  30.402 -	err |= __put_user((current->exec_domain
  30.403 -		           && current->exec_domain->signal_invmap
  30.404 -		           && sig < 32
  30.405 -		           ? current->exec_domain->signal_invmap[sig]
  30.406 -		           : sig),
  30.407 -		          &frame->sig);
  30.408 -	if (err)
  30.409 -		goto give_sigsegv;
  30.410 -
  30.411 -	err |= setup_sigcontext(&frame->sc, &frame->fpstate, regs, set->sig[0]);
  30.412 -	if (err)
  30.413 -		goto give_sigsegv;
  30.414 -
  30.415 -	if (_NSIG_WORDS > 1) {
  30.416 -		err |= __copy_to_user(frame->extramask, &set->sig[1],
  30.417 -				      sizeof(frame->extramask));
  30.418 -	}
  30.419 -	if (err)
  30.420 -		goto give_sigsegv;
  30.421 -
  30.422 -	/* Set up to return from userspace.  If provided, use a stub
  30.423 -	   already in userspace.  */
  30.424 -	if (ka->sa.sa_flags & SA_RESTORER) {
  30.425 -		err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
  30.426 -	} else {
  30.427 -		err |= __put_user(frame->retcode, &frame->pretcode);
  30.428 -		/* This is popl %eax ; movl $,%eax ; int $0x80 */
  30.429 -		err |= __put_user(0xb858, (short *)(frame->retcode+0));
  30.430 -		err |= __put_user(__NR_sigreturn, (int *)(frame->retcode+2));
  30.431 -		err |= __put_user(0x80cd, (short *)(frame->retcode+6));
  30.432 -	}
  30.433 -
  30.434 -	if (err)
  30.435 -		goto give_sigsegv;
  30.436 -
  30.437 -	/* Set up registers for signal handler */
  30.438 -	regs->esp = (unsigned long) frame;
  30.439 -	regs->eip = (unsigned long) ka->sa.sa_handler;
  30.440 -
  30.441 -	set_fs(USER_DS);
  30.442 -	regs->xds = __USER_DS;
  30.443 -	regs->xes = __USER_DS;
  30.444 -	regs->xss = __USER_DS;
  30.445 -	regs->xcs = __USER_CS;
  30.446 -	regs->eflags &= ~TF_MASK;
  30.447 -
  30.448 -#if DEBUG_SIG
  30.449 -	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
  30.450 -		current->comm, current->pid, frame, regs->eip, frame->pretcode);
  30.451 -#endif
  30.452 -
  30.453 -	return;
  30.454 -
  30.455 -give_sigsegv:
  30.456 -	if (sig == SIGSEGV)
  30.457 -		ka->sa.sa_handler = SIG_DFL;
  30.458 -	force_sig(SIGSEGV, current);
  30.459 -}
  30.460 -
  30.461 -static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
  30.462 -			   sigset_t *set, struct pt_regs * regs)
  30.463 -{
  30.464 -	struct rt_sigframe *frame;
  30.465 -	int err = 0;
  30.466 -
  30.467 -	frame = get_sigframe(ka, regs, sizeof(*frame));
  30.468 -
  30.469 -	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
  30.470 -		goto give_sigsegv;
  30.471 -
  30.472 -	err |= __put_user((current->exec_domain
  30.473 -		    	   && current->exec_domain->signal_invmap
  30.474 -		    	   && sig < 32
  30.475 -		    	   ? current->exec_domain->signal_invmap[sig]
  30.476 -			   : sig),
  30.477 -			  &frame->sig);
  30.478 -	err |= __put_user(&frame->info, &frame->pinfo);
  30.479 -	err |= __put_user(&frame->uc, &frame->puc);
  30.480 -	err |= copy_siginfo_to_user(&frame->info, info);
  30.481 -	if (err)
  30.482 -		goto give_sigsegv;
  30.483 -
  30.484 -	/* Create the ucontext.  */
  30.485 -	err |= __put_user(0, &frame->uc.uc_flags);
  30.486 -	err |= __put_user(0, &frame->uc.uc_link);
  30.487 -	err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
  30.488 -	err |= __put_user(sas_ss_flags(regs->esp),
  30.489 -			  &frame->uc.uc_stack.ss_flags);
  30.490 -	err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
  30.491 -	err |= setup_sigcontext(&frame->uc.uc_mcontext, &frame->fpstate,
  30.492 -			        regs, set->sig[0]);
  30.493 -	err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
  30.494 -	if (err)
  30.495 -		goto give_sigsegv;
  30.496 -
  30.497 -	/* Set up to return from userspace.  If provided, use a stub
  30.498 -	   already in userspace.  */
  30.499 -	if (ka->sa.sa_flags & SA_RESTORER) {
  30.500 -		err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
  30.501 -	} else {
  30.502 -		err |= __put_user(frame->retcode, &frame->pretcode);
  30.503 -		/* This is movl $,%eax ; int $0x80 */
  30.504 -		err |= __put_user(0xb8, (char *)(frame->retcode+0));
  30.505 -		err |= __put_user(__NR_rt_sigreturn, (int *)(frame->retcode+1));
  30.506 -		err |= __put_user(0x80cd, (short *)(frame->retcode+5));
  30.507 -	}
  30.508 -
  30.509 -	if (err)
  30.510 -		goto give_sigsegv;
  30.511 -
  30.512 -	/* Set up registers for signal handler */
  30.513 -	regs->esp = (unsigned long) frame;
  30.514 -	regs->eip = (unsigned long) ka->sa.sa_handler;
  30.515 -
  30.516 -	set_fs(USER_DS);
  30.517 -	regs->xds = __USER_DS;
  30.518 -	regs->xes = __USER_DS;
  30.519 -	regs->xss = __USER_DS;
  30.520 -	regs->xcs = __USER_CS;
  30.521 -	regs->eflags &= ~TF_MASK;
  30.522 -
  30.523 -#if DEBUG_SIG
  30.524 -	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
  30.525 -		current->comm, current->pid, frame, regs->eip, frame->pretcode);
  30.526 -#endif
  30.527 -
  30.528 -	return;
  30.529 -
  30.530 -give_sigsegv:
  30.531 -	if (sig == SIGSEGV)
  30.532 -		ka->sa.sa_handler = SIG_DFL;
  30.533 -	force_sig(SIGSEGV, current);
  30.534 -}
  30.535 -
  30.536 -/*
  30.537 - * OK, we're invoking a handler
  30.538 - */	
  30.539 -
  30.540 -static void
  30.541 -handle_signal(unsigned long sig, struct k_sigaction *ka,
  30.542 -	      siginfo_t *info, sigset_t *oldset, struct pt_regs * regs)
  30.543 -{
  30.544 -	/* Are we from a system call? */
  30.545 -	if (regs->orig_eax >= 0) {
  30.546 -		/* If so, check system call restarting.. */
  30.547 -		switch (regs->eax) {
  30.548 -			case -ERESTARTNOHAND:
  30.549 -				regs->eax = -EINTR;
  30.550 -				break;
  30.551 -
  30.552 -			case -ERESTARTSYS:
  30.553 -				if (!(ka->sa.sa_flags & SA_RESTART)) {
  30.554 -					regs->eax = -EINTR;
  30.555 -					break;
  30.556 -				}
  30.557 -			/* fallthrough */
  30.558 -			case -ERESTARTNOINTR:
  30.559 -				regs->eax = regs->orig_eax;
  30.560 -				regs->eip -= 2;
  30.561 -		}
  30.562 -	}
  30.563 -
  30.564 -	/* Set up the stack frame */
  30.565 -	if (ka->sa.sa_flags & SA_SIGINFO)
  30.566 -		setup_rt_frame(sig, ka, info, oldset, regs);
  30.567 -	else
  30.568 -		setup_frame(sig, ka, oldset, regs);
  30.569 -
  30.570 -	if (ka->sa.sa_flags & SA_ONESHOT)
  30.571 -		ka->sa.sa_handler = SIG_DFL;
  30.572 -
  30.573 -	if (!(ka->sa.sa_flags & SA_NODEFER)) {
  30.574 -		spin_lock_irq(&current->sigmask_lock);
  30.575 -		sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
  30.576 -		sigaddset(&current->blocked,sig);
  30.577 -		recalc_sigpending(current);
  30.578 -		spin_unlock_irq(&current->sigmask_lock);
  30.579 -	}
  30.580 -}
  30.581 -
  30.582 -/*
  30.583 - * Note that 'init' is a special process: it doesn't get signals it doesn't
  30.584 - * want to handle. Thus you cannot kill init even with a SIGKILL even by
  30.585 - * mistake.
  30.586 - */
  30.587 -int do_signal(struct pt_regs *regs, sigset_t *oldset)
  30.588 -{
  30.589 -	siginfo_t info;
  30.590 -	struct k_sigaction *ka;
  30.591 -
  30.592 -	/*
  30.593 -	 * We want the common case to go fast, which
  30.594 -	 * is why we may in certain cases get here from
  30.595 -	 * kernel mode. Just return without doing anything
  30.596 -	 * if so.
  30.597 -	 */
  30.598 -	if ((regs->xcs & 2) != 2)
  30.599 -		return 1;
  30.600 -
  30.601 -	if (!oldset)
  30.602 -		oldset = &current->blocked;
  30.603 -
  30.604 -	for (;;) {
  30.605 -		unsigned long signr;
  30.606 -
  30.607 -		spin_lock_irq(&current->sigmask_lock);
  30.608 -		signr = dequeue_signal(&current->blocked, &info);
  30.609 -		spin_unlock_irq(&current->sigmask_lock);
  30.610 -
  30.611 -		if (!signr)
  30.612 -			break;
  30.613 -
  30.614 -		if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
  30.615 -			/* Let the debugger run.  */
  30.616 -			current->exit_code = signr;
  30.617 -			current->state = TASK_STOPPED;
  30.618 -			notify_parent(current, SIGCHLD);
  30.619 -			schedule();
  30.620 -
  30.621 -			/* We're back.  Did the debugger cancel the sig?  */
  30.622 -			if (!(signr = current->exit_code))
  30.623 -				continue;
  30.624 -			current->exit_code = 0;
  30.625 -
  30.626 -			/* The debugger continued.  Ignore SIGSTOP.  */
  30.627 -			if (signr == SIGSTOP)
  30.628 -				continue;
  30.629 -
  30.630 -			/* Update the siginfo structure.  Is this good?  */
  30.631 -			if (signr != info.si_signo) {
  30.632 -				info.si_signo = signr;
  30.633 -				info.si_errno = 0;
  30.634 -				info.si_code = SI_USER;
  30.635 -				info.si_pid = current->p_pptr->pid;
  30.636 -				info.si_uid = current->p_pptr->uid;
  30.637 -			}
  30.638 -
  30.639 -			/* If the (new) signal is now blocked, requeue it.  */
  30.640 -			if (sigismember(&current->blocked, signr)) {
  30.641 -				send_sig_info(signr, &info, current);
  30.642 -				continue;
  30.643 -			}
  30.644 -		}
  30.645 -
  30.646 -		ka = &current->sig->action[signr-1];
  30.647 -		if (ka->sa.sa_handler == SIG_IGN) {
  30.648 -			if (signr != SIGCHLD)
  30.649 -				continue;
  30.650 -			/* Check for SIGCHLD: it's special.  */
  30.651 -			while (sys_wait4(-1, NULL, WNOHANG, NULL) > 0)
  30.652 -				/* nothing */;
  30.653 -			continue;
  30.654 -		}
  30.655 -
  30.656 -		if (ka->sa.sa_handler == SIG_DFL) {
  30.657 -			int exit_code = signr;
  30.658 -
  30.659 -			/* Init gets no signals it doesn't want.  */
  30.660 -			if (current->pid == 1)
  30.661 -				continue;
  30.662 -
  30.663 -			switch (signr) {
  30.664 -			case SIGCONT: case SIGCHLD: case SIGWINCH: case SIGURG:
  30.665 -				continue;
  30.666 -
  30.667 -			case SIGTSTP: case SIGTTIN: case SIGTTOU:
  30.668 -				if (is_orphaned_pgrp(current->pgrp))
  30.669 -					continue;
  30.670 -				/* FALLTHRU */
  30.671 -
  30.672 -			case SIGSTOP: {
  30.673 -				struct signal_struct *sig;
  30.674 -				current->state = TASK_STOPPED;
  30.675 -				current->exit_code = signr;
  30.676 -				sig = current->p_pptr->sig;
  30.677 -				if (sig && !(sig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDSTOP))
  30.678 -					notify_parent(current, SIGCHLD);
  30.679 -				schedule();
  30.680 -				continue;
  30.681 -			}
  30.682 -
  30.683 -			case SIGQUIT: case SIGILL: case SIGTRAP:
  30.684 -			case SIGABRT: case SIGFPE: case SIGSEGV:
  30.685 -			case SIGBUS: case SIGSYS: case SIGXCPU: case SIGXFSZ:
  30.686 -				if (do_coredump(signr, regs))
  30.687 -					exit_code |= 0x80;
  30.688 -				/* FALLTHRU */
  30.689 -
  30.690 -			default:
  30.691 -				sig_exit(signr, exit_code, &info);
  30.692 -				/* NOTREACHED */
  30.693 -			}
  30.694 -		}
  30.695 -
  30.696 -		/* Reenable any watchpoints before delivering the
  30.697 -		 * signal to user space. The processor register will
  30.698 -		 * have been cleared if the watchpoint triggered
  30.699 -		 * inside the kernel.
  30.700 -		 */
  30.701 -                if ( current->thread.debugreg[7] != 0 )
  30.702 -                    HYPERVISOR_set_debugreg(7, current->thread.debugreg[7]);
  30.703 -
  30.704 -		/* Whee!  Actually deliver the signal.  */
  30.705 -		handle_signal(signr, ka, &info, oldset, regs);
  30.706 -		return 1;
  30.707 -	}
  30.708 -
  30.709 -	/* Did we come from a system call? */
  30.710 -	if (regs->orig_eax >= 0) {
  30.711 -		/* Restart the system call - no handlers present */
  30.712 -		if (regs->eax == -ERESTARTNOHAND ||
  30.713 -		    regs->eax == -ERESTARTSYS ||
  30.714 -		    regs->eax == -ERESTARTNOINTR) {
  30.715 -			regs->eax = regs->orig_eax;
  30.716 -			regs->eip -= 2;
  30.717 -		}
  30.718 -	}
  30.719 -	return 0;
  30.720 -}
    31.1 --- a/linux-2.4.26-xen-sparse/arch/xen/kernel/time.c	Sat Aug 21 10:28:38 2004 +0000
    31.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.3 @@ -1,683 +0,0 @@
    31.4 -/* -*-  Mode:C; c-basic-offset:4; tab-width:4 -*-
    31.5 - ****************************************************************************
    31.6 - * (C) 2002-2003 - Rolf Neugebauer - Intel Research Cambridge
    31.7 - * (C) 2002-2003 - Keir Fraser - University of Cambridge
    31.8 - ****************************************************************************
    31.9 - *
   31.10 - *        File: arch/xen/kernel/time.c
   31.11 - *      Author: Rolf Neugebauer and Keir Fraser
   31.12 - * 
   31.13 - * Description: Interface with Xen to get correct notion of time
   31.14 - */
   31.15 -
   31.16 -/*
   31.17 - *  linux/arch/i386/kernel/time.c
   31.18 - *
   31.19 - *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
   31.20 - *
   31.21 - * This file contains the PC-specific time handling details:
   31.22 - * reading the RTC at bootup, etc..
   31.23 - * 1994-07-02    Alan Modra
   31.24 - * fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime
   31.25 - * 1995-03-26    Markus Kuhn
   31.26 - *      fixed 500 ms bug at call to set_rtc_mmss, fixed DS12887
   31.27 - *      precision CMOS clock update
   31.28 - * 1996-05-03    Ingo Molnar
   31.29 - *      fixed time warps in do_[slow|fast]_gettimeoffset()
   31.30 - * 1997-09-10 Updated NTP code according to technical memorandum Jan '96
   31.31 - *  "A Kernel Model for Precision Timekeeping" by Dave Mills
   31.32 - * 1998-09-05    (Various)
   31.33 - * More robust do_fast_gettimeoffset() algorithm implemented
   31.34 - * (works with APM, Cyrix 6x86MX and Centaur C6),
   31.35 - * monotonic gettimeofday() with fast_get_timeoffset(),
   31.36 - * drift-proof precision TSC calibration on boot
   31.37 - * (C. Scott Ananian <cananian@alumni.princeton.edu>, Andrew D.
   31.38 - * Balsa <andrebalsa@altern.org>, Philip Gladstone <philip@raptor.com>;
   31.39 - * ported from 2.0.35 Jumbo-9 by Michael Krause <m.krause@tu-harburg.de>).
   31.40 - * 1998-12-16    Andrea Arcangeli
   31.41 - * Fixed Jumbo-9 code in 2.1.131: do_gettimeofday was missing 1 jiffy
   31.42 - * because was not accounting lost_ticks.
   31.43 - * 1998-12-24 Copyright (C) 1998  Andrea Arcangeli
   31.44 - * Fixed a xtime SMP race (we need the xtime_lock rw spinlock to
   31.45 - * serialize accesses to xtime/lost_ticks).
   31.46 - */
   31.47 -
   31.48 -#include <asm/smp.h>
   31.49 -#include <asm/irq.h>
   31.50 -#include <asm/msr.h>
   31.51 -#include <asm/delay.h>
   31.52 -#include <asm/mpspec.h>
   31.53 -#include <asm/uaccess.h>
   31.54 -#include <asm/processor.h>
   31.55 -
   31.56 -#include <asm/div64.h>
   31.57 -#include <asm/hypervisor.h>
   31.58 -#include <asm/hypervisor-ifs/dom0_ops.h>
   31.59 -
   31.60 -#include <linux/mc146818rtc.h>
   31.61 -#include <linux/kernel.h>
   31.62 -#include <linux/interrupt.h>
   31.63 -#include <linux/time.h>
   31.64 -#include <linux/init.h>
   31.65 -#include <linux/smp.h>
   31.66 -#include <linux/irq.h>
   31.67 -#include <linux/sysctl.h>
   31.68 -#include <linux/sysrq.h>
   31.69 -
   31.70 -spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
   31.71 -extern rwlock_t xtime_lock;
   31.72 -extern unsigned long wall_jiffies;
   31.73 -
   31.74 -unsigned long cpu_khz; /* get this from Xen, used elsewhere */
   31.75 -
   31.76 -static unsigned int rdtsc_bitshift;
   31.77 -static u32 st_scale_f; /* convert ticks -> usecs */
   31.78 -static u32 st_scale_i; /* convert ticks -> usecs */
   31.79 -
   31.80 -/* These are peridically updated in shared_info, and then copied here. */
   31.81 -static u32 shadow_tsc_stamp;
   31.82 -static u64 shadow_system_time;
   31.83 -static u32 shadow_time_version;
   31.84 -static struct timeval shadow_tv;
   31.85 -
   31.86 -/*
   31.87 - * We use this to ensure that gettimeofday() is monotonically increasing. We
   31.88 - * only break this guarantee if the wall clock jumps backwards "a long way".
   31.89 - */
   31.90 -static struct timeval last_seen_tv = {0,0};
   31.91 -
   31.92 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
   31.93 -/* Periodically propagate synchronised time base to the RTC and to Xen. */
   31.94 -static long last_update_to_rtc, last_update_to_xen;
   31.95 -#endif
   31.96 -
   31.97 -/* Periodically take synchronised time base from Xen, if we need it. */
   31.98 -static long last_update_from_xen;   /* UTC seconds when last read Xen clock. */
   31.99 -
  31.100 -/* Keep track of last time we did processing/updating of jiffies and xtime. */
  31.101 -static u64 processed_system_time;   /* System time (ns) at last processing. */
  31.102 -
  31.103 -#define NS_PER_TICK (1000000000ULL/HZ)
  31.104 -
  31.105 -#define HANDLE_USEC_UNDERFLOW(_tv)         \
  31.106 -    do {                                   \
  31.107 -        while ( (_tv).tv_usec < 0 )        \
  31.108 -        {                                  \
  31.109 -            (_tv).tv_usec += 1000000;      \
  31.110 -            (_tv).tv_sec--;                \
  31.111 -        }                                  \
  31.112 -    } while ( 0 )
  31.113 -#define HANDLE_USEC_OVERFLOW(_tv)          \
  31.114 -    do {                                   \
  31.115 -        while ( (_tv).tv_usec >= 1000000 ) \
  31.116 -        {                                  \
  31.117 -            (_tv).tv_usec -= 1000000;      \
  31.118 -            (_tv).tv_sec++;                \
  31.119 -        }                                  \
  31.120 -    } while ( 0 )
  31.121 -
  31.122 -/* Dynamically-mapped IRQs. */
  31.123 -static int time_irq, debug_irq;
  31.124 -
  31.125 -/* Does this guest OS track Xen time, or set its wall clock independently? */
  31.126 -static int independent_wallclock = 0;
  31.127 -static int __init __independent_wallclock(char *str)
  31.128 -{
  31.129 -    independent_wallclock = 1;
  31.130 -    return 1;
  31.131 -}
  31.132 -__setup("independent_wallclock", __independent_wallclock);
  31.133 -
  31.134 -
  31.135 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  31.136 -/*
  31.137 - * In order to set the CMOS clock precisely, set_rtc_mmss has to be
  31.138 - * called 500 ms after the second nowtime has started, because when
  31.139 - * nowtime is written into the registers of the CMOS clock, it will
  31.140 - * jump to the next second precisely 500 ms later. Check the Motorola
  31.141 - * MC146818A or Dallas DS12887 data sheet for details.
  31.142 - *
  31.143 - * BUG: This routine does not handle hour overflow properly; it just
  31.144 - *      sets the minutes. Usually you'll only notice that after reboot!
  31.145 - */
  31.146 -static int set_rtc_mmss(unsigned long nowtime)
  31.147 -{
  31.148 -    int retval = 0;
  31.149 -    int real_seconds, real_minutes, cmos_minutes;
  31.150 -    unsigned char save_control, save_freq_select;
  31.151 -
  31.152 -    /* gets recalled with irq locally disabled */
  31.153 -    spin_lock(&rtc_lock);
  31.154 -    save_control = CMOS_READ(RTC_CONTROL);
  31.155 -    CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL);
  31.156 -
  31.157 -    save_freq_select = CMOS_READ(RTC_FREQ_SELECT);
  31.158 -    CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT);
  31.159 -
  31.160 -    cmos_minutes = CMOS_READ(RTC_MINUTES);
  31.161 -    if ( !(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD )
  31.162 -        BCD_TO_BIN(cmos_minutes);
  31.163 -
  31.164 -    /*
  31.165 -     * since we're only adjusting minutes and seconds, don't interfere with
  31.166 -     * hour overflow. This avoids messing with unknown time zones but requires
  31.167 -     * your RTC not to be off by more than 15 minutes
  31.168 -     */
  31.169 -    real_seconds = nowtime % 60;
  31.170 -    real_minutes = nowtime / 60;
  31.171 -    if ( ((abs(real_minutes - cmos_minutes) + 15)/30) & 1 )
  31.172 -        real_minutes += 30;  /* correct for half hour time zone */
  31.173 -    real_minutes %= 60;
  31.174 -
  31.175 -    if ( abs(real_minutes - cmos_minutes) < 30 )
  31.176 -    {
  31.177 -        if ( !(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD )
  31.178 -        {
  31.179 -            BIN_TO_BCD(real_seconds);
  31.180 -            BIN_TO_BCD(real_minutes);
  31.181 -        }
  31.182 -        CMOS_WRITE(real_seconds,RTC_SECONDS);
  31.183 -        CMOS_WRITE(real_minutes,RTC_MINUTES);
  31.184 -    }
  31.185 -    else 
  31.186 -    {
  31.187 -        printk(KERN_WARNING
  31.188 -               "set_rtc_mmss: can't update from %d to %d\n",
  31.189 -               cmos_minutes, real_minutes);
  31.190 -        retval = -1;
  31.191 -    }
  31.192 -
  31.193 -    /* The following flags have to be released exactly in this order,
  31.194 -     * otherwise the DS12887 (popular MC146818A clone with integrated
  31.195 -     * battery and quartz) will not reset the oscillator and will not
  31.196 -     * update precisely 500 ms later. You won't find this mentioned in
  31.197 -     * the Dallas Semiconductor data sheets, but who believes data
  31.198 -     * sheets anyway ...                           -- Markus Kuhn
  31.199 -     */
  31.200 -    CMOS_WRITE(save_control, RTC_CONTROL);
  31.201 -    CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
  31.202 -    spin_unlock(&rtc_lock);
  31.203 -
  31.204 -    return retval;
  31.205 -}
  31.206 -#endif
  31.207 -
  31.208 -
  31.209 -/*
  31.210 - * Reads a consistent set of time-base values from Xen, into a shadow data
  31.211 - * area. Must be called with the xtime_lock held for writing.
  31.212 - */
  31.213 -static void __get_time_values_from_xen(void)
  31.214 -{
  31.215 -    do {
  31.216 -        shadow_time_version = HYPERVISOR_shared_info->time_version2;
  31.217 -        rmb();
  31.218 -        shadow_tv.tv_sec    = HYPERVISOR_shared_info->wc_sec;
  31.219 -        shadow_tv.tv_usec   = HYPERVISOR_shared_info->wc_usec;
  31.220 -        shadow_tsc_stamp    = HYPERVISOR_shared_info->tsc_timestamp.tsc_bits;
  31.221 -        shadow_system_time  = HYPERVISOR_shared_info->system_time;
  31.222 -        rmb();
  31.223 -    }
  31.224 -    while ( shadow_time_version != HYPERVISOR_shared_info->time_version1 );
  31.225 -}
  31.226 -
  31.227 -#define TIME_VALUES_UP_TO_DATE \
  31.228 -    (shadow_time_version == HYPERVISOR_shared_info->time_version2)
  31.229 -
  31.230 -
  31.231 -/*
  31.232 - * Returns the system time elapsed, in ns, since the current shadow_timestamp
  31.233 - * was calculated. Must be called with the xtime_lock held for reading.
  31.234 - */
  31.235 -static inline unsigned long __get_time_delta_usecs(void)
  31.236 -{
  31.237 -    s32      delta_tsc;
  31.238 -    u32      low;
  31.239 -    u64      delta, tsc;
  31.240 -
  31.241 -    rdtscll(tsc);
  31.242 -    low = (u32)(tsc >> rdtsc_bitshift);
  31.243 -    delta_tsc = (s32)(low - shadow_tsc_stamp);
  31.244 -    if ( unlikely(delta_tsc < 0) ) delta_tsc = 0;
  31.245 -    delta = ((u64)delta_tsc * st_scale_f);
  31.246 -    delta >>= 32;
  31.247 -    delta += ((u64)delta_tsc * st_scale_i);
  31.248 -
  31.249 -    return (unsigned long)delta;
  31.250 -}
  31.251 -
  31.252 -
  31.253 -/*
  31.254 - * Returns the current time-of-day in UTC timeval format.
  31.255 - */
  31.256 -void do_gettimeofday(struct timeval *tv)
  31.257 -{
  31.258 -    unsigned long flags, lost;
  31.259 -    struct timeval _tv;
  31.260 -
  31.261 - again:
  31.262 -    read_lock_irqsave(&xtime_lock, flags);
  31.263 -
  31.264 -    _tv.tv_usec = __get_time_delta_usecs();
  31.265 -    if ( (lost = (jiffies - wall_jiffies)) != 0 )
  31.266 -        _tv.tv_usec += lost * (1000000 / HZ);
  31.267 -    _tv.tv_sec   = xtime.tv_sec;
  31.268 -    _tv.tv_usec += xtime.tv_usec;
  31.269 -
  31.270 -    if ( unlikely(!TIME_VALUES_UP_TO_DATE) )
  31.271 -    {
  31.272 -        /*
  31.273 -         * We may have blocked for a long time, rendering our calculations
  31.274 -         * invalid (e.g. the time delta may have overflowed). Detect that
  31.275 -         * and recalculate with fresh values.
  31.276 -         */
  31.277 -        read_unlock_irqrestore(&xtime_lock, flags);
  31.278 -        write_lock_irqsave(&xtime_lock, flags);
  31.279 -        __get_time_values_from_xen();
  31.280 -        write_unlock_irqrestore(&xtime_lock, flags);
  31.281 -        goto again;
  31.282 -    }
  31.283 -
  31.284 -    HANDLE_USEC_OVERFLOW(_tv);
  31.285 -
  31.286 -    /* Ensure that time-of-day is monotonically increasing. */
  31.287 -    if ( (_tv.tv_sec < last_seen_tv.tv_sec) ||
  31.288 -         ((_tv.tv_sec == last_seen_tv.tv_sec) &&
  31.289 -          (_tv.tv_usec < last_seen_tv.tv_usec)) )
  31.290 -        _tv = last_seen_tv;
  31.291 -    last_seen_tv = _tv;
  31.292 -
  31.293 -    read_unlock_irqrestore(&xtime_lock, flags);
  31.294 -
  31.295 -    *tv = _tv;
  31.296 -}
  31.297 -
  31.298 -
  31.299 -/*
  31.300 - * Sets the current time-of-day based on passed-in UTC timeval parameter.
  31.301 - */
  31.302 -void do_settimeofday(struct timeval *tv)
  31.303 -{
  31.304 -    struct timeval newtv;
  31.305 -    suseconds_t usec;
  31.306 -    
  31.307 -    if ( !independent_wallclock && !(start_info.flags & SIF_INITDOMAIN) )
  31.308 -        return;
  31.309 -    
  31.310 -    write_lock_irq(&xtime_lock);
  31.311 -    
  31.312 -    /*
  31.313 -     * Ensure we don't get blocked for a long time so that our time delta
  31.314 -     * overflows. If that were to happen then our shadow time values would
  31.315 -     * be stale, so we can retry with fresh ones.
  31.316 -     */
  31.317 - again:
  31.318 -    usec = tv->tv_usec - __get_time_delta_usecs();
  31.319 -    if ( unlikely(!TIME_VALUES_UP_TO_DATE) )
  31.320 -    {
  31.321 -        __get_time_values_from_xen();
  31.322 -        goto again;
  31.323 -    }
  31.324 -    tv->tv_usec = usec;
  31.325 -    
  31.326 -    HANDLE_USEC_UNDERFLOW(*tv);
  31.327 -    
  31.328 -    newtv = *tv;
  31.329 -    
  31.330 -    tv->tv_usec -= (jiffies - wall_jiffies) * (1000000 / HZ);
  31.331 -    HANDLE_USEC_UNDERFLOW(*tv);
  31.332 -
  31.333 -    xtime = *tv;
  31.334 -    time_adjust = 0;  /* stop active adjtime() */
  31.335 -    time_status |= STA_UNSYNC;
  31.336 -    time_maxerror = NTP_PHASE_LIMIT;
  31.337 -    time_esterror = NTP_PHASE_LIMIT;
  31.338 -
  31.339 -    /* Reset all our running time counts. They make no sense now. */
  31.340 -    last_seen_tv.tv_sec = 0;
  31.341 -    last_update_from_xen = 0;
  31.342 -
  31.343 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  31.344 -    if ( start_info.flags & SIF_INITDOMAIN )
  31.345 -    {
  31.346 -        dom0_op_t op;
  31.347 -        last_update_to_rtc = last_update_to_xen = 0;
  31.348 -        op.cmd = DOM0_SETTIME;
  31.349 -        op.u.settime.secs        = newtv.tv_sec;
  31.350 -        op.u.settime.usecs       = newtv.tv_usec;
  31.351 -        op.u.settime.system_time = shadow_system_time;
  31.352 -        write_unlock_irq(&xtime_lock);
  31.353 -        HYPERVISOR_dom0_op(&op);
  31.354 -    }
  31.355 -    else
  31.356 -#endif
  31.357 -    {
  31.358 -        write_unlock_irq(&xtime_lock);
  31.359 -    }
  31.360 -}
  31.361 -
  31.362 -
  31.363 -asmlinkage long sys_stime(int *tptr)
  31.364 -{
  31.365 -    int value;
  31.366 -    struct timeval tv;
  31.367 -
  31.368 -    if ( !capable(CAP_SYS_TIME) )
  31.369 -        return -EPERM;
  31.370 -
  31.371 -    if ( get_user(value, tptr) )
  31.372 -        return -EFAULT;
  31.373 -
  31.374 -    tv.tv_sec  = value;
  31.375 -    tv.tv_usec = 0;
  31.376 -
  31.377 -    do_settimeofday(&tv);
  31.378 -
  31.379 -    return 0;
  31.380 -}
  31.381 -
  31.382 -
  31.383 -/* Convert jiffies to system time. Call with xtime_lock held for reading. */
  31.384 -static inline u64 __jiffies_to_st(unsigned long j) 
  31.385 -{
  31.386 -    return processed_system_time + ((j - jiffies) * NS_PER_TICK);
  31.387 -}
  31.388 -
  31.389 -
  31.390 -static inline void do_timer_interrupt(int irq, void *dev_id,
  31.391 -                                      struct pt_regs *regs)
  31.392 -{
  31.393 -    s64 delta;
  31.394 -    unsigned long ticks = 0;
  31.395 -    long sec_diff;
  31.396 -
  31.397 -    __get_time_values_from_xen();
  31.398 -
  31.399 -    if ( (delta = (s64)(shadow_system_time + __get_time_delta_usecs() * 1000 -
  31.400 -						processed_system_time)) < 0 )
  31.401 -    {
  31.402 -        printk("Timer ISR: Time went backwards: %lld\n", delta);
  31.403 -        return;
  31.404 -    }
  31.405 -
  31.406 -    /* Process elapsed jiffies since last call. */
  31.407 -    while ( delta >= NS_PER_TICK )
  31.408 -    {
  31.409 -        ticks++;
  31.410 -        delta -= NS_PER_TICK;
  31.411 -        processed_system_time += NS_PER_TICK;
  31.412 -    }
  31.413 -
  31.414 -    if ( ticks != 0 )
  31.415 -    {
  31.416 -        do_timer_ticks(ticks);
  31.417 -
  31.418 -        if ( user_mode(regs) )
  31.419 -            update_process_times_us(ticks, 0);
  31.420 -        else
  31.421 -            update_process_times_us(0, ticks);
  31.422 -    }
  31.423 -
  31.424 -    /*
  31.425 -     * Take synchronised time from Xen once a minute if we're not
  31.426 -     * synchronised ourselves, and we haven't chosen to keep an independent
  31.427 -     * time base.
  31.428 -     */
  31.429 -    if ( !independent_wallclock && 
  31.430 -         ((time_status & STA_UNSYNC) != 0) &&
  31.431 -         (xtime.tv_sec > (last_update_from_xen + 60)) )
  31.432 -    {
  31.433 -        /* Adjust shadow timeval for jiffies that haven't updated xtime yet. */
  31.434 -        shadow_tv.tv_usec -= (jiffies - wall_jiffies) * (1000000/HZ);
  31.435 -        HANDLE_USEC_UNDERFLOW(shadow_tv);
  31.436 -
  31.437 -        /*
  31.438 -         * Reset our running time counts if they are invalidated by a warp
  31.439 -         * backwards of more than 500ms.
  31.440 -         */
  31.441 -        sec_diff = xtime.tv_sec - shadow_tv.tv_sec;
  31.442 -        if ( unlikely(abs(sec_diff) > 1) ||
  31.443 -             unlikely(((sec_diff * 1000000) + 
  31.444 -                       xtime.tv_usec - shadow_tv.tv_usec) > 500000) )
  31.445 -        {
  31.446 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  31.447 -            last_update_to_rtc = last_update_to_xen = 0;
  31.448 -#endif
  31.449 -            last_seen_tv.tv_sec = 0;
  31.450 -        }
  31.451 -
  31.452 -        /* Update our unsynchronised xtime appropriately. */
  31.453 -        xtime = shadow_tv;
  31.454 -
  31.455 -        last_update_from_xen = xtime.tv_sec;
  31.456 -    }
  31.457 -
  31.458 -#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  31.459 -    if ( (start_info.flags & SIF_INITDOMAIN) &&
  31.460 -         ((time_status & STA_UNSYNC) == 0) )
  31.461 -    {
  31.462 -        /* Send synchronised time to Xen approximately every minute. */
  31.463 -        if ( xtime.tv_sec > (last_update_to_xen + 60) )
  31.464 -        {
  31.465 -            dom0_op_t op;
  31.466 -            struct timeval tv = xtime;
  31.467 -
  31.468 -            tv.tv_usec += (jiffies - wall_jiffies) * (1000000/HZ);
  31.469 -            HANDLE_USEC_OVERFLOW(tv);
  31.470 -
  31.471 -            op.cmd = DOM0_SETTIME;
  31.472 -            op.u.settime.secs        = tv.tv_sec;
  31.473 -            op.u.settime.usecs       = tv.tv_usec;
  31.474 -            op.u.settime.system_time = shadow_system_time;
  31.475 -            HYPERVISOR_dom0_op(&op);
  31.476 -
  31.477 -            last_update_to_xen = xtime.tv_sec;
  31.478 -        }
  31.479 -
  31.480 -        /*
  31.481 -         * If we have an externally synchronized Linux clock, then update CMOS
  31.482 -         * clock accordingly every ~11 minutes. Set_rtc_mmss() has to be called
  31.483 -         * as close as possible to 500 ms before the new second starts.
  31.484 -         */
  31.485 -        if ( (xtime.tv_sec > (last_update_to_rtc + 660)) &&
  31.486 -             (xtime.tv_usec >= (500000 - ((unsigned) tick) / 2)) &&
  31.487 -             (xtime.tv_usec <= (500000 + ((unsigned) tick) / 2)) )
  31.488 -        {
  31.489 -            if ( set_rtc_mmss(xtime.tv_sec) == 0 )
  31.490 -                last_update_to_rtc = xtime.tv_sec;
  31.491 -            else
  31.492 -                last_update_to_rtc = xtime.tv_sec - 600;
  31.493 -        }
  31.494 -    }
  31.495 -#endif
  31.496 -}
  31.497 -
  31.498 -
  31.499 -static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  31.500 -{
  31.501 -    write_lock(&xtime_lock);
  31.502 -    do_timer_interrupt(irq, NULL, regs);
  31.503 -    write_unlock(&xtime_lock);
  31.504 -}
  31.505 -
  31.506 -static struct irqaction irq_timer = {
  31.507 -    timer_interrupt, 
  31.508 -    SA_INTERRUPT, 
  31.509 -    0, 
  31.510 -    "timer", 
  31.511 -    NULL, 
  31.512 -    NULL
  31.513 -};
  31.514 -
  31.515 -
  31.516 -/*
  31.517 - * This function works out when the the next timer function has to be
  31.518 - * executed (by looking at the timer list) and sets the Xen one-shot
  31.519 - * domain timer to the appropriate value. This is typically called in
  31.520 - * cpu_idle() before the domain blocks.
  31.521 - * 
  31.522 - * The function returns a non-0 value on error conditions.
  31.523 - * 
  31.524 - * It must be called with interrupts disabled.
  31.525 - */
  31.526 -extern spinlock_t timerlist_lock;
  31.527 -int set_timeout_timer(void)
  31.528 -{
  31.529 -    struct timer_list *timer;
  31.530 -    u64 alarm = 0;
  31.531 -    int ret = 0;
  31.532 -
  31.533 -    spin_lock(&timerlist_lock);
  31.534 -
  31.535 -    /*
  31.536 -     * This is safe against long blocking (since calculations are not based on 
  31.537 -     * TSC deltas). It is also safe against warped system time since
  31.538 -     * suspend-resume is cooperative and we would first get locked out. It is 
  31.539 -     * safe against normal updates of jiffies since interrupts are off.
  31.540 -     */
  31.541 -    if ( (timer = next_timer_event()) != NULL )
  31.542 -        alarm = __jiffies_to_st(timer->expires);
  31.543 -
  31.544 -    /* Tasks on the timer task queue expect to be executed on the next tick. */
  31.545 -    if ( TQ_ACTIVE(tq_timer) )
  31.546 -        alarm = __jiffies_to_st(jiffies + 1);
  31.547 -
  31.548 -    /* Failure is pretty bad, but we'd best soldier on. */
  31.549 -    if ( HYPERVISOR_set_timer_op(alarm) != 0 )
  31.550 -        ret = -1;
  31.551 -    
  31.552 -    spin_unlock(&timerlist_lock);
  31.553 -
  31.554 -    return ret;
  31.555 -}
  31.556 -
  31.557 -
  31.558 -/* Time debugging. */
  31.559 -static void dbg_time_int(int irq, void *dev_id, struct pt_regs *ptregs)
  31.560 -{
  31.561 -    unsigned long flags, j;
  31.562 -    u64 s_now, j_st;
  31.563 -    struct timeval s_tv, tv;
  31.564 -
  31.565 -    struct timer_list *timer;
  31.566 -    u64 t_st;
  31.567 -
  31.568 -    read_lock_irqsave(&xtime_lock, flags);
  31.569 -    s_tv.tv_sec  = shadow_tv.tv_sec;
  31.570 -    s_tv.tv_usec = shadow_tv.tv_usec;
  31.571 -    s_now        = shadow_system_time;
  31.572 -    read_unlock_irqrestore(&xtime_lock, flags);
  31.573 -
  31.574 -    do_gettimeofday(&tv);
  31.575 -
  31.576 -    j = jiffies;
  31.577 -    j_st = __jiffies_to_st(j);
  31.578 -
  31.579 -    timer = next_timer_event();
  31.580 -    t_st = __jiffies_to_st(timer->expires);
  31.581 -
  31.582 -    printk(KERN_ALERT "time: shadow_st=0x%X:%08X\n",
  31.583 -           (u32)(s_now>>32), (u32)s_now);
  31.584 -    printk(KERN_ALERT "time: wct=%lds %ldus shadow_wct=%lds %ldus\n",
  31.585 -           tv.tv_sec, tv.tv_usec, s_tv.tv_sec, s_tv.tv_usec);
  31.586 -    printk(KERN_ALERT "time: jiffies=%lu(0x%X:%08X) timeout=%lu(0x%X:%08X)\n",
  31.587 -           jiffies,(u32)(j_st>>32), (u32)j_st,