ia64/xen-unstable

changeset 3331:39a7a74fd6f9

bitkeeper revision 1.1159.1.505 (41cfdff23HZ-hiPuiX8jOHYDydBmgA)

sync w/ head.
author cl349@arcadians.cl.cam.ac.uk
date Mon Dec 27 10:12:02 2004 +0000 (2004-12-27)
parents 6b1aa25ff284 56a5e9ed0e89
children 72b23176fb04
files .rootkeys linux-2.4.28-xen-sparse/arch/xen/kernel/irq.c linux-2.4.28-xen-sparse/include/linux/irq.h linux-2.6.10-xen-sparse/arch/xen/Kconfig linux-2.6.10-xen-sparse/arch/xen/Kconfig.drivers linux-2.6.10-xen-sparse/arch/xen/Makefile linux-2.6.10-xen-sparse/arch/xen/boot/Makefile linux-2.6.10-xen-sparse/arch/xen/configs/xen0_defconfig linux-2.6.10-xen-sparse/arch/xen/configs/xenU_defconfig linux-2.6.10-xen-sparse/arch/xen/i386/Kconfig linux-2.6.10-xen-sparse/arch/xen/i386/Makefile linux-2.6.10-xen-sparse/arch/xen/i386/kernel/Makefile linux-2.6.10-xen-sparse/arch/xen/i386/kernel/cpu/Makefile linux-2.6.10-xen-sparse/arch/xen/i386/kernel/cpu/common.c linux-2.6.10-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/Makefile linux-2.6.10-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/main.c linux-2.6.10-xen-sparse/arch/xen/i386/kernel/entry.S linux-2.6.10-xen-sparse/arch/xen/i386/kernel/head.S linux-2.6.10-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c linux-2.6.10-xen-sparse/arch/xen/i386/kernel/ioport.c linux-2.6.10-xen-sparse/arch/xen/i386/kernel/ldt.c linux-2.6.10-xen-sparse/arch/xen/i386/kernel/pci-dma.c linux-2.6.10-xen-sparse/arch/xen/i386/kernel/process.c linux-2.6.10-xen-sparse/arch/xen/i386/kernel/setup.c linux-2.6.10-xen-sparse/arch/xen/i386/kernel/signal.c linux-2.6.10-xen-sparse/arch/xen/i386/kernel/time.c linux-2.6.10-xen-sparse/arch/xen/i386/kernel/timers/Makefile linux-2.6.10-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c linux-2.6.10-xen-sparse/arch/xen/i386/kernel/traps.c linux-2.6.10-xen-sparse/arch/xen/i386/kernel/vsyscall.S linux-2.6.10-xen-sparse/arch/xen/i386/kernel/vsyscall.lds linux-2.6.10-xen-sparse/arch/xen/i386/mm/Makefile linux-2.6.10-xen-sparse/arch/xen/i386/mm/fault.c linux-2.6.10-xen-sparse/arch/xen/i386/mm/highmem.c linux-2.6.10-xen-sparse/arch/xen/i386/mm/hypervisor.c linux-2.6.10-xen-sparse/arch/xen/i386/mm/init.c linux-2.6.10-xen-sparse/arch/xen/i386/mm/ioremap.c linux-2.6.10-xen-sparse/arch/xen/i386/mm/pageattr.c linux-2.6.10-xen-sparse/arch/xen/i386/mm/pgtable.c linux-2.6.10-xen-sparse/arch/xen/i386/pci/Makefile linux-2.6.10-xen-sparse/arch/xen/i386/pci/direct.c linux-2.6.10-xen-sparse/arch/xen/i386/pci/irq.c linux-2.6.10-xen-sparse/arch/xen/kernel/Makefile linux-2.6.10-xen-sparse/arch/xen/kernel/ctrl_if.c linux-2.6.10-xen-sparse/arch/xen/kernel/devmem.c linux-2.6.10-xen-sparse/arch/xen/kernel/evtchn.c linux-2.6.10-xen-sparse/arch/xen/kernel/fixup.c linux-2.6.10-xen-sparse/arch/xen/kernel/gnttab.c linux-2.6.10-xen-sparse/arch/xen/kernel/reboot.c linux-2.6.10-xen-sparse/arch/xen/kernel/skbuff.c linux-2.6.10-xen-sparse/arch/xen/kernel/xen_proc.c linux-2.6.10-xen-sparse/drivers/Makefile linux-2.6.10-xen-sparse/drivers/char/mem.c linux-2.6.10-xen-sparse/drivers/char/tty_io.c linux-2.6.10-xen-sparse/drivers/xen/Makefile linux-2.6.10-xen-sparse/drivers/xen/balloon/Makefile linux-2.6.10-xen-sparse/drivers/xen/balloon/balloon.c linux-2.6.10-xen-sparse/drivers/xen/blkback/Makefile linux-2.6.10-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6.10-xen-sparse/drivers/xen/blkback/common.h linux-2.6.10-xen-sparse/drivers/xen/blkback/control.c linux-2.6.10-xen-sparse/drivers/xen/blkback/interface.c linux-2.6.10-xen-sparse/drivers/xen/blkback/vbd.c linux-2.6.10-xen-sparse/drivers/xen/blkfront/Kconfig linux-2.6.10-xen-sparse/drivers/xen/blkfront/Makefile linux-2.6.10-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6.10-xen-sparse/drivers/xen/blkfront/block.h linux-2.6.10-xen-sparse/drivers/xen/blkfront/vbd.c linux-2.6.10-xen-sparse/drivers/xen/console/Makefile linux-2.6.10-xen-sparse/drivers/xen/console/console.c linux-2.6.10-xen-sparse/drivers/xen/evtchn/Makefile linux-2.6.10-xen-sparse/drivers/xen/evtchn/evtchn.c linux-2.6.10-xen-sparse/drivers/xen/netback/Makefile linux-2.6.10-xen-sparse/drivers/xen/netback/common.h linux-2.6.10-xen-sparse/drivers/xen/netback/control.c linux-2.6.10-xen-sparse/drivers/xen/netback/interface.c linux-2.6.10-xen-sparse/drivers/xen/netback/netback.c linux-2.6.10-xen-sparse/drivers/xen/netfront/Kconfig linux-2.6.10-xen-sparse/drivers/xen/netfront/Makefile linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6.10-xen-sparse/drivers/xen/privcmd/Makefile linux-2.6.10-xen-sparse/drivers/xen/privcmd/privcmd.c linux-2.6.10-xen-sparse/include/asm-generic/pgtable.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/desc.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/fixmap.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/floppy.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/highmem.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/io.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/mmu_context.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/page.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/param.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/pci.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/pgalloc.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/pgtable.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/processor.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/ptrace.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/segment.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/setup.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/system.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/tlbflush.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/vga.h linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/xor.h linux-2.6.10-xen-sparse/include/asm-xen/balloon.h linux-2.6.10-xen-sparse/include/asm-xen/ctrl_if.h linux-2.6.10-xen-sparse/include/asm-xen/evtchn.h linux-2.6.10-xen-sparse/include/asm-xen/foreign_page.h linux-2.6.10-xen-sparse/include/asm-xen/gnttab.h linux-2.6.10-xen-sparse/include/asm-xen/hypervisor.h linux-2.6.10-xen-sparse/include/asm-xen/linux-public/privcmd.h linux-2.6.10-xen-sparse/include/asm-xen/linux-public/suspend.h linux-2.6.10-xen-sparse/include/asm-xen/multicall.h linux-2.6.10-xen-sparse/include/asm-xen/queues.h linux-2.6.10-xen-sparse/include/asm-xen/xen_proc.h linux-2.6.10-xen-sparse/include/linux/gfp.h linux-2.6.10-xen-sparse/include/linux/irq.h linux-2.6.10-xen-sparse/include/linux/skbuff.h linux-2.6.10-xen-sparse/kernel/irq/manage.c linux-2.6.10-xen-sparse/mkbuildtree linux-2.6.10-xen-sparse/mm/memory.c linux-2.6.10-xen-sparse/mm/page_alloc.c linux-2.6.10-xen-sparse/net/core/skbuff.c linux-2.6.9-xen-sparse/arch/xen/Kconfig linux-2.6.9-xen-sparse/arch/xen/Kconfig.drivers linux-2.6.9-xen-sparse/arch/xen/Makefile linux-2.6.9-xen-sparse/arch/xen/boot/Makefile linux-2.6.9-xen-sparse/arch/xen/configs/xen0_defconfig linux-2.6.9-xen-sparse/arch/xen/configs/xenU_defconfig linux-2.6.9-xen-sparse/arch/xen/i386/Kconfig linux-2.6.9-xen-sparse/arch/xen/i386/Makefile linux-2.6.9-xen-sparse/arch/xen/i386/kernel/Makefile linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/Makefile linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/common.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/Makefile linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/main.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S linux-2.6.9-xen-sparse/arch/xen/i386/kernel/head.S linux-2.6.9-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ioport.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/irq.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ldt.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/pci-dma.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/process.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/setup.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/signal.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/sysenter.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/Makefile linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/traps.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vsyscall.S linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vsyscall.lds linux-2.6.9-xen-sparse/arch/xen/i386/mm/Makefile linux-2.6.9-xen-sparse/arch/xen/i386/mm/fault.c linux-2.6.9-xen-sparse/arch/xen/i386/mm/highmem.c linux-2.6.9-xen-sparse/arch/xen/i386/mm/hypervisor.c linux-2.6.9-xen-sparse/arch/xen/i386/mm/init.c linux-2.6.9-xen-sparse/arch/xen/i386/mm/ioremap.c linux-2.6.9-xen-sparse/arch/xen/i386/mm/pageattr.c linux-2.6.9-xen-sparse/arch/xen/i386/mm/pgtable.c linux-2.6.9-xen-sparse/arch/xen/i386/pci/Makefile linux-2.6.9-xen-sparse/arch/xen/i386/pci/direct.c linux-2.6.9-xen-sparse/arch/xen/i386/pci/irq.c linux-2.6.9-xen-sparse/arch/xen/kernel/Makefile linux-2.6.9-xen-sparse/arch/xen/kernel/ctrl_if.c linux-2.6.9-xen-sparse/arch/xen/kernel/devmem.c linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c linux-2.6.9-xen-sparse/arch/xen/kernel/fixup.c linux-2.6.9-xen-sparse/arch/xen/kernel/gnttab.c linux-2.6.9-xen-sparse/arch/xen/kernel/reboot.c linux-2.6.9-xen-sparse/arch/xen/kernel/skbuff.c linux-2.6.9-xen-sparse/arch/xen/kernel/xen_proc.c linux-2.6.9-xen-sparse/drivers/Makefile linux-2.6.9-xen-sparse/drivers/char/mem.c linux-2.6.9-xen-sparse/drivers/char/tty_io.c linux-2.6.9-xen-sparse/drivers/xen/Makefile linux-2.6.9-xen-sparse/drivers/xen/balloon/Makefile linux-2.6.9-xen-sparse/drivers/xen/balloon/balloon.c linux-2.6.9-xen-sparse/drivers/xen/blkback/Makefile linux-2.6.9-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6.9-xen-sparse/drivers/xen/blkback/common.h linux-2.6.9-xen-sparse/drivers/xen/blkback/control.c linux-2.6.9-xen-sparse/drivers/xen/blkback/interface.c linux-2.6.9-xen-sparse/drivers/xen/blkback/vbd.c linux-2.6.9-xen-sparse/drivers/xen/blkfront/Kconfig linux-2.6.9-xen-sparse/drivers/xen/blkfront/Makefile linux-2.6.9-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6.9-xen-sparse/drivers/xen/blkfront/block.h linux-2.6.9-xen-sparse/drivers/xen/blkfront/vbd.c linux-2.6.9-xen-sparse/drivers/xen/console/Makefile linux-2.6.9-xen-sparse/drivers/xen/console/console.c linux-2.6.9-xen-sparse/drivers/xen/evtchn/Makefile linux-2.6.9-xen-sparse/drivers/xen/evtchn/evtchn.c linux-2.6.9-xen-sparse/drivers/xen/netback/Makefile linux-2.6.9-xen-sparse/drivers/xen/netback/common.h linux-2.6.9-xen-sparse/drivers/xen/netback/control.c linux-2.6.9-xen-sparse/drivers/xen/netback/interface.c linux-2.6.9-xen-sparse/drivers/xen/netback/netback.c linux-2.6.9-xen-sparse/drivers/xen/netfront/Kconfig linux-2.6.9-xen-sparse/drivers/xen/netfront/Makefile linux-2.6.9-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6.9-xen-sparse/drivers/xen/privcmd/Makefile linux-2.6.9-xen-sparse/drivers/xen/privcmd/privcmd.c linux-2.6.9-xen-sparse/include/asm-generic/pgtable.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/desc.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/fixmap.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/floppy.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/highmem.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/io.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mmu_context.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/page.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/param.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pci.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgalloc.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/processor.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/ptrace.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/segment.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/setup.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/system.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/tlbflush.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/vga.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/xor.h linux-2.6.9-xen-sparse/include/asm-xen/balloon.h linux-2.6.9-xen-sparse/include/asm-xen/ctrl_if.h linux-2.6.9-xen-sparse/include/asm-xen/evtchn.h linux-2.6.9-xen-sparse/include/asm-xen/foreign_page.h linux-2.6.9-xen-sparse/include/asm-xen/gnttab.h linux-2.6.9-xen-sparse/include/asm-xen/hypervisor.h linux-2.6.9-xen-sparse/include/asm-xen/linux-public/privcmd.h linux-2.6.9-xen-sparse/include/asm-xen/linux-public/suspend.h linux-2.6.9-xen-sparse/include/asm-xen/multicall.h linux-2.6.9-xen-sparse/include/asm-xen/queues.h linux-2.6.9-xen-sparse/include/asm-xen/xen_proc.h linux-2.6.9-xen-sparse/include/linux/bio.h linux-2.6.9-xen-sparse/include/linux/gfp.h linux-2.6.9-xen-sparse/include/linux/skbuff.h linux-2.6.9-xen-sparse/mkbuildtree linux-2.6.9-xen-sparse/mm/memory.c linux-2.6.9-xen-sparse/mm/page_alloc.c linux-2.6.9-xen-sparse/net/core/skbuff.c linux-2.6.9-xen-sparse/net/ipv4/raw.c
line diff
     1.1 --- a/.rootkeys	Fri Dec 24 22:09:52 2004 +0000
     1.2 +++ b/.rootkeys	Mon Dec 27 10:12:02 2004 +0000
     1.3 @@ -112,6 +112,7 @@ 3e5a4e68mTr0zcp9SXDbnd-XLrrfxw linux-2.4
     1.4  3f1056a9L_kqHcFheV00KbKBzv9j5w linux-2.4.28-xen-sparse/include/asm-xen/vga.h
     1.5  40659defgWA92arexpMGn8X3QMDj3w linux-2.4.28-xen-sparse/include/asm-xen/xor.h
     1.6  3f056927gMHl7mWB89rb73JahbhQIA linux-2.4.28-xen-sparse/include/linux/blk.h
     1.7 +419e0488SBzS3mdUhwgsES5a5e3abA linux-2.4.28-xen-sparse/include/linux/irq.h
     1.8  4124f66fPHG6yvB_vXmesjvzrJ3yMg linux-2.4.28-xen-sparse/include/linux/mm.h
     1.9  401c0590D_kwJDU59X8NyvqSv_Cl2A linux-2.4.28-xen-sparse/include/linux/sched.h
    1.10  40a248afgI0_JKthdYAe8beVfXSTpQ linux-2.4.28-xen-sparse/include/linux/skbuff.h
    1.11 @@ -127,146 +128,143 @@ 409ba2e7akOFqQUg6Qyg2s28xcXiMg linux-2.4
    1.12  3e5a4e683HKVU-sxtagrDasRB8eBVw linux-2.4.28-xen-sparse/mm/swapfile.c
    1.13  41180721bNns9Na7w1nJ0ZVt8bhUNA linux-2.4.28-xen-sparse/mm/vmalloc.c
    1.14  41505c57WAd5l1rlfCLNSCpx9J13vA linux-2.4.28-xen-sparse/net/core/skbuff.c
    1.15 -40f562372u3A7_kfbYYixPHJJxYUxA linux-2.6.9-xen-sparse/arch/xen/Kconfig
    1.16 -40f56237utH41NPukqHksuNf29IC9A linux-2.6.9-xen-sparse/arch/xen/Kconfig.drivers
    1.17 -40f56237penAAlWVBVDpeQZNFIg8CA linux-2.6.9-xen-sparse/arch/xen/Makefile
    1.18 -40f56237JTc60m1FRlUxkUaGSQKrNw linux-2.6.9-xen-sparse/arch/xen/boot/Makefile
    1.19 -40f56237hRxbacU_3PdoAl6DjZ3Jnw linux-2.6.9-xen-sparse/arch/xen/configs/xen0_defconfig
    1.20 -40f56237wubfjJKlfIzZlI3ZM2VgGA linux-2.6.9-xen-sparse/arch/xen/configs/xenU_defconfig
    1.21 -40f56237Mta0yHNaMS_qtM2rge0qYA linux-2.6.9-xen-sparse/arch/xen/i386/Kconfig
    1.22 -40f56238u2CJdXNpjsZgHBxeVyY-2g linux-2.6.9-xen-sparse/arch/xen/i386/Makefile
    1.23 -40f56238eczveJ86k_4hNxCLRQIF-g linux-2.6.9-xen-sparse/arch/xen/i386/kernel/Makefile
    1.24 -40f56238rXVTJQKbBuXXLH52qEArcg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/Makefile
    1.25 -40f562385s4lr6Zg92gExe7UQ4A76Q linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/common.c
    1.26 -41ab440bnpxZdWShZrGgM9pPaz5rmA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/Makefile
    1.27 -41ab440bBKWz-aEOEojU4PAMXe3Ppg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/main.c
    1.28 -40f56238XDtHSijkAFlbv1PT8Bhw_Q linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S
    1.29 -40f56238bnvciAuyzAiMkdzGErYt1A linux-2.6.9-xen-sparse/arch/xen/i386/kernel/head.S
    1.30 -40f58a0d31M2EkuPbG94ns_nOi0PVA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c
    1.31 -40faa751_zbZlAmLyQgCXdYekVFdWA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ioport.c
    1.32 -40f562382aC3_Gt4RG-4ZsfvDRUg3Q linux-2.6.9-xen-sparse/arch/xen/i386/kernel/irq.c
    1.33 -40f56238ue3YRsK52HG7iccNzP1AwQ linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ldt.c
    1.34 -4107adf1cNtsuOxOB4T6paAoY2R2PA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/pci-dma.c
    1.35 -40f56238a8iOVDEoostsbun_sy2i4g linux-2.6.9-xen-sparse/arch/xen/i386/kernel/process.c
    1.36 -40f56238YQIJoYG2ehDGEcdTgLmGbg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/setup.c
    1.37 -40f56238nWMQg7CKbyTy0KJNvCzbtg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/signal.c
    1.38 +40f562372u3A7_kfbYYixPHJJxYUxA linux-2.6.10-xen-sparse/arch/xen/Kconfig
    1.39 +40f56237utH41NPukqHksuNf29IC9A linux-2.6.10-xen-sparse/arch/xen/Kconfig.drivers
    1.40 +40f56237penAAlWVBVDpeQZNFIg8CA linux-2.6.10-xen-sparse/arch/xen/Makefile
    1.41 +40f56237JTc60m1FRlUxkUaGSQKrNw linux-2.6.10-xen-sparse/arch/xen/boot/Makefile
    1.42 +40f56237hRxbacU_3PdoAl6DjZ3Jnw linux-2.6.10-xen-sparse/arch/xen/configs/xen0_defconfig
    1.43 +40f56237wubfjJKlfIzZlI3ZM2VgGA linux-2.6.10-xen-sparse/arch/xen/configs/xenU_defconfig
    1.44 +40f56237Mta0yHNaMS_qtM2rge0qYA linux-2.6.10-xen-sparse/arch/xen/i386/Kconfig
    1.45 +40f56238u2CJdXNpjsZgHBxeVyY-2g linux-2.6.10-xen-sparse/arch/xen/i386/Makefile
    1.46 +40f56238eczveJ86k_4hNxCLRQIF-g linux-2.6.10-xen-sparse/arch/xen/i386/kernel/Makefile
    1.47 +40f56238rXVTJQKbBuXXLH52qEArcg linux-2.6.10-xen-sparse/arch/xen/i386/kernel/cpu/Makefile
    1.48 +40f562385s4lr6Zg92gExe7UQ4A76Q linux-2.6.10-xen-sparse/arch/xen/i386/kernel/cpu/common.c
    1.49 +41ab440bnpxZdWShZrGgM9pPaz5rmA linux-2.6.10-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/Makefile
    1.50 +41ab440bBKWz-aEOEojU4PAMXe3Ppg linux-2.6.10-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/main.c
    1.51 +40f56238XDtHSijkAFlbv1PT8Bhw_Q linux-2.6.10-xen-sparse/arch/xen/i386/kernel/entry.S
    1.52 +40f56238bnvciAuyzAiMkdzGErYt1A linux-2.6.10-xen-sparse/arch/xen/i386/kernel/head.S
    1.53 +40f58a0d31M2EkuPbG94ns_nOi0PVA linux-2.6.10-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c
    1.54 +40faa751_zbZlAmLyQgCXdYekVFdWA linux-2.6.10-xen-sparse/arch/xen/i386/kernel/ioport.c
    1.55 +40f56238ue3YRsK52HG7iccNzP1AwQ linux-2.6.10-xen-sparse/arch/xen/i386/kernel/ldt.c
    1.56 +4107adf1cNtsuOxOB4T6paAoY2R2PA linux-2.6.10-xen-sparse/arch/xen/i386/kernel/pci-dma.c
    1.57 +40f56238a8iOVDEoostsbun_sy2i4g linux-2.6.10-xen-sparse/arch/xen/i386/kernel/process.c
    1.58 +40f56238YQIJoYG2ehDGEcdTgLmGbg linux-2.6.10-xen-sparse/arch/xen/i386/kernel/setup.c
    1.59 +40f56238nWMQg7CKbyTy0KJNvCzbtg linux-2.6.10-xen-sparse/arch/xen/i386/kernel/signal.c
    1.60 +40f56238qVGkpO_ycnQA8k03kQzAgA linux-2.6.10-xen-sparse/arch/xen/i386/kernel/time.c
    1.61 +40f56238NzTgeO63RGoxHrW5NQeO3Q linux-2.6.10-xen-sparse/arch/xen/i386/kernel/timers/Makefile
    1.62 +40f56238BMqG5PuSHufpjbvp_helBw linux-2.6.10-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c
    1.63 +40f562389xNa78YBZciUibQjyRU_Lg linux-2.6.10-xen-sparse/arch/xen/i386/kernel/traps.c
    1.64 +40f56238JypKAUG01ZojFwH7qnZ5uA linux-2.6.10-xen-sparse/arch/xen/i386/kernel/vsyscall.S
    1.65 +40f56238wi6AdNQjm0RT57bSkwb6hg linux-2.6.10-xen-sparse/arch/xen/i386/kernel/vsyscall.lds
    1.66 +40f56238a3w6-byOzexIlMgni76Lcg linux-2.6.10-xen-sparse/arch/xen/i386/mm/Makefile
    1.67 +40f56238ILx8xlbywNbzTdv5Zr4xXQ linux-2.6.10-xen-sparse/arch/xen/i386/mm/fault.c
    1.68 +4118cc35CbY8rfGVspF5O-7EkXBEAA linux-2.6.10-xen-sparse/arch/xen/i386/mm/highmem.c
    1.69 +40f562383SKvDStdtrvzr5fyCbW4rw linux-2.6.10-xen-sparse/arch/xen/i386/mm/hypervisor.c
    1.70 +40f56239xcNylAxuGsQHwi1AyMLV8w linux-2.6.10-xen-sparse/arch/xen/i386/mm/init.c
    1.71 +41062ab7CjxC1UBaFhOMWWdhHkIUyg linux-2.6.10-xen-sparse/arch/xen/i386/mm/ioremap.c
    1.72 +413b5ab8LIowAnQrEmaOJSdmqm96jQ linux-2.6.10-xen-sparse/arch/xen/i386/mm/pageattr.c
    1.73 +40f5623906UYHv1rsVUeRc0tFT0dWw linux-2.6.10-xen-sparse/arch/xen/i386/mm/pgtable.c
    1.74 +4107adf12ndy94MidCaivDibJ3pPAg linux-2.6.10-xen-sparse/arch/xen/i386/pci/Makefile
    1.75 +4107adf1WcCgkhsdLTRGX52cOG1vJg linux-2.6.10-xen-sparse/arch/xen/i386/pci/direct.c
    1.76 +4107adf1s5u6249DNPUViX1YNagbUQ linux-2.6.10-xen-sparse/arch/xen/i386/pci/irq.c
    1.77 +40f56239zOksGg_H4XD4ye6iZNtoZA linux-2.6.10-xen-sparse/arch/xen/kernel/Makefile
    1.78 +40f56239bvOjuuuViZ0XMlNiREFC0A linux-2.6.10-xen-sparse/arch/xen/kernel/ctrl_if.c
    1.79 +41ab6fa06JdF7jxUsuDcjN3UhuIAxg linux-2.6.10-xen-sparse/arch/xen/kernel/devmem.c
    1.80 +40f56238xFQe9T7M_U_FItM-bZIpLw linux-2.6.10-xen-sparse/arch/xen/kernel/evtchn.c
    1.81 +4110f478aeQWllIN7J4kouAHiAqrPw linux-2.6.10-xen-sparse/arch/xen/kernel/fixup.c
    1.82 +412dfae9eA3_6e6bCGUtg1mj8b56fQ linux-2.6.10-xen-sparse/arch/xen/kernel/gnttab.c
    1.83 +40f562392LBhwmOxVPsYdkYXMxI_ZQ linux-2.6.10-xen-sparse/arch/xen/kernel/reboot.c
    1.84 +414c113396tK1HTVeUalm3u-1DF16g linux-2.6.10-xen-sparse/arch/xen/kernel/skbuff.c
    1.85 +3f68905c5eiA-lBMQSvXLMWS1ikDEA linux-2.6.10-xen-sparse/arch/xen/kernel/xen_proc.c
    1.86 +41261688yS8eAyy-7kzG4KBs0xbYCA linux-2.6.10-xen-sparse/drivers/Makefile
    1.87 +4108f5c1WfTIrs0HZFeV39sttekCTw linux-2.6.10-xen-sparse/drivers/char/mem.c
    1.88 +4111308bZAIzwf_Kzu6x1TZYZ3E0_Q linux-2.6.10-xen-sparse/drivers/char/tty_io.c
    1.89 +40f56239Dp_vMTgz8TEbvo1hjHGc3w linux-2.6.10-xen-sparse/drivers/xen/Makefile
    1.90 +41768fbcncpBQf8s2l2-CwoSNIZ9uA linux-2.6.10-xen-sparse/drivers/xen/balloon/Makefile
    1.91 +3e6377f8i5e9eGz7Pw6fQuhuTQ7DQg linux-2.6.10-xen-sparse/drivers/xen/balloon/balloon.c
    1.92 +410d0893otFGghmv4dUXDUBBdY5aIA linux-2.6.10-xen-sparse/drivers/xen/blkback/Makefile
    1.93 +4087cf0d1XgMkooTZAiJS6NrcpLQNQ linux-2.6.10-xen-sparse/drivers/xen/blkback/blkback.c
    1.94 +4087cf0dZadZ8r6CEt4fNN350Yle3A linux-2.6.10-xen-sparse/drivers/xen/blkback/common.h
    1.95 +4087cf0dxlh29iw0w-9rxOCEGCjPcw linux-2.6.10-xen-sparse/drivers/xen/blkback/control.c
    1.96 +4087cf0dbuoH20fMjNZjcgrRK-1msQ linux-2.6.10-xen-sparse/drivers/xen/blkback/interface.c
    1.97 +4087cf0dk97tacDzxfByWV7JifUYqA linux-2.6.10-xen-sparse/drivers/xen/blkback/vbd.c
    1.98 +40f56239Sfle6wGv5FS0wjS_HI150A linux-2.6.10-xen-sparse/drivers/xen/blkfront/Kconfig
    1.99 +40f562395atl9x4suKGhPkjqLOXESg linux-2.6.10-xen-sparse/drivers/xen/blkfront/Makefile
   1.100 +40f56239-JNIaTzlviVJohVdoYOUpw linux-2.6.10-xen-sparse/drivers/xen/blkfront/blkfront.c
   1.101 +40f56239y9naBTXe40Pi2J_z3p-d1g linux-2.6.10-xen-sparse/drivers/xen/blkfront/block.h
   1.102 +40f56239BVfPsXBiWQitXgDRtOsiqg linux-2.6.10-xen-sparse/drivers/xen/blkfront/vbd.c
   1.103 +40f56239fsLjvtD8YBRAWphps4FDjg linux-2.6.10-xen-sparse/drivers/xen/console/Makefile
   1.104 +3e5a4e651TH-SXHoufurnWjgl5bfOA linux-2.6.10-xen-sparse/drivers/xen/console/console.c
   1.105 +40f56239KYxO0YabhPzCTeUuln-lnA linux-2.6.10-xen-sparse/drivers/xen/evtchn/Makefile
   1.106 +40f56239DoibTX6R-ZYd3QTXAB8_TA linux-2.6.10-xen-sparse/drivers/xen/evtchn/evtchn.c
   1.107 +410a9817HEVJvred5Oy_uKH3HFJC5Q linux-2.6.10-xen-sparse/drivers/xen/netback/Makefile
   1.108 +4097ba831lpGeLlPg-bfV8XarVVuoQ linux-2.6.10-xen-sparse/drivers/xen/netback/common.h
   1.109 +4097ba83wvv8yi5P5xugCUBAdb6O-A linux-2.6.10-xen-sparse/drivers/xen/netback/control.c
   1.110 +4097ba83byY5bTSugJGZ1exTxIcMKw linux-2.6.10-xen-sparse/drivers/xen/netback/interface.c
   1.111 +4087cf0dGmSbFhFZyIZBJzvqxY-qBw linux-2.6.10-xen-sparse/drivers/xen/netback/netback.c
   1.112 +40f56239lrg_Ob0BJ8WBFS1zeg2CYw linux-2.6.10-xen-sparse/drivers/xen/netfront/Kconfig
   1.113 +40f56239Wd4k_ycG_mFsSO1r5xKdtQ linux-2.6.10-xen-sparse/drivers/xen/netfront/Makefile
   1.114 +405853f6nbeazrNyEWNHBuoSg2PiPA linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c
   1.115 +4108f5c1ppFXVpQzCOAZ6xXYubsjKA linux-2.6.10-xen-sparse/drivers/xen/privcmd/Makefile
   1.116 +3e5a4e65IUfzzMu2kZFlGEB8-rpTaA linux-2.6.10-xen-sparse/drivers/xen/privcmd/privcmd.c
   1.117 +412f47e4RKD-R5IS5gEXvcT8L4v8gA linux-2.6.10-xen-sparse/include/asm-generic/pgtable.h
   1.118 +40f56239YAjS52QG2FIAQpHDZAdGHg linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/desc.h
   1.119 +4107adf1E5O4ztGHNGMzCCNhcvqNow linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h
   1.120 +40f5623akIoBsQ3KxSB2kufkbgONXQ linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/fixmap.h
   1.121 +41979925z1MsKU1SfuuheM1IFDQ_bA linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/floppy.h
   1.122 +4118b6a418gnL6AZsTdglC92YGqYTg linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/highmem.h
   1.123 +40f5623aJVXQwpJMOLE99XgvGsfQ8Q linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/io.h
   1.124 +40f5623aKXkBBxgpLx2NcvkncQ1Yyw linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h
   1.125 +40f5623aDMCsWOFO0jktZ4e8sjwvEg linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h
   1.126 +40f5623arsFXkGdPvIqvFi3yFXGR0Q linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h
   1.127 +4120f807GCO0uqsLqdZj9csxR1Wthw linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/mmu_context.h
   1.128 +40f5623adgjZq9nAgCt0IXdWl7udSA linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/page.h
   1.129 +40f5623a54NuG-7qHihGYmw4wWQnMA linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/param.h
   1.130 +41137cc1kkvg0cg7uxddcEfjL7L67w linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/pci.h
   1.131 +40f5623atCokYc2uCysSJ8jFO8TEsw linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/pgalloc.h
   1.132 +412e01beTwiaC8sYY4XJP8PxLST5CA linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h
   1.133 +40f5623aEToIXouJgO-ao5d5pcEt1w linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h
   1.134 +40f5623aCCXRPlGpNthVXstGz9ZV3A linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/pgtable.h
   1.135 +40f5623aPCkQQfPtJSooGdhcatrvnQ linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/processor.h
   1.136 +412ea0afQL2CAI-f522TbLjLPMibPQ linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/ptrace.h
   1.137 +40f5623bzLvxr7WoJIxVf2OH4rCBJg linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/segment.h
   1.138 +40f5623bG_LzgG6-qwk292nTc5Wabw linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/setup.h
   1.139 +40f5623bgzm_9vwxpzJswlAxg298Gg linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h
   1.140 +40f5623bVdKP7Dt7qm8twu3NcnGNbA linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/system.h
   1.141 +40f5623bc8LKPRO09wY5dGDnY_YCpw linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/tlbflush.h
   1.142 +41062ab7uFxnCq-KtPeAm-aV8CicgA linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/vga.h
   1.143 +40f5623bxUbeGjkRrjDguCy_Gm8RLw linux-2.6.10-xen-sparse/include/asm-xen/asm-i386/xor.h
   1.144 +41af4017PDMuSmMWtSRU5UC9Vylw5g linux-2.6.10-xen-sparse/include/asm-xen/balloon.h
   1.145 +40f5623bYNP7tHE2zX6YQxp9Zq2utQ linux-2.6.10-xen-sparse/include/asm-xen/ctrl_if.h
   1.146 +40f5623b3Eqs8pAc5WpPX8_jTzV2qw linux-2.6.10-xen-sparse/include/asm-xen/evtchn.h
   1.147 +419b4e9367PjTEvdjwavWN12BeBBXg linux-2.6.10-xen-sparse/include/asm-xen/foreign_page.h
   1.148 +412dfaeazclyNDM0cpnp60Yo4xulpQ linux-2.6.10-xen-sparse/include/asm-xen/gnttab.h
   1.149 +40f5623aGPlsm0u1LTO-NVZ6AGzNRQ linux-2.6.10-xen-sparse/include/asm-xen/hypervisor.h
   1.150 +3f108af1ylCIm82H052FVTfXACBHrw linux-2.6.10-xen-sparse/include/asm-xen/linux-public/privcmd.h
   1.151 +3fa8e3f0kBLeE4To2vpdi3cpJbIkbQ linux-2.6.10-xen-sparse/include/asm-xen/linux-public/suspend.h
   1.152 +40f5623cndVUFlkxpf7Lfx7xu8madQ linux-2.6.10-xen-sparse/include/asm-xen/multicall.h
   1.153 +4122466356eIBnC9ot44WSVVIFyhQA linux-2.6.10-xen-sparse/include/asm-xen/queues.h
   1.154 +3f689063BoW-HWV3auUJ-OqXfcGArw linux-2.6.10-xen-sparse/include/asm-xen/xen_proc.h
   1.155 +419b4e93z2S0gR17XTy8wg09JEwAhg linux-2.6.10-xen-sparse/include/linux/gfp.h
   1.156 +419dfc609zbti8rqL60tL2dHXQ_rvQ linux-2.6.10-xen-sparse/include/linux/irq.h
   1.157 +4124f66f4NaKNa0xPiGGykn9QaZk3w linux-2.6.10-xen-sparse/include/linux/skbuff.h
   1.158 +419dfc6awx7w88wk6cG9P3mPidX6LQ linux-2.6.10-xen-sparse/kernel/irq/manage.c
   1.159 +40f56a0ddHCSs3501MY4hRf22tctOw linux-2.6.10-xen-sparse/mkbuildtree
   1.160 +412f46c0LJuKAgSPGoC0Z1DEkLfuLA linux-2.6.10-xen-sparse/mm/memory.c
   1.161 +410a94a4KT6I6X0LVc7djB39tRDp4g linux-2.6.10-xen-sparse/mm/page_alloc.c
   1.162 +41505c572m-s9ATiO1LiD1GPznTTIg linux-2.6.10-xen-sparse/net/core/skbuff.c
   1.163  41811cac4lkCB-fHir6CcxuEJ2pGsQ linux-2.6.9-xen-sparse/arch/xen/i386/kernel/smp.c
   1.164  41811ca9mbGpqBrZVrUGEiv8CTV3ng linux-2.6.9-xen-sparse/arch/xen/i386/kernel/smpboot.c
   1.165 -40f56238UL9uv78ODDzMwLL9yryeFw linux-2.6.9-xen-sparse/arch/xen/i386/kernel/sysenter.c
   1.166 -40f56238qVGkpO_ycnQA8k03kQzAgA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c
   1.167 -40f56238NzTgeO63RGoxHrW5NQeO3Q linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/Makefile
   1.168 -40f56238BMqG5PuSHufpjbvp_helBw linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c
   1.169 -40f562389xNa78YBZciUibQjyRU_Lg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/traps.c
   1.170 -40f56238qASEI_IOhCKWNuwFKNZrKQ linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S
   1.171 -40f56238JypKAUG01ZojFwH7qnZ5uA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vsyscall.S
   1.172 -40f56238wi6AdNQjm0RT57bSkwb6hg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vsyscall.lds
   1.173 -40f56238a3w6-byOzexIlMgni76Lcg linux-2.6.9-xen-sparse/arch/xen/i386/mm/Makefile
   1.174 -40f56238ILx8xlbywNbzTdv5Zr4xXQ linux-2.6.9-xen-sparse/arch/xen/i386/mm/fault.c
   1.175 -4118cc35CbY8rfGVspF5O-7EkXBEAA linux-2.6.9-xen-sparse/arch/xen/i386/mm/highmem.c
   1.176 -40f562383SKvDStdtrvzr5fyCbW4rw linux-2.6.9-xen-sparse/arch/xen/i386/mm/hypervisor.c
   1.177 -40f56239xcNylAxuGsQHwi1AyMLV8w linux-2.6.9-xen-sparse/arch/xen/i386/mm/init.c
   1.178 -41062ab7CjxC1UBaFhOMWWdhHkIUyg linux-2.6.9-xen-sparse/arch/xen/i386/mm/ioremap.c
   1.179 -413b5ab8LIowAnQrEmaOJSdmqm96jQ linux-2.6.9-xen-sparse/arch/xen/i386/mm/pageattr.c
   1.180 -40f5623906UYHv1rsVUeRc0tFT0dWw linux-2.6.9-xen-sparse/arch/xen/i386/mm/pgtable.c
   1.181 -4107adf12ndy94MidCaivDibJ3pPAg linux-2.6.9-xen-sparse/arch/xen/i386/pci/Makefile
   1.182 -4107adf1WcCgkhsdLTRGX52cOG1vJg linux-2.6.9-xen-sparse/arch/xen/i386/pci/direct.c
   1.183 -4107adf1s5u6249DNPUViX1YNagbUQ linux-2.6.9-xen-sparse/arch/xen/i386/pci/irq.c
   1.184 -40f56239zOksGg_H4XD4ye6iZNtoZA linux-2.6.9-xen-sparse/arch/xen/kernel/Makefile
   1.185 -40f56239bvOjuuuViZ0XMlNiREFC0A linux-2.6.9-xen-sparse/arch/xen/kernel/ctrl_if.c
   1.186 -41ab6fa06JdF7jxUsuDcjN3UhuIAxg linux-2.6.9-xen-sparse/arch/xen/kernel/devmem.c
   1.187 -40f56238xFQe9T7M_U_FItM-bZIpLw linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c
   1.188 -4110f478aeQWllIN7J4kouAHiAqrPw linux-2.6.9-xen-sparse/arch/xen/kernel/fixup.c
   1.189 -412dfae9eA3_6e6bCGUtg1mj8b56fQ linux-2.6.9-xen-sparse/arch/xen/kernel/gnttab.c
   1.190 -40f562392LBhwmOxVPsYdkYXMxI_ZQ linux-2.6.9-xen-sparse/arch/xen/kernel/reboot.c
   1.191 -414c113396tK1HTVeUalm3u-1DF16g linux-2.6.9-xen-sparse/arch/xen/kernel/skbuff.c
   1.192  418f90e4lGdeJK9rmbOB1kN-IKSjsQ linux-2.6.9-xen-sparse/arch/xen/kernel/smp.c
   1.193 -3f68905c5eiA-lBMQSvXLMWS1ikDEA linux-2.6.9-xen-sparse/arch/xen/kernel/xen_proc.c
   1.194 -41261688yS8eAyy-7kzG4KBs0xbYCA linux-2.6.9-xen-sparse/drivers/Makefile
   1.195 -4108f5c1WfTIrs0HZFeV39sttekCTw linux-2.6.9-xen-sparse/drivers/char/mem.c
   1.196 -4111308bZAIzwf_Kzu6x1TZYZ3E0_Q linux-2.6.9-xen-sparse/drivers/char/tty_io.c
   1.197 -40f56239Dp_vMTgz8TEbvo1hjHGc3w linux-2.6.9-xen-sparse/drivers/xen/Makefile
   1.198 -41768fbcncpBQf8s2l2-CwoSNIZ9uA linux-2.6.9-xen-sparse/drivers/xen/balloon/Makefile
   1.199 -3e6377f8i5e9eGz7Pw6fQuhuTQ7DQg linux-2.6.9-xen-sparse/drivers/xen/balloon/balloon.c
   1.200 -410d0893otFGghmv4dUXDUBBdY5aIA linux-2.6.9-xen-sparse/drivers/xen/blkback/Makefile
   1.201 -4087cf0d1XgMkooTZAiJS6NrcpLQNQ linux-2.6.9-xen-sparse/drivers/xen/blkback/blkback.c
   1.202 -4087cf0dZadZ8r6CEt4fNN350Yle3A linux-2.6.9-xen-sparse/drivers/xen/blkback/common.h
   1.203 -4087cf0dxlh29iw0w-9rxOCEGCjPcw linux-2.6.9-xen-sparse/drivers/xen/blkback/control.c
   1.204 -4087cf0dbuoH20fMjNZjcgrRK-1msQ linux-2.6.9-xen-sparse/drivers/xen/blkback/interface.c
   1.205 -4087cf0dk97tacDzxfByWV7JifUYqA linux-2.6.9-xen-sparse/drivers/xen/blkback/vbd.c
   1.206 -40f56239Sfle6wGv5FS0wjS_HI150A linux-2.6.9-xen-sparse/drivers/xen/blkfront/Kconfig
   1.207 -40f562395atl9x4suKGhPkjqLOXESg linux-2.6.9-xen-sparse/drivers/xen/blkfront/Makefile
   1.208 -40f56239-JNIaTzlviVJohVdoYOUpw linux-2.6.9-xen-sparse/drivers/xen/blkfront/blkfront.c
   1.209 -40f56239y9naBTXe40Pi2J_z3p-d1g linux-2.6.9-xen-sparse/drivers/xen/blkfront/block.h
   1.210 -40f56239BVfPsXBiWQitXgDRtOsiqg linux-2.6.9-xen-sparse/drivers/xen/blkfront/vbd.c
   1.211  41a226e0vjAcDXHOnXE5ummcdUD2mg linux-2.6.9-xen-sparse/drivers/xen/blktap/Makefile
   1.212  41a226e0VeZA1N8tbU6nvJ3OxUcJmw linux-2.6.9-xen-sparse/drivers/xen/blktap/blktap.c
   1.213  41a226e1k4J5VMLnrYXDWRqElS49YQ linux-2.6.9-xen-sparse/drivers/xen/blktap/blktap.h
   1.214  41a226e1-A_Hy7utS8vJKaXnH_tzfA linux-2.6.9-xen-sparse/drivers/xen/blktap/blktap_controlmsg.c
   1.215  41a226e19NoUUTOvs7jumDMRYDIO4Q linux-2.6.9-xen-sparse/drivers/xen/blktap/blktap_datapath.c
   1.216  41a226e1MNSyWWK5dEVgvSQ5OW0fDA linux-2.6.9-xen-sparse/drivers/xen/blktap/blktap_userdev.c
   1.217 -40f56239fsLjvtD8YBRAWphps4FDjg linux-2.6.9-xen-sparse/drivers/xen/console/Makefile
   1.218 -3e5a4e651TH-SXHoufurnWjgl5bfOA linux-2.6.9-xen-sparse/drivers/xen/console/console.c
   1.219 -40f56239KYxO0YabhPzCTeUuln-lnA linux-2.6.9-xen-sparse/drivers/xen/evtchn/Makefile
   1.220 -40f56239DoibTX6R-ZYd3QTXAB8_TA linux-2.6.9-xen-sparse/drivers/xen/evtchn/evtchn.c
   1.221 -410a9817HEVJvred5Oy_uKH3HFJC5Q linux-2.6.9-xen-sparse/drivers/xen/netback/Makefile
   1.222 -4097ba831lpGeLlPg-bfV8XarVVuoQ linux-2.6.9-xen-sparse/drivers/xen/netback/common.h
   1.223 -4097ba83wvv8yi5P5xugCUBAdb6O-A linux-2.6.9-xen-sparse/drivers/xen/netback/control.c
   1.224 -4097ba83byY5bTSugJGZ1exTxIcMKw linux-2.6.9-xen-sparse/drivers/xen/netback/interface.c
   1.225 -4087cf0dGmSbFhFZyIZBJzvqxY-qBw linux-2.6.9-xen-sparse/drivers/xen/netback/netback.c
   1.226 -40f56239lrg_Ob0BJ8WBFS1zeg2CYw linux-2.6.9-xen-sparse/drivers/xen/netfront/Kconfig
   1.227 -40f56239Wd4k_ycG_mFsSO1r5xKdtQ linux-2.6.9-xen-sparse/drivers/xen/netfront/Makefile
   1.228 -405853f6nbeazrNyEWNHBuoSg2PiPA linux-2.6.9-xen-sparse/drivers/xen/netfront/netfront.c
   1.229 -4108f5c1ppFXVpQzCOAZ6xXYubsjKA linux-2.6.9-xen-sparse/drivers/xen/privcmd/Makefile
   1.230 -3e5a4e65IUfzzMu2kZFlGEB8-rpTaA linux-2.6.9-xen-sparse/drivers/xen/privcmd/privcmd.c
   1.231 -412f47e4RKD-R5IS5gEXvcT8L4v8gA linux-2.6.9-xen-sparse/include/asm-generic/pgtable.h
   1.232 -40f56239YAjS52QG2FIAQpHDZAdGHg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/desc.h
   1.233 -4107adf1E5O4ztGHNGMzCCNhcvqNow linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h
   1.234 -40f5623akIoBsQ3KxSB2kufkbgONXQ linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/fixmap.h
   1.235 -41979925z1MsKU1SfuuheM1IFDQ_bA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/floppy.h
   1.236  41a64cdeQ5SWVEVbSZ0K-IeHHhIJ_w linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/hardirq.h
   1.237 -4118b6a418gnL6AZsTdglC92YGqYTg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/highmem.h
   1.238 -40f5623aJVXQwpJMOLE99XgvGsfQ8Q linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/io.h
   1.239 -40f5623aKXkBBxgpLx2NcvkncQ1Yyw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h
   1.240 -40f5623aDMCsWOFO0jktZ4e8sjwvEg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h
   1.241 -40f5623arsFXkGdPvIqvFi3yFXGR0Q linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h
   1.242  41811f07Iri9hrvs97t-baxmhOwWDQ linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/smpboot_hooks.h
   1.243 -4120f807GCO0uqsLqdZj9csxR1Wthw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mmu_context.h
   1.244 -40f5623adgjZq9nAgCt0IXdWl7udSA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/page.h
   1.245 -40f5623a54NuG-7qHihGYmw4wWQnMA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/param.h
   1.246 -41137cc1kkvg0cg7uxddcEfjL7L67w linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pci.h
   1.247 -40f5623atCokYc2uCysSJ8jFO8TEsw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgalloc.h
   1.248 -412e01beTwiaC8sYY4XJP8PxLST5CA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h
   1.249 -40f5623aEToIXouJgO-ao5d5pcEt1w linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h
   1.250 -40f5623aCCXRPlGpNthVXstGz9ZV3A linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable.h
   1.251 -40f5623aPCkQQfPtJSooGdhcatrvnQ linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/processor.h
   1.252 -412ea0afQL2CAI-f522TbLjLPMibPQ linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/ptrace.h
   1.253 -40f5623bzLvxr7WoJIxVf2OH4rCBJg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/segment.h
   1.254 -40f5623bG_LzgG6-qwk292nTc5Wabw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/setup.h
   1.255  4198c32a8NzmcKVOzKaEJfaQxxiA0A linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/spinlock.h
   1.256 -40f5623bgzm_9vwxpzJswlAxg298Gg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h
   1.257 -40f5623bVdKP7Dt7qm8twu3NcnGNbA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/system.h
   1.258 -40f5623bc8LKPRO09wY5dGDnY_YCpw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/tlbflush.h
   1.259 -41062ab7uFxnCq-KtPeAm-aV8CicgA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/vga.h
   1.260 -40f5623bxUbeGjkRrjDguCy_Gm8RLw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/xor.h
   1.261 -41af4017PDMuSmMWtSRU5UC9Vylw5g linux-2.6.9-xen-sparse/include/asm-xen/balloon.h
   1.262 -40f5623bYNP7tHE2zX6YQxp9Zq2utQ linux-2.6.9-xen-sparse/include/asm-xen/ctrl_if.h
   1.263 -40f5623b3Eqs8pAc5WpPX8_jTzV2qw linux-2.6.9-xen-sparse/include/asm-xen/evtchn.h
   1.264 -419b4e9367PjTEvdjwavWN12BeBBXg linux-2.6.9-xen-sparse/include/asm-xen/foreign_page.h
   1.265 -412dfaeazclyNDM0cpnp60Yo4xulpQ linux-2.6.9-xen-sparse/include/asm-xen/gnttab.h
   1.266 -40f5623aGPlsm0u1LTO-NVZ6AGzNRQ linux-2.6.9-xen-sparse/include/asm-xen/hypervisor.h
   1.267 -3f108af1ylCIm82H052FVTfXACBHrw linux-2.6.9-xen-sparse/include/asm-xen/linux-public/privcmd.h
   1.268 -3fa8e3f0kBLeE4To2vpdi3cpJbIkbQ linux-2.6.9-xen-sparse/include/asm-xen/linux-public/suspend.h
   1.269 -40f5623cndVUFlkxpf7Lfx7xu8madQ linux-2.6.9-xen-sparse/include/asm-xen/multicall.h
   1.270 -4122466356eIBnC9ot44WSVVIFyhQA linux-2.6.9-xen-sparse/include/asm-xen/queues.h
   1.271 -3f689063BoW-HWV3auUJ-OqXfcGArw linux-2.6.9-xen-sparse/include/asm-xen/xen_proc.h
   1.272 -4124d8c4aocX7A-jIbuGraWN84pxGQ linux-2.6.9-xen-sparse/include/linux/bio.h
   1.273 -419b4e93z2S0gR17XTy8wg09JEwAhg linux-2.6.9-xen-sparse/include/linux/gfp.h
   1.274 -4124f66f4NaKNa0xPiGGykn9QaZk3w linux-2.6.9-xen-sparse/include/linux/skbuff.h
   1.275 -40f56a0ddHCSs3501MY4hRf22tctOw linux-2.6.9-xen-sparse/mkbuildtree
   1.276 -412f46c0LJuKAgSPGoC0Z1DEkLfuLA linux-2.6.9-xen-sparse/mm/memory.c
   1.277 -410a94a4KT6I6X0LVc7djB39tRDp4g linux-2.6.9-xen-sparse/mm/page_alloc.c
   1.278 -41505c572m-s9ATiO1LiD1GPznTTIg linux-2.6.9-xen-sparse/net/core/skbuff.c
   1.279 -4149ec79wMpIHdvbntxqVGLRZZjPxw linux-2.6.9-xen-sparse/net/ipv4/raw.c
   1.280  413cb1e4zst25MDYjg63Y-NGC5_pLg netbsd-2.0-xen-sparse/Makefile
   1.281  413cb1e5c_Mkxf_X0zimEhTKI_l4DA netbsd-2.0-xen-sparse/mkbuildtree
   1.282  413cb1e5kY_Zil7-b0kI6hvCIxBEYg netbsd-2.0-xen-sparse/nbconfig-xen
     2.1 --- a/linux-2.4.28-xen-sparse/arch/xen/kernel/irq.c	Fri Dec 24 22:09:52 2004 +0000
     2.2 +++ b/linux-2.4.28-xen-sparse/arch/xen/kernel/irq.c	Mon Dec 27 10:12:02 2004 +0000
     2.3 @@ -559,7 +559,7 @@ void enable_irq(unsigned int irq)
     2.4   * SMP cross-CPU interrupts have their own specific
     2.5   * handlers).
     2.6   */
     2.7 -asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs)
     2.8 +asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
     2.9  {	
    2.10  	/* 
    2.11  	 * We ack quickly, we don't want the irq controller
    2.12 @@ -571,6 +571,7 @@ asmlinkage unsigned int do_IRQ(int irq, 
    2.13  	 * 0 return value means that this irq is already being
    2.14  	 * handled by some other CPU. (or is disabled)
    2.15  	 */
    2.16 +	int irq = regs->orig_eax & 0xff; /* high bits used in ret_from_ code */
    2.17  	int cpu = smp_processor_id();
    2.18  	irq_desc_t *desc = irq_desc + irq;
    2.19  	struct irqaction * action;
    2.20 @@ -731,6 +732,53 @@ int request_irq(unsigned int irq,
    2.21  	return retval;
    2.22  }
    2.23  
    2.24 +/*
    2.25 + * Internal function to unregister an irqaction - typically used to
    2.26 + * deallocate special interrupts that are part of the architecture.
    2.27 + */
    2.28 +int teardown_irq(unsigned int irq, struct irqaction * old)
    2.29 +{
    2.30 +	irq_desc_t *desc;
    2.31 +	struct irqaction **p;
    2.32 +	unsigned long flags;
    2.33 +
    2.34 +	if (irq >= NR_IRQS)
    2.35 +		return -ENOENT;
    2.36 +
    2.37 +	desc = irq_desc + irq;
    2.38 +	spin_lock_irqsave(&desc->lock,flags);
    2.39 +	p = &desc->action;
    2.40 +	for (;;) {
    2.41 +		struct irqaction * action = *p;
    2.42 +		if (action) {
    2.43 +			struct irqaction **pp = p;
    2.44 +			p = &action->next;
    2.45 +			if (action != old)
    2.46 +				continue;
    2.47 +
    2.48 +			/* Found it - now remove it from the list of entries */
    2.49 +			*pp = action->next;
    2.50 +			if (!desc->action) {
    2.51 +				desc->status |= IRQ_DISABLED;
    2.52 +				desc->handler->shutdown(irq);
    2.53 +			}
    2.54 +			spin_unlock_irqrestore(&desc->lock,flags);
    2.55 +
    2.56 +#ifdef CONFIG_SMP
    2.57 +			/* Wait to make sure it's not being used on another CPU */
    2.58 +			while (desc->status & IRQ_INPROGRESS) {
    2.59 +				barrier();
    2.60 +				cpu_relax();
    2.61 +			}
    2.62 +#endif
    2.63 +			return 0;
    2.64 +		}
    2.65 +		printk("Trying to free free IRQ%d\n",irq);
    2.66 +		spin_unlock_irqrestore(&desc->lock,flags);
    2.67 +		return -ENOENT;
    2.68 +	}
    2.69 +}
    2.70 +
    2.71  /**
    2.72   *	free_irq - free an interrupt
    2.73   *	@irq: Interrupt line to free
    2.74 @@ -752,7 +800,7 @@ int request_irq(unsigned int irq,
    2.75  void free_irq(unsigned int irq, void *dev_id)
    2.76  {
    2.77  	irq_desc_t *desc;
    2.78 -	struct irqaction **p;
    2.79 +	struct irqaction *action;
    2.80  	unsigned long flags;
    2.81  
    2.82  	if (irq >= NR_IRQS)
    2.83 @@ -760,39 +808,19 @@ void free_irq(unsigned int irq, void *de
    2.84  
    2.85  	desc = irq_desc + irq;
    2.86  	spin_lock_irqsave(&desc->lock,flags);
    2.87 -	p = &desc->action;
    2.88 -	for (;;) {
    2.89 -		struct irqaction * action = *p;
    2.90 -		if (action) {
    2.91 -			struct irqaction **pp = p;
    2.92 -			p = &action->next;
    2.93 -			if (action->dev_id != dev_id)
    2.94 -				continue;
    2.95 +	for (action = desc->action; action != NULL; action = action->next) {
    2.96 +		if (action->dev_id != dev_id)
    2.97 +			continue;
    2.98  
    2.99 -			/* Found it - now remove it from the list of entries */
   2.100 -			*pp = action->next;
   2.101 -			if (!desc->action) {
   2.102 -				desc->status |= IRQ_DISABLED;
   2.103 -				desc->handler->shutdown(irq);
   2.104 -			}
   2.105 -			spin_unlock_irqrestore(&desc->lock,flags);
   2.106 +		spin_unlock_irqrestore(&desc->lock,flags);
   2.107  
   2.108 -#ifdef CONFIG_SMP
   2.109 -			/* Wait to make sure it's not being used on another CPU */
   2.110 -			while (desc->status & IRQ_INPROGRESS) {
   2.111 -				barrier();
   2.112 -				cpu_relax();
   2.113 -			}
   2.114 -#endif
   2.115 -#define SA_STATIC_ACTION 0x01000000 /* Is it our duty to free the action? */
   2.116 -			if (!(action->flags & SA_STATIC_ACTION))
   2.117 -				kfree(action);
   2.118 -			return;
   2.119 -		}
   2.120 -		printk("Trying to free free IRQ%d\n",irq);
   2.121 -		spin_unlock_irqrestore(&desc->lock,flags);
   2.122 +		if (teardown_irq(irq, action) == 0)
   2.123 +			kfree(action);
   2.124  		return;
   2.125  	}
   2.126 +	printk("Trying to free free IRQ%d\n",irq);
   2.127 +	spin_unlock_irqrestore(&desc->lock,flags);
   2.128 +	return;
   2.129  }
   2.130  
   2.131  /*
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/linux-2.4.28-xen-sparse/include/linux/irq.h	Mon Dec 27 10:12:02 2004 +0000
     3.3 @@ -0,0 +1,80 @@
     3.4 +#ifndef __irq_h
     3.5 +#define __irq_h
     3.6 +
     3.7 +/*
     3.8 + * Please do not include this file in generic code.  There is currently
     3.9 + * no requirement for any architecture to implement anything held
    3.10 + * within this file.
    3.11 + *
    3.12 + * Thanks. --rmk
    3.13 + */
    3.14 +
    3.15 +#include <linux/config.h>
    3.16 +
    3.17 +#if !defined(CONFIG_ARCH_S390)
    3.18 +
    3.19 +#include <linux/cache.h>
    3.20 +#include <linux/spinlock.h>
    3.21 +
    3.22 +#include <asm/irq.h>
    3.23 +#include <asm/ptrace.h>
    3.24 +
    3.25 +/*
    3.26 + * IRQ line status.
    3.27 + */
    3.28 +#define IRQ_INPROGRESS	1	/* IRQ handler active - do not enter! */
    3.29 +#define IRQ_DISABLED	2	/* IRQ disabled - do not enter! */
    3.30 +#define IRQ_PENDING	4	/* IRQ pending - replay on enable */
    3.31 +#define IRQ_REPLAY	8	/* IRQ has been replayed but not acked yet */
    3.32 +#define IRQ_AUTODETECT	16	/* IRQ is being autodetected */
    3.33 +#define IRQ_WAITING	32	/* IRQ not yet seen - for autodetection */
    3.34 +#define IRQ_LEVEL	64	/* IRQ level triggered */
    3.35 +#define IRQ_MASKED	128	/* IRQ masked - shouldn't be seen again */
    3.36 +#define IRQ_PER_CPU	256	/* IRQ is per CPU */
    3.37 +
    3.38 +/*
    3.39 + * Interrupt controller descriptor. This is all we need
    3.40 + * to describe about the low-level hardware. 
    3.41 + */
    3.42 +struct hw_interrupt_type {
    3.43 +	const char * typename;
    3.44 +	unsigned int (*startup)(unsigned int irq);
    3.45 +	void (*shutdown)(unsigned int irq);
    3.46 +	void (*enable)(unsigned int irq);
    3.47 +	void (*disable)(unsigned int irq);
    3.48 +	void (*ack)(unsigned int irq);
    3.49 +	void (*end)(unsigned int irq);
    3.50 +	void (*set_affinity)(unsigned int irq, unsigned long mask);
    3.51 +};
    3.52 +
    3.53 +typedef struct hw_interrupt_type  hw_irq_controller;
    3.54 +
    3.55 +/*
    3.56 + * This is the "IRQ descriptor", which contains various information
    3.57 + * about the irq, including what kind of hardware handling it has,
    3.58 + * whether it is disabled etc etc.
    3.59 + *
    3.60 + * Pad this out to 32 bytes for cache and indexing reasons.
    3.61 + */
    3.62 +typedef struct {
    3.63 +	unsigned int status;		/* IRQ status */
    3.64 +	hw_irq_controller *handler;
    3.65 +	struct irqaction *action;	/* IRQ action list */
    3.66 +	unsigned int depth;		/* nested irq disables */
    3.67 +	spinlock_t lock;
    3.68 +} ____cacheline_aligned irq_desc_t;
    3.69 +
    3.70 +extern irq_desc_t irq_desc [NR_IRQS];
    3.71 +
    3.72 +#include <asm/hw_irq.h> /* the arch dependent stuff */
    3.73 +
    3.74 +extern int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *);
    3.75 +extern int setup_irq(unsigned int , struct irqaction * );
    3.76 +extern int teardown_irq(unsigned int , struct irqaction * );
    3.77 +
    3.78 +extern hw_irq_controller no_irq_type;  /* needed in every arch ? */
    3.79 +extern void no_action(int cpl, void *dev_id, struct pt_regs *regs);
    3.80 +
    3.81 +#endif
    3.82 +
    3.83 +#endif /* __irq_h */
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/Kconfig	Mon Dec 27 10:12:02 2004 +0000
     4.3 @@ -0,0 +1,190 @@
     4.4 +#
     4.5 +# For a description of the syntax of this configuration file,
     4.6 +# see Documentation/kbuild/kconfig-language.txt.
     4.7 +#
     4.8 +
     4.9 +mainmenu "Linux Kernel Configuration"
    4.10 +
    4.11 +config XEN
    4.12 +	bool
    4.13 +	default y
    4.14 +	help
    4.15 +	  This is the Linux Xen port.
    4.16 +
    4.17 +config ARCH_XEN
    4.18 +	bool
    4.19 +	default y
    4.20 +
    4.21 +
    4.22 +config NO_IDLE_HZ
    4.23 +	bool
    4.24 +	default y
    4.25 +
    4.26 +
    4.27 +menu "XEN"
    4.28 +
    4.29 +config XEN_PRIVILEGED_GUEST
    4.30 +	bool "Privileged Guest (domain 0)"
    4.31 +	default n
    4.32 +        select XEN_PHYSDEV_ACCESS
    4.33 +	help
    4.34 +	  Support for privileged operation (domain 0)
    4.35 +
    4.36 +config XEN_PHYSDEV_ACCESS
    4.37 +	bool "Physical device access"
    4.38 +	default y if XEN_PRIVILEGED_GUEST
    4.39 +	default n if !XEN_PRIVILEGED_GUEST
    4.40 +	help
    4.41 +	  Assume access is available to physical hardware devices
    4.42 +          (e.g., hard drives, network cards). This allows you to configure
    4.43 +          such devices and also includes some low-level support that is
    4.44 +          otherwise not compiled into the kernel.
    4.45 +
    4.46 +config XEN_BLKDEV_BACKEND
    4.47 +        bool "Block-device backend driver"
    4.48 +        default y if XEN_PHYSDEV_ACCESS
    4.49 +        default n if !XEN_PHYSDEV_ACCESS
    4.50 +        help
    4.51 +          The block-device backend driver allows the kernel to export its
    4.52 +          block devices to other guests via a high-performance shared-memory
    4.53 +          interface.
    4.54 +
    4.55 +if XEN_BLKDEV_BACKEND
    4.56 +config XEN_BLKDEV_TAP_BE
    4.57 +        bool "Block Tap support for backend driver (DANGEROUS)"
    4.58 +        default n
    4.59 +        help
    4.60 +          If you intend to use the block tap driver, the backend domain will
    4.61 +          not know the domain id of the real frontend, and so will not be able
    4.62 +          to map its data pages.  This modifies the backend to attempt to map
    4.63 +          from both the tap domain and the real frontend.  This presents a
    4.64 +          security risk, and so should ONLY be used for development
    4.65 +          with the blktap.  This option will be removed as the block drivers are
    4.66 +          modified to use grant tables.
    4.67 +endif
    4.68 +
    4.69 +config XEN_NETDEV_BACKEND
    4.70 +        bool "Network-device backend driver"
    4.71 +        default y if XEN_PHYSDEV_ACCESS
    4.72 +        default n if !XEN_PHYSDEV_ACCESS
    4.73 +        help
    4.74 +          The network-device backend driver allows the kernel to export its
    4.75 +          network devices to other guests via a high-performance shared-memory
    4.76 +          interface.
    4.77 +
    4.78 +config XEN_BLKDEV_FRONTEND
    4.79 +        bool "Block-device frontend driver"
    4.80 +        default y
    4.81 +        help
    4.82 +          The block-device frontend driver allows the kernel to access block
    4.83 +          devices mounted within another guest OS. Unless you are building a
    4.84 +          dedicated device-driver domain, or your master control domain
    4.85 +          (domain 0), then you almost certainly want to say Y here.
    4.86 +
    4.87 +config XEN_NETDEV_FRONTEND
    4.88 +        bool "Network-device frontend driver"
    4.89 +        default y
    4.90 +        help
    4.91 +          The network-device frontend driver allows the kernel to access
    4.92 +          network interfaces within another guest OS. Unless you are building a
    4.93 +          dedicated device-driver domain, or your master control domain
    4.94 +          (domain 0), then you almost certainly want to say Y here.
    4.95 +
    4.96 +if XEN_NETDEV_FRONTEND
    4.97 +config XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER
    4.98 +        bool "Pipelined transmitter (DANGEROUS)"
    4.99 +        default n
   4.100 +        help
   4.101 +          The driver will assume that the backend is pipelining packets for
   4.102 +          transmission: whenever packets are pending in the remote backend,
   4.103 +          the driver will not send asynchronous notifications when it queues
   4.104 +          additional packets for transmission.
   4.105 +          If the backend is a dumb domain, such as a transparent Ethernet
   4.106 +          bridge with no local IP interface, it is safe to say Y here to get
   4.107 +          slightly lower network overhead.
   4.108 +          If the backend has a local IP interface; or may be doing smart things
   4.109 +          like reassembling packets to perform firewall filtering; or if you
   4.110 +          are unsure; or if you experience network hangs when this option is
   4.111 +          enabled; then you must say N here.
   4.112 +endif
   4.113 +
   4.114 +config XEN_BLKDEV_TAP
   4.115 +        bool "Block device tap driver"
   4.116 +        default n
   4.117 +        help
   4.118 +          This driver allows a VM to interact on block device channels
   4.119 +          to other VMs.  Block messages may be passed through or redirected
   4.120 +          to a character device, allowing device prototyping in application
   4.121 +          space.  Odds are that you want to say N here.
   4.122 +
   4.123 +
   4.124 +config XEN_WRITABLE_PAGETABLES
   4.125 +	bool
   4.126 +	default y
   4.127 +
   4.128 +config XEN_SCRUB_PAGES
   4.129 +        bool "Scrub memory before freeing it to Xen"
   4.130 +        default y
   4.131 +        help
   4.132 +          Erase memory contents before freeing it back to Xen's global
   4.133 +          pool. This ensures that any secrets contained within that
   4.134 +          memory (e.g., private keys) cannot be found by other guests that
   4.135 +          may be running on the machine. Most people will want to say Y here.
   4.136 +          If security is not a concern then you may increase performance by
   4.137 +          saying N.
   4.138 +
   4.139 +endmenu
   4.140 +
   4.141 +config HAVE_ARCH_DEV_ALLOC_SKB
   4.142 +	bool
   4.143 +	default y
   4.144 +
   4.145 +#config VT
   4.146 +#	bool
   4.147 +#	default y
   4.148 +
   4.149 +#config VT_CONSOLE
   4.150 +#	bool
   4.151 +#	default y
   4.152 +
   4.153 +#config HW_CONSOLE
   4.154 +#	bool
   4.155 +#	default y
   4.156 +
   4.157 +choice
   4.158 +	prompt "Processor Type"
   4.159 +	default X86
   4.160 +
   4.161 +config X86
   4.162 +	bool "X86"
   4.163 +	help
   4.164 +	  Choose this option if your computer is a X86 architecture.
   4.165 +
   4.166 +config X86_64
   4.167 +	bool "X86_64"
   4.168 +	help
   4.169 +	  Choose this option if your computer is a X86 architecture.
   4.170 +
   4.171 +endchoice
   4.172 +
   4.173 +source "init/Kconfig"
   4.174 +
   4.175 +if X86
   4.176 +source "arch/xen/i386/Kconfig"
   4.177 +endif
   4.178 +
   4.179 +menu "Executable file formats"
   4.180 +
   4.181 +source "fs/Kconfig.binfmt"
   4.182 +
   4.183 +endmenu
   4.184 +
   4.185 +source "arch/xen/Kconfig.drivers"
   4.186 +
   4.187 +source "fs/Kconfig"
   4.188 +
   4.189 +source "security/Kconfig"
   4.190 +
   4.191 +source "crypto/Kconfig"
   4.192 +
   4.193 +source "lib/Kconfig"
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/Kconfig.drivers	Mon Dec 27 10:12:02 2004 +0000
     5.3 @@ -0,0 +1,55 @@
     5.4 +# arch/xen/Kconfig.drivers
     5.5 +
     5.6 +menu "Device Drivers"
     5.7 +
     5.8 +source "drivers/base/Kconfig"
     5.9 +
    5.10 +if XEN_PHYSDEV_ACCESS
    5.11 +source "drivers/mtd/Kconfig"
    5.12 +source "drivers/parport/Kconfig"
    5.13 +source "drivers/pnp/Kconfig"
    5.14 +endif
    5.15 +
    5.16 +source "drivers/block/Kconfig"
    5.17 +
    5.18 +if XEN_PHYSDEV_ACCESS
    5.19 +source "drivers/ide/Kconfig"
    5.20 +endif
    5.21 +
    5.22 +source "drivers/scsi/Kconfig"
    5.23 +
    5.24 +if XEN_PHYSDEV_ACCESS
    5.25 +source "drivers/cdrom/Kconfig"
    5.26 +endif
    5.27 +
    5.28 +source "drivers/md/Kconfig"
    5.29 +
    5.30 +if XEN_PHYSDEV_ACCESS
    5.31 +source "drivers/message/fusion/Kconfig"
    5.32 +source "drivers/ieee1394/Kconfig"
    5.33 +source "drivers/message/i2o/Kconfig"
    5.34 +endif
    5.35 +
    5.36 +source "net/Kconfig"
    5.37 +
    5.38 +if XEN_PHYSDEV_ACCESS
    5.39 +source "drivers/isdn/Kconfig"
    5.40 +source "drivers/telephony/Kconfig"
    5.41 +source "drivers/input/Kconfig"
    5.42 +source "drivers/char/Kconfig"
    5.43 +source "drivers/i2c/Kconfig"
    5.44 +source "drivers/w1/Kconfig"
    5.45 +source "drivers/misc/Kconfig"
    5.46 +source "drivers/media/Kconfig"
    5.47 +source "drivers/video/Kconfig"
    5.48 +source "sound/Kconfig"
    5.49 +source "drivers/usb/Kconfig"
    5.50 +endif
    5.51 +
    5.52 +if !XEN_PHYSDEV_ACCESS
    5.53 +config UNIX98_PTYS
    5.54 +	bool
    5.55 +	default y
    5.56 +endif
    5.57 +
    5.58 +endmenu
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/Makefile	Mon Dec 27 10:12:02 2004 +0000
     6.3 @@ -0,0 +1,72 @@
     6.4 +#
     6.5 +# xen/Makefile
     6.6 +#
     6.7 +# This file is included by the global makefile so that you can add your own
     6.8 +# architecture-specific flags and dependencies. Remember to do have actions
     6.9 +# for "archclean" cleaning up for this architecture.
    6.10 +#
    6.11 +# This file is subject to the terms and conditions of the GNU General Public
    6.12 +# License.  See the file "COPYING" in the main directory of this archive
    6.13 +# for more details.
    6.14 +#
    6.15 +# Copyright (C) 2004 by Christian Limpach
    6.16 +#
    6.17 +
    6.18 +XENARCH	:= $(subst ",,$(CONFIG_XENARCH))
    6.19 +
    6.20 +# pick up headers from include/asm-xen/asm in preference over include/asm
    6.21 +NOSTDINC_FLAGS  = -nostdinc -iwithprefix include/asm-xen -Iinclude/asm-xen -iwithprefix include
    6.22 +
    6.23 +# make uname return the processor arch
    6.24 +UTS_MACHINE := $(XENARCH)
    6.25 +
    6.26 +core-y	+= arch/xen/kernel/
    6.27 +
    6.28 +include/.asm-ignore: include/asm
    6.29 +	@rm -f include/.asm-ignore
    6.30 +	@mv include/asm include/.asm-ignore
    6.31 +	@echo '  SYMLINK include/asm -> include/asm-$(XENARCH)'
    6.32 +	$(Q)if [ ! -d include ]; then mkdir -p include; fi;
    6.33 +	@ln -fsn asm-$(XENARCH) include/asm
    6.34 +
    6.35 +include/asm-xen/asm:
    6.36 +	@echo '  SYMLINK $@ -> include/asm-xen/asm-$(XENARCH)'
    6.37 +	@ln -fsn asm-$(XENARCH) $@
    6.38 +
    6.39 +arch/xen/arch:
    6.40 +	@rm -f $@
    6.41 +	@ln -fsn $(XENARCH) $@
    6.42 +
    6.43 +prepare: include/.asm-ignore include/asm-xen/asm \
    6.44 +	arch/xen/arch ;
    6.45 +
    6.46 +all: vmlinuz
    6.47 +
    6.48 +vmlinuz: vmlinux
    6.49 +	$(Q)$(MAKE) $(build)=arch/xen/boot vmlinuz
    6.50 +
    6.51 +XINSTALL_NAME ?= $(KERNELRELEASE)
    6.52 +install: vmlinuz
    6.53 +	mkdir -p $(INSTALL_PATH)/boot
    6.54 +	install -m0644 vmlinuz $(INSTALL_PATH)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
    6.55 +	install -m0644 vmlinux $(INSTALL_PATH)/boot/vmlinux-syms-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
    6.56 +	install -m0664 .config $(INSTALL_PATH)/boot/config-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
    6.57 +	install -m0664 System.map $(INSTALL_PATH)/boot/System.map-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
    6.58 +	mkdir -p $(INSTALL_PATH)/usr/include/xen/linux
    6.59 +	install -m0644 include/asm-xen/linux-public/*.h $(INSTALL_PATH)/usr/include/xen/linux
    6.60 +dist:
    6.61 +	$(MAKE) INSTALL_PATH=../dist/install install
    6.62 +
    6.63 +archclean:
    6.64 +	@if [ -e arch/xen/arch ]; then $(MAKE) $(clean)=arch/xen/arch; fi;
    6.65 +	@rm -f arch/xen/arch include/.asm-ignore include/asm-xen/asm
    6.66 +	@rm -f vmlinux-stripped vmlinuz
    6.67 +
    6.68 +define archhelp
    6.69 +  echo  '* vmlinuz	- Compressed kernel image'
    6.70 +  echo  '  install	- Install kernel image and config file'
    6.71 +endef
    6.72 +
    6.73 +ifneq ($(XENARCH),)
    6.74 +include	$(srctree)/arch/xen/$(XENARCH)/Makefile
    6.75 +endif
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/boot/Makefile	Mon Dec 27 10:12:02 2004 +0000
     7.3 @@ -0,0 +1,8 @@
     7.4 +
     7.5 +OBJCOPYFLAGS := -g --strip-unneeded
     7.6 +
     7.7 +vmlinuz: vmlinux-stripped FORCE
     7.8 +	$(call if_changed,gzip)
     7.9 +
    7.10 +vmlinux-stripped: vmlinux FORCE
    7.11 +	$(call if_changed,objcopy)
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/configs/xen0_defconfig	Mon Dec 27 10:12:02 2004 +0000
     8.3 @@ -0,0 +1,1057 @@
     8.4 +#
     8.5 +# Automatically generated make config: don't edit
     8.6 +# Linux kernel version: 2.6.10-rc3-xen0
     8.7 +# Sun Dec 26 10:34:29 2004
     8.8 +#
     8.9 +CONFIG_XEN=y
    8.10 +CONFIG_ARCH_XEN=y
    8.11 +CONFIG_NO_IDLE_HZ=y
    8.12 +
    8.13 +#
    8.14 +# XEN
    8.15 +#
    8.16 +CONFIG_XEN_PRIVILEGED_GUEST=y
    8.17 +CONFIG_XEN_PHYSDEV_ACCESS=y
    8.18 +CONFIG_XEN_BLKDEV_BACKEND=y
    8.19 +# CONFIG_XEN_BLKDEV_TAP_BE is not set
    8.20 +CONFIG_XEN_NETDEV_BACKEND=y
    8.21 +CONFIG_XEN_BLKDEV_FRONTEND=y
    8.22 +CONFIG_XEN_NETDEV_FRONTEND=y
    8.23 +# CONFIG_XEN_BLKDEV_TAP is not set
    8.24 +# CONFIG_XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER is not set
    8.25 +CONFIG_XEN_WRITABLE_PAGETABLES=y
    8.26 +CONFIG_XEN_SCRUB_PAGES=y
    8.27 +CONFIG_HAVE_ARCH_DEV_ALLOC_SKB=y
    8.28 +CONFIG_X86=y
    8.29 +# CONFIG_X86_64 is not set
    8.30 +
    8.31 +#
    8.32 +# Code maturity level options
    8.33 +#
    8.34 +CONFIG_EXPERIMENTAL=y
    8.35 +# CONFIG_CLEAN_COMPILE is not set
    8.36 +CONFIG_BROKEN=y
    8.37 +CONFIG_BROKEN_ON_SMP=y
    8.38 +CONFIG_LOCK_KERNEL=y
    8.39 +
    8.40 +#
    8.41 +# General setup
    8.42 +#
    8.43 +CONFIG_LOCALVERSION=""
    8.44 +CONFIG_SWAP=y
    8.45 +CONFIG_SYSVIPC=y
    8.46 +# CONFIG_POSIX_MQUEUE is not set
    8.47 +# CONFIG_BSD_PROCESS_ACCT is not set
    8.48 +CONFIG_SYSCTL=y
    8.49 +# CONFIG_AUDIT is not set
    8.50 +CONFIG_LOG_BUF_SHIFT=14
    8.51 +CONFIG_HOTPLUG=y
    8.52 +CONFIG_KOBJECT_UEVENT=y
    8.53 +# CONFIG_IKCONFIG is not set
    8.54 +# CONFIG_EMBEDDED is not set
    8.55 +CONFIG_KALLSYMS=y
    8.56 +# CONFIG_KALLSYMS_ALL is not set
    8.57 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
    8.58 +CONFIG_FUTEX=y
    8.59 +CONFIG_EPOLL=y
    8.60 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
    8.61 +CONFIG_SHMEM=y
    8.62 +CONFIG_CC_ALIGN_FUNCTIONS=0
    8.63 +CONFIG_CC_ALIGN_LABELS=0
    8.64 +CONFIG_CC_ALIGN_LOOPS=0
    8.65 +CONFIG_CC_ALIGN_JUMPS=0
    8.66 +# CONFIG_TINY_SHMEM is not set
    8.67 +
    8.68 +#
    8.69 +# Loadable module support
    8.70 +#
    8.71 +CONFIG_MODULES=y
    8.72 +CONFIG_MODULE_UNLOAD=y
    8.73 +# CONFIG_MODULE_FORCE_UNLOAD is not set
    8.74 +CONFIG_OBSOLETE_MODPARM=y
    8.75 +# CONFIG_MODVERSIONS is not set
    8.76 +# CONFIG_MODULE_SRCVERSION_ALL is not set
    8.77 +CONFIG_KMOD=y
    8.78 +
    8.79 +#
    8.80 +# X86 Processor Configuration
    8.81 +#
    8.82 +CONFIG_XENARCH="i386"
    8.83 +CONFIG_MMU=y
    8.84 +CONFIG_UID16=y
    8.85 +CONFIG_GENERIC_ISA_DMA=y
    8.86 +CONFIG_GENERIC_IOMAP=y
    8.87 +# CONFIG_M386 is not set
    8.88 +# CONFIG_M486 is not set
    8.89 +# CONFIG_M586 is not set
    8.90 +# CONFIG_M586TSC is not set
    8.91 +# CONFIG_M586MMX is not set
    8.92 +# CONFIG_M686 is not set
    8.93 +# CONFIG_MPENTIUMII is not set
    8.94 +# CONFIG_MPENTIUMIII is not set
    8.95 +# CONFIG_MPENTIUMM is not set
    8.96 +CONFIG_MPENTIUM4=y
    8.97 +# CONFIG_MK6 is not set
    8.98 +# CONFIG_MK7 is not set
    8.99 +# CONFIG_MK8 is not set
   8.100 +# CONFIG_MCRUSOE is not set
   8.101 +# CONFIG_MEFFICEON is not set
   8.102 +# CONFIG_MWINCHIPC6 is not set
   8.103 +# CONFIG_MWINCHIP2 is not set
   8.104 +# CONFIG_MWINCHIP3D is not set
   8.105 +# CONFIG_MCYRIXIII is not set
   8.106 +# CONFIG_MVIAC3_2 is not set
   8.107 +# CONFIG_X86_GENERIC is not set
   8.108 +CONFIG_X86_CMPXCHG=y
   8.109 +CONFIG_X86_XADD=y
   8.110 +CONFIG_X86_L1_CACHE_SHIFT=7
   8.111 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
   8.112 +CONFIG_X86_WP_WORKS_OK=y
   8.113 +CONFIG_X86_INVLPG=y
   8.114 +CONFIG_X86_BSWAP=y
   8.115 +CONFIG_X86_POPAD_OK=y
   8.116 +CONFIG_X86_GOOD_APIC=y
   8.117 +CONFIG_X86_INTEL_USERCOPY=y
   8.118 +CONFIG_X86_USE_PPRO_CHECKSUM=y
   8.119 +# CONFIG_HPET_TIMER is not set
   8.120 +# CONFIG_HPET_EMULATE_RTC is not set
   8.121 +# CONFIG_SMP is not set
   8.122 +CONFIG_PREEMPT=y
   8.123 +CONFIG_X86_CPUID=y
   8.124 +
   8.125 +#
   8.126 +# Firmware Drivers
   8.127 +#
   8.128 +# CONFIG_EDD is not set
   8.129 +CONFIG_NOHIGHMEM=y
   8.130 +# CONFIG_HIGHMEM4G is not set
   8.131 +CONFIG_MTRR=y
   8.132 +CONFIG_HAVE_DEC_LOCK=y
   8.133 +# CONFIG_REGPARM is not set
   8.134 +
   8.135 +#
   8.136 +# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
   8.137 +#
   8.138 +CONFIG_PCI=y
   8.139 +CONFIG_PCI_DIRECT=y
   8.140 +CONFIG_PCI_LEGACY_PROC=y
   8.141 +# CONFIG_PCI_NAMES is not set
   8.142 +CONFIG_ISA=y
   8.143 +# CONFIG_EISA is not set
   8.144 +# CONFIG_MCA is not set
   8.145 +# CONFIG_SCx200 is not set
   8.146 +
   8.147 +#
   8.148 +# PCCARD (PCMCIA/CardBus) support
   8.149 +#
   8.150 +# CONFIG_PCCARD is not set
   8.151 +
   8.152 +#
   8.153 +# PC-card bridges
   8.154 +#
   8.155 +CONFIG_PCMCIA_PROBE=y
   8.156 +
   8.157 +#
   8.158 +# PCI Hotplug Support
   8.159 +#
   8.160 +# CONFIG_HOTPLUG_PCI is not set
   8.161 +
   8.162 +#
   8.163 +# Kernel hacking
   8.164 +#
   8.165 +CONFIG_DEBUG_KERNEL=y
   8.166 +CONFIG_EARLY_PRINTK=y
   8.167 +# CONFIG_DEBUG_STACKOVERFLOW is not set
   8.168 +# CONFIG_DEBUG_STACK_USAGE is not set
   8.169 +CONFIG_DEBUG_SLAB=y
   8.170 +CONFIG_MAGIC_SYSRQ=y
   8.171 +# CONFIG_DEBUG_SPINLOCK is not set
   8.172 +CONFIG_DEBUG_PAGEALLOC=y
   8.173 +# CONFIG_DEBUG_INFO is not set
   8.174 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
   8.175 +# CONFIG_FRAME_POINTER is not set
   8.176 +# CONFIG_4KSTACKS is not set
   8.177 +CONFIG_GENERIC_HARDIRQS=y
   8.178 +CONFIG_GENERIC_IRQ_PROBE=y
   8.179 +CONFIG_X86_BIOS_REBOOT=y
   8.180 +CONFIG_PC=y
   8.181 +
   8.182 +#
   8.183 +# Executable file formats
   8.184 +#
   8.185 +CONFIG_BINFMT_ELF=y
   8.186 +# CONFIG_BINFMT_AOUT is not set
   8.187 +# CONFIG_BINFMT_MISC is not set
   8.188 +
   8.189 +#
   8.190 +# Device Drivers
   8.191 +#
   8.192 +
   8.193 +#
   8.194 +# Generic Driver Options
   8.195 +#
   8.196 +# CONFIG_STANDALONE is not set
   8.197 +CONFIG_PREVENT_FIRMWARE_BUILD=y
   8.198 +# CONFIG_FW_LOADER is not set
   8.199 +# CONFIG_DEBUG_DRIVER is not set
   8.200 +
   8.201 +#
   8.202 +# Memory Technology Devices (MTD)
   8.203 +#
   8.204 +# CONFIG_MTD is not set
   8.205 +
   8.206 +#
   8.207 +# Parallel port support
   8.208 +#
   8.209 +# CONFIG_PARPORT is not set
   8.210 +
   8.211 +#
   8.212 +# Plug and Play support
   8.213 +#
   8.214 +# CONFIG_PNP is not set
   8.215 +
   8.216 +#
   8.217 +# Block devices
   8.218 +#
   8.219 +CONFIG_BLK_DEV_FD=y
   8.220 +# CONFIG_BLK_DEV_XD is not set
   8.221 +# CONFIG_BLK_CPQ_DA is not set
   8.222 +CONFIG_BLK_CPQ_CISS_DA=y
   8.223 +# CONFIG_CISS_SCSI_TAPE is not set
   8.224 +# CONFIG_BLK_DEV_DAC960 is not set
   8.225 +# CONFIG_BLK_DEV_UMEM is not set
   8.226 +CONFIG_BLK_DEV_LOOP=y
   8.227 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
   8.228 +# CONFIG_BLK_DEV_NBD is not set
   8.229 +# CONFIG_BLK_DEV_SX8 is not set
   8.230 +CONFIG_BLK_DEV_RAM=y
   8.231 +CONFIG_BLK_DEV_RAM_COUNT=16
   8.232 +CONFIG_BLK_DEV_RAM_SIZE=4096
   8.233 +CONFIG_BLK_DEV_INITRD=y
   8.234 +CONFIG_INITRAMFS_SOURCE=""
   8.235 +# CONFIG_LBD is not set
   8.236 +# CONFIG_CDROM_PKTCDVD is not set
   8.237 +
   8.238 +#
   8.239 +# IO Schedulers
   8.240 +#
   8.241 +CONFIG_IOSCHED_NOOP=y
   8.242 +CONFIG_IOSCHED_AS=y
   8.243 +CONFIG_IOSCHED_DEADLINE=y
   8.244 +CONFIG_IOSCHED_CFQ=y
   8.245 +
   8.246 +#
   8.247 +# ATA/ATAPI/MFM/RLL support
   8.248 +#
   8.249 +CONFIG_IDE=y
   8.250 +CONFIG_BLK_DEV_IDE=y
   8.251 +
   8.252 +#
   8.253 +# Please see Documentation/ide.txt for help/info on IDE drives
   8.254 +#
   8.255 +# CONFIG_BLK_DEV_IDE_SATA is not set
   8.256 +# CONFIG_BLK_DEV_HD_IDE is not set
   8.257 +CONFIG_BLK_DEV_IDEDISK=y
   8.258 +# CONFIG_IDEDISK_MULTI_MODE is not set
   8.259 +CONFIG_BLK_DEV_IDECD=y
   8.260 +# CONFIG_BLK_DEV_IDETAPE is not set
   8.261 +# CONFIG_BLK_DEV_IDEFLOPPY is not set
   8.262 +# CONFIG_BLK_DEV_IDESCSI is not set
   8.263 +# CONFIG_IDE_TASK_IOCTL is not set
   8.264 +
   8.265 +#
   8.266 +# IDE chipset support/bugfixes
   8.267 +#
   8.268 +CONFIG_IDE_GENERIC=y
   8.269 +# CONFIG_BLK_DEV_CMD640 is not set
   8.270 +CONFIG_BLK_DEV_IDEPCI=y
   8.271 +# CONFIG_IDEPCI_SHARE_IRQ is not set
   8.272 +# CONFIG_BLK_DEV_OFFBOARD is not set
   8.273 +CONFIG_BLK_DEV_GENERIC=y
   8.274 +# CONFIG_BLK_DEV_OPTI621 is not set
   8.275 +# CONFIG_BLK_DEV_RZ1000 is not set
   8.276 +CONFIG_BLK_DEV_IDEDMA_PCI=y
   8.277 +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
   8.278 +CONFIG_IDEDMA_PCI_AUTO=y
   8.279 +# CONFIG_IDEDMA_ONLYDISK is not set
   8.280 +# CONFIG_BLK_DEV_AEC62XX is not set
   8.281 +# CONFIG_BLK_DEV_ALI15X3 is not set
   8.282 +# CONFIG_BLK_DEV_AMD74XX is not set
   8.283 +# CONFIG_BLK_DEV_ATIIXP is not set
   8.284 +# CONFIG_BLK_DEV_CMD64X is not set
   8.285 +# CONFIG_BLK_DEV_TRIFLEX is not set
   8.286 +# CONFIG_BLK_DEV_CY82C693 is not set
   8.287 +# CONFIG_BLK_DEV_CS5520 is not set
   8.288 +# CONFIG_BLK_DEV_CS5530 is not set
   8.289 +# CONFIG_BLK_DEV_HPT34X is not set
   8.290 +# CONFIG_BLK_DEV_HPT366 is not set
   8.291 +# CONFIG_BLK_DEV_SC1200 is not set
   8.292 +CONFIG_BLK_DEV_PIIX=y
   8.293 +# CONFIG_BLK_DEV_NS87415 is not set
   8.294 +# CONFIG_BLK_DEV_PDC202XX_OLD is not set
   8.295 +# CONFIG_BLK_DEV_PDC202XX_NEW is not set
   8.296 +CONFIG_BLK_DEV_SVWKS=y
   8.297 +# CONFIG_BLK_DEV_SIIMAGE is not set
   8.298 +# CONFIG_BLK_DEV_SIS5513 is not set
   8.299 +# CONFIG_BLK_DEV_SLC90E66 is not set
   8.300 +# CONFIG_BLK_DEV_TRM290 is not set
   8.301 +# CONFIG_BLK_DEV_VIA82CXXX is not set
   8.302 +# CONFIG_IDE_ARM is not set
   8.303 +# CONFIG_IDE_CHIPSETS is not set
   8.304 +CONFIG_BLK_DEV_IDEDMA=y
   8.305 +# CONFIG_IDEDMA_IVB is not set
   8.306 +CONFIG_IDEDMA_AUTO=y
   8.307 +# CONFIG_BLK_DEV_HD is not set
   8.308 +
   8.309 +#
   8.310 +# SCSI device support
   8.311 +#
   8.312 +CONFIG_SCSI=y
   8.313 +CONFIG_SCSI_PROC_FS=y
   8.314 +
   8.315 +#
   8.316 +# SCSI support type (disk, tape, CD-ROM)
   8.317 +#
   8.318 +CONFIG_BLK_DEV_SD=y
   8.319 +# CONFIG_CHR_DEV_ST is not set
   8.320 +# CONFIG_CHR_DEV_OSST is not set
   8.321 +# CONFIG_BLK_DEV_SR is not set
   8.322 +# CONFIG_CHR_DEV_SG is not set
   8.323 +
   8.324 +#
   8.325 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
   8.326 +#
   8.327 +# CONFIG_SCSI_MULTI_LUN is not set
   8.328 +# CONFIG_SCSI_CONSTANTS is not set
   8.329 +# CONFIG_SCSI_LOGGING is not set
   8.330 +
   8.331 +#
   8.332 +# SCSI Transport Attributes
   8.333 +#
   8.334 +# CONFIG_SCSI_SPI_ATTRS is not set
   8.335 +# CONFIG_SCSI_FC_ATTRS is not set
   8.336 +
   8.337 +#
   8.338 +# SCSI low-level drivers
   8.339 +#
   8.340 +CONFIG_BLK_DEV_3W_XXXX_RAID=y
   8.341 +# CONFIG_SCSI_3W_9XXX is not set
   8.342 +# CONFIG_SCSI_7000FASST is not set
   8.343 +# CONFIG_SCSI_ACARD is not set
   8.344 +# CONFIG_SCSI_AHA152X is not set
   8.345 +# CONFIG_SCSI_AHA1542 is not set
   8.346 +CONFIG_SCSI_AACRAID=y
   8.347 +CONFIG_SCSI_AIC7XXX=y
   8.348 +CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
   8.349 +CONFIG_AIC7XXX_RESET_DELAY_MS=15000
   8.350 +CONFIG_AIC7XXX_DEBUG_ENABLE=y
   8.351 +CONFIG_AIC7XXX_DEBUG_MASK=0
   8.352 +CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
   8.353 +# CONFIG_SCSI_AIC7XXX_OLD is not set
   8.354 +CONFIG_SCSI_AIC79XX=y
   8.355 +CONFIG_AIC79XX_CMDS_PER_DEVICE=32
   8.356 +CONFIG_AIC79XX_RESET_DELAY_MS=15000
   8.357 +# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
   8.358 +CONFIG_AIC79XX_DEBUG_ENABLE=y
   8.359 +CONFIG_AIC79XX_DEBUG_MASK=0
   8.360 +CONFIG_AIC79XX_REG_PRETTY_PRINT=y
   8.361 +# CONFIG_SCSI_DPT_I2O is not set
   8.362 +# CONFIG_SCSI_ADVANSYS is not set
   8.363 +# CONFIG_SCSI_IN2000 is not set
   8.364 +# CONFIG_MEGARAID_NEWGEN is not set
   8.365 +# CONFIG_MEGARAID_LEGACY is not set
   8.366 +CONFIG_SCSI_SATA=y
   8.367 +# CONFIG_SCSI_SATA_AHCI is not set
   8.368 +# CONFIG_SCSI_SATA_SVW is not set
   8.369 +CONFIG_SCSI_ATA_PIIX=y
   8.370 +# CONFIG_SCSI_SATA_NV is not set
   8.371 +CONFIG_SCSI_SATA_PROMISE=y
   8.372 +CONFIG_SCSI_SATA_SX4=y
   8.373 +CONFIG_SCSI_SATA_SIL=y
   8.374 +# CONFIG_SCSI_SATA_SIS is not set
   8.375 +# CONFIG_SCSI_SATA_ULI is not set
   8.376 +# CONFIG_SCSI_SATA_VIA is not set
   8.377 +# CONFIG_SCSI_SATA_VITESSE is not set
   8.378 +CONFIG_SCSI_BUSLOGIC=y
   8.379 +# CONFIG_SCSI_OMIT_FLASHPOINT is not set
   8.380 +# CONFIG_SCSI_CPQFCTS is not set
   8.381 +# CONFIG_SCSI_DMX3191D is not set
   8.382 +# CONFIG_SCSI_DTC3280 is not set
   8.383 +# CONFIG_SCSI_EATA is not set
   8.384 +# CONFIG_SCSI_EATA_PIO is not set
   8.385 +# CONFIG_SCSI_FUTURE_DOMAIN is not set
   8.386 +# CONFIG_SCSI_GDTH is not set
   8.387 +# CONFIG_SCSI_GENERIC_NCR5380 is not set
   8.388 +# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
   8.389 +# CONFIG_SCSI_IPS is not set
   8.390 +# CONFIG_SCSI_INITIO is not set
   8.391 +# CONFIG_SCSI_INIA100 is not set
   8.392 +# CONFIG_SCSI_NCR53C406A is not set
   8.393 +# CONFIG_SCSI_SYM53C8XX_2 is not set
   8.394 +# CONFIG_SCSI_IPR is not set
   8.395 +# CONFIG_SCSI_PAS16 is not set
   8.396 +# CONFIG_SCSI_PCI2000 is not set
   8.397 +# CONFIG_SCSI_PCI2220I is not set
   8.398 +# CONFIG_SCSI_PSI240I is not set
   8.399 +# CONFIG_SCSI_QLOGIC_FAS is not set
   8.400 +# CONFIG_SCSI_QLOGIC_ISP is not set
   8.401 +# CONFIG_SCSI_QLOGIC_FC is not set
   8.402 +# CONFIG_SCSI_QLOGIC_1280 is not set
   8.403 +CONFIG_SCSI_QLA2XXX=y
   8.404 +# CONFIG_SCSI_QLA21XX is not set
   8.405 +# CONFIG_SCSI_QLA22XX is not set
   8.406 +# CONFIG_SCSI_QLA2300 is not set
   8.407 +# CONFIG_SCSI_QLA2322 is not set
   8.408 +# CONFIG_SCSI_QLA6312 is not set
   8.409 +# CONFIG_SCSI_QLA6322 is not set
   8.410 +# CONFIG_SCSI_SEAGATE is not set
   8.411 +# CONFIG_SCSI_SYM53C416 is not set
   8.412 +# CONFIG_SCSI_DC395x is not set
   8.413 +# CONFIG_SCSI_DC390T is not set
   8.414 +# CONFIG_SCSI_T128 is not set
   8.415 +# CONFIG_SCSI_U14_34F is not set
   8.416 +# CONFIG_SCSI_ULTRASTOR is not set
   8.417 +# CONFIG_SCSI_NSP32 is not set
   8.418 +# CONFIG_SCSI_DEBUG is not set
   8.419 +
   8.420 +#
   8.421 +# Old CD-ROM drivers (not SCSI, not IDE)
   8.422 +#
   8.423 +# CONFIG_CD_NO_IDESCSI is not set
   8.424 +
   8.425 +#
   8.426 +# Multi-device support (RAID and LVM)
   8.427 +#
   8.428 +CONFIG_MD=y
   8.429 +CONFIG_BLK_DEV_MD=y
   8.430 +# CONFIG_MD_LINEAR is not set
   8.431 +CONFIG_MD_RAID0=y
   8.432 +CONFIG_MD_RAID1=y
   8.433 +# CONFIG_MD_RAID10 is not set
   8.434 +CONFIG_MD_RAID5=y
   8.435 +# CONFIG_MD_RAID6 is not set
   8.436 +# CONFIG_MD_MULTIPATH is not set
   8.437 +# CONFIG_MD_FAULTY is not set
   8.438 +CONFIG_BLK_DEV_DM=y
   8.439 +# CONFIG_DM_CRYPT is not set
   8.440 +CONFIG_DM_SNAPSHOT=y
   8.441 +CONFIG_DM_MIRROR=y
   8.442 +# CONFIG_DM_ZERO is not set
   8.443 +
   8.444 +#
   8.445 +# Fusion MPT device support
   8.446 +#
   8.447 +# CONFIG_FUSION is not set
   8.448 +
   8.449 +#
   8.450 +# IEEE 1394 (FireWire) support
   8.451 +#
   8.452 +# CONFIG_IEEE1394 is not set
   8.453 +
   8.454 +#
   8.455 +# I2O device support
   8.456 +#
   8.457 +# CONFIG_I2O is not set
   8.458 +
   8.459 +#
   8.460 +# Networking support
   8.461 +#
   8.462 +CONFIG_NET=y
   8.463 +
   8.464 +#
   8.465 +# Networking options
   8.466 +#
   8.467 +CONFIG_PACKET=y
   8.468 +# CONFIG_PACKET_MMAP is not set
   8.469 +# CONFIG_NETLINK_DEV is not set
   8.470 +CONFIG_UNIX=y
   8.471 +# CONFIG_NET_KEY is not set
   8.472 +CONFIG_INET=y
   8.473 +# CONFIG_IP_MULTICAST is not set
   8.474 +# CONFIG_IP_ADVANCED_ROUTER is not set
   8.475 +CONFIG_IP_PNP=y
   8.476 +CONFIG_IP_PNP_DHCP=y
   8.477 +# CONFIG_IP_PNP_BOOTP is not set
   8.478 +# CONFIG_IP_PNP_RARP is not set
   8.479 +# CONFIG_NET_IPIP is not set
   8.480 +# CONFIG_NET_IPGRE is not set
   8.481 +# CONFIG_ARPD is not set
   8.482 +# CONFIG_SYN_COOKIES is not set
   8.483 +# CONFIG_INET_AH is not set
   8.484 +# CONFIG_INET_ESP is not set
   8.485 +# CONFIG_INET_IPCOMP is not set
   8.486 +# CONFIG_INET_TUNNEL is not set
   8.487 +CONFIG_IP_TCPDIAG=y
   8.488 +# CONFIG_IP_TCPDIAG_IPV6 is not set
   8.489 +
   8.490 +#
   8.491 +# IP: Virtual Server Configuration
   8.492 +#
   8.493 +# CONFIG_IP_VS is not set
   8.494 +# CONFIG_IPV6 is not set
   8.495 +CONFIG_NETFILTER=y
   8.496 +# CONFIG_NETFILTER_DEBUG is not set
   8.497 +CONFIG_BRIDGE_NETFILTER=y
   8.498 +
   8.499 +#
   8.500 +# IP: Netfilter Configuration
   8.501 +#
   8.502 +CONFIG_IP_NF_CONNTRACK=m
   8.503 +CONFIG_IP_NF_CT_ACCT=y
   8.504 +# CONFIG_IP_NF_CONNTRACK_MARK is not set
   8.505 +# CONFIG_IP_NF_CT_PROTO_SCTP is not set
   8.506 +CONFIG_IP_NF_FTP=m
   8.507 +# CONFIG_IP_NF_IRC is not set
   8.508 +# CONFIG_IP_NF_TFTP is not set
   8.509 +# CONFIG_IP_NF_AMANDA is not set
   8.510 +# CONFIG_IP_NF_QUEUE is not set
   8.511 +CONFIG_IP_NF_IPTABLES=m
   8.512 +# CONFIG_IP_NF_MATCH_LIMIT is not set
   8.513 +# CONFIG_IP_NF_MATCH_IPRANGE is not set
   8.514 +# CONFIG_IP_NF_MATCH_MAC is not set
   8.515 +# CONFIG_IP_NF_MATCH_PKTTYPE is not set
   8.516 +# CONFIG_IP_NF_MATCH_MARK is not set
   8.517 +# CONFIG_IP_NF_MATCH_MULTIPORT is not set
   8.518 +# CONFIG_IP_NF_MATCH_TOS is not set
   8.519 +# CONFIG_IP_NF_MATCH_RECENT is not set
   8.520 +# CONFIG_IP_NF_MATCH_ECN is not set
   8.521 +# CONFIG_IP_NF_MATCH_DSCP is not set
   8.522 +# CONFIG_IP_NF_MATCH_AH_ESP is not set
   8.523 +# CONFIG_IP_NF_MATCH_LENGTH is not set
   8.524 +# CONFIG_IP_NF_MATCH_TTL is not set
   8.525 +# CONFIG_IP_NF_MATCH_TCPMSS is not set
   8.526 +# CONFIG_IP_NF_MATCH_HELPER is not set
   8.527 +# CONFIG_IP_NF_MATCH_STATE is not set
   8.528 +# CONFIG_IP_NF_MATCH_CONNTRACK is not set
   8.529 +# CONFIG_IP_NF_MATCH_OWNER is not set
   8.530 +# CONFIG_IP_NF_MATCH_PHYSDEV is not set
   8.531 +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
   8.532 +# CONFIG_IP_NF_MATCH_REALM is not set
   8.533 +# CONFIG_IP_NF_MATCH_SCTP is not set
   8.534 +# CONFIG_IP_NF_MATCH_COMMENT is not set
   8.535 +# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
   8.536 +# CONFIG_IP_NF_FILTER is not set
   8.537 +# CONFIG_IP_NF_TARGET_LOG is not set
   8.538 +# CONFIG_IP_NF_TARGET_ULOG is not set
   8.539 +# CONFIG_IP_NF_TARGET_TCPMSS is not set
   8.540 +# CONFIG_IP_NF_NAT is not set
   8.541 +# CONFIG_IP_NF_MANGLE is not set
   8.542 +# CONFIG_IP_NF_RAW is not set
   8.543 +# CONFIG_IP_NF_ARPTABLES is not set
   8.544 +# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
   8.545 +# CONFIG_IP_NF_COMPAT_IPFWADM is not set
   8.546 +
   8.547 +#
   8.548 +# Bridge: Netfilter Configuration
   8.549 +#
   8.550 +# CONFIG_BRIDGE_NF_EBTABLES is not set
   8.551 +
   8.552 +#
   8.553 +# SCTP Configuration (EXPERIMENTAL)
   8.554 +#
   8.555 +# CONFIG_IP_SCTP is not set
   8.556 +# CONFIG_ATM is not set
   8.557 +CONFIG_BRIDGE=y
   8.558 +# CONFIG_VLAN_8021Q is not set
   8.559 +# CONFIG_DECNET is not set
   8.560 +# CONFIG_LLC2 is not set
   8.561 +# CONFIG_IPX is not set
   8.562 +# CONFIG_ATALK is not set
   8.563 +# CONFIG_X25 is not set
   8.564 +# CONFIG_LAPB is not set
   8.565 +# CONFIG_NET_DIVERT is not set
   8.566 +# CONFIG_ECONET is not set
   8.567 +# CONFIG_WAN_ROUTER is not set
   8.568 +
   8.569 +#
   8.570 +# QoS and/or fair queueing
   8.571 +#
   8.572 +# CONFIG_NET_SCHED is not set
   8.573 +# CONFIG_NET_CLS_ROUTE is not set
   8.574 +
   8.575 +#
   8.576 +# Network testing
   8.577 +#
   8.578 +# CONFIG_NET_PKTGEN is not set
   8.579 +# CONFIG_NETPOLL is not set
   8.580 +# CONFIG_NET_POLL_CONTROLLER is not set
   8.581 +# CONFIG_HAMRADIO is not set
   8.582 +# CONFIG_IRDA is not set
   8.583 +# CONFIG_BT is not set
   8.584 +CONFIG_NETDEVICES=y
   8.585 +# CONFIG_DUMMY is not set
   8.586 +# CONFIG_BONDING is not set
   8.587 +# CONFIG_EQUALIZER is not set
   8.588 +# CONFIG_TUN is not set
   8.589 +
   8.590 +#
   8.591 +# ARCnet devices
   8.592 +#
   8.593 +# CONFIG_ARCNET is not set
   8.594 +
   8.595 +#
   8.596 +# Ethernet (10 or 100Mbit)
   8.597 +#
   8.598 +CONFIG_NET_ETHERNET=y
   8.599 +CONFIG_MII=y
   8.600 +# CONFIG_HAPPYMEAL is not set
   8.601 +# CONFIG_SUNGEM is not set
   8.602 +CONFIG_NET_VENDOR_3COM=y
   8.603 +# CONFIG_EL1 is not set
   8.604 +# CONFIG_EL2 is not set
   8.605 +# CONFIG_ELPLUS is not set
   8.606 +# CONFIG_EL16 is not set
   8.607 +# CONFIG_EL3 is not set
   8.608 +# CONFIG_3C515 is not set
   8.609 +CONFIG_VORTEX=y
   8.610 +# CONFIG_TYPHOON is not set
   8.611 +# CONFIG_LANCE is not set
   8.612 +# CONFIG_NET_VENDOR_SMC is not set
   8.613 +# CONFIG_NET_VENDOR_RACAL is not set
   8.614 +
   8.615 +#
   8.616 +# Tulip family network device support
   8.617 +#
   8.618 +CONFIG_NET_TULIP=y
   8.619 +# CONFIG_DE2104X is not set
   8.620 +CONFIG_TULIP=y
   8.621 +# CONFIG_TULIP_MWI is not set
   8.622 +# CONFIG_TULIP_MMIO is not set
   8.623 +# CONFIG_TULIP_NAPI is not set
   8.624 +# CONFIG_DE4X5 is not set
   8.625 +# CONFIG_WINBOND_840 is not set
   8.626 +# CONFIG_DM9102 is not set
   8.627 +# CONFIG_AT1700 is not set
   8.628 +# CONFIG_DEPCA is not set
   8.629 +# CONFIG_HP100 is not set
   8.630 +# CONFIG_NET_ISA is not set
   8.631 +CONFIG_NET_PCI=y
   8.632 +CONFIG_PCNET32=y
   8.633 +# CONFIG_AMD8111_ETH is not set
   8.634 +# CONFIG_ADAPTEC_STARFIRE is not set
   8.635 +# CONFIG_AC3200 is not set
   8.636 +# CONFIG_APRICOT is not set
   8.637 +# CONFIG_B44 is not set
   8.638 +# CONFIG_FORCEDETH is not set
   8.639 +# CONFIG_CS89x0 is not set
   8.640 +# CONFIG_DGRS is not set
   8.641 +# CONFIG_EEPRO100 is not set
   8.642 +CONFIG_E100=y
   8.643 +# CONFIG_E100_NAPI is not set
   8.644 +# CONFIG_FEALNX is not set
   8.645 +# CONFIG_NATSEMI is not set
   8.646 +# CONFIG_NE2K_PCI is not set
   8.647 +# CONFIG_8139CP is not set
   8.648 +CONFIG_8139TOO=y
   8.649 +CONFIG_8139TOO_PIO=y
   8.650 +# CONFIG_8139TOO_TUNE_TWISTER is not set
   8.651 +# CONFIG_8139TOO_8129 is not set
   8.652 +# CONFIG_8139_OLD_RX_RESET is not set
   8.653 +# CONFIG_SIS900 is not set
   8.654 +# CONFIG_EPIC100 is not set
   8.655 +# CONFIG_SUNDANCE is not set
   8.656 +# CONFIG_TLAN is not set
   8.657 +CONFIG_VIA_RHINE=y
   8.658 +# CONFIG_VIA_RHINE_MMIO is not set
   8.659 +# CONFIG_NET_POCKET is not set
   8.660 +
   8.661 +#
   8.662 +# Ethernet (1000 Mbit)
   8.663 +#
   8.664 +CONFIG_ACENIC=y
   8.665 +# CONFIG_ACENIC_OMIT_TIGON_I is not set
   8.666 +# CONFIG_DL2K is not set
   8.667 +CONFIG_E1000=y
   8.668 +# CONFIG_E1000_NAPI is not set
   8.669 +# CONFIG_NS83820 is not set
   8.670 +# CONFIG_HAMACHI is not set
   8.671 +# CONFIG_YELLOWFIN is not set
   8.672 +# CONFIG_R8169 is not set
   8.673 +# CONFIG_SK98LIN is not set
   8.674 +# CONFIG_VIA_VELOCITY is not set
   8.675 +CONFIG_TIGON3=y
   8.676 +
   8.677 +#
   8.678 +# Ethernet (10000 Mbit)
   8.679 +#
   8.680 +# CONFIG_IXGB is not set
   8.681 +# CONFIG_S2IO is not set
   8.682 +
   8.683 +#
   8.684 +# Token Ring devices
   8.685 +#
   8.686 +# CONFIG_TR is not set
   8.687 +
   8.688 +#
   8.689 +# Wireless LAN (non-hamradio)
   8.690 +#
   8.691 +# CONFIG_NET_RADIO is not set
   8.692 +
   8.693 +#
   8.694 +# Wan interfaces
   8.695 +#
   8.696 +# CONFIG_WAN is not set
   8.697 +# CONFIG_FDDI is not set
   8.698 +# CONFIG_HIPPI is not set
   8.699 +# CONFIG_PPP is not set
   8.700 +# CONFIG_SLIP is not set
   8.701 +# CONFIG_NET_FC is not set
   8.702 +# CONFIG_SHAPER is not set
   8.703 +# CONFIG_NETCONSOLE is not set
   8.704 +
   8.705 +#
   8.706 +# ISDN subsystem
   8.707 +#
   8.708 +# CONFIG_ISDN is not set
   8.709 +
   8.710 +#
   8.711 +# Telephony Support
   8.712 +#
   8.713 +# CONFIG_PHONE is not set
   8.714 +
   8.715 +#
   8.716 +# Input device support
   8.717 +#
   8.718 +CONFIG_INPUT=y
   8.719 +
   8.720 +#
   8.721 +# Userland interfaces
   8.722 +#
   8.723 +CONFIG_INPUT_MOUSEDEV=y
   8.724 +CONFIG_INPUT_MOUSEDEV_PSAUX=y
   8.725 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
   8.726 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
   8.727 +# CONFIG_INPUT_JOYDEV is not set
   8.728 +# CONFIG_INPUT_TSDEV is not set
   8.729 +# CONFIG_INPUT_EVDEV is not set
   8.730 +# CONFIG_INPUT_EVBUG is not set
   8.731 +
   8.732 +#
   8.733 +# Input I/O drivers
   8.734 +#
   8.735 +# CONFIG_GAMEPORT is not set
   8.736 +CONFIG_SOUND_GAMEPORT=y
   8.737 +CONFIG_SERIO=y
   8.738 +CONFIG_SERIO_I8042=y
   8.739 +CONFIG_SERIO_SERPORT=y
   8.740 +# CONFIG_SERIO_CT82C710 is not set
   8.741 +# CONFIG_SERIO_PCIPS2 is not set
   8.742 +# CONFIG_SERIO_RAW is not set
   8.743 +
   8.744 +#
   8.745 +# Input Device Drivers
   8.746 +#
   8.747 +CONFIG_INPUT_KEYBOARD=y
   8.748 +CONFIG_KEYBOARD_ATKBD=y
   8.749 +# CONFIG_KEYBOARD_SUNKBD is not set
   8.750 +# CONFIG_KEYBOARD_LKKBD is not set
   8.751 +# CONFIG_KEYBOARD_XTKBD is not set
   8.752 +# CONFIG_KEYBOARD_NEWTON is not set
   8.753 +CONFIG_INPUT_MOUSE=y
   8.754 +CONFIG_MOUSE_PS2=y
   8.755 +# CONFIG_MOUSE_SERIAL is not set
   8.756 +# CONFIG_MOUSE_INPORT is not set
   8.757 +# CONFIG_MOUSE_LOGIBM is not set
   8.758 +# CONFIG_MOUSE_PC110PAD is not set
   8.759 +# CONFIG_MOUSE_VSXXXAA is not set
   8.760 +# CONFIG_INPUT_JOYSTICK is not set
   8.761 +# CONFIG_INPUT_TOUCHSCREEN is not set
   8.762 +# CONFIG_INPUT_MISC is not set
   8.763 +
   8.764 +#
   8.765 +# Character devices
   8.766 +#
   8.767 +CONFIG_VT=y
   8.768 +CONFIG_VT_CONSOLE=y
   8.769 +CONFIG_HW_CONSOLE=y
   8.770 +# CONFIG_SERIAL_NONSTANDARD is not set
   8.771 +
   8.772 +#
   8.773 +# Serial drivers
   8.774 +#
   8.775 +# CONFIG_SERIAL_8250 is not set
   8.776 +
   8.777 +#
   8.778 +# Non-8250 serial port support
   8.779 +#
   8.780 +CONFIG_UNIX98_PTYS=y
   8.781 +CONFIG_LEGACY_PTYS=y
   8.782 +CONFIG_LEGACY_PTY_COUNT=256
   8.783 +
   8.784 +#
   8.785 +# IPMI
   8.786 +#
   8.787 +# CONFIG_IPMI_HANDLER is not set
   8.788 +
   8.789 +#
   8.790 +# Watchdog Cards
   8.791 +#
   8.792 +# CONFIG_WATCHDOG is not set
   8.793 +# CONFIG_HW_RANDOM is not set
   8.794 +# CONFIG_NVRAM is not set
   8.795 +# CONFIG_RTC is not set
   8.796 +# CONFIG_GEN_RTC is not set
   8.797 +# CONFIG_DTLK is not set
   8.798 +# CONFIG_R3964 is not set
   8.799 +# CONFIG_APPLICOM is not set
   8.800 +# CONFIG_SONYPI is not set
   8.801 +
   8.802 +#
   8.803 +# Ftape, the floppy tape device driver
   8.804 +#
   8.805 +# CONFIG_FTAPE is not set
   8.806 +# CONFIG_AGP is not set
   8.807 +# CONFIG_DRM is not set
   8.808 +# CONFIG_MWAVE is not set
   8.809 +# CONFIG_RAW_DRIVER is not set
   8.810 +# CONFIG_HANGCHECK_TIMER is not set
   8.811 +
   8.812 +#
   8.813 +# I2C support
   8.814 +#
   8.815 +# CONFIG_I2C is not set
   8.816 +
   8.817 +#
   8.818 +# Dallas's 1-wire bus
   8.819 +#
   8.820 +# CONFIG_W1 is not set
   8.821 +
   8.822 +#
   8.823 +# Misc devices
   8.824 +#
   8.825 +# CONFIG_IBM_ASM is not set
   8.826 +
   8.827 +#
   8.828 +# Multimedia devices
   8.829 +#
   8.830 +# CONFIG_VIDEO_DEV is not set
   8.831 +
   8.832 +#
   8.833 +# Digital Video Broadcasting Devices
   8.834 +#
   8.835 +# CONFIG_DVB is not set
   8.836 +
   8.837 +#
   8.838 +# Graphics support
   8.839 +#
   8.840 +# CONFIG_FB is not set
   8.841 +# CONFIG_VIDEO_SELECT is not set
   8.842 +
   8.843 +#
   8.844 +# Console display driver support
   8.845 +#
   8.846 +CONFIG_VGA_CONSOLE=y
   8.847 +# CONFIG_MDA_CONSOLE is not set
   8.848 +CONFIG_DUMMY_CONSOLE=y
   8.849 +
   8.850 +#
   8.851 +# Sound
   8.852 +#
   8.853 +# CONFIG_SOUND is not set
   8.854 +
   8.855 +#
   8.856 +# USB support
   8.857 +#
   8.858 +# CONFIG_USB is not set
   8.859 +CONFIG_USB_ARCH_HAS_HCD=y
   8.860 +CONFIG_USB_ARCH_HAS_OHCI=y
   8.861 +
   8.862 +#
   8.863 +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
   8.864 +#
   8.865 +
   8.866 +#
   8.867 +# USB Gadget Support
   8.868 +#
   8.869 +# CONFIG_USB_GADGET is not set
   8.870 +
   8.871 +#
   8.872 +# File systems
   8.873 +#
   8.874 +CONFIG_EXT2_FS=y
   8.875 +# CONFIG_EXT2_FS_XATTR is not set
   8.876 +CONFIG_EXT3_FS=y
   8.877 +CONFIG_EXT3_FS_XATTR=y
   8.878 +# CONFIG_EXT3_FS_POSIX_ACL is not set
   8.879 +# CONFIG_EXT3_FS_SECURITY is not set
   8.880 +CONFIG_JBD=y
   8.881 +# CONFIG_JBD_DEBUG is not set
   8.882 +CONFIG_FS_MBCACHE=y
   8.883 +CONFIG_REISERFS_FS=y
   8.884 +# CONFIG_REISERFS_CHECK is not set
   8.885 +# CONFIG_REISERFS_PROC_INFO is not set
   8.886 +# CONFIG_REISERFS_FS_XATTR is not set
   8.887 +# CONFIG_JFS_FS is not set
   8.888 +# CONFIG_XFS_FS is not set
   8.889 +# CONFIG_MINIX_FS is not set
   8.890 +# CONFIG_ROMFS_FS is not set
   8.891 +# CONFIG_QUOTA is not set
   8.892 +CONFIG_DNOTIFY=y
   8.893 +# CONFIG_AUTOFS_FS is not set
   8.894 +# CONFIG_AUTOFS4_FS is not set
   8.895 +
   8.896 +#
   8.897 +# CD-ROM/DVD Filesystems
   8.898 +#
   8.899 +CONFIG_ISO9660_FS=y
   8.900 +CONFIG_JOLIET=y
   8.901 +CONFIG_ZISOFS=y
   8.902 +CONFIG_ZISOFS_FS=y
   8.903 +# CONFIG_UDF_FS is not set
   8.904 +
   8.905 +#
   8.906 +# DOS/FAT/NT Filesystems
   8.907 +#
   8.908 +CONFIG_FAT_FS=m
   8.909 +CONFIG_MSDOS_FS=m
   8.910 +CONFIG_VFAT_FS=m
   8.911 +CONFIG_FAT_DEFAULT_CODEPAGE=437
   8.912 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
   8.913 +# CONFIG_NTFS_FS is not set
   8.914 +
   8.915 +#
   8.916 +# Pseudo filesystems
   8.917 +#
   8.918 +CONFIG_PROC_FS=y
   8.919 +CONFIG_PROC_KCORE=y
   8.920 +CONFIG_SYSFS=y
   8.921 +# CONFIG_DEVFS_FS is not set
   8.922 +# CONFIG_DEVPTS_FS_XATTR is not set
   8.923 +CONFIG_TMPFS=y
   8.924 +# CONFIG_TMPFS_XATTR is not set
   8.925 +# CONFIG_HUGETLBFS is not set
   8.926 +# CONFIG_HUGETLB_PAGE is not set
   8.927 +CONFIG_RAMFS=y
   8.928 +
   8.929 +#
   8.930 +# Miscellaneous filesystems
   8.931 +#
   8.932 +# CONFIG_ADFS_FS is not set
   8.933 +# CONFIG_AFFS_FS is not set
   8.934 +# CONFIG_HFS_FS is not set
   8.935 +# CONFIG_HFSPLUS_FS is not set
   8.936 +# CONFIG_BEFS_FS is not set
   8.937 +# CONFIG_BFS_FS is not set
   8.938 +# CONFIG_EFS_FS is not set
   8.939 +# CONFIG_CRAMFS is not set
   8.940 +# CONFIG_VXFS_FS is not set
   8.941 +# CONFIG_HPFS_FS is not set
   8.942 +# CONFIG_QNX4FS_FS is not set
   8.943 +# CONFIG_SYSV_FS is not set
   8.944 +# CONFIG_UFS_FS is not set
   8.945 +
   8.946 +#
   8.947 +# Network File Systems
   8.948 +#
   8.949 +CONFIG_NFS_FS=y
   8.950 +CONFIG_NFS_V3=y
   8.951 +# CONFIG_NFS_V4 is not set
   8.952 +# CONFIG_NFS_DIRECTIO is not set
   8.953 +CONFIG_NFSD=m
   8.954 +CONFIG_NFSD_V3=y
   8.955 +# CONFIG_NFSD_V4 is not set
   8.956 +CONFIG_NFSD_TCP=y
   8.957 +CONFIG_ROOT_NFS=y
   8.958 +CONFIG_LOCKD=y
   8.959 +CONFIG_LOCKD_V4=y
   8.960 +CONFIG_EXPORTFS=m
   8.961 +CONFIG_SUNRPC=y
   8.962 +# CONFIG_RPCSEC_GSS_KRB5 is not set
   8.963 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
   8.964 +# CONFIG_SMB_FS is not set
   8.965 +# CONFIG_CIFS is not set
   8.966 +# CONFIG_NCP_FS is not set
   8.967 +# CONFIG_CODA_FS is not set
   8.968 +# CONFIG_AFS_FS is not set
   8.969 +
   8.970 +#
   8.971 +# Partition Types
   8.972 +#
   8.973 +# CONFIG_PARTITION_ADVANCED is not set
   8.974 +CONFIG_MSDOS_PARTITION=y
   8.975 +
   8.976 +#
   8.977 +# Native Language Support
   8.978 +#
   8.979 +CONFIG_NLS=y
   8.980 +CONFIG_NLS_DEFAULT="iso8859-1"
   8.981 +CONFIG_NLS_CODEPAGE_437=y
   8.982 +# CONFIG_NLS_CODEPAGE_737 is not set
   8.983 +# CONFIG_NLS_CODEPAGE_775 is not set
   8.984 +# CONFIG_NLS_CODEPAGE_850 is not set
   8.985 +# CONFIG_NLS_CODEPAGE_852 is not set
   8.986 +# CONFIG_NLS_CODEPAGE_855 is not set
   8.987 +# CONFIG_NLS_CODEPAGE_857 is not set
   8.988 +# CONFIG_NLS_CODEPAGE_860 is not set
   8.989 +# CONFIG_NLS_CODEPAGE_861 is not set
   8.990 +# CONFIG_NLS_CODEPAGE_862 is not set
   8.991 +# CONFIG_NLS_CODEPAGE_863 is not set
   8.992 +# CONFIG_NLS_CODEPAGE_864 is not set
   8.993 +# CONFIG_NLS_CODEPAGE_865 is not set
   8.994 +# CONFIG_NLS_CODEPAGE_866 is not set
   8.995 +# CONFIG_NLS_CODEPAGE_869 is not set
   8.996 +# CONFIG_NLS_CODEPAGE_936 is not set
   8.997 +# CONFIG_NLS_CODEPAGE_950 is not set
   8.998 +# CONFIG_NLS_CODEPAGE_932 is not set
   8.999 +# CONFIG_NLS_CODEPAGE_949 is not set
  8.1000 +# CONFIG_NLS_CODEPAGE_874 is not set
  8.1001 +# CONFIG_NLS_ISO8859_8 is not set
  8.1002 +# CONFIG_NLS_CODEPAGE_1250 is not set
  8.1003 +# CONFIG_NLS_CODEPAGE_1251 is not set
  8.1004 +# CONFIG_NLS_ASCII is not set
  8.1005 +CONFIG_NLS_ISO8859_1=y
  8.1006 +# CONFIG_NLS_ISO8859_2 is not set
  8.1007 +# CONFIG_NLS_ISO8859_3 is not set
  8.1008 +# CONFIG_NLS_ISO8859_4 is not set
  8.1009 +# CONFIG_NLS_ISO8859_5 is not set
  8.1010 +# CONFIG_NLS_ISO8859_6 is not set
  8.1011 +# CONFIG_NLS_ISO8859_7 is not set
  8.1012 +# CONFIG_NLS_ISO8859_9 is not set
  8.1013 +# CONFIG_NLS_ISO8859_13 is not set
  8.1014 +# CONFIG_NLS_ISO8859_14 is not set
  8.1015 +# CONFIG_NLS_ISO8859_15 is not set
  8.1016 +# CONFIG_NLS_KOI8_R is not set
  8.1017 +# CONFIG_NLS_KOI8_U is not set
  8.1018 +# CONFIG_NLS_UTF8 is not set
  8.1019 +
  8.1020 +#
  8.1021 +# Security options
  8.1022 +#
  8.1023 +# CONFIG_KEYS is not set
  8.1024 +# CONFIG_SECURITY is not set
  8.1025 +
  8.1026 +#
  8.1027 +# Cryptographic options
  8.1028 +#
  8.1029 +CONFIG_CRYPTO=y
  8.1030 +CONFIG_CRYPTO_HMAC=y
  8.1031 +# CONFIG_CRYPTO_NULL is not set
  8.1032 +# CONFIG_CRYPTO_MD4 is not set
  8.1033 +CONFIG_CRYPTO_MD5=m
  8.1034 +CONFIG_CRYPTO_SHA1=m
  8.1035 +# CONFIG_CRYPTO_SHA256 is not set
  8.1036 +# CONFIG_CRYPTO_SHA512 is not set
  8.1037 +# CONFIG_CRYPTO_WP512 is not set
  8.1038 +CONFIG_CRYPTO_DES=m
  8.1039 +# CONFIG_CRYPTO_BLOWFISH is not set
  8.1040 +# CONFIG_CRYPTO_TWOFISH is not set
  8.1041 +# CONFIG_CRYPTO_SERPENT is not set
  8.1042 +# CONFIG_CRYPTO_AES_586 is not set
  8.1043 +# CONFIG_CRYPTO_CAST5 is not set
  8.1044 +# CONFIG_CRYPTO_CAST6 is not set
  8.1045 +# CONFIG_CRYPTO_TEA is not set
  8.1046 +# CONFIG_CRYPTO_ARC4 is not set
  8.1047 +# CONFIG_CRYPTO_KHAZAD is not set
  8.1048 +# CONFIG_CRYPTO_ANUBIS is not set
  8.1049 +# CONFIG_CRYPTO_DEFLATE is not set
  8.1050 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
  8.1051 +CONFIG_CRYPTO_CRC32C=m
  8.1052 +# CONFIG_CRYPTO_TEST is not set
  8.1053 +
  8.1054 +#
  8.1055 +# Library routines
  8.1056 +#
  8.1057 +# CONFIG_CRC_CCITT is not set
  8.1058 +CONFIG_CRC32=y
  8.1059 +CONFIG_LIBCRC32C=y
  8.1060 +CONFIG_ZLIB_INFLATE=y
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/configs/xenU_defconfig	Mon Dec 27 10:12:02 2004 +0000
     9.3 @@ -0,0 +1,521 @@
     9.4 +#
     9.5 +# Automatically generated make config: don't edit
     9.6 +# Linux kernel version: 2.6.10-rc3-xenU
     9.7 +# Sun Dec 26 10:35:15 2004
     9.8 +#
     9.9 +CONFIG_XEN=y
    9.10 +CONFIG_ARCH_XEN=y
    9.11 +CONFIG_NO_IDLE_HZ=y
    9.12 +
    9.13 +#
    9.14 +# XEN
    9.15 +#
    9.16 +# CONFIG_XEN_PRIVILEGED_GUEST is not set
    9.17 +# CONFIG_XEN_PHYSDEV_ACCESS is not set
    9.18 +# CONFIG_XEN_BLKDEV_BACKEND is not set
    9.19 +# CONFIG_XEN_BLKDEV_TAP_BE is not set
    9.20 +# CONFIG_XEN_NETDEV_BACKEND is not set
    9.21 +CONFIG_XEN_BLKDEV_FRONTEND=y
    9.22 +CONFIG_XEN_NETDEV_FRONTEND=y
    9.23 +# CONFIG_XEN_BLKDEV_TAP is not set
    9.24 +# CONFIG_XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER is not set
    9.25 +CONFIG_XEN_WRITABLE_PAGETABLES=y
    9.26 +CONFIG_XEN_SCRUB_PAGES=y
    9.27 +CONFIG_HAVE_ARCH_DEV_ALLOC_SKB=y
    9.28 +CONFIG_X86=y
    9.29 +# CONFIG_X86_64 is not set
    9.30 +
    9.31 +#
    9.32 +# Code maturity level options
    9.33 +#
    9.34 +CONFIG_EXPERIMENTAL=y
    9.35 +CONFIG_CLEAN_COMPILE=y
    9.36 +CONFIG_BROKEN_ON_SMP=y
    9.37 +CONFIG_LOCK_KERNEL=y
    9.38 +
    9.39 +#
    9.40 +# General setup
    9.41 +#
    9.42 +CONFIG_LOCALVERSION=""
    9.43 +CONFIG_SWAP=y
    9.44 +CONFIG_SYSVIPC=y
    9.45 +# CONFIG_POSIX_MQUEUE is not set
    9.46 +# CONFIG_BSD_PROCESS_ACCT is not set
    9.47 +CONFIG_SYSCTL=y
    9.48 +# CONFIG_AUDIT is not set
    9.49 +CONFIG_LOG_BUF_SHIFT=14
    9.50 +CONFIG_HOTPLUG=y
    9.51 +CONFIG_KOBJECT_UEVENT=y
    9.52 +# CONFIG_IKCONFIG is not set
    9.53 +# CONFIG_EMBEDDED is not set
    9.54 +CONFIG_KALLSYMS=y
    9.55 +# CONFIG_KALLSYMS_ALL is not set
    9.56 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
    9.57 +CONFIG_FUTEX=y
    9.58 +CONFIG_EPOLL=y
    9.59 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
    9.60 +CONFIG_SHMEM=y
    9.61 +CONFIG_CC_ALIGN_FUNCTIONS=0
    9.62 +CONFIG_CC_ALIGN_LABELS=0
    9.63 +CONFIG_CC_ALIGN_LOOPS=0
    9.64 +CONFIG_CC_ALIGN_JUMPS=0
    9.65 +# CONFIG_TINY_SHMEM is not set
    9.66 +
    9.67 +#
    9.68 +# Loadable module support
    9.69 +#
    9.70 +CONFIG_MODULES=y
    9.71 +CONFIG_MODULE_UNLOAD=y
    9.72 +# CONFIG_MODULE_FORCE_UNLOAD is not set
    9.73 +CONFIG_OBSOLETE_MODPARM=y
    9.74 +# CONFIG_MODVERSIONS is not set
    9.75 +# CONFIG_MODULE_SRCVERSION_ALL is not set
    9.76 +CONFIG_KMOD=y
    9.77 +
    9.78 +#
    9.79 +# X86 Processor Configuration
    9.80 +#
    9.81 +CONFIG_XENARCH="i386"
    9.82 +CONFIG_MMU=y
    9.83 +CONFIG_UID16=y
    9.84 +CONFIG_GENERIC_ISA_DMA=y
    9.85 +CONFIG_GENERIC_IOMAP=y
    9.86 +# CONFIG_M386 is not set
    9.87 +# CONFIG_M486 is not set
    9.88 +# CONFIG_M586 is not set
    9.89 +# CONFIG_M586TSC is not set
    9.90 +# CONFIG_M586MMX is not set
    9.91 +# CONFIG_M686 is not set
    9.92 +# CONFIG_MPENTIUMII is not set
    9.93 +# CONFIG_MPENTIUMIII is not set
    9.94 +# CONFIG_MPENTIUMM is not set
    9.95 +CONFIG_MPENTIUM4=y
    9.96 +# CONFIG_MK6 is not set
    9.97 +# CONFIG_MK7 is not set
    9.98 +# CONFIG_MK8 is not set
    9.99 +# CONFIG_MCRUSOE is not set
   9.100 +# CONFIG_MEFFICEON is not set
   9.101 +# CONFIG_MWINCHIPC6 is not set
   9.102 +# CONFIG_MWINCHIP2 is not set
   9.103 +# CONFIG_MWINCHIP3D is not set
   9.104 +# CONFIG_MCYRIXIII is not set
   9.105 +# CONFIG_MVIAC3_2 is not set
   9.106 +# CONFIG_X86_GENERIC is not set
   9.107 +CONFIG_X86_CMPXCHG=y
   9.108 +CONFIG_X86_XADD=y
   9.109 +CONFIG_X86_L1_CACHE_SHIFT=7
   9.110 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
   9.111 +CONFIG_X86_WP_WORKS_OK=y
   9.112 +CONFIG_X86_INVLPG=y
   9.113 +CONFIG_X86_BSWAP=y
   9.114 +CONFIG_X86_POPAD_OK=y
   9.115 +CONFIG_X86_GOOD_APIC=y
   9.116 +CONFIG_X86_INTEL_USERCOPY=y
   9.117 +CONFIG_X86_USE_PPRO_CHECKSUM=y
   9.118 +# CONFIG_HPET_TIMER is not set
   9.119 +# CONFIG_HPET_EMULATE_RTC is not set
   9.120 +# CONFIG_SMP is not set
   9.121 +CONFIG_PREEMPT=y
   9.122 +CONFIG_X86_CPUID=y
   9.123 +
   9.124 +#
   9.125 +# Firmware Drivers
   9.126 +#
   9.127 +# CONFIG_EDD is not set
   9.128 +CONFIG_NOHIGHMEM=y
   9.129 +# CONFIG_HIGHMEM4G is not set
   9.130 +CONFIG_HAVE_DEC_LOCK=y
   9.131 +# CONFIG_REGPARM is not set
   9.132 +
   9.133 +#
   9.134 +# Kernel hacking
   9.135 +#
   9.136 +CONFIG_DEBUG_KERNEL=y
   9.137 +CONFIG_EARLY_PRINTK=y
   9.138 +# CONFIG_DEBUG_STACKOVERFLOW is not set
   9.139 +# CONFIG_DEBUG_STACK_USAGE is not set
   9.140 +CONFIG_DEBUG_SLAB=y
   9.141 +# CONFIG_MAGIC_SYSRQ is not set
   9.142 +# CONFIG_DEBUG_SPINLOCK is not set
   9.143 +CONFIG_DEBUG_PAGEALLOC=y
   9.144 +# CONFIG_DEBUG_INFO is not set
   9.145 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
   9.146 +# CONFIG_FRAME_POINTER is not set
   9.147 +# CONFIG_4KSTACKS is not set
   9.148 +CONFIG_GENERIC_HARDIRQS=y
   9.149 +CONFIG_GENERIC_IRQ_PROBE=y
   9.150 +CONFIG_X86_BIOS_REBOOT=y
   9.151 +CONFIG_PC=y
   9.152 +
   9.153 +#
   9.154 +# Executable file formats
   9.155 +#
   9.156 +CONFIG_BINFMT_ELF=y
   9.157 +# CONFIG_BINFMT_AOUT is not set
   9.158 +# CONFIG_BINFMT_MISC is not set
   9.159 +
   9.160 +#
   9.161 +# Device Drivers
   9.162 +#
   9.163 +
   9.164 +#
   9.165 +# Generic Driver Options
   9.166 +#
   9.167 +CONFIG_STANDALONE=y
   9.168 +CONFIG_PREVENT_FIRMWARE_BUILD=y
   9.169 +# CONFIG_FW_LOADER is not set
   9.170 +# CONFIG_DEBUG_DRIVER is not set
   9.171 +
   9.172 +#
   9.173 +# Block devices
   9.174 +#
   9.175 +# CONFIG_BLK_DEV_FD is not set
   9.176 +CONFIG_BLK_DEV_LOOP=m
   9.177 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
   9.178 +CONFIG_BLK_DEV_NBD=m
   9.179 +CONFIG_BLK_DEV_RAM=y
   9.180 +CONFIG_BLK_DEV_RAM_COUNT=16
   9.181 +CONFIG_BLK_DEV_RAM_SIZE=4096
   9.182 +CONFIG_BLK_DEV_INITRD=y
   9.183 +CONFIG_INITRAMFS_SOURCE=""
   9.184 +# CONFIG_LBD is not set
   9.185 +# CONFIG_CDROM_PKTCDVD is not set
   9.186 +
   9.187 +#
   9.188 +# IO Schedulers
   9.189 +#
   9.190 +CONFIG_IOSCHED_NOOP=y
   9.191 +CONFIG_IOSCHED_AS=y
   9.192 +CONFIG_IOSCHED_DEADLINE=y
   9.193 +CONFIG_IOSCHED_CFQ=y
   9.194 +
   9.195 +#
   9.196 +# SCSI device support
   9.197 +#
   9.198 +CONFIG_SCSI=m
   9.199 +CONFIG_SCSI_PROC_FS=y
   9.200 +
   9.201 +#
   9.202 +# SCSI support type (disk, tape, CD-ROM)
   9.203 +#
   9.204 +CONFIG_BLK_DEV_SD=m
   9.205 +# CONFIG_CHR_DEV_ST is not set
   9.206 +# CONFIG_CHR_DEV_OSST is not set
   9.207 +# CONFIG_BLK_DEV_SR is not set
   9.208 +# CONFIG_CHR_DEV_SG is not set
   9.209 +
   9.210 +#
   9.211 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
   9.212 +#
   9.213 +# CONFIG_SCSI_MULTI_LUN is not set
   9.214 +# CONFIG_SCSI_CONSTANTS is not set
   9.215 +# CONFIG_SCSI_LOGGING is not set
   9.216 +
   9.217 +#
   9.218 +# SCSI Transport Attributes
   9.219 +#
   9.220 +# CONFIG_SCSI_SPI_ATTRS is not set
   9.221 +# CONFIG_SCSI_FC_ATTRS is not set
   9.222 +
   9.223 +#
   9.224 +# SCSI low-level drivers
   9.225 +#
   9.226 +# CONFIG_SCSI_SATA is not set
   9.227 +# CONFIG_SCSI_DEBUG is not set
   9.228 +
   9.229 +#
   9.230 +# Multi-device support (RAID and LVM)
   9.231 +#
   9.232 +# CONFIG_MD is not set
   9.233 +
   9.234 +#
   9.235 +# Networking support
   9.236 +#
   9.237 +CONFIG_NET=y
   9.238 +
   9.239 +#
   9.240 +# Networking options
   9.241 +#
   9.242 +CONFIG_PACKET=y
   9.243 +# CONFIG_PACKET_MMAP is not set
   9.244 +# CONFIG_NETLINK_DEV is not set
   9.245 +CONFIG_UNIX=y
   9.246 +# CONFIG_NET_KEY is not set
   9.247 +CONFIG_INET=y
   9.248 +# CONFIG_IP_MULTICAST is not set
   9.249 +# CONFIG_IP_ADVANCED_ROUTER is not set
   9.250 +CONFIG_IP_PNP=y
   9.251 +# CONFIG_IP_PNP_DHCP is not set
   9.252 +# CONFIG_IP_PNP_BOOTP is not set
   9.253 +# CONFIG_IP_PNP_RARP is not set
   9.254 +# CONFIG_NET_IPIP is not set
   9.255 +# CONFIG_NET_IPGRE is not set
   9.256 +# CONFIG_ARPD is not set
   9.257 +# CONFIG_SYN_COOKIES is not set
   9.258 +# CONFIG_INET_AH is not set
   9.259 +# CONFIG_INET_ESP is not set
   9.260 +# CONFIG_INET_IPCOMP is not set
   9.261 +# CONFIG_INET_TUNNEL is not set
   9.262 +CONFIG_IP_TCPDIAG=y
   9.263 +# CONFIG_IP_TCPDIAG_IPV6 is not set
   9.264 +# CONFIG_IPV6 is not set
   9.265 +# CONFIG_NETFILTER is not set
   9.266 +
   9.267 +#
   9.268 +# SCTP Configuration (EXPERIMENTAL)
   9.269 +#
   9.270 +# CONFIG_IP_SCTP is not set
   9.271 +# CONFIG_ATM is not set
   9.272 +# CONFIG_BRIDGE is not set
   9.273 +# CONFIG_VLAN_8021Q is not set
   9.274 +# CONFIG_DECNET is not set
   9.275 +# CONFIG_LLC2 is not set
   9.276 +# CONFIG_IPX is not set
   9.277 +# CONFIG_ATALK is not set
   9.278 +# CONFIG_X25 is not set
   9.279 +# CONFIG_LAPB is not set
   9.280 +# CONFIG_NET_DIVERT is not set
   9.281 +# CONFIG_ECONET is not set
   9.282 +# CONFIG_WAN_ROUTER is not set
   9.283 +
   9.284 +#
   9.285 +# QoS and/or fair queueing
   9.286 +#
   9.287 +# CONFIG_NET_SCHED is not set
   9.288 +# CONFIG_NET_CLS_ROUTE is not set
   9.289 +
   9.290 +#
   9.291 +# Network testing
   9.292 +#
   9.293 +# CONFIG_NET_PKTGEN is not set
   9.294 +# CONFIG_NETPOLL is not set
   9.295 +# CONFIG_NET_POLL_CONTROLLER is not set
   9.296 +# CONFIG_HAMRADIO is not set
   9.297 +# CONFIG_IRDA is not set
   9.298 +# CONFIG_BT is not set
   9.299 +CONFIG_NETDEVICES=y
   9.300 +# CONFIG_DUMMY is not set
   9.301 +# CONFIG_BONDING is not set
   9.302 +# CONFIG_EQUALIZER is not set
   9.303 +# CONFIG_TUN is not set
   9.304 +
   9.305 +#
   9.306 +# Ethernet (10 or 100Mbit)
   9.307 +#
   9.308 +# CONFIG_NET_ETHERNET is not set
   9.309 +
   9.310 +#
   9.311 +# Ethernet (1000 Mbit)
   9.312 +#
   9.313 +
   9.314 +#
   9.315 +# Ethernet (10000 Mbit)
   9.316 +#
   9.317 +
   9.318 +#
   9.319 +# Token Ring devices
   9.320 +#
   9.321 +
   9.322 +#
   9.323 +# Wireless LAN (non-hamradio)
   9.324 +#
   9.325 +# CONFIG_NET_RADIO is not set
   9.326 +
   9.327 +#
   9.328 +# Wan interfaces
   9.329 +#
   9.330 +# CONFIG_WAN is not set
   9.331 +# CONFIG_PPP is not set
   9.332 +# CONFIG_SLIP is not set
   9.333 +# CONFIG_SHAPER is not set
   9.334 +# CONFIG_NETCONSOLE is not set
   9.335 +CONFIG_UNIX98_PTYS=y
   9.336 +
   9.337 +#
   9.338 +# File systems
   9.339 +#
   9.340 +CONFIG_EXT2_FS=y
   9.341 +# CONFIG_EXT2_FS_XATTR is not set
   9.342 +CONFIG_EXT3_FS=y
   9.343 +CONFIG_EXT3_FS_XATTR=y
   9.344 +# CONFIG_EXT3_FS_POSIX_ACL is not set
   9.345 +# CONFIG_EXT3_FS_SECURITY is not set
   9.346 +CONFIG_JBD=y
   9.347 +# CONFIG_JBD_DEBUG is not set
   9.348 +CONFIG_FS_MBCACHE=y
   9.349 +CONFIG_REISERFS_FS=y
   9.350 +# CONFIG_REISERFS_CHECK is not set
   9.351 +# CONFIG_REISERFS_PROC_INFO is not set
   9.352 +# CONFIG_REISERFS_FS_XATTR is not set
   9.353 +# CONFIG_JFS_FS is not set
   9.354 +# CONFIG_XFS_FS is not set
   9.355 +# CONFIG_MINIX_FS is not set
   9.356 +# CONFIG_ROMFS_FS is not set
   9.357 +# CONFIG_QUOTA is not set
   9.358 +CONFIG_DNOTIFY=y
   9.359 +CONFIG_AUTOFS_FS=y
   9.360 +CONFIG_AUTOFS4_FS=y
   9.361 +
   9.362 +#
   9.363 +# CD-ROM/DVD Filesystems
   9.364 +#
   9.365 +CONFIG_ISO9660_FS=y
   9.366 +CONFIG_JOLIET=y
   9.367 +CONFIG_ZISOFS=y
   9.368 +CONFIG_ZISOFS_FS=y
   9.369 +# CONFIG_UDF_FS is not set
   9.370 +
   9.371 +#
   9.372 +# DOS/FAT/NT Filesystems
   9.373 +#
   9.374 +CONFIG_FAT_FS=m
   9.375 +CONFIG_MSDOS_FS=m
   9.376 +CONFIG_VFAT_FS=m
   9.377 +CONFIG_FAT_DEFAULT_CODEPAGE=437
   9.378 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
   9.379 +# CONFIG_NTFS_FS is not set
   9.380 +
   9.381 +#
   9.382 +# Pseudo filesystems
   9.383 +#
   9.384 +CONFIG_PROC_FS=y
   9.385 +CONFIG_PROC_KCORE=y
   9.386 +CONFIG_SYSFS=y
   9.387 +# CONFIG_DEVFS_FS is not set
   9.388 +CONFIG_DEVPTS_FS_XATTR=y
   9.389 +# CONFIG_DEVPTS_FS_SECURITY is not set
   9.390 +CONFIG_TMPFS=y
   9.391 +# CONFIG_TMPFS_XATTR is not set
   9.392 +# CONFIG_HUGETLBFS is not set
   9.393 +# CONFIG_HUGETLB_PAGE is not set
   9.394 +CONFIG_RAMFS=y
   9.395 +
   9.396 +#
   9.397 +# Miscellaneous filesystems
   9.398 +#
   9.399 +# CONFIG_ADFS_FS is not set
   9.400 +# CONFIG_AFFS_FS is not set
   9.401 +# CONFIG_HFS_FS is not set
   9.402 +# CONFIG_HFSPLUS_FS is not set
   9.403 +# CONFIG_BEFS_FS is not set
   9.404 +# CONFIG_BFS_FS is not set
   9.405 +# CONFIG_EFS_FS is not set
   9.406 +# CONFIG_CRAMFS is not set
   9.407 +# CONFIG_VXFS_FS is not set
   9.408 +# CONFIG_HPFS_FS is not set
   9.409 +# CONFIG_QNX4FS_FS is not set
   9.410 +# CONFIG_SYSV_FS is not set
   9.411 +# CONFIG_UFS_FS is not set
   9.412 +
   9.413 +#
   9.414 +# Network File Systems
   9.415 +#
   9.416 +CONFIG_NFS_FS=y
   9.417 +CONFIG_NFS_V3=y
   9.418 +# CONFIG_NFS_V4 is not set
   9.419 +# CONFIG_NFS_DIRECTIO is not set
   9.420 +# CONFIG_NFSD is not set
   9.421 +CONFIG_ROOT_NFS=y
   9.422 +CONFIG_LOCKD=y
   9.423 +CONFIG_LOCKD_V4=y
   9.424 +# CONFIG_EXPORTFS is not set
   9.425 +CONFIG_SUNRPC=y
   9.426 +# CONFIG_RPCSEC_GSS_KRB5 is not set
   9.427 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
   9.428 +# CONFIG_SMB_FS is not set
   9.429 +# CONFIG_CIFS is not set
   9.430 +# CONFIG_NCP_FS is not set
   9.431 +# CONFIG_CODA_FS is not set
   9.432 +# CONFIG_AFS_FS is not set
   9.433 +
   9.434 +#
   9.435 +# Partition Types
   9.436 +#
   9.437 +# CONFIG_PARTITION_ADVANCED is not set
   9.438 +CONFIG_MSDOS_PARTITION=y
   9.439 +
   9.440 +#
   9.441 +# Native Language Support
   9.442 +#
   9.443 +CONFIG_NLS=y
   9.444 +CONFIG_NLS_DEFAULT="iso8859-1"
   9.445 +CONFIG_NLS_CODEPAGE_437=y
   9.446 +# CONFIG_NLS_CODEPAGE_737 is not set
   9.447 +# CONFIG_NLS_CODEPAGE_775 is not set
   9.448 +# CONFIG_NLS_CODEPAGE_850 is not set
   9.449 +# CONFIG_NLS_CODEPAGE_852 is not set
   9.450 +# CONFIG_NLS_CODEPAGE_855 is not set
   9.451 +# CONFIG_NLS_CODEPAGE_857 is not set
   9.452 +# CONFIG_NLS_CODEPAGE_860 is not set
   9.453 +# CONFIG_NLS_CODEPAGE_861 is not set
   9.454 +# CONFIG_NLS_CODEPAGE_862 is not set
   9.455 +# CONFIG_NLS_CODEPAGE_863 is not set
   9.456 +# CONFIG_NLS_CODEPAGE_864 is not set
   9.457 +# CONFIG_NLS_CODEPAGE_865 is not set
   9.458 +# CONFIG_NLS_CODEPAGE_866 is not set
   9.459 +# CONFIG_NLS_CODEPAGE_869 is not set
   9.460 +# CONFIG_NLS_CODEPAGE_936 is not set
   9.461 +# CONFIG_NLS_CODEPAGE_950 is not set
   9.462 +# CONFIG_NLS_CODEPAGE_932 is not set
   9.463 +# CONFIG_NLS_CODEPAGE_949 is not set
   9.464 +# CONFIG_NLS_CODEPAGE_874 is not set
   9.465 +# CONFIG_NLS_ISO8859_8 is not set
   9.466 +# CONFIG_NLS_CODEPAGE_1250 is not set
   9.467 +# CONFIG_NLS_CODEPAGE_1251 is not set
   9.468 +# CONFIG_NLS_ASCII is not set
   9.469 +CONFIG_NLS_ISO8859_1=y
   9.470 +# CONFIG_NLS_ISO8859_2 is not set
   9.471 +# CONFIG_NLS_ISO8859_3 is not set
   9.472 +# CONFIG_NLS_ISO8859_4 is not set
   9.473 +# CONFIG_NLS_ISO8859_5 is not set
   9.474 +# CONFIG_NLS_ISO8859_6 is not set
   9.475 +# CONFIG_NLS_ISO8859_7 is not set
   9.476 +# CONFIG_NLS_ISO8859_9 is not set
   9.477 +# CONFIG_NLS_ISO8859_13 is not set
   9.478 +# CONFIG_NLS_ISO8859_14 is not set
   9.479 +# CONFIG_NLS_ISO8859_15 is not set
   9.480 +# CONFIG_NLS_KOI8_R is not set
   9.481 +# CONFIG_NLS_KOI8_U is not set
   9.482 +# CONFIG_NLS_UTF8 is not set
   9.483 +
   9.484 +#
   9.485 +# Security options
   9.486 +#
   9.487 +# CONFIG_KEYS is not set
   9.488 +# CONFIG_SECURITY is not set
   9.489 +
   9.490 +#
   9.491 +# Cryptographic options
   9.492 +#
   9.493 +CONFIG_CRYPTO=y
   9.494 +# CONFIG_CRYPTO_HMAC is not set
   9.495 +# CONFIG_CRYPTO_NULL is not set
   9.496 +# CONFIG_CRYPTO_MD4 is not set
   9.497 +CONFIG_CRYPTO_MD5=m
   9.498 +# CONFIG_CRYPTO_SHA1 is not set
   9.499 +# CONFIG_CRYPTO_SHA256 is not set
   9.500 +# CONFIG_CRYPTO_SHA512 is not set
   9.501 +# CONFIG_CRYPTO_WP512 is not set
   9.502 +# CONFIG_CRYPTO_DES is not set
   9.503 +# CONFIG_CRYPTO_BLOWFISH is not set
   9.504 +# CONFIG_CRYPTO_TWOFISH is not set
   9.505 +# CONFIG_CRYPTO_SERPENT is not set
   9.506 +# CONFIG_CRYPTO_AES_586 is not set
   9.507 +# CONFIG_CRYPTO_CAST5 is not set
   9.508 +# CONFIG_CRYPTO_CAST6 is not set
   9.509 +# CONFIG_CRYPTO_TEA is not set
   9.510 +# CONFIG_CRYPTO_ARC4 is not set
   9.511 +# CONFIG_CRYPTO_KHAZAD is not set
   9.512 +# CONFIG_CRYPTO_ANUBIS is not set
   9.513 +# CONFIG_CRYPTO_DEFLATE is not set
   9.514 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
   9.515 +CONFIG_CRYPTO_CRC32C=m
   9.516 +# CONFIG_CRYPTO_TEST is not set
   9.517 +
   9.518 +#
   9.519 +# Library routines
   9.520 +#
   9.521 +# CONFIG_CRC_CCITT is not set
   9.522 +# CONFIG_CRC32 is not set
   9.523 +CONFIG_LIBCRC32C=m
   9.524 +CONFIG_ZLIB_INFLATE=y
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/Kconfig	Mon Dec 27 10:12:02 2004 +0000
    10.3 @@ -0,0 +1,953 @@
    10.4 +#
    10.5 +# For a description of the syntax of this configuration file,
    10.6 +# see Documentation/kbuild/kconfig-language.txt.
    10.7 +#
    10.8 +
    10.9 +menu "X86 Processor Configuration"
   10.10 +
   10.11 +config XENARCH
   10.12 +	string
   10.13 +	default i386
   10.14 +
   10.15 +config MMU
   10.16 +	bool
   10.17 +	default y
   10.18 +
   10.19 +config SBUS
   10.20 +	bool
   10.21 +
   10.22 +config UID16
   10.23 +	bool
   10.24 +	default y
   10.25 +
   10.26 +config GENERIC_ISA_DMA
   10.27 +	bool
   10.28 +	default y
   10.29 +
   10.30 +config GENERIC_IOMAP
   10.31 +	bool
   10.32 +	default y
   10.33 +
   10.34 +choice
   10.35 +	prompt "Processor family"
   10.36 +	default M686
   10.37 +
   10.38 +config M386
   10.39 +	bool "386"
   10.40 +	---help---
   10.41 +	  This is the processor type of your CPU. This information is used for
   10.42 +	  optimizing purposes. In order to compile a kernel that can run on
   10.43 +	  all x86 CPU types (albeit not optimally fast), you can specify
   10.44 +	  "386" here.
   10.45 +
   10.46 +	  The kernel will not necessarily run on earlier architectures than
   10.47 +	  the one you have chosen, e.g. a Pentium optimized kernel will run on
   10.48 +	  a PPro, but not necessarily on a i486.
   10.49 +
   10.50 +	  Here are the settings recommended for greatest speed:
   10.51 +	  - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI
   10.52 +	  486DLC/DLC2, UMC 486SX-S and NexGen Nx586.  Only "386" kernels
   10.53 +	  will run on a 386 class machine.
   10.54 +	  - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or
   10.55 +	  SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.
   10.56 +	  - "586" for generic Pentium CPUs lacking the TSC
   10.57 +	  (time stamp counter) register.
   10.58 +	  - "Pentium-Classic" for the Intel Pentium.
   10.59 +	  - "Pentium-MMX" for the Intel Pentium MMX.
   10.60 +	  - "Pentium-Pro" for the Intel Pentium Pro.
   10.61 +	  - "Pentium-II" for the Intel Pentium II or pre-Coppermine Celeron.
   10.62 +	  - "Pentium-III" for the Intel Pentium III or Coppermine Celeron.
   10.63 +	  - "Pentium-4" for the Intel Pentium 4 or P4-based Celeron.
   10.64 +	  - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).
   10.65 +	  - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird).
   10.66 +	  - "Crusoe" for the Transmeta Crusoe series.
   10.67 +	  - "Efficeon" for the Transmeta Efficeon series.
   10.68 +	  - "Winchip-C6" for original IDT Winchip.
   10.69 +	  - "Winchip-2" for IDT Winchip 2.
   10.70 +	  - "Winchip-2A" for IDT Winchips with 3dNow! capabilities.
   10.71 +	  - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3.
   10.72 +	  - "VIA C3-2 for VIA C3-2 "Nehemiah" (model 9 and above).
   10.73 +
   10.74 +	  If you don't know what to do, choose "386".
   10.75 +
   10.76 +config M486
   10.77 +	bool "486"
   10.78 +	help
   10.79 +	  Select this for a 486 series processor, either Intel or one of the
   10.80 +	  compatible processors from AMD, Cyrix, IBM, or Intel.  Includes DX,
   10.81 +	  DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or
   10.82 +	  U5S.
   10.83 +
   10.84 +config M586
   10.85 +	bool "586/K5/5x86/6x86/6x86MX"
   10.86 +	help
   10.87 +	  Select this for an 586 or 686 series processor such as the AMD K5,
   10.88 +	  the Cyrix 5x86, 6x86 and 6x86MX.  This choice does not
   10.89 +	  assume the RDTSC (Read Time Stamp Counter) instruction.
   10.90 +
   10.91 +config M586TSC
   10.92 +	bool "Pentium-Classic"
   10.93 +	help
   10.94 +	  Select this for a Pentium Classic processor with the RDTSC (Read
   10.95 +	  Time Stamp Counter) instruction for benchmarking.
   10.96 +
   10.97 +config M586MMX
   10.98 +	bool "Pentium-MMX"
   10.99 +	help
  10.100 +	  Select this for a Pentium with the MMX graphics/multimedia
  10.101 +	  extended instructions.
  10.102 +
  10.103 +config M686
  10.104 +	bool "Pentium-Pro"
  10.105 +	help
  10.106 +	  Select this for Intel Pentium Pro chips.  This enables the use of
  10.107 +	  Pentium Pro extended instructions, and disables the init-time guard
  10.108 +	  against the f00f bug found in earlier Pentiums.
  10.109 +
  10.110 +config MPENTIUMII
  10.111 +	bool "Pentium-II/Celeron(pre-Coppermine)"
  10.112 +	help
  10.113 +	  Select this for Intel chips based on the Pentium-II and
  10.114 +	  pre-Coppermine Celeron core.  This option enables an unaligned
  10.115 +	  copy optimization, compiles the kernel with optimization flags
  10.116 +	  tailored for the chip, and applies any applicable Pentium Pro
  10.117 +	  optimizations.
  10.118 +
  10.119 +config MPENTIUMIII
  10.120 +	bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon"
  10.121 +	help
  10.122 +	  Select this for Intel chips based on the Pentium-III and
  10.123 +	  Celeron-Coppermine core.  This option enables use of some
  10.124 +	  extended prefetch instructions in addition to the Pentium II
  10.125 +	  extensions.
  10.126 +
  10.127 +config MPENTIUMM
  10.128 +	bool "Pentium M"
  10.129 +	help
  10.130 +	  Select this for Intel Pentium M (not Pentium-4 M)
  10.131 +	  notebook chips.
  10.132 +
  10.133 +config MPENTIUM4
  10.134 +	bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/Xeon"
  10.135 +	help
  10.136 +	  Select this for Intel Pentium 4 chips.  This includes the
  10.137 +	  Pentium 4, P4-based Celeron and Xeon, and Pentium-4 M
  10.138 +	  (not Pentium M) chips.  This option enables compile flags
  10.139 +	  optimized for the chip, uses the correct cache shift, and
  10.140 +	  applies any applicable Pentium III optimizations.
  10.141 +
  10.142 +config MK6
  10.143 +	bool "K6/K6-II/K6-III"
  10.144 +	help
  10.145 +	  Select this for an AMD K6-family processor.  Enables use of
  10.146 +	  some extended instructions, and passes appropriate optimization
  10.147 +	  flags to GCC.
  10.148 +
  10.149 +config MK7
  10.150 +	bool "Athlon/Duron/K7"
  10.151 +	help
  10.152 +	  Select this for an AMD Athlon K7-family processor.  Enables use of
  10.153 +	  some extended instructions, and passes appropriate optimization
  10.154 +	  flags to GCC.
  10.155 +
  10.156 +config MK8
  10.157 +	bool "Opteron/Athlon64/Hammer/K8"
  10.158 +	help
  10.159 +	  Select this for an AMD Opteron or Athlon64 Hammer-family processor.  Enables
  10.160 +	  use of some extended instructions, and passes appropriate optimization
  10.161 +	  flags to GCC.
  10.162 +
  10.163 +config MCRUSOE
  10.164 +	bool "Crusoe"
  10.165 +	help
  10.166 +	  Select this for a Transmeta Crusoe processor.  Treats the processor
  10.167 +	  like a 586 with TSC, and sets some GCC optimization flags (like a
  10.168 +	  Pentium Pro with no alignment requirements).
  10.169 +
  10.170 +config MEFFICEON
  10.171 +	bool "Efficeon"
  10.172 +	help
  10.173 +	  Select this for a Transmeta Efficeon processor.
  10.174 +
  10.175 +config MWINCHIPC6
  10.176 +	bool "Winchip-C6"
  10.177 +	help
  10.178 +	  Select this for an IDT Winchip C6 chip.  Linux and GCC
  10.179 +	  treat this chip as a 586TSC with some extended instructions
  10.180 +	  and alignment requirements.
  10.181 +
  10.182 +config MWINCHIP2
  10.183 +	bool "Winchip-2"
  10.184 +	help
  10.185 +	  Select this for an IDT Winchip-2.  Linux and GCC
  10.186 +	  treat this chip as a 586TSC with some extended instructions
  10.187 +	  and alignment requirements.
  10.188 +
  10.189 +config MWINCHIP3D
  10.190 +	bool "Winchip-2A/Winchip-3"
  10.191 +	help
  10.192 +	  Select this for an IDT Winchip-2A or 3.  Linux and GCC
  10.193 +	  treat this chip as a 586TSC with some extended instructions
  10.194 +	  and alignment reqirements.  Also enable out of order memory
  10.195 +	  stores for this CPU, which can increase performance of some
  10.196 +	  operations.
  10.197 +
  10.198 +config MCYRIXIII
  10.199 +	bool "CyrixIII/VIA-C3"
  10.200 +	help
  10.201 +	  Select this for a Cyrix III or C3 chip.  Presently Linux and GCC
  10.202 +	  treat this chip as a generic 586. Whilst the CPU is 686 class,
  10.203 +	  it lacks the cmov extension which gcc assumes is present when
  10.204 +	  generating 686 code.
  10.205 +	  Note that Nehemiah (Model 9) and above will not boot with this
  10.206 +	  kernel due to them lacking the 3DNow! instructions used in earlier
  10.207 +	  incarnations of the CPU.
  10.208 +
  10.209 +config MVIAC3_2
  10.210 +	bool "VIA C3-2 (Nehemiah)"
  10.211 +	help
  10.212 +	  Select this for a VIA C3 "Nehemiah". Selecting this enables usage
  10.213 +	  of SSE and tells gcc to treat the CPU as a 686.
  10.214 +	  Note, this kernel will not boot on older (pre model 9) C3s.
  10.215 +
  10.216 +endchoice
  10.217 +
  10.218 +config X86_GENERIC
  10.219 +       bool "Generic x86 support"
  10.220 +       help
  10.221 +	  Instead of just including optimizations for the selected
  10.222 +	  x86 variant (e.g. PII, Crusoe or Athlon), include some more
  10.223 +	  generic optimizations as well. This will make the kernel
  10.224 +	  perform better on x86 CPUs other than that selected.
  10.225 +
  10.226 +	  This is really intended for distributors who need more
  10.227 +	  generic optimizations.
  10.228 +
  10.229 +#
  10.230 +# Define implied options from the CPU selection here
  10.231 +#
  10.232 +config X86_CMPXCHG
  10.233 +	bool
  10.234 +	depends on !M386
  10.235 +	default y
  10.236 +
  10.237 +config X86_XADD
  10.238 +	bool
  10.239 +	depends on !M386
  10.240 +	default y
  10.241 +
  10.242 +config X86_L1_CACHE_SHIFT
  10.243 +	int
  10.244 +	default "7" if MPENTIUM4 || X86_GENERIC
  10.245 +	default "4" if X86_ELAN || M486 || M386
  10.246 +	default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2
  10.247 +	default "6" if MK7 || MK8 || MPENTIUMM
  10.248 +
  10.249 +config RWSEM_GENERIC_SPINLOCK
  10.250 +	bool
  10.251 +	depends on M386
  10.252 +	default y
  10.253 +
  10.254 +config RWSEM_XCHGADD_ALGORITHM
  10.255 +	bool
  10.256 +	depends on !M386
  10.257 +	default y
  10.258 +
  10.259 +config X86_PPRO_FENCE
  10.260 +	bool
  10.261 +	depends on M686 || M586MMX || M586TSC || M586 || M486 || M386
  10.262 +	default y
  10.263 +
  10.264 +config X86_F00F_BUG
  10.265 +	bool
  10.266 +	depends on M586MMX || M586TSC || M586 || M486 || M386
  10.267 +	default y
  10.268 +
  10.269 +config X86_WP_WORKS_OK
  10.270 +	bool
  10.271 +	depends on !M386
  10.272 +	default y
  10.273 +
  10.274 +config X86_INVLPG
  10.275 +	bool
  10.276 +	depends on !M386
  10.277 +	default y
  10.278 +
  10.279 +config X86_BSWAP
  10.280 +	bool
  10.281 +	depends on !M386
  10.282 +	default y
  10.283 +
  10.284 +config X86_POPAD_OK
  10.285 +	bool
  10.286 +	depends on !M386
  10.287 +	default y
  10.288 +
  10.289 +config X86_ALIGNMENT_16
  10.290 +	bool
  10.291 +	depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2
  10.292 +	default y
  10.293 +
  10.294 +config X86_GOOD_APIC
  10.295 +	bool
  10.296 +	depends on MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || MK8 || MEFFICEON
  10.297 +	default y
  10.298 +
  10.299 +config X86_INTEL_USERCOPY
  10.300 +	bool
  10.301 +	depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON
  10.302 +	default y
  10.303 +
  10.304 +config X86_USE_PPRO_CHECKSUM
  10.305 +	bool
  10.306 +	depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MEFFICEON
  10.307 +	default y
  10.308 +
  10.309 +config X86_USE_3DNOW
  10.310 +	bool
  10.311 +	depends on MCYRIXIII || MK7
  10.312 +	default y
  10.313 +
  10.314 +config X86_OOSTORE
  10.315 +	bool
  10.316 +	depends on (MWINCHIP3D || MWINCHIP2 || MWINCHIPC6) && MTRR
  10.317 +	default y
  10.318 +
  10.319 +config HPET_TIMER
  10.320 +	bool
  10.321 +	default n
  10.322 +#config HPET_TIMER
  10.323 +#	bool "HPET Timer Support"
  10.324 +#	help
  10.325 +#	  This enables the use of the HPET for the kernel's internal timer.
  10.326 +#	  HPET is the next generation timer replacing legacy 8254s.
  10.327 +#	  You can safely choose Y here.  However, HPET will only be
  10.328 +#	  activated if the platform and the BIOS support this feature.
  10.329 +#	  Otherwise the 8254 will be used for timing services.
  10.330 +#
  10.331 +#	  Choose N to continue using the legacy 8254 timer.
  10.332 +
  10.333 +config HPET_EMULATE_RTC
  10.334 +	def_bool HPET_TIMER && RTC=y
  10.335 +
  10.336 +config SMP
  10.337 +	bool "Symmetric multi-processing support"
  10.338 +	---help---
  10.339 +	  This enables support for systems with more than one CPU. If you have
  10.340 +	  a system with only one CPU, like most personal computers, say N. If
  10.341 +	  you have a system with more than one CPU, say Y.
  10.342 +
  10.343 +	  If you say N here, the kernel will run on single and multiprocessor
  10.344 +	  machines, but will use only one CPU of a multiprocessor machine. If
  10.345 +	  you say Y here, the kernel will run on many, but not all,
  10.346 +	  singleprocessor machines. On a singleprocessor machine, the kernel
  10.347 +	  will run faster if you say N here.
  10.348 +
  10.349 +	  Note that if you say Y here and choose architecture "586" or
  10.350 +	  "Pentium" under "Processor family", the kernel will not work on 486
  10.351 +	  architectures. Similarly, multiprocessor kernels for the "PPro"
  10.352 +	  architecture may not work on all Pentium based boards.
  10.353 +
  10.354 +	  People using multiprocessor machines who say Y here should also say
  10.355 +	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
  10.356 +	  Management" code will be disabled if you say Y here.
  10.357 +
  10.358 +	  See also the <file:Documentation/smp.txt>,
  10.359 +	  <file:Documentation/i386/IO-APIC.txt>,
  10.360 +	  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
  10.361 +	  <http://www.tldp.org/docs.html#howto>.
  10.362 +
  10.363 +	  If you don't know what to do here, say N.
  10.364 +
  10.365 +config NR_CPUS
  10.366 +	int "Maximum number of CPUs (2-255)"
  10.367 +	range 2 255
  10.368 +	depends on SMP
  10.369 +	default "32" if X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000
  10.370 +	default "8"
  10.371 +	help
  10.372 +	  This allows you to specify the maximum number of CPUs which this
  10.373 +	  kernel will support.  The maximum supported value is 255 and the
  10.374 +	  minimum value which makes sense is 2.
  10.375 +
  10.376 +	  This is purely to save memory - each supported CPU adds
  10.377 +	  approximately eight kilobytes to the kernel image.
  10.378 +
  10.379 +config SCHED_SMT
  10.380 +	bool "SMT (Hyperthreading) scheduler support"
  10.381 +	depends on SMP
  10.382 +	default off
  10.383 +	help
  10.384 +	  SMT scheduler support improves the CPU scheduler's decision making
  10.385 +	  when dealing with Intel Pentium 4 chips with HyperThreading at a
  10.386 +	  cost of slightly increased overhead in some places. If unsure say
  10.387 +	  N here.
  10.388 +
  10.389 +config PREEMPT
  10.390 +	bool "Preemptible Kernel"
  10.391 +	help
  10.392 +	  This option reduces the latency of the kernel when reacting to
  10.393 +	  real-time or interactive events by allowing a low priority process to
  10.394 +	  be preempted even if it is in kernel mode executing a system call.
  10.395 +	  This allows applications to run more reliably even when the system is
  10.396 +	  under load.
  10.397 +
  10.398 +	  Say Y here if you are building a kernel for a desktop, embedded
  10.399 +	  or real-time system.  Say N if you are unsure.
  10.400 +
  10.401 +#config X86_TSC
  10.402 +#	 bool
  10.403 +#	depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2) && !X86_NUMAQ
  10.404 +#	 default y
  10.405 +
  10.406 +#config X86_MCE
  10.407 +#	 bool "Machine Check Exception"
  10.408 +#	depends on !X86_VOYAGER
  10.409 +#	 ---help---
  10.410 +#	   Machine Check Exception support allows the processor to notify the
  10.411 +#	   kernel if it detects a problem (e.g. overheating, component failure).
  10.412 +#	   The action the kernel takes depends on the severity of the problem,
  10.413 +#	   ranging from a warning message on the console, to halting the machine.
  10.414 +#	   Your processor must be a Pentium or newer to support this - check the
  10.415 +#	   flags in /proc/cpuinfo for mce.  Note that some older Pentium systems
  10.416 +#	   have a design flaw which leads to false MCE events - hence MCE is
  10.417 +#	   disabled on all P5 processors, unless explicitly enabled with "mce"
  10.418 +#	   as a boot argument.  Similarly, if MCE is built in and creates a
  10.419 +#	   problem on some new non-standard machine, you can boot with "nomce"
  10.420 +#	   to disable it.  MCE support simply ignores non-MCE processors like
  10.421 +#	   the 386 and 486, so nearly everyone can say Y here.
  10.422 +
  10.423 +#config X86_MCE_NONFATAL
  10.424 +#	tristate "Check for non-fatal errors on AMD Athlon/Duron / Intel Pentium 4"
  10.425 +#	 depends on X86_MCE
  10.426 +#	 help
  10.427 +#	   Enabling this feature starts a timer that triggers every 5 seconds which
  10.428 +#	   will look at the machine check registers to see if anything happened.
  10.429 +#	   Non-fatal problems automatically get corrected (but still logged).
  10.430 +#	   Disable this if you don't want to see these messages.
  10.431 +#	   Seeing the messages this option prints out may be indicative of dying hardware,
  10.432 +#	   or out-of-spec (ie, overclocked) hardware.
  10.433 +#	   This option only does something on certain CPUs.
  10.434 +#	   (AMD Athlon/Duron and Intel Pentium 4)
  10.435 +
  10.436 +#config X86_MCE_P4THERMAL
  10.437 +#	 bool "check for P4 thermal throttling interrupt."
  10.438 +#	 depends on X86_MCE && (X86_UP_APIC || SMP)
  10.439 +#	 help
  10.440 +#	   Enabling this feature will cause a message to be printed when the P4
  10.441 +#	   enters thermal throttling.
  10.442 +
  10.443 +#config MICROCODE
  10.444 +#	 tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support"
  10.445 +#	 ---help---
  10.446 +#	   If you say Y here and also to "/dev file system support" in the
  10.447 +#	   'File systems' section, you will be able to update the microcode on
  10.448 +#	   Intel processors in the IA32 family, e.g. Pentium Pro, Pentium II,
  10.449 +#	   Pentium III, Pentium 4, Xeon etc.  You will obviously need the
  10.450 +#	   actual microcode binary data itself which is not shipped with the
  10.451 +#	   Linux kernel.
  10.452 +#
  10.453 +#	   For latest news and information on obtaining all the required
  10.454 +#	   ingredients for this driver, check:
  10.455 +#	   <http://www.urbanmyth.org/microcode/>.
  10.456 +#
  10.457 +#	   To compile this driver as a module, choose M here: the
  10.458 +#	   module will be called microcode.
  10.459 +
  10.460 +#config X86_MSR
  10.461 +#	 tristate "/dev/cpu/*/msr - Model-specific register support"
  10.462 +#	 help
  10.463 +#	   This device gives privileged processes access to the x86
  10.464 +#	   Model-Specific Registers (MSRs).  It is a character device with
  10.465 +#	   major 202 and minors 0 to 31 for /dev/cpu/0/msr to /dev/cpu/31/msr.
  10.466 +#	   MSR accesses are directed to a specific CPU on multi-processor
  10.467 +#	   systems.
  10.468 +
  10.469 +config X86_CPUID
  10.470 +	tristate "/dev/cpu/*/cpuid - CPU information support"
  10.471 +	help
  10.472 +	  This device gives processes access to the x86 CPUID instruction to
  10.473 +	  be executed on a specific processor.  It is a character device
  10.474 +	  with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
  10.475 +	  /dev/cpu/31/cpuid.
  10.476 +
  10.477 +source "drivers/firmware/Kconfig"
  10.478 +
  10.479 +choice
  10.480 +	prompt "High Memory Support"
  10.481 +	default NOHIGHMEM
  10.482 +
  10.483 +config NOHIGHMEM
  10.484 +	bool "off"
  10.485 +	---help---
  10.486 +	  Linux can use up to 64 Gigabytes of physical memory on x86 systems.
  10.487 +	  However, the address space of 32-bit x86 processors is only 4
  10.488 +	  Gigabytes large. That means that, if you have a large amount of
  10.489 +	  physical memory, not all of it can be "permanently mapped" by the
  10.490 +	  kernel. The physical memory that's not permanently mapped is called
  10.491 +	  "high memory".
  10.492 +
  10.493 +	  If you are compiling a kernel which will never run on a machine with
  10.494 +	  more than 1 Gigabyte total physical RAM, answer "off" here (default
  10.495 +	  choice and suitable for most users). This will result in a "3GB/1GB"
  10.496 +	  split: 3GB are mapped so that each process sees a 3GB virtual memory
  10.497 +	  space and the remaining part of the 4GB virtual memory space is used
  10.498 +	  by the kernel to permanently map as much physical memory as
  10.499 +	  possible.
  10.500 +
  10.501 +	  If the machine has between 1 and 4 Gigabytes physical RAM, then
  10.502 +	  answer "4GB" here.
  10.503 +
  10.504 +	  If more than 4 Gigabytes is used then answer "64GB" here. This
  10.505 +	  selection turns Intel PAE (Physical Address Extension) mode on.
  10.506 +	  PAE implements 3-level paging on IA32 processors. PAE is fully
  10.507 +	  supported by Linux, PAE mode is implemented on all recent Intel
  10.508 +	  processors (Pentium Pro and better). NOTE: If you say "64GB" here,
  10.509 +	  then the kernel will not boot on CPUs that don't support PAE!
  10.510 +
  10.511 +	  The actual amount of total physical memory will either be
  10.512 +	  auto detected or can be forced by using a kernel command line option
  10.513 +	  such as "mem=256M". (Try "man bootparam" or see the documentation of
  10.514 +	  your boot loader (lilo or loadlin) about how to pass options to the
  10.515 +	  kernel at boot time.)
  10.516 +
  10.517 +	  If unsure, say "off".
  10.518 +
  10.519 +config HIGHMEM4G
  10.520 +	bool "4GB"
  10.521 +	help
  10.522 +	  Select this if you have a 32-bit processor and between 1 and 4
  10.523 +	  gigabytes of physical RAM.
  10.524 +
  10.525 +#config HIGHMEM64G
  10.526 +#	bool "64GB"
  10.527 +#	help
  10.528 +#	  Select this if you have a 32-bit processor and more than 4
  10.529 +#	  gigabytes of physical RAM.
  10.530 +
  10.531 +endchoice
  10.532 +
  10.533 +config HIGHMEM
  10.534 +	bool
  10.535 +	depends on HIGHMEM64G || HIGHMEM4G
  10.536 +	default y
  10.537 +
  10.538 +config X86_PAE
  10.539 +	bool
  10.540 +	depends on HIGHMEM64G
  10.541 +	default y
  10.542 +
  10.543 +# Common NUMA Features
  10.544 +config NUMA
  10.545 +	bool "Numa Memory Allocation and Scheduler Support"
  10.546 +	depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI))
  10.547 +	default n if X86_PC
  10.548 +	default y if (X86_NUMAQ || X86_SUMMIT)
  10.549 +
  10.550 +# Need comments to help the hapless user trying to turn on NUMA support
  10.551 +comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support"
  10.552 +	depends on X86_NUMAQ && (!HIGHMEM64G || !SMP)
  10.553 +
  10.554 +comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI"
  10.555 +	depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI)
  10.556 +
  10.557 +config DISCONTIGMEM
  10.558 +	bool
  10.559 +	depends on NUMA
  10.560 +	default y
  10.561 +
  10.562 +config HAVE_ARCH_BOOTMEM_NODE
  10.563 +	bool
  10.564 +	depends on NUMA
  10.565 +	default y
  10.566 +
  10.567 +#config HIGHPTE
  10.568 +#	bool "Allocate 3rd-level pagetables from highmem"
  10.569 +#	depends on HIGHMEM4G || HIGHMEM64G
  10.570 +#	help
  10.571 +#	  The VM uses one page table entry for each page of physical memory.
  10.572 +#	  For systems with a lot of RAM, this can be wasteful of precious
  10.573 +#	  low memory.  Setting this option will put user-space page table
  10.574 +#	  entries in high memory.
  10.575 +
  10.576 +config MTRR
  10.577 +	bool
  10.578 +	depends on XEN_PRIVILEGED_GUEST
  10.579 +	default y
  10.580 +
  10.581 +#config MTRR
  10.582 +#	 bool "MTRR (Memory Type Range Register) support"
  10.583 +#	 ---help---
  10.584 +#	   On Intel P6 family processors (Pentium Pro, Pentium II and later)
  10.585 +#	   the Memory Type Range Registers (MTRRs) may be used to control
  10.586 +#	   processor access to memory ranges. This is most useful if you have
  10.587 +#	   a video (VGA) card on a PCI or AGP bus. Enabling write-combining
  10.588 +#	   allows bus write transfers to be combined into a larger transfer
  10.589 +#	   before bursting over the PCI/AGP bus. This can increase performance
  10.590 +#	   of image write operations 2.5 times or more. Saying Y here creates a
  10.591 +#	   /proc/mtrr file which may be used to manipulate your processor's
  10.592 +#	   MTRRs. Typically the X server should use this.
  10.593 +#
  10.594 +#	   This code has a reasonably generic interface so that similar
  10.595 +#	   control registers on other processors can be easily supported
  10.596 +#	   as well:
  10.597 +#
  10.598 +#	   The Cyrix 6x86, 6x86MX and M II processors have Address Range
  10.599 +#	   Registers (ARRs) which provide a similar functionality to MTRRs. For
  10.600 +#	   these, the ARRs are used to emulate the MTRRs.
  10.601 +#	   The AMD K6-2 (stepping 8 and above) and K6-3 processors have two
  10.602 +#	   MTRRs. The Centaur C6 (WinChip) has 8 MCRs, allowing
  10.603 +#	   write-combining. All of these processors are supported by this code
  10.604 +#	   and it makes sense to say Y here if you have one of them.
  10.605 +#
  10.606 +#	   Saying Y here also fixes a problem with buggy SMP BIOSes which only
  10.607 +#	   set the MTRRs for the boot CPU and not for the secondary CPUs. This
  10.608 +#	   can lead to all sorts of problems, so it's good to say Y here.
  10.609 +#
  10.610 +#	   You can safely say Y even if your machine doesn't have MTRRs, you'll
  10.611 +#	   just add about 9 KB to your kernel.
  10.612 +#
  10.613 +#	   See <file:Documentation/mtrr.txt> for more information.
  10.614 +
  10.615 +config IRQBALANCE
  10.616 + 	bool "Enable kernel irq balancing"
  10.617 +	depends on SMP && X86_IO_APIC
  10.618 +	default y
  10.619 +	help
  10.620 + 	  The default yes will allow the kernel to do irq load balancing.
  10.621 +	  Saying no will keep the kernel from doing irq load balancing.
  10.622 +
  10.623 +config HAVE_DEC_LOCK
  10.624 +	bool
  10.625 +	depends on (SMP || PREEMPT) && X86_CMPXCHG
  10.626 +	default y
  10.627 +
  10.628 +# turning this on wastes a bunch of space.
  10.629 +# Summit needs it only when NUMA is on
  10.630 +config BOOT_IOREMAP
  10.631 +	bool
  10.632 +	depends on (((X86_SUMMIT || X86_GENERICARCH) && NUMA) || (X86 && EFI))
  10.633 +	default y
  10.634 +
  10.635 +config REGPARM
  10.636 +	bool "Use register arguments (EXPERIMENTAL)"
  10.637 +	depends on EXPERIMENTAL
  10.638 +	default n
  10.639 +	help
  10.640 +	Compile the kernel with -mregparm=3. This uses an different ABI
  10.641 +	and passes the first three arguments of a function call in registers.
  10.642 +	This will probably break binary only modules.
  10.643 +
  10.644 +	This feature is only enabled for gcc-3.0 and later - earlier compilers
  10.645 +	generate incorrect output with certain kernel constructs when
  10.646 +	-mregparm=3 is used.
  10.647 +
  10.648 +
  10.649 +config X86_LOCAL_APIC
  10.650 +	bool
  10.651 +	depends on (X86_VISWS || SMP) && !X86_VOYAGER
  10.652 +	default n
  10.653 +
  10.654 +if XEN_PHYSDEV_ACCESS
  10.655 +
  10.656 +menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)"
  10.657 +
  10.658 +config X86_VISWS_APIC
  10.659 +	bool
  10.660 +	depends on X86_VISWS
  10.661 +	default y
  10.662 +
  10.663 +#config X86_IO_APIC
  10.664 +#	bool
  10.665 +#	depends on SMP && !(X86_VISWS || X86_VOYAGER)
  10.666 +#	default y
  10.667 +
  10.668 +config PCI
  10.669 +	bool "PCI support" if !X86_VISWS
  10.670 +	depends on !X86_VOYAGER
  10.671 +	default y if X86_VISWS
  10.672 +	help
  10.673 +	  Find out whether you have a PCI motherboard. PCI is the name of a
  10.674 +	  bus system, i.e. the way the CPU talks to the other stuff inside
  10.675 +	  your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
  10.676 +	  VESA. If you have PCI, say Y, otherwise N.
  10.677 +
  10.678 +	  The PCI-HOWTO, available from
  10.679 +	  <http://www.tldp.org/docs.html#howto>, contains valuable
  10.680 +	  information about which PCI hardware does work under Linux and which
  10.681 +	  doesn't.
  10.682 +
  10.683 +#choice
  10.684 +#	prompt "PCI access mode"
  10.685 +#	depends on PCI && !X86_VISWS
  10.686 +#	default PCI_GOANY
  10.687 +#	---help---
  10.688 +#	  On PCI systems, the BIOS can be used to detect the PCI devices and
  10.689 +#	  determine their configuration. However, some old PCI motherboards
  10.690 +#	  have BIOS bugs and may crash if this is done. Also, some embedded
  10.691 +#	  PCI-based systems don't have any BIOS at all. Linux can also try to
  10.692 +#	  detect the PCI hardware directly without using the BIOS.
  10.693 +#
  10.694 +#	  With this option, you can specify how Linux should detect the
  10.695 +#	  PCI devices. If you choose "BIOS", the BIOS will be used,
  10.696 +#	  if you choose "Direct", the BIOS won't be used, and if you
  10.697 +#	  choose "MMConfig", then PCI Express MMCONFIG will be used.
  10.698 +#	  If you choose "Any", the kernel will try MMCONFIG, then the
  10.699 +#	  direct access method and falls back to the BIOS if that doesn't
  10.700 +#	  work. If unsure, go with the default, which is "Any".
  10.701 +#
  10.702 +#config PCI_GOBIOS
  10.703 +#	bool "BIOS"
  10.704 +#
  10.705 +#config PCI_GOMMCONFIG
  10.706 +#	bool "MMConfig"
  10.707 +#
  10.708 +#config PCI_GODIRECT
  10.709 +#	bool "Direct"
  10.710 +#
  10.711 +#config PCI_GOANY
  10.712 +#	bool "Any"
  10.713 +#
  10.714 +#endchoice
  10.715 +#
  10.716 +#config PCI_BIOS
  10.717 +#	bool
  10.718 +#	depends on !X86_VISWS && PCI && (PCI_GOBIOS || PCI_GOANY)
  10.719 +#	default y
  10.720 +#
  10.721 +#config PCI_DIRECT
  10.722 +#	bool
  10.723 +# 	depends on PCI && ((PCI_GODIRECT || PCI_GOANY) || X86_VISWS)
  10.724 +#	default y
  10.725 +
  10.726 +config PCI_DIRECT
  10.727 +	bool
  10.728 + 	depends on PCI
  10.729 +	default y
  10.730 +
  10.731 +source "drivers/pci/Kconfig"
  10.732 +
  10.733 +config ISA
  10.734 +	bool "ISA support"
  10.735 +	depends on !(X86_VOYAGER || X86_VISWS)
  10.736 +	help
  10.737 +	  Find out whether you have ISA slots on your motherboard.  ISA is the
  10.738 +	  name of a bus system, i.e. the way the CPU talks to the other stuff
  10.739 +	  inside your box.  Other bus systems are PCI, EISA, MicroChannel
  10.740 +	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
  10.741 +	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
  10.742 +
  10.743 +config EISA
  10.744 +	bool "EISA support"
  10.745 +	depends on ISA
  10.746 +	---help---
  10.747 +	  The Extended Industry Standard Architecture (EISA) bus was
  10.748 +	  developed as an open alternative to the IBM MicroChannel bus.
  10.749 +
  10.750 +	  The EISA bus provided some of the features of the IBM MicroChannel
  10.751 +	  bus while maintaining backward compatibility with cards made for
  10.752 +	  the older ISA bus.  The EISA bus saw limited use between 1988 and
  10.753 +	  1995 when it was made obsolete by the PCI bus.
  10.754 +
  10.755 +	  Say Y here if you are building a kernel for an EISA-based machine.
  10.756 +
  10.757 +	  Otherwise, say N.
  10.758 +
  10.759 +source "drivers/eisa/Kconfig"
  10.760 +
  10.761 +config MCA
  10.762 +	bool "MCA support"
  10.763 +	depends on !(X86_VISWS || X86_VOYAGER)
  10.764 +	help
  10.765 +	  MicroChannel Architecture is found in some IBM PS/2 machines and
  10.766 +	  laptops.  It is a bus system similar to PCI or ISA. See
  10.767 +	  <file:Documentation/mca.txt> (and especially the web page given
  10.768 +	  there) before attempting to build an MCA bus kernel.
  10.769 +
  10.770 +config MCA
  10.771 +	depends on X86_VOYAGER
  10.772 +	default y if X86_VOYAGER
  10.773 +
  10.774 +source "drivers/mca/Kconfig"
  10.775 +
  10.776 +config SCx200
  10.777 +	tristate "NatSemi SCx200 support"
  10.778 +	depends on !X86_VOYAGER
  10.779 +	help
  10.780 +	  This provides basic support for the National Semiconductor SCx200
  10.781 +	  processor.  Right now this is just a driver for the GPIO pins.
  10.782 +
  10.783 +	  If you don't know what to do here, say N.
  10.784 +
  10.785 +	  This support is also available as a module.  If compiled as a
  10.786 +	  module, it will be called scx200.
  10.787 +
  10.788 +source "drivers/pcmcia/Kconfig"
  10.789 +
  10.790 +source "drivers/pci/hotplug/Kconfig"
  10.791 +
  10.792 +endmenu
  10.793 +
  10.794 +endif
  10.795 +
  10.796 +menu "Kernel hacking"
  10.797 +
  10.798 +config DEBUG_KERNEL
  10.799 +	bool "Kernel debugging"
  10.800 +	help
  10.801 +	  Say Y here if you are developing drivers or trying to debug and
  10.802 +	  identify kernel problems.
  10.803 +
  10.804 +config EARLY_PRINTK
  10.805 +	bool "Early printk" if EMBEDDED
  10.806 +	default y
  10.807 +	help
  10.808 +	  Write kernel log output directly into the VGA buffer or to a serial
  10.809 +	  port.
  10.810 +
  10.811 +	  This is useful for kernel debugging when your machine crashes very
  10.812 +	  early before the console code is initialized. For normal operation
  10.813 +	  it is not recommended because it looks ugly and doesn't cooperate
  10.814 +	  with klogd/syslogd or the X server. You should normally N here,
  10.815 +	  unless you want to debug such a crash.
  10.816 +
  10.817 +config DEBUG_STACKOVERFLOW
  10.818 +	bool "Check for stack overflows"
  10.819 +	depends on DEBUG_KERNEL
  10.820 +
  10.821 +config DEBUG_STACK_USAGE
  10.822 +	bool "Stack utilization instrumentation"
  10.823 +	depends on DEBUG_KERNEL
  10.824 +	help
  10.825 +	  Enables the display of the minimum amount of free stack which each
  10.826 +	  task has ever had available in the sysrq-T and sysrq-P debug output.
  10.827 +
  10.828 +	  This option will slow down process creation somewhat.
  10.829 +
  10.830 +config DEBUG_SLAB
  10.831 +	bool "Debug memory allocations"
  10.832 +	depends on DEBUG_KERNEL
  10.833 +	help
  10.834 +	  Say Y here to have the kernel do limited verification on memory
  10.835 +	  allocation as well as poisoning memory on free to catch use of freed
  10.836 +	  memory.
  10.837 +
  10.838 +config MAGIC_SYSRQ
  10.839 +	bool "Magic SysRq key"
  10.840 +	depends on DEBUG_KERNEL
  10.841 +	help
  10.842 +	  If you say Y here, you will have some control over the system even
  10.843 +	  if the system crashes for example during kernel debugging (e.g., you
  10.844 +	  will be able to flush the buffer cache to disk, reboot the system
  10.845 +	  immediately or dump some status information). This is accomplished
  10.846 +	  by pressing various keys while holding SysRq (Alt+PrintScreen). It
  10.847 +	  also works on a serial console (on PC hardware at least), if you
  10.848 +	  send a BREAK and then within 5 seconds a command keypress. The
  10.849 +	  keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
  10.850 +	  unless you really know what this hack does.
  10.851 +
  10.852 +config DEBUG_SPINLOCK
  10.853 +	bool "Spinlock debugging"
  10.854 +	depends on DEBUG_KERNEL
  10.855 +	help
  10.856 +	  Say Y here and build SMP to catch missing spinlock initialization
  10.857 +	  and certain other kinds of spinlock errors commonly made.  This is
  10.858 +	  best used in conjunction with the NMI watchdog so that spinlock
  10.859 +	  deadlocks are also debuggable.
  10.860 +
  10.861 +config DEBUG_PAGEALLOC
  10.862 +	bool "Page alloc debugging"
  10.863 +	depends on DEBUG_KERNEL
  10.864 +	help
  10.865 +	  Unmap pages from the kernel linear mapping after free_pages().
  10.866 +	  This results in a large slowdown, but helps to find certain types
  10.867 +	  of memory corruptions.
  10.868 +
  10.869 +config DEBUG_HIGHMEM
  10.870 +	bool "Highmem debugging"
  10.871 +	depends on DEBUG_KERNEL && HIGHMEM
  10.872 +	help
  10.873 +	  This options enables addition error checking for high memory systems.
  10.874 +	  Disable for production systems.
  10.875 +
  10.876 +config DEBUG_INFO
  10.877 +	bool "Compile the kernel with debug info"
  10.878 +	depends on DEBUG_KERNEL
  10.879 +	help
  10.880 +          If you say Y here the resulting kernel image will include
  10.881 +	  debugging info resulting in a larger kernel image.
  10.882 +	  Say Y here only if you plan to use gdb to debug the kernel.
  10.883 +	  If you don't debug the kernel, you can say N.
  10.884 +	  
  10.885 +config DEBUG_SPINLOCK_SLEEP
  10.886 +	bool "Sleep-inside-spinlock checking"
  10.887 +	help
  10.888 +	  If you say Y here, various routines which may sleep will become very
  10.889 +	  noisy if they are called with a spinlock held.	
  10.890 +
  10.891 +config FRAME_POINTER
  10.892 +	bool "Compile the kernel with frame pointers"
  10.893 +	help
  10.894 +	  If you say Y here the resulting kernel image will be slightly larger
  10.895 +	  and slower, but it will give very useful debugging information.
  10.896 +	  If you don't debug the kernel, you can say N, but we may not be able
  10.897 +	  to solve problems without frame pointers.
  10.898 +
  10.899 +config 4KSTACKS
  10.900 +	bool "Use 4Kb for kernel stacks instead of 8Kb"
  10.901 +	help
  10.902 +	  If you say Y here the kernel will use a 4Kb stacksize for the
  10.903 +	  kernel stack attached to each process/thread. This facilitates
  10.904 +	  running more threads on a system and also reduces the pressure
  10.905 +	  on the VM subsystem for higher order allocations. This option
  10.906 +	  will also use IRQ stacks to compensate for the reduced stackspace.
  10.907 +
  10.908 +config X86_FIND_SMP_CONFIG
  10.909 +	bool
  10.910 +	depends on X86_LOCAL_APIC || X86_VOYAGER
  10.911 +	default y
  10.912 +
  10.913 +config X86_MPPARSE
  10.914 +	bool
  10.915 +	depends on X86_LOCAL_APIC && !X86_VISWS
  10.916 +	default y
  10.917 +
  10.918 +endmenu
  10.919 +
  10.920 +#
  10.921 +# Use the generic interrupt handling code in kernel/irq/:
  10.922 +#
  10.923 +config GENERIC_HARDIRQS
  10.924 +	bool
  10.925 +	default y
  10.926 +
  10.927 +config GENERIC_IRQ_PROBE
  10.928 +	bool
  10.929 +	default y
  10.930 +
  10.931 +config X86_SMP
  10.932 +	bool
  10.933 +	depends on SMP && !X86_VOYAGER
  10.934 +	default y
  10.935 +
  10.936 +#config X86_HT
  10.937 +#	bool
  10.938 +#	depends on SMP && !(X86_VISWS || X86_VOYAGER)
  10.939 +#	default y
  10.940 +
  10.941 +config X86_BIOS_REBOOT
  10.942 +	bool
  10.943 +	depends on !(X86_VISWS || X86_VOYAGER)
  10.944 +	default y
  10.945 +
  10.946 +config X86_TRAMPOLINE
  10.947 +	bool
  10.948 +	depends on X86_SMP || (X86_VOYAGER && SMP)
  10.949 +	default y
  10.950 +
  10.951 +config PC
  10.952 +	bool
  10.953 +	depends on X86 && !EMBEDDED
  10.954 +	default y
  10.955 +
  10.956 +endmenu
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/Makefile	Mon Dec 27 10:12:02 2004 +0000
    11.3 @@ -0,0 +1,99 @@
    11.4 +#
    11.5 +# i386/Makefile
    11.6 +#
    11.7 +# This file is included by the global makefile so that you can add your own
    11.8 +# architecture-specific flags and dependencies. Remember to do have actions
    11.9 +# for "archclean" cleaning up for this architecture.
   11.10 +#
   11.11 +# This file is subject to the terms and conditions of the GNU General Public
   11.12 +# License.  See the file "COPYING" in the main directory of this archive
   11.13 +# for more details.
   11.14 +#
   11.15 +# Copyright (C) 1994 by Linus Torvalds
   11.16 +#
   11.17 +# 19990713  Artur Skawina <skawina@geocities.com>
   11.18 +#           Added '-march' and '-mpreferred-stack-boundary' support
   11.19 +#
   11.20 +
   11.21 +XENARCH	:= $(subst ",,$(CONFIG_XENARCH))
   11.22 +
   11.23 +LDFLAGS		:= -m elf_i386
   11.24 +LDFLAGS_vmlinux :=
   11.25 +CHECK		:= $(CHECK) -D__i386__=1
   11.26 +
   11.27 +CFLAGS += -pipe -msoft-float
   11.28 +
   11.29 +# prevent gcc from keeping the stack 16 byte aligned
   11.30 +CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2,)
   11.31 +
   11.32 +align := $(cc-option-align)
   11.33 +cflags-$(CONFIG_M386)		+= -march=i386
   11.34 +cflags-$(CONFIG_M486)		+= -march=i486
   11.35 +cflags-$(CONFIG_M586)		+= -march=i586
   11.36 +cflags-$(CONFIG_M586TSC)	+= -march=i586
   11.37 +cflags-$(CONFIG_M586MMX)	+= $(call cc-option,-march=pentium-mmx,-march=i586)
   11.38 +cflags-$(CONFIG_M686)		+= -march=i686
   11.39 +cflags-$(CONFIG_MPENTIUMII)	+= -march=i686 $(call cc-option,-mtune=pentium2)
   11.40 +cflags-$(CONFIG_MPENTIUMIII)	+= -march=i686 $(call cc-option,-mtune=pentium3)
   11.41 +cflags-$(CONFIG_MPENTIUMM)	+= -march=i686 $(call cc-option,-mtune=pentium3)
   11.42 +cflags-$(CONFIG_MPENTIUM4)	+= -march=i686 $(call cc-option,-mtune=pentium4)
   11.43 +cflags-$(CONFIG_MK6)		+= -march=k6
   11.44 +# Please note, that patches that add -march=athlon-xp and friends are pointless.
   11.45 +# They make zero difference whatsosever to performance at this time.
   11.46 +cflags-$(CONFIG_MK7)		+= $(call cc-option,-march=athlon,-march=i686 $(align)-functions=4)
   11.47 +cflags-$(CONFIG_MK8)		+= $(call cc-option,-march=k8,$(call cc-option,-march=athlon,-march=i686 $(align)-functions=4))
   11.48 +cflags-$(CONFIG_MCRUSOE)	+= -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
   11.49 +cflags-$(CONFIG_MEFFICEON)	+= -march=i686 $(call cc-option,-mtune=pentium3) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
   11.50 +cflags-$(CONFIG_MWINCHIPC6)	+= $(call cc-option,-march=winchip-c6,-march=i586)
   11.51 +cflags-$(CONFIG_MWINCHIP2)	+= $(call cc-option,-march=winchip2,-march=i586)
   11.52 +cflags-$(CONFIG_MWINCHIP3D)	+= $(call cc-option,-march=winchip2,-march=i586)
   11.53 +cflags-$(CONFIG_MCYRIXIII)	+= $(call cc-option,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
   11.54 +cflags-$(CONFIG_MVIAC3_2)	+= $(call cc-option,-march=c3-2,-march=i686)
   11.55 +
   11.56 +# AMD Elan support
   11.57 +cflags-$(CONFIG_X86_ELAN)	+= -march=i486
   11.58 +
   11.59 +# -mregparm=3 works ok on gcc-3.0 and later
   11.60 +#
   11.61 +GCC_VERSION			:= $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
   11.62 +cflags-$(CONFIG_REGPARM) 	+= $(shell if [ $(GCC_VERSION) -ge 0300 ] ; then echo "-mregparm=3"; fi ;)
   11.63 +
   11.64 +# Disable unit-at-a-time mode, it makes gcc use a lot more stack
   11.65 +# due to the lack of sharing of stacklots.
   11.66 +CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
   11.67 +
   11.68 +CFLAGS += $(cflags-y)
   11.69 +
   11.70 +head-y := arch/xen/i386/kernel/head.o arch/xen/i386/kernel/init_task.o
   11.71 +
   11.72 +libs-y 					+= arch/i386/lib/
   11.73 +core-y					+= arch/xen/i386/kernel/ \
   11.74 +					   arch/xen/i386/mm/ \
   11.75 +					   arch/i386/crypto/
   11.76 +# \
   11.77 +#					   arch/xen/$(mcore-y)/
   11.78 +drivers-$(CONFIG_MATH_EMULATION)	+= arch/i386/math-emu/
   11.79 +drivers-$(CONFIG_PCI)			+= arch/xen/i386/pci/
   11.80 +# must be linked after kernel/
   11.81 +drivers-$(CONFIG_OPROFILE)		+= arch/i386/oprofile/
   11.82 +drivers-$(CONFIG_PM)			+= arch/i386/power/
   11.83 +
   11.84 +# for clean
   11.85 +obj-	+= kernel/ mm/ pci/
   11.86 +#obj-	+= ../../i386/lib/ ../../i386/mm/ 
   11.87 +#../../i386/$(mcore-y)/
   11.88 +#obj-	+= ../../i386/pci/ ../../i386/oprofile/ ../../i386/power/
   11.89 +
   11.90 +xenflags-y += -Iinclude/asm-xen/asm-i386/mach-xen \
   11.91 +		-Iinclude/asm-i386/mach-default
   11.92 +CFLAGS += $(xenflags-y)
   11.93 +AFLAGS += $(xenflags-y)
   11.94 +
   11.95 +prepare: include/asm-$(XENARCH)/asm_offsets.h
   11.96 +CLEAN_FILES += include/asm-$(XENARCH)/asm_offsets.h
   11.97 +
   11.98 +arch/$(XENARCH)/kernel/asm-offsets.s: include/asm include/.asm-ignore \
   11.99 +	include/linux/version.h include/config/MARKER
  11.100 +
  11.101 +include/asm-$(XENARCH)/asm_offsets.h: arch/$(XENARCH)/kernel/asm-offsets.s
  11.102 +	$(call filechk,gen-asm-offsets)
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/Makefile	Mon Dec 27 10:12:02 2004 +0000
    12.3 @@ -0,0 +1,91 @@
    12.4 +#
    12.5 +# Makefile for the linux kernel.
    12.6 +#
    12.7 +
    12.8 +XENARCH	:= $(subst ",,$(CONFIG_XENARCH))
    12.9 +
   12.10 +CFLAGS	+= -Iarch/$(XENARCH)/kernel
   12.11 +
   12.12 +extra-y := head.o init_task.o
   12.13 +
   12.14 +obj-y	:= process.o signal.o entry.o traps.o \
   12.15 +		time.o ioport.o ldt.o setup.o \
   12.16 +		pci-dma.o i386_ksyms.o
   12.17 +
   12.18 +c-obj-y	:= semaphore.o irq.o vm86.o \
   12.19 +		ptrace.o sys_i386.o \
   12.20 +		i387.o dmi_scan.o bootflag.o \
   12.21 +		doublefault.o quirks.o
   12.22 +s-obj-y	:=
   12.23 +
   12.24 +obj-y				+= cpu/
   12.25 +obj-y				+= timers/
   12.26 +c-obj-$(CONFIG_ACPI_BOOT)	+= acpi/
   12.27 +#c-obj-$(CONFIG_X86_BIOS_REBOOT)	+= reboot.o
   12.28 +c-obj-$(CONFIG_MCA)		+= mca.o
   12.29 +c-obj-$(CONFIG_X86_MSR)		+= msr.o
   12.30 +c-obj-$(CONFIG_X86_CPUID)	+= cpuid.o
   12.31 +c-obj-$(CONFIG_MICROCODE)	+= microcode.o
   12.32 +c-obj-$(CONFIG_APM)		+= apm.o
   12.33 +obj-$(CONFIG_X86_SMP)		+= smp.o smpboot.o
   12.34 +#obj-$(CONFIG_X86_TRAMPOLINE)	+= trampoline.o
   12.35 +c-obj-$(CONFIG_X86_MPPARSE)	+= mpparse.o
   12.36 +#obj-$(CONFIG_X86_LOCAL_APIC)	+= apic.o
   12.37 +c-obj-$(CONFIG_X86_LOCAL_APIC)	+= nmi.o
   12.38 +c-obj-$(CONFIG_X86_IO_APIC)	+= io_apic.o
   12.39 +c-obj-$(CONFIG_X86_NUMAQ)	+= numaq.o
   12.40 +c-obj-$(CONFIG_X86_SUMMIT_NUMA)	+= summit.o
   12.41 +c-obj-$(CONFIG_MODULES)		+= module.o
   12.42 +c-obj-y				+= sysenter.o
   12.43 +obj-y				+= vsyscall.o
   12.44 +c-obj-$(CONFIG_ACPI_SRAT) 	+= srat.o
   12.45 +c-obj-$(CONFIG_HPET_TIMER) 	+= time_hpet.o
   12.46 +c-obj-$(CONFIG_EFI) 		+= efi.o efi_stub.o
   12.47 +c-obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
   12.48 +
   12.49 +EXTRA_AFLAGS   := -traditional
   12.50 +
   12.51 +c-obj-$(CONFIG_SCx200)		+= scx200.o
   12.52 +
   12.53 +# vsyscall.o contains the vsyscall DSO images as __initdata.
   12.54 +# We must build both images before we can assemble it.
   12.55 +# Note: kbuild does not track this dependency due to usage of .incbin
   12.56 +$(obj)/vsyscall.o: $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so
   12.57 +targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so)
   12.58 +
   12.59 +# The DSO images are built using a special linker script.
   12.60 +quiet_cmd_syscall = SYSCALL $@
   12.61 +      cmd_syscall = $(CC) -nostdlib $(SYSCFLAGS_$(@F)) \
   12.62 +		          -Wl,-T,$(filter-out FORCE,$^) -o $@
   12.63 +
   12.64 +vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1
   12.65 +SYSCFLAGS_vsyscall-sysenter.so	= $(vsyscall-flags)
   12.66 +SYSCFLAGS_vsyscall-int80.so	= $(vsyscall-flags)
   12.67 +
   12.68 +$(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so: \
   12.69 +$(obj)/vsyscall-%.so: $(obj)/vsyscall.lds $(obj)/vsyscall-%.o FORCE
   12.70 +	$(call if_changed,syscall)
   12.71 +
   12.72 +# We also create a special relocatable object that should mirror the symbol
   12.73 +# table and layout of the linked DSO.  With ld -R we can then refer to
   12.74 +# these symbols in the kernel code rather than hand-coded addresses.
   12.75 +extra-y += vsyscall-syms.o
   12.76 +$(obj)/built-in.o: $(obj)/vsyscall-syms.o
   12.77 +$(obj)/built-in.o: ld_flags += -R $(obj)/vsyscall-syms.o
   12.78 +
   12.79 +SYSCFLAGS_vsyscall-syms.o = -r
   12.80 +$(obj)/vsyscall-syms.o: $(obj)/vsyscall.lds $(obj)/vsyscall-sysenter.o FORCE
   12.81 +	$(call if_changed,syscall)
   12.82 +
   12.83 +c-link	:= init_task.o
   12.84 +s-link	:= vsyscall-int80.o vsyscall-sysenter.o vsyscall-sigreturn.o
   12.85 +
   12.86 +$(patsubst %.o,$(obj)/%.c,$(c-obj-y) $(c-link)) $(patsubst %.o,$(obj)/%.S,$(s-obj-y) $(s-link)):
   12.87 +	@ln -fsn $(srctree)/arch/i386/kernel/$(notdir $@) $@
   12.88 +
   12.89 +$(obj)/vsyscall-int80.S: $(obj)/vsyscall-sigreturn.S
   12.90 +
   12.91 +obj-y	+= $(c-obj-y) $(s-obj-y)
   12.92 +
   12.93 +clean-files += $(patsubst %.o,%.c,$(c-obj-y) $(c-obj-) $(c-link))
   12.94 +clean-files += $(patsubst %.o,%.S,$(s-obj-y) $(s-obj-) $(s-link))
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/cpu/Makefile	Mon Dec 27 10:12:02 2004 +0000
    13.3 @@ -0,0 +1,31 @@
    13.4 +#
    13.5 +# Makefile for x86-compatible CPU details and quirks
    13.6 +#
    13.7 +
    13.8 +CFLAGS	+= -Iarch/i386/kernel/cpu
    13.9 +
   13.10 +obj-y	:=	common.o
   13.11 +c-obj-y	+=	proc.o
   13.12 +
   13.13 +c-obj-y	+=	amd.o
   13.14 +c-obj-y	+=	cyrix.o
   13.15 +c-obj-y	+=	centaur.o
   13.16 +c-obj-y	+=	transmeta.o
   13.17 +c-obj-y	+=	intel.o intel_cacheinfo.o
   13.18 +c-obj-y	+=	rise.o
   13.19 +c-obj-y	+=	nexgen.o
   13.20 +c-obj-y	+=	umc.o
   13.21 +
   13.22 +#obj-$(CONFIG_X86_MCE)	+=	../../../../i386/kernel/cpu/mcheck/
   13.23 +
   13.24 +obj-$(CONFIG_MTRR)	+= 	mtrr/
   13.25 +#obj-$(CONFIG_CPU_FREQ)	+=	../../../../i386/kernel/cpu/cpufreq/
   13.26 +
   13.27 +c-link	:=
   13.28 +
   13.29 +$(patsubst %.o,$(obj)/%.c,$(c-obj-y) $(c-link)):
   13.30 +	@ln -fsn $(srctree)/arch/i386/kernel/cpu/$(notdir $@) $@
   13.31 +
   13.32 +obj-y	+= $(c-obj-y)
   13.33 +
   13.34 +clean-files += $(patsubst %.o,%.c,$(c-obj-y) $(c-obj-) $(c-link))
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/cpu/common.c	Mon Dec 27 10:12:02 2004 +0000
    14.3 @@ -0,0 +1,601 @@
    14.4 +#include <linux/init.h>
    14.5 +#include <linux/string.h>
    14.6 +#include <linux/delay.h>
    14.7 +#include <linux/smp.h>
    14.8 +#include <linux/module.h>
    14.9 +#include <linux/percpu.h>
   14.10 +#include <asm/semaphore.h>
   14.11 +#include <asm/processor.h>
   14.12 +#include <asm/i387.h>
   14.13 +#include <asm/msr.h>
   14.14 +#include <asm/io.h>
   14.15 +#include <asm/mmu_context.h>
   14.16 +#include <asm-xen/hypervisor.h>
   14.17 +
   14.18 +#include "cpu.h"
   14.19 +
   14.20 +DEFINE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]);
   14.21 +EXPORT_PER_CPU_SYMBOL(cpu_gdt_table);
   14.22 +
   14.23 +static int cachesize_override __initdata = -1;
   14.24 +static int disable_x86_fxsr __initdata = 0;
   14.25 +static int disable_x86_serial_nr __initdata = 1;
   14.26 +
   14.27 +struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {};
   14.28 +
   14.29 +extern void mcheck_init(struct cpuinfo_x86 *c);
   14.30 +
   14.31 +extern void machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c);
   14.32 +
   14.33 +extern int disable_pse;
   14.34 +
   14.35 +static void default_init(struct cpuinfo_x86 * c)
   14.36 +{
   14.37 +	/* Not much we can do here... */
   14.38 +	/* Check if at least it has cpuid */
   14.39 +	if (c->cpuid_level == -1) {
   14.40 +		/* No cpuid. It must be an ancient CPU */
   14.41 +		if (c->x86 == 4)
   14.42 +			strcpy(c->x86_model_id, "486");
   14.43 +		else if (c->x86 == 3)
   14.44 +			strcpy(c->x86_model_id, "386");
   14.45 +	}
   14.46 +}
   14.47 +
   14.48 +static struct cpu_dev default_cpu = {
   14.49 +	.c_init	= default_init,
   14.50 +};
   14.51 +static struct cpu_dev * this_cpu = &default_cpu;
   14.52 +
   14.53 +static int __init cachesize_setup(char *str)
   14.54 +{
   14.55 +	get_option (&str, &cachesize_override);
   14.56 +	return 1;
   14.57 +}
   14.58 +__setup("cachesize=", cachesize_setup);
   14.59 +
   14.60 +int __init get_model_name(struct cpuinfo_x86 *c)
   14.61 +{
   14.62 +	unsigned int *v;
   14.63 +	char *p, *q;
   14.64 +
   14.65 +	if (cpuid_eax(0x80000000) < 0x80000004)
   14.66 +		return 0;
   14.67 +
   14.68 +	v = (unsigned int *) c->x86_model_id;
   14.69 +	cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]);
   14.70 +	cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]);
   14.71 +	cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]);
   14.72 +	c->x86_model_id[48] = 0;
   14.73 +
   14.74 +	/* Intel chips right-justify this string for some dumb reason;
   14.75 +	   undo that brain damage */
   14.76 +	p = q = &c->x86_model_id[0];
   14.77 +	while ( *p == ' ' )
   14.78 +	     p++;
   14.79 +	if ( p != q ) {
   14.80 +	     while ( *p )
   14.81 +		  *q++ = *p++;
   14.82 +	     while ( q <= &c->x86_model_id[48] )
   14.83 +		  *q++ = '\0';	/* Zero-pad the rest */
   14.84 +	}
   14.85 +
   14.86 +	return 1;
   14.87 +}
   14.88 +
   14.89 +
   14.90 +void __init display_cacheinfo(struct cpuinfo_x86 *c)
   14.91 +{
   14.92 +	unsigned int n, dummy, ecx, edx, l2size;
   14.93 +
   14.94 +	n = cpuid_eax(0x80000000);
   14.95 +
   14.96 +	if (n >= 0x80000005) {
   14.97 +		cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
   14.98 +		printk(KERN_INFO "CPU: L1 I Cache: %dK (%d bytes/line), D cache %dK (%d bytes/line)\n",
   14.99 +			edx>>24, edx&0xFF, ecx>>24, ecx&0xFF);
  14.100 +		c->x86_cache_size=(ecx>>24)+(edx>>24);	
  14.101 +	}
  14.102 +
  14.103 +	if (n < 0x80000006)	/* Some chips just has a large L1. */
  14.104 +		return;
  14.105 +
  14.106 +	ecx = cpuid_ecx(0x80000006);
  14.107 +	l2size = ecx >> 16;
  14.108 +	
  14.109 +	/* do processor-specific cache resizing */
  14.110 +	if (this_cpu->c_size_cache)
  14.111 +		l2size = this_cpu->c_size_cache(c,l2size);
  14.112 +
  14.113 +	/* Allow user to override all this if necessary. */
  14.114 +	if (cachesize_override != -1)
  14.115 +		l2size = cachesize_override;
  14.116 +
  14.117 +	if ( l2size == 0 )
  14.118 +		return;		/* Again, no L2 cache is possible */
  14.119 +
  14.120 +	c->x86_cache_size = l2size;
  14.121 +
  14.122 +	printk(KERN_INFO "CPU: L2 Cache: %dK (%d bytes/line)\n",
  14.123 +	       l2size, ecx & 0xFF);
  14.124 +}
  14.125 +
  14.126 +/* Naming convention should be: <Name> [(<Codename>)] */
  14.127 +/* This table only is used unless init_<vendor>() below doesn't set it; */
  14.128 +/* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */
  14.129 +
  14.130 +/* Look up CPU names by table lookup. */
  14.131 +static char __init *table_lookup_model(struct cpuinfo_x86 *c)
  14.132 +{
  14.133 +	struct cpu_model_info *info;
  14.134 +
  14.135 +	if ( c->x86_model >= 16 )
  14.136 +		return NULL;	/* Range check */
  14.137 +
  14.138 +	if (!this_cpu)
  14.139 +		return NULL;
  14.140 +
  14.141 +	info = this_cpu->c_models;
  14.142 +
  14.143 +	while (info && info->family) {
  14.144 +		if (info->family == c->x86)
  14.145 +			return info->model_names[c->x86_model];
  14.146 +		info++;
  14.147 +	}
  14.148 +	return NULL;		/* Not found */
  14.149 +}
  14.150 +
  14.151 +
  14.152 +void __init get_cpu_vendor(struct cpuinfo_x86 *c, int early)
  14.153 +{
  14.154 +	char *v = c->x86_vendor_id;
  14.155 +	int i;
  14.156 +
  14.157 +	for (i = 0; i < X86_VENDOR_NUM; i++) {
  14.158 +		if (cpu_devs[i]) {
  14.159 +			if (!strcmp(v,cpu_devs[i]->c_ident[0]) ||
  14.160 +			    (cpu_devs[i]->c_ident[1] && 
  14.161 +			     !strcmp(v,cpu_devs[i]->c_ident[1]))) {
  14.162 +				c->x86_vendor = i;
  14.163 +				if (!early)
  14.164 +					this_cpu = cpu_devs[i];
  14.165 +				break;
  14.166 +			}
  14.167 +		}
  14.168 +	}
  14.169 +}
  14.170 +
  14.171 +
  14.172 +static int __init x86_fxsr_setup(char * s)
  14.173 +{
  14.174 +	disable_x86_fxsr = 1;
  14.175 +	return 1;
  14.176 +}
  14.177 +__setup("nofxsr", x86_fxsr_setup);
  14.178 +
  14.179 +
  14.180 +/* Standard macro to see if a specific flag is changeable */
  14.181 +static inline int flag_is_changeable_p(u32 flag)
  14.182 +{
  14.183 +	u32 f1, f2;
  14.184 +
  14.185 +	asm("pushfl\n\t"
  14.186 +	    "pushfl\n\t"
  14.187 +	    "popl %0\n\t"
  14.188 +	    "movl %0,%1\n\t"
  14.189 +	    "xorl %2,%0\n\t"
  14.190 +	    "pushl %0\n\t"
  14.191 +	    "popfl\n\t"
  14.192 +	    "pushfl\n\t"
  14.193 +	    "popl %0\n\t"
  14.194 +	    "popfl\n\t"
  14.195 +	    : "=&r" (f1), "=&r" (f2)
  14.196 +	    : "ir" (flag));
  14.197 +
  14.198 +	return ((f1^f2) & flag) != 0;
  14.199 +}
  14.200 +
  14.201 +
  14.202 +/* Probe for the CPUID instruction */
  14.203 +int __init have_cpuid_p(void)
  14.204 +{
  14.205 +	return flag_is_changeable_p(X86_EFLAGS_ID);
  14.206 +}
  14.207 +
  14.208 +/* Do minimum CPU detection early.
  14.209 +   Fields really needed: vendor, cpuid_level, family, model, mask, cache alignment.
  14.210 +   The others are not touched to avoid unwanted side effects. */
  14.211 +void __init early_cpu_detect(void)
  14.212 +{
  14.213 +	struct cpuinfo_x86 *c = &boot_cpu_data;
  14.214 +
  14.215 +	c->x86_cache_alignment = 32;
  14.216 +
  14.217 +	if (!have_cpuid_p())
  14.218 +		return;
  14.219 +
  14.220 +	/* Get vendor name */
  14.221 +	cpuid(0x00000000, &c->cpuid_level,
  14.222 +	      (int *)&c->x86_vendor_id[0],
  14.223 +	      (int *)&c->x86_vendor_id[8],
  14.224 +	      (int *)&c->x86_vendor_id[4]);
  14.225 +
  14.226 +	get_cpu_vendor(c, 1);
  14.227 +
  14.228 +	c->x86 = 4;
  14.229 +	if (c->cpuid_level >= 0x00000001) {
  14.230 +		u32 junk, tfms, cap0, misc;
  14.231 +		cpuid(0x00000001, &tfms, &misc, &junk, &cap0);
  14.232 +		c->x86 = (tfms >> 8) & 15;
  14.233 +		c->x86_model = (tfms >> 4) & 15;
  14.234 +		if (c->x86 == 0xf) {
  14.235 +			c->x86 += (tfms >> 20) & 0xff;
  14.236 +			c->x86_model += ((tfms >> 16) & 0xF) << 4;
  14.237 +		}
  14.238 +		c->x86_mask = tfms & 15;
  14.239 +		if (cap0 & (1<<19))
  14.240 +			c->x86_cache_alignment = ((misc >> 8) & 0xff) * 8;
  14.241 +	}
  14.242 +
  14.243 +	early_intel_workaround(c);
  14.244 +}
  14.245 +
  14.246 +void __init generic_identify(struct cpuinfo_x86 * c)
  14.247 +{
  14.248 +	u32 tfms, xlvl;
  14.249 +	int junk;
  14.250 +
  14.251 +	if (have_cpuid_p()) {
  14.252 +		/* Get vendor name */
  14.253 +		cpuid(0x00000000, &c->cpuid_level,
  14.254 +		      (int *)&c->x86_vendor_id[0],
  14.255 +		      (int *)&c->x86_vendor_id[8],
  14.256 +		      (int *)&c->x86_vendor_id[4]);
  14.257 +		
  14.258 +		get_cpu_vendor(c, 0);
  14.259 +		/* Initialize the standard set of capabilities */
  14.260 +		/* Note that the vendor-specific code below might override */
  14.261 +	
  14.262 +		/* Intel-defined flags: level 0x00000001 */
  14.263 +		if ( c->cpuid_level >= 0x00000001 ) {
  14.264 +			u32 capability, excap;
  14.265 +			cpuid(0x00000001, &tfms, &junk, &excap, &capability);
  14.266 +			c->x86_capability[0] = capability;
  14.267 +			c->x86_capability[4] = excap;
  14.268 +			c->x86 = (tfms >> 8) & 15;
  14.269 +			c->x86_model = (tfms >> 4) & 15;
  14.270 +			if (c->x86 == 0xf) {
  14.271 +				c->x86 += (tfms >> 20) & 0xff;
  14.272 +				c->x86_model += ((tfms >> 16) & 0xF) << 4;
  14.273 +			} 
  14.274 +			c->x86_mask = tfms & 15;
  14.275 +		} else {
  14.276 +			/* Have CPUID level 0 only - unheard of */
  14.277 +			c->x86 = 4;
  14.278 +		}
  14.279 +
  14.280 +		/* AMD-defined flags: level 0x80000001 */
  14.281 +		xlvl = cpuid_eax(0x80000000);
  14.282 +		if ( (xlvl & 0xffff0000) == 0x80000000 ) {
  14.283 +			if ( xlvl >= 0x80000001 )
  14.284 +				c->x86_capability[1] = cpuid_edx(0x80000001);
  14.285 +			if ( xlvl >= 0x80000004 )
  14.286 +				get_model_name(c); /* Default name */
  14.287 +		}
  14.288 +	}
  14.289 +}
  14.290 +
  14.291 +static void __init squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
  14.292 +{
  14.293 +	if (cpu_has(c, X86_FEATURE_PN) && disable_x86_serial_nr ) {
  14.294 +		/* Disable processor serial number */
  14.295 +		unsigned long lo,hi;
  14.296 +		rdmsr(MSR_IA32_BBL_CR_CTL,lo,hi);
  14.297 +		lo |= 0x200000;
  14.298 +		wrmsr(MSR_IA32_BBL_CR_CTL,lo,hi);
  14.299 +		printk(KERN_NOTICE "CPU serial number disabled.\n");
  14.300 +		clear_bit(X86_FEATURE_PN, c->x86_capability);
  14.301 +
  14.302 +		/* Disabling the serial number may affect the cpuid level */
  14.303 +		c->cpuid_level = cpuid_eax(0);
  14.304 +	}
  14.305 +}
  14.306 +
  14.307 +static int __init x86_serial_nr_setup(char *s)
  14.308 +{
  14.309 +	disable_x86_serial_nr = 0;
  14.310 +	return 1;
  14.311 +}
  14.312 +__setup("serialnumber", x86_serial_nr_setup);
  14.313 +
  14.314 +
  14.315 +
  14.316 +/*
  14.317 + * This does the hard work of actually picking apart the CPU stuff...
  14.318 + */
  14.319 +void __init identify_cpu(struct cpuinfo_x86 *c)
  14.320 +{
  14.321 +	int i;
  14.322 +
  14.323 +	c->loops_per_jiffy = loops_per_jiffy;
  14.324 +	c->x86_cache_size = -1;
  14.325 +	c->x86_vendor = X86_VENDOR_UNKNOWN;
  14.326 +	c->cpuid_level = -1;	/* CPUID not detected */
  14.327 +	c->x86_model = c->x86_mask = 0;	/* So far unknown... */
  14.328 +	c->x86_vendor_id[0] = '\0'; /* Unset */
  14.329 +	c->x86_model_id[0] = '\0';  /* Unset */
  14.330 +	memset(&c->x86_capability, 0, sizeof c->x86_capability);
  14.331 +
  14.332 +	if (!have_cpuid_p()) {
  14.333 +		/* First of all, decide if this is a 486 or higher */
  14.334 +		/* It's a 486 if we can modify the AC flag */
  14.335 +		if ( flag_is_changeable_p(X86_EFLAGS_AC) )
  14.336 +			c->x86 = 4;
  14.337 +		else
  14.338 +			c->x86 = 3;
  14.339 +	}
  14.340 +
  14.341 +	generic_identify(c);
  14.342 +
  14.343 +	printk(KERN_DEBUG "CPU: After generic identify, caps: %08lx %08lx %08lx %08lx\n",
  14.344 +		c->x86_capability[0],
  14.345 +		c->x86_capability[1],
  14.346 +		c->x86_capability[2],
  14.347 +		c->x86_capability[3]);
  14.348 +
  14.349 +	if (this_cpu->c_identify) {
  14.350 +		this_cpu->c_identify(c);
  14.351 +
  14.352 +	printk(KERN_DEBUG "CPU: After vendor identify, caps:  %08lx %08lx %08lx %08lx\n",
  14.353 +		c->x86_capability[0],
  14.354 +		c->x86_capability[1],
  14.355 +		c->x86_capability[2],
  14.356 +		c->x86_capability[3]);
  14.357 +}
  14.358 +
  14.359 +	/*
  14.360 +	 * Vendor-specific initialization.  In this section we
  14.361 +	 * canonicalize the feature flags, meaning if there are
  14.362 +	 * features a certain CPU supports which CPUID doesn't
  14.363 +	 * tell us, CPUID claiming incorrect flags, or other bugs,
  14.364 +	 * we handle them here.
  14.365 +	 *
  14.366 +	 * At the end of this section, c->x86_capability better
  14.367 +	 * indicate the features this CPU genuinely supports!
  14.368 +	 */
  14.369 +	if (this_cpu->c_init)
  14.370 +		this_cpu->c_init(c);
  14.371 +
  14.372 +	/* Disable the PN if appropriate */
  14.373 +	squash_the_stupid_serial_number(c);
  14.374 +
  14.375 +	/*
  14.376 +	 * The vendor-specific functions might have changed features.  Now
  14.377 +	 * we do "generic changes."
  14.378 +	 */
  14.379 +
  14.380 +	/* TSC disabled? */
  14.381 +	if ( tsc_disable )
  14.382 +		clear_bit(X86_FEATURE_TSC, c->x86_capability);
  14.383 +
  14.384 +	/* FXSR disabled? */
  14.385 +	if (disable_x86_fxsr) {
  14.386 +		clear_bit(X86_FEATURE_FXSR, c->x86_capability);
  14.387 +		clear_bit(X86_FEATURE_XMM, c->x86_capability);
  14.388 +	}
  14.389 +
  14.390 +	if (disable_pse)
  14.391 +		clear_bit(X86_FEATURE_PSE, c->x86_capability);
  14.392 +
  14.393 +	/* If the model name is still unset, do table lookup. */
  14.394 +	if ( !c->x86_model_id[0] ) {
  14.395 +		char *p;
  14.396 +		p = table_lookup_model(c);
  14.397 +		if ( p )
  14.398 +			strcpy(c->x86_model_id, p);
  14.399 +		else
  14.400 +			/* Last resort... */
  14.401 +			sprintf(c->x86_model_id, "%02x/%02x",
  14.402 +				c->x86_vendor, c->x86_model);
  14.403 +	}
  14.404 +
  14.405 +	machine_specific_modify_cpu_capabilities(c);
  14.406 +
  14.407 +	/* Now the feature flags better reflect actual CPU features! */
  14.408 +
  14.409 +	printk(KERN_DEBUG "CPU: After all inits, caps:        %08lx %08lx %08lx %08lx\n",
  14.410 +	       c->x86_capability[0],
  14.411 +	       c->x86_capability[1],
  14.412 +	       c->x86_capability[2],
  14.413 +	       c->x86_capability[3]);
  14.414 +
  14.415 +	/*
  14.416 +	 * On SMP, boot_cpu_data holds the common feature set between
  14.417 +	 * all CPUs; so make sure that we indicate which features are
  14.418 +	 * common between the CPUs.  The first time this routine gets
  14.419 +	 * executed, c == &boot_cpu_data.
  14.420 +	 */
  14.421 +	if ( c != &boot_cpu_data ) {
  14.422 +		/* AND the already accumulated flags with these */
  14.423 +		for ( i = 0 ; i < NCAPINTS ; i++ )
  14.424 +			boot_cpu_data.x86_capability[i] &= c->x86_capability[i];
  14.425 +	}
  14.426 +
  14.427 +	/* Init Machine Check Exception if available. */
  14.428 +#ifdef CONFIG_X86_MCE
  14.429 +	mcheck_init(c);
  14.430 +#endif
  14.431 +}
  14.432 +/*
  14.433 + *	Perform early boot up checks for a valid TSC. See arch/i386/kernel/time.c
  14.434 + */
  14.435 + 
  14.436 +void __init dodgy_tsc(void)
  14.437 +{
  14.438 +	if (( boot_cpu_data.x86_vendor == X86_VENDOR_CYRIX ) ||
  14.439 +	    ( boot_cpu_data.x86_vendor == X86_VENDOR_NSC   ))
  14.440 +		cpu_devs[X86_VENDOR_CYRIX]->c_init(&boot_cpu_data);
  14.441 +}
  14.442 +
  14.443 +void __init print_cpu_info(struct cpuinfo_x86 *c)
  14.444 +{
  14.445 +	char *vendor = NULL;
  14.446 +
  14.447 +	if (c->x86_vendor < X86_VENDOR_NUM)
  14.448 +		vendor = this_cpu->c_vendor;
  14.449 +	else if (c->cpuid_level >= 0)
  14.450 +		vendor = c->x86_vendor_id;
  14.451 +
  14.452 +	if (vendor && strncmp(c->x86_model_id, vendor, strlen(vendor)))
  14.453 +		printk("%s ", vendor);
  14.454 +
  14.455 +	if (!c->x86_model_id[0])
  14.456 +		printk("%d86", c->x86);
  14.457 +	else
  14.458 +		printk("%s", c->x86_model_id);
  14.459 +
  14.460 +	if (c->x86_mask || c->cpuid_level >= 0) 
  14.461 +		printk(" stepping %02x\n", c->x86_mask);
  14.462 +	else
  14.463 +		printk("\n");
  14.464 +}
  14.465 +
  14.466 +unsigned long cpu_initialized __initdata = 0;
  14.467 +
  14.468 +/* This is hacky. :)
  14.469 + * We're emulating future behavior.
  14.470 + * In the future, the cpu-specific init functions will be called implicitly
  14.471 + * via the magic of initcalls.
  14.472 + * They will insert themselves into the cpu_devs structure.
  14.473 + * Then, when cpu_init() is called, we can just iterate over that array.
  14.474 + */
  14.475 +
  14.476 +extern int intel_cpu_init(void);
  14.477 +extern int cyrix_init_cpu(void);
  14.478 +extern int nsc_init_cpu(void);
  14.479 +extern int amd_init_cpu(void);
  14.480 +extern int centaur_init_cpu(void);
  14.481 +extern int transmeta_init_cpu(void);
  14.482 +extern int rise_init_cpu(void);
  14.483 +extern int nexgen_init_cpu(void);
  14.484 +extern int umc_init_cpu(void);
  14.485 +void early_cpu_detect(void);
  14.486 +
  14.487 +void __init early_cpu_init(void)
  14.488 +{
  14.489 +	intel_cpu_init();
  14.490 +	cyrix_init_cpu();
  14.491 +	nsc_init_cpu();
  14.492 +	amd_init_cpu();
  14.493 +	centaur_init_cpu();
  14.494 +	transmeta_init_cpu();
  14.495 +	rise_init_cpu();
  14.496 +	nexgen_init_cpu();
  14.497 +	umc_init_cpu();
  14.498 +	early_cpu_detect();
  14.499 +
  14.500 +#ifdef CONFIG_DEBUG_PAGEALLOC
  14.501 +	/* pse is not compatible with on-the-fly unmapping,
  14.502 +	 * disable it even if the cpus claim to support it.
  14.503 +	 */
  14.504 +	clear_bit(X86_FEATURE_PSE, boot_cpu_data.x86_capability);
  14.505 +	disable_pse = 1;
  14.506 +#endif
  14.507 +}
  14.508 +
  14.509 +void __init cpu_gdt_init(struct Xgt_desc_struct *gdt_descr)
  14.510 +{
  14.511 +	unsigned long frames[gdt_descr->size >> PAGE_SHIFT];
  14.512 +	unsigned long va;
  14.513 +	int f;
  14.514 +
  14.515 +	for (va = gdt_descr->address, f = 0;
  14.516 +	     va < gdt_descr->address + gdt_descr->size;
  14.517 +	     va += PAGE_SIZE, f++) {
  14.518 +		frames[f] = virt_to_machine(va) >> PAGE_SHIFT;
  14.519 +		make_page_readonly((void *)va);
  14.520 +	}
  14.521 +	flush_page_update_queue();
  14.522 +	if (HYPERVISOR_set_gdt(frames, gdt_descr->size / 8))
  14.523 +		BUG();
  14.524 +	lgdt_finish();
  14.525 +}
  14.526 +
  14.527 +/*
  14.528 + * cpu_init() initializes state that is per-CPU. Some data is already
  14.529 + * initialized (naturally) in the bootstrap process, such as the GDT
  14.530 + * and IDT. We reload them nevertheless, this function acts as a
  14.531 + * 'CPU state barrier', nothing should get across.
  14.532 + */
  14.533 +void __init cpu_init (void)
  14.534 +{
  14.535 +	int cpu = smp_processor_id();
  14.536 +	struct tss_struct * t = &per_cpu(init_tss, cpu);
  14.537 +	struct thread_struct *thread = &current->thread;
  14.538 +
  14.539 +	if (test_and_set_bit(cpu, &cpu_initialized)) {
  14.540 +		printk(KERN_WARNING "CPU#%d already initialized!\n", cpu);
  14.541 +		for (;;) local_irq_enable();
  14.542 +	}
  14.543 +	printk(KERN_INFO "Initializing CPU#%d\n", cpu);
  14.544 +
  14.545 +	if (cpu_has_vme || cpu_has_de)
  14.546 +		clear_in_cr4(X86_CR4_VME|X86_CR4_PVI|X86_CR4_TSD|X86_CR4_DE);
  14.547 +	if (tsc_disable && cpu_has_tsc) {
  14.548 +		printk(KERN_NOTICE "Disabling TSC...\n");
  14.549 +		/**** FIX-HPA: DOES THIS REALLY BELONG HERE? ****/
  14.550 +		clear_bit(X86_FEATURE_TSC, boot_cpu_data.x86_capability);
  14.551 +		set_in_cr4(X86_CR4_TSD);
  14.552 +	}
  14.553 +
  14.554 +	/*
  14.555 +	 * Set up the per-thread TLS descriptor cache:
  14.556 +	 */
  14.557 +	memcpy(thread->tls_array, &get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN],
  14.558 +	    GDT_ENTRY_TLS_ENTRIES * 8);
  14.559 +
  14.560 +	cpu_gdt_init(&cpu_gdt_descr[cpu]);
  14.561 +
  14.562 +	/*
  14.563 +	 * Delete NT
  14.564 +	 */
  14.565 +	__asm__("pushfl ; andl $0xffffbfff,(%esp) ; popfl");
  14.566 +
  14.567 +	/*
  14.568 +	 * Set up and load the per-CPU TSS and LDT
  14.569 +	 */
  14.570 +	atomic_inc(&init_mm.mm_count);
  14.571 +	current->active_mm = &init_mm;
  14.572 +	if (current->mm)
  14.573 +		BUG();
  14.574 +	enter_lazy_tlb(&init_mm, current);
  14.575 +
  14.576 +	load_esp0(t, thread);
  14.577 +
  14.578 +	load_LDT(&init_mm.context);
  14.579 +	flush_page_update_queue();
  14.580 +
  14.581 +	/* Clear %fs and %gs. */
  14.582 +	asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs");
  14.583 +
  14.584 +	/* Clear all 6 debug registers: */
  14.585 +
  14.586 +#define CD(register) HYPERVISOR_set_debugreg(register, 0)
  14.587 +
  14.588 +	CD(0); CD(1); CD(2); CD(3); /* no db4 and db5 */; CD(6); CD(7);
  14.589 +
  14.590 +#undef CD
  14.591 +
  14.592 +	/*
  14.593 +	 * Force FPU initialization:
  14.594 +	 */
  14.595 +	current_thread_info()->status = 0;
  14.596 +	current->used_math = 0;
  14.597 +	mxcsr_feature_mask_init();
  14.598 +}
  14.599 +
  14.600 +
  14.601 +int get_smp_processor_id(void)
  14.602 +{
  14.603 +	return smp_processor_id();
  14.604 +}
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/Makefile	Mon Dec 27 10:12:02 2004 +0000
    15.3 @@ -0,0 +1,16 @@
    15.4 +obj-y	:= main.o
    15.5 +c-obj-y	:= if.o
    15.6 +
    15.7 +c-link	:=
    15.8 +
    15.9 +$(patsubst %.o,$(obj)/%.c,$(c-obj-y) $(c-link)): $(obj)/mtrr.h
   15.10 +	@ln -fsn $(srctree)/arch/i386/kernel/cpu/mtrr/$(notdir $@) $@
   15.11 +
   15.12 +$(patsubst %.o,$(obj)/%.c,$(obj-y)): $(obj)/mtrr.h
   15.13 +
   15.14 +$(obj)/mtrr.h:
   15.15 +	@ln -fsn $(srctree)/arch/i386/kernel/cpu/mtrr/mtrr.h $@
   15.16 +
   15.17 +obj-y	+= $(c-obj-y)
   15.18 +
   15.19 +clean-files += $(patsubst %.o,%.c,$(c-obj-y) $(c-obj-) $(c-link))
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/main.c	Mon Dec 27 10:12:02 2004 +0000
    16.3 @@ -0,0 +1,165 @@
    16.4 +#include <linux/init.h>
    16.5 +#include <linux/proc_fs.h>
    16.6 +#include <linux/ctype.h>
    16.7 +#include <linux/module.h>
    16.8 +#include <linux/seq_file.h>
    16.9 +#include <asm/uaccess.h>
   16.10 +
   16.11 +#include <asm/mtrr.h>
   16.12 +#include "mtrr.h"
   16.13 +
   16.14 +void generic_get_mtrr(unsigned int reg, unsigned long *base,
   16.15 +		      unsigned int *size, mtrr_type * type)
   16.16 +{
   16.17 +	dom0_op_t op;
   16.18 +
   16.19 +	op.cmd = DOM0_READ_MEMTYPE;
   16.20 +	op.u.read_memtype.reg = reg;
   16.21 +	(void)HYPERVISOR_dom0_op(&op);
   16.22 +
   16.23 +	*size = op.u.read_memtype.nr_pfns;
   16.24 +	*base = op.u.read_memtype.pfn;
   16.25 +	*type = op.u.read_memtype.type;
   16.26 +}
   16.27 +
   16.28 +struct mtrr_ops generic_mtrr_ops = {
   16.29 +	.use_intel_if      = 1,
   16.30 +	.get               = generic_get_mtrr,
   16.31 +};
   16.32 +
   16.33 +struct mtrr_ops *mtrr_if = &generic_mtrr_ops;
   16.34 +unsigned int num_var_ranges;
   16.35 +unsigned int *usage_table;
   16.36 +
   16.37 +void __init set_num_var_ranges(void)
   16.38 +{
   16.39 +	dom0_op_t op;
   16.40 +
   16.41 +	for (num_var_ranges = 0; ; num_var_ranges++) {
   16.42 +		op.cmd = DOM0_READ_MEMTYPE;
   16.43 +		op.u.read_memtype.reg = num_var_ranges;
   16.44 +		if (HYPERVISOR_dom0_op(&op) != 0)
   16.45 +			break;
   16.46 +	}
   16.47 +}
   16.48 +
   16.49 +static void __init init_table(void)
   16.50 +{
   16.51 +	int i, max;
   16.52 +
   16.53 +	max = num_var_ranges;
   16.54 +	if ((usage_table = kmalloc(max * sizeof *usage_table, GFP_KERNEL))
   16.55 +	    == NULL) {
   16.56 +		printk(KERN_ERR "mtrr: could not allocate\n");
   16.57 +		return;
   16.58 +	}
   16.59 +	for (i = 0; i < max; i++)
   16.60 +		usage_table[i] = 0;
   16.61 +}
   16.62 +
   16.63 +int mtrr_add_page(unsigned long base, unsigned long size, 
   16.64 +		  unsigned int type, char increment)
   16.65 +{
   16.66 +	int error;
   16.67 +	dom0_op_t op;
   16.68 +
   16.69 +	op.cmd = DOM0_ADD_MEMTYPE;
   16.70 +	op.u.add_memtype.pfn     = base;
   16.71 +	op.u.add_memtype.nr_pfns = size;
   16.72 +	op.u.add_memtype.type    = type;
   16.73 +	if ((error = HYPERVISOR_dom0_op(&op)))
   16.74 +		return error;
   16.75 +
   16.76 +	if (increment)
   16.77 +		++usage_table[op.u.add_memtype.reg];
   16.78 +
   16.79 +	return op.u.add_memtype.reg;
   16.80 +}
   16.81 +
   16.82 +int
   16.83 +mtrr_add(unsigned long base, unsigned long size, unsigned int type,
   16.84 +	 char increment)
   16.85 +{
   16.86 +	if ((base & (PAGE_SIZE - 1)) || (size & (PAGE_SIZE - 1))) {
   16.87 +		printk(KERN_WARNING "mtrr: size and base must be multiples of 4 kiB\n");
   16.88 +		printk(KERN_DEBUG "mtrr: size: 0x%lx  base: 0x%lx\n", size, base);
   16.89 +		return -EINVAL;
   16.90 +	}
   16.91 +	return mtrr_add_page(base >> PAGE_SHIFT, size >> PAGE_SHIFT, type,
   16.92 +			     increment);
   16.93 +}
   16.94 +
   16.95 +int mtrr_del_page(int reg, unsigned long base, unsigned long size)
   16.96 +{
   16.97 +	int i, max;
   16.98 +	mtrr_type ltype;
   16.99 +	unsigned long lbase;
  16.100 +	unsigned int lsize;
  16.101 +	int error = -EINVAL;
  16.102 +	dom0_op_t op;
  16.103 +
  16.104 +	max = num_var_ranges;
  16.105 +	if (reg < 0) {
  16.106 +		/*  Search for existing MTRR  */
  16.107 +		for (i = 0; i < max; ++i) {
  16.108 +			mtrr_if->get(i, &lbase, &lsize, &ltype);
  16.109 +			if (lbase == base && lsize == size) {
  16.110 +				reg = i;
  16.111 +				break;
  16.112 +			}
  16.113 +		}
  16.114 +		if (reg < 0) {
  16.115 +			printk(KERN_DEBUG "mtrr: no MTRR for %lx000,%lx000 found\n", base,
  16.116 +			       size);
  16.117 +			goto out;
  16.118 +		}
  16.119 +	}
  16.120 +	if (usage_table[reg] < 1) {
  16.121 +		printk(KERN_WARNING "mtrr: reg: %d has count=0\n", reg);
  16.122 +		goto out;
  16.123 +	}
  16.124 +	if (--usage_table[reg] < 1) {
  16.125 +		op.cmd = DOM0_DEL_MEMTYPE;
  16.126 +		op.u.del_memtype.handle = 0;
  16.127 +		op.u.add_memtype.reg    = reg;
  16.128 +		(void)HYPERVISOR_dom0_op(&op);
  16.129 +	}
  16.130 +	error = reg;
  16.131 + out:
  16.132 +	return error;
  16.133 +}
  16.134 +
  16.135 +int
  16.136 +mtrr_del(int reg, unsigned long base, unsigned long size)
  16.137 +{
  16.138 +	if ((base & (PAGE_SIZE - 1)) || (size & (PAGE_SIZE - 1))) {
  16.139 +		printk(KERN_INFO "mtrr: size and base must be multiples of 4 kiB\n");
  16.140 +		printk(KERN_DEBUG "mtrr: size: 0x%lx  base: 0x%lx\n", size, base);
  16.141 +		return -EINVAL;
  16.142 +	}
  16.143 +	return mtrr_del_page(reg, base >> PAGE_SHIFT, size >> PAGE_SHIFT);
  16.144 +}
  16.145 +
  16.146 +EXPORT_SYMBOL(mtrr_add);
  16.147 +EXPORT_SYMBOL(mtrr_del);
  16.148 +
  16.149 +static int __init mtrr_init(void)
  16.150 +{
  16.151 +	struct cpuinfo_x86 *c = &boot_cpu_data;
  16.152 +
  16.153 +	if (!(xen_start_info.flags & SIF_PRIVILEGED))
  16.154 +		return -ENODEV;
  16.155 +
  16.156 +	if ((!cpu_has(c, X86_FEATURE_MTRR)) &&
  16.157 +	    (!cpu_has(c, X86_FEATURE_K6_MTRR)) &&
  16.158 +	    (!cpu_has(c, X86_FEATURE_CYRIX_ARR)) &&
  16.159 +	    (!cpu_has(c, X86_FEATURE_CENTAUR_MCR)))
  16.160 +		return -ENODEV;
  16.161 +
  16.162 +	set_num_var_ranges();
  16.163 +	init_table();
  16.164 +
  16.165 +	return 0;
  16.166 +}
  16.167 +
  16.168 +subsys_initcall(mtrr_init);
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/entry.S	Mon Dec 27 10:12:02 2004 +0000
    17.3 @@ -0,0 +1,1068 @@
    17.4 +/*
    17.5 + *  linux/arch/i386/entry.S
    17.6 + *
    17.7 + *  Copyright (C) 1991, 1992  Linus Torvalds
    17.8 + */
    17.9 +
   17.10 +/*
   17.11 + * entry.S contains the system-call and fault low-level handling routines.
   17.12 + * This also contains the timer-interrupt handler, as well as all interrupts
   17.13 + * and faults that can result in a task-switch.
   17.14 + *
   17.15 + * NOTE: This code handles signal-recognition, which happens every time
   17.16 + * after a timer-interrupt and after each system call.
   17.17 + *
   17.18 + * I changed all the .align's to 4 (16 byte alignment), as that's faster
   17.19 + * on a 486.
   17.20 + *
   17.21 + * Stack layout in 'ret_from_system_call':
   17.22 + * 	ptrace needs to have all regs on the stack.
   17.23 + *	if the order here is changed, it needs to be
   17.24 + *	updated in fork.c:copy_process, signal.c:do_signal,
   17.25 + *	ptrace.c and ptrace.h
   17.26 + *
   17.27 + *	 0(%esp) - %ebx
   17.28 + *	 4(%esp) - %ecx
   17.29 + *	 8(%esp) - %edx
   17.30 + *       C(%esp) - %esi
   17.31 + *	10(%esp) - %edi
   17.32 + *	14(%esp) - %ebp
   17.33 + *	18(%esp) - %eax
   17.34 + *	1C(%esp) - %ds
   17.35 + *	20(%esp) - %es
   17.36 + *	24(%esp) - orig_eax
   17.37 + *	28(%esp) - %eip
   17.38 + *	2C(%esp) - %cs
   17.39 + *	30(%esp) - %eflags
   17.40 + *	34(%esp) - %oldesp
   17.41 + *	38(%esp) - %oldss
   17.42 + *
   17.43 + * "current" is in register %ebx during any slow entries.
   17.44 + */
   17.45 +
   17.46 +#include <linux/config.h>
   17.47 +#include <linux/linkage.h>
   17.48 +#include <asm/thread_info.h>
   17.49 +#include <asm/errno.h>
   17.50 +#include <asm/segment.h>
   17.51 +#include <asm/smp.h>
   17.52 +#include <asm/page.h>
   17.53 +#include "irq_vectors.h"
   17.54 +#include <asm-xen/xen-public/xen.h>
   17.55 +
   17.56 +#define nr_syscalls ((syscall_table_size)/4)
   17.57 +
   17.58 +EBX		= 0x00
   17.59 +ECX		= 0x04
   17.60 +EDX		= 0x08
   17.61 +ESI		= 0x0C
   17.62 +EDI		= 0x10
   17.63 +EBP		= 0x14
   17.64 +EAX		= 0x18
   17.65 +DS		= 0x1C
   17.66 +ES		= 0x20
   17.67 +ORIG_EAX	= 0x24
   17.68 +EIP		= 0x28
   17.69 +CS		= 0x2C
   17.70 +EVENT_MASK	= 0x2E
   17.71 +EFLAGS		= 0x30
   17.72 +OLDESP		= 0x34
   17.73 +OLDSS		= 0x38
   17.74 +
   17.75 +CF_MASK		= 0x00000001
   17.76 +TF_MASK		= 0x00000100
   17.77 +IF_MASK		= 0x00000200
   17.78 +DF_MASK		= 0x00000400 
   17.79 +NT_MASK		= 0x00004000
   17.80 +VM_MASK		= 0x00020000
   17.81 +
   17.82 +/* Offsets into shared_info_t. */
   17.83 +#define evtchn_upcall_pending		/* 0 */
   17.84 +#define evtchn_upcall_mask		1
   17.85 +
   17.86 +#define sizeof_vcpu_shift		3
   17.87 +
   17.88 +#ifdef CONFIG_SMP
   17.89 +#define XEN_GET_VCPU_INFO(reg)
   17.90 +#define preempt_disable(reg)	incl TI_preempt_count(reg)
   17.91 +#define preempt_enable(reg)	decl TI_preempt_count(reg)
   17.92 +#define XEN_LOCK_VCPU_INFO_SMP(reg) preempt_disable(%ebp)		; \
   17.93 +				movl TI_cpu(%ebp),reg			; \
   17.94 +				shl  $sizeof_vcpu_shift,reg		; \
   17.95 +				addl HYPERVISOR_shared_info,reg
   17.96 +#define XEN_UNLOCK_VCPU_INFO_SMP(reg) preempt_enable(%ebp)
   17.97 +#define XEN_UNLOCK_VCPU_INFO_SMP_fixup .byte 0x00,0x00,0x00
   17.98 +#define XEN_BLOCK_EVENTS(reg)	XEN_LOCK_VCPU_INFO_SMP(reg)		; \
   17.99 +				movb $1,evtchn_upcall_mask(reg)		; \
  17.100 +    				XEN_UNLOCK_VCPU_INFO_SMP(reg)
  17.101 +#define XEN_UNBLOCK_EVENTS(reg)	XEN_LOCK_VCPU_INFO_SMP(reg)		; \
  17.102 +				movb $0,evtchn_upcall_mask(reg)		; \
  17.103 +    				XEN_UNLOCK_VCPU_INFO_SMP(reg)
  17.104 +#define XEN_SAVE_UPCALL_MASK(reg,tmp,off) GET_THREAD_INFO(%ebp)		; \
  17.105 +				XEN_LOCK_VCPU_INFO_SMP(reg)		; \
  17.106 +				movb evtchn_upcall_mask(reg), tmp	; \
  17.107 +				movb tmp, off(%esp)			; \
  17.108 +    				XEN_UNLOCK_VCPU_INFO_SMP(reg)
  17.109 +#else
  17.110 +#define XEN_GET_VCPU_INFO(reg)	movl HYPERVISOR_shared_info,reg
  17.111 +#define XEN_LOCK_VCPU_INFO_SMP(reg)
  17.112 +#define XEN_UNLOCK_VCPU_INFO_SMP(reg)
  17.113 +#define XEN_UNLOCK_VCPU_INFO_SMP_fixup
  17.114 +#define XEN_BLOCK_EVENTS(reg)	movb $1,evtchn_upcall_mask(reg)
  17.115 +#define XEN_UNBLOCK_EVENTS(reg)	movb $0,evtchn_upcall_mask(reg)
  17.116 +#define XEN_SAVE_UPCALL_MASK(reg,tmp,off) \
  17.117 +	movb evtchn_upcall_mask(reg), tmp; \
  17.118 +	movb tmp, off(%esp)
  17.119 +#endif
  17.120 +
  17.121 +#define XEN_TEST_PENDING(reg)	testb $0xFF,evtchn_upcall_pending(reg)
  17.122 +
  17.123 +#ifdef CONFIG_PREEMPT
  17.124 +#define preempt_stop		XEN_BLOCK_EVENTS(%esi)
  17.125 +#else
  17.126 +#define preempt_stop
  17.127 +#define resume_kernel		restore_all
  17.128 +#endif
  17.129 +
  17.130 +#define SAVE_ALL_NO_EVENTMASK \
  17.131 +	cld; \
  17.132 +	pushl %es; \
  17.133 +	pushl %ds; \
  17.134 +	pushl %eax; \
  17.135 +	pushl %ebp; \
  17.136 +	pushl %edi; \
  17.137 +	pushl %esi; \
  17.138 +	pushl %edx; \
  17.139 +	pushl %ecx; \
  17.140 +	pushl %ebx; \
  17.141 +	movl $(__USER_DS), %edx; \
  17.142 +	movl %edx, %ds; \
  17.143 +	movl %edx, %es;
  17.144 +
  17.145 +#define SAVE_ALL \
  17.146 +	SAVE_ALL_NO_EVENTMASK; \
  17.147 +	XEN_GET_VCPU_INFO(%esi); \
  17.148 +	XEN_SAVE_UPCALL_MASK(%esi,%dl,EVENT_MASK)
  17.149 +
  17.150 +#define RESTORE_INT_REGS \
  17.151 +	popl %ebx;	\
  17.152 +	popl %ecx;	\
  17.153 +	popl %edx;	\
  17.154 +	popl %esi;	\
  17.155 +	popl %edi;	\
  17.156 +	popl %ebp;	\
  17.157 +	popl %eax
  17.158 +
  17.159 +#define RESTORE_REGS	\
  17.160 +	RESTORE_INT_REGS; \
  17.161 +1:	popl %ds;	\
  17.162 +2:	popl %es;	\
  17.163 +.section .fixup,"ax";	\
  17.164 +3:	movl $0,(%esp);	\
  17.165 +	jmp 1b;		\
  17.166 +4:	movl $0,(%esp);	\
  17.167 +	jmp 2b;		\
  17.168 +.previous;		\
  17.169 +.section __ex_table,"a";\
  17.170 +	.align 4;	\
  17.171 +	.long 1b,3b;	\
  17.172 +	.long 2b,4b;	\
  17.173 +.previous
  17.174 +
  17.175 +
  17.176 +#define RESTORE_ALL	\
  17.177 +	RESTORE_REGS	\
  17.178 +	addl $4, %esp;	\
  17.179 +1:	iret;		\
  17.180 +.section .fixup,"ax";   \
  17.181 +2:	movl $(__USER_DS), %edx; \
  17.182 +	movl %edx, %ds; \
  17.183 +	movl %edx, %es; \
  17.184 +	movl $11,%eax;	\
  17.185 +	call do_exit;	\
  17.186 +.previous;		\
  17.187 +.section __ex_table,"a";\
  17.188 +	.align 4;	\
  17.189 +	.long 1b,2b;	\
  17.190 +.previous
  17.191 +
  17.192 +
  17.193 +ENTRY(ret_from_fork)
  17.194 +	pushl %eax
  17.195 +	call schedule_tail
  17.196 +	GET_THREAD_INFO(%ebp)
  17.197 +	popl %eax
  17.198 +	XEN_GET_VCPU_INFO(%esi)
  17.199 +	jmp syscall_exit
  17.200 +
  17.201 +/*
  17.202 + * Return to user mode is not as complex as all this looks,
  17.203 + * but we want the default path for a system call return to
  17.204 + * go as quickly as possible which is why some of this is
  17.205 + * less clear than it otherwise should be.
  17.206 + */
  17.207 +
  17.208 +	# userspace resumption stub bypassing syscall exit tracing
  17.209 +	ALIGN
  17.210 +ret_from_exception:
  17.211 +	preempt_stop
  17.212 +ret_from_intr:
  17.213 +	GET_THREAD_INFO(%ebp)
  17.214 +	movl EFLAGS(%esp), %eax		# mix EFLAGS and CS
  17.215 +	movb CS(%esp), %al
  17.216 +	testl $(VM_MASK | 2), %eax
  17.217 +	jz resume_kernel		# returning to kernel or vm86-space
  17.218 +ENTRY(resume_userspace)
  17.219 +	XEN_GET_VCPU_INFO(%esi)
  17.220 +	XEN_BLOCK_EVENTS(%esi)		# make sure we don't miss an interrupt
  17.221 +					# setting need_resched or sigpending
  17.222 +					# between sampling and the iret
  17.223 +	movl TI_flags(%ebp), %ecx
  17.224 +	andl $_TIF_WORK_MASK, %ecx	# is there any work to be done on
  17.225 +					# int/exception return?
  17.226 +	jne work_pending
  17.227 +	jmp restore_all
  17.228 +
  17.229 +#ifdef CONFIG_PREEMPT
  17.230 +ENTRY(resume_kernel)
  17.231 +	XEN_GET_VCPU_INFO(%esi)
  17.232 +	cmpl $0,TI_preempt_count(%ebp)	# non-zero preempt_count ?
  17.233 +	jnz restore_all
  17.234 +need_resched:
  17.235 +	movl TI_flags(%ebp), %ecx	# need_resched set ?
  17.236 +	testb $_TIF_NEED_RESCHED, %cl
  17.237 +	jz restore_all
  17.238 +	testb $0xFF,EVENT_MASK(%esp)	# interrupts off (exception path) ?
  17.239 +	jnz restore_all
  17.240 +	movl $PREEMPT_ACTIVE,TI_preempt_count(%ebp)
  17.241 +	XEN_UNBLOCK_EVENTS(%esi)
  17.242 +	call schedule
  17.243 +	XEN_BLOCK_EVENTS(%esi)
  17.244 +	movl $0,TI_preempt_count(%ebp)
  17.245 +	jmp need_resched
  17.246 +#endif
  17.247 +
  17.248 +/* SYSENTER_RETURN points to after the "sysenter" instruction in
  17.249 +   the vsyscall page.  See vsyscall-sysentry.S, which defines the symbol.  */
  17.250 +
  17.251 +	# sysenter call handler stub
  17.252 +ENTRY(sysenter_entry)
  17.253 +	movl TSS_sysenter_esp0(%esp),%esp
  17.254 +sysenter_past_esp:
  17.255 +	sti
  17.256 +	pushl $(__USER_DS)
  17.257 +	pushl %ebp
  17.258 +	pushfl
  17.259 +	pushl $(__USER_CS)
  17.260 +	pushl $SYSENTER_RETURN
  17.261 +
  17.262 +/*
  17.263 + * Load the potential sixth argument from user stack.
  17.264 + * Careful about security.
  17.265 + */
  17.266 +	cmpl $__PAGE_OFFSET-3,%ebp
  17.267 +	jae syscall_fault
  17.268 +1:	movl (%ebp),%ebp
  17.269 +.section __ex_table,"a"
  17.270 +	.align 4
  17.271 +	.long 1b,syscall_fault
  17.272 +.previous
  17.273 +
  17.274 +	pushl %eax
  17.275 +	SAVE_ALL
  17.276 +	GET_THREAD_INFO(%ebp)
  17.277 +
  17.278 +	testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
  17.279 +	jnz syscall_trace_entry
  17.280 +	cmpl $(nr_syscalls), %eax
  17.281 +	jae syscall_badsys
  17.282 +	call *sys_call_table(,%eax,4)
  17.283 +	movl %eax,EAX(%esp)
  17.284 +	cli
  17.285 +	movl TI_flags(%ebp), %ecx
  17.286 +	testw $_TIF_ALLWORK_MASK, %cx
  17.287 +	jne syscall_exit_work
  17.288 +/* if something modifies registers it must also disable sysexit */
  17.289 +	movl EIP(%esp), %edx
  17.290 +	movl OLDESP(%esp), %ecx
  17.291 +	xorl %ebp,%ebp
  17.292 +	sti
  17.293 +	sysexit
  17.294 +
  17.295 +
  17.296 +	# system call handler stub
  17.297 +ENTRY(system_call)
  17.298 +	pushl %eax			# save orig_eax
  17.299 +	SAVE_ALL
  17.300 +	GET_THREAD_INFO(%ebp)
  17.301 +					# system call tracing in operation
  17.302 +	testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
  17.303 +	jnz syscall_trace_entry
  17.304 +	cmpl $(nr_syscalls), %eax
  17.305 +	jae syscall_badsys
  17.306 +syscall_call:
  17.307 +	call *sys_call_table(,%eax,4)
  17.308 +	movl %eax,EAX(%esp)		# store the return value
  17.309 +syscall_exit:
  17.310 +	XEN_BLOCK_EVENTS(%esi)		# make sure we don't miss an interrupt
  17.311 +					# setting need_resched or sigpending
  17.312 +					# between sampling and the iret
  17.313 +	movl TI_flags(%ebp), %ecx
  17.314 +	testw $_TIF_ALLWORK_MASK, %cx	# current->work
  17.315 +	jne syscall_exit_work
  17.316 +restore_all:
  17.317 +	testl $VM_MASK, EFLAGS(%esp)
  17.318 +	jnz resume_vm86
  17.319 +	movb EVENT_MASK(%esp), %al
  17.320 +	notb %al			# %al == ~saved_mask
  17.321 +	XEN_LOCK_VCPU_INFO_SMP(%esi)
  17.322 +	andb evtchn_upcall_mask(%esi),%al
  17.323 +	andb $1,%al			# %al == mask & ~saved_mask
  17.324 +	jnz restore_all_enable_events	#     != 0 => reenable event delivery
  17.325 +	XEN_UNLOCK_VCPU_INFO_SMP(%esi)
  17.326 +	RESTORE_ALL
  17.327 +
  17.328 +resume_vm86:
  17.329 +	XEN_UNBLOCK_EVENTS(%esi)
  17.330 +	RESTORE_REGS
  17.331 +	movl %eax,(%esp)
  17.332 +	movl $__HYPERVISOR_switch_vm86,%eax
  17.333 +	int $0x82
  17.334 +	ud2
  17.335 +
  17.336 +	# perform work that needs to be done immediately before resumption
  17.337 +	ALIGN
  17.338 +work_pending:
  17.339 +	testb $_TIF_NEED_RESCHED, %cl
  17.340 +	jz work_notifysig
  17.341 +work_resched:
  17.342 +	call schedule
  17.343 +	XEN_BLOCK_EVENTS(%esi)		# make sure we don't miss an interrupt
  17.344 +					# setting need_resched or sigpending
  17.345 +					# between sampling and the iret
  17.346 +	movl TI_flags(%ebp), %ecx
  17.347 +	andl $_TIF_WORK_MASK, %ecx	# is there any work to be done other
  17.348 +					# than syscall tracing?
  17.349 +	jz restore_all
  17.350 +	testb $_TIF_NEED_RESCHED, %cl
  17.351 +	jnz work_resched
  17.352 +
  17.353 +work_notifysig:				# deal with pending signals and
  17.354 +					# notify-resume requests
  17.355 +	testl $VM_MASK, EFLAGS(%esp)
  17.356 +	movl %esp, %eax
  17.357 +	jne work_notifysig_v86		# returning to kernel-space or
  17.358 +					# vm86-space
  17.359 +	xorl %edx, %edx
  17.360 +	call do_notify_resume
  17.361 +	jmp restore_all
  17.362 +
  17.363 +	ALIGN
  17.364 +work_notifysig_v86:
  17.365 +	pushl %ecx			# save ti_flags for do_notify_resume
  17.366 +	call save_v86_state		# %eax contains pt_regs pointer
  17.367 +	popl %ecx
  17.368 +	movl %eax, %esp
  17.369 +	xorl %edx, %edx
  17.370 +	call do_notify_resume
  17.371 +	jmp restore_all
  17.372 +
  17.373 +	# perform syscall exit tracing
  17.374 +	ALIGN
  17.375 +syscall_trace_entry:
  17.376 +	movl $-ENOSYS,EAX(%esp)
  17.377 +	movl %esp, %eax
  17.378 +	xorl %edx,%edx
  17.379 +	call do_syscall_trace
  17.380 +	movl ORIG_EAX(%esp), %eax
  17.381 +	cmpl $(nr_syscalls), %eax
  17.382 +	jnae syscall_call
  17.383 +	jmp syscall_exit
  17.384 +
  17.385 +	# perform syscall exit tracing
  17.386 +	ALIGN
  17.387 +syscall_exit_work:
  17.388 +	testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP), %cl
  17.389 +	jz work_pending
  17.390 +	XEN_UNBLOCK_EVENTS(%esi)	# could let do_syscall_trace() call
  17.391 +					# schedule() instead
  17.392 +	movl %esp, %eax
  17.393 +	movl $1, %edx
  17.394 +	call do_syscall_trace
  17.395 +	jmp resume_userspace
  17.396 +
  17.397 +	ALIGN
  17.398 +syscall_fault:
  17.399 +	pushl %eax			# save orig_eax
  17.400 +	SAVE_ALL
  17.401 +	GET_THREAD_INFO(%ebp)
  17.402 +	movl $-EFAULT,EAX(%esp)
  17.403 +	jmp resume_userspace
  17.404 +
  17.405 +	ALIGN
  17.406 +syscall_badsys:
  17.407 +	movl $-ENOSYS,EAX(%esp)
  17.408 +	jmp resume_userspace
  17.409 +
  17.410 +#if 0 /* XEN */
  17.411 +/*
  17.412 + * Build the entry stubs and pointer table with
  17.413 + * some assembler magic.
  17.414 + */
  17.415 +.data
  17.416 +ENTRY(interrupt)
  17.417 +.text
  17.418 +
  17.419 +vector=0
  17.420 +ENTRY(irq_entries_start)
  17.421 +.rept NR_IRQS
  17.422 +	ALIGN
  17.423 +1:	pushl $vector-256
  17.424 +	jmp common_interrupt
  17.425 +.data
  17.426 +	.long 1b
  17.427 +.text
  17.428 +vector=vector+1
  17.429 +.endr
  17.430 +
  17.431 +	ALIGN
  17.432 +common_interrupt:
  17.433 +	SAVE_ALL
  17.434 +	movl %esp,%eax
  17.435 +	call do_IRQ
  17.436 +	jmp ret_from_intr
  17.437 +
  17.438 +#define BUILD_INTERRUPT(name, nr)	\
  17.439 +ENTRY(name)				\
  17.440 +	pushl $nr-256;			\
  17.441 +	SAVE_ALL			\
  17.442 +	movl %esp,%eax;			\
  17.443 +	call smp_/**/name;		\
  17.444 +	jmp ret_from_intr;
  17.445 +
  17.446 +/* The include is where all of the SMP etc. interrupts come from */
  17.447 +#include "entry_arch.h"
  17.448 +#endif /* XEN */
  17.449 +
  17.450 +ENTRY(divide_error)
  17.451 +	pushl $0			# no error code
  17.452 +	pushl $do_divide_error
  17.453 +	ALIGN
  17.454 +error_code:
  17.455 +	pushl %ds
  17.456 +	pushl %eax
  17.457 +	xorl %eax, %eax
  17.458 +	pushl %ebp
  17.459 +	pushl %edi
  17.460 +	pushl %esi
  17.461 +	pushl %edx
  17.462 +	decl %eax			# eax = -1
  17.463 +	pushl %ecx
  17.464 +	pushl %ebx
  17.465 +	cld
  17.466 +	movl %es, %ecx
  17.467 +	movl ES(%esp), %edi		# get the function address
  17.468 +	movl ORIG_EAX(%esp), %edx	# get the error code
  17.469 +	movl %eax, ORIG_EAX(%esp)
  17.470 +	movl %ecx, ES(%esp)
  17.471 +	movl $(__USER_DS), %ecx
  17.472 +	movl %ecx, %ds
  17.473 +	movl %ecx, %es
  17.474 +	movl %esp,%eax			# pt_regs pointer
  17.475 +	XEN_GET_VCPU_INFO(%esi)
  17.476 +	XEN_SAVE_UPCALL_MASK(%esi,%bl,EVENT_MASK)
  17.477 +	call *%edi
  17.478 +	jmp ret_from_exception
  17.479 +
  17.480 +# A note on the "critical region" in our callback handler.
  17.481 +# We want to avoid stacking callback handlers due to events occurring
  17.482 +# during handling of the last event. To do this, we keep events disabled
  17.483 +# until we've done all processing. HOWEVER, we must enable events before
  17.484 +# popping the stack frame (can't be done atomically) and so it would still
  17.485 +# be possible to get enough handler activations to overflow the stack.
  17.486 +# Although unlikely, bugs of that kind are hard to track down, so we'd
  17.487 +# like to avoid the possibility.
  17.488 +# So, on entry to the handler we detect whether we interrupted an
  17.489 +# existing activation in its critical region -- if so, we pop the current
  17.490 +# activation and restart the handler using the previous one.
  17.491 +ENTRY(hypervisor_callback)
  17.492 +	pushl %eax
  17.493 +	SAVE_ALL_NO_EVENTMASK
  17.494 +	movl EIP(%esp),%eax
  17.495 +	cmpl $scrit,%eax
  17.496 +	jb   11f
  17.497 +	cmpl $ecrit,%eax
  17.498 +	jb   critical_region_fixup
  17.499 +11:	XEN_GET_VCPU_INFO(%esi)
  17.500 +	movb $0, EVENT_MASK(%esp)
  17.501 +	push %esp
  17.502 +	call evtchn_do_upcall
  17.503 +	add  $4,%esp
  17.504 +	jmp  ret_from_intr
  17.505 +
  17.506 +        ALIGN
  17.507 +restore_all_enable_events:  
  17.508 +	XEN_UNBLOCK_EVENTS(%esi)
  17.509 +scrit:	/**** START OF CRITICAL REGION ****/
  17.510 +	XEN_TEST_PENDING(%esi)
  17.511 +	jnz  14f			# process more events if necessary...
  17.512 +	XEN_UNLOCK_VCPU_INFO_SMP(%esi)
  17.513 +	RESTORE_ALL
  17.514 +14:	XEN_BLOCK_EVENTS(%esi)
  17.515 +	XEN_UNLOCK_VCPU_INFO_SMP(%esi)
  17.516 +	jmp  11b
  17.517 +ecrit:  /**** END OF CRITICAL REGION ****/
  17.518 +# [How we do the fixup]. We want to merge the current stack frame with the
  17.519 +# just-interrupted frame. How we do this depends on where in the critical
  17.520 +# region the interrupted handler was executing, and so how many saved
  17.521 +# registers are in each frame. We do this quickly using the lookup table
  17.522 +# 'critical_fixup_table'. For each byte offset in the critical region, it
  17.523 +# provides the number of bytes which have already been popped from the
  17.524 +# interrupted stack frame. 
  17.525 +critical_region_fixup:
  17.526 +	addl $critical_fixup_table-scrit,%eax
  17.527 +	movzbl (%eax),%eax		# %eax contains num bytes popped
  17.528 +	mov  %esp,%esi
  17.529 +	add  %eax,%esi			# %esi points at end of src region
  17.530 +	mov  %esp,%edi
  17.531 +	add  $0x34,%edi			# %edi points at end of dst region
  17.532 +	mov  %eax,%ecx
  17.533 +	shr  $2,%ecx			# convert words to bytes
  17.534 +	je   16f			# skip loop if nothing to copy
  17.535 +15:	subl $4,%esi			# pre-decrementing copy loop
  17.536 +	subl $4,%edi
  17.537 +	movl (%esi),%eax
  17.538 +	movl %eax,(%edi)
  17.539 +	loop 15b
  17.540 +16:	movl %edi,%esp			# final %edi is top of merged stack
  17.541 +	jmp  11b
  17.542 +
  17.543 +critical_fixup_table:
  17.544 +	.byte 0x00,0x00,0x00		# testb $0xff,(%esi) = XEN_TEST_PENDING
  17.545 +	.byte 0x00,0x00			# jnz  14f
  17.546 +	XEN_UNLOCK_VCPU_INFO_SMP_fixup
  17.547 +	.byte 0x00			# pop  %ebx
  17.548 +	.byte 0x04			# pop  %ecx
  17.549 +	.byte 0x08			# pop  %edx
  17.550 +	.byte 0x0c			# pop  %esi
  17.551 +	.byte 0x10			# pop  %edi
  17.552 +	.byte 0x14			# pop  %ebp
  17.553 +	.byte 0x18			# pop  %eax
  17.554 +	.byte 0x1c			# pop  %ds
  17.555 +	.byte 0x20			# pop  %es
  17.556 +	.byte 0x24,0x24,0x24		# add  $4,%esp
  17.557 +	.byte 0x28			# iret
  17.558 +	.byte 0x00,0x00,0x00,0x00	# movb $1,1(%esi)
  17.559 +	XEN_UNLOCK_VCPU_INFO_SMP_fixup
  17.560 +	.byte 0x00,0x00			# jmp  11b
  17.561 +
  17.562 +# Hypervisor uses this for application faults while it executes.
  17.563 +ENTRY(failsafe_callback)
  17.564 +1:	popl %ds
  17.565 +2:	popl %es
  17.566 +3:	popl %fs
  17.567 +4:	popl %gs
  17.568 +	subl $4,%esp
  17.569 +	SAVE_ALL
  17.570 +	jmp  ret_from_exception
  17.571 +.section .fixup,"ax";	\
  17.572 +6:	movl $0,(%esp);	\
  17.573 +	jmp 1b;		\
  17.574 +7:	movl $0,(%esp);	\
  17.575 +	jmp 2b;		\
  17.576 +8:	movl $0,(%esp);	\
  17.577 +	jmp 3b;		\
  17.578 +9:	movl $0,(%esp);	\
  17.579 +	jmp 4b;		\
  17.580 +.previous;		\
  17.581 +.section __ex_table,"a";\
  17.582 +	.align 4;	\
  17.583 +	.long 1b,6b;	\
  17.584 +	.long 2b,7b;	\
  17.585 +	.long 3b,8b;	\
  17.586 +	.long 4b,9b;	\
  17.587 +.previous
  17.588 +
  17.589 +ENTRY(coprocessor_error)
  17.590 +	pushl $0
  17.591 +	pushl $do_coprocessor_error
  17.592 +	jmp error_code
  17.593 +
  17.594 +ENTRY(simd_coprocessor_error)
  17.595 +	pushl $0
  17.596 +	pushl $do_simd_coprocessor_error
  17.597 +	jmp error_code
  17.598 +
  17.599 +ENTRY(device_not_available)
  17.600 +	pushl $-1			# mark this as an int
  17.601 +	SAVE_ALL
  17.602 +	preempt_stop
  17.603 +	call math_state_restore
  17.604 +	jmp ret_from_exception
  17.605 +
  17.606 +/*
  17.607 + * Debug traps and NMI can happen at the one SYSENTER instruction
  17.608 + * that sets up the real kernel stack. Check here, since we can't
  17.609 + * allow the wrong stack to be used.
  17.610 + *
  17.611 + * "TSS_sysenter_esp0+12" is because the NMI/debug handler will have
  17.612 + * already pushed 3 words if it hits on the sysenter instruction:
  17.613 + * eflags, cs and eip.
  17.614 + *
  17.615 + * We just load the right stack, and push the three (known) values
  17.616 + * by hand onto the new stack - while updating the return eip past
  17.617 + * the instruction that would have done it for sysenter.
  17.618 + */
  17.619 +#define FIX_STACK(offset, ok, label)		\
  17.620 +	cmpw $__KERNEL_CS,4(%esp);		\
  17.621 +	jne ok;					\
  17.622 +label:						\
  17.623 +	movl TSS_sysenter_esp0+offset(%esp),%esp;	\
  17.624 +	pushfl;					\
  17.625 +	pushl $__KERNEL_CS;			\
  17.626 +	pushl $sysenter_past_esp
  17.627 +
  17.628 +ENTRY(debug)
  17.629 +	cmpl $sysenter_entry,(%esp)
  17.630 +	jne debug_stack_correct
  17.631 +	FIX_STACK(12, debug_stack_correct, debug_esp_fix_insn)
  17.632 +debug_stack_correct:
  17.633 +	pushl $-1			# mark this as an int
  17.634 +	SAVE_ALL
  17.635 +	xorl %edx,%edx			# error code 0
  17.636 +	movl %esp,%eax			# pt_regs pointer
  17.637 +	call do_debug
  17.638 +	testl %eax,%eax
  17.639 +	jnz restore_all
  17.640 +	jmp ret_from_exception
  17.641 +
  17.642 +#if 0 /* XEN */
  17.643 +/*
  17.644 + * NMI is doubly nasty. It can happen _while_ we're handling
  17.645 + * a debug fault, and the debug fault hasn't yet been able to
  17.646 + * clear up the stack. So we first check whether we got  an
  17.647 + * NMI on the sysenter entry path, but after that we need to
  17.648 + * check whether we got an NMI on the debug path where the debug
  17.649 + * fault happened on the sysenter path.
  17.650 + */
  17.651 +ENTRY(nmi)
  17.652 +	cmpl $sysenter_entry,(%esp)
  17.653 +	je nmi_stack_fixup
  17.654 +	pushl %eax
  17.655 +	movl %esp,%eax
  17.656 +	/* Do not access memory above the end of our stack page,
  17.657 +	 * it might not exist.
  17.658 +	 */
  17.659 +	andl $(THREAD_SIZE-1),%eax
  17.660 +	cmpl $(THREAD_SIZE-20),%eax
  17.661 +	popl %eax
  17.662 +	jae nmi_stack_correct
  17.663 +	cmpl $sysenter_entry,12(%esp)
  17.664 +	je nmi_debug_stack_check
  17.665 +nmi_stack_correct:
  17.666 +	pushl %eax
  17.667 +	SAVE_ALL
  17.668 +	xorl %edx,%edx		# zero error code
  17.669 +	movl %esp,%eax		# pt_regs pointer
  17.670 +	call do_nmi
  17.671 +	RESTORE_ALL
  17.672 +
  17.673 +nmi_stack_fixup:
  17.674 +	FIX_STACK(12,nmi_stack_correct, 1)
  17.675 +	jmp nmi_stack_correct
  17.676 +nmi_debug_stack_check:
  17.677 +	cmpw $__KERNEL_CS,16(%esp)
  17.678 +	jne nmi_stack_correct
  17.679 +	cmpl $debug - 1,(%esp)
  17.680 +	jle nmi_stack_correct
  17.681 +	cmpl $debug_esp_fix_insn,(%esp)
  17.682 +	jle nmi_debug_stack_fixup
  17.683 +nmi_debug_stack_fixup:
  17.684 +	FIX_STACK(24,nmi_stack_correct, 1)
  17.685 +	jmp nmi_stack_correct
  17.686 +#endif /* XEN */
  17.687 +
  17.688 +ENTRY(int3)
  17.689 +	pushl $-1			# mark this as an int
  17.690 +	SAVE_ALL
  17.691 +	xorl %edx,%edx		# zero error code
  17.692 +	movl %esp,%eax		# pt_regs pointer
  17.693 +	call do_int3
  17.694 +	testl %eax,%eax
  17.695 +	jnz restore_all
  17.696 +	jmp ret_from_exception
  17.697 +
  17.698 +ENTRY(overflow)
  17.699 +	pushl $0
  17.700 +	pushl $do_overflow
  17.701 +	jmp error_code
  17.702 +
  17.703 +ENTRY(bounds)
  17.704 +	pushl $0
  17.705 +	pushl $do_bounds
  17.706 +	jmp error_code
  17.707 +
  17.708 +ENTRY(invalid_op)
  17.709 +	pushl $0
  17.710 +	pushl $do_invalid_op
  17.711 +	jmp error_code
  17.712 +
  17.713 +ENTRY(coprocessor_segment_overrun)
  17.714 +	pushl $0
  17.715 +	pushl $do_coprocessor_segment_overrun
  17.716 +	jmp error_code
  17.717 +
  17.718 +ENTRY(invalid_TSS)
  17.719 +	pushl $do_invalid_TSS
  17.720 +	jmp error_code
  17.721 +
  17.722 +ENTRY(segment_not_present)
  17.723 +	pushl $do_segment_not_present
  17.724 +	jmp error_code
  17.725 +
  17.726 +ENTRY(stack_segment)
  17.727 +	pushl $do_stack_segment
  17.728 +	jmp error_code
  17.729 +
  17.730 +ENTRY(general_protection)
  17.731 +	pushl $do_general_protection
  17.732 +	jmp error_code
  17.733 +
  17.734 +ENTRY(alignment_check)
  17.735 +	pushl $do_alignment_check
  17.736 +	jmp error_code
  17.737 +
  17.738 +# This handler is special, because it gets an extra value on its stack,
  17.739 +# which is the linear faulting address.
  17.740 +# fastcall register usage:  %eax = pt_regs, %edx = error code,
  17.741 +#			    %ecx = fault address
  17.742 +ENTRY(page_fault)
  17.743 +	pushl %ds
  17.744 +	pushl %eax
  17.745 +	xorl %eax, %eax
  17.746 +	pushl %ebp
  17.747 +	pushl %edi
  17.748 +	pushl %esi
  17.749 +	pushl %edx
  17.750 +	decl %eax			/* eax = -1 */
  17.751 +	pushl %ecx
  17.752 +	pushl %ebx
  17.753 +	cld
  17.754 +	movl %es,%edi
  17.755 +	movl ES(%esp), %ecx		/* get the faulting address */
  17.756 +	movl ORIG_EAX(%esp), %edx	/* get the error code */
  17.757 +	movl %eax, ORIG_EAX(%esp)
  17.758 +	movl %edi, ES(%esp)
  17.759 +	movl $(__KERNEL_DS),%eax
  17.760 +	movl %eax, %ds
  17.761 +	movl %eax, %es
  17.762 +	movl %esp,%eax			/* pt_regs pointer */
  17.763 +	XEN_GET_VCPU_INFO(%esi)
  17.764 +	XEN_SAVE_UPCALL_MASK(%esi,%bl,EVENT_MASK)
  17.765 +	call do_page_fault
  17.766 +	jmp ret_from_exception
  17.767 +
  17.768 +#ifdef CONFIG_X86_MCE
  17.769 +ENTRY(machine_check)
  17.770 +	pushl $0
  17.771 +	pushl machine_check_vector
  17.772 +	jmp error_code
  17.773 +#endif
  17.774 +
  17.775 +ENTRY(fixup_4gb_segment)
  17.776 +	pushl $do_fixup_4gb_segment
  17.777 +	jmp error_code
  17.778 +
  17.779 +.data
  17.780 +ENTRY(sys_call_table)
  17.781 +	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
  17.782 +	.long sys_exit
  17.783 +	.long sys_fork
  17.784 +	.long sys_read
  17.785 +	.long sys_write
  17.786 +	.long sys_open		/* 5 */
  17.787 +	.long sys_close
  17.788 +	.long sys_waitpid
  17.789 +	.long sys_creat
  17.790 +	.long sys_link
  17.791 +	.long sys_unlink	/* 10 */
  17.792 +	.long sys_execve
  17.793 +	.long sys_chdir
  17.794 +	.long sys_time
  17.795 +	.long sys_mknod
  17.796 +	.long sys_chmod		/* 15 */
  17.797 +	.long sys_lchown16
  17.798 +	.long sys_ni_syscall	/* old break syscall holder */
  17.799 +	.long sys_stat
  17.800 +	.long sys_lseek
  17.801 +	.long sys_getpid	/* 20 */
  17.802 +	.long sys_mount
  17.803 +	.long sys_oldumount
  17.804 +	.long sys_setuid16
  17.805 +	.long sys_getuid16
  17.806 +	.long sys_stime		/* 25 */
  17.807 +	.long sys_ptrace
  17.808 +	.long sys_alarm
  17.809 +	.long sys_fstat
  17.810 +	.long sys_pause
  17.811 +	.long sys_utime		/* 30 */
  17.812 +	.long sys_ni_syscall	/* old stty syscall holder */
  17.813 +	.long sys_ni_syscall	/* old gtty syscall holder */
  17.814 +	.long sys_access
  17.815 +	.long sys_nice
  17.816 +	.long sys_ni_syscall	/* 35 - old ftime syscall holder */
  17.817 +	.long sys_sync
  17.818 +	.long sys_kill
  17.819 +	.long sys_rename
  17.820 +	.long sys_mkdir
  17.821 +	.long sys_rmdir		/* 40 */
  17.822 +	.long sys_dup
  17.823 +	.long sys_pipe
  17.824 +	.long sys_times
  17.825 +	.long sys_ni_syscall	/* old prof syscall holder */
  17.826 +	.long sys_brk		/* 45 */
  17.827 +	.long sys_setgid16
  17.828 +	.long sys_getgid16
  17.829 +	.long sys_signal
  17.830 +	.long sys_geteuid16
  17.831 +	.long sys_getegid16	/* 50 */
  17.832 +	.long sys_acct
  17.833 +	.long sys_umount	/* recycled never used phys() */
  17.834 +	.long sys_ni_syscall	/* old lock syscall holder */
  17.835 +	.long sys_ioctl
  17.836 +	.long sys_fcntl		/* 55 */
  17.837 +	.long sys_ni_syscall	/* old mpx syscall holder */
  17.838 +	.long sys_setpgid
  17.839 +	.long sys_ni_syscall	/* old ulimit syscall holder */
  17.840 +	.long sys_olduname
  17.841 +	.long sys_umask		/* 60 */
  17.842 +	.long sys_chroot
  17.843 +	.long sys_ustat
  17.844 +	.long sys_dup2
  17.845 +	.long sys_getppid
  17.846 +	.long sys_getpgrp	/* 65 */
  17.847 +	.long sys_setsid
  17.848 +	.long sys_sigaction
  17.849 +	.long sys_sgetmask
  17.850 +	.long sys_ssetmask
  17.851 +	.long sys_setreuid16	/* 70 */
  17.852 +	.long sys_setregid16
  17.853 +	.long sys_sigsuspend
  17.854 +	.long sys_sigpending
  17.855 +	.long sys_sethostname
  17.856 +	.long sys_setrlimit	/* 75 */
  17.857 +	.long sys_old_getrlimit
  17.858 +	.long sys_getrusage
  17.859 +	.long sys_gettimeofday
  17.860 +	.long sys_settimeofday
  17.861 +	.long sys_getgroups16	/* 80 */
  17.862 +	.long sys_setgroups16
  17.863 +	.long old_select
  17.864 +	.long sys_symlink
  17.865 +	.long sys_lstat
  17.866 +	.long sys_readlink	/* 85 */
  17.867 +	.long sys_uselib
  17.868 +	.long sys_swapon
  17.869 +	.long sys_reboot
  17.870 +	.long old_readdir
  17.871 +	.long old_mmap		/* 90 */
  17.872 +	.long sys_munmap
  17.873 +	.long sys_truncate
  17.874 +	.long sys_ftruncate
  17.875 +	.long sys_fchmod
  17.876 +	.long sys_fchown16	/* 95 */
  17.877 +	.long sys_getpriority
  17.878 +	.long sys_setpriority
  17.879 +	.long sys_ni_syscall	/* old profil syscall holder */
  17.880 +	.long sys_statfs
  17.881 +	.long sys_fstatfs	/* 100 */
  17.882 +	.long sys_ioperm
  17.883 +	.long sys_socketcall
  17.884 +	.long sys_syslog
  17.885 +	.long sys_setitimer
  17.886 +	.long sys_getitimer	/* 105 */
  17.887 +	.long sys_newstat
  17.888 +	.long sys_newlstat
  17.889 +	.long sys_newfstat
  17.890 +	.long sys_uname
  17.891 +	.long sys_iopl		/* 110 */
  17.892 +	.long sys_vhangup
  17.893 +	.long sys_ni_syscall	/* old "idle" system call */
  17.894 +	.long sys_vm86old
  17.895 +	.long sys_wait4
  17.896 +	.long sys_swapoff	/* 115 */
  17.897 +	.long sys_sysinfo
  17.898 +	.long sys_ipc
  17.899 +	.long sys_fsync
  17.900 +	.long sys_sigreturn
  17.901 +	.long sys_clone		/* 120 */
  17.902 +	.long sys_setdomainname
  17.903 +	.long sys_newuname
  17.904 +	.long sys_modify_ldt
  17.905 +	.long sys_adjtimex
  17.906 +	.long sys_mprotect	/* 125 */
  17.907 +	.long sys_sigprocmask
  17.908 +	.long sys_ni_syscall	/* old "create_module" */ 
  17.909 +	.long sys_init_module
  17.910 +	.long sys_delete_module
  17.911 +	.long sys_ni_syscall	/* 130:	old "get_kernel_syms" */
  17.912 +	.long sys_quotactl
  17.913 +	.long sys_getpgid
  17.914 +	.long sys_fchdir
  17.915 +	.long sys_bdflush
  17.916 +	.long sys_sysfs		/* 135 */
  17.917 +	.long sys_personality
  17.918 +	.long sys_ni_syscall	/* reserved for afs_syscall */
  17.919 +	.long sys_setfsuid16
  17.920 +	.long sys_setfsgid16
  17.921 +	.long sys_llseek	/* 140 */
  17.922 +	.long sys_getdents
  17.923 +	.long sys_select
  17.924 +	.long sys_flock
  17.925 +	.long sys_msync
  17.926 +	.long sys_readv		/* 145 */
  17.927 +	.long sys_writev
  17.928 +	.long sys_getsid
  17.929 +	.long sys_fdatasync
  17.930 +	.long sys_sysctl
  17.931 +	.long sys_mlock		/* 150 */
  17.932 +	.long sys_munlock
  17.933 +	.long sys_mlockall
  17.934 +	.long sys_munlockall
  17.935 +	.long sys_sched_setparam
  17.936 +	.long sys_sched_getparam   /* 155 */
  17.937 +	.long sys_sched_setscheduler
  17.938 +	.long sys_sched_getscheduler
  17.939 +	.long sys_sched_yield
  17.940 +	.long sys_sched_get_priority_max
  17.941 +	.long sys_sched_get_priority_min  /* 160 */
  17.942 +	.long sys_sched_rr_get_interval
  17.943 +	.long sys_nanosleep
  17.944 +	.long sys_mremap
  17.945 +	.long sys_setresuid16
  17.946 +	.long sys_getresuid16	/* 165 */
  17.947 +	.long sys_vm86
  17.948 +	.long sys_ni_syscall	/* Old sys_query_module */
  17.949 +	.long sys_poll
  17.950 +	.long sys_nfsservctl
  17.951 +	.long sys_setresgid16	/* 170 */
  17.952 +	.long sys_getresgid16
  17.953 +	.long sys_prctl
  17.954 +	.long sys_rt_sigreturn
  17.955 +	.long sys_rt_sigaction
  17.956 +	.long sys_rt_sigprocmask	/* 175 */
  17.957 +	.long sys_rt_sigpending
  17.958 +	.long sys_rt_sigtimedwait
  17.959 +	.long sys_rt_sigqueueinfo
  17.960 +	.long sys_rt_sigsuspend
  17.961 +	.long sys_pread64	/* 180 */
  17.962 +	.long sys_pwrite64
  17.963 +	.long sys_chown16
  17.964 +	.long sys_getcwd
  17.965 +	.long sys_capget
  17.966 +	.long sys_capset	/* 185 */
  17.967 +	.long sys_sigaltstack
  17.968 +	.long sys_sendfile
  17.969 +	.long sys_ni_syscall	/* reserved for streams1 */
  17.970 +	.long sys_ni_syscall	/* reserved for streams2 */
  17.971 +	.long sys_vfork		/* 190 */
  17.972 +	.long sys_getrlimit
  17.973 +	.long sys_mmap2
  17.974 +	.long sys_truncate64
  17.975 +	.long sys_ftruncate64
  17.976 +	.long sys_stat64	/* 195 */
  17.977 +	.long sys_lstat64
  17.978 +	.long sys_fstat64
  17.979 +	.long sys_lchown
  17.980 +	.long sys_getuid
  17.981 +	.long sys_getgid	/* 200 */
  17.982 +	.long sys_geteuid
  17.983 +	.long sys_getegid
  17.984 +	.long sys_setreuid
  17.985 +	.long sys_setregid
  17.986 +	.long sys_getgroups	/* 205 */
  17.987 +	.long sys_setgroups
  17.988 +	.long sys_fchown
  17.989 +	.long sys_setresuid
  17.990 +	.long sys_getresuid
  17.991 +	.long sys_setresgid	/* 210 */
  17.992 +	.long sys_getresgid
  17.993 +	.long sys_chown
  17.994 +	.long sys_setuid
  17.995 +	.long sys_setgid
  17.996 +	.long sys_setfsuid	/* 215 */
  17.997 +	.long sys_setfsgid
  17.998 +	.long sys_pivot_root
  17.999 +	.long sys_mincore
 17.1000 +	.long sys_madvise
 17.1001 +	.long sys_getdents64	/* 220 */
 17.1002 +	.long sys_fcntl64
 17.1003 +	.long sys_ni_syscall	/* reserved for TUX */
 17.1004 +	.long sys_ni_syscall
 17.1005 +	.long sys_gettid
 17.1006 +	.long sys_readahead	/* 225 */
 17.1007 +	.long sys_setxattr
 17.1008 +	.long sys_lsetxattr
 17.1009 +	.long sys_fsetxattr
 17.1010 +	.long sys_getxattr
 17.1011 +	.long sys_lgetxattr	/* 230 */
 17.1012 +	.long sys_fgetxattr
 17.1013 +	.long sys_listxattr
 17.1014 +	.long sys_llistxattr
 17.1015 +	.long sys_flistxattr
 17.1016 +	.long sys_removexattr	/* 235 */
 17.1017 +	.long sys_lremovexattr
 17.1018 +	.long sys_fremovexattr
 17.1019 +	.long sys_tkill
 17.1020 +	.long sys_sendfile64
 17.1021 +	.long sys_futex		/* 240 */
 17.1022 +	.long sys_sched_setaffinity
 17.1023 +	.long sys_sched_getaffinity
 17.1024 +	.long sys_set_thread_area
 17.1025 +	.long sys_get_thread_area
 17.1026 +	.long sys_io_setup	/* 245 */
 17.1027 +	.long sys_io_destroy
 17.1028 +	.long sys_io_getevents
 17.1029 +	.long sys_io_submit
 17.1030 +	.long sys_io_cancel
 17.1031 +	.long sys_fadvise64	/* 250 */
 17.1032 +	.long sys_ni_syscall
 17.1033 +	.long sys_exit_group
 17.1034 +	.long sys_lookup_dcookie
 17.1035 +	.long sys_epoll_create
 17.1036 +	.long sys_epoll_ctl	/* 255 */
 17.1037 +	.long sys_epoll_wait
 17.1038 + 	.long sys_remap_file_pages
 17.1039 + 	.long sys_set_tid_address
 17.1040 + 	.long sys_timer_create
 17.1041 + 	.long sys_timer_settime		/* 260 */
 17.1042 + 	.long sys_timer_gettime
 17.1043 + 	.long sys_timer_getoverrun
 17.1044 + 	.long sys_timer_delete
 17.1045 + 	.long sys_clock_settime
 17.1046 + 	.long sys_clock_gettime		/* 265 */
 17.1047 + 	.long sys_clock_getres
 17.1048 + 	.long sys_clock_nanosleep
 17.1049 +	.long sys_statfs64
 17.1050 +	.long sys_fstatfs64	
 17.1051 +	.long sys_tgkill	/* 270 */
 17.1052 +	.long sys_utimes
 17.1053 + 	.long sys_fadvise64_64
 17.1054 +	.long sys_ni_syscall	/* sys_vserver */
 17.1055 +	.long sys_mbind
 17.1056 +	.long sys_get_mempolicy
 17.1057 +	.long sys_set_mempolicy
 17.1058 +	.long sys_mq_open
 17.1059 +	.long sys_mq_unlink
 17.1060 +	.long sys_mq_timedsend
 17.1061 +	.long sys_mq_timedreceive	/* 280 */
 17.1062 +	.long sys_mq_notify
 17.1063 +	.long sys_mq_getsetattr
 17.1064 +	.long sys_ni_syscall		/* reserved for kexec */
 17.1065 +	.long sys_waitid
 17.1066 +	.long sys_ni_syscall		/* 285 */ /* available */
 17.1067 +	.long sys_add_key
 17.1068 +	.long sys_request_key
 17.1069 +	.long sys_keyctl
 17.1070 +
 17.1071 +syscall_table_size=(.-sys_call_table)
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/head.S	Mon Dec 27 10:12:02 2004 +0000
    18.3 @@ -0,0 +1,185 @@
    18.4 +
    18.5 +#include <linux/config.h>
    18.6 +
    18.7 +.section __xen_guest
    18.8 +	.ascii	"GUEST_OS=linux,GUEST_VER=2.6,XEN_VER=2.0,VIRT_BASE=0xC0000000"
    18.9 +	.ascii	",LOADER=generic"
   18.10 +	.ascii	",PT_MODE_WRITABLE"
   18.11 +	.byte	0
   18.12 +
   18.13 +.text
   18.14 +#include <linux/threads.h>
   18.15 +#include <linux/linkage.h>
   18.16 +#include <asm/segment.h>
   18.17 +#include <asm/thread_info.h>
   18.18 +#include <asm/asm_offsets.h>
   18.19 +#include <asm-xen/xen-public/arch-x86_32.h>
   18.20 +
   18.21 +/*
   18.22 + * References to members of the new_cpu_data structure.
   18.23 + */
   18.24 +
   18.25 +#define X86		new_cpu_data+CPUINFO_x86
   18.26 +#define X86_VENDOR	new_cpu_data+CPUINFO_x86_vendor
   18.27 +#define X86_MODEL	new_cpu_data+CPUINFO_x86_model
   18.28 +#define X86_MASK	new_cpu_data+CPUINFO_x86_mask
   18.29 +#define X86_HARD_MATH	new_cpu_data+CPUINFO_hard_math
   18.30 +#define X86_CPUID	new_cpu_data+CPUINFO_cpuid_level
   18.31 +#define X86_CAPABILITY	new_cpu_data+CPUINFO_x86_capability
   18.32 +#define X86_VENDOR_ID	new_cpu_data+CPUINFO_x86_vendor_id
   18.33 +
   18.34 +ENTRY(startup_32)
   18.35 +	cld
   18.36 +
   18.37 +	/* Copy the necessary stuff from xen_start_info structure. */
   18.38 +	mov  $xen_start_info_union,%edi
   18.39 +	mov  $128,%ecx
   18.40 +	rep movsl
   18.41 +
   18.42 +#ifdef CONFIG_SMP
   18.43 +ENTRY(startup_32_smp)
   18.44 +	cld
   18.45 +#endif /* CONFIG_SMP */
   18.46 +
   18.47 +	/* Set up the stack pointer */
   18.48 +	lss stack_start,%esp
   18.49 +
   18.50 +checkCPUtype:
   18.51 +
   18.52 +	/* get vendor info */
   18.53 +	xorl %eax,%eax			# call CPUID with 0 -> return vendor ID
   18.54 +	cpuid
   18.55 +	movl %eax,X86_CPUID		# save CPUID level
   18.56 +	movl %ebx,X86_VENDOR_ID		# lo 4 chars
   18.57 +	movl %edx,X86_VENDOR_ID+4	# next 4 chars
   18.58 +	movl %ecx,X86_VENDOR_ID+8	# last 4 chars
   18.59 +
   18.60 +	movl $1,%eax		# Use the CPUID instruction to get CPU type
   18.61 +	cpuid
   18.62 +	movb %al,%cl		# save reg for future use
   18.63 +	andb $0x0f,%ah		# mask processor family
   18.64 +	movb %ah,X86
   18.65 +	andb $0xf0,%al		# mask model
   18.66 +	shrb $4,%al
   18.67 +	movb %al,X86_MODEL
   18.68 +	andb $0x0f,%cl		# mask mask revision
   18.69 +	movb %cl,X86_MASK
   18.70 +	movl %edx,X86_CAPABILITY
   18.71 +
   18.72 +	incb ready
   18.73 +
   18.74 +	xorl %eax,%eax		# Clear FS/GS and LDT
   18.75 +	movl %eax,%fs
   18.76 +	movl %eax,%gs
   18.77 +	cld		# gcc2 wants the direction flag cleared at all times
   18.78 +
   18.79 +#ifdef CONFIG_SMP
   18.80 +	movb ready, %cl	
   18.81 +	cmpb $1,%cl
   18.82 +	je 1f			# the first CPU calls start_kernel
   18.83 +				# all other CPUs call initialize_secondary
   18.84 +	call initialize_secondary
   18.85 +	jmp L6
   18.86 +1:
   18.87 +#endif /* CONFIG_SMP */
   18.88 +	call start_kernel
   18.89 +L6:
   18.90 +	jmp L6			# main should never return here, but
   18.91 +				# just in case, we know what happens.
   18.92 +
   18.93 +ENTRY(lgdt_finish)
   18.94 +	movl $(__KERNEL_DS),%eax	# reload all the segment registers
   18.95 +	movw %ax,%ss			# after changing gdt.
   18.96 +
   18.97 +	movl $(__USER_DS),%eax		# DS/ES contains default USER segment
   18.98 +	movw %ax,%ds
   18.99 +	movw %ax,%es
  18.100 +
  18.101 +	popl %eax			# reload CS by intersegment return
  18.102 +	pushl $(__KERNEL_CS)
  18.103 +	pushl %eax
  18.104 +	lret
  18.105 +
  18.106 +ENTRY(stack_start)
  18.107 +	.long init_thread_union+THREAD_SIZE
  18.108 +	.long __BOOT_DS
  18.109 +
  18.110 +ready:	.byte 0
  18.111 +
  18.112 +.globl idt_descr
  18.113 +.globl cpu_gdt_descr
  18.114 +
  18.115 +	ALIGN
  18.116 +	.word 0				# 32-bit align idt_desc.address
  18.117 +idt_descr:
  18.118 +	.word IDT_ENTRIES*8-1		# idt contains 256 entries
  18.119 +	.long idt_table
  18.120 +
  18.121 +# boot GDT descriptor (later on used by CPU#0):
  18.122 +	.word 0				# 32 bit align gdt_desc.address
  18.123 +cpu_gdt_descr:
  18.124 +	.word GDT_SIZE
  18.125 +	.long cpu_gdt_table
  18.126 +
  18.127 +	.fill NR_CPUS-1,8,0		# space for the other GDT descriptors
  18.128 +
  18.129 +.org 0x1000
  18.130 +ENTRY(empty_zero_page)
  18.131 +
  18.132 +.org 0x2000
  18.133 +ENTRY(swapper_pg_dir)
  18.134 +
  18.135 +.org 0x3000
  18.136 +ENTRY(cpu_gdt_table)
  18.137 +	.quad 0x0000000000000000	/* NULL descriptor */
  18.138 +	.quad 0x0000000000000000	/* 0x0b reserved */
  18.139 +	.quad 0x0000000000000000	/* 0x13 reserved */
  18.140 +	.quad 0x0000000000000000	/* 0x1b reserved */
  18.141 +	.quad 0x0000000000000000	/* 0x20 unused */
  18.142 +	.quad 0x0000000000000000	/* 0x28 unused */
  18.143 +	.quad 0x0000000000000000	/* 0x33 TLS entry 1 */
  18.144 +	.quad 0x0000000000000000	/* 0x3b TLS entry 2 */
  18.145 +	.quad 0x0000000000000000	/* 0x43 TLS entry 3 */
  18.146 +	.quad 0x0000000000000000	/* 0x4b reserved */
  18.147 +	.quad 0x0000000000000000	/* 0x53 reserved */
  18.148 +	.quad 0x0000000000000000	/* 0x5b reserved */
  18.149 +
  18.150 +	.quad 0x00cfbb000000c3ff	/* 0x60 kernel 4GB code at 0x00000000 */
  18.151 +	.quad 0x00cfb3000000c3ff	/* 0x68 kernel 4GB data at 0x00000000 */
  18.152 +	.quad 0x00cffb000000c3ff	/* 0x73 user 4GB code at 0x00000000 */
  18.153 +	.quad 0x00cff3000000c3ff	/* 0x7b user 4GB data at 0x00000000 */
  18.154 +
  18.155 +	.quad 0x0000000000000000	/* 0x80 TSS descriptor */
  18.156 +	.quad 0x0000000000000000	/* 0x88 LDT descriptor */
  18.157 +
  18.158 +	/* Segments used for calling PnP BIOS */
  18.159 +	.quad 0x0000000000000000	/* 0x90 32-bit code */
  18.160 +	.quad 0x0000000000000000	/* 0x98 16-bit code */
  18.161 +	.quad 0x0000000000000000	/* 0xa0 16-bit data */
  18.162 +	.quad 0x0000000000000000	/* 0xa8 16-bit data */
  18.163 +	.quad 0x0000000000000000	/* 0xb0 16-bit data */
  18.164 +	/*
  18.165 +	 * The APM segments have byte granularity and their bases
  18.166 +	 * and limits are set at run time.
  18.167 +	 */
  18.168 +	.quad 0x0000000000000000	/* 0xb8 APM CS    code */
  18.169 +	.quad 0x0000000000000000	/* 0xc0 APM CS 16 code (16 bit) */
  18.170 +	.quad 0x0000000000000000	/* 0xc8 APM DS    data */
  18.171 +
  18.172 +	.quad 0x0000000000000000	/* 0xd0 - unused */
  18.173 +	.quad 0x0000000000000000	/* 0xd8 - unused */
  18.174 +	.quad 0x0000000000000000	/* 0xe0 - unused */
  18.175 +	.quad 0x0000000000000000	/* 0xe8 - unused */
  18.176 +	.quad 0x0000000000000000	/* 0xf0 - unused */
  18.177 +	.quad 0x0000000000000000	/* 0xf8 - GDT entry 31: double-fault TSS */
  18.178 +	.fill GDT_ENTRIES-32,8,0
  18.179 +
  18.180 +.org 0x4000
  18.181 +ENTRY(default_ldt)
  18.182 +
  18.183 +.org 0x5000
  18.184 +/*
  18.185 + * Real beginning of normal "text" segment
  18.186 + */
  18.187 +ENTRY(stext)
  18.188 +ENTRY(_stext)
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c	Mon Dec 27 10:12:02 2004 +0000
    19.3 @@ -0,0 +1,196 @@
    19.4 +#include <linux/config.h>
    19.5 +#include <linux/module.h>
    19.6 +#include <linux/smp.h>
    19.7 +#include <linux/user.h>
    19.8 +#include <linux/elfcore.h>
    19.9 +#include <linux/mca.h>
   19.10 +#include <linux/sched.h>
   19.11 +#include <linux/in6.h>
   19.12 +#include <linux/interrupt.h>
   19.13 +#include <linux/smp_lock.h>
   19.14 +#include <linux/pm.h>
   19.15 +#include <linux/pci.h>
   19.16 +#include <linux/apm_bios.h>
   19.17 +#include <linux/kernel.h>
   19.18 +#include <linux/string.h>
   19.19 +#include <linux/tty.h>
   19.20 +#include <linux/highmem.h>
   19.21 +#include <linux/time.h>
   19.22 +
   19.23 +#include <asm/semaphore.h>
   19.24 +#include <asm/processor.h>
   19.25 +#include <asm/i387.h>
   19.26 +#include <asm/uaccess.h>
   19.27 +#include <asm/checksum.h>
   19.28 +#include <asm/io.h>
   19.29 +#include <asm/delay.h>
   19.30 +#include <asm/irq.h>
   19.31 +#include <asm/mmx.h>
   19.32 +#include <asm/desc.h>
   19.33 +#include <asm/pgtable.h>
   19.34 +#include <asm/tlbflush.h>
   19.35 +#include <asm/nmi.h>
   19.36 +#include <asm/ist.h>
   19.37 +#include <asm/kdebug.h>
   19.38 +
   19.39 +extern void dump_thread(struct pt_regs *, struct user *);
   19.40 +extern spinlock_t rtc_lock;
   19.41 +
   19.42 +/* This is definitely a GPL-only symbol */
   19.43 +EXPORT_SYMBOL_GPL(cpu_gdt_table);
   19.44 +
   19.45 +#if defined(CONFIG_APM_MODULE)
   19.46 +extern void machine_real_restart(unsigned char *, int);
   19.47 +EXPORT_SYMBOL(machine_real_restart);
   19.48 +extern void default_idle(void);
   19.49 +EXPORT_SYMBOL(default_idle);
   19.50 +#endif
   19.51 +
   19.52 +#ifdef CONFIG_SMP
   19.53 +extern void FASTCALL( __write_lock_failed(rwlock_t *rw));
   19.54 +extern void FASTCALL( __read_lock_failed(rwlock_t *rw));
   19.55 +#endif
   19.56 +
   19.57 +#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
   19.58 +extern struct drive_info_struct drive_info;
   19.59 +EXPORT_SYMBOL(drive_info);
   19.60 +#endif
   19.61 +
   19.62 +extern unsigned long cpu_khz;
   19.63 +extern unsigned long get_cmos_time(void);
   19.64 +
   19.65 +/* platform dependent support */
   19.66 +EXPORT_SYMBOL(boot_cpu_data);
   19.67 +EXPORT_SYMBOL(MCA_bus);
   19.68 +#ifdef CONFIG_DISCONTIGMEM
   19.69 +EXPORT_SYMBOL(node_data);
   19.70 +EXPORT_SYMBOL(physnode_map);
   19.71 +#endif
   19.72 +#ifdef CONFIG_X86_NUMAQ
   19.73 +EXPORT_SYMBOL(xquad_portio);
   19.74 +#endif
   19.75 +EXPORT_SYMBOL(dump_thread);
   19.76 +EXPORT_SYMBOL(dump_fpu);
   19.77 +EXPORT_SYMBOL_GPL(kernel_fpu_begin);
   19.78 +EXPORT_SYMBOL(__ioremap);
   19.79 +EXPORT_SYMBOL(ioremap_nocache);
   19.80 +EXPORT_SYMBOL(iounmap);
   19.81 +EXPORT_SYMBOL(probe_irq_mask);
   19.82 +EXPORT_SYMBOL(kernel_thread);
   19.83 +EXPORT_SYMBOL(pm_idle);
   19.84 +#ifdef CONFIG_APM
   19.85 +EXPORT_SYMBOL(pm_power_off);
   19.86 +#endif
   19.87 +EXPORT_SYMBOL(get_cmos_time);
   19.88 +EXPORT_SYMBOL(cpu_khz);
   19.89 +EXPORT_SYMBOL(apm_info);
   19.90 +
   19.91 +EXPORT_SYMBOL(__down_failed);
   19.92 +EXPORT_SYMBOL(__down_failed_interruptible);
   19.93 +EXPORT_SYMBOL(__down_failed_trylock);
   19.94 +EXPORT_SYMBOL(__up_wakeup);
   19.95 +/* Networking helper routines. */
   19.96 +EXPORT_SYMBOL(csum_partial_copy_generic);
   19.97 +/* Delay loops */
   19.98 +EXPORT_SYMBOL(__ndelay);
   19.99 +EXPORT_SYMBOL(__udelay);
  19.100 +EXPORT_SYMBOL(__delay);
  19.101 +EXPORT_SYMBOL(__const_udelay);
  19.102 +
  19.103 +EXPORT_SYMBOL(__get_user_1);
  19.104 +EXPORT_SYMBOL(__get_user_2);
  19.105 +EXPORT_SYMBOL(__get_user_4);
  19.106 +
  19.107 +EXPORT_SYMBOL(strpbrk);
  19.108 +EXPORT_SYMBOL(strstr);
  19.109 +
  19.110 +EXPORT_SYMBOL(strncpy_from_user);
  19.111 +EXPORT_SYMBOL(__strncpy_from_user);
  19.112 +EXPORT_SYMBOL(clear_user);
  19.113 +EXPORT_SYMBOL(__clear_user);
  19.114 +EXPORT_SYMBOL(__copy_from_user_ll);
  19.115 +EXPORT_SYMBOL(__copy_to_user_ll);
  19.116 +EXPORT_SYMBOL(strnlen_user);
  19.117 +
  19.118 +EXPORT_SYMBOL(dma_alloc_coherent);
  19.119 +EXPORT_SYMBOL(dma_free_coherent);
  19.120 +
  19.121 +#ifdef CONFIG_PCI
  19.122 +EXPORT_SYMBOL(pcibios_penalize_isa_irq);
  19.123 +EXPORT_SYMBOL(pci_mem_start);
  19.124 +#endif
  19.125 +
  19.126 +#ifdef CONFIG_PCI_BIOS
  19.127 +EXPORT_SYMBOL(pcibios_set_irq_routing);
  19.128 +EXPORT_SYMBOL(pcibios_get_irq_routing_table);
  19.129 +#endif
  19.130 +
  19.131 +#ifdef CONFIG_X86_USE_3DNOW
  19.132 +EXPORT_SYMBOL(_mmx_memcpy);
  19.133 +EXPORT_SYMBOL(mmx_clear_page);
  19.134 +EXPORT_SYMBOL(mmx_copy_page);
  19.135 +#endif
  19.136 +
  19.137 +#ifdef CONFIG_X86_HT
  19.138 +EXPORT_SYMBOL(smp_num_siblings);
  19.139 +EXPORT_SYMBOL(cpu_sibling_map);
  19.140 +#endif
  19.141 +
  19.142 +#ifdef CONFIG_SMP
  19.143 +EXPORT_SYMBOL(cpu_data);
  19.144 +EXPORT_SYMBOL(cpu_online_map);
  19.145 +EXPORT_SYMBOL(cpu_callout_map);
  19.146 +EXPORT_SYMBOL(__write_lock_failed);
  19.147 +EXPORT_SYMBOL(__read_lock_failed);
  19.148 +
  19.149 +/* Global SMP stuff */
  19.150 +EXPORT_SYMBOL(smp_call_function);
  19.151 +
  19.152 +/* TLB flushing */
  19.153 +EXPORT_SYMBOL(flush_tlb_page);
  19.154 +EXPORT_SYMBOL_GPL(flush_tlb_all);
  19.155 +#endif
  19.156 +
  19.157 +#ifdef CONFIG_X86_IO_APIC
  19.158 +EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
  19.159 +#endif
  19.160 +
  19.161 +#ifdef CONFIG_MCA
  19.162 +EXPORT_SYMBOL(machine_id);
  19.163 +#endif
  19.164 +
  19.165 +#ifdef CONFIG_VT
  19.166 +EXPORT_SYMBOL(screen_info);
  19.167 +#endif
  19.168 +
  19.169 +EXPORT_SYMBOL(get_wchan);
  19.170 +
  19.171 +EXPORT_SYMBOL(rtc_lock);
  19.172 +
  19.173 +EXPORT_SYMBOL_GPL(set_nmi_callback);
  19.174 +EXPORT_SYMBOL_GPL(unset_nmi_callback);
  19.175 +
  19.176 +#undef memcmp
  19.177 +extern int memcmp(const void *,const void *,__kernel_size_t);
  19.178 +EXPORT_SYMBOL(memcmp);
  19.179 +
  19.180 +EXPORT_SYMBOL(register_die_notifier);
  19.181 +#ifdef CONFIG_HAVE_DEC_LOCK
  19.182 +EXPORT_SYMBOL(_atomic_dec_and_lock);
  19.183 +#endif
  19.184 +
  19.185 +EXPORT_SYMBOL(__PAGE_KERNEL);
  19.186 +
  19.187 +#ifdef CONFIG_HIGHMEM
  19.188 +EXPORT_SYMBOL(kmap);
  19.189 +EXPORT_SYMBOL(kunmap);
  19.190 +EXPORT_SYMBOL(kmap_atomic);
  19.191 +EXPORT_SYMBOL(kunmap_atomic);
  19.192 +EXPORT_SYMBOL(kmap_atomic_to_page);
  19.193 +#endif
  19.194 +
  19.195 +#if defined(CONFIG_X86_SPEEDSTEP_SMI) || defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE)
  19.196 +EXPORT_SYMBOL(ist_info);
  19.197 +#endif
  19.198 +
  19.199 +EXPORT_SYMBOL(csum_partial);
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/ioport.c	Mon Dec 27 10:12:02 2004 +0000
    20.3 @@ -0,0 +1,51 @@
    20.4 +#include <linux/sched.h>
    20.5 +#include <linux/kernel.h>
    20.6 +#include <linux/errno.h>
    20.7 +#include <linux/types.h>
    20.8 +#include <linux/ioport.h>
    20.9 +#include <linux/mm.h>
   20.10 +#include <linux/smp.h>
   20.11 +#include <linux/smp_lock.h>
   20.12 +#include <linux/stddef.h>
   20.13 +#include <linux/slab.h>
   20.14 +#include <asm-xen/xen-public/dom0_ops.h>
   20.15 +
   20.16 +asmlinkage long sys_iopl(unsigned int new_io_pl)
   20.17 +{
   20.18 +	unsigned int old_io_pl = current->thread.io_pl;
   20.19 +	dom0_op_t op;
   20.20 +
   20.21 +	if (new_io_pl > 3)
   20.22 +		return -EINVAL;
   20.23 +
   20.24 +	/* Need "raw I/O" privileges for direct port access. */
   20.25 +	if ((new_io_pl > old_io_pl) && !capable(CAP_SYS_RAWIO))
   20.26 +		return -EPERM;
   20.27 +
   20.28 +	if (!(xen_start_info.flags & SIF_PRIVILEGED))
   20.29 +		return -EPERM;
   20.30 +
   20.31 +	/* Maintain OS privileges even if user attempts to relinquish them. */
   20.32 +	if (new_io_pl == 0)
   20.33 +		new_io_pl = 1;
   20.34 +
   20.35 +	/* Change our version of the privilege levels. */
   20.36 +	current->thread.io_pl = new_io_pl;
   20.37 +
   20.38 +	/* Force the change at ring 0. */
   20.39 +	op.cmd           = DOM0_IOPL;
   20.40 +	op.u.iopl.domain = DOMID_SELF;
   20.41 +	op.u.iopl.iopl   = new_io_pl;
   20.42 +	HYPERVISOR_dom0_op(&op);
   20.43 +
   20.44 +	return 0;
   20.45 +}
   20.46 +
   20.47 +asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
   20.48 +{
   20.49 +#if 0
   20.50 +	printk(KERN_INFO "ioperm not fully supported - %s\n",
   20.51 +		turn_on ? "set iopl to 3" : "ignore resource release");
   20.52 +#endif
   20.53 +	return turn_on ? sys_iopl(3) : 0;
   20.54 +}
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/ldt.c	Mon Dec 27 10:12:02 2004 +0000
    21.3 @@ -0,0 +1,270 @@
    21.4 +/*
    21.5 + * linux/kernel/ldt.c
    21.6 + *
    21.7 + * Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
    21.8 + * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
    21.9 + */
   21.10 +
   21.11 +#include <linux/errno.h>
   21.12 +#include <linux/sched.h>
   21.13 +#include <linux/string.h>
   21.14 +#include <linux/mm.h>
   21.15 +#include <linux/smp.h>
   21.16 +#include <linux/smp_lock.h>
   21.17 +#include <linux/vmalloc.h>
   21.18 +#include <linux/slab.h>
   21.19 +
   21.20 +#include <asm/uaccess.h>
   21.21 +#include <asm/system.h>
   21.22 +#include <asm/ldt.h>
   21.23 +#include <asm/desc.h>
   21.24 +
   21.25 +#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
   21.26 +static void flush_ldt(void *null)
   21.27 +{
   21.28 +	if (current->active_mm) {
   21.29 +		load_LDT(&current->active_mm->context);
   21.30 +		flush_page_update_queue();
   21.31 +	}
   21.32 +}
   21.33 +#endif
   21.34 +
   21.35 +static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
   21.36 +{
   21.37 +	void *oldldt;
   21.38 +	void *newldt;
   21.39 +	int oldsize;
   21.40 +
   21.41 +	if (mincount <= pc->size)
   21.42 +		return 0;
   21.43 +	oldsize = pc->size;
   21.44 +	mincount = (mincount+511)&(~511);
   21.45 +	if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE)
   21.46 +		newldt = vmalloc(mincount*LDT_ENTRY_SIZE);
   21.47 +	else
   21.48 +		newldt = kmalloc(mincount*LDT_ENTRY_SIZE, GFP_KERNEL);
   21.49 +
   21.50 +	if (!newldt)
   21.51 +		return -ENOMEM;
   21.52 +
   21.53 +	if (oldsize)
   21.54 +		memcpy(newldt, pc->ldt, oldsize*LDT_ENTRY_SIZE);
   21.55 +	oldldt = pc->ldt;
   21.56 +	memset(newldt+oldsize*LDT_ENTRY_SIZE, 0, (mincount-oldsize)*LDT_ENTRY_SIZE);
   21.57 +	pc->ldt = newldt;
   21.58 +	wmb();
   21.59 +	pc->size = mincount;
   21.60 +	wmb();
   21.61 +
   21.62 +	if (reload) {
   21.63 +#ifdef CONFIG_SMP
   21.64 +		cpumask_t mask;
   21.65 +		preempt_disable();
   21.66 +#endif
   21.67 +		make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
   21.68 +				    PAGE_SIZE);
   21.69 +		load_LDT(pc);
   21.70 +		flush_page_update_queue();
   21.71 +#ifdef CONFIG_SMP
   21.72 +		mask = cpumask_of_cpu(smp_processor_id());
   21.73 +		if (!cpus_equal(current->mm->cpu_vm_mask, mask))
   21.74 +			smp_call_function(flush_ldt, NULL, 1, 1);
   21.75 +		preempt_enable();
   21.76 +#endif
   21.77 +	}
   21.78 +	if (oldsize) {
   21.79 +		make_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) /
   21.80 +			PAGE_SIZE);
   21.81 +		flush_page_update_queue();
   21.82 +		if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE)
   21.83 +			vfree(oldldt);
   21.84 +		else
   21.85 +			kfree(oldldt);
   21.86 +	}
   21.87 +	return 0;
   21.88 +}
   21.89 +
   21.90 +static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
   21.91 +{
   21.92 +	int err = alloc_ldt(new, old->size, 0);
   21.93 +	if (err < 0)
   21.94 +		return err;
   21.95 +	memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE);
   21.96 +	make_pages_readonly(new->ldt, (new->size * LDT_ENTRY_SIZE) /
   21.97 +			    PAGE_SIZE);
   21.98 +	flush_page_update_queue();
   21.99 +	return 0;
  21.100 +}
  21.101 +
  21.102 +/*
  21.103 + * we do not have to muck with descriptors here, that is
  21.104 + * done in switch_mm() as needed.
  21.105 + */
  21.106 +int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
  21.107 +{
  21.108 +	struct mm_struct * old_mm;
  21.109 +	int retval = 0;
  21.110 +
  21.111 +	init_MUTEX(&mm->context.sem);
  21.112 +	mm->context.size = 0;
  21.113 +	old_mm = current->mm;
  21.114 +	if (old_mm && old_mm->context.size > 0) {
  21.115 +		down(&old_mm->context.sem);
  21.116 +		retval = copy_ldt(&mm->context, &old_mm->context);
  21.117 +		up(&old_mm->context.sem);
  21.118 +	}
  21.119 +	return retval;
  21.120 +}
  21.121 +
  21.122 +/*
  21.123 + * No need to lock the MM as we are the last user
  21.124 + */
  21.125 +void destroy_context(struct mm_struct *mm)
  21.126 +{
  21.127 +	if (mm->context.size) {
  21.128 +		if (mm == current->active_mm)
  21.129 +			clear_LDT();
  21.130 +		make_pages_writable(mm->context.ldt, 
  21.131 +				    (mm->context.size * LDT_ENTRY_SIZE) /
  21.132 +				    PAGE_SIZE);
  21.133 +		flush_page_update_queue();
  21.134 +		if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
  21.135 +			vfree(mm->context.ldt);
  21.136 +		else
  21.137 +			kfree(mm->context.ldt);
  21.138 +		mm->context.size = 0;
  21.139 +	}
  21.140 +}
  21.141 +
  21.142 +static int read_ldt(void __user * ptr, unsigned long bytecount)
  21.143 +{
  21.144 +	int err;
  21.145 +	unsigned long size;
  21.146 +	struct mm_struct * mm = current->mm;
  21.147 +
  21.148 +	if (!mm->context.size)
  21.149 +		return 0;
  21.150 +	if (bytecount > LDT_ENTRY_SIZE*LDT_ENTRIES)
  21.151 +		bytecount = LDT_ENTRY_SIZE*LDT_ENTRIES;
  21.152 +
  21.153 +	down(&mm->context.sem);
  21.154 +	size = mm->context.size*LDT_ENTRY_SIZE;
  21.155 +	if (size > bytecount)
  21.156 +		size = bytecount;
  21.157 +
  21.158 +	err = 0;
  21.159 +	if (copy_to_user(ptr, mm->context.ldt, size))
  21.160 +		err = -EFAULT;
  21.161 +	up(&mm->context.sem);
  21.162 +	if (err < 0)
  21.163 +		goto error_return;
  21.164 +	if (size != bytecount) {
  21.165 +		/* zero-fill the rest */
  21.166 +		if (clear_user(ptr+size, bytecount-size) != 0) {
  21.167 +			err = -EFAULT;
  21.168 +			goto error_return;
  21.169 +		}
  21.170 +	}
  21.171 +	return bytecount;
  21.172 +error_return:
  21.173 +	return err;
  21.174 +}
  21.175 +
  21.176 +static int read_default_ldt(void __user * ptr, unsigned long bytecount)
  21.177 +{
  21.178 +	int err;
  21.179 +	unsigned long size;
  21.180 +	void *address;
  21.181 +
  21.182 +	err = 0;
  21.183 +	address = &default_ldt[0];
  21.184 +	size = 5*sizeof(struct desc_struct);
  21.185 +	if (size > bytecount)
  21.186 +		size = bytecount;
  21.187 +
  21.188 +	err = size;
  21.189 +	if (copy_to_user(ptr, address, size))
  21.190 +		err = -EFAULT;
  21.191 +
  21.192 +	return err;
  21.193 +}
  21.194 +
  21.195 +static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode)
  21.196 +{
  21.197 +	struct mm_struct * mm = current->mm;
  21.198 +	__u32 entry_1, entry_2, *lp;
  21.199 +	unsigned long mach_lp;
  21.200 +	int error;
  21.201 +	struct user_desc ldt_info;
  21.202 +
  21.203 +	error = -EINVAL;
  21.204 +	if (bytecount != sizeof(ldt_info))
  21.205 +		goto out;
  21.206 +	error = -EFAULT; 	
  21.207 +	if (copy_from_user(&ldt_info, ptr, sizeof(ldt_info)))
  21.208 +		goto out;
  21.209 +
  21.210 +	error = -EINVAL;
  21.211 +	if (ldt_info.entry_number >= LDT_ENTRIES)
  21.212 +		goto out;
  21.213 +	if (ldt_info.contents == 3) {
  21.214 +		if (oldmode)
  21.215 +			goto out;
  21.216 +		if (ldt_info.seg_not_present == 0)
  21.217 +			goto out;
  21.218 +	}
  21.219 +
  21.220 +	down(&mm->context.sem);
  21.221 +	if (ldt_info.entry_number >= mm->context.size) {
  21.222 +		error = alloc_ldt(&current->mm->context, ldt_info.entry_number+1, 1);
  21.223 +		if (error < 0)
  21.224 +			goto out_unlock;
  21.225 +	}
  21.226 +
  21.227 +	lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.ldt);
  21.228 +	mach_lp = arbitrary_virt_to_machine(lp);
  21.229 +
  21.230 +   	/* Allow LDTs to be cleared by the user. */
  21.231 +   	if (ldt_info.base_addr == 0 && ldt_info.limit == 0) {
  21.232 +		if (oldmode || LDT_empty(&ldt_info)) {
  21.233 +			entry_1 = 0;
  21.234 +			entry_2 = 0;
  21.235 +			goto install;
  21.236 +		}
  21.237 +	}
  21.238 +
  21.239 +	entry_1 = LDT_entry_a(&ldt_info);
  21.240 +	entry_2 = LDT_entry_b(&ldt_info);
  21.241 +	if (oldmode)
  21.242 +		entry_2 &= ~(1 << 20);
  21.243 +
  21.244 +	/* Install the new entry ...  */
  21.245 +install:
  21.246 +	error = HYPERVISOR_update_descriptor(mach_lp, entry_1, entry_2);
  21.247 +
  21.248 +out_unlock:
  21.249 +	up(&mm->context.sem);
  21.250 +out:
  21.251 +	return error;
  21.252 +}
  21.253 +
  21.254 +asmlinkage int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount)
  21.255 +{
  21.256 +	int ret = -ENOSYS;
  21.257 +
  21.258 +	switch (func) {
  21.259 +	case 0:
  21.260 +		ret = read_ldt(ptr, bytecount);
  21.261 +		break;
  21.262 +	case 1:
  21.263 +		ret = write_ldt(ptr, bytecount, 1);
  21.264 +		break;
  21.265 +	case 2:
  21.266 +		ret = read_default_ldt(ptr, bytecount);
  21.267 +		break;
  21.268 +	case 0x11:
  21.269 +		ret = write_ldt(ptr, bytecount, 0);
  21.270 +		break;
  21.271 +	}
  21.272 +	return ret;
  21.273 +}
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/pci-dma.c	Mon Dec 27 10:12:02 2004 +0000
    22.3 @@ -0,0 +1,232 @@
    22.4 +/*
    22.5 + * Dynamic DMA mapping support.
    22.6 + *
    22.7 + * On i386 there is no hardware dynamic DMA address translation,
    22.8 + * so consistent alloc/free are merely page allocation/freeing.
    22.9 + * The rest of the dynamic DMA mapping interface is implemented
   22.10 + * in asm/pci.h.
   22.11 + */
   22.12 +
   22.13 +#include <linux/types.h>
   22.14 +#include <linux/mm.h>
   22.15 +#include <linux/string.h>
   22.16 +#include <linux/pci.h>
   22.17 +#include <linux/version.h>
   22.18 +#include <asm/io.h>
   22.19 +#include <asm-xen/balloon.h>
   22.20 +
   22.21 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
   22.22 +#define pte_offset_kernel pte_offset
   22.23 +#endif
   22.24 +
   22.25 +struct dma_coherent_mem {
   22.26 +	void		*virt_base;
   22.27 +	u32		device_base;
   22.28 +	int		size;
   22.29 +	int		flags;
   22.30 +	unsigned long	*bitmap;
   22.31 +};
   22.32 +
   22.33 +static void
   22.34 +xen_contig_memory(unsigned long vstart, unsigned int order)
   22.35 +{
   22.36 +	/*
   22.37 +	 * Ensure multi-page extents are contiguous in machine memory.
   22.38 +	 * This code could be cleaned up some, and the number of
   22.39 +	 * hypercalls reduced.
   22.40 +	 */
   22.41 +	pgd_t         *pgd; 
   22.42 +	pmd_t         *pmd;
   22.43 +	pte_t         *pte;
   22.44 +	unsigned long  pfn, i, flags;
   22.45 +
   22.46 +	scrub_pages(vstart, 1 << order);
   22.47 +
   22.48 +        balloon_lock(flags);
   22.49 +
   22.50 +	/* 1. Zap current PTEs, giving away the underlying pages. */
   22.51 +	for (i = 0; i < (1<<order); i++) {
   22.52 +		pgd = pgd_offset_k(   (vstart + (i*PAGE_SIZE)));
   22.53 +		pmd = pmd_offset(pgd, (vstart + (i*PAGE_SIZE)));
   22.54 +		pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
   22.55 +		pfn = pte->pte_low >> PAGE_SHIFT;
   22.56 +		queue_l1_entry_update(pte, 0);
   22.57 +		phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
   22.58 +			INVALID_P2M_ENTRY;
   22.59 +		flush_page_update_queue();
   22.60 +		if (HYPERVISOR_dom_mem_op(MEMOP_decrease_reservation, 
   22.61 +					  &pfn, 1, 0) != 1) BUG();
   22.62 +	}
   22.63 +	/* 2. Get a new contiguous memory extent. */
   22.64 +	if (HYPERVISOR_dom_mem_op(MEMOP_increase_reservation,
   22.65 +				  &pfn, 1, order) != 1) BUG();
   22.66 +	/* 3. Map the new extent in place of old pages. */
   22.67 +	for (i = 0; i < (1<<order); i++) {
   22.68 +		pgd = pgd_offset_k(   (vstart + (i*PAGE_SIZE)));
   22.69 +		pmd = pmd_offset(pgd, (vstart + (i*PAGE_SIZE)));
   22.70 +		pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
   22.71 +		queue_l1_entry_update(
   22.72 +			pte, ((pfn+i)<<PAGE_SHIFT)|__PAGE_KERNEL);
   22.73 +		queue_machphys_update(
   22.74 +			pfn+i, (__pa(vstart)>>PAGE_SHIFT)+i);
   22.75 +		phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
   22.76 +			pfn+i;
   22.77 +	}
   22.78 +	/* Flush updates through and flush the TLB. */
   22.79 +	xen_tlb_flush();
   22.80 +
   22.81 +        balloon_unlock(flags);
   22.82 +}
   22.83 +
   22.84 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
   22.85 +void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
   22.86 +			   dma_addr_t *dma_handle)
   22.87 +#else
   22.88 +void *dma_alloc_coherent(struct device *dev, size_t size,
   22.89 +			   dma_addr_t *dma_handle, int gfp)
   22.90 +#endif
   22.91 +{
   22.92 +	void *ret;
   22.93 +	unsigned int order = get_order(size);
   22.94 +	unsigned long vstart;
   22.95 +
   22.96 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
   22.97 +	int gfp = GFP_ATOMIC;
   22.98 +
   22.99 +	if (hwdev == NULL || ((u32)hwdev->dma_mask < 0xffffffff))
  22.100 +		gfp |= GFP_DMA;
  22.101 +#else
  22.102 +	struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
  22.103 +
  22.104 +	/* ignore region specifiers */
  22.105 +	gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
  22.106 +
  22.107 +	if (mem) {
  22.108 +		int page = bitmap_find_free_region(mem->bitmap, mem->size,
  22.109 +						     order);
  22.110 +		if (page >= 0) {
  22.111 +			*dma_handle = mem->device_base + (page << PAGE_SHIFT);
  22.112 +			ret = mem->virt_base + (page << PAGE_SHIFT);
  22.113 +			memset(ret, 0, size);
  22.114 +			return ret;
  22.115 +		}
  22.116 +		if (mem->flags & DMA_MEMORY_EXCLUSIVE)
  22.117 +			return NULL;
  22.118 +	}
  22.119 +
  22.120 +	if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
  22.121 +		gfp |= GFP_DMA;
  22.122 +#endif
  22.123 +
  22.124 +	vstart = __get_free_pages(gfp, order);
  22.125 +	ret = (void *)vstart;
  22.126 +	if (ret == NULL)
  22.127 +		return ret;
  22.128 +
  22.129 +	xen_contig_memory(vstart, order);
  22.130 +
  22.131 +	memset(ret, 0, size);
  22.132 +	*dma_handle = virt_to_bus(ret);
  22.133 +
  22.134 +	return ret;
  22.135 +}
  22.136 +
  22.137 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
  22.138 +void pci_free_consistent(struct pci_dev *hwdev, size_t size,
  22.139 +			 void *vaddr, dma_addr_t dma_handle)
  22.140 +{
  22.141 +	free_pages((unsigned long)vaddr, get_order(size));
  22.142 +}
  22.143 +#else
  22.144 +
  22.145 +void dma_free_coherent(struct device *dev, size_t size,
  22.146 +			 void *vaddr, dma_addr_t dma_handle)
  22.147 +{
  22.148 +	struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
  22.149 +	int order = get_order(size);
  22.150 +	
  22.151 +	if (mem && vaddr >= mem->virt_base && vaddr < (mem->virt_base + (mem->size << PAGE_SHIFT))) {
  22.152 +		int page = (vaddr - mem->virt_base) >> PAGE_SHIFT;
  22.153 +
  22.154 +		bitmap_release_region(mem->bitmap, page, order);
  22.155 +	} else
  22.156 +		free_pages((unsigned long)vaddr, order);
  22.157 +}
  22.158 +
  22.159 +int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
  22.160 +				dma_addr_t device_addr, size_t size, int flags)
  22.161 +{
  22.162 +	void __iomem *mem_base;
  22.163 +	int pages = size >> PAGE_SHIFT;
  22.164 +	int bitmap_size = (pages + 31)/32;
  22.165 +
  22.166 +	if ((flags & (DMA_MEMORY_MAP | DMA_MEMORY_IO)) == 0)
  22.167 +		goto out;
  22.168 +	if (!size)
  22.169 +		goto out;
  22.170 +	if (dev->dma_mem)
  22.171 +		goto out;
  22.172 +
  22.173 +	/* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */
  22.174 +
  22.175 +	mem_base = ioremap(bus_addr, size);
  22.176 +	if (!mem_base)
  22.177 +		goto out;
  22.178 +
  22.179 +	dev->dma_mem = kmalloc(GFP_KERNEL, sizeof(struct dma_coherent_mem));
  22.180 +	if (!dev->dma_mem)
  22.181 +		goto out;
  22.182 +	memset(dev->dma_mem, 0, sizeof(struct dma_coherent_mem));
  22.183 +	dev->dma_mem->bitmap = kmalloc(GFP_KERNEL, bitmap_size);
  22.184 +	if (!dev->dma_mem->bitmap)
  22.185 +		goto free1_out;
  22.186 +	memset(dev->dma_mem->bitmap, 0, bitmap_size);
  22.187 +
  22.188 +	dev->dma_mem->virt_base = mem_base;
  22.189 +	dev->dma_mem->device_base = device_addr;
  22.190 +	dev->dma_mem->size = pages;
  22.191 +	dev->dma_mem->flags = flags;
  22.192 +
  22.193 +	if (flags & DMA_MEMORY_MAP)
  22.194 +		return DMA_MEMORY_MAP;
  22.195 +
  22.196 +	return DMA_MEMORY_IO;
  22.197 +
  22.198 + free1_out:
  22.199 +	kfree(dev->dma_mem->bitmap);
  22.200 + out:
  22.201 +	return 0;
  22.202 +}
  22.203 +EXPORT_SYMBOL(dma_declare_coherent_memory);
  22.204 +
  22.205 +void dma_release_declared_memory(struct device *dev)
  22.206 +{
  22.207 +	struct dma_coherent_mem *mem = dev->dma_mem;
  22.208 +	
  22.209 +	if(!mem)
  22.210 +		return;
  22.211 +	dev->dma_mem = NULL;
  22.212 +	kfree(mem->bitmap);
  22.213 +	kfree(mem);
  22.214 +}
  22.215 +EXPORT_SYMBOL(dma_release_declared_memory);
  22.216 +
  22.217 +void *dma_mark_declared_memory_occupied(struct device *dev,
  22.218 +					dma_addr_t device_addr, size_t size)
  22.219 +{
  22.220 +	struct dma_coherent_mem *mem = dev->dma_mem;
  22.221 +	int pages = (size + (device_addr & ~PAGE_MASK) + PAGE_SIZE - 1) >> PAGE_SHIFT;
  22.222 +	int pos, err;
  22.223 +
  22.224 +	if (!mem)
  22.225 +		return ERR_PTR(-EINVAL);
  22.226 +
  22.227 +	pos = (device_addr - mem->device_base) >> PAGE_SHIFT;
  22.228 +	err = bitmap_allocate_region(mem->bitmap, pos, get_order(pages));
  22.229 +	if (err != 0)
  22.230 +		return ERR_PTR(err);
  22.231 +	return mem->virt_base + (pos << PAGE_SHIFT);
  22.232 +}
  22.233 +EXPORT_SYMBOL(dma_mark_declared_memory_occupied);
  22.234 +
  22.235 +#endif
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/process.c	Mon Dec 27 10:12:02 2004 +0000
    23.3 @@ -0,0 +1,777 @@
    23.4 +/*
    23.5 + *  linux/arch/i386/kernel/process.c
    23.6 + *
    23.7 + *  Copyright (C) 1995  Linus Torvalds
    23.8 + *
    23.9 + *  Pentium III FXSR, SSE support
   23.10 + *	Gareth Hughes <gareth@valinux.com>, May 2000
   23.11 + */
   23.12 +
   23.13 +/*
   23.14 + * This file handles the architecture-dependent parts of process handling..
   23.15 + */
   23.16 +
   23.17 +#include <stdarg.h>
   23.18 +
   23.19 +#include <linux/errno.h>
   23.20 +#include <linux/sched.h>
   23.21 +#include <linux/fs.h>
   23.22 +#include <linux/kernel.h>
   23.23 +#include <linux/mm.h>
   23.24 +#include <linux/elfcore.h>
   23.25 +#include <linux/smp.h>
   23.26 +#include <linux/smp_lock.h>
   23.27 +#include <linux/stddef.h>
   23.28 +#include <linux/slab.h>
   23.29 +#include <linux/vmalloc.h>
   23.30 +#include <linux/user.h>
   23.31 +#include <linux/a.out.h>
   23.32 +#include <linux/interrupt.h>
   23.33 +#include <linux/config.h>
   23.34 +#include <linux/utsname.h>
   23.35 +#include <linux/delay.h>
   23.36 +#include <linux/reboot.h>
   23.37 +#include <linux/init.h>
   23.38 +#include <linux/mc146818rtc.h>
   23.39 +#include <linux/module.h>
   23.40 +#include <linux/kallsyms.h>
   23.41 +#include <linux/ptrace.h>
   23.42 +
   23.43 +#include <asm/uaccess.h>
   23.44 +#include <asm/pgtable.h>
   23.45 +#include <asm/system.h>
   23.46 +#include <asm/io.h>
   23.47 +#include <asm/ldt.h>
   23.48 +#include <asm/processor.h>
   23.49 +#include <asm/i387.h>
   23.50 +#include <asm/irq.h>
   23.51 +#include <asm/desc.h>
   23.52 +#include <asm-xen/multicall.h>
   23.53 +#include <asm-xen/xen-public/dom0_ops.h>
   23.54 +#ifdef CONFIG_MATH_EMULATION
   23.55 +#include <asm/math_emu.h>
   23.56 +#endif
   23.57 +
   23.58 +#include <linux/irq.h>
   23.59 +#include <linux/err.h>
   23.60 +
   23.61 +asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
   23.62 +
   23.63 +int hlt_counter;
   23.64 +
   23.65 +unsigned long boot_option_idle_override = 0;
   23.66 +EXPORT_SYMBOL(boot_option_idle_override);
   23.67 +
   23.68 +/*
   23.69 + * Return saved PC of a blocked thread.
   23.70 + */
   23.71 +unsigned long thread_saved_pc(struct task_struct *tsk)
   23.72 +{
   23.73 +	return ((unsigned long *)tsk->thread.esp)[3];
   23.74 +}
   23.75 +
   23.76 +/*
   23.77 + * Powermanagement idle function, if any..
   23.78 + */
   23.79 +void (*pm_idle)(void);
   23.80 +
   23.81 +void disable_hlt(void)
   23.82 +{
   23.83 +	hlt_counter++;
   23.84 +}
   23.85 +
   23.86 +EXPORT_SYMBOL(disable_hlt);
   23.87 +
   23.88 +void enable_hlt(void)
   23.89 +{
   23.90 +	hlt_counter--;
   23.91 +}
   23.92 +
   23.93 +EXPORT_SYMBOL(enable_hlt);
   23.94 +
   23.95 +/* XXX XEN doesn't use default_idle(), poll_idle(). Use xen_idle() instead. */
   23.96 +extern int set_timeout_timer(void);
   23.97 +void xen_idle(void)
   23.98 +{
   23.99 +	int cpu = smp_processor_id();
  23.100 +
  23.101 +	local_irq_disable();
  23.102 +
  23.103 +	if (rcu_pending(cpu))
  23.104 +		rcu_check_callbacks(cpu, 0);
  23.105 +
  23.106 +	if (need_resched()) {
  23.107 +		local_irq_enable();
  23.108 +	} else if (set_timeout_timer() == 0) {
  23.109 +		/* NB. Blocking reenable events in a race-free manner. */
  23.110 +		HYPERVISOR_block();
  23.111 +	} else {
  23.112 +		local_irq_enable();
  23.113 +		HYPERVISOR_yield();
  23.114 +	}
  23.115 +}
  23.116 +
  23.117 +/*
  23.118 + * The idle thread. There's no useful work to be
  23.119 + * done, so just try to conserve power and have a
  23.120 + * low exit latency (ie sit in a loop waiting for
  23.121 + * somebody to say that they'd like to reschedule)
  23.122 + */
  23.123 +void cpu_idle (void)
  23.124 +{
  23.125 +	/* endless idle loop with no priority at all */
  23.126 +	while (1) {
  23.127 +		while (!need_resched()) {
  23.128 +			/*
  23.129 +			 * Mark this as an RCU critical section so that
  23.130 +			 * synchronize_kernel() in the unload path waits
  23.131 +			 * for our completion.
  23.132 +			 */
  23.133 +			rcu_read_lock();
  23.134 +			irq_stat[smp_processor_id()].idle_timestamp = jiffies;
  23.135 +			xen_idle();
  23.136 +			rcu_read_unlock();
  23.137 +		}
  23.138 +		schedule();
  23.139 +	}
  23.140 +}
  23.141 +
  23.142 +/* XXX XEN doesn't use mwait_idle(), select_idle_routine(), idle_setup(). */
  23.143 +/* Always use xen_idle() instead. */
  23.144 +void __init select_idle_routine(const struct cpuinfo_x86 *c) {}
  23.145 +
  23.146 +void show_regs(struct pt_regs * regs)
  23.147 +{
  23.148 +	printk("\n");
  23.149 +	printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
  23.150 +	printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id());
  23.151 +	print_symbol("EIP is at %s\n", regs->eip);
  23.152 +
  23.153 +	if (regs->xcs & 2)
  23.154 +		printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
  23.155 +	printk(" EFLAGS: %08lx    %s  (%s)\n",
  23.156 +	       regs->eflags, print_tainted(),UTS_RELEASE);
  23.157 +	printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
  23.158 +		regs->eax,regs->ebx,regs->ecx,regs->edx);
  23.159 +	printk("ESI: %08lx EDI: %08lx EBP: %08lx",
  23.160 +		regs->esi, regs->edi, regs->ebp);
  23.161 +	printk(" DS: %04x ES: %04x\n",
  23.162 +		0xffff & regs->xds,0xffff & regs->xes);
  23.163 +
  23.164 +	show_trace(NULL, &regs->esp);
  23.165 +}
  23.166 +
  23.167 +/*
  23.168 + * This gets run with %ebx containing the
  23.169 + * function to call, and %edx containing
  23.170 + * the "args".
  23.171 + */
  23.172 +extern void kernel_thread_helper(void);
  23.173 +__asm__(".section .text\n"
  23.174 +	".align 4\n"
  23.175 +	"kernel_thread_helper:\n\t"
  23.176 +	"movl %edx,%eax\n\t"
  23.177 +	"pushl %edx\n\t"
  23.178 +	"call *%ebx\n\t"
  23.179 +	"pushl %eax\n\t"
  23.180 +	"call do_exit\n"
  23.181 +	".previous");
  23.182 +
  23.183 +/*
  23.184 + * Create a kernel thread
  23.185 + */
  23.186 +int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
  23.187 +{
  23.188 +	struct pt_regs regs;
  23.189 +
  23.190 +	memset(&regs, 0, sizeof(regs));
  23.191 +
  23.192 +	regs.ebx = (unsigned long) fn;
  23.193 +	regs.edx = (unsigned long) arg;
  23.194 +
  23.195 +	regs.xds = __USER_DS;
  23.196 +	regs.xes = __USER_DS;
  23.197 +	regs.orig_eax = -1;
  23.198 +	regs.eip = (unsigned long) kernel_thread_helper;
  23.199 +	regs.xcs = __KERNEL_CS;
  23.200 +	regs.eflags = X86_EFLAGS_IF | X86_EFLAGS_SF | X86_EFLAGS_PF | 0x2;
  23.201 +
  23.202 +	/* Ok, create the new process.. */
  23.203 +	return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
  23.204 +}
  23.205 +
  23.206 +/*
  23.207 + * Free current thread data structures etc..
  23.208 + */
  23.209 +void exit_thread(void)
  23.210 +{
  23.211 +	struct task_struct *tsk = current;
  23.212 +	struct thread_struct *t = &tsk->thread;
  23.213 +
  23.214 +	/* The process may have allocated an io port bitmap... nuke it. */
  23.215 +	if (unlikely(NULL != t->io_bitmap_ptr)) {
  23.216 +		int cpu = get_cpu();
  23.217 +		struct tss_struct *tss = &per_cpu(init_tss, cpu);
  23.218 +
  23.219 +		kfree(t->io_bitmap_ptr);
  23.220 +		t->io_bitmap_ptr = NULL;
  23.221 +		/*
  23.222 +		 * Careful, clear this in the TSS too:
  23.223 +		 */
  23.224 +		memset(tss->io_bitmap, 0xff, tss->io_bitmap_max);
  23.225 +		t->io_bitmap_max = 0;
  23.226 +		tss->io_bitmap_owner = NULL;
  23.227 +		tss->io_bitmap_max = 0;
  23.228 +		tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
  23.229 +		put_cpu();
  23.230 +	}
  23.231 +}
  23.232 +
  23.233 +void flush_thread(void)
  23.234 +{
  23.235 +	struct task_struct *tsk = current;
  23.236 +
  23.237 +	memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8);
  23.238 +	memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));	
  23.239 +	/*
  23.240 +	 * Forget coprocessor state..
  23.241 +	 */
  23.242 +	clear_fpu(tsk);
  23.243 +	tsk->used_math = 0;
  23.244 +}
  23.245 +
  23.246 +void release_thread(struct task_struct *dead_task)
  23.247 +{
  23.248 +	if (dead_task->mm) {
  23.249 +		// temporary debugging check
  23.250 +		if (dead_task->mm->context.size) {
  23.251 +			printk("WARNING: dead process %8s still has LDT? <%p/%d>\n",
  23.252 +					dead_task->comm,
  23.253 +					dead_task->mm->context.ldt,
  23.254 +					dead_task->mm->context.size);
  23.255 +			BUG();
  23.256 +		}
  23.257 +	}
  23.258 +
  23.259 +	release_vm86_irqs(dead_task);
  23.260 +}
  23.261 +
  23.262 +/*
  23.263 + * This gets called before we allocate a new thread and copy
  23.264 + * the current task into it.
  23.265 + */
  23.266 +void prepare_to_copy(struct task_struct *tsk)
  23.267 +{
  23.268 +	unlazy_fpu(tsk);
  23.269 +}
  23.270 +
  23.271 +int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
  23.272 +	unsigned long unused,
  23.273 +	struct task_struct * p, struct pt_regs * regs)
  23.274 +{
  23.275 +	struct pt_regs * childregs;
  23.276 +	struct task_struct *tsk;
  23.277 +	int err;
  23.278 +	unsigned long eflags;
  23.279 +
  23.280 +	childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p->thread_info)) - 1;
  23.281 +	*childregs = *regs;
  23.282 +	childregs->eax = 0;
  23.283 +	childregs->esp = esp;
  23.284 +
  23.285 +	p->thread.esp = (unsigned long) childregs;
  23.286 +	p->thread.esp0 = (unsigned long) (childregs+1);
  23.287 +
  23.288 +	p->thread.eip = (unsigned long) ret_from_fork;
  23.289 +
  23.290 +	savesegment(fs,p->thread.fs);
  23.291 +	savesegment(gs,p->thread.gs);
  23.292 +
  23.293 +	tsk = current;
  23.294 +	if (unlikely(NULL != tsk->thread.io_bitmap_ptr)) {
  23.295 +		p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
  23.296 +		if (!p->thread.io_bitmap_ptr) {
  23.297 +			p->thread.io_bitmap_max = 0;
  23.298 +			return -ENOMEM;
  23.299 +		}
  23.300 +		memcpy(p->thread.io_bitmap_ptr, tsk->thread.io_bitmap_ptr,
  23.301 +			IO_BITMAP_BYTES);
  23.302 +	}
  23.303 +
  23.304 +	/*
  23.305 +	 * Set a new TLS for the child thread?
  23.306 +	 */
  23.307 +	if (clone_flags & CLONE_SETTLS) {
  23.308 +		struct desc_struct *desc;
  23.309 +		struct user_desc info;
  23.310 +		int idx;
  23.311 +
  23.312 +		err = -EFAULT;
  23.313 +		if (copy_from_user(&info, (void __user *)childregs->esi, sizeof(info)))
  23.314 +			goto out;
  23.315 +		err = -EINVAL;
  23.316 +		if (LDT_empty(&info))
  23.317 +			goto out;
  23.318 +
  23.319 +		idx = info.entry_number;
  23.320 +		if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
  23.321 +			goto out;
  23.322 +
  23.323 +		desc = p->thread.tls_array + idx - GDT_ENTRY_TLS_MIN;
  23.324 +		desc->a = LDT_entry_a(&info);
  23.325 +		desc->b = LDT_entry_b(&info);
  23.326 +	}
  23.327 +
  23.328 +
  23.329 +	__asm__ __volatile__ ( "pushfl; popl %0" : "=r" (eflags) : );
  23.330 +	p->thread.io_pl = (eflags >> 12) & 3;
  23.331 +
  23.332 +	err = 0;
  23.333 + out:
  23.334 +	if (err && p->thread.io_bitmap_ptr) {
  23.335 +		kfree(p->thread.io_bitmap_ptr);
  23.336 +		p->thread.io_bitmap_max = 0;
  23.337 +	}
  23.338 +	return err;
  23.339 +}
  23.340 +
  23.341 +/*
  23.342 + * fill in the user structure for a core dump..
  23.343 + */
  23.344 +void dump_thread(struct pt_regs * regs, struct user * dump)
  23.345 +{
  23.346 +	int i;
  23.347 +
  23.348 +/* changed the size calculations - should hopefully work better. lbt */
  23.349 +	dump->magic = CMAGIC;
  23.350 +	dump->start_code = 0;
  23.351 +	dump->start_stack = regs->esp & ~(PAGE_SIZE - 1);
  23.352 +	dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
  23.353 +	dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> PAGE_SHIFT;
  23.354 +	dump->u_dsize -= dump->u_tsize;
  23.355 +	dump->u_ssize = 0;
  23.356 +	for (i = 0; i < 8; i++)
  23.357 +		dump->u_debugreg[i] = current->thread.debugreg[i];  
  23.358 +
  23.359 +	if (dump->start_stack < TASK_SIZE)
  23.360 +		dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
  23.361 +
  23.362 +	dump->regs.ebx = regs->ebx;
  23.363 +	dump->regs.ecx = regs->ecx;
  23.364 +	dump->regs.edx = regs->edx;
  23.365 +	dump->regs.esi = regs->esi;
  23.366 +	dump->regs.edi = regs->edi;
  23.367 +	dump->regs.ebp = regs->ebp;
  23.368 +	dump->regs.eax = regs->eax;
  23.369 +	dump->regs.ds = regs->xds;
  23.370 +	dump->regs.es = regs->xes;
  23.371 +	savesegment(fs,dump->regs.fs);
  23.372 +	savesegment(gs,dump->regs.gs);
  23.373 +	dump->regs.orig_eax = regs->orig_eax;
  23.374 +	dump->regs.eip = regs->eip;
  23.375 +	dump->regs.cs = regs->xcs;
  23.376 +	dump->regs.eflags = regs->eflags;
  23.377 +	dump->regs.esp = regs->esp;
  23.378 +	dump->regs.ss = regs->xss;
  23.379 +
  23.380 +	dump->u_fpvalid = dump_fpu (regs, &dump->i387);
  23.381 +}
  23.382 +
  23.383 +/* 
  23.384 + * Capture the user space registers if the task is not running (in user space)
  23.385 + */
  23.386 +int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
  23.387 +{
  23.388 +	struct pt_regs ptregs;
  23.389 +	
  23.390 +	ptregs = *(struct pt_regs *)
  23.391 +		((unsigned long)tsk->thread_info+THREAD_SIZE - sizeof(ptregs));
  23.392 +	ptregs.xcs &= 0xffff;
  23.393 +	ptregs.xds &= 0xffff;
  23.394 +	ptregs.xes &= 0xffff;
  23.395 +	ptregs.xss &= 0xffff;
  23.396 +
  23.397 +	elf_core_copy_regs(regs, &ptregs);
  23.398 +
  23.399 +	boot_option_idle_override = 1;
  23.400 +	return 1;
  23.401 +}
  23.402 +
  23.403 +static inline void
  23.404 +handle_io_bitmap(struct thread_struct *next, struct tss_struct *tss)
  23.405 +{
  23.406 +	if (!next->io_bitmap_ptr) {
  23.407 +		/*
  23.408 +		 * Disable the bitmap via an invalid offset. We still cache
  23.409 +		 * the previous bitmap owner and the IO bitmap contents:
  23.410 +		 */
  23.411 +		tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
  23.412 +		return;
  23.413 +	}
  23.414 +	if (likely(next == tss->io_bitmap_owner)) {
  23.415 +		/*
  23.416 +		 * Previous owner of the bitmap (hence the bitmap content)
  23.417 +		 * matches the next task, we dont have to do anything but
  23.418 +		 * to set a valid offset in the TSS:
  23.419 +		 */
  23.420 +		tss->io_bitmap_base = IO_BITMAP_OFFSET;
  23.421 +		return;
  23.422 +	}
  23.423 +	/*
  23.424 +	 * Lazy TSS's I/O bitmap copy. We set an invalid offset here
  23.425 +	 * and we let the task to get a GPF in case an I/O instruction
  23.426 +	 * is performed.  The handler of the GPF will verify that the
  23.427 +	 * faulting task has a valid I/O bitmap and, it true, does the
  23.428 +	 * real copy and restart the instruction.  This will save us
  23.429 +	 * redundant copies when the currently switched task does not
  23.430 +	 * perform any I/O during its timeslice.
  23.431 +	 */
  23.432 +	tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET_LAZY;
  23.433 +}
  23.434 +/*
  23.435 + * This special macro can be used to load a debugging register
  23.436 + */
  23.437 +#define loaddebug(thread,register) \
  23.438 +		HYPERVISOR_set_debugreg((register),	\
  23.439 +			(thread->debugreg[register]))
  23.440 +
  23.441 +/*
  23.442 + *	switch_to(x,yn) should switch tasks from x to y.
  23.443 + *
  23.444 + * We fsave/fwait so that an exception goes off at the right time
  23.445 + * (as a call from the fsave or fwait in effect) rather than to
  23.446 + * the wrong process. Lazy FP saving no longer makes any sense
  23.447 + * with modern CPU's, and this simplifies a lot of things (SMP
  23.448 + * and UP become the same).
  23.449 + *
  23.450 + * NOTE! We used to use the x86 hardware context switching. The
  23.451 + * reason for not using it any more becomes apparent when you
  23.452 + * try to recover gracefully from saved state that is no longer
  23.453 + * valid (stale segment register values in particular). With the
  23.454 + * hardware task-switch, there is no way to fix up bad state in
  23.455 + * a reasonable manner.
  23.456 + *
  23.457 + * The fact that Intel documents the hardware task-switching to
  23.458 + * be slow is a fairly red herring - this code is not noticeably
  23.459 + * faster. However, there _is_ some room for improvement here,
  23.460 + * so the performance issues may eventually be a valid point.
  23.461 + * More important, however, is the fact that this allows us much
  23.462 + * more flexibility.
  23.463 + *
  23.464 + * The return value (in %eax) will be the "prev" task after
  23.465 + * the task-switch, and shows up in ret_from_fork in entry.S,
  23.466 + * for example.
  23.467 + */
  23.468 +struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
  23.469 +{
  23.470 +	struct thread_struct *prev = &prev_p->thread,
  23.471 +				 *next = &next_p->thread;
  23.472 +	int cpu = smp_processor_id();
  23.473 +	struct tss_struct *tss = &per_cpu(init_tss, cpu);
  23.474 +	dom0_op_t op;
  23.475 +
  23.476 +        /* NB. No need to disable interrupts as already done in sched.c */
  23.477 +        /* __cli(); */
  23.478 +
  23.479 +	/*
  23.480 +	 * Save away %fs and %gs. No need to save %es and %ds, as
  23.481 +	 * those are always kernel segments while inside the kernel.
  23.482 +	 */
  23.483 +	asm volatile("movl %%fs,%0":"=m" (*(int *)&prev->fs));
  23.484 +	asm volatile("movl %%gs,%0":"=m" (*(int *)&prev->gs));
  23.485 +
  23.486 +	/*
  23.487 +	 * We clobber FS and GS here so that we avoid a GPF when
  23.488 +	 * restoring previous task's FS/GS values in Xen when the LDT
  23.489 +	 * is switched. If we don't do this then we can end up
  23.490 +	 * erroneously re-flushing the page-update queue when we
  23.491 +	 * 'execute_multicall_list'.
  23.492 +	 */
  23.493 +	__asm__ __volatile__ ( 
  23.494 +		"xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs" : : :
  23.495 +		"eax" );
  23.496 +
  23.497 +	MULTICALL_flush_page_update_queue();
  23.498 +
  23.499 +	/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
  23.500 +
  23.501 +	/*
  23.502 +	 * This is basically '__unlazy_fpu', except that we queue a
  23.503 +	 * multicall to indicate FPU task switch, rather than
  23.504 +	 * synchronously trapping to Xen.
  23.505 +	 */
  23.506 +	if (prev_p->thread_info->status & TS_USEDFPU) {
  23.507 +		save_init_fpu(prev_p);
  23.508 +		queue_multicall0(__HYPERVISOR_fpu_taskswitch);
  23.509 +	}
  23.510 +
  23.511 +	/*
  23.512 +	 * Reload esp0, LDT and the page table pointer:
  23.513 +	 * This is load_esp0(tss, next) with a multicall.
  23.514 +	 */
  23.515 +	tss->esp0 = next->esp0;
  23.516 +	/* This can only happen when SEP is enabled, no need to test
  23.517 +	 * "SEP"arately */
  23.518 +	if (unlikely(tss->ss1 != next->sysenter_cs)) {
  23.519 +		tss->ss1 = next->sysenter_cs;
  23.520 +		wrmsr(MSR_IA32_SYSENTER_CS, next->sysenter_cs, 0);
  23.521 +	}
  23.522 +	queue_multicall2(__HYPERVISOR_stack_switch, tss->ss0, tss->esp0);
  23.523 +
  23.524 +	/*
  23.525 +	 * Load the per-thread Thread-Local Storage descriptor.
  23.526 +	 * This is load_TLS(next, cpu) with multicalls.
  23.527 +	 */
  23.528 +#define C(i) do {							    \
  23.529 +	if (unlikely(next->tls_array[i].a != prev->tls_array[i].a ||	    \
  23.530 +		     next->tls_array[i].b != prev->tls_array[i].b))	    \
  23.531 +		queue_multicall3(__HYPERVISOR_update_descriptor,	    \
  23.532 +				 virt_to_machine(&get_cpu_gdt_table(cpu)    \
  23.533 +						 [GDT_ENTRY_TLS_MIN + i]),  \
  23.534 +				 ((u32 *)&next->tls_array[i])[0],	    \
  23.535 +				 ((u32 *)&next->tls_array[i])[1]);	    \
  23.536 +} while (0)
  23.537 +	C(0); C(1); C(2);
  23.538 +#undef C
  23.539 +
  23.540 +	if (xen_start_info.flags & SIF_PRIVILEGED) {
  23.541 +		op.cmd           = DOM0_IOPL;
  23.542 +		op.u.iopl.domain = DOMID_SELF;
  23.543 +		op.u.iopl.iopl   = next->io_pl;
  23.544 +		op.interface_version = DOM0_INTERFACE_VERSION;
  23.545 +		queue_multicall1(__HYPERVISOR_dom0_op, (unsigned long)&op);
  23.546 +	}
  23.547 +
  23.548 +	/* EXECUTE ALL TASK SWITCH XEN SYSCALLS AT THIS POINT. */
  23.549 +	execute_multicall_list();
  23.550 +        /* __sti(); */
  23.551 +
  23.552 +	/*
  23.553 +	 * Restore %fs and %gs if needed.
  23.554 +	 */
  23.555 +	if (unlikely(prev->fs | prev->gs | next->fs | next->gs)) {
  23.556 +		loadsegment(fs, next->fs);
  23.557 +		loadsegment(gs, next->gs);
  23.558 +	}
  23.559 +
  23.560 +	/*
  23.561 +	 * Now maybe reload the debug registers
  23.562 +	 */
  23.563 +	if (unlikely(next->debugreg[7])) {
  23.564 +		loaddebug(next, 0);
  23.565 +		loaddebug(next, 1);
  23.566 +		loaddebug(next, 2);
  23.567 +		loaddebug(next, 3);
  23.568 +		/* no 4 and 5 */
  23.569 +		loaddebug(next, 6);
  23.570 +		loaddebug(next, 7);
  23.571 +	}
  23.572 +
  23.573 +	if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr))
  23.574 +		handle_io_bitmap(next, tss);
  23.575 +
  23.576 +	return prev_p;
  23.577 +}
  23.578 +
  23.579 +asmlinkage int sys_fork(struct pt_regs regs)
  23.580 +{
  23.581 +	return do_fork(SIGCHLD, regs.esp, &regs, 0, NULL, NULL);
  23.582 +}
  23.583 +
  23.584 +asmlinkage int sys_clone(struct pt_regs regs)
  23.585 +{
  23.586 +	unsigned long clone_flags;
  23.587 +	unsigned long newsp;
  23.588 +	int __user *parent_tidptr, *child_tidptr;
  23.589 +
  23.590 +	clone_flags = regs.ebx;
  23.591 +	newsp = regs.ecx;
  23.592 +	parent_tidptr = (int __user *)regs.edx;
  23.593 +	child_tidptr = (int __user *)regs.edi;
  23.594 +	if (!newsp)
  23.595 +		newsp = regs.esp;
  23.596 +	return do_fork(clone_flags, newsp, &regs, 0, parent_tidptr, child_tidptr);
  23.597 +}
  23.598 +
  23.599 +/*
  23.600 + * This is trivial, and on the face of it looks like it
  23.601 + * could equally well be done in user mode.
  23.602 + *
  23.603 + * Not so, for quite unobvious reasons - register pressure.
  23.604 + * In user mode vfork() cannot have a stack frame, and if
  23.605 + * done by calling the "clone()" system call directly, you
  23.606 + * do not have enough call-clobbered registers to hold all
  23.607 + * the information you need.
  23.608 + */
  23.609 +asmlinkage int sys_vfork(struct pt_regs regs)
  23.610 +{
  23.611 +	return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, &regs, 0, NULL, NULL);
  23.612 +}
  23.613 +
  23.614 +/*
  23.615 + * sys_execve() executes a new program.
  23.616 + */
  23.617 +asmlinkage int sys_execve(struct pt_regs regs)
  23.618 +{
  23.619 +	int error;
  23.620 +	char * filename;
  23.621 +
  23.622 +	filename = getname((char __user *) regs.ebx);
  23.623 +	error = PTR_ERR(filename);
  23.624 +	if (IS_ERR(filename))
  23.625 +		goto out;
  23.626 +	error = do_execve(filename,
  23.627 +			(char __user * __user *) regs.ecx,
  23.628 +			(char __user * __user *) regs.edx,
  23.629 +			&regs);
  23.630 +	if (error == 0) {
  23.631 +		task_lock(current);
  23.632 +		current->ptrace &= ~PT_DTRACE;
  23.633 +		task_unlock(current);
  23.634 +		/* Make sure we don't return using sysenter.. */
  23.635 +		set_thread_flag(TIF_IRET);
  23.636 +	}
  23.637 +	putname(filename);
  23.638 +out:
  23.639 +	return error;
  23.640 +}
  23.641 +
  23.642 +#define top_esp                (THREAD_SIZE - sizeof(unsigned long))
  23.643 +#define top_ebp                (THREAD_SIZE - 2*sizeof(unsigned long))
  23.644 +
  23.645 +unsigned long get_wchan(struct task_struct *p)
  23.646 +{
  23.647 +	unsigned long ebp, esp, eip;
  23.648 +	unsigned long stack_page;
  23.649 +	int count = 0;
  23.650 +	if (!p || p == current || p->state == TASK_RUNNING)
  23.651 +		return 0;
  23.652 +	stack_page = (unsigned long)p->thread_info;
  23.653 +	esp = p->thread.esp;
  23.654 +	if (!stack_page || esp < stack_page || esp > top_esp+stack_page)
  23.655 +		return 0;
  23.656 +	/* include/asm-i386/system.h:switch_to() pushes ebp last. */
  23.657 +	ebp = *(unsigned long *) esp;
  23.658 +	do {
  23.659 +		if (ebp < stack_page || ebp > top_ebp+stack_page)
  23.660 +			return 0;
  23.661 +		eip = *(unsigned long *) (ebp+4);
  23.662 +		if (!in_sched_functions(eip))
  23.663 +			return eip;
  23.664 +		ebp = *(unsigned long *) ebp;
  23.665 +	} while (count++ < 16);
  23.666 +	return 0;
  23.667 +}
  23.668 +
  23.669 +/*
  23.670 + * sys_alloc_thread_area: get a yet unused TLS descriptor index.
  23.671 + */
  23.672 +static int get_free_idx(void)
  23.673 +{
  23.674 +	struct thread_struct *t = &current->thread;
  23.675 +	int idx;
  23.676 +
  23.677 +	for (idx = 0; idx < GDT_ENTRY_TLS_ENTRIES; idx++)
  23.678 +		if (desc_empty(t->tls_array + idx))
  23.679 +			return idx + GDT_ENTRY_TLS_MIN;
  23.680 +	return -ESRCH;
  23.681 +}
  23.682 +
  23.683 +/*
  23.684 + * Set a given TLS descriptor:
  23.685 + */
  23.686 +asmlinkage int sys_set_thread_area(struct user_desc __user *u_info)
  23.687 +{
  23.688 +	struct thread_struct *t = &current->thread;
  23.689 +	struct user_desc info;
  23.690 +	struct desc_struct *desc;
  23.691 +	int cpu, idx;
  23.692 +
  23.693 +	if (copy_from_user(&info, u_info, sizeof(info)))
  23.694 +		return -EFAULT;
  23.695 +	idx = info.entry_number;
  23.696 +
  23.697 +	/*
  23.698 +	 * index -1 means the kernel should try to find and
  23.699 +	 * allocate an empty descriptor:
  23.700 +	 */
  23.701 +	if (idx == -1) {
  23.702 +		idx = get_free_idx();
  23.703 +		if (idx < 0)
  23.704 +			return idx;
  23.705 +		if (put_user(idx, &u_info->entry_number))
  23.706 +			return -EFAULT;
  23.707 +	}
  23.708 +
  23.709 +	if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
  23.710 +		return -EINVAL;
  23.711 +
  23.712 +	desc = t->tls_array + idx - GDT_ENTRY_TLS_MIN;
  23.713 +
  23.714 +	/*
  23.715 +	 * We must not get preempted while modifying the TLS.
  23.716 +	 */
  23.717 +	cpu = get_cpu();
  23.718 +
  23.719 +	if (LDT_empty(&info)) {
  23.720 +		desc->a = 0;
  23.721 +		desc->b = 0;
  23.722 +	} else {
  23.723 +		desc->a = LDT_entry_a(&info);
  23.724 +		desc->b = LDT_entry_b(&info);
  23.725 +	}
  23.726 +	load_TLS(t, cpu);
  23.727 +
  23.728 +	put_cpu();
  23.729 +
  23.730 +	return 0;
  23.731 +}
  23.732 +
  23.733 +/*
  23.734 + * Get the current Thread-Local Storage area:
  23.735 + */
  23.736 +
  23.737 +#define GET_BASE(desc) ( \
  23.738 +	(((desc)->a >> 16) & 0x0000ffff) | \
  23.739 +	(((desc)->b << 16) & 0x00ff0000) | \
  23.740 +	( (desc)->b        & 0xff000000)   )
  23.741 +
  23.742 +#define GET_LIMIT(desc) ( \
  23.743 +	((desc)->a & 0x0ffff) | \
  23.744 +	 ((desc)->b & 0xf0000) )
  23.745 +	
  23.746 +#define GET_32BIT(desc)		(((desc)->b >> 22) & 1)
  23.747 +#define GET_CONTENTS(desc)	(((desc)->b >> 10) & 3)
  23.748 +#define GET_WRITABLE(desc)	(((desc)->b >>  9) & 1)
  23.749 +#define GET_LIMIT_PAGES(desc)	(((desc)->b >> 23) & 1)
  23.750 +#define GET_PRESENT(desc)	(((desc)->b >> 15) & 1)
  23.751 +#define GET_USEABLE(desc)	(((desc)->b >> 20) & 1)
  23.752 +
  23.753 +asmlinkage int sys_get_thread_area(struct user_desc __user *u_info)
  23.754 +{
  23.755 +	struct user_desc info;
  23.756 +	struct desc_struct *desc;
  23.757 +	int idx;
  23.758 +
  23.759 +	if (get_user(idx, &u_info->entry_number))
  23.760 +		return -EFAULT;
  23.761 +	if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
  23.762 +		return -EINVAL;
  23.763 +
  23.764 +	desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN;
  23.765 +
  23.766 +	info.entry_number = idx;
  23.767 +	info.base_addr = GET_BASE(desc);
  23.768 +	info.limit = GET_LIMIT(desc);
  23.769 +	info.seg_32bit = GET_32BIT(desc);
  23.770 +	info.contents = GET_CONTENTS(desc);
  23.771 +	info.read_exec_only = !GET_WRITABLE(desc);
  23.772 +	info.limit_in_pages = GET_LIMIT_PAGES(desc);
  23.773 +	info.seg_not_present = !GET_PRESENT(desc);
  23.774 +	info.useable = GET_USEABLE(desc);
  23.775 +
  23.776 +	if (copy_to_user(u_info, &info, sizeof(info)))
  23.777 +		return -EFAULT;
  23.778 +	return 0;
  23.779 +}
  23.780 +
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/setup.c	Mon Dec 27 10:12:02 2004 +0000
    24.3 @@ -0,0 +1,1543 @@
    24.4 +/*
    24.5 + *  linux/arch/i386/kernel/setup.c
    24.6 + *
    24.7 + *  Copyright (C) 1995  Linus Torvalds
    24.8 + *
    24.9 + *  Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999
   24.10 + *
   24.11 + *  Memory region support
   24.12 + *	David Parsons <orc@pell.chi.il.us>, July-August 1999
   24.13 + *
   24.14 + *  Added E820 sanitization routine (removes overlapping memory regions);
   24.15 + *  Brian Moyle <bmoyle@mvista.com>, February 2001
   24.16 + *
   24.17 + * Moved CPU detection code to cpu/${cpu}.c
   24.18 + *    Patrick Mochel <mochel@osdl.org>, March 2002
   24.19 + *
   24.20 + *  Provisions for empty E820 memory regions (reported by certain BIOSes).
   24.21 + *  Alex Achenbach <xela@slit.de>, December 2002.
   24.22 + *
   24.23 + */
   24.24 +
   24.25 +/*
   24.26 + * This file handles the architecture-dependent parts of initialization
   24.27 + */
   24.28 +
   24.29 +#include <linux/sched.h>
   24.30 +#include <linux/mm.h>
   24.31 +#include <linux/tty.h>
   24.32 +#include <linux/ioport.h>
   24.33 +#include <linux/acpi.h>
   24.34 +#include <linux/apm_bios.h>
   24.35 +#include <linux/initrd.h>
   24.36 +#include <linux/bootmem.h>
   24.37 +#include <linux/seq_file.h>
   24.38 +#include <linux/console.h>
   24.39 +#include <linux/root_dev.h>
   24.40 +#include <linux/highmem.h>
   24.41 +#include <linux/module.h>
   24.42 +#include <linux/efi.h>
   24.43 +#include <linux/init.h>
   24.44 +#include <linux/edd.h>
   24.45 +#include <linux/percpu.h>
   24.46 +#include <video/edid.h>
   24.47 +#include <asm/e820.h>
   24.48 +#include <asm/mpspec.h>
   24.49 +#include <asm/setup.h>
   24.50 +#include <asm/arch_hooks.h>
   24.51 +#include <asm/sections.h>
   24.52 +#include <asm/io_apic.h>
   24.53 +#include <asm/ist.h>
   24.54 +#include <asm/io.h>
   24.55 +#include <asm-xen/hypervisor.h>
   24.56 +#include "setup_arch_pre.h"
   24.57 +#include <bios_ebda.h>
   24.58 +
   24.59 +/* Allows setting of maximum possible memory size  */
   24.60 +static unsigned long xen_override_max_pfn;
   24.61 +
   24.62 +int disable_pse __initdata = 0;
   24.63 +
   24.64 +/*
   24.65 + * Machine setup..
   24.66 + */
   24.67 +
   24.68 +#ifdef CONFIG_EFI
   24.69 +int efi_enabled = 0;
   24.70 +EXPORT_SYMBOL(efi_enabled);
   24.71 +#endif
   24.72 +
   24.73 +/* cpu data as detected by the assembly code in head.S */
   24.74 +struct cpuinfo_x86 new_cpu_data __initdata = { 0, 0, 0, 0, -1, 0, 1, 0, -1 };
   24.75 +/* common cpu data for all cpus */
   24.76 +struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 0, 1, 0, -1 };
   24.77 +
   24.78 +unsigned long mmu_cr4_features;
   24.79 +EXPORT_SYMBOL_GPL(mmu_cr4_features);
   24.80 +
   24.81 +#ifdef	CONFIG_ACPI_INTERPRETER
   24.82 +	int acpi_disabled = 0;
   24.83 +#else
   24.84 +	int acpi_disabled = 1;
   24.85 +#endif
   24.86 +EXPORT_SYMBOL(acpi_disabled);
   24.87 +
   24.88 +#ifdef	CONFIG_ACPI_BOOT
   24.89 +int __initdata acpi_force = 0;
   24.90 +extern acpi_interrupt_flags	acpi_sci_flags;
   24.91 +#endif
   24.92 +
   24.93 +int MCA_bus;
   24.94 +/* for MCA, but anyone else can use it if they want */
   24.95 +unsigned int machine_id;
   24.96 +unsigned int machine_submodel_id;
   24.97 +unsigned int BIOS_revision;
   24.98 +unsigned int mca_pentium_flag;
   24.99 +
  24.100 +/* For PCI or other memory-mapped resources */
  24.101 +unsigned long pci_mem_start = 0x10000000;
  24.102 +
  24.103 +/* user-defined highmem size */
  24.104 +static unsigned int highmem_pages = -1;
  24.105 +
  24.106 +/*
  24.107 + * Setup options
  24.108 + */
  24.109 +struct drive_info_struct { char dummy[32]; } drive_info;
  24.110 +struct screen_info screen_info;
  24.111 +struct apm_info apm_info;
  24.112 +struct sys_desc_table_struct {
  24.113 +	unsigned short length;
  24.114 +	unsigned char table[0];
  24.115 +};
  24.116 +struct edid_info edid_info;
  24.117 +struct ist_info ist_info;
  24.118 +struct e820map e820;
  24.119 +
  24.120 +unsigned char aux_device_present;
  24.121 +
  24.122 +extern void early_cpu_init(void);
  24.123 +extern void dmi_scan_machine(void);
  24.124 +extern void generic_apic_probe(char *);
  24.125 +extern int root_mountflags;
  24.126 +
  24.127 +unsigned long saved_videomode;
  24.128 +
  24.129 +#define RAMDISK_IMAGE_START_MASK  	0x07FF
  24.130 +#define RAMDISK_PROMPT_FLAG		0x8000
  24.131 +#define RAMDISK_LOAD_FLAG		0x4000	
  24.132 +
  24.133 +static char command_line[COMMAND_LINE_SIZE];
  24.134 +
  24.135 +unsigned char __initdata boot_params[PARAM_SIZE];
  24.136 +
  24.137 +static struct resource data_resource = {
  24.138 +	.name	= "Kernel data",
  24.139 +	.start	= 0,
  24.140 +	.end	= 0,
  24.141 +	.flags	= IORESOURCE_BUSY | IORESOURCE_MEM
  24.142 +};
  24.143 +
  24.144 +static struct resource code_resource = {
  24.145 +	.name	= "Kernel code",
  24.146 +	.start	= 0,
  24.147 +	.end	= 0,
  24.148 +	.flags	= IORESOURCE_BUSY | IORESOURCE_MEM
  24.149 +};
  24.150 +
  24.151 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  24.152 +static struct resource system_rom_resource = {
  24.153 +	.name	= "System ROM",
  24.154 +	.start	= 0xf0000,
  24.155 +	.end	= 0xfffff,
  24.156 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  24.157 +};
  24.158 +
  24.159 +static struct resource extension_rom_resource = {
  24.160 +	.name	= "Extension ROM",
  24.161 +	.start	= 0xe0000,
  24.162 +	.end	= 0xeffff,
  24.163 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  24.164 +};
  24.165 +
  24.166 +static struct resource adapter_rom_resources[] = { {
  24.167 +	.name 	= "Adapter ROM",
  24.168 +	.start	= 0xc8000,
  24.169 +	.end	= 0,
  24.170 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  24.171 +}, {
  24.172 +	.name 	= "Adapter ROM",
  24.173 +	.start	= 0,
  24.174 +	.end	= 0,
  24.175 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  24.176 +}, {
  24.177 +	.name 	= "Adapter ROM",
  24.178 +	.start	= 0,
  24.179 +	.end	= 0,
  24.180 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  24.181 +}, {
  24.182 +	.name 	= "Adapter ROM",
  24.183 +	.start	= 0,
  24.184 +	.end	= 0,
  24.185 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  24.186 +}, {
  24.187 +	.name 	= "Adapter ROM",
  24.188 +	.start	= 0,
  24.189 +	.end	= 0,
  24.190 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  24.191 +}, {
  24.192 +	.name 	= "Adapter ROM",
  24.193 +	.start	= 0,
  24.194 +	.end	= 0,
  24.195 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  24.196 +} };
  24.197 +
  24.198 +#define ADAPTER_ROM_RESOURCES \
  24.199 +	(sizeof adapter_rom_resources / sizeof adapter_rom_resources[0])
  24.200 +
  24.201 +static struct resource video_rom_resource = {
  24.202 +	.name 	= "Video ROM",
  24.203 +	.start	= 0xc0000,
  24.204 +	.end	= 0xc7fff,
  24.205 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  24.206 +};
  24.207 +#endif
  24.208 +
  24.209 +static struct resource video_ram_resource = {
  24.210 +	.name	= "Video RAM area",
  24.211 +	.start	= 0xa0000,
  24.212 +	.end	= 0xbffff,
  24.213 +	.flags	= IORESOURCE_BUSY | IORESOURCE_MEM
  24.214 +};
  24.215 +
  24.216 +static struct resource standard_io_resources[] = { {
  24.217 +	.name	= "dma1",
  24.218 +	.start	= 0x0000,
  24.219 +	.end	= 0x001f,
  24.220 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  24.221 +}, {
  24.222 +	.name	= "pic1",
  24.223 +	.start	= 0x0020,
  24.224 +	.end	= 0x0021,
  24.225 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  24.226 +}, {
  24.227 +	.name   = "timer0",
  24.228 +	.start	= 0x0040,
  24.229 +	.end    = 0x0043,
  24.230 +	.flags  = IORESOURCE_BUSY | IORESOURCE_IO
  24.231 +}, {
  24.232 +	.name   = "timer1",
  24.233 +	.start  = 0x0050,
  24.234 +	.end    = 0x0053,
  24.235 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  24.236 +}, {
  24.237 +	.name	= "keyboard",
  24.238 +	.start	= 0x0060,
  24.239 +	.end	= 0x006f,
  24.240 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  24.241 +}, {
  24.242 +	.name	= "dma page reg",
  24.243 +	.start	= 0x0080,
  24.244 +	.end	= 0x008f,
  24.245 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  24.246 +}, {
  24.247 +	.name	= "pic2",
  24.248 +	.start	= 0x00a0,
  24.249 +	.end	= 0x00a1,
  24.250 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  24.251 +}, {
  24.252 +	.name	= "dma2",
  24.253 +	.start	= 0x00c0,
  24.254 +	.end	= 0x00df,
  24.255 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  24.256 +}, {
  24.257 +	.name	= "fpu",
  24.258 +	.start	= 0x00f0,
  24.259 +	.end	= 0x00ff,
  24.260 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  24.261 +} };
  24.262 +
  24.263 +#define STANDARD_IO_RESOURCES \
  24.264 +	(sizeof standard_io_resources / sizeof standard_io_resources[0])
  24.265 +
  24.266 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  24.267 +#define romsignature(x) (*(unsigned short *)(x) == 0xaa55)
  24.268 +
  24.269 +static int __init romchecksum(unsigned char *rom, unsigned long length)
  24.270 +{
  24.271 +	unsigned char *p, sum = 0;
  24.272 +
  24.273 +	for (p = rom; p < rom + length; p++)
  24.274 +		sum += *p;
  24.275 +	return sum == 0;
  24.276 +}
  24.277 +
  24.278 +static void __init probe_roms(void)
  24.279 +{
  24.280 +	unsigned long start, length, upper;
  24.281 +	unsigned char *rom;
  24.282 +	int	      i;
  24.283 +
  24.284 +	/* video rom */
  24.285 +	upper = adapter_rom_resources[0].start;
  24.286 +	for (start = video_rom_resource.start; start < upper; start += 2048) {
  24.287 +		rom = isa_bus_to_virt(start);
  24.288 +		if (!romsignature(rom))
  24.289 +			continue;
  24.290 +
  24.291 +		video_rom_resource.start = start;
  24.292 +
  24.293 +		/* 0 < length <= 0x7f * 512, historically */
  24.294 +		length = rom[2] * 512;
  24.295 +
  24.296 +		/* if checksum okay, trust length byte */
  24.297 +		if (length && romchecksum(rom, length))
  24.298 +			video_rom_resource.end = start + length - 1;
  24.299 +
  24.300 +		request_resource(&iomem_resource, &video_rom_resource);
  24.301 +		break;
  24.302 +	}
  24.303 +
  24.304 +	start = (video_rom_resource.end + 1 + 2047) & ~2047UL;
  24.305 +	if (start < upper)
  24.306 +		start = upper;
  24.307 +
  24.308 +	/* system rom */
  24.309 +	request_resource(&iomem_resource, &system_rom_resource);
  24.310 +	upper = system_rom_resource.start;
  24.311 +
  24.312 +	/* check for extension rom (ignore length byte!) */
  24.313 +	rom = isa_bus_to_virt(extension_rom_resource.start);
  24.314 +	if (romsignature(rom)) {
  24.315 +		length = extension_rom_resource.end - extension_rom_resource.start + 1;
  24.316 +		if (romchecksum(rom, length)) {
  24.317 +			request_resource(&iomem_resource, &extension_rom_resource);
  24.318 +			upper = extension_rom_resource.start;
  24.319 +		}
  24.320 +	}
  24.321 +
  24.322 +	/* check for adapter roms on 2k boundaries */
  24.323 +	for (i = 0; i < ADAPTER_ROM_RESOURCES && start < upper; start += 2048) {
  24.324 +		rom = isa_bus_to_virt(start);
  24.325 +		if (!romsignature(rom))
  24.326 +			continue;
  24.327 +
  24.328 +		/* 0 < length <= 0x7f * 512, historically */
  24.329 +		length = rom[2] * 512;
  24.330 +
  24.331 +		/* but accept any length that fits if checksum okay */
  24.332 +		if (!length || start + length > upper || !romchecksum(rom, length))
  24.333 +			continue;
  24.334 +
  24.335 +		adapter_rom_resources[i].start = start;
  24.336 +		adapter_rom_resources[i].end = start + length - 1;
  24.337 +		request_resource(&iomem_resource, &adapter_rom_resources[i]);
  24.338 +
  24.339 +		start = adapter_rom_resources[i++].end & ~2047UL;
  24.340 +	}
  24.341 +}
  24.342 +#endif
  24.343 +
  24.344 +/*
  24.345 + * Point at the empty zero page to start with. We map the real shared_info
  24.346 + * page as soon as fixmap is up and running.
  24.347 + */
  24.348 +shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
  24.349 +EXPORT_SYMBOL(HYPERVISOR_shared_info);
  24.350 +
  24.351 +unsigned long *phys_to_machine_mapping, *pfn_to_mfn_frame_list;
  24.352 +EXPORT_SYMBOL(phys_to_machine_mapping);
  24.353 +
  24.354 +DEFINE_PER_CPU(multicall_entry_t, multicall_list[8]);
  24.355 +DEFINE_PER_CPU(int, nr_multicall_ents);
  24.356 +
  24.357 +/* Raw start-of-day parameters from the hypervisor. */
  24.358 +union xen_start_info_union xen_start_info_union;
  24.359 +
  24.360 +static void __init limit_regions(unsigned long long size)
  24.361 +{
  24.362 +	unsigned long long current_addr = 0;
  24.363 +	int i;
  24.364 +
  24.365 +	if (efi_enabled) {
  24.366 +		for (i = 0; i < memmap.nr_map; i++) {
  24.367 +			current_addr = memmap.map[i].phys_addr +
  24.368 +				       (memmap.map[i].num_pages << 12);
  24.369 +			if (memmap.map[i].type == EFI_CONVENTIONAL_MEMORY) {
  24.370 +				if (current_addr >= size) {
  24.371 +					memmap.map[i].num_pages -=
  24.372 +						(((current_addr-size) + PAGE_SIZE-1) >> PAGE_SHIFT);
  24.373 +					memmap.nr_map = i + 1;
  24.374 +					return;
  24.375 +				}
  24.376 +			}
  24.377 +		}
  24.378 +	}
  24.379 +	for (i = 0; i < e820.nr_map; i++) {
  24.380 +		if (e820.map[i].type == E820_RAM) {
  24.381 +			current_addr = e820.map[i].addr + e820.map[i].size;
  24.382 +			if (current_addr >= size) {
  24.383 +				e820.map[i].size -= current_addr-size;
  24.384 +				e820.nr_map = i + 1;
  24.385 +				return;
  24.386 +			}
  24.387 +		}
  24.388 +	}
  24.389 +}
  24.390 +
  24.391 +static void __init add_memory_region(unsigned long long start,
  24.392 +                                  unsigned long long size, int type)
  24.393 +{
  24.394 +	int x;
  24.395 +
  24.396 +	if (!efi_enabled) {
  24.397 +       		x = e820.nr_map;
  24.398 +
  24.399 +		if (x == E820MAX) {
  24.400 +		    printk(KERN_ERR "Ooops! Too many entries in the memory map!\n");
  24.401 +		    return;
  24.402 +		}
  24.403 +
  24.404 +		e820.map[x].addr = start;
  24.405 +		e820.map[x].size = size;
  24.406 +		e820.map[x].type = type;
  24.407 +		e820.nr_map++;
  24.408 +	}
  24.409 +} /* add_memory_region */
  24.410 +
  24.411 +#define E820_DEBUG	1
  24.412 +
  24.413 +static void __init print_memory_map(char *who)
  24.414 +{
  24.415 +	int i;
  24.416 +
  24.417 +	for (i = 0; i < e820.nr_map; i++) {
  24.418 +		printk(" %s: %016Lx - %016Lx ", who,
  24.419 +			e820.map[i].addr,
  24.420 +			e820.map[i].addr + e820.map[i].size);
  24.421 +		switch (e820.map[i].type) {
  24.422 +		case E820_RAM:	printk("(usable)\n");
  24.423 +				break;
  24.424 +		case E820_RESERVED:
  24.425 +				printk("(reserved)\n");
  24.426 +				break;
  24.427 +		case E820_ACPI:
  24.428 +				printk("(ACPI data)\n");
  24.429 +				break;
  24.430 +		case E820_NVS:
  24.431 +				printk("(ACPI NVS)\n");
  24.432 +				break;
  24.433 +		default:	printk("type %lu\n", e820.map[i].type);
  24.434 +				break;
  24.435 +		}
  24.436 +	}
  24.437 +}
  24.438 +
  24.439 +#if 0
  24.440 +/*
  24.441 + * Sanitize the BIOS e820 map.
  24.442 + *
  24.443 + * Some e820 responses include overlapping entries.  The following 
  24.444 + * replaces the original e820 map with a new one, removing overlaps.
  24.445 + *
  24.446 + */
  24.447 +struct change_member {
  24.448 +	struct e820entry *pbios; /* pointer to original bios entry */
  24.449 +	unsigned long long addr; /* address for this change point */
  24.450 +};
  24.451 +struct change_member change_point_list[2*E820MAX] __initdata;
  24.452 +struct change_member *change_point[2*E820MAX] __initdata;
  24.453 +struct e820entry *overlap_list[E820MAX] __initdata;
  24.454 +struct e820entry new_bios[E820MAX] __initdata;
  24.455 +
  24.456 +static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map)
  24.457 +{
  24.458 +	struct change_member *change_tmp;
  24.459 +	unsigned long current_type, last_type;
  24.460 +	unsigned long long last_addr;
  24.461 +	int chgidx, still_changing;
  24.462 +	int overlap_entries;
  24.463 +	int new_bios_entry;
  24.464 +	int old_nr, new_nr, chg_nr;
  24.465 +	int i;
  24.466 +
  24.467 +	/*
  24.468 +		Visually we're performing the following (1,2,3,4 = memory types)...
  24.469 +
  24.470 +		Sample memory map (w/overlaps):
  24.471 +		   ____22__________________
  24.472 +		   ______________________4_
  24.473 +		   ____1111________________
  24.474 +		   _44_____________________
  24.475 +		   11111111________________
  24.476 +		   ____________________33__
  24.477 +		   ___________44___________
  24.478 +		   __________33333_________
  24.479 +		   ______________22________
  24.480 +		   ___________________2222_
  24.481 +		   _________111111111______
  24.482 +		   _____________________11_
  24.483 +		   _________________4______
  24.484 +
  24.485 +		Sanitized equivalent (no overlap):
  24.486 +		   1_______________________
  24.487 +		   _44_____________________
  24.488 +		   ___1____________________
  24.489 +		   ____22__________________
  24.490 +		   ______11________________
  24.491 +		   _________1______________
  24.492 +		   __________3_____________
  24.493 +		   ___________44___________
  24.494 +		   _____________33_________
  24.495 +		   _______________2________
  24.496 +		   ________________1_______
  24.497 +		   _________________4______
  24.498 +		   ___________________2____
  24.499 +		   ____________________33__
  24.500 +		   ______________________4_
  24.501 +	*/
  24.502 +
  24.503 +	/* if there's only one memory region, don't bother */
  24.504 +	if (*pnr_map < 2)
  24.505 +		return -1;
  24.506 +
  24.507 +	old_nr = *pnr_map;
  24.508 +
  24.509 +	/* bail out if we find any unreasonable addresses in bios map */
  24.510 +	for (i=0; i<old_nr; i++)
  24.511 +		if (biosmap[i].addr + biosmap[i].size < biosmap[i].addr)
  24.512 +			return -1;
  24.513 +
  24.514 +	/* create pointers for initial change-point information (for sorting) */
  24.515 +	for (i=0; i < 2*old_nr; i++)
  24.516 +		change_point[i] = &change_point_list[i];
  24.517 +
  24.518 +	/* record all known change-points (starting and ending addresses),
  24.519 +	   omitting those that are for empty memory regions */
  24.520 +	chgidx = 0;
  24.521 +	for (i=0; i < old_nr; i++)	{
  24.522 +		if (biosmap[i].size != 0) {
  24.523 +			change_point[chgidx]->addr = biosmap[i].addr;
  24.524 +			change_point[chgidx++]->pbios = &biosmap[i];
  24.525 +			change_point[chgidx]->addr = biosmap[i].addr + biosmap[i].size;
  24.526 +			change_point[chgidx++]->pbios = &biosmap[i];
  24.527 +		}
  24.528 +	}
  24.529 +	chg_nr = chgidx;    	/* true number of change-points */
  24.530 +
  24.531 +	/* sort change-point list by memory addresses (low -> high) */
  24.532 +	still_changing = 1;
  24.533 +	while (still_changing)	{
  24.534 +		still_changing = 0;
  24.535 +		for (i=1; i < chg_nr; i++)  {
  24.536 +			/* if <current_addr> > <last_addr>, swap */
  24.537 +			/* or, if current=<start_addr> & last=<end_addr>, swap */
  24.538 +			if ((change_point[i]->addr < change_point[i-1]->addr) ||
  24.539 +				((change_point[i]->addr == change_point[i-1]->addr) &&
  24.540 +				 (change_point[i]->addr == change_point[i]->pbios->addr) &&
  24.541 +				 (change_point[i-1]->addr != change_point[i-1]->pbios->addr))
  24.542 +			   )
  24.543 +			{
  24.544 +				change_tmp = change_point[i];
  24.545 +				change_point[i] = change_point[i-1];
  24.546 +				change_point[i-1] = change_tmp;
  24.547 +				still_changing=1;
  24.548 +			}
  24.549 +		}
  24.550 +	}
  24.551 +
  24.552 +	/* create a new bios memory map, removing overlaps */
  24.553 +	overlap_entries=0;	 /* number of entries in the overlap table */
  24.554 +	new_bios_entry=0;	 /* index for creating new bios map entries */
  24.555 +	last_type = 0;		 /* start with undefined memory type */
  24.556 +	last_addr = 0;		 /* start with 0 as last starting address */
  24.557 +	/* loop through change-points, determining affect on the new bios map */
  24.558 +	for (chgidx=0; chgidx < chg_nr; chgidx++)
  24.559 +	{
  24.560 +		/* keep track of all overlapping bios entries */
  24.561 +		if (change_point[chgidx]->addr == change_point[chgidx]->pbios->addr)
  24.562 +		{
  24.563 +			/* add map entry to overlap list (> 1 entry implies an overlap) */
  24.564 +			overlap_list[overlap_entries++]=change_point[chgidx]->pbios;
  24.565 +		}
  24.566 +		else
  24.567 +		{
  24.568 +			/* remove entry from list (order independent, so swap with last) */
  24.569 +			for (i=0; i<overlap_entries; i++)
  24.570 +			{
  24.571 +				if (overlap_list[i] == change_point[chgidx]->pbios)
  24.572 +					overlap_list[i] = overlap_list[overlap_entries-1];
  24.573 +			}
  24.574 +			overlap_entries--;
  24.575 +		}
  24.576 +		/* if there are overlapping entries, decide which "type" to use */
  24.577 +		/* (larger value takes precedence -- 1=usable, 2,3,4,4+=unusable) */
  24.578 +		current_type = 0;
  24.579 +		for (i=0; i<overlap_entries; i++)
  24.580 +			if (overlap_list[i]->type > current_type)
  24.581 +				current_type = overlap_list[i]->type;
  24.582 +		/* continue building up new bios map based on this information */
  24.583 +		if (current_type != last_type)	{
  24.584 +			if (last_type != 0)	 {
  24.585 +				new_bios[new_bios_entry].size =
  24.586 +					change_point[chgidx]->addr - last_addr;
  24.587 +				/* move forward only if the new size was non-zero */
  24.588 +				if (new_bios[new_bios_entry].size != 0)
  24.589 +					if (++new_bios_entry >= E820MAX)
  24.590 +						break; 	/* no more space left for new bios entries */
  24.591 +			}
  24.592 +			if (current_type != 0)	{
  24.593 +				new_bios[new_bios_entry].addr = change_point[chgidx]->addr;
  24.594 +				new_bios[new_bios_entry].type = current_type;
  24.595 +				last_addr=change_point[chgidx]->addr;
  24.596 +			}
  24.597 +			last_type = current_type;
  24.598 +		}
  24.599 +	}
  24.600 +	new_nr = new_bios_entry;   /* retain count for new bios entries */
  24.601 +
  24.602 +	/* copy new bios mapping into original location */
  24.603 +	memcpy(biosmap, new_bios, new_nr*sizeof(struct e820entry));
  24.604 +	*pnr_map = new_nr;
  24.605 +
  24.606 +	return 0;
  24.607 +}
  24.608 +
  24.609 +/*
  24.610 + * Copy the BIOS e820 map into a safe place.
  24.611 + *
  24.612 + * Sanity-check it while we're at it..
  24.613 + *
  24.614 + * If we're lucky and live on a modern system, the setup code
  24.615 + * will have given us a memory map that we can use to properly
  24.616 + * set up memory.  If we aren't, we'll fake a memory map.
  24.617 + *
  24.618 + * We check to see that the memory map contains at least 2 elements
  24.619 + * before we'll use it, because the detection code in setup.S may
  24.620 + * not be perfect and most every PC known to man has two memory
  24.621 + * regions: one from 0 to 640k, and one from 1mb up.  (The IBM
  24.622 + * thinkpad 560x, for example, does not cooperate with the memory
  24.623 + * detection code.)
  24.624 + */
  24.625 +static int __init copy_e820_map(struct e820entry * biosmap, int nr_map)
  24.626 +{
  24.627 +	/* Only one memory region (or negative)? Ignore it */
  24.628 +	if (nr_map < 2)
  24.629 +		return -1;
  24.630 +
  24.631 +	do {
  24.632 +		unsigned long long start = biosmap->addr;
  24.633 +		unsigned long long size = biosmap->size;
  24.634 +		unsigned long long end = start + size;
  24.635 +		unsigned long type = biosmap->type;
  24.636 +
  24.637 +		/* Overflow in 64 bits? Ignore the memory map. */
  24.638 +		if (start > end)
  24.639 +			return -1;
  24.640 +
  24.641 +		/*
  24.642 +		 * Some BIOSes claim RAM in the 640k - 1M region.
  24.643 +		 * Not right. Fix it up.
  24.644 +		 */
  24.645 +		if (type == E820_RAM) {
  24.646 +			if (start < 0x100000ULL && end > 0xA0000ULL) {
  24.647 +				if (start < 0xA0000ULL)
  24.648 +					add_memory_region(start, 0xA0000ULL-start, type);
  24.649 +				if (end <= 0x100000ULL)
  24.650 +					continue;
  24.651 +				start = 0x100000ULL;
  24.652 +				size = end - start;
  24.653 +			}
  24.654 +		}
  24.655 +		add_memory_region(start, size, type);
  24.656 +	} while (biosmap++,--nr_map);
  24.657 +	return 0;
  24.658 +}
  24.659 +#endif
  24.660 +
  24.661 +#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
  24.662 +struct edd edd;
  24.663 +#ifdef CONFIG_EDD_MODULE
  24.664 +EXPORT_SYMBOL(edd);
  24.665 +#endif
  24.666 +/**
  24.667 + * copy_edd() - Copy the BIOS EDD information
  24.668 + *              from boot_params into a safe place.
  24.669 + *
  24.670 + */
  24.671 +static inline void copy_edd(void)
  24.672 +{
  24.673 +     memcpy(edd.mbr_signature, EDD_MBR_SIGNATURE, sizeof(edd.mbr_signature));
  24.674 +     memcpy(edd.edd_info, EDD_BUF, sizeof(edd.edd_info));
  24.675 +     edd.mbr_signature_nr = EDD_MBR_SIG_NR;
  24.676 +     edd.edd_info_nr = EDD_NR;
  24.677 +}
  24.678 +#else
  24.679 +static inline void copy_edd(void)
  24.680 +{
  24.681 +}
  24.682 +#endif
  24.683 +
  24.684 +/*
  24.685 + * Do NOT EVER look at the BIOS memory size location.
  24.686 + * It does not work on many machines.
  24.687 + */
  24.688 +#define LOWMEMSIZE()	(0x9f000)
  24.689 +
  24.690 +static void __init parse_cmdline_early (char ** cmdline_p)
  24.691 +{
  24.692 +	char c = ' ', *to = command_line, *from = saved_command_line;
  24.693 +	int len = 0;
  24.694 +	int userdef = 0;
  24.695 +
  24.696 +	memcpy(saved_command_line, xen_start_info.cmd_line, MAX_CMDLINE);
  24.697 +	/* Save unparsed command line copy for /proc/cmdline */
  24.698 +	saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
  24.699 +
  24.700 +	for (;;) {
  24.701 +		/*
  24.702 +		 * "mem=nopentium" disables the 4MB page tables.
  24.703 +		 * "mem=XXX[kKmM]" defines a memory region from HIGH_MEM
  24.704 +		 * to <mem>, overriding the bios size.
  24.705 +		 * "memmap=XXX[KkmM]@XXX[KkmM]" defines a memory region from
  24.706 +		 * <start> to <start>+<mem>, overriding the bios size.
  24.707 +		 *
  24.708 +		 * HPA tells me bootloaders need to parse mem=, so no new
  24.709 +		 * option should be mem=  [also see Documentation/i386/boot.txt]
  24.710 +		 */
  24.711 +		if (c == ' ' && !memcmp(from, "mem=", 4)) {
  24.712 +			if (to != command_line)
  24.713 +				to--;
  24.714 +			if (!memcmp(from+4, "nopentium", 9)) {
  24.715 +				from += 9+4;
  24.716 +				clear_bit(X86_FEATURE_PSE, boot_cpu_data.x86_capability);
  24.717 +				disable_pse = 1;
  24.718 +			} else {
  24.719 +				/* If the user specifies memory size, we
  24.720 +				 * limit the BIOS-provided memory map to
  24.721 +				 * that size. exactmap can be used to specify
  24.722 +				 * the exact map. mem=number can be used to
  24.723 +				 * trim the existing memory map.
  24.724 +				 */
  24.725 +				unsigned long long mem_size;
  24.726 + 
  24.727 +				mem_size = memparse(from+4, &from);
  24.728 +#if 0
  24.729 +				limit_regions(mem_size);
  24.730 +				userdef=1;
  24.731 +#else
  24.732 +				xen_override_max_pfn =
  24.733 +					(unsigned long)(mem_size>>PAGE_SHIFT);
  24.734 +#endif
  24.735 +			}
  24.736 +		}
  24.737 +
  24.738 +		if (c == ' ' && !memcmp(from, "memmap=", 7)) {
  24.739 +			if (to != command_line)
  24.740 +				to--;
  24.741 +			if (!memcmp(from+7, "exactmap", 8)) {
  24.742 +				from += 8+7;
  24.743 +				e820.nr_map = 0;
  24.744 +				userdef = 1;
  24.745 +			} else {
  24.746 +				/* If the user specifies memory size, we
  24.747 +				 * limit the BIOS-provided memory map to
  24.748 +				 * that size. exactmap can be used to specify
  24.749 +				 * the exact map. mem=number can be used to
  24.750 +				 * trim the existing memory map.
  24.751 +				 */
  24.752 +				unsigned long long start_at, mem_size;
  24.753 + 
  24.754 +				mem_size = memparse(from+7, &from);
  24.755 +				if (*from == '@') {
  24.756 +					start_at = memparse(from+1, &from);
  24.757 +					add_memory_region(start_at, mem_size, E820_RAM);
  24.758 +				} else if (*from == '#') {
  24.759 +					start_at = memparse(from+1, &from);
  24.760 +					add_memory_region(start_at, mem_size, E820_ACPI);
  24.761 +				} else if (*from == '$') {
  24.762 +					start_at = memparse(from+1, &from);
  24.763 +					add_memory_region(start_at, mem_size, E820_RESERVED);
  24.764 +				} else {
  24.765 +					limit_regions(mem_size);
  24.766 +					userdef=1;
  24.767 +				}
  24.768 +			}
  24.769 +		}
  24.770 +
  24.771 +#ifdef  CONFIG_X86_SMP
  24.772 +		/*
  24.773 +		 * If the BIOS enumerates physical processors before logical,
  24.774 +		 * maxcpus=N at enumeration-time can be used to disable HT.
  24.775 +		 */
  24.776 +		else if (!memcmp(from, "maxcpus=", 8)) {
  24.777 +			extern unsigned int maxcpus;
  24.778 +
  24.779 +			maxcpus = simple_strtoul(from + 8, NULL, 0);
  24.780 +		}
  24.781 +#endif
  24.782 +
  24.783 +#ifdef CONFIG_ACPI_BOOT
  24.784 +		/* "acpi=off" disables both ACPI table parsing and interpreter */
  24.785 +		else if (!memcmp(from, "acpi=off", 8)) {
  24.786 +			disable_acpi();
  24.787 +		}
  24.788 +
  24.789 +		/* acpi=force to over-ride black-list */
  24.790 +		else if (!memcmp(from, "acpi=force", 10)) {
  24.791 +			acpi_force = 1;
  24.792 +			acpi_ht = 1;
  24.793 +			acpi_disabled = 0;
  24.794 +		}
  24.795 +
  24.796 +		/* acpi=strict disables out-of-spec workarounds */
  24.797 +		else if (!memcmp(from, "acpi=strict", 11)) {
  24.798 +			acpi_strict = 1;
  24.799 +		}
  24.800 +
  24.801 +		/* Limit ACPI just to boot-time to enable HT */
  24.802 +		else if (!memcmp(from, "acpi=ht", 7)) {
  24.803 +			if (!acpi_force)
  24.804 +				disable_acpi();
  24.805 +			acpi_ht = 1;
  24.806 +		}
  24.807 +		
  24.808 +		/* "pci=noacpi" disable ACPI IRQ routing and PCI scan */
  24.809 +		else if (!memcmp(from, "pci=noacpi", 10)) {
  24.810 +			acpi_disable_pci();
  24.811 +		}
  24.812 +		/* "acpi=noirq" disables ACPI interrupt routing */
  24.813 +		else if (!memcmp(from, "acpi=noirq", 10)) {
  24.814 +			acpi_noirq_set();
  24.815 +		}
  24.816 +
  24.817 +		else if (!memcmp(from, "acpi_sci=edge", 13))
  24.818 +			acpi_sci_flags.trigger =  1;
  24.819 +
  24.820 +		else if (!memcmp(from, "acpi_sci=level", 14))
  24.821 +			acpi_sci_flags.trigger = 3;
  24.822 +
  24.823 +		else if (!memcmp(from, "acpi_sci=high", 13))
  24.824 +			acpi_sci_flags.polarity = 1;
  24.825 +
  24.826 +		else if (!memcmp(from, "acpi_sci=low", 12))
  24.827 +			acpi_sci_flags.polarity = 3;
  24.828 +
  24.829 +#ifdef CONFIG_X86_IO_APIC
  24.830 +		else if (!memcmp(from, "acpi_skip_timer_override", 24))
  24.831 +			acpi_skip_timer_override = 1;
  24.832 +#endif
  24.833 +
  24.834 +#ifdef CONFIG_X86_LOCAL_APIC
  24.835 +		/* disable IO-APIC */
  24.836 +		else if (!memcmp(from, "noapic", 6))
  24.837 +			disable_ioapic_setup();
  24.838 +#endif /* CONFIG_X86_LOCAL_APIC */
  24.839 +#endif /* CONFIG_ACPI_BOOT */
  24.840 +
  24.841 +		/*
  24.842 +		 * highmem=size forces highmem to be exactly 'size' bytes.
  24.843 +		 * This works even on boxes that have no highmem otherwise.
  24.844 +		 * This also works to reduce highmem size on bigger boxes.
  24.845 +		 */
  24.846 +		if (c == ' ' && !memcmp(from, "highmem=", 8))
  24.847 +			highmem_pages = memparse(from+8, &from) >> PAGE_SHIFT;
  24.848 +	
  24.849 +		/*
  24.850 +		 * vmalloc=size forces the vmalloc area to be exactly 'size'
  24.851 +		 * bytes. This can be used to increase (or decrease) the
  24.852 +		 * vmalloc area - the default is 128m.
  24.853 +		 */
  24.854 +		if (c == ' ' && !memcmp(from, "vmalloc=", 8))
  24.855 +			__VMALLOC_RESERVE = memparse(from+8, &from);
  24.856 +
  24.857 +		c = *(from++);
  24.858 +		if (!c)
  24.859 +			break;
  24.860 +		if (COMMAND_LINE_SIZE <= ++len)
  24.861 +			break;
  24.862 +		*(to++) = c;
  24.863 +	}
  24.864 +	*to = '\0';
  24.865 +	*cmdline_p = command_line;
  24.866 +	if (userdef) {
  24.867 +		printk(KERN_INFO "user-defined physical RAM map:\n");
  24.868 +		print_memory_map("user");
  24.869 +	}
  24.870 +}
  24.871 +
  24.872 +#if 0 /* !XEN */
  24.873 +/*
  24.874 + * Callback for efi_memory_walk.
  24.875 + */
  24.876 +static int __init
  24.877 +efi_find_max_pfn(unsigned long start, unsigned long end, void *arg)
  24.878 +{
  24.879 +	unsigned long *max_pfn = arg, pfn;
  24.880 +
  24.881 +	if (start < end) {
  24.882 +		pfn = PFN_UP(end -1);
  24.883 +		if (pfn > *max_pfn)
  24.884 +			*max_pfn = pfn;
  24.885 +	}
  24.886 +	return 0;
  24.887 +}
  24.888 +
  24.889 +/*
  24.890 + * Find the highest page frame number we have available
  24.891 + */
  24.892 +void __init find_max_pfn(void)
  24.893 +{
  24.894 +	int i;
  24.895 +
  24.896 +	max_pfn = 0;
  24.897 +	if (efi_enabled) {
  24.898 +		efi_memmap_walk(efi_find_max_pfn, &max_pfn);
  24.899 +		return;
  24.900 +	}
  24.901 +
  24.902 +	for (i = 0; i < e820.nr_map; i++) {
  24.903 +		unsigned long start, end;
  24.904 +		/* RAM? */
  24.905 +		if (e820.map[i].type != E820_RAM)
  24.906 +			continue;
  24.907 +		start = PFN_UP(e820.map[i].addr);
  24.908 +		end = PFN_DOWN(e820.map[i].addr + e820.map[i].size);
  24.909 +		if (start >= end)
  24.910 +			continue;
  24.911 +		if (end > max_pfn)
  24.912 +			max_pfn = end;
  24.913 +	}
  24.914 +}
  24.915 +#else
  24.916 +/* We don't use the fake e820 because we need to respond to user override. */
  24.917 +void __init find_max_pfn(void)
  24.918 +{
  24.919 +	if ( xen_override_max_pfn < xen_start_info.nr_pages )
  24.920 +		xen_override_max_pfn = xen_start_info.nr_pages;
  24.921 +	max_pfn = xen_override_max_pfn;
  24.922 +}
  24.923 +#endif /* XEN */
  24.924 +
  24.925 +/*
  24.926 + * Determine low and high memory ranges:
  24.927 + */
  24.928 +unsigned long __init find_max_low_pfn(void)
  24.929 +{
  24.930 +	unsigned long max_low_pfn;
  24.931 +
  24.932 +	max_low_pfn = max_pfn;
  24.933 +	if (max_low_pfn > MAXMEM_PFN) {
  24.934 +		if (highmem_pages == -1)
  24.935 +			highmem_pages = max_pfn - MAXMEM_PFN;
  24.936 +		if (highmem_pages + MAXMEM_PFN < max_pfn)
  24.937 +			max_pfn = MAXMEM_PFN + highmem_pages;
  24.938 +		if (highmem_pages + MAXMEM_PFN > max_pfn) {
  24.939 +			printk("only %luMB highmem pages available, ignoring highmem size of %uMB.\n", pages_to_mb(max_pfn - MAXMEM_PFN), pages_to_mb(highmem_pages));
  24.940 +			highmem_pages = 0;
  24.941 +		}
  24.942 +		max_low_pfn = MAXMEM_PFN;
  24.943 +#ifndef CONFIG_HIGHMEM
  24.944 +		/* Maximum memory usable is what is directly addressable */
  24.945 +		printk(KERN_WARNING "Warning only %ldMB will be used.\n",
  24.946 +					MAXMEM>>20);
  24.947 +		if (max_pfn > MAX_NONPAE_PFN)
  24.948 +			printk(KERN_WARNING "Use a PAE enabled kernel.\n");
  24.949 +		else
  24.950 +			printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");
  24.951 +		max_pfn = MAXMEM_PFN;
  24.952 +#else /* !CONFIG_HIGHMEM */
  24.953 +#ifndef CONFIG_X86_PAE
  24.954 +		if (max_pfn > MAX_NONPAE_PFN) {
  24.955 +			max_pfn = MAX_NONPAE_PFN;
  24.956 +			printk(KERN_WARNING "Warning only 4GB will be used.\n");
  24.957 +			printk(KERN_WARNING "Use a PAE enabled kernel.\n");
  24.958 +		}
  24.959 +#endif /* !CONFIG_X86_PAE */
  24.960 +#endif /* !CONFIG_HIGHMEM */
  24.961 +	} else {
  24.962 +		if (highmem_pages == -1)
  24.963 +			highmem_pages = 0;
  24.964 +#ifdef CONFIG_HIGHMEM
  24.965 +		if (highmem_pages >= max_pfn) {
  24.966 +			printk(KERN_ERR "highmem size specified (%uMB) is bigger than pages available (%luMB)!.\n", pages_to_mb(highmem_pages), pages_to_mb(max_pfn));
  24.967 +			highmem_pages = 0;
  24.968 +		}
  24.969 +		if (highmem_pages) {
  24.970 +			if (max_low_pfn-highmem_pages < 64*1024*1024/PAGE_SIZE){
  24.971 +				printk(KERN_ERR "highmem size %uMB results in smaller than 64MB lowmem, ignoring it.\n", pages_to_mb(highmem_pages));
  24.972 +				highmem_pages = 0;
  24.973 +			}
  24.974 +			max_low_pfn -= highmem_pages;
  24.975 +		}
  24.976 +#else
  24.977 +		if (highmem_pages)
  24.978 +			printk(KERN_ERR "ignoring highmem size on non-highmem kernel!\n");
  24.979 +#endif
  24.980 +	}
  24.981 +	return max_low_pfn;
  24.982 +}
  24.983 +
  24.984 +#ifndef CONFIG_DISCONTIGMEM
  24.985 +
  24.986 +/*
  24.987 + * Free all available memory for boot time allocation.  Used
  24.988 + * as a callback function by efi_memory_walk()
  24.989 + */
  24.990 +
  24.991 +static int __init
  24.992 +free_available_memory(unsigned long start, unsigned long end, void *arg)
  24.993 +{
  24.994 +	/* check max_low_pfn */
  24.995 +	if (start >= ((max_low_pfn + 1) << PAGE_SHIFT))
  24.996 +		return 0;
  24.997 +	if (end >= ((max_low_pfn + 1) << PAGE_SHIFT))
  24.998 +		end = (max_low_pfn + 1) << PAGE_SHIFT;
  24.999 +	if (start < end)
 24.1000 +		free_bootmem(start, end - start);
 24.1001 +
 24.1002 +	return 0;
 24.1003 +}
 24.1004 +/*
 24.1005 + * Register fully available low RAM pages with the bootmem allocator.
 24.1006 + */
 24.1007 +static void __init register_bootmem_low_pages(unsigned long max_low_pfn)
 24.1008 +{
 24.1009 +	int i;
 24.1010 +
 24.1011 +	if (efi_enabled) {
 24.1012 +		efi_memmap_walk(free_available_memory, NULL);
 24.1013 +		return;
 24.1014 +	}
 24.1015 +	for (i = 0; i < e820.nr_map; i++) {
 24.1016 +		unsigned long curr_pfn, last_pfn, size;
 24.1017 +		/*
 24.1018 +		 * Reserve usable low memory
 24.1019 +		 */
 24.1020 +		if (e820.map[i].type != E820_RAM)
 24.1021 +			continue;
 24.1022 +		/*
 24.1023 +		 * We are rounding up the start address of usable memory:
 24.1024 +		 */
 24.1025 +		curr_pfn = PFN_UP(e820.map[i].addr);
 24.1026 +		if (curr_pfn >= max_low_pfn)
 24.1027 +			continue;
 24.1028 +		/*
 24.1029 +		 * ... and at the end of the usable range downwards:
 24.1030 +		 */
 24.1031 +		last_pfn = PFN_DOWN(e820.map[i].addr + e820.map[i].size);
 24.1032 +
 24.1033 +		if (last_pfn > max_low_pfn)
 24.1034 +			last_pfn = max_low_pfn;
 24.1035 +
 24.1036 +		/*
 24.1037 +		 * .. finally, did all the rounding and playing
 24.1038 +		 * around just make the area go away?
 24.1039 +		 */
 24.1040 +		if (last_pfn <= curr_pfn)
 24.1041 +			continue;
 24.1042 +
 24.1043 +		size = last_pfn - curr_pfn;
 24.1044 +		free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(size));
 24.1045 +	}
 24.1046 +}
 24.1047 +
 24.1048 +/*
 24.1049 + * workaround for Dell systems that neglect to reserve EBDA
 24.1050 + */
 24.1051 +static void __init reserve_ebda_region(void)
 24.1052 +{
 24.1053 +	unsigned int addr;
 24.1054 +	addr = get_bios_ebda();
 24.1055 +	if (addr)
 24.1056 +		reserve_bootmem(addr, PAGE_SIZE);	
 24.1057 +}
 24.1058 +
 24.1059 +static unsigned long __init setup_memory(void)
 24.1060 +{
 24.1061 +	unsigned long bootmap_size, start_pfn, max_low_pfn;
 24.1062 +
 24.1063 +	/*
 24.1064 +	 * partially used pages are not usable - thus
 24.1065 +	 * we are rounding upwards:
 24.1066 +	 */
 24.1067 +	start_pfn = PFN_UP(__pa(xen_start_info.pt_base)) + xen_start_info.nr_pt_frames;
 24.1068 +
 24.1069 +	find_max_pfn();
 24.1070 +
 24.1071 +	max_low_pfn = find_max_low_pfn();
 24.1072 +
 24.1073 +#ifdef CONFIG_HIGHMEM
 24.1074 +	highstart_pfn = highend_pfn = max_pfn;
 24.1075 +	if (max_pfn > max_low_pfn) {
 24.1076 +		highstart_pfn = max_low_pfn;
 24.1077 +	}
 24.1078 +	printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
 24.1079 +		pages_to_mb(highend_pfn - highstart_pfn));
 24.1080 +#endif
 24.1081 +	printk(KERN_NOTICE "%ldMB LOWMEM available.\n",
 24.1082 +			pages_to_mb(max_low_pfn));
 24.1083 +	/*
 24.1084 +	 * Initialize the boot-time allocator (with low memory only):
 24.1085 +	 */
 24.1086 +	bootmap_size = init_bootmem(start_pfn, max_low_pfn);
 24.1087 +
 24.1088 +	register_bootmem_low_pages(max_low_pfn);
 24.1089 +
 24.1090 +	/*
 24.1091 +	 * Reserve the bootmem bitmap itself as well. We do this in two
 24.1092 +	 * steps (first step was init_bootmem()) because this catches
 24.1093 +	 * the (very unlikely) case of us accidentally initializing the
 24.1094 +	 * bootmem allocator with an invalid RAM area.
 24.1095 +	 */
 24.1096 +	reserve_bootmem(HIGH_MEMORY, (PFN_PHYS(start_pfn) +
 24.1097 +			 bootmap_size + PAGE_SIZE-1) - (HIGH_MEMORY));
 24.1098 +
 24.1099 +	/* reserve EBDA region, it's a 4K region */
 24.1100 +	reserve_ebda_region();
 24.1101 +
 24.1102 +    /* could be an AMD 768MPX chipset. Reserve a page  before VGA to prevent
 24.1103 +       PCI prefetch into it (errata #56). Usually the page is reserved anyways,
 24.1104 +       unless you have no PS/2 mouse plugged in. */
 24.1105 +	if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
 24.1106 +	    boot_cpu_data.x86 == 6)
 24.1107 +	     reserve_bootmem(0xa0000 - 4096, 4096);
 24.1108 +
 24.1109 +#ifdef CONFIG_SMP
 24.1110 +	/*
 24.1111 +	 * But first pinch a few for the stack/trampoline stuff
 24.1112 +	 * FIXME: Don't need the extra page at 4K, but need to fix
 24.1113 +	 * trampoline before removing it. (see the GDT stuff)
 24.1114 +	 */
 24.1115 +	reserve_bootmem(PAGE_SIZE, PAGE_SIZE);
 24.1116 +#endif
 24.1117 +#ifdef CONFIG_ACPI_SLEEP
 24.1118 +	/*
 24.1119 +	 * Reserve low memory region for sleep support.
 24.1120 +	 */
 24.1121 +	acpi_reserve_bootmem();
 24.1122 +#endif
 24.1123 +#ifdef CONFIG_X86_FIND_SMP_CONFIG
 24.1124 +	/*
 24.1125 +	 * Find and reserve possible boot-time SMP configuration:
 24.1126 +	 */
 24.1127 +	find_smp_config();
 24.1128 +#endif
 24.1129 +
 24.1130 +#ifdef CONFIG_BLK_DEV_INITRD
 24.1131 +	if (xen_start_info.mod_start) {
 24.1132 +		if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
 24.1133 +			/*reserve_bootmem(INITRD_START, INITRD_SIZE);*/
 24.1134 +			initrd_start = INITRD_START + PAGE_OFFSET;
 24.1135 +			initrd_end = initrd_start+INITRD_SIZE;
 24.1136 +			initrd_below_start_ok = 1;
 24.1137 +		}
 24.1138 +		else {
 24.1139 +			printk(KERN_ERR "initrd extends beyond end of memory "
 24.1140 +			    "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
 24.1141 +			    INITRD_START + INITRD_SIZE,
 24.1142 +			    max_low_pfn << PAGE_SHIFT);
 24.1143 +			initrd_start = 0;
 24.1144 +		}
 24.1145 +	}
 24.1146 +#endif
 24.1147 +
 24.1148 +	phys_to_machine_mapping = (unsigned long *)xen_start_info.mfn_list;
 24.1149 +
 24.1150 +	return max_low_pfn;
 24.1151 +}
 24.1152 +#else
 24.1153 +extern unsigned long setup_memory(void);
 24.1154 +#endif /* !CONFIG_DISCONTIGMEM */
 24.1155 +
 24.1156 +/*
 24.1157 + * Request address space for all standard RAM and ROM resources
 24.1158 + * and also for regions reported as reserved by the e820.
 24.1159 + */
 24.1160 +static void __init
 24.1161 +legacy_init_iomem_resources(struct resource *code_resource, struct resource *data_resource)
 24.1162 +{
 24.1163 +	int i;
 24.1164 +
 24.1165 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
 24.1166 +	probe_roms();
 24.1167 +#endif
 24.1168 +	for (i = 0; i < e820.nr_map; i++) {
 24.1169 +		struct resource *res;
 24.1170 +		if (e820.map[i].addr + e820.map[i].size > 0x100000000ULL)
 24.1171 +			continue;
 24.1172 +		res = alloc_bootmem_low(sizeof(struct resource));
 24.1173 +		switch (e820.map[i].type) {
 24.1174 +		case E820_RAM:	res->name = "System RAM"; break;
 24.1175 +		case E820_ACPI:	res->name = "ACPI Tables"; break;
 24.1176 +		case E820_NVS:	res->name = "ACPI Non-volatile Storage"; break;
 24.1177 +		default:	res->name = "reserved";
 24.1178 +		}
 24.1179 +		res->start = e820.map[i].addr;
 24.1180 +		res->end = res->start + e820.map[i].size - 1;
 24.1181 +		res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
 24.1182 +		request_resource(&iomem_resource, res);
 24.1183 +		if (e820.map[i].type == E820_RAM) {
 24.1184 +			/*
 24.1185 +			 *  We don't know which RAM region contains kernel data,
 24.1186 +			 *  so we try it repeatedly and let the resource manager
 24.1187 +			 *  test it.
 24.1188 +			 */
 24.1189 +			request_resource(res, code_resource);
 24.1190 +			request_resource(res, data_resource);
 24.1191 +		}
 24.1192 +	}
 24.1193 +}
 24.1194 +
 24.1195 +/*
 24.1196 + * Request address space for all standard resources
 24.1197 + */
 24.1198 +static void __init register_memory(unsigned long max_low_pfn)
 24.1199 +{
 24.1200 +	unsigned long low_mem_size;
 24.1201 +	int	      i;
 24.1202 +
 24.1203 +	if (efi_enabled)
 24.1204 +		efi_initialize_iomem_resources(&code_resource, &data_resource);
 24.1205 +	else
 24.1206 +		legacy_init_iomem_resources(&code_resource, &data_resource);
 24.1207 +
 24.1208 +	/* EFI systems may still have VGA */
 24.1209 +	request_resource(&iomem_resource, &video_ram_resource);
 24.1210 +
 24.1211 +	/* request I/O space for devices used on all i[345]86 PCs */
 24.1212 +	for (i = 0; i < STANDARD_IO_RESOURCES; i++)
 24.1213 +		request_resource(&ioport_resource, &standard_io_resources[i]);
 24.1214 +
 24.1215 +	/* Tell the PCI layer not to allocate too close to the RAM area.. */
 24.1216 +	low_mem_size = ((max_low_pfn << PAGE_SHIFT) + 0xfffff) & ~0xfffff;
 24.1217 +	if (low_mem_size > pci_mem_start)
 24.1218 +		pci_mem_start = low_mem_size;
 24.1219 +}
 24.1220 +
 24.1221 +/* Use inline assembly to define this because the nops are defined 
 24.1222 +   as inline assembly strings in the include files and we cannot 
 24.1223 +   get them easily into strings. */
 24.1224 +asm("\t.data\nintelnops: " 
 24.1225 +    GENERIC_NOP1 GENERIC_NOP2 GENERIC_NOP3 GENERIC_NOP4 GENERIC_NOP5 GENERIC_NOP6
 24.1226 +    GENERIC_NOP7 GENERIC_NOP8); 
 24.1227 +asm("\t.data\nk8nops: " 
 24.1228 +    K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6
 24.1229 +    K8_NOP7 K8_NOP8); 
 24.1230 +asm("\t.data\nk7nops: " 
 24.1231 +    K7_NOP1 K7_NOP2 K7_NOP3 K7_NOP4 K7_NOP5 K7_NOP6
 24.1232 +    K7_NOP7 K7_NOP8); 
 24.1233 +    
 24.1234 +extern unsigned char intelnops[], k8nops[], k7nops[];
 24.1235 +static unsigned char *intel_nops[ASM_NOP_MAX+1] = { 
 24.1236 +     NULL,
 24.1237 +     intelnops,
 24.1238 +     intelnops + 1,
 24.1239 +     intelnops + 1 + 2,
 24.1240 +     intelnops + 1 + 2 + 3,
 24.1241 +     intelnops + 1 + 2 + 3 + 4,
 24.1242 +     intelnops + 1 + 2 + 3 + 4 + 5,
 24.1243 +     intelnops + 1 + 2 + 3 + 4 + 5 + 6,
 24.1244 +     intelnops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
 24.1245 +}; 
 24.1246 +static unsigned char *k8_nops[ASM_NOP_MAX+1] = { 
 24.1247 +     NULL,
 24.1248 +     k8nops,
 24.1249 +     k8nops + 1,
 24.1250 +     k8nops + 1 + 2,
 24.1251 +     k8nops + 1 + 2 + 3,
 24.1252 +     k8nops + 1 + 2 + 3 + 4,
 24.1253 +     k8nops + 1 + 2 + 3 + 4 + 5,
 24.1254 +     k8nops + 1 + 2 + 3 + 4 + 5 + 6,
 24.1255 +     k8nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
 24.1256 +}; 
 24.1257 +static unsigned char *k7_nops[ASM_NOP_MAX+1] = { 
 24.1258 +     NULL,
 24.1259 +     k7nops,
 24.1260 +     k7nops + 1,
 24.1261 +     k7nops + 1 + 2,
 24.1262 +     k7nops + 1 + 2 + 3,
 24.1263 +     k7nops + 1 + 2 + 3 + 4,
 24.1264 +     k7nops + 1 + 2 + 3 + 4 + 5,
 24.1265 +     k7nops + 1 + 2 + 3 + 4 + 5 + 6,
 24.1266 +     k7nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
 24.1267 +}; 
 24.1268 +static struct nop { 
 24.1269 +     int cpuid; 
 24.1270 +     unsigned char **noptable; 
 24.1271 +} noptypes[] = { 
 24.1272 +     { X86_FEATURE_K8, k8_nops }, 
 24.1273 +     { X86_FEATURE_K7, k7_nops }, 
 24.1274 +     { -1, NULL }
 24.1275 +}; 
 24.1276 +
 24.1277 +/* Replace instructions with better alternatives for this CPU type.
 24.1278 +
 24.1279 +   This runs before SMP is initialized to avoid SMP problems with
 24.1280 +   self modifying code. This implies that assymetric systems where
 24.1281 +   APs have less capabilities than the boot processor are not handled. 
 24.1282 +   In this case boot with "noreplacement". */ 
 24.1283 +void apply_alternatives(void *start, void *end) 
 24.1284 +{ 
 24.1285 +	struct alt_instr *a; 
 24.1286 +	int diff, i, k;
 24.1287 +        unsigned char **noptable = intel_nops; 
 24.1288 +	for (i = 0; noptypes[i].cpuid >= 0; i++) { 
 24.1289 +		if (boot_cpu_has(noptypes[i].cpuid)) { 
 24.1290 +			noptable = noptypes[i].noptable;
 24.1291 +			break;
 24.1292 +		}
 24.1293 +	} 
 24.1294 +	for (a = start; (void *)a < end; a++) { 
 24.1295 +		if (!boot_cpu_has(a->cpuid))
 24.1296 +			continue;
 24.1297 +		BUG_ON(a->replacementlen > a->instrlen); 
 24.1298 +		memcpy(a->instr, a->replacement, a->replacementlen); 
 24.1299 +		diff = a->instrlen - a->replacementlen; 
 24.1300 +		/* Pad the rest with nops */
 24.1301 +		for (i = a->replacementlen; diff > 0; diff -= k, i += k) {
 24.1302 +			k = diff;
 24.1303 +			if (k > ASM_NOP_MAX)
 24.1304 +				k = ASM_NOP_MAX;
 24.1305 +			memcpy(a->instr + i, noptable[k], k); 
 24.1306 +		} 
 24.1307 +	}
 24.1308 +} 
 24.1309 +
 24.1310 +static int no_replacement __initdata = 0; 
 24.1311 + 
 24.1312 +void __init alternative_instructions(void)
 24.1313 +{
 24.1314 +	extern struct alt_instr __alt_instructions[], __alt_instructions_end[];
 24.1315 +	if (no_replacement) 
 24.1316 +		return;
 24.1317 +	apply_alternatives(__alt_instructions, __alt_instructions_end);
 24.1318 +}
 24.1319 +
 24.1320 +static int __init noreplacement_setup(char *s)
 24.1321 +{ 
 24.1322 +     no_replacement = 1; 
 24.1323 +     return 0; 
 24.1324 +} 
 24.1325 +
 24.1326 +__setup("noreplacement", noreplacement_setup); 
 24.1327 +
 24.1328 +static char * __init machine_specific_memory_setup(void);
 24.1329 +
 24.1330 +/*
 24.1331 + * Determine if we were loaded by an EFI loader.  If so, then we have also been
 24.1332 + * passed the efi memmap, systab, etc., so we should use these data structures
 24.1333 + * for initialization.  Note, the efi init code path is determined by the
 24.1334 + * global efi_enabled. This allows the same kernel image to be used on existing
 24.1335 + * systems (with a traditional BIOS) as well as on EFI systems.
 24.1336 + */
 24.1337 +void __init setup_arch(char **cmdline_p)
 24.1338 +{
 24.1339 +        int i,j;
 24.1340 +
 24.1341 +        unsigned long max_low_pfn;
 24.1342 +
 24.1343 +	/* Force a quick death if the kernel panics. */
 24.1344 +	extern int panic_timeout;
 24.1345 +	if ( panic_timeout == 0 )
 24.1346 +		panic_timeout = 1;
 24.1347 +
 24.1348 +	HYPERVISOR_vm_assist(VMASST_CMD_enable,
 24.1349 +			     VMASST_TYPE_4gb_segments);
 24.1350 +
 24.1351 +	memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
 24.1352 +	early_cpu_init();
 24.1353 +
 24.1354 +	/*
 24.1355 +	 * FIXME: This isn't an official loader_type right
 24.1356 +	 * now but does currently work with elilo.
 24.1357 +	 * If we were configured as an EFI kernel, check to make
 24.1358 +	 * sure that we were loaded correctly from elilo and that
 24.1359 +	 * the system table is valid.  If not, then initialize normally.
 24.1360 +	 */
 24.1361 +#ifdef CONFIG_EFI
 24.1362 +	if ((LOADER_TYPE == 0x50) && EFI_SYSTAB)
 24.1363 +		efi_enabled = 1;
 24.1364 +#endif
 24.1365 +
 24.1366 + 	ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); /*old_decode_dev(ORIG_ROOT_DEV);*/
 24.1367 + 	drive_info = DRIVE_INFO;
 24.1368 + 	screen_info = SCREEN_INFO;
 24.1369 +	edid_info = EDID_INFO;
 24.1370 +	apm_info.bios = APM_BIOS_INFO;
 24.1371 +	ist_info = IST_INFO;
 24.1372 +	saved_videomode = VIDEO_MODE;
 24.1373 +	if( SYS_DESC_TABLE.length != 0 ) {
 24.1374 +		MCA_bus = SYS_DESC_TABLE.table[3] &0x2;
 24.1375 +		machine_id = SYS_DESC_TABLE.table[0];
 24.1376 +		machine_submodel_id = SYS_DESC_TABLE.table[1];
 24.1377 +		BIOS_revision = SYS_DESC_TABLE.table[2];
 24.1378 +	}
 24.1379 +	aux_device_present = AUX_DEVICE_INFO;
 24.1380 +
 24.1381 +#ifdef CONFIG_XEN_PHYSDEV_ACCESS
 24.1382 +	/* This is drawn from a dump from vgacon:startup in standard Linux. */
 24.1383 +	screen_info.orig_video_mode = 3; 
 24.1384 +	screen_info.orig_video_isVGA = 1;
 24.1385 +	screen_info.orig_video_lines = 25;
 24.1386 +	screen_info.orig_video_cols = 80;
 24.1387 +	screen_info.orig_video_ega_bx = 3;
 24.1388 +	screen_info.orig_video_points = 16;
 24.1389 +#endif
 24.1390 +
 24.1391 +#ifdef CONFIG_BLK_DEV_RAM
 24.1392 +	rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK;
 24.1393 +	rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0);
 24.1394 +	rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0);
 24.1395 +#endif
 24.1396 +	ARCH_SETUP
 24.1397 +	if (efi_enabled)
 24.1398 +		efi_init();
 24.1399 +	else {
 24.1400 +		printk(KERN_INFO "BIOS-provided physical RAM map:\n");
 24.1401 +		print_memory_map(machine_specific_memory_setup());
 24.1402 +	}
 24.1403 +
 24.1404 +	copy_edd();
 24.1405 +
 24.1406 +	if (!MOUNT_ROOT_RDONLY)
 24.1407 +		root_mountflags &= ~MS_RDONLY;
 24.1408 +	init_mm.start_code = (unsigned long) _text;
 24.1409 +	init_mm.end_code = (unsigned long) _etext;
 24.1410 +	init_mm.end_data = (unsigned long) _edata;
 24.1411 +	init_mm.brk = (PFN_UP(__pa(xen_start_info.pt_base)) + xen_start_info.nr_pt_frames) << PAGE_SHIFT;
 24.1412 +
 24.1413 +	/* XEN: This is nonsense: kernel may not even be contiguous in RAM. */
 24.1414 +	/*code_resource.start = virt_to_phys(_text);*/
 24.1415 +	/*code_resource.end = virt_to_phys(_etext)-1;*/
 24.1416 +	/*data_resource.start = virt_to_phys(_etext);*/
 24.1417 +	/*data_resource.end = virt_to_phys(_edata)-1;*/
 24.1418 +
 24.1419 +	parse_cmdline_early(cmdline_p);
 24.1420 +
 24.1421 +	max_low_pfn = setup_memory();
 24.1422 +
 24.1423 +	/*
 24.1424 +	 * NOTE: before this point _nobody_ is allowed to allocate
 24.1425 +	 * any memory using the bootmem allocator.  Although the
 24.1426 +	 * alloctor is now initialised only the first 8Mb of the kernel
 24.1427 +	 * virtual address space has been mapped.  All allocations before
 24.1428 +	 * paging_init() has completed must use the alloc_bootmem_low_pages()
 24.1429 +	 * variant (which allocates DMA'able memory) and care must be taken
 24.1430 +	 * not to exceed the 8Mb limit.
 24.1431 +	 */
 24.1432 +
 24.1433 +#ifdef CONFIG_SMP
 24.1434 +	smp_alloc_memory(); /* AP processor realmode stacks in low memory*/
 24.1435 +#endif
 24.1436 +	paging_init();
 24.1437 +
 24.1438 +	/* Make sure we have a large enough P->M table. */
 24.1439 +	if (max_pfn > xen_start_info.nr_pages) {
 24.1440 +		phys_to_machine_mapping = alloc_bootmem_low_pages(
 24.1441 +			max_pfn * sizeof(unsigned long));
 24.1442 +		memset(phys_to_machine_mapping, ~0,
 24.1443 +			max_pfn * sizeof(unsigned long));
 24.1444 +		memcpy(phys_to_machine_mapping,
 24.1445 +			(unsigned long *)xen_start_info.mfn_list,
 24.1446 +			xen_start_info.nr_pages * sizeof(unsigned long));
 24.1447 +		free_bootmem(
 24.1448 +			__pa(xen_start_info.mfn_list), 
 24.1449 +			PFN_PHYS(PFN_UP(xen_start_info.nr_pages *
 24.1450 +			sizeof(unsigned long))));
 24.1451 +	}
 24.1452 +
 24.1453 +	pfn_to_mfn_frame_list = alloc_bootmem_low_pages(PAGE_SIZE);
 24.1454 +	for ( i=0, j=0; i < max_pfn; i+=(PAGE_SIZE/sizeof(unsigned long)), j++ )
 24.1455 +	{	
 24.1456 +	     pfn_to_mfn_frame_list[j] = 
 24.1457 +		  virt_to_machine(&phys_to_machine_mapping[i]) >> PAGE_SHIFT;
 24.1458 +	}
 24.1459 +	HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list =
 24.1460 +	     virt_to_machine(pfn_to_mfn_frame_list) >> PAGE_SHIFT;
 24.1461 +
 24.1462 +
 24.1463 +	/*
 24.1464 +	 * NOTE: at this point the bootmem allocator is fully available.
 24.1465 +	 */
 24.1466 +
 24.1467 +#ifdef CONFIG_EARLY_PRINTK
 24.1468 +	{
 24.1469 +		char *s = strstr(*cmdline_p, "earlyprintk=");
 24.1470 +		if (s) {
 24.1471 +			extern void setup_early_printk(char *);
 24.1472 +
 24.1473 +			setup_early_printk(s);
 24.1474 +			printk("early console enabled\n");
 24.1475 +		}
 24.1476 +	}
 24.1477 +#endif
 24.1478 +
 24.1479 +
 24.1480 +	dmi_scan_machine();
 24.1481 +
 24.1482 +#ifdef CONFIG_X86_GENERICARCH
 24.1483 +	generic_apic_probe(*cmdline_p);
 24.1484 +#endif	
 24.1485 +	if (efi_enabled)
 24.1486 +		efi_map_memmap();
 24.1487 +
 24.1488 +	/*
 24.1489 +	 * Parse the ACPI tables for possible boot-time SMP configuration.
 24.1490 +	 */
 24.1491 +	acpi_boot_init();
 24.1492 +
 24.1493 +#ifdef CONFIG_X86_LOCAL_APIC
 24.1494 +	if (smp_found_config)
 24.1495 +		get_smp_config();
 24.1496 +#endif
 24.1497 +
 24.1498 +	register_memory(max_low_pfn);
 24.1499 +
 24.1500 +	/* If we are a privileged guest OS then we should request IO privs. */
 24.1501 +	if (xen_start_info.flags & SIF_PRIVILEGED) {
 24.1502 +		dom0_op_t op;
 24.1503 +		op.cmd           = DOM0_IOPL;
 24.1504 +		op.u.iopl.domain = DOMID_SELF;
 24.1505 +		op.u.iopl.iopl   = 1;
 24.1506 +		if (HYPERVISOR_dom0_op(&op) != 0)
 24.1507 +			panic("Unable to obtain IOPL, despite SIF_PRIVILEGED");
 24.1508 +		current->thread.io_pl = 1;
 24.1509 +	}
 24.1510 +
 24.1511 +	if (xen_start_info.flags & SIF_INITDOMAIN) {
 24.1512 +		if (!(xen_start_info.flags & SIF_PRIVILEGED))
 24.1513 +			panic("Xen granted us console access "
 24.1514 +			      "but not privileged status");
 24.1515 +
 24.1516 +#ifdef CONFIG_VT
 24.1517 +#if defined(CONFIG_VGA_CONSOLE)
 24.1518 +		if (!efi_enabled ||
 24.1519 +		    (efi_mem_type(0xa0000) != EFI_CONVENTIONAL_MEMORY))
 24.1520 +			conswitchp = &vga_con;
 24.1521 +#elif defined(CONFIG_DUMMY_CONSOLE)
 24.1522 +		conswitchp = &dummy_con;
 24.1523 +#endif
 24.1524 +#endif
 24.1525 +	} else {
 24.1526 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
 24.1527 +		extern const struct consw xennull_con;
 24.1528 +		extern int console_use_vt;
 24.1529 +#if defined(CONFIG_VGA_CONSOLE)
 24.1530 +		/* disable VGA driver */
 24.1531 +		ORIG_VIDEO_ISVGA = VIDEO_TYPE_VLFB;
 24.1532 +#endif
 24.1533 +		conswitchp = &xennull_con;
 24.1534 +		console_use_vt = 0;
 24.1535 +#endif
 24.1536 +	}
 24.1537 +}
 24.1538 +
 24.1539 +#include "setup_arch_post.h"
 24.1540 +/*
 24.1541 + * Local Variables:
 24.1542 + * mode:c
 24.1543 + * c-file-style:"k&r"
 24.1544 + * c-basic-offset:8
 24.1545 + * End:
 24.1546 + */
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/signal.c	Mon Dec 27 10:12:02 2004 +0000
    25.3 @@ -0,0 +1,664 @@
    25.4 +/*
    25.5 + *  linux/arch/i386/kernel/signal.c
    25.6 + *
    25.7 + *  Copyright (C) 1991, 1992  Linus Torvalds
    25.8 + *
    25.9 + *  1997-11-28  Modified for POSIX.1b signals by Richard Henderson
   25.10 + *  2000-06-20  Pentium III FXSR, SSE support by Gareth Hughes
   25.11 + */
   25.12 +
   25.13 +#include <linux/sched.h>
   25.14 +#include <linux/mm.h>
   25.15 +#include <linux/smp.h>
   25.16 +#include <linux/smp_lock.h>
   25.17 +#include <linux/kernel.h>
   25.18 +#include <linux/signal.h>
   25.19 +#include <linux/errno.h>
   25.20 +#include <linux/wait.h>
   25.21 +#include <linux/unistd.h>
   25.22 +#include <linux/stddef.h>
   25.23 +#include <linux/personality.h>
   25.24 +#include <linux/suspend.h>
   25.25 +#include <linux/ptrace.h>
   25.26 +#include <linux/elf.h>
   25.27 +#include <asm/processor.h>
   25.28 +#include <asm/ucontext.h>
   25.29 +#include <asm/uaccess.h>
   25.30 +#include <asm/i387.h>
   25.31 +#include "sigframe.h"
   25.32 +
   25.33 +#define DEBUG_SIG 0
   25.34 +
   25.35 +#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
   25.36 +
   25.37 +/*
   25.38 + * Atomically swap in the new signal mask, and wait for a signal.
   25.39 + */
   25.40 +asmlinkage int
   25.41 +sys_sigsuspend(int history0, int history1, old_sigset_t mask)
   25.42 +{
   25.43 +	struct pt_regs * regs = (struct pt_regs *) &history0;
   25.44 +	sigset_t saveset;
   25.45 +
   25.46 +	mask &= _BLOCKABLE;
   25.47 +	spin_lock_irq(&current->sighand->siglock);
   25.48 +	saveset = current->blocked;
   25.49 +	siginitset(&current->blocked, mask);
   25.50 +	recalc_sigpending();
   25.51 +	spin_unlock_irq(&current->sighand->siglock);
   25.52 +
   25.53 +	regs->eax = -EINTR;
   25.54 +	while (1) {
   25.55 +		current->state = TASK_INTERRUPTIBLE;
   25.56 +		schedule();
   25.57 +		if (do_signal(regs, &saveset))
   25.58 +			return -EINTR;
   25.59 +	}
   25.60 +}
   25.61 +
   25.62 +asmlinkage int
   25.63 +sys_rt_sigsuspend(struct pt_regs regs)
   25.64 +{
   25.65 +	sigset_t saveset, newset;
   25.66 +
   25.67 +	/* XXX: Don't preclude handling different sized sigset_t's.  */
   25.68 +	if (regs.ecx != sizeof(sigset_t))
   25.69 +		return -EINVAL;
   25.70 +
   25.71 +	if (copy_from_user(&newset, (sigset_t __user *)regs.ebx, sizeof(newset)))
   25.72 +		return -EFAULT;
   25.73 +	sigdelsetmask(&newset, ~_BLOCKABLE);
   25.74 +
   25.75 +	spin_lock_irq(&current->sighand->siglock);
   25.76 +	saveset = current->blocked;
   25.77 +	current->blocked = newset;
   25.78 +	recalc_sigpending();
   25.79 +	spin_unlock_irq(&current->sighand->siglock);
   25.80 +
   25.81 +	regs.eax = -EINTR;
   25.82 +	while (1) {
   25.83 +		current->state = TASK_INTERRUPTIBLE;
   25.84 +		schedule();
   25.85 +		if (do_signal(&regs, &saveset))
   25.86 +			return -EINTR;
   25.87 +	}
   25.88 +}
   25.89 +
   25.90 +asmlinkage int 
   25.91 +sys_sigaction(int sig, const struct old_sigaction __user *act,
   25.92 +	      struct old_sigaction __user *oact)
   25.93 +{
   25.94 +	struct k_sigaction new_ka, old_ka;
   25.95 +	int ret;
   25.96 +
   25.97 +	if (act) {
   25.98 +		old_sigset_t mask;
   25.99 +		if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
  25.100 +		    __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
  25.101 +		    __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
  25.102 +			return -EFAULT;
  25.103 +		__get_user(new_ka.sa.sa_flags, &act->sa_flags);
  25.104 +		__get_user(mask, &act->sa_mask);
  25.105 +		siginitset(&new_ka.sa.sa_mask, mask);
  25.106 +	}
  25.107 +
  25.108 +	ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
  25.109 +
  25.110 +	if (!ret && oact) {
  25.111 +		if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
  25.112 +		    __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
  25.113 +		    __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
  25.114 +			return -EFAULT;
  25.115 +		__put_user(old_ka.sa.sa_flags, &oact->sa_flags);
  25.116 +		__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
  25.117 +	}
  25.118 +
  25.119 +	return ret;
  25.120 +}
  25.121 +
  25.122 +asmlinkage int
  25.123 +sys_sigaltstack(unsigned long ebx)
  25.124 +{
  25.125 +	/* This is needed to make gcc realize it doesn't own the "struct pt_regs" */
  25.126 +	struct pt_regs *regs = (struct pt_regs *)&ebx;
  25.127 +	const stack_t __user *uss = (const stack_t __user *)ebx;
  25.128 +	stack_t __user *uoss = (stack_t __user *)regs->ecx;
  25.129 +
  25.130 +	return do_sigaltstack(uss, uoss, regs->esp);
  25.131 +}
  25.132 +
  25.133 +
  25.134 +/*
  25.135 + * Do a signal return; undo the signal stack.
  25.136 + */
  25.137 +
  25.138 +static int
  25.139 +restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *peax)
  25.140 +{
  25.141 +	unsigned int err = 0;
  25.142 +
  25.143 +	/* Always make any pending restarted system calls return -EINTR */
  25.144 +	current_thread_info()->restart_block.fn = do_no_restart_syscall;
  25.145 +
  25.146 +#define COPY(x)		err |= __get_user(regs->x, &sc->x)
  25.147 +
  25.148 +#define COPY_SEG(seg)							\
  25.149 +	{ unsigned short tmp;						\
  25.150 +	  err |= __get_user(tmp, &sc->seg);				\
  25.151 +	  regs->x##seg = tmp; }
  25.152 +
  25.153 +#define COPY_SEG_STRICT(seg)						\
  25.154 +	{ unsigned short tmp;						\
  25.155 +	  err |= __get_user(tmp, &sc->seg);				\
  25.156 +	  regs->x##seg = tmp|3; }
  25.157 +
  25.158 +#define GET_SEG(seg)							\
  25.159 +	{ unsigned short tmp;						\
  25.160 +	  err |= __get_user(tmp, &sc->seg);				\
  25.161 +	  loadsegment(seg,tmp); }
  25.162 +
  25.163 +#define	FIX_EFLAGS	(X86_EFLAGS_AC | X86_EFLAGS_OF | X86_EFLAGS_DF | \
  25.164 +			 X86_EFLAGS_TF | X86_EFLAGS_SF | X86_EFLAGS_ZF | \
  25.165 +			 X86_EFLAGS_AF | X86_EFLAGS_PF | X86_EFLAGS_CF)
  25.166 +
  25.167 +	GET_SEG(gs);
  25.168 +	GET_SEG(fs);
  25.169 +	COPY_SEG(es);
  25.170 +	COPY_SEG(ds);
  25.171 +	COPY(edi);
  25.172 +	COPY(esi);
  25.173 +	COPY(ebp);
  25.174 +	COPY(esp);
  25.175 +	COPY(ebx);
  25.176 +	COPY(edx);
  25.177 +	COPY(ecx);
  25.178 +	COPY(eip);
  25.179 +	COPY_SEG_STRICT(cs);
  25.180 +	COPY_SEG_STRICT(ss);
  25.181 +	
  25.182 +	{
  25.183 +		unsigned int tmpflags;
  25.184 +		err |= __get_user(tmpflags, &sc->eflags);
  25.185 +		regs->eflags = (regs->eflags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
  25.186 +		regs->orig_eax = -1;		/* disable syscall checks */
  25.187 +	}
  25.188 +
  25.189 +	{
  25.190 +		struct _fpstate __user * buf;
  25.191 +		err |= __get_user(buf, &sc->fpstate);
  25.192 +		if (buf) {
  25.193 +			if (verify_area(VERIFY_READ, buf, sizeof(*buf)))
  25.194 +				goto badframe;
  25.195 +			err |= restore_i387(buf);
  25.196 +		}
  25.197 +	}
  25.198 +
  25.199 +	err |= __get_user(*peax, &sc->eax);
  25.200 +	return err;
  25.201 +
  25.202 +badframe:
  25.203 +	return 1;
  25.204 +}
  25.205 +
  25.206 +asmlinkage int sys_sigreturn(unsigned long __unused)
  25.207 +{
  25.208 +	struct pt_regs *regs = (struct pt_regs *) &__unused;
  25.209 +	struct sigframe __user *frame = (struct sigframe __user *)(regs->esp - 8);
  25.210 +	sigset_t set;
  25.211 +	int eax;
  25.212 +
  25.213 +	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
  25.214 +		goto badframe;
  25.215 +	if (__get_user(set.sig[0], &frame->sc.oldmask)
  25.216 +	    || (_NSIG_WORDS > 1
  25.217 +		&& __copy_from_user(&set.sig[1], &frame->extramask,
  25.218 +				    sizeof(frame->extramask))))
  25.219 +		goto badframe;
  25.220 +
  25.221 +	sigdelsetmask(&set, ~_BLOCKABLE);
  25.222 +	spin_lock_irq(&current->sighand->siglock);
  25.223 +	current->blocked = set;
  25.224 +	recalc_sigpending();
  25.225 +	spin_unlock_irq(&current->sighand->siglock);
  25.226 +	
  25.227 +	if (restore_sigcontext(regs, &frame->sc, &eax))
  25.228 +		goto badframe;
  25.229 +	return eax;
  25.230 +
  25.231 +badframe:
  25.232 +	force_sig(SIGSEGV, current);
  25.233 +	return 0;
  25.234 +}	
  25.235 +
  25.236 +asmlinkage int sys_rt_sigreturn(unsigned long __unused)
  25.237 +{
  25.238 +	struct pt_regs *regs = (struct pt_regs *) &__unused;
  25.239 +	struct rt_sigframe __user *frame = (struct rt_sigframe __user *)(regs->esp - 4);
  25.240 +	sigset_t set;
  25.241 +	int eax;
  25.242 +
  25.243 +	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
  25.244 +		goto badframe;
  25.245 +	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
  25.246 +		goto badframe;
  25.247 +
  25.248 +	sigdelsetmask(&set, ~_BLOCKABLE);
  25.249 +	spin_lock_irq(&current->sighand->siglock);
  25.250 +	current->blocked = set;
  25.251 +	recalc_sigpending();
  25.252 +	spin_unlock_irq(&current->sighand->siglock);
  25.253 +	
  25.254 +	if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &eax))
  25.255 +		goto badframe;
  25.256 +
  25.257 +	if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->esp) == -EFAULT)
  25.258 +		goto badframe;
  25.259 +
  25.260 +	return eax;
  25.261 +
  25.262 +badframe:
  25.263 +	force_sig(SIGSEGV, current);
  25.264 +	return 0;
  25.265 +}	
  25.266 +
  25.267 +/*
  25.268 + * Set up a signal frame.
  25.269 + */
  25.270 +
  25.271 +static int
  25.272 +setup_sigcontext(struct sigcontext __user *sc, struct _fpstate __user *fpstate,
  25.273 +		 struct pt_regs *regs, unsigned long mask)
  25.274 +{
  25.275 +	int tmp, err = 0;
  25.276 +	unsigned long eflags;
  25.277 +
  25.278 +	tmp = 0;
  25.279 +	__asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp));
  25.280 +	err |= __put_user(tmp, (unsigned int __user *)&sc->gs);
  25.281 +	__asm__("movl %%fs,%0" : "=r"(tmp): "0"(tmp));
  25.282 +	err |= __put_user(tmp, (unsigned int __user *)&sc->fs);
  25.283 +
  25.284 +	err |= __put_user(regs->xes, (unsigned int __user *)&sc->es);
  25.285 +	err |= __put_user(regs->xds, (unsigned int __user *)&sc->ds);
  25.286 +	err |= __put_user(regs->edi, &sc->edi);
  25.287 +	err |= __put_user(regs->esi, &sc->esi);
  25.288 +	err |= __put_user(regs->ebp, &sc->ebp);
  25.289 +	err |= __put_user(regs->esp, &sc->esp);
  25.290 +	err |= __put_user(regs->ebx, &sc->ebx);
  25.291 +	err |= __put_user(regs->edx, &sc->edx);
  25.292 +	err |= __put_user(regs->ecx, &sc->ecx);
  25.293 +	err |= __put_user(regs->eax, &sc->eax);
  25.294 +	err |= __put_user(current->thread.trap_no, &sc->trapno);
  25.295 +	err |= __put_user(current->thread.error_code, &sc->err);
  25.296 +	err |= __put_user(regs->eip, &sc->eip);
  25.297 +	err |= __put_user(regs->xcs, (unsigned int __user *)&sc->cs);
  25.298 +
  25.299 +	/*
  25.300 +	 * Iff TF was set because the program is being single-stepped by a
  25.301 +	 * debugger, don't save that information on the signal stack.. We
  25.302 +	 * don't want debugging to change state.
  25.303 +	 */
  25.304 +	eflags = regs->eflags;
  25.305 +	if (current->ptrace & PT_DTRACE)
  25.306 +		eflags &= ~TF_MASK;
  25.307 +	err |= __put_user(eflags, &sc->eflags);
  25.308 +	err |= __put_user(regs->esp, &sc->esp_at_signal);
  25.309 +	err |= __put_user(regs->xss, (unsigned int __user *)&sc->ss);
  25.310 +
  25.311 +	tmp = save_i387(fpstate);
  25.312 +	if (tmp < 0)
  25.313 +	  err = 1;
  25.314 +	else
  25.315 +	  err |= __put_user(tmp ? fpstate : NULL, &sc->fpstate);
  25.316 +
  25.317 +	/* non-iBCS2 extensions.. */
  25.318 +	err |= __put_user(mask, &sc->oldmask);
  25.319 +	err |= __put_user(current->thread.cr2, &sc->cr2);
  25.320 +
  25.321 +	return err;
  25.322 +}
  25.323 +
  25.324 +/*
  25.325 + * Determine which stack to use..
  25.326 + */
  25.327 +static inline void __user *
  25.328 +get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
  25.329 +{
  25.330 +	unsigned long esp;
  25.331 +
  25.332 +	/* Default to using normal stack */
  25.333 +	esp = regs->esp;
  25.334 +
  25.335 +	/* This is the X/Open sanctioned signal stack switching.  */
  25.336 +	if (ka->sa.sa_flags & SA_ONSTACK) {
  25.337 +		if (sas_ss_flags(esp) == 0)
  25.338 +			esp = current->sas_ss_sp + current->sas_ss_size;
  25.339 +	}
  25.340 +
  25.341 +	/* This is the legacy signal stack switching. */
  25.342 +	else if ((regs->xss & 0xffff) != __USER_DS &&
  25.343 +		 !(ka->sa.sa_flags & SA_RESTORER) &&
  25.344 +		 ka->sa.sa_restorer) {
  25.345 +		esp = (unsigned long) ka->sa.sa_restorer;
  25.346 +	}
  25.347 +
  25.348 +	return (void __user *)((esp - frame_size) & -8ul);
  25.349 +}
  25.350 +
  25.351 +/* These symbols are defined with the addresses in the vsyscall page.
  25.352 +   See vsyscall-sigreturn.S.  */
  25.353 +extern void __user __kernel_sigreturn;
  25.354 +extern void __user __kernel_rt_sigreturn;
  25.355 +
  25.356 +static void setup_frame(int sig, struct k_sigaction *ka,
  25.357 +			sigset_t *set, struct pt_regs * regs)
  25.358 +{
  25.359 +	void __user *restorer;
  25.360 +	struct sigframe __user *frame;
  25.361 +	int err = 0;
  25.362 +	int usig;
  25.363 +
  25.364 +	frame = get_sigframe(ka, regs, sizeof(*frame));
  25.365 +
  25.366 +	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
  25.367 +		goto give_sigsegv;
  25.368 +
  25.369 +	usig = current_thread_info()->exec_domain
  25.370 +		&& current_thread_info()->exec_domain->signal_invmap
  25.371 +		&& sig < 32
  25.372 +		? current_thread_info()->exec_domain->signal_invmap[sig]
  25.373 +		: sig;
  25.374 +
  25.375 +	err |= __put_user(usig, &frame->sig);
  25.376 +	if (err)
  25.377 +		goto give_sigsegv;
  25.378 +
  25.379 +	err |= setup_sigcontext(&frame->sc, &frame->fpstate, regs, set->sig[0]);
  25.380 +	if (err)
  25.381 +		goto give_sigsegv;
  25.382 +
  25.383 +	if (_NSIG_WORDS > 1) {
  25.384 +		err |= __copy_to_user(&frame->extramask, &set->sig[1],
  25.385 +				      sizeof(frame->extramask));
  25.386 +	}
  25.387 +	if (err)
  25.388 +		goto give_sigsegv;
  25.389 +
  25.390 +	restorer = &__kernel_sigreturn;
  25.391 +	if (ka->sa.sa_flags & SA_RESTORER)
  25.392 +		restorer = ka->sa.sa_restorer;
  25.393 +
  25.394 +	/* Set up to return from userspace.  */
  25.395 +	err |= __put_user(restorer, &frame->pretcode);
  25.396 +	 
  25.397 +	/*
  25.398 +	 * This is popl %eax ; movl $,%eax ; int $0x80
  25.399 +	 *
  25.400 +	 * WE DO NOT USE IT ANY MORE! It's only left here for historical
  25.401 +	 * reasons and because gdb uses it as a signature to notice
  25.402 +	 * signal handler stack frames.
  25.403 +	 */
  25.404 +	err |= __put_user(0xb858, (short __user *)(frame->retcode+0));
  25.405 +	err |= __put_user(__NR_sigreturn, (int __user *)(frame->retcode+2));
  25.406 +	err |= __put_user(0x80cd, (short __user *)(frame->retcode+6));
  25.407 +
  25.408 +	if (err)
  25.409 +		goto give_sigsegv;
  25.410 +
  25.411 +	/* Set up registers for signal handler */
  25.412 +	regs->esp = (unsigned long) frame;
  25.413 +	regs->eip = (unsigned long) ka->sa.sa_handler;
  25.414 +	regs->eax = (unsigned long) sig;
  25.415 +	regs->edx = (unsigned long) 0;
  25.416 +	regs->ecx = (unsigned long) 0;
  25.417 +
  25.418 +	set_fs(USER_DS);
  25.419 +	regs->xds = __USER_DS;
  25.420 +	regs->xes = __USER_DS;
  25.421 +	regs->xss = __USER_DS;
  25.422 +	regs->xcs = __USER_CS;
  25.423 +
  25.424 +	/*
  25.425 +	 * Clear TF when entering the signal handler, but
  25.426 +	 * notify any tracer that was single-stepping it.
  25.427 +	 * The tracer may want to single-step inside the
  25.428 +	 * handler too.
  25.429 +	 */
  25.430 +	if (regs->eflags & TF_MASK) {
  25.431 +		regs->eflags &= ~TF_MASK;
  25.432 +		if (current->ptrace & PT_DTRACE)
  25.433 +			ptrace_notify(SIGTRAP);
  25.434 +	}
  25.435 +
  25.436 +#if DEBUG_SIG
  25.437 +	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
  25.438 +		current->comm, current->pid, frame, regs->eip, frame->pretcode);
  25.439 +#endif
  25.440 +
  25.441 +	return;
  25.442 +
  25.443 +give_sigsegv:
  25.444 +	force_sigsegv(sig, current);
  25.445 +}
  25.446 +
  25.447 +static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
  25.448 +			   sigset_t *set, struct pt_regs * regs)
  25.449 +{
  25.450 +	void __user *restorer;
  25.451 +	struct rt_sigframe __user *frame;
  25.452 +	int err = 0;
  25.453 +	int usig;
  25.454 +
  25.455 +	frame = get_sigframe(ka, regs, sizeof(*frame));
  25.456 +
  25.457 +	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
  25.458 +		goto give_sigsegv;
  25.459 +
  25.460 +	usig = current_thread_info()->exec_domain
  25.461 +		&& current_thread_info()->exec_domain->signal_invmap
  25.462 +		&& sig < 32
  25.463 +		? current_thread_info()->exec_domain->signal_invmap[sig]
  25.464 +		: sig;
  25.465 +
  25.466 +	err |= __put_user(usig, &frame->sig);
  25.467 +	err |= __put_user(&frame->info, &frame->pinfo);
  25.468 +	err |= __put_user(&frame->uc, &frame->puc);
  25.469 +	err |= copy_siginfo_to_user(&frame->info, info);
  25.470 +	if (err)
  25.471 +		goto give_sigsegv;
  25.472 +
  25.473 +	/* Create the ucontext.  */
  25.474 +	err |= __put_user(0, &frame->uc.uc_flags);
  25.475 +	err |= __put_user(0, &frame->uc.uc_link);
  25.476 +	err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
  25.477 +	err |= __put_user(sas_ss_flags(regs->esp),
  25.478 +			  &frame->uc.uc_stack.ss_flags);
  25.479 +	err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
  25.480 +	err |= setup_sigcontext(&frame->uc.uc_mcontext, &frame->fpstate,
  25.481 +			        regs, set->sig[0]);
  25.482 +	err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
  25.483 +	if (err)
  25.484 +		goto give_sigsegv;
  25.485 +
  25.486 +	/* Set up to return from userspace.  */
  25.487 +	restorer = &__kernel_rt_sigreturn;
  25.488 +	if (ka->sa.sa_flags & SA_RESTORER)
  25.489 +		restorer = ka->sa.sa_restorer;
  25.490 +	err |= __put_user(restorer, &frame->pretcode);
  25.491 +	 
  25.492 +	/*
  25.493 +	 * This is movl $,%eax ; int $0x80
  25.494 +	 *
  25.495 +	 * WE DO NOT USE IT ANY MORE! It's only left here for historical
  25.496 +	 * reasons and because gdb uses it as a signature to notice
  25.497 +	 * signal handler stack frames.
  25.498 +	 */
  25.499 +	err |= __put_user(0xb8, (char __user *)(frame->retcode+0));
  25.500 +	err |= __put_user(__NR_rt_sigreturn, (int __user *)(frame->retcode+1));
  25.501 +	err |= __put_user(0x80cd, (short __user *)(frame->retcode+5));
  25.502 +
  25.503 +	if (err)
  25.504 +		goto give_sigsegv;
  25.505 +
  25.506 +	/* Set up registers for signal handler */
  25.507 +	regs->esp = (unsigned long) frame;
  25.508 +	regs->eip = (unsigned long) ka->sa.sa_handler;
  25.509 +	regs->eax = (unsigned long) usig;
  25.510 +	regs->edx = (unsigned long) &frame->info;
  25.511 +	regs->ecx = (unsigned long) &frame->uc;
  25.512 +
  25.513 +	set_fs(USER_DS);
  25.514 +	regs->xds = __USER_DS;
  25.515 +	regs->xes = __USER_DS;
  25.516 +	regs->xss = __USER_DS;
  25.517 +	regs->xcs = __USER_CS;
  25.518 +
  25.519 +	/*
  25.520 +	 * Clear TF when entering the signal handler, but
  25.521 +	 * notify any tracer that was single-stepping it.
  25.522 +	 * The tracer may want to single-step inside the
  25.523 +	 * handler too.
  25.524 +	 */
  25.525 +	if (regs->eflags & TF_MASK) {
  25.526 +		regs->eflags &= ~TF_MASK;
  25.527 +		if (current->ptrace & PT_DTRACE)
  25.528 +			ptrace_notify(SIGTRAP);
  25.529 +	}
  25.530 +
  25.531 +#if DEBUG_SIG
  25.532 +	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
  25.533 +		current->comm, current->pid, frame, regs->eip, frame->pretcode);
  25.534 +#endif
  25.535 +
  25.536 +	return;
  25.537 +
  25.538 +give_sigsegv:
  25.539 +	force_sigsegv(sig, current);
  25.540 +}
  25.541 +
  25.542 +/*
  25.543 + * OK, we're invoking a handler
  25.544 + */	
  25.545 +
  25.546 +static void
  25.547 +handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
  25.548 +	      sigset_t *oldset,	struct pt_regs * regs)
  25.549 +{
  25.550 +	/* Are we from a system call? */
  25.551 +	if (regs->orig_eax >= 0) {
  25.552 +		/* If so, check system call restarting.. */
  25.553 +		switch (regs->eax) {
  25.554 +		        case -ERESTART_RESTARTBLOCK:
  25.555 +			case -ERESTARTNOHAND:
  25.556 +				regs->eax = -EINTR;
  25.557 +				break;
  25.558 +
  25.559 +			case -ERESTARTSYS:
  25.560 +				if (!(ka->sa.sa_flags & SA_RESTART)) {
  25.561 +					regs->eax = -EINTR;
  25.562 +					break;
  25.563 +				}
  25.564 +			/* fallthrough */
  25.565 +			case -ERESTARTNOINTR:
  25.566 +				regs->eax = regs->orig_eax;
  25.567 +				regs->eip -= 2;
  25.568 +		}
  25.569 +	}
  25.570 +
  25.571 +	/* Set up the stack frame */
  25.572 +	if (ka->sa.sa_flags & SA_SIGINFO)
  25.573 +		setup_rt_frame(sig, ka, info, oldset, regs);
  25.574 +	else
  25.575 +		setup_frame(sig, ka, oldset, regs);
  25.576 +
  25.577 +	if (!(ka->sa.sa_flags & SA_NODEFER)) {
  25.578 +		spin_lock_irq(&current->sighand->siglock);
  25.579 +		sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
  25.580 +		sigaddset(&current->blocked,sig);
  25.581 +		recalc_sigpending();
  25.582 +		spin_unlock_irq(&current->sighand->siglock);
  25.583 +	}
  25.584 +}
  25.585 +
  25.586 +/*
  25.587 + * Note that 'init' is a special process: it doesn't get signals it doesn't
  25.588 + * want to handle. Thus you cannot kill init even with a SIGKILL even by
  25.589 + * mistake.
  25.590 + */
  25.591 +int fastcall do_signal(struct pt_regs *regs, sigset_t *oldset)
  25.592 +{
  25.593 +	siginfo_t info;
  25.594 +	int signr;
  25.595 +	struct k_sigaction ka;
  25.596 +
  25.597 +	/*
  25.598 +	 * We want the common case to go fast, which
  25.599 +	 * is why we may in certain cases get here from
  25.600 +	 * kernel mode. Just return without doing anything
  25.601 +	 * if so.
  25.602 +	 */
  25.603 +	if ((regs->xcs & 2) != 2)
  25.604 +		return 1;
  25.605 +
  25.606 +	if (current->flags & PF_FREEZE) {
  25.607 +		refrigerator(0);
  25.608 +		goto no_signal;
  25.609 +	}
  25.610 +
  25.611 +	if (!oldset)
  25.612 +		oldset = &current->blocked;
  25.613 +
  25.614 +	signr = get_signal_to_deliver(&info, &ka, regs, NULL);
  25.615 +	if (signr > 0) {
  25.616 +		/* Reenable any watchpoints before delivering the
  25.617 +		 * signal to user space. The processor register will
  25.618 +		 * have been cleared if the watchpoint triggered
  25.619 +		 * inside the kernel.
  25.620 +		 */
  25.621 +		if (unlikely(current->thread.debugreg[7])) {
  25.622 +			HYPERVISOR_set_debugreg(7,
  25.623 +						current->thread.debugreg[7]);
  25.624 +		}
  25.625 +
  25.626 +		/* Whee!  Actually deliver the signal.  */
  25.627 +		handle_signal(signr, &info, &ka, oldset, regs);
  25.628 +		return 1;
  25.629 +	}
  25.630 +
  25.631 + no_signal:
  25.632 +	/* Did we come from a system call? */
  25.633 +	if (regs->orig_eax >= 0) {
  25.634 +		/* Restart the system call - no handlers present */
  25.635 +		if (regs->eax == -ERESTARTNOHAND ||
  25.636 +		    regs->eax == -ERESTARTSYS ||
  25.637 +		    regs->eax == -ERESTARTNOINTR) {
  25.638 +			regs->eax = regs->orig_eax;
  25.639 +			regs->eip -= 2;
  25.640 +		}
  25.641 +		if (regs->eax == -ERESTART_RESTARTBLOCK){
  25.642 +			regs->eax = __NR_restart_syscall;
  25.643 +			regs->eip -= 2;
  25.644 +		}
  25.645 +	}
  25.646 +	return 0;
  25.647 +}
  25.648 +
  25.649 +/*
  25.650 + * notification of userspace execution resumption
  25.651 + * - triggered by current->work.notify_resume
  25.652 + */
  25.653 +__attribute__((regparm(3)))
  25.654 +void do_notify_resume(struct pt_regs *regs, sigset_t *oldset,
  25.655 +		      __u32 thread_info_flags)
  25.656 +{
  25.657 +	/* Pending single-step? */
  25.658 +	if (thread_info_flags & _TIF_SINGLESTEP) {
  25.659 +		regs->eflags |= TF_MASK;
  25.660 +		clear_thread_flag(TIF_SINGLESTEP);
  25.661 +	}
  25.662 +	/* deal with pending signal delivery */
  25.663 +	if (thread_info_flags & _TIF_SIGPENDING)
  25.664 +		do_signal(regs,oldset);
  25.665 +	
  25.666 +	clear_thread_flag(TIF_IRET);
  25.667 +}
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/i386/kernel/time.c	Mon Dec 27 10:12:02 2004 +0000
    26.3 @@ -0,0 +1,811 @@
    26.4 +/*
    26.5 + *  linux/arch/i386/kernel/time.c
    26.6 + *
    26.7 + *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
    26.8 + *
    26.9 + * This file contains the PC-specific time handling details:
   26.10 + * reading the RTC at bootup, etc..
   26.11 + * 1994-07-02    Alan Modra
   26.12 + *	fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime
   26.13 + * 1995-03-26    Markus Kuhn
   26.14 + *      fixed 500 ms bug at call to set_rtc_mmss, fixed DS12887
   26.15 + *      precision CMOS clock update
   26.16 + * 1996-05-03    Ingo Molnar
   26.17 + *      fixed time warps in do_[slow|fast]_gettimeoffset()
   26.18 + * 1997-09-10	Updated NTP code according to technical memorandum Jan '96
   26.19 + *		"A Kernel Model for Precision Timekeeping" by Dave Mills
   26.20 + * 1998-09-05    (Various)
   26.21 + *	More robust do_fast_gettimeoffset() algorithm implemented
   26.22 + *	(works with APM, Cyrix 6x86MX and Centaur C6),
   26.23 + *	monotonic gettimeofday() with fast_get_timeoffset(),
   26.24 + *	drift-proof precision TSC calibration on boot
   26.25 + *	(C. Scott Ananian <cananian@alumni.princeton.edu>, Andrew D.
   26.26 + *	Balsa <andrebalsa@altern.org>, Philip Gladstone <philip@raptor.com>;
   26.27 + *	ported from 2.0.35 Jumbo-9 by Michael Krause <m.krause@tu-harburg.de>).
   26.28 + * 1998-12-16    Andrea Arcangeli
   26.29 + *	Fixed Jumbo-9 code in 2.1.131: do_gettimeofday was missing 1 jiffy
   26.30 + *	because was not accounting lost_ticks.
   26.31 + * 1998-12-24 Copyright (C) 1998  Andrea Arcangeli
   26.32 + *	Fixed a xtime SMP race (we need the xtime_lock rw spinlock to
   26.33 + *	serialize accesses to xtime/lost_ticks).
   26.34 + */
   26.35 +
   26.36 +#include <linux/errno.h>
   26.37 +#include <linux/sched.h>
   26.38 +#include <linux/kernel.h>
   26.39 +#include <linux/param.h>
   26.40 +#include <linux/string.h>
   26.41 +#include <linux/mm.h>
   26.42 +#include <linux/interrupt.h>
   26.43 +#include <linux/time.h>
   26.44 +#include <linux/delay.h>
   26.45 +#include <linux/init.h>
   26.46 +#include <linux/smp.h>
   26.47 +#include <linux/module.h>
   26.48 +#include <linux/sysdev.h>
   26.49 +#include <linux/bcd.h>
   26.50 +#include <linux/efi.h>
   26.51 +#include <linux/sysctl.h>
   26.52 +#include <linux/percpu.h>
   26.53 +
   26.54 +#include <asm/io.h>
   26.55 +#include <asm/smp.h>
   26.56 +#include <asm/irq.h>
   26.57 +#include <asm/msr.h>
   26.58 +#include <asm/delay.h>
   26.59 +#include <asm/mpspec.h>
   26.60 +#include <asm/uaccess.h>
   26.61 +#include <asm/processor.h>
   26.62 +#include <asm/timer.h>
   26.63 +
   26.64 +#include "mach_time.h"
   26.65 +
   26.66 +#include <linux/timex.h>
   26.67 +#include <linux/config.h>
   26.68 +
   26.69 +#include <asm/hpet.h>
   26.70 +
   26.71 +#include <asm/arch_hooks.h>
   26.72 +
   26.73 +#include "io_ports.h"
   26.74 +
   26.75 +extern spinlock_t i8259A_lock;
   26.76 +int pit_latch_buggy;              /* extern */
   26.77 +
   26.78 +u64 jiffies_64 = INITIAL_JIFFIES;
   26.79 +
   26.80 +EXPORT_SYMBOL(jiffies_64);
   26.81 +
   26.82 +unsigned long cpu_khz;	/* Detected as we calibrate the TSC */
   26.83 +
   26.84 +extern unsigned long wall_jiffies;
   26.85 +
   26.86 +spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
   26.87 +
   26.88 +spinlock_t i8253_lock = SPIN_LOCK_UNLOCKED;
   26.89 +EXPORT_SYMBOL(i8253_lock);
   26.90 +
   26.91 +extern struct init_timer_opts __initdata timer_tsc_init;
   26.92 +extern struct timer_opts timer_tsc;
   26.93 +struct timer_opts *cur_timer = &timer_tsc;
   26.94 +
   26.95 +/* These are peridically updated in shared_info, and then copied here. */
   26.96 +u32 shadow_tsc_stamp;
   26.97 +u64 shadow_system_time;
   26.98 +static u32 shadow_time_version;
   26.99 +static struct timeval shadow_tv;
  26.100 +
  26.101 +/*
  26.102 + * We use this to ensure that gettimeofday() is monotonically increasing. We
  26.103 + * only break this guarantee if the wall clock jumps backwards "a long way".
  26.104 + */
  26.105 +static struct timeval last_seen_tv = {0,0};
  26.106 +
  26.107 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  26.108 +/* Periodically propagate synchronised time base to the RTC and to Xen. */
  26.109 +static long last_rtc_update, last_update_to_xen;
  26.110 +#endif
  26.111 +
  26.112 +/* Periodically take synchronised time base from Xen, if we need it. */
  26.113 +static long last_update_from_xen;   /* UTC seconds when last read Xen clock. */
  26.114 +
  26.115 +/* Keep track of last time we did processing/updating of jiffies and xtime. */
  26.116 +u64 processed_system_time;   /* System time (ns) at last processing. */
  26.117 +DEFINE_PER_CPU(u64, processed_system_time);
  26.118 +
  26.119 +#define NS_PER_TICK (1000000000ULL/HZ)
  26.120 +
  26.121 +#define HANDLE_USEC_UNDERFLOW(_tv) do {		\
  26.122 +	while ((_tv).tv_usec < 0) {		\
  26.123 +		(_tv).tv_usec += USEC_PER_SEC;	\
  26.124 +		(_tv).tv_sec--;			\
  26.125 +	}					\
  26.126 +} while (0)
  26.127 +#define HANDLE_USEC_OVERFLOW(_tv) do {		\
  26.128 +	while ((_tv).tv_usec >= USEC_PER_SEC) {	\
  26.129 +		(_tv).tv_usec -= USEC_PER_SEC;	\
  26.130 +		(_tv).tv_sec++;			\
  26.131 +	}					\
  26.132 +} while (0)
  26.133 +static inline void __normalize_time(time_t *sec, s64 *nsec)
  26.134 +{
  26.135 +	while (*nsec >= NSEC_PER_SEC) {
  26.136 +		(*nsec) -= NSEC_PER_SEC;
  26.137 +		(*sec)++;
  26.138 +	}
  26.139 +	while (*nsec < 0) {
  26.140 +		(*nsec) += NSEC_PER_SEC;
  26.141 +		(*sec)--;
  26.142 +	}
  26.143 +}
  26.144 +
  26.145 +/* Does this guest OS track Xen time, or set its wall clock independently? */
  26.146 +static int independent_wallclock = 0;
  26.147 +static int __init __independent_wallclock(char *str)
  26.148 +{
  26.149 +	independent_wallclock = 1;
  26.150 +	return 1;
  26.151 +}
  26.152 +__setup("independent_wallclock", __independent_wallclock);
  26.153 +#define INDEPENDENT_WALLCLOCK() \
  26.154 +    (independent_wallclock || (xen_start_info.flags & SIF_INITDOMAIN))
  26.155 +
  26.156 +/*
  26.157 + * Reads a consistent set of time-base values from Xen, into a shadow data
  26.158 + * area. Must be called with the xtime_lock held for writing.
  26.159 + */
  26.160 +static void __get_time_values_from_xen(void)
  26.161 +{
  26.162 +	shared_info_t *s = HYPERVISOR_shared_info;
  26.163 +
  26.164 +	do {
  26.165 +		shadow_time_version = s->time_version2;
  26.166 +		rmb();
  26.167 +		shadow_tv.tv_sec    = s->wc_sec;
  26.168 +		shadow_tv.tv_usec   = s->wc_usec;
  26.169 +		shadow_tsc_stamp    = (u32)s->tsc_timestamp;
  26.170 +		shadow_system_time  = s->system_time;
  26.171 +		rmb();
  26.172 +	}
  26.173 +	while (shadow_time_version != s->time_version1);
  26.174 +
  26.175 +	cur_timer->mark_offset();
  26.176 +}
  26.177 +
  26.178 +#define TIME_VALUES_UP_TO_DATE \
  26.179 + ({ rmb(); (shadow_time_version == HYPERVISOR_shared_info->time_version2); })
  26.180 +
  26.181 +/*
  26.182 + * This version of gettimeofday has microsecond resolution
  26.183 + * and better than microsecond precision on fast x86 machines with TSC.
  26.184 + */
  26.185 +void do_gettimeofday(struct timeval *tv)
  26.186 +{
  26.187 +	unsigned long seq;
  26.188 +	unsigned long usec, sec;
  26.189 +	unsigned long max_ntp_tick;
  26.190 +	unsigned long flags;
  26.191 +	s64 nsec;
  26.192 +
  26.193 +	do {
  26.194 +		unsigned long lost;
  26.195 +
  26.196 +		seq = read_seqbegin(&xtime_lock);
  26.197 +
  26.198 +		usec = cur_timer->get_offset();
  26.199 +		lost = jiffies - wall_jiffies;
  26.200 +
  26.201 +		/*
  26.202 +		 * If time_adjust is negative then NTP is slowing the clock
  26.203 +		 * so make sure not to go into next possible interval.
  26.204 +		 * Better to lose some accuracy than have time go backwards..
  26.205 +		 */
  26.206 +		if (unlikely(time_adjust < 0)) {
  26.207 +			max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj;
  26.208 +			usec = min(usec, max_ntp_tick);
  26.209 +
  26.210 +			if (lost)
  26.211 +				usec += lost * max_ntp_tick;
  26.212 +		}
  26.213 +		else if (unlikely(lost))
  26.214 +			usec += lost * (USEC_PER_SEC / HZ);
  26.215 +
  26.216 +		sec = xtime.tv_sec;
  26.217 +		usec += (xtime.tv_nsec / NSEC_PER_USEC);
  26.218 +
  26.219 +		nsec = shadow_system_time - processed_system_time;
  26.220 +		__normalize_time(&sec, &nsec);
  26.221 +		usec += (long)nsec / NSEC_PER_USEC;
  26.222 +
  26.223 +		if (unlikely(!TIME_VALUES_UP_TO_DATE)) {
  26.224 +			/*
  26.225 +			 * We may have blocked for a long time,
  26.226 +			 * rendering our calculations invalid
  26.227 +			 * (e.g. the time delta may have
  26.228 +			 * overflowed). Detect that and recalculate
  26.229 +			 * with fresh values.
  26.230 +			 */
  26.231 +			write_seqlock_irqsave(&xtime_lock, flags);
  26.232 +			__get_time_values_from_xen();
  26.233 +			write_sequnlock_irqrestore(&xtime_lock, flags);
  26.234 +			continue;
  26.235 +		}
  26.236 +	} while (read_seqretry(&xtime_lock, seq));
  26.237 +
  26.238 +	while (usec >= USEC_PER_SEC) {
  26.239 +		usec -= USEC_PER_SEC;
  26.240 +		sec++;
  26.241 +	}
  26.242 +
  26.243 +	/* Ensure that time-of-day is monotonically increasing. */
  26.244 +	if ((sec < last_seen_tv.tv_sec) ||
  26.245 +	    ((sec == last_seen_tv.tv_sec) && (usec < last_seen_tv.tv_usec))) {
  26.246 +		sec = last_seen_tv.tv_sec;
  26.247 +		usec = last_seen_tv.tv_usec;
  26.248 +	} else {
  26.249 +		last_seen_tv.tv_sec = sec;
  26.250 +		last_seen_tv.tv_usec = usec;
  26.251 +	}
  26.252 +
  26.253 +	tv->tv_sec = sec;
  26.254 +	tv->tv_usec = usec;
  26.255 +}
  26.256 +
  26.257 +EXPORT_SYMBOL(do_gettimeofday);
  26.258 +
  26.259 +int do_settimeofday(struct timespec *tv)
  26.260 +{
  26.261 +	time_t wtm_sec, sec = tv->tv_sec;
  26.262 +	long wtm_nsec;
  26.263 +	s64 nsec;
  26.264 +	struct timespec xentime;
  26.265 +
  26.266 +	if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
  26.267 +		return -EINVAL;
  26.268 +
  26.269 +	if (!INDEPENDENT_WALLCLOCK())
  26.270 +		return 0; /* Silent failure? */
  26.271 +
  26.272 +	write_seqlock_irq(&xtime_lock);
  26.273 +
  26.274 +	/*
  26.275 +	 * Ensure we don't get blocked for a long time so that our time delta
  26.276 +	 * overflows. If that were to happen then our shadow time values would
  26.277 +	 * be stale, so we can retry with fresh ones.
  26.278 +	 */
  26.279 + again:
  26.280 +	nsec = (s64)tv->tv_nsec -
  26.281 +	    ((s64)cur_timer->get_offset() * (s64)NSEC_PER_USEC);
  26.282 +	if (unlikely(!TIME_VALUES_UP_TO_DATE)) {
  26.283 +		__get_time_values_from_xen();
  26.284 +		goto again;
  26.285 +	}
  26.286 +
  26.287 +	__normalize_time(&sec, &nsec);
  26.288 +	set_normalized_timespec(&xentime, sec, nsec);
  26.289 +
  26.290 +	/*
  26.291 +	 * This is revolting. We need to set "xtime" correctly. However, the
  26.292 +	 * value in this location is the value at the most recent update of
  26.293 +	 * wall time.  Discover what correction gettimeofday() would have
  26.294 +	 * made, and then undo it!
  26.295 +	 */
  26.296 +	nsec -= (jiffies - wall_jiffies) * TICK_NSEC;
  26.297 +
  26.298 +	nsec -= (shadow_system_time - processed_system_time);
  26.299 +
  26.300 +	__normalize_time(&sec, &nsec);
  26.301 +	wtm_sec  = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
  26.302 +	wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
  26.303 +
  26.304 +	set_normalized_timespec(&xtime, sec, nsec);
  26.305 +	set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
  26.306 +
  26.307 +	time_adjust = 0;		/* stop active adjtime() */
  26.308 +	time_status |= STA_UNSYNC;
  26.309 +	time_maxerror = NTP_PHASE_LIMIT;
  26.310 +	time_esterror = NTP_PHASE_LIMIT;
  26.311 +
  26.312 +	/* Reset all our running time counts. They make no sense now. */
  26.313 +	last_seen_tv.tv_sec = 0;
  26.314 +	last_update_from_xen = 0;
  26.315 +
  26.316 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  26.317 +	if (xen_start_info.flags & SIF_INITDOMAIN) {
  26.318 +		dom0_op_t op;
  26.319 +		last_rtc_update = last_update_to_xen = 0;
  26.320 +		op.cmd = DOM0_SETTIME;
  26.321 +		op.u.settime.secs        = xentime.tv_sec;
  26.322 +		op.u.settime.usecs       = xentime.tv_nsec / NSEC_PER_USEC;
  26.323 +		op.u.settime.system_time = shadow_system_time;
  26.324 +		write_sequnlock_irq(&xtime_lock);
  26.325 +		HYPERVISOR_dom0_op(&op);
  26.326 +	} else
  26.327 +#endif
  26.328 +		write_sequnlock_irq(&xtime_lock);
  26.329 +
  26.330 +	clock_was_set();
  26.331 +	return 0;
  26.332 +}
  26.333 +
  26.334 +EXPORT_SYMBOL(do_settimeofday);
  26.335 +
  26.336 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  26.337 +static int set_rtc_mmss(unsigned long nowtime)
  26.338 +{
  26.339 +	int retval;
  26.340 +
  26.341 +	/* gets recalled with irq locally disabled */
  26.342 +	spin_lock(&rtc_lock);
  26.343 +	if (efi_enabled)
  26.344 +		retval = efi_set_rtc_mmss(nowtime);
  26.345 +	else
  26.346 +		retval = mach_set_rtc_mmss(nowtime);
  26.347 +	spin_unlock(&rtc_lock);
  26.348 +
  26.349 +	return retval;
  26.350 +}
  26.351 +#endif
  26.352 +
  26.353 +/* monotonic_clock(): returns # of nanoseconds passed since time_init()
  26.354 + *		Note: This function is required to return accurate
  26.355 + *		time even in the absence of multiple timer ticks.
  26.356 + */
  26.357 +unsigned long long monotonic_clock(void)
  26.358 +{
  26.359 +	return cur_timer->monotonic_clock();
  26.360 +}
  26.361 +EXPORT_SYMBOL(monotonic_clock);
  26.362 +
  26.363 +#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER)
  26.364 +unsigned long profile_pc(struct pt_regs *regs)
  26.365 +{
  26.366 +	unsigned long pc = instruction_pointer(regs);
  26.367 +
  26.368 +	if (in_lock_functions(pc))
  26.369 +		return *(unsigned long *)(regs->ebp + 4);
  26.370 +
  26.371 +	return pc;
  26.372 +}
  26.373 +EXPORT_SYMBOL(profile_pc);
  26.374 +#endif
  26.375 +
  26.376 +/*
  26.377 + * timer_interrupt() needs to keep up the real-time clock,
  26.378 + * as well as call the "do_timer()" routine every clocktick
  26.379 + */
  26.380 +static inline void do_timer_interrupt(int irq, void *dev_id,
  26.381 +					struct pt_regs *regs)
  26.382 +{
  26.383 +	time_t wtm_sec, sec;
  26.384 +	s64 delta, nsec;
  26.385 +	long sec_diff, wtm_nsec;
  26.386 +
  26.387 +	do {
  26.388 +		__get_time_values_from_xen();
  26.389 +
  26.390 +		delta = (s64)(shadow_system_time +
  26.391 +			      ((s64)cur_timer->get_offset() * 
  26.392 +			       (s64)NSEC_PER_USEC) -
  26.393 +			      processed_system_time);
  26.394 +	}
  26.395 +	while (!TIME_VALUES_UP_TO_DATE);
  26.396 +