ia64/xen-unstable

changeset 5731:56a63f9f378f

Manual merge.
author kaf24@firebug.cl.cam.ac.uk
date Mon Jul 11 14:44:08 2005 +0000 (2005-07-11)
parents 22541999d8bb ba925b4aef28
children b3cfebba3b30
files buildconfigs/Rules.mk buildconfigs/mk.linux-2.4-xenU buildconfigs/mk.linux-2.6-xen0 buildconfigs/mk.linux-2.6-xenU linux-2.4-xen-sparse/Makefile linux-2.4-xen-sparse/arch/xen/Makefile linux-2.4-xen-sparse/arch/xen/boot/Makefile linux-2.4-xen-sparse/arch/xen/config.in linux-2.4-xen-sparse/arch/xen/defconfig-xen0 linux-2.4-xen-sparse/arch/xen/defconfig-xenU linux-2.4-xen-sparse/arch/xen/drivers/balloon/Makefile linux-2.4-xen-sparse/arch/xen/drivers/blkif/Makefile linux-2.4-xen-sparse/arch/xen/drivers/blkif/backend/Makefile linux-2.4-xen-sparse/arch/xen/drivers/blkif/frontend/Makefile linux-2.4-xen-sparse/arch/xen/drivers/blkif/frontend/common.h linux-2.4-xen-sparse/arch/xen/drivers/blkif/frontend/vbd.c linux-2.4-xen-sparse/arch/xen/drivers/console/Makefile linux-2.4-xen-sparse/arch/xen/drivers/dom0/Makefile linux-2.4-xen-sparse/arch/xen/drivers/evtchn/Makefile linux-2.4-xen-sparse/arch/xen/drivers/netif/Makefile linux-2.4-xen-sparse/arch/xen/drivers/netif/backend/Makefile linux-2.4-xen-sparse/arch/xen/drivers/netif/frontend/Makefile linux-2.4-xen-sparse/arch/xen/kernel/Makefile linux-2.4-xen-sparse/arch/xen/kernel/entry.S linux-2.4-xen-sparse/arch/xen/kernel/head.S linux-2.4-xen-sparse/arch/xen/kernel/i386_ksyms.c linux-2.4-xen-sparse/arch/xen/kernel/irq.c linux-2.4-xen-sparse/arch/xen/kernel/ldt.c linux-2.4-xen-sparse/arch/xen/kernel/pci-pc.c linux-2.4-xen-sparse/arch/xen/kernel/process.c linux-2.4-xen-sparse/arch/xen/kernel/setup.c linux-2.4-xen-sparse/arch/xen/kernel/signal.c linux-2.4-xen-sparse/arch/xen/kernel/time.c linux-2.4-xen-sparse/arch/xen/kernel/traps.c linux-2.4-xen-sparse/arch/xen/lib/Makefile linux-2.4-xen-sparse/arch/xen/lib/delay.c linux-2.4-xen-sparse/arch/xen/mm/Makefile linux-2.4-xen-sparse/arch/xen/mm/fault.c linux-2.4-xen-sparse/arch/xen/mm/init.c linux-2.4-xen-sparse/arch/xen/mm/ioremap.c linux-2.4-xen-sparse/arch/xen/vmlinux.lds linux-2.4-xen-sparse/drivers/block/ll_rw_blk.c linux-2.4-xen-sparse/drivers/char/Makefile linux-2.4-xen-sparse/drivers/char/mem.c linux-2.4-xen-sparse/drivers/char/tty_io.c linux-2.4-xen-sparse/drivers/scsi/aic7xxx/Makefile linux-2.4-xen-sparse/include/asm-xen/bugs.h linux-2.4-xen-sparse/include/asm-xen/desc.h linux-2.4-xen-sparse/include/asm-xen/fixmap.h linux-2.4-xen-sparse/include/asm-xen/highmem.h linux-2.4-xen-sparse/include/asm-xen/hw_irq.h linux-2.4-xen-sparse/include/asm-xen/io.h linux-2.4-xen-sparse/include/asm-xen/irq.h linux-2.4-xen-sparse/include/asm-xen/keyboard.h linux-2.4-xen-sparse/include/asm-xen/mmu_context.h linux-2.4-xen-sparse/include/asm-xen/module.h linux-2.4-xen-sparse/include/asm-xen/page.h linux-2.4-xen-sparse/include/asm-xen/pci.h linux-2.4-xen-sparse/include/asm-xen/pgalloc.h linux-2.4-xen-sparse/include/asm-xen/pgtable-2level.h linux-2.4-xen-sparse/include/asm-xen/pgtable.h linux-2.4-xen-sparse/include/asm-xen/processor.h linux-2.4-xen-sparse/include/asm-xen/queues.h linux-2.4-xen-sparse/include/asm-xen/segment.h linux-2.4-xen-sparse/include/asm-xen/smp.h linux-2.4-xen-sparse/include/asm-xen/system.h linux-2.4-xen-sparse/include/asm-xen/vga.h linux-2.4-xen-sparse/include/asm-xen/xor.h linux-2.4-xen-sparse/include/linux/blk.h linux-2.4-xen-sparse/include/linux/highmem.h linux-2.4-xen-sparse/include/linux/irq.h linux-2.4-xen-sparse/include/linux/mm.h linux-2.4-xen-sparse/include/linux/sched.h linux-2.4-xen-sparse/include/linux/skbuff.h linux-2.4-xen-sparse/include/linux/timer.h linux-2.4-xen-sparse/kernel/time.c linux-2.4-xen-sparse/kernel/timer.c linux-2.4-xen-sparse/mkbuildtree linux-2.4-xen-sparse/mm/highmem.c linux-2.4-xen-sparse/mm/memory.c linux-2.4-xen-sparse/mm/mprotect.c linux-2.4-xen-sparse/mm/mremap.c linux-2.4-xen-sparse/mm/page_alloc.c linux-2.4-xen-sparse/net/core/skbuff.c linux-2.4.30-xen-sparse/Makefile linux-2.4.30-xen-sparse/arch/xen/Makefile linux-2.4.30-xen-sparse/arch/xen/boot/Makefile linux-2.4.30-xen-sparse/arch/xen/config.in linux-2.4.30-xen-sparse/arch/xen/defconfig-xen0 linux-2.4.30-xen-sparse/arch/xen/defconfig-xenU linux-2.4.30-xen-sparse/arch/xen/drivers/balloon/Makefile linux-2.4.30-xen-sparse/arch/xen/drivers/blkif/Makefile linux-2.4.30-xen-sparse/arch/xen/drivers/blkif/backend/Makefile linux-2.4.30-xen-sparse/arch/xen/drivers/blkif/frontend/Makefile linux-2.4.30-xen-sparse/arch/xen/drivers/blkif/frontend/common.h linux-2.4.30-xen-sparse/arch/xen/drivers/blkif/frontend/vbd.c linux-2.4.30-xen-sparse/arch/xen/drivers/console/Makefile linux-2.4.30-xen-sparse/arch/xen/drivers/dom0/Makefile linux-2.4.30-xen-sparse/arch/xen/drivers/evtchn/Makefile linux-2.4.30-xen-sparse/arch/xen/drivers/netif/Makefile linux-2.4.30-xen-sparse/arch/xen/drivers/netif/backend/Makefile linux-2.4.30-xen-sparse/arch/xen/drivers/netif/frontend/Makefile linux-2.4.30-xen-sparse/arch/xen/kernel/Makefile linux-2.4.30-xen-sparse/arch/xen/kernel/entry.S linux-2.4.30-xen-sparse/arch/xen/kernel/head.S linux-2.4.30-xen-sparse/arch/xen/kernel/i386_ksyms.c linux-2.4.30-xen-sparse/arch/xen/kernel/irq.c linux-2.4.30-xen-sparse/arch/xen/kernel/ldt.c linux-2.4.30-xen-sparse/arch/xen/kernel/pci-pc.c linux-2.4.30-xen-sparse/arch/xen/kernel/process.c linux-2.4.30-xen-sparse/arch/xen/kernel/setup.c linux-2.4.30-xen-sparse/arch/xen/kernel/signal.c linux-2.4.30-xen-sparse/arch/xen/kernel/time.c linux-2.4.30-xen-sparse/arch/xen/kernel/traps.c linux-2.4.30-xen-sparse/arch/xen/lib/Makefile linux-2.4.30-xen-sparse/arch/xen/lib/delay.c linux-2.4.30-xen-sparse/arch/xen/mm/Makefile linux-2.4.30-xen-sparse/arch/xen/mm/fault.c linux-2.4.30-xen-sparse/arch/xen/mm/init.c linux-2.4.30-xen-sparse/arch/xen/mm/ioremap.c linux-2.4.30-xen-sparse/arch/xen/vmlinux.lds linux-2.4.30-xen-sparse/drivers/block/ll_rw_blk.c linux-2.4.30-xen-sparse/drivers/char/Makefile linux-2.4.30-xen-sparse/drivers/char/mem.c linux-2.4.30-xen-sparse/drivers/char/tty_io.c linux-2.4.30-xen-sparse/drivers/scsi/aic7xxx/Makefile linux-2.4.30-xen-sparse/include/asm-xen/bugs.h linux-2.4.30-xen-sparse/include/asm-xen/desc.h linux-2.4.30-xen-sparse/include/asm-xen/fixmap.h linux-2.4.30-xen-sparse/include/asm-xen/highmem.h linux-2.4.30-xen-sparse/include/asm-xen/hw_irq.h linux-2.4.30-xen-sparse/include/asm-xen/io.h linux-2.4.30-xen-sparse/include/asm-xen/irq.h linux-2.4.30-xen-sparse/include/asm-xen/keyboard.h linux-2.4.30-xen-sparse/include/asm-xen/mmu_context.h linux-2.4.30-xen-sparse/include/asm-xen/module.h linux-2.4.30-xen-sparse/include/asm-xen/page.h linux-2.4.30-xen-sparse/include/asm-xen/pci.h linux-2.4.30-xen-sparse/include/asm-xen/pgalloc.h linux-2.4.30-xen-sparse/include/asm-xen/pgtable-2level.h linux-2.4.30-xen-sparse/include/asm-xen/pgtable.h linux-2.4.30-xen-sparse/include/asm-xen/processor.h linux-2.4.30-xen-sparse/include/asm-xen/queues.h linux-2.4.30-xen-sparse/include/asm-xen/segment.h linux-2.4.30-xen-sparse/include/asm-xen/smp.h linux-2.4.30-xen-sparse/include/asm-xen/system.h linux-2.4.30-xen-sparse/include/asm-xen/vga.h linux-2.4.30-xen-sparse/include/asm-xen/xor.h linux-2.4.30-xen-sparse/include/linux/blk.h linux-2.4.30-xen-sparse/include/linux/highmem.h linux-2.4.30-xen-sparse/include/linux/irq.h linux-2.4.30-xen-sparse/include/linux/mm.h linux-2.4.30-xen-sparse/include/linux/sched.h linux-2.4.30-xen-sparse/include/linux/skbuff.h linux-2.4.30-xen-sparse/include/linux/timer.h linux-2.4.30-xen-sparse/kernel/time.c linux-2.4.30-xen-sparse/kernel/timer.c linux-2.4.30-xen-sparse/mkbuildtree linux-2.4.30-xen-sparse/mm/highmem.c linux-2.4.30-xen-sparse/mm/memory.c linux-2.4.30-xen-sparse/mm/mprotect.c linux-2.4.30-xen-sparse/mm/mremap.c linux-2.4.30-xen-sparse/mm/page_alloc.c linux-2.4.30-xen-sparse/net/core/skbuff.c linux-2.6-xen-sparse/arch/xen/Kconfig linux-2.6-xen-sparse/arch/xen/Kconfig.drivers linux-2.6-xen-sparse/arch/xen/Makefile linux-2.6-xen-sparse/arch/xen/boot/Makefile linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32 linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64 linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32 linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64 linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_32 linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_64 linux-2.6-xen-sparse/arch/xen/i386/Kconfig linux-2.6-xen-sparse/arch/xen/i386/Makefile linux-2.6-xen-sparse/arch/xen/i386/kernel/Makefile linux-2.6-xen-sparse/arch/xen/i386/kernel/acpi/Makefile linux-2.6-xen-sparse/arch/xen/i386/kernel/acpi/boot.c linux-2.6-xen-sparse/arch/xen/i386/kernel/apic.c linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/Makefile linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/common.c linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/Makefile linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/main.c linux-2.6-xen-sparse/arch/xen/i386/kernel/entry.S linux-2.6-xen-sparse/arch/xen/i386/kernel/head.S linux-2.6-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c linux-2.6-xen-sparse/arch/xen/i386/kernel/io_apic.c linux-2.6-xen-sparse/arch/xen/i386/kernel/ioport.c linux-2.6-xen-sparse/arch/xen/i386/kernel/irq.c linux-2.6-xen-sparse/arch/xen/i386/kernel/ldt.c linux-2.6-xen-sparse/arch/xen/i386/kernel/microcode.c linux-2.6-xen-sparse/arch/xen/i386/kernel/mpparse.c linux-2.6-xen-sparse/arch/xen/i386/kernel/pci-dma.c linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c linux-2.6-xen-sparse/arch/xen/i386/kernel/signal.c linux-2.6-xen-sparse/arch/xen/i386/kernel/smp.c linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c linux-2.6-xen-sparse/arch/xen/i386/kernel/timers/Makefile linux-2.6-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c linux-2.6-xen-sparse/arch/xen/i386/kernel/traps.c linux-2.6-xen-sparse/arch/xen/i386/kernel/vsyscall.S linux-2.6-xen-sparse/arch/xen/i386/mach-default/Makefile linux-2.6-xen-sparse/arch/xen/i386/mm/Makefile linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c linux-2.6-xen-sparse/arch/xen/i386/mm/highmem.c linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c linux-2.6-xen-sparse/arch/xen/i386/mm/init.c linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c linux-2.6-xen-sparse/arch/xen/i386/pci/Makefile linux-2.6-xen-sparse/arch/xen/i386/pci/irq.c linux-2.6-xen-sparse/arch/xen/kernel/Makefile linux-2.6-xen-sparse/arch/xen/kernel/ctrl_if.c linux-2.6-xen-sparse/arch/xen/kernel/devmem.c linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c linux-2.6-xen-sparse/arch/xen/kernel/fixup.c linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c linux-2.6-xen-sparse/arch/xen/kernel/reboot.c linux-2.6-xen-sparse/arch/xen/kernel/skbuff.c linux-2.6-xen-sparse/arch/xen/kernel/smp.c linux-2.6-xen-sparse/arch/xen/kernel/xen_proc.c linux-2.6-xen-sparse/arch/xen/x86_64/Kconfig linux-2.6-xen-sparse/arch/xen/x86_64/Makefile linux-2.6-xen-sparse/arch/xen/x86_64/ia32/Makefile linux-2.6-xen-sparse/arch/xen/x86_64/ia32/ia32entry.S linux-2.6-xen-sparse/arch/xen/x86_64/ia32/syscall32.c linux-2.6-xen-sparse/arch/xen/x86_64/ia32/vsyscall-int80.S linux-2.6-xen-sparse/arch/xen/x86_64/kernel/Makefile linux-2.6-xen-sparse/arch/xen/x86_64/kernel/acpi/Makefile linux-2.6-xen-sparse/arch/xen/x86_64/kernel/apic.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/asm-offsets.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/early_printk.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head.S linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head64.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/init_task.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/io_apic.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/ioport.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/irq.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/ldt.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/mpparse.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/pci-nommu.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/signal.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smp.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/traps.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/vsyscall.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/x8664_ksyms.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/xen_entry.S linux-2.6-xen-sparse/arch/xen/x86_64/mm/Makefile linux-2.6-xen-sparse/arch/xen/x86_64/mm/fault.c linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c linux-2.6-xen-sparse/arch/xen/x86_64/mm/ioremap.c linux-2.6-xen-sparse/arch/xen/x86_64/mm/pageattr.c linux-2.6-xen-sparse/arch/xen/x86_64/pci/Makefile linux-2.6-xen-sparse/arch/xen/x86_64/pci/Makefile-BUS linux-2.6-xen-sparse/drivers/Makefile linux-2.6-xen-sparse/drivers/acpi/tables.c linux-2.6-xen-sparse/drivers/char/mem.c linux-2.6-xen-sparse/drivers/char/tty_io.c linux-2.6-xen-sparse/drivers/xen/Makefile linux-2.6-xen-sparse/drivers/xen/balloon/Makefile linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c linux-2.6-xen-sparse/drivers/xen/blkback/Makefile linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6-xen-sparse/drivers/xen/blkback/common.h linux-2.6-xen-sparse/drivers/xen/blkback/control.c linux-2.6-xen-sparse/drivers/xen/blkback/interface.c linux-2.6-xen-sparse/drivers/xen/blkback/vbd.c linux-2.6-xen-sparse/drivers/xen/blkfront/Kconfig linux-2.6-xen-sparse/drivers/xen/blkfront/Makefile linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6-xen-sparse/drivers/xen/blkfront/block.h linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c linux-2.6-xen-sparse/drivers/xen/blktap/Makefile linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h linux-2.6-xen-sparse/drivers/xen/blktap/blktap_controlmsg.c linux-2.6-xen-sparse/drivers/xen/blktap/blktap_datapath.c linux-2.6-xen-sparse/drivers/xen/blktap/blktap_userdev.c linux-2.6-xen-sparse/drivers/xen/console/Makefile linux-2.6-xen-sparse/drivers/xen/console/console.c linux-2.6-xen-sparse/drivers/xen/evtchn/Makefile linux-2.6-xen-sparse/drivers/xen/evtchn/evtchn.c linux-2.6-xen-sparse/drivers/xen/netback/Makefile linux-2.6-xen-sparse/drivers/xen/netback/common.h linux-2.6-xen-sparse/drivers/xen/netback/control.c linux-2.6-xen-sparse/drivers/xen/netback/interface.c linux-2.6-xen-sparse/drivers/xen/netback/loopback.c linux-2.6-xen-sparse/drivers/xen/netback/netback.c linux-2.6-xen-sparse/drivers/xen/netfront/Kconfig linux-2.6-xen-sparse/drivers/xen/netfront/Makefile linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6-xen-sparse/drivers/xen/privcmd/Makefile linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c linux-2.6-xen-sparse/drivers/xen/usbback/common.h linux-2.6-xen-sparse/drivers/xen/usbback/control.c linux-2.6-xen-sparse/drivers/xen/usbback/interface.c linux-2.6-xen-sparse/drivers/xen/usbback/usbback.c linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront.c linux-2.6-xen-sparse/drivers/xen/usbfront/xhci.h linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.h linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c linux-2.6-xen-sparse/include/asm-generic/pgtable.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/agp.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/desc.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/fixmap.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/floppy.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/highmem.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/io.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/smpboot_hooks.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu_context.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/param.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pci.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgalloc.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/processor.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/ptrace.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/segment.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/setup.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/spinlock.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/system.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/tlbflush.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/vga.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/arch_hooks.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/bootsetup.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/desc.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/dma-mapping.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/floppy.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/io.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/irq.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/io_ports.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/irq_vectors.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/mach_time.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/mach_timer.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/setup_arch_post.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/setup_arch_pre.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/smpboot_hooks.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mmu_context.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/page.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/param.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pci.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pda.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgalloc.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/processor.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/ptrace.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/segment.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/smp.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/system.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/timer.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/tlbflush.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/vga.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/xor.h linux-2.6-xen-sparse/include/asm-xen/balloon.h linux-2.6-xen-sparse/include/asm-xen/ctrl_if.h linux-2.6-xen-sparse/include/asm-xen/evtchn.h linux-2.6-xen-sparse/include/asm-xen/foreign_page.h linux-2.6-xen-sparse/include/asm-xen/gnttab.h linux-2.6-xen-sparse/include/asm-xen/hypervisor.h linux-2.6-xen-sparse/include/asm-xen/linux-public/privcmd.h linux-2.6-xen-sparse/include/asm-xen/linux-public/suspend.h linux-2.6-xen-sparse/include/asm-xen/queues.h linux-2.6-xen-sparse/include/asm-xen/synch_bitops.h linux-2.6-xen-sparse/include/asm-xen/xen_proc.h linux-2.6-xen-sparse/include/asm-xen/xenbus.h linux-2.6-xen-sparse/include/linux/gfp.h linux-2.6-xen-sparse/include/linux/highmem.h linux-2.6-xen-sparse/include/linux/irq.h linux-2.6-xen-sparse/include/linux/mm.h linux-2.6-xen-sparse/include/linux/skbuff.h linux-2.6-xen-sparse/kernel/irq/manage.c linux-2.6-xen-sparse/mkbuildtree linux-2.6-xen-sparse/mm/highmem.c linux-2.6-xen-sparse/mm/memory.c linux-2.6-xen-sparse/mm/mmap.c linux-2.6-xen-sparse/mm/page_alloc.c linux-2.6-xen-sparse/net/core/dev.c linux-2.6-xen-sparse/net/core/skbuff.c linux-2.6.11-xen-sparse/arch/xen/Kconfig linux-2.6.11-xen-sparse/arch/xen/Kconfig.drivers linux-2.6.11-xen-sparse/arch/xen/Makefile linux-2.6.11-xen-sparse/arch/xen/boot/Makefile linux-2.6.11-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32 linux-2.6.11-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64 linux-2.6.11-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32 linux-2.6.11-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64 linux-2.6.11-xen-sparse/arch/xen/configs/xen_defconfig_x86_32 linux-2.6.11-xen-sparse/arch/xen/configs/xen_defconfig_x86_64 linux-2.6.11-xen-sparse/arch/xen/i386/Kconfig linux-2.6.11-xen-sparse/arch/xen/i386/Makefile linux-2.6.11-xen-sparse/arch/xen/i386/kernel/Makefile linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/Makefile linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/apic.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/Makefile linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/common.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/Makefile linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/mtrr/main.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/entry.S linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S linux-2.6.11-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/io_apic.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/ioport.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/irq.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/ldt.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/microcode.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/mpparse.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/pci-dma.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/process.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/signal.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smp.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smpboot.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/timers/Makefile linux-2.6.11-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/traps.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/vsyscall.S linux-2.6.11-xen-sparse/arch/xen/i386/mach-default/Makefile linux-2.6.11-xen-sparse/arch/xen/i386/mm/Makefile linux-2.6.11-xen-sparse/arch/xen/i386/mm/fault.c linux-2.6.11-xen-sparse/arch/xen/i386/mm/highmem.c linux-2.6.11-xen-sparse/arch/xen/i386/mm/hypervisor.c linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c linux-2.6.11-xen-sparse/arch/xen/i386/mm/ioremap.c linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c linux-2.6.11-xen-sparse/arch/xen/i386/pci/Makefile linux-2.6.11-xen-sparse/arch/xen/i386/pci/irq.c linux-2.6.11-xen-sparse/arch/xen/kernel/Makefile linux-2.6.11-xen-sparse/arch/xen/kernel/ctrl_if.c linux-2.6.11-xen-sparse/arch/xen/kernel/devmem.c linux-2.6.11-xen-sparse/arch/xen/kernel/evtchn.c linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c linux-2.6.11-xen-sparse/arch/xen/kernel/skbuff.c linux-2.6.11-xen-sparse/arch/xen/kernel/smp.c linux-2.6.11-xen-sparse/arch/xen/kernel/xen_proc.c linux-2.6.11-xen-sparse/arch/xen/x86_64/Kconfig linux-2.6.11-xen-sparse/arch/xen/x86_64/Makefile linux-2.6.11-xen-sparse/arch/xen/x86_64/ia32/Makefile linux-2.6.11-xen-sparse/arch/xen/x86_64/ia32/ia32entry.S linux-2.6.11-xen-sparse/arch/xen/x86_64/ia32/syscall32.c linux-2.6.11-xen-sparse/arch/xen/x86_64/ia32/vsyscall-int80.S linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/Makefile linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/acpi/Makefile linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/apic.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/asm-offsets.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/e820.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/early_printk.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/entry.S linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/head.S linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/head64.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/init_task.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/io_apic.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/ioport.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/irq.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/ldt.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/mpparse.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/pci-dma.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/pci-nommu.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/process.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup64.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/signal.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/smp.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/smpboot.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/traps.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/vsyscall.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/x8664_ksyms.c linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/xen_entry.S linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/Makefile linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/fault.c linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/ioremap.c linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/pageattr.c linux-2.6.11-xen-sparse/arch/xen/x86_64/pci/Makefile linux-2.6.11-xen-sparse/arch/xen/x86_64/pci/Makefile-BUS linux-2.6.11-xen-sparse/drivers/Makefile linux-2.6.11-xen-sparse/drivers/acpi/tables.c linux-2.6.11-xen-sparse/drivers/char/mem.c linux-2.6.11-xen-sparse/drivers/char/tty_io.c linux-2.6.11-xen-sparse/drivers/xen/Makefile linux-2.6.11-xen-sparse/drivers/xen/balloon/Makefile linux-2.6.11-xen-sparse/drivers/xen/balloon/balloon.c linux-2.6.11-xen-sparse/drivers/xen/blkback/Makefile linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6.11-xen-sparse/drivers/xen/blkback/common.h linux-2.6.11-xen-sparse/drivers/xen/blkback/control.c linux-2.6.11-xen-sparse/drivers/xen/blkback/interface.c linux-2.6.11-xen-sparse/drivers/xen/blkback/vbd.c linux-2.6.11-xen-sparse/drivers/xen/blkfront/Kconfig linux-2.6.11-xen-sparse/drivers/xen/blkfront/Makefile linux-2.6.11-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6.11-xen-sparse/drivers/xen/blkfront/block.h linux-2.6.11-xen-sparse/drivers/xen/blkfront/vbd.c linux-2.6.11-xen-sparse/drivers/xen/blktap/Makefile linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap.c linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap.h linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_controlmsg.c linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_datapath.c linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c linux-2.6.11-xen-sparse/drivers/xen/console/Makefile linux-2.6.11-xen-sparse/drivers/xen/console/console.c linux-2.6.11-xen-sparse/drivers/xen/evtchn/Makefile linux-2.6.11-xen-sparse/drivers/xen/evtchn/evtchn.c linux-2.6.11-xen-sparse/drivers/xen/netback/Makefile linux-2.6.11-xen-sparse/drivers/xen/netback/common.h linux-2.6.11-xen-sparse/drivers/xen/netback/control.c linux-2.6.11-xen-sparse/drivers/xen/netback/interface.c linux-2.6.11-xen-sparse/drivers/xen/netback/loopback.c linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c linux-2.6.11-xen-sparse/drivers/xen/netfront/Kconfig linux-2.6.11-xen-sparse/drivers/xen/netfront/Makefile linux-2.6.11-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6.11-xen-sparse/drivers/xen/privcmd/Makefile linux-2.6.11-xen-sparse/drivers/xen/privcmd/privcmd.c linux-2.6.11-xen-sparse/drivers/xen/usbback/common.h linux-2.6.11-xen-sparse/drivers/xen/usbback/control.c linux-2.6.11-xen-sparse/drivers/xen/usbback/interface.c linux-2.6.11-xen-sparse/drivers/xen/usbback/usbback.c linux-2.6.11-xen-sparse/drivers/xen/usbfront/usbfront.c linux-2.6.11-xen-sparse/drivers/xen/usbfront/xhci.h linux-2.6.11-xen-sparse/drivers/xen/xenbus/Makefile linux-2.6.11-xen-sparse/drivers/xen/xenbus/xenbus_comms.c linux-2.6.11-xen-sparse/drivers/xen/xenbus/xenbus_comms.h linux-2.6.11-xen-sparse/drivers/xen/xenbus/xenbus_probe.c linux-2.6.11-xen-sparse/drivers/xen/xenbus/xenbus_xs.c linux-2.6.11-xen-sparse/include/asm-generic/pgtable.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/agp.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/desc.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/fixmap.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/floppy.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/highmem.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/hypercall.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/io.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/mach-xen/smpboot_hooks.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/mmu.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/mmu_context.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/page.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/param.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/pci.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/pgalloc.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/pgtable.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/processor.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/ptrace.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/segment.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/setup.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/spinlock.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/system.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/tlbflush.h linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/vga.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/arch_hooks.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/bootsetup.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/desc.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/dma-mapping.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/floppy.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/io.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/irq.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/io_ports.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/irq_vectors.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/mach_time.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/mach_timer.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/setup_arch_post.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/setup_arch_pre.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/smpboot_hooks.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/mmu_context.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/page.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/param.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/pci.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/pda.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/pgalloc.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/processor.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/ptrace.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/segment.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/smp.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/system.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/timer.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/tlbflush.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/vga.h linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/xor.h linux-2.6.11-xen-sparse/include/asm-xen/balloon.h linux-2.6.11-xen-sparse/include/asm-xen/ctrl_if.h linux-2.6.11-xen-sparse/include/asm-xen/evtchn.h linux-2.6.11-xen-sparse/include/asm-xen/foreign_page.h linux-2.6.11-xen-sparse/include/asm-xen/gnttab.h linux-2.6.11-xen-sparse/include/asm-xen/hypervisor.h linux-2.6.11-xen-sparse/include/asm-xen/linux-public/privcmd.h linux-2.6.11-xen-sparse/include/asm-xen/linux-public/suspend.h linux-2.6.11-xen-sparse/include/asm-xen/queues.h linux-2.6.11-xen-sparse/include/asm-xen/synch_bitops.h linux-2.6.11-xen-sparse/include/asm-xen/xen_proc.h linux-2.6.11-xen-sparse/include/asm-xen/xenbus.h linux-2.6.11-xen-sparse/include/linux/gfp.h linux-2.6.11-xen-sparse/include/linux/highmem.h linux-2.6.11-xen-sparse/include/linux/irq.h linux-2.6.11-xen-sparse/include/linux/mm.h linux-2.6.11-xen-sparse/include/linux/skbuff.h linux-2.6.11-xen-sparse/kernel/irq/manage.c linux-2.6.11-xen-sparse/mkbuildtree linux-2.6.11-xen-sparse/mm/highmem.c linux-2.6.11-xen-sparse/mm/memory.c linux-2.6.11-xen-sparse/mm/mmap.c linux-2.6.11-xen-sparse/mm/page_alloc.c linux-2.6.11-xen-sparse/net/core/dev.c linux-2.6.11-xen-sparse/net/core/skbuff.c patches/linux-2.6.11/agpgart.patch patches/linux-2.6.11/i386-cpu-hotplug-updated-for-mm.patch patches/linux-2.6.11/iomap.patch patches/linux-2.6.11/linux-2.6.11.12.patch patches/linux-2.6.11/net-csum.patch patches/linux-2.6.11/rcu-nohz.patch patches/linux-2.6.11/smp-alts.patch patches/linux-2.6.11/udp-frag.patch patches/linux-2.6.11/x86_64-linux.patch patches/linux-2.6.12/i386-cpu-hotplug-updated-for-mm.patch patches/linux-2.6.12/net-csum.patch patches/linux-2.6.12/rcu-nohz.patch patches/linux-2.6.12/smp-alts.patch patches/linux-2.6.12/x86_64-linux.patch tools/libxc/xc_vmx_build.c tools/python/xen/xend/image.py xen/arch/x86/shadow32.c xen/arch/x86/shadow_public.c xen/arch/x86/vmx.c xen/arch/x86/vmx_vmcs.c
line diff
    85.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    85.2 +++ b/linux-2.4.30-xen-sparse/Makefile	Mon Jul 11 14:44:08 2005 +0000
    85.3 @@ -0,0 +1,592 @@
    85.4 +VERSION = 2
    85.5 +PATCHLEVEL = 4
    85.6 +SUBLEVEL = 30
    85.7 +EXTRAVERSION =
    85.8 +
    85.9 +KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
   85.10 +
   85.11 +# SUBARCH always tells us the underlying machine architecture.
   85.12 +# Unless overridden, by default ARCH is equivalent to SUBARCH.
   85.13 +# This will be overriden for Xen and UML builds.
   85.14 +SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
   85.15 +ARCH ?= $(SUBARCH)
   85.16 +
   85.17 +## XXX The following hack can be discarded after users have adjusted to the
   85.18 +## architectural name change 'xeno' -> 'xen'.
   85.19 +ifeq ($(ARCH),xeno)
   85.20 +  ARCH := xen
   85.21 +endif
   85.22 +
   85.23 +KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g")
   85.24 +
   85.25 +CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
   85.26 +	  else if [ -x /bin/bash ]; then echo /bin/bash; \
   85.27 +	  else echo sh; fi ; fi)
   85.28 +TOPDIR	:= $(shell /bin/pwd)
   85.29 +
   85.30 +HPATH   	= $(TOPDIR)/include
   85.31 +FINDHPATH	= $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net $(HPATH)/math-emu
   85.32 +
   85.33 +HOSTCC  	= gcc
   85.34 +HOSTCFLAGS	= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
   85.35 +
   85.36 +CROSS_COMPILE 	=
   85.37 +
   85.38 +#
   85.39 +# Include the make variables (CC, etc...)
   85.40 +#
   85.41 +
   85.42 +AS		= $(CROSS_COMPILE)as
   85.43 +LD		= $(CROSS_COMPILE)ld
   85.44 +CC		= $(CROSS_COMPILE)gcc
   85.45 +CPP		= $(CC) -E
   85.46 +AR		= $(CROSS_COMPILE)ar
   85.47 +NM		= $(CROSS_COMPILE)nm
   85.48 +STRIP		= $(CROSS_COMPILE)strip
   85.49 +OBJCOPY		= $(CROSS_COMPILE)objcopy
   85.50 +OBJDUMP		= $(CROSS_COMPILE)objdump
   85.51 +MAKEFILES	= $(TOPDIR)/.config
   85.52 +GENKSYMS	= /sbin/genksyms
   85.53 +DEPMOD		= /sbin/depmod
   85.54 +MODFLAGS	= -DMODULE
   85.55 +CFLAGS_KERNEL	=
   85.56 +PERL		= perl
   85.57 +AWK		= awk
   85.58 +RPM 		:= $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
   85.59 +		    	else echo rpm; fi)
   85.60 +
   85.61 +export	VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
   85.62 +	CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
   85.63 +	CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS MODFLAGS PERL AWK
   85.64 +
   85.65 +all:	do-it-all
   85.66 +
   85.67 +#
   85.68 +# Make "config" the default target if there is no configuration file or
   85.69 +# "depend" the target if there is no top-level dependency information.
   85.70 +#
   85.71 +
   85.72 +ifeq (.config,$(wildcard .config))
   85.73 +include .config
   85.74 +ifeq (.depend,$(wildcard .depend))
   85.75 +include .depend
   85.76 +do-it-all:	Version vmlinux
   85.77 +else
   85.78 +CONFIGURATION = depend
   85.79 +do-it-all:	depend
   85.80 +endif
   85.81 +else
   85.82 +CONFIGURATION = config
   85.83 +do-it-all:	config
   85.84 +endif
   85.85 +
   85.86 +#
   85.87 +# INSTALL_PATH specifies where to place the updated kernel and system map
   85.88 +# images.  Uncomment if you want to place them anywhere other than root.
   85.89 +#
   85.90 +
   85.91 +#export	INSTALL_PATH=/boot
   85.92 +
   85.93 +#
   85.94 +# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
   85.95 +# relocations required by build roots.  This is not defined in the
   85.96 +# makefile but the arguement can be passed to make if needed.
   85.97 +#
   85.98 +
   85.99 +MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
  85.100 +export MODLIB
  85.101 +
  85.102 +#
  85.103 +# standard CFLAGS
  85.104 +#
  85.105 +
  85.106 +CPPFLAGS := -D__KERNEL__ -I$(HPATH)
  85.107 +
  85.108 +CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
  85.109 +	  -fno-strict-aliasing -fno-common
  85.110 +ifndef CONFIG_FRAME_POINTER
  85.111 +CFLAGS += -fomit-frame-pointer
  85.112 +endif
  85.113 +AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
  85.114 +
  85.115 +#
  85.116 +# ROOT_DEV specifies the default root-device when making the image.
  85.117 +# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
  85.118 +# the default of FLOPPY is used by 'build'.
  85.119 +# This is i386 specific.
  85.120 +#
  85.121 +
  85.122 +export ROOT_DEV = CURRENT
  85.123 +
  85.124 +#
  85.125 +# If you want to preset the SVGA mode, uncomment the next line and
  85.126 +# set SVGA_MODE to whatever number you want.
  85.127 +# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
  85.128 +# The number is the same as you would ordinarily press at bootup.
  85.129 +# This is i386 specific.
  85.130 +#
  85.131 +
  85.132 +export SVGA_MODE = -DSVGA_MODE=NORMAL_VGA
  85.133 +
  85.134 +#
  85.135 +# If you want the RAM disk device, define this to be the size in blocks.
  85.136 +# This is i386 specific.
  85.137 +#
  85.138 +
  85.139 +#export RAMDISK = -DRAMDISK=512
  85.140 +
  85.141 +CORE_FILES	=kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o
  85.142 +NETWORKS	=net/network.o
  85.143 +
  85.144 +LIBS		=$(TOPDIR)/lib/lib.a
  85.145 +SUBDIRS		=kernel drivers mm fs net ipc lib crypto
  85.146 +
  85.147 +DRIVERS-n :=
  85.148 +DRIVERS-y :=
  85.149 +DRIVERS-m :=
  85.150 +DRIVERS-  :=
  85.151 +
  85.152 +DRIVERS-$(CONFIG_ACPI_BOOT) += drivers/acpi/acpi.o
  85.153 +DRIVERS-$(CONFIG_PARPORT) += drivers/parport/driver.o
  85.154 +DRIVERS-y += drivers/char/char.o \
  85.155 +	drivers/block/block.o \
  85.156 +	drivers/misc/misc.o \
  85.157 +	drivers/net/net.o
  85.158 +DRIVERS-$(CONFIG_AGP) += drivers/char/agp/agp.o
  85.159 +DRIVERS-$(CONFIG_DRM_NEW) += drivers/char/drm/drm.o
  85.160 +DRIVERS-$(CONFIG_DRM_OLD) += drivers/char/drm-4.0/drm.o
  85.161 +DRIVERS-$(CONFIG_NUBUS) += drivers/nubus/nubus.a
  85.162 +DRIVERS-$(CONFIG_NET_FC) += drivers/net/fc/fc.o
  85.163 +DRIVERS-$(CONFIG_DEV_APPLETALK) += drivers/net/appletalk/appletalk.o
  85.164 +DRIVERS-$(CONFIG_TR) += drivers/net/tokenring/tr.o
  85.165 +DRIVERS-$(CONFIG_WAN) += drivers/net/wan/wan.o
  85.166 +DRIVERS-$(CONFIG_ARCNET) += drivers/net/arcnet/arcnetdrv.o
  85.167 +DRIVERS-$(CONFIG_ATM) += drivers/atm/atm.o
  85.168 +DRIVERS-$(CONFIG_IDE) += drivers/ide/idedriver.o
  85.169 +DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
  85.170 +DRIVERS-$(CONFIG_SCSI) += drivers/scsi/scsidrv.o
  85.171 +DRIVERS-$(CONFIG_FUSION_BOOT) += drivers/message/fusion/fusion.o
  85.172 +DRIVERS-$(CONFIG_IEEE1394) += drivers/ieee1394/ieee1394drv.o
  85.173 +
  85.174 +ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR)$(CONFIG_PARIDE_PCD),)
  85.175 +DRIVERS-y += drivers/cdrom/driver.o
  85.176 +endif
  85.177 +
  85.178 +DRIVERS-$(CONFIG_SOUND) += drivers/sound/sounddrivers.o
  85.179 +DRIVERS-$(CONFIG_PCI) += drivers/pci/driver.o
  85.180 +DRIVERS-$(CONFIG_MTD) += drivers/mtd/mtdlink.o
  85.181 +DRIVERS-$(CONFIG_PCMCIA) += drivers/pcmcia/pcmcia.o
  85.182 +DRIVERS-$(CONFIG_NET_PCMCIA) += drivers/net/pcmcia/pcmcia_net.o
  85.183 +DRIVERS-$(CONFIG_NET_WIRELESS) += drivers/net/wireless/wireless_net.o
  85.184 +DRIVERS-$(CONFIG_PCMCIA_CHRDEV) += drivers/char/pcmcia/pcmcia_char.o
  85.185 +DRIVERS-$(CONFIG_DIO) += drivers/dio/dio.a
  85.186 +DRIVERS-$(CONFIG_SBUS) += drivers/sbus/sbus_all.o
  85.187 +DRIVERS-$(CONFIG_ZORRO) += drivers/zorro/driver.o
  85.188 +DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
  85.189 +DRIVERS-$(CONFIG_PPC32) += drivers/macintosh/macintosh.o
  85.190 +DRIVERS-$(CONFIG_MAC) += drivers/macintosh/macintosh.o
  85.191 +DRIVERS-$(CONFIG_ISAPNP) += drivers/pnp/pnp.o
  85.192 +DRIVERS-$(CONFIG_I2C) += drivers/i2c/i2c.o
  85.193 +DRIVERS-$(CONFIG_VT) += drivers/video/video.o
  85.194 +DRIVERS-$(CONFIG_PARIDE) += drivers/block/paride/paride.a
  85.195 +DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o
  85.196 +DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a
  85.197 +DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o
  85.198 +DRIVERS-$(CONFIG_USB_GADGET) += drivers/usb/gadget/built-in.o
  85.199 +DRIVERS-y +=drivers/media/media.o
  85.200 +DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o
  85.201 +DRIVERS-$(CONFIG_HIL) += drivers/hil/hil.o
  85.202 +DRIVERS-$(CONFIG_I2O) += drivers/message/i2o/i2o.o
  85.203 +DRIVERS-$(CONFIG_IRDA) += drivers/net/irda/irda.o
  85.204 +DRIVERS-$(CONFIG_PHONE) += drivers/telephony/telephony.o
  85.205 +DRIVERS-$(CONFIG_MD) += drivers/md/mddev.o
  85.206 +DRIVERS-$(CONFIG_GSC) += drivers/gsc/gscbus.o
  85.207 +DRIVERS-$(CONFIG_BLUEZ) += drivers/bluetooth/bluetooth.o
  85.208 +DRIVERS-$(CONFIG_HOTPLUG_PCI) += drivers/hotplug/vmlinux-obj.o
  85.209 +DRIVERS-$(CONFIG_ISDN_BOOL) += drivers/isdn/vmlinux-obj.o
  85.210 +DRIVERS-$(CONFIG_CRYPTO) += crypto/crypto.o
  85.211 +
  85.212 +DRIVERS := $(DRIVERS-y)
  85.213 +
  85.214 +
  85.215 +# files removed with 'make clean'
  85.216 +CLEAN_FILES = \
  85.217 +	kernel/ksyms.lst include/linux/compile.h \
  85.218 +	vmlinux System.map \
  85.219 +	.tmp* \
  85.220 +	drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
  85.221 +	drivers/char/conmakehash \
  85.222 +	drivers/char/drm/*-mod.c \
  85.223 +	drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist \
  85.224 +	drivers/zorro/devlist.h drivers/zorro/gen-devlist \
  85.225 +	drivers/sound/bin2hex drivers/sound/hex2hex \
  85.226 +	drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2} \
  85.227 +	drivers/scsi/aic7xxx/aicasm/aicasm \
  85.228 +	drivers/scsi/aic7xxx/aicasm/aicasm_gram.c \
  85.229 +	drivers/scsi/aic7xxx/aicasm/aicasm_gram.h \
  85.230 +	drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.c \
  85.231 +	drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.h \
  85.232 +	drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.c \
  85.233 +	drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \
  85.234 +	drivers/scsi/aic7xxx/aicasm/aicdb.h \
  85.235 +	drivers/scsi/aic7xxx/aicasm/y.tab.h \
  85.236 +	drivers/scsi/53c700_d.h \
  85.237 +	drivers/tc/lk201-map.c \
  85.238 +	net/khttpd/make_times_h \
  85.239 +	net/khttpd/times.h \
  85.240 +	submenu* \
  85.241 +	drivers/ieee1394/oui.c
  85.242 +# directories removed with 'make clean'
  85.243 +CLEAN_DIRS = \
  85.244 +	modules
  85.245 +
  85.246 +# files removed with 'make mrproper'
  85.247 +MRPROPER_FILES = \
  85.248 +	include/linux/autoconf.h include/linux/version.h \
  85.249 +	lib/crc32table.h lib/gen_crc32table \
  85.250 +	drivers/net/hamradio/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h \
  85.251 +	drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h \
  85.252 +	drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h \
  85.253 +	drivers/net/hamradio/soundmodem/gentbl \
  85.254 +	drivers/sound/*_boot.h drivers/sound/.*.boot \
  85.255 +	drivers/sound/msndinit.c \
  85.256 +	drivers/sound/msndperm.c \
  85.257 +	drivers/sound/pndsperm.c \
  85.258 +	drivers/sound/pndspini.c \
  85.259 +	drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \
  85.260 +	.version .config* config.in config.old \
  85.261 +	scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \
  85.262 +	scripts/lxdialog/*.o scripts/lxdialog/lxdialog \
  85.263 +	.menuconfig.log \
  85.264 +	include/asm \
  85.265 +	.hdepend scripts/mkdep scripts/split-include scripts/docproc \
  85.266 +	$(TOPDIR)/include/linux/modversions.h \
  85.267 +	kernel.spec
  85.268 +
  85.269 +# directories removed with 'make mrproper'
  85.270 +MRPROPER_DIRS = \
  85.271 +	include/config \
  85.272 +	$(TOPDIR)/include/linux/modules
  85.273 +
  85.274 +
  85.275 +include arch/$(ARCH)/Makefile
  85.276 +
  85.277 +# Extra cflags for kbuild 2.4.  The default is to forbid includes by kernel code
  85.278 +# from user space headers.  Some UML code requires user space headers, in the
  85.279 +# UML Makefiles add 'kbuild_2_4_nostdinc :=' before include Rules.make.  No
  85.280 +# other kernel code should include user space headers, if you need
  85.281 +# 'kbuild_2_4_nostdinc :=' or -I/usr/include for kernel code and you are not UML
  85.282 +# then your code is broken!  KAO.
  85.283 +
  85.284 +kbuild_2_4_nostdinc	:= -nostdinc -iwithprefix include
  85.285 +export kbuild_2_4_nostdinc
  85.286 +
  85.287 +export	CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL
  85.288 +
  85.289 +export	NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS
  85.290 +
  85.291 +.S.s:
  85.292 +	$(CPP) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -o $*.s $<
  85.293 +.S.o:
  85.294 +	$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -c -o $*.o $<
  85.295 +
  85.296 +Version: dummy
  85.297 +	@rm -f include/linux/compile.h
  85.298 +
  85.299 +boot: vmlinux
  85.300 +	@$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C arch/$(ARCH)/boot
  85.301 +
  85.302 +vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o init/do_mounts.o linuxsubdirs
  85.303 +	$(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o init/do_mounts.o \
  85.304 +		--start-group \
  85.305 +		$(CORE_FILES) \
  85.306 +		$(DRIVERS) \
  85.307 +		$(NETWORKS) \
  85.308 +		$(LIBS) \
  85.309 +		--end-group \
  85.310 +		-o vmlinux
  85.311 +	$(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
  85.312 +
  85.313 +symlinks:
  85.314 +	rm -f include/asm
  85.315 +	( cd include ; ln -sf asm-$(ARCH) asm)
  85.316 +	@if [ ! -d include/linux/modules ]; then \
  85.317 +		mkdir include/linux/modules; \
  85.318 +	fi
  85.319 +
  85.320 +oldconfig: symlinks
  85.321 +	$(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
  85.322 +
  85.323 +xconfig: symlinks
  85.324 +	$(MAKE) -C scripts kconfig.tk
  85.325 +	wish -f scripts/kconfig.tk
  85.326 +
  85.327 +menuconfig: include/linux/version.h symlinks
  85.328 +	$(MAKE) -C scripts/lxdialog all
  85.329 +	$(CONFIG_SHELL) scripts/Menuconfig arch/$(ARCH)/config.in
  85.330 +
  85.331 +config: symlinks
  85.332 +	$(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in
  85.333 +
  85.334 +include/config/MARKER: scripts/split-include include/linux/autoconf.h
  85.335 +	scripts/split-include include/linux/autoconf.h include/config
  85.336 +	@ touch include/config/MARKER
  85.337 +
  85.338 +linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
  85.339 +
  85.340 +$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER
  85.341 +	$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
  85.342 +
  85.343 +$(TOPDIR)/include/linux/version.h: include/linux/version.h
  85.344 +$(TOPDIR)/include/linux/compile.h: include/linux/compile.h
  85.345 +
  85.346 +newversion:
  85.347 +	. scripts/mkversion > .tmpversion
  85.348 +	@mv -f .tmpversion .version
  85.349 +
  85.350 +uts_len		:= 64
  85.351 +uts_truncate	:= sed -e 's/\(.\{1,$(uts_len)\}\).*/\1/'
  85.352 +
  85.353 +include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion
  85.354 +	@echo -n \#`cat .version` > .ver1
  85.355 +	@if [ -n "$(CONFIG_SMP)" ] ; then echo -n " SMP" >> .ver1; fi
  85.356 +	@if [ -f .name ]; then  echo -n \-`cat .name` >> .ver1; fi
  85.357 +	@LANG=C echo ' '`date` >> .ver1
  85.358 +	@echo \#define UTS_VERSION \"`cat .ver1 | $(uts_truncate)`\" > .ver
  85.359 +	@LANG=C echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> .ver
  85.360 +	@echo \#define LINUX_COMPILE_BY \"`whoami`\" >> .ver
  85.361 +	@echo \#define LINUX_COMPILE_HOST \"`hostname | $(uts_truncate)`\" >> .ver
  85.362 +	@([ -x /bin/dnsdomainname ] && /bin/dnsdomainname > .ver1) || \
  85.363 +	 ([ -x /bin/domainname ] && /bin/domainname > .ver1) || \
  85.364 +	 echo > .ver1
  85.365 +	@echo \#define LINUX_COMPILE_DOMAIN \"`cat .ver1 | $(uts_truncate)`\" >> .ver
  85.366 +	@echo \#define LINUX_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -n 1`\" >> .ver
  85.367 +	@mv -f .ver $@
  85.368 +	@rm -f .ver1
  85.369 +
  85.370 +include/linux/version.h: ./Makefile
  85.371 +	@expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
  85.372 +	  (echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len) characters >&2; false)
  85.373 +	@echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
  85.374 +	@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
  85.375 +	@echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver
  85.376 +	@mv -f .ver $@
  85.377 +
  85.378 +comma	:= ,
  85.379 +
  85.380 +init/version.o: init/version.c include/linux/compile.h include/config/MARKER
  85.381 +	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(SUBARCH)"' -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o init/version.o init/version.c
  85.382 +
  85.383 +init/main.o: init/main.c include/config/MARKER
  85.384 +	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
  85.385 +
  85.386 +init/do_mounts.o: init/do_mounts.c include/config/MARKER
  85.387 +	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $@ $<
  85.388 +
  85.389 +fs lib mm ipc kernel drivers net: dummy
  85.390 +	$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)
  85.391 +
  85.392 +TAGS: dummy
  85.393 +	{ find include/asm-${ARCH} -name '*.h' -print ; \
  85.394 +	find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print ; \
  85.395 +	find $(SUBDIRS) init arch/${ARCH} -name '*.[chS]' ; } | grep -v SCCS | grep -v '\.svn' | etags -
  85.396 +
  85.397 +# Exuberant ctags works better with -I
  85.398 +tags: dummy
  85.399 +	CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
  85.400 +	ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
  85.401 +	find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
  85.402 +	find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a
  85.403 +
  85.404 +ifdef CONFIG_MODULES
  85.405 +ifdef CONFIG_MODVERSIONS
  85.406 +MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
  85.407 +endif
  85.408 +
  85.409 +.PHONY: modules
  85.410 +modules: $(patsubst %, _mod_%, $(SUBDIRS))
  85.411 +
  85.412 +.PHONY: $(patsubst %, _mod_%, $(SUBDIRS))
  85.413 +$(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER
  85.414 +	$(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules
  85.415 +
  85.416 +.PHONY: modules_install
  85.417 +modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post
  85.418 +
  85.419 +.PHONY: _modinst_
  85.420 +_modinst_:
  85.421 +	@rm -rf $(MODLIB)/kernel
  85.422 +	@rm -f $(MODLIB)/build
  85.423 +	@mkdir -p $(MODLIB)/kernel
  85.424 +	@ln -s $(TOPDIR) $(MODLIB)/build
  85.425 +
  85.426 +# If System.map exists, run depmod.  This deliberately does not have a
  85.427 +# dependency on System.map since that would run the dependency tree on
  85.428 +# vmlinux.  This depmod is only for convenience to give the initial
  85.429 +# boot a modules.dep even before / is mounted read-write.  However the
  85.430 +# boot script depmod is the master version.
  85.431 +ifeq "$(strip $(INSTALL_MOD_PATH))" ""
  85.432 +depmod_opts	:=
  85.433 +else
  85.434 +depmod_opts	:= -b $(INSTALL_MOD_PATH) -r
  85.435 +endif
  85.436 +.PHONY: _modinst_post
  85.437 +_modinst_post: _modinst_post_pcmcia
  85.438 +	if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
  85.439 +
  85.440 +# Backwards compatibilty symlinks for people still using old versions
  85.441 +# of pcmcia-cs with hard coded pathnames on insmod.  Remove
  85.442 +# _modinst_post_pcmcia for kernel 2.4.1.
  85.443 +.PHONY: _modinst_post_pcmcia
  85.444 +_modinst_post_pcmcia:
  85.445 +	cd $(MODLIB); \
  85.446 +	mkdir -p pcmcia; \
  85.447 +	find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
  85.448 +
  85.449 +.PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
  85.450 +$(patsubst %, _modinst_%, $(SUBDIRS)) :
  85.451 +	$(MAKE) -C $(patsubst _modinst_%, %, $@) modules_install
  85.452 +
  85.453 +# modules disabled....
  85.454 +
  85.455 +else
  85.456 +modules modules_install: dummy
  85.457 +	@echo
  85.458 +	@echo "The present kernel configuration has modules disabled."
  85.459 +	@echo "Type 'make config' and enable loadable module support."
  85.460 +	@echo "Then build a kernel with module support enabled."
  85.461 +	@echo
  85.462 +	@exit 1
  85.463 +endif
  85.464 +
  85.465 +clean:	archclean
  85.466 +	find . \( -name '*.[oas]' -o -name core -o -name '.*.flags' \) -type f -print \
  85.467 +		| grep -v lxdialog/ | xargs rm -f
  85.468 +	rm -f $(CLEAN_FILES)
  85.469 +	rm -rf $(CLEAN_DIRS)
  85.470 +	$(MAKE) -C Documentation/DocBook clean
  85.471 +
  85.472 +mrproper: clean archmrproper
  85.473 +	find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f
  85.474 +	rm -f $(MRPROPER_FILES)
  85.475 +	rm -rf $(MRPROPER_DIRS)
  85.476 +	$(MAKE) -C Documentation/DocBook mrproper
  85.477 +
  85.478 +distclean: mrproper
  85.479 +	rm -f core `find . \( -not -type d \) -and \
  85.480 +		\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
  85.481 +		-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
  85.482 +		-o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
  85.483 +
  85.484 +backup: mrproper
  85.485 +	cd .. && tar cf - linux/ | gzip -9 > backup.gz
  85.486 +	sync
  85.487 +
  85.488 +sgmldocs: 
  85.489 +	chmod 755 $(TOPDIR)/scripts/docgen
  85.490 +	chmod 755 $(TOPDIR)/scripts/gen-all-syms
  85.491 +	chmod 755 $(TOPDIR)/scripts/kernel-doc
  85.492 +	$(MAKE) -C $(TOPDIR)/Documentation/DocBook books
  85.493 +
  85.494 +psdocs: sgmldocs
  85.495 +	$(MAKE) -C Documentation/DocBook ps
  85.496 +
  85.497 +pdfdocs: sgmldocs
  85.498 +	$(MAKE) -C Documentation/DocBook pdf
  85.499 +
  85.500 +htmldocs: sgmldocs
  85.501 +	$(MAKE) -C Documentation/DocBook html
  85.502 +
  85.503 +mandocs:
  85.504 +	chmod 755 $(TOPDIR)/scripts/kernel-doc
  85.505 +	chmod 755 $(TOPDIR)/scripts/split-man
  85.506 +	$(MAKE) -C Documentation/DocBook man
  85.507 +
  85.508 +sums:
  85.509 +	find . -type f -print | sort | xargs sum > .SUMS
  85.510 +
  85.511 +dep-files: scripts/mkdep archdep include/linux/version.h
  85.512 +	rm -f .depend .hdepend
  85.513 +	$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
  85.514 +ifdef CONFIG_MODVERSIONS
  85.515 +	$(MAKE) update-modverfile
  85.516 +endif
  85.517 +	scripts/mkdep -- `find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
  85.518 +	scripts/mkdep -- init/*.c > .depend
  85.519 +
  85.520 +ifdef CONFIG_MODVERSIONS
  85.521 +MODVERFILE := $(TOPDIR)/include/linux/modversions.h
  85.522 +else
  85.523 +MODVERFILE :=
  85.524 +endif
  85.525 +export	MODVERFILE
  85.526 +
  85.527 +depend dep: dep-files
  85.528 +
  85.529 +checkconfig:
  85.530 +	find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl
  85.531 +
  85.532 +checkhelp:
  85.533 +	find * -name [cC]onfig.in -print | sort | xargs $(PERL) -w scripts/checkhelp.pl
  85.534 +
  85.535 +checkincludes:
  85.536 +	find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl
  85.537 +
  85.538 +ifdef CONFIGURATION
  85.539 +..$(CONFIGURATION):
  85.540 +	@echo
  85.541 +	@echo "You have a bad or nonexistent" .$(CONFIGURATION) ": running 'make" $(CONFIGURATION)"'"
  85.542 +	@echo
  85.543 +	$(MAKE) $(CONFIGURATION)
  85.544 +	@echo
  85.545 +	@echo "Successful. Try re-making (ignore the error that follows)"
  85.546 +	@echo
  85.547 +	exit 1
  85.548 +
  85.549 +#dummy: ..$(CONFIGURATION)
  85.550 +dummy:
  85.551 +
  85.552 +else
  85.553 +
  85.554 +dummy:
  85.555 +
  85.556 +endif
  85.557 +
  85.558 +include Rules.make
  85.559 +
  85.560 +#
  85.561 +# This generates dependencies for the .h files.
  85.562 +#
  85.563 +
  85.564 +scripts/mkdep: scripts/mkdep.c
  85.565 +	$(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
  85.566 +
  85.567 +scripts/split-include: scripts/split-include.c
  85.568 +	$(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
  85.569 +
  85.570 +#
  85.571 +# RPM target
  85.572 +#
  85.573 +#	If you do a make spec before packing the tarball you can rpm -ta it
  85.574 +#
  85.575 +spec:
  85.576 +	. scripts/mkspec >kernel.spec
  85.577 +
  85.578 +#
  85.579 +#	Build a tar ball, generate an rpm from it and pack the result
  85.580 +#	There arw two bits of magic here
  85.581 +#	1) The use of /. to avoid tar packing just the symlink
  85.582 +#	2) Removing the .dep files as they have source paths in them that
  85.583 +#	   will become invalid
  85.584 +#
  85.585 +rpm:	clean spec
  85.586 +	find . \( -size 0 -o -name .depend -o -name .hdepend \) -type f -print | xargs rm -f
  85.587 +	set -e; \
  85.588 +	cd $(TOPDIR)/.. ; \
  85.589 +	ln -sf $(TOPDIR) $(KERNELPATH) ; \
  85.590 +	tar -cvz --exclude CVS -f $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \
  85.591 +	rm $(KERNELPATH) ; \
  85.592 +	cd $(TOPDIR) ; \
  85.593 +	. scripts/mkversion > .version ; \
  85.594 +	$(RPM) -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
  85.595 +	rm $(TOPDIR)/../$(KERNELPATH).tar.gz
    86.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    86.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/Makefile	Mon Jul 11 14:44:08 2005 +0000
    86.3 @@ -0,0 +1,139 @@
    86.4 +#
    86.5 +# xen/Makefile
    86.6 +#
    86.7 +# This file is included by the global makefile so that you can add your own
    86.8 +# architecture-specific flags and dependencies. Remember to do have actions
    86.9 +# for "archclean" and "archdep" for cleaning up and making dependencies for
   86.10 +# this architecture
   86.11 +#
   86.12 +# This file is subject to the terms and conditions of the GNU General Public
   86.13 +# License.  See the file "COPYING" in the main directory of this archive
   86.14 +# for more details.
   86.15 +#
   86.16 +# Copyright (C) 1994 by Linus Torvalds
   86.17 +#
   86.18 +# 19990713  Artur Skawina <skawina@geocities.com>
   86.19 +#           Added '-march' and '-mpreferred-stack-boundary' support
   86.20 +#
   86.21 +
   86.22 +# If no .config file exists then use the appropriate defconfig-* file
   86.23 +ifneq (.config,$(wildcard .config))
   86.24 +DUMMYX:=$(shell cp $(TOPDIR)/arch/xen/defconfig$(EXTRAVERSION) $(TOPDIR)/.config)
   86.25 +-include $(TOPDIR)/.config
   86.26 +endif
   86.27 +
   86.28 +LD=$(CROSS_COMPILE)ld -m elf_i386
   86.29 +OBJCOPY=$(CROSS_COMPILE)objcopy -R .note -R .comment -S
   86.30 +LDFLAGS=-e stext
   86.31 +LINKFLAGS =-T $(TOPDIR)/arch/xen/vmlinux.lds $(LDFLAGS)
   86.32 +
   86.33 +CFLAGS += -pipe
   86.34 +
   86.35 +check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
   86.36 +
   86.37 +# prevent gcc from keeping the stack 16 byte aligned
   86.38 +CFLAGS += $(call check_gcc,-mpreferred-stack-boundary=2,)
   86.39 +
   86.40 +ifdef CONFIG_M686
   86.41 +CFLAGS += -march=i686
   86.42 +endif
   86.43 +
   86.44 +ifdef CONFIG_MPENTIUMIII
   86.45 +CFLAGS += -march=i686
   86.46 +endif
   86.47 +
   86.48 +ifdef CONFIG_MPENTIUM4
   86.49 +CFLAGS += -march=i686
   86.50 +endif
   86.51 +
   86.52 +ifdef CONFIG_MK7
   86.53 +CFLAGS += $(call check_gcc,-march=athlon,-march=i686 -malign-functions=4)
   86.54 +endif
   86.55 +
   86.56 +# Disable unit-at-a-time mode, it makes gcc use a lot more stack
   86.57 +# due to the lack of sharing of stacklots.
   86.58 +CFLAGS += $(call check_gcc,-fno-unit-at-a-time,)
   86.59 +
   86.60 +HEAD := arch/xen/kernel/head.o arch/xen/kernel/init_task.o
   86.61 +
   86.62 +SUBDIRS += arch/xen/kernel arch/xen/mm arch/xen/lib
   86.63 +SUBDIRS += arch/xen/drivers/console 
   86.64 +SUBDIRS += arch/xen/drivers/evtchn
   86.65 +SUBDIRS += arch/xen/drivers/blkif
   86.66 +SUBDIRS += arch/xen/drivers/netif
   86.67 +SUBDIRS += arch/xen/drivers/usbif
   86.68 +SUBDIRS += arch/xen/drivers/balloon
   86.69 +ifdef CONFIG_XEN_PRIVILEGED_GUEST
   86.70 +SUBDIRS += arch/xen/drivers/dom0 
   86.71 +endif
   86.72 +
   86.73 +CORE_FILES += arch/xen/kernel/kernel.o arch/xen/mm/mm.o
   86.74 +CORE_FILES += arch/xen/drivers/evtchn/drv.o
   86.75 +CORE_FILES += arch/xen/drivers/console/drv.o
   86.76 +DRIVERS += arch/xen/drivers/blkif/drv.o
   86.77 +DRIVERS += arch/xen/drivers/netif/drv.o
   86.78 +DRIVERS += arch/xen/drivers/usbif/drv.o
   86.79 +ifdef CONFIG_XEN_PRIVILEGED_GUEST
   86.80 +CORE_FILES += arch/xen/drivers/dom0/drv.o
   86.81 +endif
   86.82 +CORE_FILES += arch/xen/drivers/balloon/drv.o
   86.83 +LIBS := $(TOPDIR)/arch/xen/lib/lib.a $(LIBS) $(TOPDIR)/arch/xen/lib/lib.a
   86.84 +
   86.85 +arch/xen/kernel: dummy
   86.86 +	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/kernel
   86.87 +
   86.88 +arch/xen/mm: dummy
   86.89 +	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/mm
   86.90 +
   86.91 +arch/xen/drivers/console: dummy
   86.92 +	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/console
   86.93 +
   86.94 +arch/xen/drivers/network: dummy
   86.95 +	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/network
   86.96 +
   86.97 +arch/xen/drivers/block: dummy
   86.98 +	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/block
   86.99 +
  86.100 +arch/xen/drivers/dom0: dummy
  86.101 +	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/dom0
  86.102 +
  86.103 +arch/xen/drivers/balloon: dummy
  86.104 +	$(MAKE) linuxsubdirs SUBDIRS=arch/xen/drivers/balloon
  86.105 +
  86.106 +MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
  86.107 +
  86.108 +vmlinux: arch/xen/vmlinux.lds
  86.109 +
  86.110 +FORCE: ;
  86.111 +
  86.112 +.PHONY: bzImage compressed clean archclean archmrproper archdep
  86.113 +
  86.114 +
  86.115 +bzImage: vmlinux
  86.116 +	@$(MAKEBOOT) bzImage
  86.117 +
  86.118 +INSTALL_NAME ?= $(KERNELRELEASE)
  86.119 +install: bzImage
  86.120 +	mkdir -p $(INSTALL_PATH)/boot
  86.121 +	ln -f -s vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_PATH)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
  86.122 +	rm -f $(INSTALL_PATH)/boot/vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX)
  86.123 +	install -m0644 arch/$(ARCH)/boot/bzImage $(INSTALL_PATH)/boot/vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX)
  86.124 +	install -m0644 vmlinux $(INSTALL_PATH)/boot/vmlinux-syms-$(INSTALL_NAME)$(INSTALL_SUFFIX)
  86.125 +	install -m0664 .config $(INSTALL_PATH)/boot/config-$(INSTALL_NAME)$(INSTALL_SUFFIX)
  86.126 +	install -m0664 System.map $(INSTALL_PATH)/boot/System.map-$(INSTALL_NAME)$(INSTALL_SUFFIX)
  86.127 +	ln -f -s vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_PATH)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)$(XENGUEST)$(INSTALL_SUFFIX)
  86.128 +
  86.129 +%_config: arch/xen/defconfig-%
  86.130 +	rm -f .config arch/xen/defconfig
  86.131 +	cp -f arch/xen/defconfig-$(@:_config=) arch/xen/defconfig
  86.132 +	cp -f arch/xen/defconfig-$(@:_config=) .config
  86.133 +
  86.134 +
  86.135 +archclean:
  86.136 +	@$(MAKEBOOT) clean
  86.137 +
  86.138 +archmrproper:
  86.139 +	rm -f include/asm-xen/xen-public/arch
  86.140 +
  86.141 +archdep:
  86.142 +	@$(MAKEBOOT) dep
    87.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    87.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/boot/Makefile	Mon Jul 11 14:44:08 2005 +0000
    87.3 @@ -0,0 +1,13 @@
    87.4 +#
    87.5 +# arch/xen/boot/Makefile
    87.6 +#
    87.7 +
    87.8 +bzImage: $(TOPDIR)/vmlinux
    87.9 +	$(OBJCOPY) $< Image
   87.10 +	gzip -f -9 < Image > $@
   87.11 +	rm -f Image
   87.12 +
   87.13 +dep:
   87.14 +
   87.15 +clean:
   87.16 +	rm -f bzImage Image
    88.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    88.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/config.in	Mon Jul 11 14:44:08 2005 +0000
    88.3 @@ -0,0 +1,337 @@
    88.4 +#
    88.5 +# For a description of the syntax of this configuration file,
    88.6 +# see Documentation/kbuild/config-language.txt.
    88.7 +#
    88.8 +mainmenu_name "Linux Kernel Configuration"
    88.9 +
   88.10 +define_bool CONFIG_XEN y
   88.11 +
   88.12 +define_bool CONFIG_X86 y
   88.13 +define_bool CONFIG_ISA y
   88.14 +define_bool CONFIG_SBUS n
   88.15 +
   88.16 +define_bool CONFIG_UID16 y
   88.17 +
   88.18 +mainmenu_option next_comment
   88.19 +comment 'Xen'
   88.20 +bool 'Support for privileged operations (domain 0)' CONFIG_XEN_PRIVILEGED_GUEST
   88.21 +bool 'Device-driver domain (physical device access)' CONFIG_XEN_PHYSDEV_ACCESS
   88.22 +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
   88.23 +    bool 'USB-device backend driver' CONFIG_XEN_USB_BACKEND
   88.24 +fi
   88.25 +bool 'Scrub memory before freeing it to Xen' CONFIG_XEN_SCRUB_PAGES
   88.26 +bool 'Network-device frontend driver' CONFIG_XEN_NETDEV_FRONTEND
   88.27 +bool 'Block-device frontend driver' CONFIG_XEN_BLKDEV_FRONTEND
   88.28 +bool 'Block-device uses grant tables' CONFIG_XEN_BLKDEV_GRANT
   88.29 +bool 'USB-device frontend driver' CONFIG_XEN_USB_FRONTEND
   88.30 +endmenu
   88.31 +# The IBM S/390 patch needs this.
   88.32 +define_bool CONFIG_NO_IDLE_HZ y
   88.33 +
   88.34 +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
   88.35 +   define_bool CONFIG_FOREIGN_PAGES y
   88.36 +else
   88.37 +   define_bool CONFIG_FOREIGN_PAGES n
   88.38 +   define_bool CONFIG_NETDEVICES y
   88.39 +   define_bool CONFIG_VT n
   88.40 +fi
   88.41 +
   88.42 +mainmenu_option next_comment
   88.43 +comment 'Code maturity level options'
   88.44 +bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
   88.45 +endmenu
   88.46 +
   88.47 +mainmenu_option next_comment
   88.48 +comment 'Loadable module support'
   88.49 +bool 'Enable loadable module support' CONFIG_MODULES
   88.50 +if [ "$CONFIG_MODULES" = "y" ]; then
   88.51 +   bool '  Set version information on all module symbols' CONFIG_MODVERSIONS
   88.52 +   bool '  Kernel module loader' CONFIG_KMOD
   88.53 +fi
   88.54 +endmenu
   88.55 +
   88.56 +mainmenu_option next_comment
   88.57 +comment 'Processor type and features'
   88.58 +choice 'Processor family' \
   88.59 +	"Pentium-Pro/Celeron/Pentium-II		CONFIG_M686 \
   88.60 +	 Pentium-III/Celeron(Coppermine)	CONFIG_MPENTIUMIII \
   88.61 +	 Pentium-4				CONFIG_MPENTIUM4 \
   88.62 +	 Athlon/Duron/K7			CONFIG_MK7 \
   88.63 +	 Opteron/Athlon64/Hammer/K8             CONFIG_MK8 \
   88.64 +	 VIA-C3-2                               CONFIG_MVIAC3_2" Pentium-Pro
   88.65 +
   88.66 +   define_bool CONFIG_X86_WP_WORKS_OK y
   88.67 +   define_bool CONFIG_X86_INVLPG y
   88.68 +   define_bool CONFIG_X86_CMPXCHG y
   88.69 +   define_bool CONFIG_X86_XADD y
   88.70 +   define_bool CONFIG_X86_BSWAP y
   88.71 +   define_bool CONFIG_X86_POPAD_OK y
   88.72 +   define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
   88.73 +   define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
   88.74 +
   88.75 +   define_bool CONFIG_X86_GOOD_APIC y
   88.76 +   define_bool CONFIG_X86_PGE y
   88.77 +   define_bool CONFIG_X86_USE_PPRO_CHECKSUM y
   88.78 +   define_bool CONFIG_X86_TSC y
   88.79 +
   88.80 +if [ "$CONFIG_M686" = "y" ]; then
   88.81 +   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
   88.82 +fi
   88.83 +if [ "$CONFIG_MPENTIUMIII" = "y" ]; then
   88.84 +   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
   88.85 +fi
   88.86 +if [ "$CONFIG_MPENTIUM4" = "y" ]; then
   88.87 +   define_int  CONFIG_X86_L1_CACHE_SHIFT 7
   88.88 +fi
   88.89 +if [ "$CONFIG_MK8" = "y" ]; then
   88.90 +   define_bool CONFIG_MK7 y
   88.91 +fi
   88.92 +if [ "$CONFIG_MK7" = "y" ]; then
   88.93 +   define_int  CONFIG_X86_L1_CACHE_SHIFT 6
   88.94 +   define_bool CONFIG_X86_USE_3DNOW y
   88.95 +fi
   88.96 +if [ "$CONFIG_MVIAC3_2" = "y" ]; then
   88.97 +   define_int  CONFIG_X86_L1_CACHE_SHIFT 5
   88.98 +fi
   88.99 +
  88.100 +#if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
  88.101 +#   tristate 'BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL)' CONFIG_EDD
  88.102 +#fi
  88.103 +
  88.104 +choice 'High Memory Support' \
  88.105 +	"off    CONFIG_NOHIGHMEM \
  88.106 +	 4GB    CONFIG_HIGHMEM4G" off
  88.107 +#	 64GB   CONFIG_HIGHMEM64G" off
  88.108 +if [ "$CONFIG_HIGHMEM4G" = "y" ]; then
  88.109 +   define_bool CONFIG_HIGHMEM y
  88.110 +fi
  88.111 +if [ "$CONFIG_HIGHMEM64G" = "y" ]; then
  88.112 +   define_bool CONFIG_HIGHMEM y
  88.113 +   define_bool CONFIG_X86_PAE y
  88.114 +fi
  88.115 +
  88.116 +if [ "$CONFIG_HIGHMEM" = "y" ]; then
  88.117 +   bool 'HIGHMEM I/O support' CONFIG_HIGHIO
  88.118 +fi
  88.119 +
  88.120 +define_int CONFIG_FORCE_MAX_ZONEORDER 11
  88.121 +
  88.122 +#bool 'Symmetric multi-processing support' CONFIG_SMP
  88.123 +#if [ "$CONFIG_SMP" = "y" -a "$CONFIG_X86_CMPXCHG" = "y" ]; then
  88.124 +#   define_bool CONFIG_HAVE_DEC_LOCK y
  88.125 +#fi
  88.126 +endmenu
  88.127 +
  88.128 +mainmenu_option next_comment
  88.129 +comment 'General setup'
  88.130 +
  88.131 +bool 'Networking support' CONFIG_NET
  88.132 +
  88.133 +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  88.134 +   bool 'PCI support' CONFIG_PCI
  88.135 +   source drivers/pci/Config.in
  88.136 +
  88.137 +   bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG
  88.138 +
  88.139 +   if [ "$CONFIG_HOTPLUG" = "y" ] ; then
  88.140 +      source drivers/pcmcia/Config.in
  88.141 +      source drivers/hotplug/Config.in
  88.142 +   else
  88.143 +      define_bool CONFIG_PCMCIA n
  88.144 +      define_bool CONFIG_HOTPLUG_PCI n
  88.145 +   fi
  88.146 +fi
  88.147 +
  88.148 +bool 'System V IPC' CONFIG_SYSVIPC
  88.149 +bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
  88.150 +bool 'Sysctl support' CONFIG_SYSCTL
  88.151 +if [ "$CONFIG_PROC_FS" = "y" ]; then
  88.152 +   choice 'Kernel core (/proc/kcore) format' \
  88.153 +	"ELF		CONFIG_KCORE_ELF	\
  88.154 +	 A.OUT		CONFIG_KCORE_AOUT" ELF
  88.155 +fi
  88.156 +tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
  88.157 +bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
  88.158 +tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
  88.159 +bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER
  88.160 +
  88.161 +endmenu
  88.162 +
  88.163 +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  88.164 +   source drivers/mtd/Config.in
  88.165 +
  88.166 +   source drivers/parport/Config.in
  88.167 +
  88.168 +   source drivers/pnp/Config.in
  88.169 +
  88.170 +   source drivers/block/Config.in
  88.171 +
  88.172 +   source drivers/md/Config.in
  88.173 +fi
  88.174 +
  88.175 +if [ "$CONFIG_NET" = "y" ]; then
  88.176 +   source net/Config.in
  88.177 +fi
  88.178 +
  88.179 +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  88.180 +   mainmenu_option next_comment
  88.181 +   comment 'ATA/IDE/MFM/RLL support'
  88.182 +
  88.183 +   tristate 'ATA/IDE/MFM/RLL support' CONFIG_IDE
  88.184 +
  88.185 +   if [ "$CONFIG_IDE" != "n" ]; then
  88.186 +      source drivers/ide/Config.in
  88.187 +   else
  88.188 +      define_bool CONFIG_BLK_DEV_HD n
  88.189 +   fi
  88.190 +   endmenu
  88.191 +fi
  88.192 +
  88.193 +mainmenu_option next_comment
  88.194 +comment 'SCSI support'
  88.195 +
  88.196 +tristate 'SCSI support' CONFIG_SCSI
  88.197 +
  88.198 +if [ "$CONFIG_SCSI" != "n" ]; then
  88.199 +   source drivers/scsi/Config.in
  88.200 +fi
  88.201 +endmenu
  88.202 +
  88.203 +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  88.204 +   source drivers/message/fusion/Config.in
  88.205 +
  88.206 +   source drivers/ieee1394/Config.in
  88.207 +
  88.208 +   source drivers/message/i2o/Config.in
  88.209 +
  88.210 +   if [ "$CONFIG_NET" = "y" ]; then
  88.211 +      mainmenu_option next_comment
  88.212 +      comment 'Network device support'
  88.213 +
  88.214 +      bool 'Network device support' CONFIG_NETDEVICES
  88.215 +      if [ "$CONFIG_NETDEVICES" = "y" ]; then
  88.216 +         source drivers/net/Config.in
  88.217 +         if [ "$CONFIG_ATM" = "y" -o "$CONFIG_ATM" = "m" ]; then
  88.218 +            source drivers/atm/Config.in
  88.219 +         fi
  88.220 +      fi
  88.221 +      endmenu
  88.222 +   fi
  88.223 +
  88.224 +   source net/ax25/Config.in
  88.225 +
  88.226 +   source net/irda/Config.in
  88.227 +
  88.228 +   mainmenu_option next_comment
  88.229 +   comment 'ISDN subsystem'
  88.230 +   if [ "$CONFIG_NET" != "n" ]; then
  88.231 +      tristate 'ISDN support' CONFIG_ISDN
  88.232 +      if [ "$CONFIG_ISDN" != "n" ]; then
  88.233 +         source drivers/isdn/Config.in
  88.234 +      fi
  88.235 +   fi
  88.236 +   endmenu
  88.237 +
  88.238 +   if [ "$CONFIG_ISA" = "y" ]; then
  88.239 +       mainmenu_option next_comment
  88.240 +       comment 'Old CD-ROM drivers (not SCSI, not IDE)'
  88.241 +   
  88.242 +       bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI
  88.243 +       if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
  88.244 +          source drivers/cdrom/Config.in
  88.245 +       fi
  88.246 +       endmenu
  88.247 +   fi
  88.248 +
  88.249 +   #
  88.250 +   # input before char - char/joystick depends on it. As does USB.
  88.251 +   #
  88.252 +   source drivers/input/Config.in
  88.253 +else
  88.254 +   #
  88.255 +   # Block device driver configuration
  88.256 +   #
  88.257 +   mainmenu_option next_comment
  88.258 +   comment 'Block devices'
  88.259 +   tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
  88.260 +   dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
  88.261 +   tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
  88.262 +   if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
  88.263 +      int '  Default RAM disk size' CONFIG_BLK_DEV_RAM_SIZE 4096
  88.264 +   fi
  88.265 +   dep_bool '  Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD $CONFIG_BLK_DEV_RAM
  88.266 +   bool 'Per partition statistics in /proc/partitions' CONFIG_BLK_STATS
  88.267 +   define_bool CONFIG_BLK_DEV_HD n
  88.268 +   endmenu
  88.269 +fi
  88.270 +
  88.271 +source drivers/char/Config.in
  88.272 +
  88.273 +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" -o "$CONFIG_XEN_USB_FRONTEND" = "y" ]; then
  88.274 +   source drivers/media/Config.in
  88.275 +fi
  88.276 +
  88.277 +source fs/Config.in
  88.278 +
  88.279 +mainmenu_option next_comment
  88.280 +comment 'Console drivers'
  88.281 +
  88.282 +define_bool CONFIG_XEN_CONSOLE y
  88.283 +
  88.284 +if [ "$CONFIG_VT" = "y" ]; then
  88.285 +   bool 'VGA text console' CONFIG_VGA_CONSOLE
  88.286 +   bool 'Dummy console' CONFIG_DUMMY_CONSOLE 
  88.287 +   if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  88.288 +      bool 'Video mode selection support' CONFIG_VIDEO_SELECT
  88.289 +      if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
  88.290 +         tristate 'MDA text console (dual-headed) (EXPERIMENTAL)' CONFIG_MDA_CONSOLE
  88.291 +         source drivers/video/Config.in
  88.292 +      fi
  88.293 +   fi
  88.294 +fi
  88.295 +endmenu
  88.296 +
  88.297 +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  88.298 +   mainmenu_option next_comment
  88.299 +   comment 'Sound'
  88.300 +
  88.301 +   tristate 'Sound card support' CONFIG_SOUND
  88.302 +   if [ "$CONFIG_SOUND" != "n" ]; then
  88.303 +      source drivers/sound/Config.in
  88.304 +   fi
  88.305 +   endmenu
  88.306 +fi
  88.307 +
  88.308 +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" -o "$CONFIG_XEN_USB_FRONTEND" = "y" ]; then
  88.309 +   if [ "$CONFIG_XEN_USB_FRONTEND" = "y" -o "$CONFIG_XEN_USB_BACKEND" = "y" ]; then
  88.310 +       define_bool CONFIG_USB y
  88.311 +   fi
  88.312 +   source drivers/usb/Config.in
  88.313 +fi
  88.314 +
  88.315 +if [ "$CONFIG_XEN_PHYSDEV_ACCESS" = "y" ]; then
  88.316 +   source net/bluetooth/Config.in
  88.317 +fi
  88.318 +
  88.319 +mainmenu_option next_comment
  88.320 +comment 'Kernel hacking'
  88.321 +
  88.322 +bool 'Kernel debugging' CONFIG_DEBUG_KERNEL
  88.323 +if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then
  88.324 +   bool '  Check for stack overflows' CONFIG_DEBUG_STACKOVERFLOW
  88.325 +   bool '  Debug high memory support' CONFIG_DEBUG_HIGHMEM
  88.326 +   bool '  Debug memory allocations' CONFIG_DEBUG_SLAB
  88.327 +   bool '  Memory mapped I/O debugging' CONFIG_DEBUG_IOVIRT
  88.328 +   bool '  Magic SysRq key' CONFIG_MAGIC_SYSRQ
  88.329 +   bool '  Spinlock debugging' CONFIG_DEBUG_SPINLOCK
  88.330 +   bool '  Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE
  88.331 +   bool '  Load all symbols for debugging' CONFIG_KALLSYMS
  88.332 +   bool '  Compile the kernel with frame pointers' CONFIG_FRAME_POINTER
  88.333 +fi
  88.334 +
  88.335 +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0
  88.336 +
  88.337 +endmenu
  88.338 +
  88.339 +source crypto/Config.in
  88.340 +source lib/Config.in
    89.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    89.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/defconfig-xen0	Mon Jul 11 14:44:08 2005 +0000
    89.3 @@ -0,0 +1,927 @@
    89.4 +#
    89.5 +# Automatically generated by make menuconfig: don't edit
    89.6 +#
    89.7 +CONFIG_XEN=y
    89.8 +CONFIG_X86=y
    89.9 +CONFIG_ISA=y
   89.10 +# CONFIG_SBUS is not set
   89.11 +CONFIG_UID16=y
   89.12 +
   89.13 +#
   89.14 +# Xen
   89.15 +#
   89.16 +CONFIG_XEN_PRIVILEGED_GUEST=y
   89.17 +CONFIG_XEN_PHYSDEV_ACCESS=y
   89.18 +# CONFIG_XEN_USB_BACKEND is not set
   89.19 +CONFIG_XEN_SCRUB_PAGES=y
   89.20 +CONFIG_XEN_NETDEV_FRONTEND=y
   89.21 +CONFIG_XEN_BLKDEV_FRONTEND=y
   89.22 +CONFIG_XEN_BLKDEV_GRANT=y
   89.23 +# CONFIG_XEN_USB_FRONTEND is not set
   89.24 +CONFIG_NO_IDLE_HZ=y
   89.25 +CONFIG_FOREIGN_PAGES=y
   89.26 +
   89.27 +#
   89.28 +# Code maturity level options
   89.29 +#
   89.30 +CONFIG_EXPERIMENTAL=y
   89.31 +
   89.32 +#
   89.33 +# Loadable module support
   89.34 +#
   89.35 +CONFIG_MODULES=y
   89.36 +CONFIG_MODVERSIONS=y
   89.37 +CONFIG_KMOD=y
   89.38 +
   89.39 +#
   89.40 +# Processor type and features
   89.41 +#
   89.42 +CONFIG_M686=y
   89.43 +# CONFIG_MPENTIUMIII is not set
   89.44 +# CONFIG_MPENTIUM4 is not set
   89.45 +# CONFIG_MK7 is not set
   89.46 +# CONFIG_MK8 is not set
   89.47 +# CONFIG_MVIAC3_2 is not set
   89.48 +CONFIG_X86_WP_WORKS_OK=y
   89.49 +CONFIG_X86_INVLPG=y
   89.50 +CONFIG_X86_CMPXCHG=y
   89.51 +CONFIG_X86_XADD=y
   89.52 +CONFIG_X86_BSWAP=y
   89.53 +CONFIG_X86_POPAD_OK=y
   89.54 +# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
   89.55 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
   89.56 +CONFIG_X86_GOOD_APIC=y
   89.57 +CONFIG_X86_PGE=y
   89.58 +CONFIG_X86_USE_PPRO_CHECKSUM=y
   89.59 +CONFIG_X86_TSC=y
   89.60 +CONFIG_X86_L1_CACHE_SHIFT=5
   89.61 +CONFIG_NOHIGHMEM=y
   89.62 +# CONFIG_HIGHMEM4G is not set
   89.63 +CONFIG_FORCE_MAX_ZONEORDER=11
   89.64 +
   89.65 +#
   89.66 +# General setup
   89.67 +#
   89.68 +CONFIG_NET=y
   89.69 +CONFIG_PCI=y
   89.70 +CONFIG_PCI_NAMES=y
   89.71 +CONFIG_HOTPLUG=y
   89.72 +
   89.73 +#
   89.74 +# PCMCIA/CardBus support
   89.75 +#
   89.76 +# CONFIG_PCMCIA is not set
   89.77 +
   89.78 +#
   89.79 +# PCI Hotplug Support
   89.80 +#
   89.81 +# CONFIG_HOTPLUG_PCI is not set
   89.82 +# CONFIG_HOTPLUG_PCI_COMPAQ is not set
   89.83 +# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
   89.84 +# CONFIG_HOTPLUG_PCI_SHPC is not set
   89.85 +# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
   89.86 +# CONFIG_HOTPLUG_PCI_PCIE is not set
   89.87 +# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
   89.88 +CONFIG_SYSVIPC=y
   89.89 +# CONFIG_BSD_PROCESS_ACCT is not set
   89.90 +CONFIG_SYSCTL=y
   89.91 +CONFIG_KCORE_ELF=y
   89.92 +# CONFIG_KCORE_AOUT is not set
   89.93 +CONFIG_BINFMT_AOUT=y
   89.94 +CONFIG_BINFMT_ELF=y
   89.95 +# CONFIG_BINFMT_MISC is not set
   89.96 +# CONFIG_OOM_KILLER is not set
   89.97 +
   89.98 +#
   89.99 +# Memory Technology Devices (MTD)
  89.100 +#
  89.101 +# CONFIG_MTD is not set
  89.102 +
  89.103 +#
  89.104 +# Parallel port support
  89.105 +#
  89.106 +# CONFIG_PARPORT is not set
  89.107 +
  89.108 +#
  89.109 +# Plug and Play configuration
  89.110 +#
  89.111 +CONFIG_PNP=y
  89.112 +# CONFIG_ISAPNP is not set
  89.113 +
  89.114 +#
  89.115 +# Block devices
  89.116 +#
  89.117 +# CONFIG_BLK_DEV_FD is not set
  89.118 +# CONFIG_BLK_DEV_XD is not set
  89.119 +# CONFIG_PARIDE is not set
  89.120 +# CONFIG_BLK_CPQ_DA is not set
  89.121 +# CONFIG_BLK_CPQ_CISS_DA is not set
  89.122 +# CONFIG_CISS_SCSI_TAPE is not set
  89.123 +# CONFIG_CISS_MONITOR_THREAD is not set
  89.124 +# CONFIG_BLK_DEV_DAC960 is not set
  89.125 +# CONFIG_BLK_DEV_UMEM is not set
  89.126 +# CONFIG_BLK_DEV_SX8 is not set
  89.127 +CONFIG_BLK_DEV_LOOP=y
  89.128 +CONFIG_BLK_DEV_NBD=y
  89.129 +CONFIG_BLK_DEV_RAM=y
  89.130 +CONFIG_BLK_DEV_RAM_SIZE=4096
  89.131 +CONFIG_BLK_DEV_INITRD=y
  89.132 +# CONFIG_BLK_STATS is not set
  89.133 +
  89.134 +#
  89.135 +# Multi-device support (RAID and LVM)
  89.136 +#
  89.137 +CONFIG_MD=y
  89.138 +CONFIG_BLK_DEV_MD=y
  89.139 +CONFIG_MD_LINEAR=y
  89.140 +# CONFIG_MD_RAID0 is not set
  89.141 +CONFIG_MD_RAID1=y
  89.142 +# CONFIG_MD_RAID5 is not set
  89.143 +# CONFIG_MD_MULTIPATH is not set
  89.144 +CONFIG_BLK_DEV_LVM=y
  89.145 +
  89.146 +#
  89.147 +# Networking options
  89.148 +#
  89.149 +CONFIG_PACKET=y
  89.150 +CONFIG_PACKET_MMAP=y
  89.151 +# CONFIG_NETLINK_DEV is not set
  89.152 +CONFIG_NETFILTER=y
  89.153 +# CONFIG_NETFILTER_DEBUG is not set
  89.154 +CONFIG_FILTER=y
  89.155 +CONFIG_UNIX=y
  89.156 +CONFIG_INET=y
  89.157 +# CONFIG_IP_MULTICAST is not set
  89.158 +# CONFIG_IP_ADVANCED_ROUTER is not set
  89.159 +CONFIG_IP_PNP=y
  89.160 +CONFIG_IP_PNP_DHCP=y
  89.161 +# CONFIG_IP_PNP_BOOTP is not set
  89.162 +# CONFIG_IP_PNP_RARP is not set
  89.163 +# CONFIG_NET_IPIP is not set
  89.164 +# CONFIG_NET_IPGRE is not set
  89.165 +# CONFIG_ARPD is not set
  89.166 +# CONFIG_INET_ECN is not set
  89.167 +# CONFIG_SYN_COOKIES is not set
  89.168 +
  89.169 +#
  89.170 +#   IP: Netfilter Configuration
  89.171 +#
  89.172 +CONFIG_IP_NF_CONNTRACK=m
  89.173 +CONFIG_IP_NF_FTP=m
  89.174 +# CONFIG_IP_NF_AMANDA is not set
  89.175 +CONFIG_IP_NF_TFTP=m
  89.176 +CONFIG_IP_NF_IRC=m
  89.177 +# CONFIG_IP_NF_QUEUE is not set
  89.178 +CONFIG_IP_NF_IPTABLES=y
  89.179 +# CONFIG_IP_NF_MATCH_LIMIT is not set
  89.180 +# CONFIG_IP_NF_MATCH_MAC is not set
  89.181 +# CONFIG_IP_NF_MATCH_PKTTYPE is not set
  89.182 +# CONFIG_IP_NF_MATCH_MARK is not set
  89.183 +# CONFIG_IP_NF_MATCH_MULTIPORT is not set
  89.184 +# CONFIG_IP_NF_MATCH_TOS is not set
  89.185 +# CONFIG_IP_NF_MATCH_RECENT is not set
  89.186 +# CONFIG_IP_NF_MATCH_ECN is not set
  89.187 +# CONFIG_IP_NF_MATCH_DSCP is not set
  89.188 +# CONFIG_IP_NF_MATCH_AH_ESP is not set
  89.189 +# CONFIG_IP_NF_MATCH_LENGTH is not set
  89.190 +# CONFIG_IP_NF_MATCH_TTL is not set
  89.191 +# CONFIG_IP_NF_MATCH_TCPMSS is not set
  89.192 +# CONFIG_IP_NF_MATCH_HELPER is not set
  89.193 +CONFIG_IP_NF_MATCH_STATE=m
  89.194 +CONFIG_IP_NF_MATCH_CONNTRACK=m
  89.195 +# CONFIG_IP_NF_MATCH_UNCLEAN is not set
  89.196 +# CONFIG_IP_NF_MATCH_OWNER is not set
  89.197 +CONFIG_IP_NF_MATCH_PHYSDEV=y
  89.198 +CONFIG_IP_NF_FILTER=y
  89.199 +CONFIG_IP_NF_TARGET_REJECT=y
  89.200 +# CONFIG_IP_NF_TARGET_MIRROR is not set
  89.201 +CONFIG_IP_NF_NAT=m
  89.202 +CONFIG_IP_NF_NAT_NEEDED=y
  89.203 +CONFIG_IP_NF_TARGET_MASQUERADE=m
  89.204 +CONFIG_IP_NF_TARGET_REDIRECT=m
  89.205 +# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
  89.206 +CONFIG_IP_NF_NAT_IRC=m
  89.207 +CONFIG_IP_NF_NAT_FTP=m
  89.208 +CONFIG_IP_NF_NAT_TFTP=m
  89.209 +# CONFIG_IP_NF_MANGLE is not set
  89.210 +CONFIG_IP_NF_TARGET_LOG=y
  89.211 +CONFIG_IP_NF_TARGET_ULOG=y
  89.212 +# CONFIG_IP_NF_TARGET_TCPMSS is not set
  89.213 +# CONFIG_IP_NF_ARPTABLES is not set
  89.214 +
  89.215 +#
  89.216 +#   IP: Virtual Server Configuration
  89.217 +#
  89.218 +# CONFIG_IP_VS is not set
  89.219 +# CONFIG_IPV6 is not set
  89.220 +# CONFIG_KHTTPD is not set
  89.221 +
  89.222 +#
  89.223 +#    SCTP Configuration (EXPERIMENTAL)
  89.224 +#
  89.225 +# CONFIG_IP_SCTP is not set
  89.226 +# CONFIG_ATM is not set
  89.227 +CONFIG_VLAN_8021Q=y
  89.228 +# CONFIG_IPX is not set
  89.229 +# CONFIG_ATALK is not set
  89.230 +# CONFIG_DECNET is not set
  89.231 +CONFIG_BRIDGE=y
  89.232 +CONFIG_BRIDGE_NF_EBTABLES=m
  89.233 +CONFIG_BRIDGE_EBT_T_FILTER=m
  89.234 +CONFIG_BRIDGE_EBT_T_NAT=m
  89.235 +CONFIG_BRIDGE_EBT_BROUTE=m
  89.236 +CONFIG_BRIDGE_EBT_LOG=m
  89.237 +CONFIG_BRIDGE_EBT_IPF=m
  89.238 +CONFIG_BRIDGE_EBT_ARPF=m
  89.239 +CONFIG_BRIDGE_EBT_AMONG=m
  89.240 +CONFIG_BRIDGE_EBT_LIMIT=m
  89.241 +CONFIG_BRIDGE_EBT_VLANF=m
  89.242 +CONFIG_BRIDGE_EBT_802_3=m
  89.243 +CONFIG_BRIDGE_EBT_PKTTYPE=m
  89.244 +CONFIG_BRIDGE_EBT_STP=m
  89.245 +CONFIG_BRIDGE_EBT_MARKF=m
  89.246 +CONFIG_BRIDGE_EBT_ARPREPLY=m
  89.247 +CONFIG_BRIDGE_EBT_SNAT=m
  89.248 +CONFIG_BRIDGE_EBT_DNAT=m
  89.249 +CONFIG_BRIDGE_EBT_REDIRECT=m
  89.250 +CONFIG_BRIDGE_EBT_MARK_T=m
  89.251 +# CONFIG_X25 is not set
  89.252 +# CONFIG_LAPB is not set
  89.253 +# CONFIG_LLC is not set
  89.254 +# CONFIG_NET_DIVERT is not set
  89.255 +# CONFIG_ECONET is not set
  89.256 +# CONFIG_WAN_ROUTER is not set
  89.257 +# CONFIG_NET_FASTROUTE is not set
  89.258 +# CONFIG_NET_HW_FLOWCONTROL is not set
  89.259 +
  89.260 +#
  89.261 +# QoS and/or fair queueing
  89.262 +#
  89.263 +# CONFIG_NET_SCHED is not set
  89.264 +
  89.265 +#
  89.266 +# Network testing
  89.267 +#
  89.268 +# CONFIG_NET_PKTGEN is not set
  89.269 +
  89.270 +#
  89.271 +# ATA/IDE/MFM/RLL support
  89.272 +#
  89.273 +CONFIG_IDE=y
  89.274 +
  89.275 +#
  89.276 +# IDE, ATA and ATAPI Block devices
  89.277 +#
  89.278 +CONFIG_BLK_DEV_IDE=y
  89.279 +# CONFIG_BLK_DEV_HD_IDE is not set
  89.280 +# CONFIG_BLK_DEV_HD is not set
  89.281 +# CONFIG_BLK_DEV_IDE_SATA is not set
  89.282 +CONFIG_BLK_DEV_IDEDISK=y
  89.283 +CONFIG_IDEDISK_MULTI_MODE=y
  89.284 +CONFIG_IDEDISK_STROKE=y
  89.285 +# CONFIG_BLK_DEV_IDECS is not set
  89.286 +# CONFIG_BLK_DEV_DELKIN is not set
  89.287 +CONFIG_BLK_DEV_IDECD=y
  89.288 +CONFIG_BLK_DEV_IDETAPE=y
  89.289 +CONFIG_BLK_DEV_IDEFLOPPY=y
  89.290 +CONFIG_BLK_DEV_IDESCSI=y
  89.291 +CONFIG_IDE_TASK_IOCTL=y
  89.292 +CONFIG_BLK_DEV_CMD640=y
  89.293 +CONFIG_BLK_DEV_CMD640_ENHANCED=y
  89.294 +# CONFIG_BLK_DEV_ISAPNP is not set
  89.295 +CONFIG_BLK_DEV_IDEPCI=y
  89.296 +CONFIG_BLK_DEV_GENERIC=y
  89.297 +CONFIG_IDEPCI_SHARE_IRQ=y
  89.298 +CONFIG_BLK_DEV_IDEDMA_PCI=y
  89.299 +CONFIG_BLK_DEV_OFFBOARD=y
  89.300 +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
  89.301 +CONFIG_IDEDMA_PCI_AUTO=y
  89.302 +# CONFIG_IDEDMA_ONLYDISK is not set
  89.303 +CONFIG_BLK_DEV_IDEDMA=y
  89.304 +# CONFIG_IDEDMA_PCI_WIP is not set
  89.305 +CONFIG_BLK_DEV_ADMA100=y
  89.306 +CONFIG_BLK_DEV_AEC62XX=y
  89.307 +CONFIG_BLK_DEV_ALI15X3=y
  89.308 +CONFIG_WDC_ALI15X3=y
  89.309 +CONFIG_BLK_DEV_AMD74XX=y
  89.310 +CONFIG_AMD74XX_OVERRIDE=y
  89.311 +# CONFIG_BLK_DEV_ATIIXP is not set
  89.312 +CONFIG_BLK_DEV_CMD64X=y
  89.313 +CONFIG_BLK_DEV_TRIFLEX=y
  89.314 +CONFIG_BLK_DEV_CY82C693=y
  89.315 +CONFIG_BLK_DEV_CS5530=y
  89.316 +CONFIG_BLK_DEV_HPT34X=y
  89.317 +# CONFIG_HPT34X_AUTODMA is not set
  89.318 +CONFIG_BLK_DEV_HPT366=y
  89.319 +CONFIG_BLK_DEV_PIIX=y
  89.320 +CONFIG_BLK_DEV_NS87415=y
  89.321 +# CONFIG_BLK_DEV_OPTI621 is not set
  89.322 +CONFIG_BLK_DEV_PDC202XX_OLD=y
  89.323 +CONFIG_PDC202XX_BURST=y
  89.324 +CONFIG_BLK_DEV_PDC202XX_NEW=y
  89.325 +CONFIG_PDC202XX_FORCE=y
  89.326 +CONFIG_BLK_DEV_RZ1000=y
  89.327 +CONFIG_BLK_DEV_SC1200=y
  89.328 +CONFIG_BLK_DEV_SVWKS=y
  89.329 +CONFIG_BLK_DEV_SIIMAGE=y
  89.330 +CONFIG_BLK_DEV_SIS5513=y
  89.331 +CONFIG_BLK_DEV_SLC90E66=y
  89.332 +CONFIG_BLK_DEV_TRM290=y
  89.333 +CONFIG_BLK_DEV_VIA82CXXX=y
  89.334 +CONFIG_IDE_CHIPSETS=y
  89.335 +# CONFIG_BLK_DEV_4DRIVES is not set
  89.336 +# CONFIG_BLK_DEV_ALI14XX is not set
  89.337 +# CONFIG_BLK_DEV_DTC2278 is not set
  89.338 +# CONFIG_BLK_DEV_HT6560B is not set
  89.339 +# CONFIG_BLK_DEV_PDC4030 is not set
  89.340 +# CONFIG_BLK_DEV_QD65XX is not set
  89.341 +# CONFIG_BLK_DEV_UMC8672 is not set
  89.342 +CONFIG_IDEDMA_AUTO=y
  89.343 +# CONFIG_IDEDMA_IVB is not set
  89.344 +# CONFIG_DMA_NONPCI is not set
  89.345 +CONFIG_BLK_DEV_PDC202XX=y
  89.346 +# CONFIG_BLK_DEV_ATARAID is not set
  89.347 +# CONFIG_BLK_DEV_ATARAID_PDC is not set
  89.348 +# CONFIG_BLK_DEV_ATARAID_HPT is not set
  89.349 +# CONFIG_BLK_DEV_ATARAID_MEDLEY is not set
  89.350 +# CONFIG_BLK_DEV_ATARAID_SII is not set
  89.351 +
  89.352 +#
  89.353 +# SCSI support
  89.354 +#
  89.355 +CONFIG_SCSI=y
  89.356 +CONFIG_BLK_DEV_SD=y
  89.357 +CONFIG_SD_EXTRA_DEVS=40
  89.358 +# CONFIG_CHR_DEV_ST is not set
  89.359 +# CONFIG_CHR_DEV_OSST is not set
  89.360 +# CONFIG_BLK_DEV_SR is not set
  89.361 +CONFIG_CHR_DEV_SG=y
  89.362 +# CONFIG_SCSI_DEBUG_QUEUES is not set
  89.363 +# CONFIG_SCSI_MULTI_LUN is not set
  89.364 +# CONFIG_SCSI_CONSTANTS is not set
  89.365 +# CONFIG_SCSI_LOGGING is not set
  89.366 +
  89.367 +#
  89.368 +# SCSI low-level drivers
  89.369 +#
  89.370 +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
  89.371 +# CONFIG_SCSI_7000FASST is not set
  89.372 +# CONFIG_SCSI_ACARD is not set
  89.373 +# CONFIG_SCSI_AHA152X is not set
  89.374 +# CONFIG_SCSI_AHA1542 is not set
  89.375 +# CONFIG_SCSI_AHA1740 is not set
  89.376 +CONFIG_SCSI_AACRAID=y
  89.377 +CONFIG_SCSI_AIC7XXX=y
  89.378 +CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
  89.379 +CONFIG_AIC7XXX_RESET_DELAY_MS=15000
  89.380 +# CONFIG_AIC7XXX_PROBE_EISA_VL is not set
  89.381 +# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
  89.382 +# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
  89.383 +CONFIG_AIC7XXX_DEBUG_MASK=0
  89.384 +# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
  89.385 +CONFIG_SCSI_AIC79XX=y
  89.386 +CONFIG_AIC79XX_CMDS_PER_DEVICE=32
  89.387 +CONFIG_AIC79XX_RESET_DELAY_MS=15000
  89.388 +# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
  89.389 +# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
  89.390 +# CONFIG_AIC79XX_DEBUG_ENABLE is not set
  89.391 +CONFIG_AIC79XX_DEBUG_MASK=0
  89.392 +# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
  89.393 +# CONFIG_SCSI_DPT_I2O is not set
  89.394 +# CONFIG_SCSI_ADVANSYS is not set
  89.395 +# CONFIG_SCSI_IN2000 is not set
  89.396 +# CONFIG_SCSI_AM53C974 is not set
  89.397 +CONFIG_SCSI_MEGARAID=y
  89.398 +# CONFIG_SCSI_MEGARAID2 is not set
  89.399 +CONFIG_SCSI_SATA=y
  89.400 +# CONFIG_SCSI_SATA_AHCI is not set
  89.401 +# CONFIG_SCSI_SATA_SVW is not set
  89.402 +CONFIG_SCSI_ATA_PIIX=y
  89.403 +# CONFIG_SCSI_SATA_NV is not set
  89.404 +# CONFIG_SCSI_SATA_QSTOR is not set
  89.405 +CONFIG_SCSI_SATA_PROMISE=y
  89.406 +CONFIG_SCSI_SATA_SX4=y
  89.407 +CONFIG_SCSI_SATA_SIL=y
  89.408 +CONFIG_SCSI_SATA_SIS=y
  89.409 +# CONFIG_SCSI_SATA_ULI is not set
  89.410 +CONFIG_SCSI_SATA_VIA=y
  89.411 +CONFIG_SCSI_SATA_VITESSE=y
  89.412 +CONFIG_SCSI_BUSLOGIC=y
  89.413 +# CONFIG_SCSI_OMIT_FLASHPOINT is not set
  89.414 +# CONFIG_SCSI_CPQFCTS is not set
  89.415 +# CONFIG_SCSI_DMX3191D is not set
  89.416 +# CONFIG_SCSI_DTC3280 is not set
  89.417 +# CONFIG_SCSI_EATA is not set
  89.418 +# CONFIG_SCSI_EATA_DMA is not set
  89.419 +# CONFIG_SCSI_EATA_PIO is not set
  89.420 +# CONFIG_SCSI_FUTURE_DOMAIN is not set
  89.421 +# CONFIG_SCSI_GDTH is not set
  89.422 +# CONFIG_SCSI_GENERIC_NCR5380 is not set
  89.423 +# CONFIG_SCSI_IPS is not set
  89.424 +# CONFIG_SCSI_INITIO is not set
  89.425 +# CONFIG_SCSI_INIA100 is not set
  89.426 +# CONFIG_SCSI_NCR53C406A is not set
  89.427 +# CONFIG_SCSI_NCR53C7xx is not set
  89.428 +CONFIG_SCSI_SYM53C8XX_2=y
  89.429 +CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
  89.430 +CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
  89.431 +CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
  89.432 +# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
  89.433 +# CONFIG_SCSI_PAS16 is not set
  89.434 +# CONFIG_SCSI_PCI2000 is not set
  89.435 +# CONFIG_SCSI_PCI2220I is not set
  89.436 +# CONFIG_SCSI_PSI240I is not set
  89.437 +# CONFIG_SCSI_QLOGIC_FAS is not set
  89.438 +# CONFIG_SCSI_QLOGIC_ISP is not set
  89.439 +# CONFIG_SCSI_QLOGIC_FC is not set
  89.440 +# CONFIG_SCSI_QLOGIC_1280 is not set
  89.441 +# CONFIG_SCSI_SEAGATE is not set
  89.442 +# CONFIG_SCSI_SIM710 is not set
  89.443 +# CONFIG_SCSI_SYM53C416 is not set
  89.444 +# CONFIG_SCSI_DC390T is not set
  89.445 +# CONFIG_SCSI_T128 is not set
  89.446 +# CONFIG_SCSI_U14_34F is not set
  89.447 +# CONFIG_SCSI_ULTRASTOR is not set
  89.448 +# CONFIG_SCSI_NSP32 is not set
  89.449 +# CONFIG_SCSI_DEBUG is not set
  89.450 +
  89.451 +#
  89.452 +# Fusion MPT device support
  89.453 +#
  89.454 +# CONFIG_FUSION is not set
  89.455 +# CONFIG_FUSION_BOOT is not set
  89.456 +# CONFIG_FUSION_ISENSE is not set
  89.457 +# CONFIG_FUSION_CTL is not set
  89.458 +# CONFIG_FUSION_LAN is not set
  89.459 +
  89.460 +#
  89.461 +# IEEE 1394 (FireWire) support (EXPERIMENTAL)
  89.462 +#
  89.463 +# CONFIG_IEEE1394 is not set
  89.464 +
  89.465 +#
  89.466 +# I2O device support
  89.467 +#
  89.468 +# CONFIG_I2O is not set
  89.469 +# CONFIG_I2O_PCI is not set
  89.470 +# CONFIG_I2O_BLOCK is not set
  89.471 +# CONFIG_I2O_LAN is not set
  89.472 +# CONFIG_I2O_SCSI is not set
  89.473 +# CONFIG_I2O_PROC is not set
  89.474 +
  89.475 +#
  89.476 +# Network device support
  89.477 +#
  89.478 +CONFIG_NETDEVICES=y
  89.479 +
  89.480 +#
  89.481 +# ARCnet devices
  89.482 +#
  89.483 +# CONFIG_ARCNET is not set
  89.484 +# CONFIG_DUMMY is not set
  89.485 +# CONFIG_BONDING is not set
  89.486 +# CONFIG_EQUALIZER is not set
  89.487 +# CONFIG_TUN is not set
  89.488 +# CONFIG_ETHERTAP is not set
  89.489 +
  89.490 +#
  89.491 +# Ethernet (10 or 100Mbit)
  89.492 +#
  89.493 +CONFIG_NET_ETHERNET=y
  89.494 +# CONFIG_SUNLANCE is not set
  89.495 +# CONFIG_HAPPYMEAL is not set
  89.496 +# CONFIG_SUNBMAC is not set
  89.497 +# CONFIG_SUNQE is not set
  89.498 +# CONFIG_SUNGEM is not set
  89.499 +CONFIG_NET_VENDOR_3COM=y
  89.500 +# CONFIG_EL1 is not set
  89.501 +# CONFIG_EL2 is not set
  89.502 +# CONFIG_ELPLUS is not set
  89.503 +# CONFIG_EL16 is not set
  89.504 +# CONFIG_EL3 is not set
  89.505 +# CONFIG_3C515 is not set
  89.506 +# CONFIG_ELMC is not set
  89.507 +# CONFIG_ELMC_II is not set
  89.508 +CONFIG_VORTEX=y
  89.509 +# CONFIG_TYPHOON is not set
  89.510 +# CONFIG_LANCE is not set
  89.511 +# CONFIG_NET_VENDOR_SMC is not set
  89.512 +# CONFIG_NET_VENDOR_RACAL is not set
  89.513 +# CONFIG_AT1700 is not set
  89.514 +# CONFIG_DEPCA is not set
  89.515 +# CONFIG_HP100 is not set
  89.516 +# CONFIG_NET_ISA is not set
  89.517 +CONFIG_NET_PCI=y
  89.518 +CONFIG_PCNET32=y
  89.519 +# CONFIG_AMD8111_ETH is not set
  89.520 +# CONFIG_ADAPTEC_STARFIRE is not set
  89.521 +# CONFIG_AC3200 is not set
  89.522 +# CONFIG_APRICOT is not set
  89.523 +# CONFIG_B44 is not set
  89.524 +# CONFIG_CS89x0 is not set
  89.525 +# CONFIG_TULIP is not set
  89.526 +# CONFIG_DE4X5 is not set
  89.527 +# CONFIG_DGRS is not set
  89.528 +# CONFIG_DM9102 is not set
  89.529 +# CONFIG_EEPRO100 is not set
  89.530 +# CONFIG_EEPRO100_PIO is not set
  89.531 +CONFIG_E100=y
  89.532 +# CONFIG_LNE390 is not set
  89.533 +# CONFIG_FEALNX is not set
  89.534 +# CONFIG_NATSEMI is not set
  89.535 +CONFIG_NE2K_PCI=y
  89.536 +# CONFIG_FORCEDETH is not set
  89.537 +# CONFIG_NE3210 is not set
  89.538 +# CONFIG_ES3210 is not set
  89.539 +# CONFIG_8139CP is not set
  89.540 +# CONFIG_8139TOO is not set
  89.541 +# CONFIG_8139TOO_PIO is not set
  89.542 +# CONFIG_8139TOO_TUNE_TWISTER is not set
  89.543 +# CONFIG_8139TOO_8129 is not set
  89.544 +# CONFIG_8139_OLD_RX_RESET is not set
  89.545 +# CONFIG_SIS900 is not set
  89.546 +# CONFIG_EPIC100 is not set
  89.547 +# CONFIG_SUNDANCE is not set
  89.548 +# CONFIG_SUNDANCE_MMIO is not set
  89.549 +# CONFIG_TLAN is not set
  89.550 +# CONFIG_VIA_RHINE is not set
  89.551 +# CONFIG_VIA_RHINE_MMIO is not set
  89.552 +# CONFIG_WINBOND_840 is not set
  89.553 +# CONFIG_NET_POCKET is not set
  89.554 +
  89.555 +#
  89.556 +# Ethernet (1000 Mbit)
  89.557 +#
  89.558 +# CONFIG_ACENIC is not set
  89.559 +# CONFIG_DL2K is not set
  89.560 +CONFIG_E1000=y
  89.561 +# CONFIG_E1000_NAPI is not set
  89.562 +# CONFIG_MYRI_SBUS is not set
  89.563 +# CONFIG_NS83820 is not set
  89.564 +# CONFIG_HAMACHI is not set
  89.565 +# CONFIG_YELLOWFIN is not set
  89.566 +# CONFIG_R8169 is not set
  89.567 +# CONFIG_SK98LIN is not set
  89.568 +CONFIG_TIGON3=y
  89.569 +# CONFIG_FDDI is not set
  89.570 +# CONFIG_HIPPI is not set
  89.571 +# CONFIG_PLIP is not set
  89.572 +# CONFIG_PPP is not set
  89.573 +# CONFIG_SLIP is not set
  89.574 +
  89.575 +#
  89.576 +# Wireless LAN (non-hamradio)
  89.577 +#
  89.578 +# CONFIG_NET_RADIO is not set
  89.579 +
  89.580 +#
  89.581 +# Token Ring devices
  89.582 +#
  89.583 +# CONFIG_TR is not set
  89.584 +# CONFIG_NET_FC is not set
  89.585 +# CONFIG_RCPCI is not set
  89.586 +# CONFIG_SHAPER is not set
  89.587 +
  89.588 +#
  89.589 +# Wan interfaces
  89.590 +#
  89.591 +# CONFIG_WAN is not set
  89.592 +
  89.593 +#
  89.594 +# Amateur Radio support
  89.595 +#
  89.596 +# CONFIG_HAMRADIO is not set
  89.597 +
  89.598 +#
  89.599 +# IrDA (infrared) support
  89.600 +#
  89.601 +# CONFIG_IRDA is not set
  89.602 +
  89.603 +#
  89.604 +# ISDN subsystem
  89.605 +#
  89.606 +# CONFIG_ISDN is not set
  89.607 +
  89.608 +#
  89.609 +# Old CD-ROM drivers (not SCSI, not IDE)
  89.610 +#
  89.611 +# CONFIG_CD_NO_IDESCSI is not set
  89.612 +
  89.613 +#
  89.614 +# Input core support
  89.615 +#
  89.616 +# CONFIG_INPUT is not set
  89.617 +# CONFIG_INPUT_KEYBDEV is not set
  89.618 +# CONFIG_INPUT_MOUSEDEV is not set
  89.619 +# CONFIG_INPUT_JOYDEV is not set
  89.620 +# CONFIG_INPUT_EVDEV is not set
  89.621 +# CONFIG_INPUT_UINPUT is not set
  89.622 +
  89.623 +#
  89.624 +# Character devices
  89.625 +#
  89.626 +CONFIG_VT=y
  89.627 +CONFIG_VT_CONSOLE=y
  89.628 +# CONFIG_SERIAL is not set
  89.629 +# CONFIG_SERIAL_EXTENDED is not set
  89.630 +# CONFIG_SERIAL_NONSTANDARD is not set
  89.631 +CONFIG_UNIX98_PTYS=y
  89.632 +CONFIG_UNIX98_PTY_COUNT=256
  89.633 +
  89.634 +#
  89.635 +# I2C support
  89.636 +#
  89.637 +# CONFIG_I2C is not set
  89.638 +
  89.639 +#
  89.640 +# Mice
  89.641 +#
  89.642 +# CONFIG_BUSMOUSE is not set
  89.643 +CONFIG_MOUSE=y
  89.644 +CONFIG_PSMOUSE=y
  89.645 +# CONFIG_82C710_MOUSE is not set
  89.646 +# CONFIG_PC110_PAD is not set
  89.647 +# CONFIG_MK712_MOUSE is not set
  89.648 +
  89.649 +#
  89.650 +# Joysticks
  89.651 +#
  89.652 +# CONFIG_INPUT_GAMEPORT is not set
  89.653 +# CONFIG_QIC02_TAPE is not set
  89.654 +# CONFIG_IPMI_HANDLER is not set
  89.655 +# CONFIG_IPMI_PANIC_EVENT is not set
  89.656 +# CONFIG_IPMI_DEVICE_INTERFACE is not set
  89.657 +# CONFIG_IPMI_KCS is not set
  89.658 +# CONFIG_IPMI_WATCHDOG is not set
  89.659 +
  89.660 +#
  89.661 +# Watchdog Cards
  89.662 +#
  89.663 +# CONFIG_WATCHDOG is not set
  89.664 +# CONFIG_SCx200 is not set
  89.665 +# CONFIG_SCx200_GPIO is not set
  89.666 +# CONFIG_AMD_RNG is not set
  89.667 +# CONFIG_INTEL_RNG is not set
  89.668 +# CONFIG_HW_RANDOM is not set
  89.669 +# CONFIG_AMD_PM768 is not set
  89.670 +# CONFIG_NVRAM is not set
  89.671 +# CONFIG_RTC is not set
  89.672 +# CONFIG_DTLK is not set
  89.673 +# CONFIG_R3964 is not set
  89.674 +# CONFIG_APPLICOM is not set
  89.675 +# CONFIG_SONYPI is not set
  89.676 +
  89.677 +#
  89.678 +# Ftape, the floppy tape device driver
  89.679 +#
  89.680 +# CONFIG_FTAPE is not set
  89.681 +# CONFIG_AGP is not set
  89.682 +
  89.683 +#
  89.684 +# Direct Rendering Manager (XFree86 DRI support)
  89.685 +#
  89.686 +# CONFIG_DRM is not set
  89.687 +# CONFIG_MWAVE is not set
  89.688 +# CONFIG_OBMOUSE is not set
  89.689 +
  89.690 +#
  89.691 +# Multimedia devices
  89.692 +#
  89.693 +# CONFIG_VIDEO_DEV is not set
  89.694 +
  89.695 +#
  89.696 +# File systems
  89.697 +#
  89.698 +# CONFIG_QUOTA is not set
  89.699 +# CONFIG_QFMT_V2 is not set
  89.700 +CONFIG_AUTOFS_FS=y
  89.701 +CONFIG_AUTOFS4_FS=y
  89.702 +# CONFIG_REISERFS_FS is not set
  89.703 +# CONFIG_REISERFS_CHECK is not set
  89.704 +# CONFIG_REISERFS_PROC_INFO is not set
  89.705 +# CONFIG_ADFS_FS is not set
  89.706 +# CONFIG_ADFS_FS_RW is not set
  89.707 +# CONFIG_AFFS_FS is not set
  89.708 +# CONFIG_HFS_FS is not set
  89.709 +# CONFIG_HFSPLUS_FS is not set
  89.710 +# CONFIG_BEFS_FS is not set
  89.711 +# CONFIG_BEFS_DEBUG is not set
  89.712 +# CONFIG_BFS_FS is not set
  89.713 +CONFIG_EXT3_FS=y
  89.714 +CONFIG_JBD=y
  89.715 +# CONFIG_JBD_DEBUG is not set
  89.716 +CONFIG_FAT_FS=y
  89.717 +CONFIG_MSDOS_FS=y
  89.718 +CONFIG_UMSDOS_FS=y
  89.719 +CONFIG_VFAT_FS=y
  89.720 +# CONFIG_EFS_FS is not set
  89.721 +# CONFIG_JFFS_FS is not set
  89.722 +# CONFIG_JFFS2_FS is not set
  89.723 +# CONFIG_CRAMFS is not set
  89.724 +CONFIG_TMPFS=y
  89.725 +CONFIG_RAMFS=y
  89.726 +CONFIG_ISO9660_FS=y
  89.727 +CONFIG_JOLIET=y
  89.728 +CONFIG_ZISOFS=y
  89.729 +# CONFIG_JFS_FS is not set
  89.730 +# CONFIG_JFS_DEBUG is not set
  89.731 +# CONFIG_JFS_STATISTICS is not set
  89.732 +# CONFIG_MINIX_FS is not set
  89.733 +# CONFIG_VXFS_FS is not set
  89.734 +# CONFIG_NTFS_FS is not set
  89.735 +# CONFIG_NTFS_RW is not set
  89.736 +# CONFIG_HPFS_FS is not set
  89.737 +CONFIG_PROC_FS=y
  89.738 +# CONFIG_DEVFS_FS is not set
  89.739 +# CONFIG_DEVFS_MOUNT is not set
  89.740 +# CONFIG_DEVFS_DEBUG is not set
  89.741 +CONFIG_DEVPTS_FS=y
  89.742 +# CONFIG_QNX4FS_FS is not set
  89.743 +# CONFIG_QNX4FS_RW is not set
  89.744 +# CONFIG_ROMFS_FS is not set
  89.745 +CONFIG_EXT2_FS=y
  89.746 +# CONFIG_SYSV_FS is not set
  89.747 +# CONFIG_UDF_FS is not set
  89.748 +# CONFIG_UDF_RW is not set
  89.749 +# CONFIG_UFS_FS is not set
  89.750 +# CONFIG_UFS_FS_WRITE is not set
  89.751 +# CONFIG_XFS_FS is not set
  89.752 +# CONFIG_XFS_QUOTA is not set
  89.753 +# CONFIG_XFS_RT is not set
  89.754 +# CONFIG_XFS_TRACE is not set
  89.755 +# CONFIG_XFS_DEBUG is not set
  89.756 +
  89.757 +#
  89.758 +# Network File Systems
  89.759 +#
  89.760 +# CONFIG_CODA_FS is not set
  89.761 +# CONFIG_INTERMEZZO_FS is not set
  89.762 +CONFIG_NFS_FS=y
  89.763 +CONFIG_NFS_V3=y
  89.764 +# CONFIG_NFS_DIRECTIO is not set
  89.765 +CONFIG_ROOT_NFS=y
  89.766 +CONFIG_NFSD=y
  89.767 +CONFIG_NFSD_V3=y
  89.768 +# CONFIG_NFSD_TCP is not set
  89.769 +CONFIG_SUNRPC=y
  89.770 +CONFIG_LOCKD=y
  89.771 +CONFIG_LOCKD_V4=y
  89.772 +# CONFIG_SMB_FS is not set
  89.773 +# CONFIG_NCP_FS is not set
  89.774 +# CONFIG_NCPFS_PACKET_SIGNING is not set
  89.775 +# CONFIG_NCPFS_IOCTL_LOCKING is not set
  89.776 +# CONFIG_NCPFS_STRONG is not set
  89.777 +# CONFIG_NCPFS_NFS_NS is not set
  89.778 +# CONFIG_NCPFS_OS2_NS is not set
  89.779 +# CONFIG_NCPFS_SMALLDOS is not set
  89.780 +# CONFIG_NCPFS_NLS is not set
  89.781 +# CONFIG_NCPFS_EXTRAS is not set
  89.782 +CONFIG_ZISOFS_FS=y
  89.783 +
  89.784 +#
  89.785 +# Partition Types
  89.786 +#
  89.787 +CONFIG_PARTITION_ADVANCED=y
  89.788 +# CONFIG_ACORN_PARTITION is not set
  89.789 +# CONFIG_OSF_PARTITION is not set
  89.790 +# CONFIG_AMIGA_PARTITION is not set
  89.791 +# CONFIG_ATARI_PARTITION is not set
  89.792 +# CONFIG_MAC_PARTITION is not set
  89.793 +CONFIG_MSDOS_PARTITION=y
  89.794 +# CONFIG_BSD_DISKLABEL is not set
  89.795 +# CONFIG_MINIX_SUBPARTITION is not set
  89.796 +# CONFIG_SOLARIS_X86_PARTITION is not set
  89.797 +# CONFIG_UNIXWARE_DISKLABEL is not set
  89.798 +# CONFIG_LDM_PARTITION is not set
  89.799 +# CONFIG_SGI_PARTITION is not set
  89.800 +# CONFIG_ULTRIX_PARTITION is not set
  89.801 +# CONFIG_SUN_PARTITION is not set
  89.802 +# CONFIG_EFI_PARTITION is not set
  89.803 +# CONFIG_SMB_NLS is not set
  89.804 +CONFIG_NLS=y
  89.805 +
  89.806 +#
  89.807 +# Native Language Support
  89.808 +#
  89.809 +CONFIG_NLS_DEFAULT="iso8559-1"
  89.810 +# CONFIG_NLS_CODEPAGE_437 is not set
  89.811 +# CONFIG_NLS_CODEPAGE_737 is not set
  89.812 +# CONFIG_NLS_CODEPAGE_775 is not set
  89.813 +# CONFIG_NLS_CODEPAGE_850 is not set
  89.814 +# CONFIG_NLS_CODEPAGE_852 is not set
  89.815 +# CONFIG_NLS_CODEPAGE_855 is not set
  89.816 +# CONFIG_NLS_CODEPAGE_857 is not set
  89.817 +# CONFIG_NLS_CODEPAGE_860 is not set
  89.818 +# CONFIG_NLS_CODEPAGE_861 is not set
  89.819 +# CONFIG_NLS_CODEPAGE_862 is not set
  89.820 +# CONFIG_NLS_CODEPAGE_863 is not set
  89.821 +# CONFIG_NLS_CODEPAGE_864 is not set
  89.822 +# CONFIG_NLS_CODEPAGE_865 is not set
  89.823 +# CONFIG_NLS_CODEPAGE_866 is not set
  89.824 +# CONFIG_NLS_CODEPAGE_869 is not set
  89.825 +# CONFIG_NLS_CODEPAGE_936 is not set
  89.826 +# CONFIG_NLS_CODEPAGE_950 is not set
  89.827 +# CONFIG_NLS_CODEPAGE_932 is not set
  89.828 +# CONFIG_NLS_CODEPAGE_949 is not set
  89.829 +# CONFIG_NLS_CODEPAGE_874 is not set
  89.830 +# CONFIG_NLS_ISO8859_8 is not set
  89.831 +# CONFIG_NLS_CODEPAGE_1250 is not set
  89.832 +# CONFIG_NLS_CODEPAGE_1251 is not set
  89.833 +CONFIG_NLS_ISO8859_1=y
  89.834 +# CONFIG_NLS_ISO8859_2 is not set
  89.835 +# CONFIG_NLS_ISO8859_3 is not set
  89.836 +# CONFIG_NLS_ISO8859_4 is not set
  89.837 +# CONFIG_NLS_ISO8859_5 is not set
  89.838 +# CONFIG_NLS_ISO8859_6 is not set
  89.839 +# CONFIG_NLS_ISO8859_7 is not set
  89.840 +# CONFIG_NLS_ISO8859_9 is not set
  89.841 +# CONFIG_NLS_ISO8859_13 is not set
  89.842 +# CONFIG_NLS_ISO8859_14 is not set
  89.843 +# CONFIG_NLS_ISO8859_15 is not set
  89.844 +# CONFIG_NLS_KOI8_R is not set
  89.845 +# CONFIG_NLS_KOI8_U is not set
  89.846 +# CONFIG_NLS_UTF8 is not set
  89.847 +
  89.848 +#
  89.849 +# Console drivers
  89.850 +#
  89.851 +CONFIG_XEN_CONSOLE=y
  89.852 +CONFIG_VGA_CONSOLE=y
  89.853 +CONFIG_DUMMY_CONSOLE=y
  89.854 +# CONFIG_VIDEO_SELECT is not set
  89.855 +# CONFIG_MDA_CONSOLE is not set
  89.856 +
  89.857 +#
  89.858 +# Frame-buffer support
  89.859 +#
  89.860 +# CONFIG_FB is not set
  89.861 +
  89.862 +#
  89.863 +# Sound
  89.864 +#
  89.865 +# CONFIG_SOUND is not set
  89.866 +
  89.867 +#
  89.868 +# USB support
  89.869 +#
  89.870 +# CONFIG_USB is not set
  89.871 +
  89.872 +#
  89.873 +# Support for USB gadgets
  89.874 +#
  89.875 +# CONFIG_USB_GADGET is not set
  89.876 +
  89.877 +#
  89.878 +# Bluetooth support
  89.879 +#
  89.880 +# CONFIG_BLUEZ is not set
  89.881 +
  89.882 +#
  89.883 +# Kernel hacking
  89.884 +#
  89.885 +CONFIG_DEBUG_KERNEL=y
  89.886 +# CONFIG_DEBUG_STACKOVERFLOW is not set
  89.887 +# CONFIG_DEBUG_HIGHMEM is not set
  89.888 +# CONFIG_DEBUG_SLAB is not set
  89.889 +# CONFIG_DEBUG_IOVIRT is not set
  89.890 +# CONFIG_MAGIC_SYSRQ is not set
  89.891 +# CONFIG_DEBUG_SPINLOCK is not set
  89.892 +# CONFIG_DEBUG_BUGVERBOSE is not set
  89.893 +CONFIG_KALLSYMS=y
  89.894 +# CONFIG_FRAME_POINTER is not set
  89.895 +CONFIG_LOG_BUF_SHIFT=0
  89.896 +
  89.897 +#
  89.898 +# Cryptographic options
  89.899 +#
  89.900 +CONFIG_CRYPTO=y
  89.901 +CONFIG_CRYPTO_HMAC=y
  89.902 +CONFIG_CRYPTO_NULL=m
  89.903 +CONFIG_CRYPTO_MD4=m
  89.904 +CONFIG_CRYPTO_MD5=m
  89.905 +CONFIG_CRYPTO_SHA1=m
  89.906 +CONFIG_CRYPTO_SHA256=m
  89.907 +CONFIG_CRYPTO_SHA512=m
  89.908 +# CONFIG_CRYPTO_WP512 is not set
  89.909 +CONFIG_CRYPTO_DES=m
  89.910 +CONFIG_CRYPTO_BLOWFISH=m
  89.911 +CONFIG_CRYPTO_TWOFISH=m
  89.912 +CONFIG_CRYPTO_SERPENT=m
  89.913 +CONFIG_CRYPTO_AES=m
  89.914 +CONFIG_CRYPTO_CAST5=m
  89.915 +CONFIG_CRYPTO_CAST6=m
  89.916 +# CONFIG_CRYPTO_TEA is not set
  89.917 +# CONFIG_CRYPTO_KHAZAD is not set
  89.918 +# CONFIG_CRYPTO_ANUBIS is not set
  89.919 +CONFIG_CRYPTO_ARC4=m
  89.920 +CONFIG_CRYPTO_DEFLATE=m
  89.921 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
  89.922 +# CONFIG_CRYPTO_TEST is not set
  89.923 +
  89.924 +#
  89.925 +# Library routines
  89.926 +#
  89.927 +# CONFIG_CRC32 is not set
  89.928 +CONFIG_ZLIB_INFLATE=y
  89.929 +CONFIG_ZLIB_DEFLATE=m
  89.930 +# CONFIG_FW_LOADER is not set
    90.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    90.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/defconfig-xenU	Mon Jul 11 14:44:08 2005 +0000
    90.3 @@ -0,0 +1,562 @@
    90.4 +#
    90.5 +# Automatically generated make config: don't edit
    90.6 +#
    90.7 +CONFIG_XEN=y
    90.8 +CONFIG_X86=y
    90.9 +CONFIG_ISA=y
   90.10 +# CONFIG_SBUS is not set
   90.11 +CONFIG_UID16=y
   90.12 +
   90.13 +#
   90.14 +# Xen
   90.15 +#
   90.16 +# CONFIG_XEN_PRIVILEGED_GUEST is not set
   90.17 +# CONFIG_XEN_PHYSDEV_ACCESS is not set
   90.18 +CONFIG_XEN_SCRUB_PAGES=y
   90.19 +CONFIG_XEN_NETDEV_FRONTEND=y
   90.20 +CONFIG_XEN_BLKDEV_FRONTEND=y
   90.21 +CONFIG_XEN_BLKDEV_GRANT=y
   90.22 +# CONFIG_XEN_USB_FRONTEND is not set
   90.23 +CONFIG_NO_IDLE_HZ=y
   90.24 +# CONFIG_FOREIGN_PAGES is not set
   90.25 +CONFIG_NETDEVICES=y
   90.26 +# CONFIG_VT is not set
   90.27 +
   90.28 +#
   90.29 +# Code maturity level options
   90.30 +#
   90.31 +CONFIG_EXPERIMENTAL=y
   90.32 +
   90.33 +#
   90.34 +# Loadable module support
   90.35 +#
   90.36 +CONFIG_MODULES=y
   90.37 +CONFIG_MODVERSIONS=y
   90.38 +CONFIG_KMOD=y
   90.39 +
   90.40 +#
   90.41 +# Processor type and features
   90.42 +#
   90.43 +CONFIG_M686=y
   90.44 +# CONFIG_MPENTIUMIII is not set
   90.45 +# CONFIG_MPENTIUM4 is not set
   90.46 +# CONFIG_MK7 is not set
   90.47 +# CONFIG_MK8 is not set
   90.48 +# CONFIG_MVIAC3_2 is not set
   90.49 +CONFIG_X86_WP_WORKS_OK=y
   90.50 +CONFIG_X86_INVLPG=y
   90.51 +CONFIG_X86_CMPXCHG=y
   90.52 +CONFIG_X86_XADD=y
   90.53 +CONFIG_X86_BSWAP=y
   90.54 +CONFIG_X86_POPAD_OK=y
   90.55 +# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
   90.56 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
   90.57 +CONFIG_X86_GOOD_APIC=y
   90.58 +CONFIG_X86_PGE=y
   90.59 +CONFIG_X86_USE_PPRO_CHECKSUM=y
   90.60 +CONFIG_X86_TSC=y
   90.61 +CONFIG_X86_L1_CACHE_SHIFT=5
   90.62 +CONFIG_NOHIGHMEM=y
   90.63 +# CONFIG_HIGHMEM4G is not set
   90.64 +CONFIG_FORCE_MAX_ZONEORDER=11
   90.65 +
   90.66 +#
   90.67 +# General setup
   90.68 +#
   90.69 +CONFIG_NET=y
   90.70 +CONFIG_SYSVIPC=y
   90.71 +# CONFIG_BSD_PROCESS_ACCT is not set
   90.72 +CONFIG_SYSCTL=y
   90.73 +CONFIG_KCORE_ELF=y
   90.74 +# CONFIG_KCORE_AOUT is not set
   90.75 +CONFIG_BINFMT_AOUT=y
   90.76 +CONFIG_BINFMT_ELF=y
   90.77 +# CONFIG_BINFMT_MISC is not set
   90.78 +# CONFIG_OOM_KILLER is not set
   90.79 +
   90.80 +#
   90.81 +# Networking options
   90.82 +#
   90.83 +CONFIG_PACKET=y
   90.84 +CONFIG_PACKET_MMAP=y
   90.85 +# CONFIG_NETLINK_DEV is not set
   90.86 +CONFIG_NETFILTER=y
   90.87 +# CONFIG_NETFILTER_DEBUG is not set
   90.88 +CONFIG_FILTER=y
   90.89 +CONFIG_UNIX=y
   90.90 +CONFIG_INET=y
   90.91 +# CONFIG_IP_MULTICAST is not set
   90.92 +# CONFIG_IP_ADVANCED_ROUTER is not set
   90.93 +CONFIG_IP_PNP=y
   90.94 +CONFIG_IP_PNP_DHCP=y
   90.95 +# CONFIG_IP_PNP_BOOTP is not set
   90.96 +# CONFIG_IP_PNP_RARP is not set
   90.97 +# CONFIG_NET_IPIP is not set
   90.98 +# CONFIG_NET_IPGRE is not set
   90.99 +# CONFIG_ARPD is not set
  90.100 +# CONFIG_INET_ECN is not set
  90.101 +# CONFIG_SYN_COOKIES is not set
  90.102 +
  90.103 +#
  90.104 +#   IP: Netfilter Configuration
  90.105 +#
  90.106 +CONFIG_IP_NF_CONNTRACK=y
  90.107 +CONFIG_IP_NF_FTP=y
  90.108 +# CONFIG_IP_NF_AMANDA is not set
  90.109 +CONFIG_IP_NF_TFTP=y
  90.110 +CONFIG_IP_NF_IRC=y
  90.111 +# CONFIG_IP_NF_QUEUE is not set
  90.112 +CONFIG_IP_NF_IPTABLES=y
  90.113 +# CONFIG_IP_NF_MATCH_LIMIT is not set
  90.114 +# CONFIG_IP_NF_MATCH_MAC is not set
  90.115 +# CONFIG_IP_NF_MATCH_PKTTYPE is not set
  90.116 +# CONFIG_IP_NF_MATCH_MARK is not set
  90.117 +# CONFIG_IP_NF_MATCH_MULTIPORT is not set
  90.118 +# CONFIG_IP_NF_MATCH_TOS is not set
  90.119 +# CONFIG_IP_NF_MATCH_RECENT is not set
  90.120 +# CONFIG_IP_NF_MATCH_ECN is not set
  90.121 +# CONFIG_IP_NF_MATCH_DSCP is not set
  90.122 +# CONFIG_IP_NF_MATCH_AH_ESP is not set
  90.123 +# CONFIG_IP_NF_MATCH_LENGTH is not set
  90.124 +# CONFIG_IP_NF_MATCH_TTL is not set
  90.125 +# CONFIG_IP_NF_MATCH_TCPMSS is not set
  90.126 +# CONFIG_IP_NF_MATCH_HELPER is not set
  90.127 +CONFIG_IP_NF_MATCH_STATE=y
  90.128 +CONFIG_IP_NF_MATCH_CONNTRACK=y
  90.129 +# CONFIG_IP_NF_MATCH_UNCLEAN is not set
  90.130 +# CONFIG_IP_NF_MATCH_OWNER is not set
  90.131 +CONFIG_IP_NF_FILTER=y
  90.132 +CONFIG_IP_NF_TARGET_REJECT=y
  90.133 +# CONFIG_IP_NF_TARGET_MIRROR is not set
  90.134 +CONFIG_IP_NF_NAT=y
  90.135 +CONFIG_IP_NF_NAT_NEEDED=y
  90.136 +CONFIG_IP_NF_TARGET_MASQUERADE=y
  90.137 +CONFIG_IP_NF_TARGET_REDIRECT=y
  90.138 +# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
  90.139 +CONFIG_IP_NF_NAT_IRC=y
  90.140 +CONFIG_IP_NF_NAT_FTP=y
  90.141 +CONFIG_IP_NF_NAT_TFTP=y
  90.142 +# CONFIG_IP_NF_MANGLE is not set
  90.143 +CONFIG_IP_NF_TARGET_LOG=y
  90.144 +CONFIG_IP_NF_TARGET_ULOG=y
  90.145 +# CONFIG_IP_NF_TARGET_TCPMSS is not set
  90.146 +# CONFIG_IP_NF_ARPTABLES is not set
  90.147 +
  90.148 +#
  90.149 +#   IP: Virtual Server Configuration
  90.150 +#
  90.151 +# CONFIG_IP_VS is not set
  90.152 +# CONFIG_IPV6 is not set
  90.153 +# CONFIG_KHTTPD is not set
  90.154 +
  90.155 +#
  90.156 +#    SCTP Configuration (EXPERIMENTAL)
  90.157 +#
  90.158 +# CONFIG_IP_SCTP is not set
  90.159 +# CONFIG_ATM is not set
  90.160 +CONFIG_VLAN_8021Q=y
  90.161 +
  90.162 +#
  90.163 +#  
  90.164 +#
  90.165 +# CONFIG_IPX is not set
  90.166 +# CONFIG_ATALK is not set
  90.167 +# CONFIG_DECNET is not set
  90.168 +# CONFIG_BRIDGE is not set
  90.169 +# CONFIG_X25 is not set
  90.170 +# CONFIG_LAPB is not set
  90.171 +# CONFIG_LLC is not set
  90.172 +# CONFIG_NET_DIVERT is not set
  90.173 +# CONFIG_ECONET is not set
  90.174 +# CONFIG_WAN_ROUTER is not set
  90.175 +# CONFIG_NET_FASTROUTE is not set
  90.176 +# CONFIG_NET_HW_FLOWCONTROL is not set
  90.177 +
  90.178 +#
  90.179 +# QoS and/or fair queueing
  90.180 +#
  90.181 +# CONFIG_NET_SCHED is not set
  90.182 +
  90.183 +#
  90.184 +# Network testing
  90.185 +#
  90.186 +# CONFIG_NET_PKTGEN is not set
  90.187 +
  90.188 +#
  90.189 +# SCSI support
  90.190 +#
  90.191 +CONFIG_SCSI=y
  90.192 +
  90.193 +#
  90.194 +# SCSI support type (disk, tape, CD-ROM)
  90.195 +#
  90.196 +CONFIG_BLK_DEV_SD=y
  90.197 +CONFIG_SD_EXTRA_DEVS=40
  90.198 +# CONFIG_CHR_DEV_ST is not set
  90.199 +# CONFIG_CHR_DEV_OSST is not set
  90.200 +# CONFIG_BLK_DEV_SR is not set
  90.201 +CONFIG_CHR_DEV_SG=y
  90.202 +
  90.203 +#
  90.204 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
  90.205 +#
  90.206 +# CONFIG_SCSI_DEBUG_QUEUES is not set
  90.207 +# CONFIG_SCSI_MULTI_LUN is not set
  90.208 +# CONFIG_SCSI_CONSTANTS is not set
  90.209 +# CONFIG_SCSI_LOGGING is not set
  90.210 +
  90.211 +#
  90.212 +# SCSI low-level drivers
  90.213 +#
  90.214 +# CONFIG_SCSI_7000FASST is not set
  90.215 +# CONFIG_SCSI_ACARD is not set
  90.216 +# CONFIG_SCSI_AHA152X is not set
  90.217 +# CONFIG_SCSI_AHA1542 is not set
  90.218 +# CONFIG_SCSI_AHA1740 is not set
  90.219 +# CONFIG_SCSI_AACRAID is not set
  90.220 +# CONFIG_SCSI_AIC7XXX is not set
  90.221 +# CONFIG_SCSI_AIC79XX is not set
  90.222 +# CONFIG_SCSI_AIC7XXX_OLD is not set
  90.223 +# CONFIG_SCSI_DPT_I2O is not set
  90.224 +# CONFIG_SCSI_ADVANSYS is not set
  90.225 +# CONFIG_SCSI_IN2000 is not set
  90.226 +# CONFIG_SCSI_AM53C974 is not set
  90.227 +# CONFIG_SCSI_MEGARAID is not set
  90.228 +# CONFIG_SCSI_MEGARAID2 is not set
  90.229 +# CONFIG_SCSI_SATA is not set
  90.230 +# CONFIG_SCSI_SATA_AHCI is not set
  90.231 +# CONFIG_SCSI_SATA_SVW is not set
  90.232 +# CONFIG_SCSI_ATA_PIIX is not set
  90.233 +# CONFIG_SCSI_SATA_NV is not set
  90.234 +# CONFIG_SCSI_SATA_QSTOR is not set
  90.235 +# CONFIG_SCSI_SATA_PROMISE is not set
  90.236 +# CONFIG_SCSI_SATA_SX4 is not set
  90.237 +# CONFIG_SCSI_SATA_SIL is not set
  90.238 +# CONFIG_SCSI_SATA_SIS is not set
  90.239 +# CONFIG_SCSI_SATA_ULI is not set
  90.240 +# CONFIG_SCSI_SATA_VIA is not set
  90.241 +# CONFIG_SCSI_SATA_VITESSE is not set
  90.242 +# CONFIG_SCSI_BUSLOGIC is not set
  90.243 +# CONFIG_SCSI_DMX3191D is not set
  90.244 +# CONFIG_SCSI_DTC3280 is not set
  90.245 +# CONFIG_SCSI_EATA is not set
  90.246 +# CONFIG_SCSI_EATA_DMA is not set
  90.247 +# CONFIG_SCSI_EATA_PIO is not set
  90.248 +# CONFIG_SCSI_FUTURE_DOMAIN is not set
  90.249 +# CONFIG_SCSI_GDTH is not set
  90.250 +# CONFIG_SCSI_GENERIC_NCR5380 is not set
  90.251 +# CONFIG_SCSI_IPS is not set
  90.252 +# CONFIG_SCSI_INITIO is not set
  90.253 +# CONFIG_SCSI_INIA100 is not set
  90.254 +# CONFIG_SCSI_PPA is not set
  90.255 +# CONFIG_SCSI_IMM is not set
  90.256 +# CONFIG_SCSI_NCR53C406A is not set
  90.257 +# CONFIG_SCSI_NCR53C7xx is not set
  90.258 +# CONFIG_SCSI_PAS16 is not set
  90.259 +# CONFIG_SCSI_PCI2000 is not set
  90.260 +# CONFIG_SCSI_PCI2220I is not set
  90.261 +# CONFIG_SCSI_PSI240I is not set
  90.262 +# CONFIG_SCSI_QLOGIC_FAS is not set
  90.263 +# CONFIG_SCSI_SEAGATE is not set
  90.264 +# CONFIG_SCSI_SIM710 is not set
  90.265 +# CONFIG_SCSI_SYM53C416 is not set
  90.266 +# CONFIG_SCSI_T128 is not set
  90.267 +# CONFIG_SCSI_U14_34F is not set
  90.268 +# CONFIG_SCSI_ULTRASTOR is not set
  90.269 +# CONFIG_SCSI_NSP32 is not set
  90.270 +# CONFIG_SCSI_DEBUG is not set
  90.271 +
  90.272 +#
  90.273 +# Block devices
  90.274 +#
  90.275 +CONFIG_BLK_DEV_LOOP=y
  90.276 +CONFIG_BLK_DEV_NBD=y
  90.277 +CONFIG_BLK_DEV_RAM=y
  90.278 +CONFIG_BLK_DEV_RAM_SIZE=4096
  90.279 +CONFIG_BLK_DEV_INITRD=y
  90.280 +# CONFIG_BLK_STATS is not set
  90.281 +# CONFIG_BLK_DEV_HD is not set
  90.282 +
  90.283 +#
  90.284 +# Character devices
  90.285 +#
  90.286 +# CONFIG_VT is not set
  90.287 +# CONFIG_SERIAL is not set
  90.288 +# CONFIG_SERIAL_EXTENDED is not set
  90.289 +# CONFIG_SERIAL_NONSTANDARD is not set
  90.290 +CONFIG_UNIX98_PTYS=y
  90.291 +CONFIG_UNIX98_PTY_COUNT=256
  90.292 +# CONFIG_PRINTER is not set
  90.293 +# CONFIG_PPDEV is not set
  90.294 +# CONFIG_TIPAR is not set
  90.295 +
  90.296 +#
  90.297 +# I2C support
  90.298 +#
  90.299 +# CONFIG_I2C is not set
  90.300 +
  90.301 +#
  90.302 +# Mice
  90.303 +#
  90.304 +# CONFIG_BUSMOUSE is not set
  90.305 +CONFIG_MOUSE=y
  90.306 +CONFIG_PSMOUSE=y
  90.307 +# CONFIG_82C710_MOUSE is not set
  90.308 +# CONFIG_PC110_PAD is not set
  90.309 +# CONFIG_MK712_MOUSE is not set
  90.310 +
  90.311 +#
  90.312 +# Joysticks
  90.313 +#
  90.314 +# CONFIG_INPUT_GAMEPORT is not set
  90.315 +# CONFIG_INPUT_NS558 is not set
  90.316 +# CONFIG_INPUT_LIGHTNING is not set
  90.317 +# CONFIG_INPUT_PCIGAME is not set
  90.318 +# CONFIG_INPUT_CS461X is not set
  90.319 +# CONFIG_INPUT_EMU10K1 is not set
  90.320 +# CONFIG_INPUT_SERIO is not set
  90.321 +# CONFIG_INPUT_SERPORT is not set
  90.322 +
  90.323 +#
  90.324 +# Joysticks
  90.325 +#
  90.326 +# CONFIG_INPUT_ANALOG is not set
  90.327 +# CONFIG_INPUT_A3D is not set
  90.328 +# CONFIG_INPUT_ADI is not set
  90.329 +# CONFIG_INPUT_COBRA is not set
  90.330 +# CONFIG_INPUT_GF2K is not set
  90.331 +# CONFIG_INPUT_GRIP is not set
  90.332 +# CONFIG_INPUT_INTERACT is not set
  90.333 +# CONFIG_INPUT_TMDC is not set
  90.334 +# CONFIG_INPUT_SIDEWINDER is not set
  90.335 +# CONFIG_INPUT_IFORCE_USB is not set
  90.336 +# CONFIG_INPUT_IFORCE_232 is not set
  90.337 +# CONFIG_INPUT_WARRIOR is not set
  90.338 +# CONFIG_INPUT_MAGELLAN is not set
  90.339 +# CONFIG_INPUT_SPACEORB is not set
  90.340 +# CONFIG_INPUT_SPACEBALL is not set
  90.341 +# CONFIG_INPUT_STINGER is not set
  90.342 +# CONFIG_INPUT_DB9 is not set
  90.343 +# CONFIG_INPUT_GAMECON is not set
  90.344 +# CONFIG_INPUT_TURBOGRAFX is not set
  90.345 +# CONFIG_QIC02_TAPE is not set
  90.346 +# CONFIG_IPMI_HANDLER is not set
  90.347 +# CONFIG_IPMI_PANIC_EVENT is not set
  90.348 +# CONFIG_IPMI_DEVICE_INTERFACE is not set
  90.349 +# CONFIG_IPMI_KCS is not set
  90.350 +# CONFIG_IPMI_WATCHDOG is not set
  90.351 +
  90.352 +#
  90.353 +# Watchdog Cards
  90.354 +#
  90.355 +# CONFIG_WATCHDOG is not set
  90.356 +# CONFIG_SCx200 is not set
  90.357 +# CONFIG_SCx200_GPIO is not set
  90.358 +# CONFIG_AMD_RNG is not set
  90.359 +# CONFIG_INTEL_RNG is not set
  90.360 +# CONFIG_HW_RANDOM is not set
  90.361 +# CONFIG_AMD_PM768 is not set
  90.362 +# CONFIG_NVRAM is not set
  90.363 +# CONFIG_RTC is not set
  90.364 +# CONFIG_DTLK is not set
  90.365 +# CONFIG_R3964 is not set
  90.366 +# CONFIG_APPLICOM is not set
  90.367 +# CONFIG_SONYPI is not set
  90.368 +
  90.369 +#
  90.370 +# Ftape, the floppy tape device driver
  90.371 +#
  90.372 +# CONFIG_FTAPE is not set
  90.373 +# CONFIG_AGP is not set
  90.374 +
  90.375 +#
  90.376 +# Direct Rendering Manager (XFree86 DRI support)
  90.377 +#
  90.378 +# CONFIG_DRM is not set
  90.379 +# CONFIG_MWAVE is not set
  90.380 +# CONFIG_OBMOUSE is not set
  90.381 +
  90.382 +#
  90.383 +# File systems
  90.384 +#
  90.385 +# CONFIG_QUOTA is not set
  90.386 +# CONFIG_QFMT_V2 is not set
  90.387 +CONFIG_AUTOFS_FS=y
  90.388 +CONFIG_AUTOFS4_FS=y
  90.389 +# CONFIG_REISERFS_FS is not set
  90.390 +# CONFIG_REISERFS_CHECK is not set
  90.391 +# CONFIG_REISERFS_PROC_INFO is not set
  90.392 +# CONFIG_ADFS_FS is not set
  90.393 +# CONFIG_ADFS_FS_RW is not set
  90.394 +# CONFIG_AFFS_FS is not set
  90.395 +# CONFIG_HFS_FS is not set
  90.396 +# CONFIG_HFSPLUS_FS is not set
  90.397 +# CONFIG_BEFS_FS is not set
  90.398 +# CONFIG_BEFS_DEBUG is not set
  90.399 +# CONFIG_BFS_FS is not set
  90.400 +CONFIG_EXT3_FS=y
  90.401 +CONFIG_JBD=y
  90.402 +# CONFIG_JBD_DEBUG is not set
  90.403 +CONFIG_FAT_FS=y
  90.404 +CONFIG_MSDOS_FS=y
  90.405 +CONFIG_UMSDOS_FS=y
  90.406 +CONFIG_VFAT_FS=y
  90.407 +# CONFIG_EFS_FS is not set
  90.408 +# CONFIG_JFFS_FS is not set
  90.409 +# CONFIG_JFFS2_FS is not set
  90.410 +# CONFIG_CRAMFS is not set
  90.411 +CONFIG_TMPFS=y
  90.412 +CONFIG_RAMFS=y
  90.413 +CONFIG_ISO9660_FS=y
  90.414 +CONFIG_JOLIET=y
  90.415 +CONFIG_ZISOFS=y
  90.416 +# CONFIG_JFS_FS is not set
  90.417 +# CONFIG_JFS_DEBUG is not set
  90.418 +# CONFIG_JFS_STATISTICS is not set
  90.419 +# CONFIG_MINIX_FS is not set
  90.420 +# CONFIG_VXFS_FS is not set
  90.421 +# CONFIG_NTFS_FS is not set
  90.422 +# CONFIG_NTFS_RW is not set
  90.423 +# CONFIG_HPFS_FS is not set
  90.424 +CONFIG_PROC_FS=y
  90.425 +# CONFIG_DEVFS_FS is not set
  90.426 +# CONFIG_DEVFS_MOUNT is not set
  90.427 +# CONFIG_DEVFS_DEBUG is not set
  90.428 +CONFIG_DEVPTS_FS=y
  90.429 +# CONFIG_QNX4FS_FS is not set
  90.430 +# CONFIG_QNX4FS_RW is not set
  90.431 +# CONFIG_ROMFS_FS is not set
  90.432 +CONFIG_EXT2_FS=y
  90.433 +# CONFIG_SYSV_FS is not set
  90.434 +# CONFIG_UDF_FS is not set
  90.435 +# CONFIG_UDF_RW is not set
  90.436 +# CONFIG_UFS_FS is not set
  90.437 +# CONFIG_UFS_FS_WRITE is not set
  90.438 +# CONFIG_XFS_FS is not set
  90.439 +# CONFIG_XFS_QUOTA is not set
  90.440 +# CONFIG_XFS_RT is not set
  90.441 +# CONFIG_XFS_TRACE is not set
  90.442 +# CONFIG_XFS_DEBUG is not set
  90.443 +
  90.444 +#
  90.445 +# Network File Systems
  90.446 +#
  90.447 +# CONFIG_CODA_FS is not set
  90.448 +# CONFIG_INTERMEZZO_FS is not set
  90.449 +CONFIG_NFS_FS=y
  90.450 +CONFIG_NFS_V3=y
  90.451 +# CONFIG_NFS_DIRECTIO is not set
  90.452 +CONFIG_ROOT_NFS=y
  90.453 +CONFIG_NFSD=y
  90.454 +CONFIG_NFSD_V3=y
  90.455 +# CONFIG_NFSD_TCP is not set
  90.456 +CONFIG_SUNRPC=y
  90.457 +CONFIG_LOCKD=y
  90.458 +CONFIG_LOCKD_V4=y
  90.459 +# CONFIG_SMB_FS is not set
  90.460 +# CONFIG_NCP_FS is not set
  90.461 +# CONFIG_NCPFS_PACKET_SIGNING is not set
  90.462 +# CONFIG_NCPFS_IOCTL_LOCKING is not set
  90.463 +# CONFIG_NCPFS_STRONG is not set
  90.464 +# CONFIG_NCPFS_NFS_NS is not set
  90.465 +# CONFIG_NCPFS_OS2_NS is not set
  90.466 +# CONFIG_NCPFS_SMALLDOS is not set
  90.467 +# CONFIG_NCPFS_NLS is not set
  90.468 +# CONFIG_NCPFS_EXTRAS is not set
  90.469 +CONFIG_ZISOFS_FS=y
  90.470 +
  90.471 +#
  90.472 +# Partition Types
  90.473 +#
  90.474 +CONFIG_PARTITION_ADVANCED=y
  90.475 +# CONFIG_ACORN_PARTITION is not set
  90.476 +# CONFIG_OSF_PARTITION is not set
  90.477 +# CONFIG_AMIGA_PARTITION is not set
  90.478 +# CONFIG_ATARI_PARTITION is not set
  90.479 +# CONFIG_MAC_PARTITION is not set
  90.480 +CONFIG_MSDOS_PARTITION=y
  90.481 +# CONFIG_BSD_DISKLABEL is not set
  90.482 +# CONFIG_MINIX_SUBPARTITION is not set
  90.483 +# CONFIG_SOLARIS_X86_PARTITION is not set
  90.484 +# CONFIG_UNIXWARE_DISKLABEL is not set
  90.485 +# CONFIG_LDM_PARTITION is not set
  90.486 +# CONFIG_SGI_PARTITION is not set
  90.487 +# CONFIG_ULTRIX_PARTITION is not set
  90.488 +# CONFIG_SUN_PARTITION is not set
  90.489 +# CONFIG_EFI_PARTITION is not set
  90.490 +# CONFIG_SMB_NLS is not set
  90.491 +CONFIG_NLS=y
  90.492 +
  90.493 +#
  90.494 +# Native Language Support
  90.495 +#
  90.496 +CONFIG_NLS_DEFAULT="iso8559-1"
  90.497 +# CONFIG_NLS_CODEPAGE_437 is not set
  90.498 +# CONFIG_NLS_CODEPAGE_737 is not set
  90.499 +# CONFIG_NLS_CODEPAGE_775 is not set
  90.500 +# CONFIG_NLS_CODEPAGE_850 is not set
  90.501 +# CONFIG_NLS_CODEPAGE_852 is not set
  90.502 +# CONFIG_NLS_CODEPAGE_855 is not set
  90.503 +# CONFIG_NLS_CODEPAGE_857 is not set
  90.504 +# CONFIG_NLS_CODEPAGE_860 is not set
  90.505 +# CONFIG_NLS_CODEPAGE_861 is not set
  90.506 +# CONFIG_NLS_CODEPAGE_862 is not set
  90.507 +# CONFIG_NLS_CODEPAGE_863 is not set
  90.508 +# CONFIG_NLS_CODEPAGE_864 is not set
  90.509 +# CONFIG_NLS_CODEPAGE_865 is not set
  90.510 +# CONFIG_NLS_CODEPAGE_866 is not set
  90.511 +# CONFIG_NLS_CODEPAGE_869 is not set
  90.512 +# CONFIG_NLS_CODEPAGE_936 is not set
  90.513 +# CONFIG_NLS_CODEPAGE_950 is not set
  90.514 +# CONFIG_NLS_CODEPAGE_932 is not set
  90.515 +# CONFIG_NLS_CODEPAGE_949 is not set
  90.516 +# CONFIG_NLS_CODEPAGE_874 is not set
  90.517 +# CONFIG_NLS_ISO8859_8 is not set
  90.518 +# CONFIG_NLS_CODEPAGE_1250 is not set
  90.519 +# CONFIG_NLS_CODEPAGE_1251 is not set
  90.520 +CONFIG_NLS_ISO8859_1=y
  90.521 +# CONFIG_NLS_ISO8859_2 is not set
  90.522 +# CONFIG_NLS_ISO8859_3 is not set
  90.523 +# CONFIG_NLS_ISO8859_4 is not set
  90.524 +# CONFIG_NLS_ISO8859_5 is not set
  90.525 +# CONFIG_NLS_ISO8859_6 is not set
  90.526 +# CONFIG_NLS_ISO8859_7 is not set
  90.527 +# CONFIG_NLS_ISO8859_9 is not set
  90.528 +# CONFIG_NLS_ISO8859_13 is not set
  90.529 +# CONFIG_NLS_ISO8859_14 is not set
  90.530 +# CONFIG_NLS_ISO8859_15 is not set
  90.531 +# CONFIG_NLS_KOI8_R is not set
  90.532 +# CONFIG_NLS_KOI8_U is not set
  90.533 +# CONFIG_NLS_UTF8 is not set
  90.534 +
  90.535 +#
  90.536 +# Console drivers
  90.537 +#
  90.538 +CONFIG_XEN_CONSOLE=y
  90.539 +
  90.540 +#
  90.541 +# Kernel hacking
  90.542 +#
  90.543 +CONFIG_DEBUG_KERNEL=y
  90.544 +# CONFIG_DEBUG_STACKOVERFLOW is not set
  90.545 +# CONFIG_DEBUG_HIGHMEM is not set
  90.546 +# CONFIG_DEBUG_SLAB is not set
  90.547 +# CONFIG_DEBUG_IOVIRT is not set
  90.548 +# CONFIG_MAGIC_SYSRQ is not set
  90.549 +# CONFIG_DEBUG_SPINLOCK is not set
  90.550 +# CONFIG_DEBUG_BUGVERBOSE is not set
  90.551 +CONFIG_KALLSYMS=y
  90.552 +# CONFIG_FRAME_POINTER is not set
  90.553 +CONFIG_LOG_BUF_SHIFT=0
  90.554 +
  90.555 +#
  90.556 +# Cryptographic options
  90.557 +#
  90.558 +# CONFIG_CRYPTO is not set
  90.559 +
  90.560 +#
  90.561 +# Library routines
  90.562 +#
  90.563 +# CONFIG_CRC32 is not set
  90.564 +CONFIG_ZLIB_INFLATE=y
  90.565 +# CONFIG_ZLIB_DEFLATE is not set
    91.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    91.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/drivers/balloon/Makefile	Mon Jul 11 14:44:08 2005 +0000
    91.3 @@ -0,0 +1,4 @@
    91.4 +O_TARGET := drv.o
    91.5 +export-objs := balloon.o
    91.6 +obj-y := balloon.o
    91.7 +include $(TOPDIR)/Rules.make
    92.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    92.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/drivers/blkif/Makefile	Mon Jul 11 14:44:08 2005 +0000
    92.3 @@ -0,0 +1,10 @@
    92.4 +
    92.5 +O_TARGET := drv.o
    92.6 +
    92.7 +subdir-$(CONFIG_XEN_BLKDEV_FRONTEND) += frontend
    92.8 +obj-$(CONFIG_XEN_BLKDEV_FRONTEND)    += frontend/drv.o
    92.9 +
   92.10 +subdir-$(CONFIG_XEN_PHYSDEV_ACCESS) += backend
   92.11 +obj-$(CONFIG_XEN_PHYSDEV_ACCESS)    += backend/drv.o
   92.12 +
   92.13 +include $(TOPDIR)/Rules.make
    93.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    93.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/drivers/blkif/backend/Makefile	Mon Jul 11 14:44:08 2005 +0000
    93.3 @@ -0,0 +1,3 @@
    93.4 +O_TARGET := drv.o
    93.5 +obj-y := main.o control.o interface.o vbd.o
    93.6 +include $(TOPDIR)/Rules.make
    94.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    94.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/drivers/blkif/frontend/Makefile	Mon Jul 11 14:44:08 2005 +0000
    94.3 @@ -0,0 +1,3 @@
    94.4 +O_TARGET := drv.o
    94.5 +obj-y := blkfront.o vbd.o
    94.6 +include $(TOPDIR)/Rules.make
    95.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    95.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/drivers/blkif/frontend/common.h	Mon Jul 11 14:44:08 2005 +0000
    95.3 @@ -0,0 +1,93 @@
    95.4 +/******************************************************************************
    95.5 + * arch/xen/drivers/blkif/frontend/common.h
    95.6 + * 
    95.7 + * Shared definitions between all levels of XenoLinux Virtual block devices.
    95.8 + */
    95.9 +
   95.10 +#ifndef __XEN_DRIVERS_COMMON_H__
   95.11 +#define __XEN_DRIVERS_COMMON_H__
   95.12 +
   95.13 +#include <linux/config.h>
   95.14 +#include <linux/module.h>
   95.15 +#include <linux/kernel.h>
   95.16 +#include <linux/sched.h>
   95.17 +#include <linux/slab.h>
   95.18 +#include <linux/string.h>
   95.19 +#include <linux/errno.h>
   95.20 +#include <linux/fs.h>
   95.21 +#include <linux/hdreg.h>
   95.22 +#include <linux/blkdev.h>
   95.23 +#include <linux/major.h>
   95.24 +#include <asm-xen/xen-public/xen.h>
   95.25 +#include <asm/io.h>
   95.26 +#include <asm/atomic.h>
   95.27 +#include <asm/uaccess.h>
   95.28 +#include <asm-xen/xen-public/io/blkif.h>
   95.29 +
   95.30 +#if 1
   95.31 +#define IPRINTK(fmt, args...) \
   95.32 +    printk(KERN_INFO "xen_blk: " fmt, ##args)
   95.33 +#else
   95.34 +#define IPRINTK(fmt, args...) ((void)0)
   95.35 +#endif
   95.36 +
   95.37 +#if 1
   95.38 +#define WPRINTK(fmt, args...) \
   95.39 +    printk(KERN_WARNING "xen_blk: " fmt, ##args)
   95.40 +#else
   95.41 +#define WPRINTK(fmt, args...) ((void)0)
   95.42 +#endif
   95.43 +
   95.44 +#if 0
   95.45 +#define DPRINTK(_f, _a...) printk ( KERN_ALERT _f , ## _a )
   95.46 +#else
   95.47 +#define DPRINTK(_f, _a...) ((void)0)
   95.48 +#endif
   95.49 +
   95.50 +#if 0
   95.51 +#define DPRINTK_IOCTL(_f, _a...) printk ( KERN_ALERT _f , ## _a )
   95.52 +#else
   95.53 +#define DPRINTK_IOCTL(_f, _a...) ((void)0)
   95.54 +#endif
   95.55 +
   95.56 +/* Private gendisk->flags[] values. */
   95.57 +#define GENHD_FL_XEN        2 /* Is unit a Xen block device?  */
   95.58 +#define GENHD_FL_VIRT_PARTNS 4 /* Are unit partitions virtual? */
   95.59 +
   95.60 +/*
   95.61 + * We have one of these per vbd, whether ide, scsi or 'other'.
   95.62 + * They hang in an array off the gendisk structure. We may end up putting
   95.63 + * all kinds of interesting stuff here :-)
   95.64 + */
   95.65 +typedef struct xl_disk {
   95.66 +    int usage;
   95.67 +} xl_disk_t;
   95.68 +
   95.69 +extern int blkif_open(struct inode *inode, struct file *filep);
   95.70 +extern int blkif_release(struct inode *inode, struct file *filep);
   95.71 +extern int blkif_ioctl(struct inode *inode, struct file *filep,
   95.72 +                                 unsigned command, unsigned long argument);
   95.73 +extern int blkif_check(kdev_t dev);
   95.74 +extern int blkif_revalidate(kdev_t dev);
   95.75 +extern void blkif_control_send(blkif_request_t *req, blkif_response_t *rsp);
   95.76 +extern void do_blkif_request (request_queue_t *rq); 
   95.77 +
   95.78 +extern void xlvbd_update_vbds(void);
   95.79 +
   95.80 +static inline xl_disk_t *xldev_to_xldisk(kdev_t xldev)
   95.81 +{
   95.82 +    struct gendisk *gd = get_gendisk(xldev);
   95.83 +    
   95.84 +    if ( gd == NULL ) 
   95.85 +        return NULL;
   95.86 +    
   95.87 +    return (xl_disk_t *)gd->real_devices + 
   95.88 +        (MINOR(xldev) >> gd->minor_shift);
   95.89 +}
   95.90 +
   95.91 +
   95.92 +/* Virtual block-device subsystem. */
   95.93 +extern int  xlvbd_init(void);
   95.94 +extern void xlvbd_cleanup(void); 
   95.95 +
   95.96 +#endif /* __XEN_DRIVERS_COMMON_H__ */
    96.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    96.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/drivers/blkif/frontend/vbd.c	Mon Jul 11 14:44:08 2005 +0000
    96.3 @@ -0,0 +1,540 @@
    96.4 +/******************************************************************************
    96.5 + * arch/xen/drivers/blkif/frontend/vbd.c
    96.6 + * 
    96.7 + * Xenolinux virtual block-device driver.
    96.8 + * 
    96.9 + * Copyright (c) 2003-2004, Keir Fraser & Steve Hand
   96.10 + * Modifications by Mark A. Williamson are (c) Intel Research Cambridge
   96.11 + */
   96.12 +
   96.13 +#include "common.h"
   96.14 +#include <linux/blk.h>
   96.15 +
   96.16 +/*
   96.17 + * For convenience we distinguish between ide, scsi and 'other' (i.e.
   96.18 + * potentially combinations of the two) in the naming scheme and in a few 
   96.19 + * other places (like default readahead, etc).
   96.20 + */
   96.21 +#define XLIDE_MAJOR_NAME  "hd"
   96.22 +#define XLSCSI_MAJOR_NAME "sd"
   96.23 +#define XLVBD_MAJOR_NAME "xvd"
   96.24 +
   96.25 +#define XLIDE_DEVS_PER_MAJOR   2
   96.26 +#define XLSCSI_DEVS_PER_MAJOR 16
   96.27 +#define XLVBD_DEVS_PER_MAJOR  16
   96.28 +
   96.29 +#define XLIDE_PARTN_SHIFT  6    /* amount to shift minor to get 'real' minor */
   96.30 +#define XLIDE_MAX_PART    (1 << XLIDE_PARTN_SHIFT)     /* minors per ide vbd */
   96.31 +
   96.32 +#define XLSCSI_PARTN_SHIFT 4    /* amount to shift minor to get 'real' minor */
   96.33 +#define XLSCSI_MAX_PART   (1 << XLSCSI_PARTN_SHIFT)   /* minors per scsi vbd */
   96.34 +
   96.35 +#define XLVBD_PARTN_SHIFT  4    /* amount to shift minor to get 'real' minor */
   96.36 +#define XLVBD_MAX_PART    (1 << XLVBD_PARTN_SHIFT) /* minors per 'other' vbd */
   96.37 +
   96.38 +/* The below are for the generic drivers/block/ll_rw_block.c code. */
   96.39 +static int xlide_blksize_size[256];
   96.40 +static int xlide_hardsect_size[256];
   96.41 +static int xlide_max_sectors[256];
   96.42 +static int xlscsi_blksize_size[256];
   96.43 +static int xlscsi_hardsect_size[256];
   96.44 +static int xlscsi_max_sectors[256];
   96.45 +static int xlvbd_blksize_size[256];
   96.46 +static int xlvbd_hardsect_size[256];
   96.47 +static int xlvbd_max_sectors[256];
   96.48 +
   96.49 +/* Information about our VBDs. */
   96.50 +#define MAX_VBDS 64
   96.51 +static int nr_vbds;
   96.52 +static vdisk_t *vbd_info;
   96.53 +
   96.54 +static struct block_device_operations xlvbd_block_fops = 
   96.55 +{
   96.56 +    open:               blkif_open,
   96.57 +    release:            blkif_release,
   96.58 +    ioctl:              blkif_ioctl,
   96.59 +    check_media_change: blkif_check,
   96.60 +    revalidate:         blkif_revalidate,
   96.61 +};
   96.62 +
   96.63 +static int xlvbd_get_vbd_info(vdisk_t *disk_info)
   96.64 +{
   96.65 +    vdisk_t         *buf = (vdisk_t *)__get_free_page(GFP_KERNEL);
   96.66 +    blkif_request_t  req;
   96.67 +    blkif_response_t rsp;
   96.68 +    int              nr;
   96.69 +
   96.70 +    memset(&req, 0, sizeof(req));
   96.71 +    req.operation   = BLKIF_OP_PROBE;
   96.72 +    req.nr_segments = 1;
   96.73 +#ifdef CONFIG_XEN_BLKDEV_GRANT
   96.74 +    blkif_control_probe_send(&req, &rsp,
   96.75 +                             (unsigned long)(virt_to_machine(buf)));
   96.76 +#else
   96.77 +    req.frame_and_sects[0] = virt_to_machine(buf) | 7;
   96.78 +
   96.79 +    blkif_control_send(&req, &rsp);
   96.80 +#endif
   96.81 +
   96.82 +    if ( rsp.status <= 0 )
   96.83 +    {
   96.84 +        printk(KERN_ALERT "Could not probe disks (%d)\n", rsp.status);
   96.85 +        return -1;
   96.86 +    }
   96.87 +
   96.88 +    if ( (nr = rsp.status) > MAX_VBDS )
   96.89 +         nr = MAX_VBDS;
   96.90 +    memcpy(disk_info, buf, nr * sizeof(vdisk_t));
   96.91 +
   96.92 +    return nr;
   96.93 +}
   96.94 +
   96.95 +/*
   96.96 + * xlvbd_init_device - initialise a VBD device
   96.97 + * @disk:              a vdisk_t describing the VBD
   96.98 + *
   96.99 + * Takes a vdisk_t * that describes a VBD the domain has access to.
  96.100 + * Performs appropriate initialisation and registration of the device.
  96.101 + *
  96.102 + * Care needs to be taken when making re-entrant calls to ensure that
  96.103 + * corruption does not occur.  Also, devices that are in use should not have
  96.104 + * their details updated.  This is the caller's responsibility.
  96.105 + */
  96.106 +static int xlvbd_init_device(vdisk_t *xd)
  96.107 +{
  96.108 +    int device = xd->device;
  96.109 +    int major  = MAJOR(device); 
  96.110 +    int minor  = MINOR(device);
  96.111 +    int is_ide = IDE_DISK_MAJOR(major);  /* is this an ide device? */
  96.112 +    int is_scsi= SCSI_BLK_MAJOR(major);  /* is this a scsi device? */
  96.113 +    char *major_name;
  96.114 +    struct gendisk *gd;
  96.115 +    struct block_device *bd;
  96.116 +    xl_disk_t *disk;
  96.117 +    int i, rc = 0, max_part, partno;
  96.118 +    unsigned long capacity;
  96.119 +
  96.120 +    unsigned char buf[64];
  96.121 +
  96.122 +    if ( (bd = bdget(device)) == NULL )
  96.123 +        return -1;
  96.124 +
  96.125 +    if ( ((disk = xldev_to_xldisk(device)) != NULL) && (disk->usage != 0) )
  96.126 +    {
  96.127 +        printk(KERN_ALERT "VBD update failed - in use [dev=%x]\n", device);
  96.128 +        rc = -1;
  96.129 +        goto out;
  96.130 +    }
  96.131 +
  96.132 +    if ( is_ide ) {
  96.133 +
  96.134 +	major_name = XLIDE_MAJOR_NAME; 
  96.135 +	max_part   = XLIDE_MAX_PART;
  96.136 +
  96.137 +    } else if ( is_scsi ) {
  96.138 +
  96.139 +	major_name = XLSCSI_MAJOR_NAME;
  96.140 +	max_part   = XLSCSI_MAX_PART;
  96.141 +
  96.142 +    } else { 
  96.143 +
  96.144 +        /* SMH: hmm - probably a CCISS driver or sim; assume CCISS for now */
  96.145 +	printk(KERN_ALERT "Assuming device %02x:%02x is CCISS/SCSI\n", 
  96.146 +	       major, minor);
  96.147 +	is_scsi    = 1; 
  96.148 +	major_name = "cciss"; 
  96.149 +	max_part   = XLSCSI_MAX_PART;
  96.150 +
  96.151 +    }
  96.152 +    
  96.153 +    partno = minor & (max_part - 1); 
  96.154 +    
  96.155 +    if ( (gd = get_gendisk(device)) == NULL )
  96.156 +    {
  96.157 +        rc = register_blkdev(major, major_name, &xlvbd_block_fops);
  96.158 +        if ( rc < 0 )
  96.159 +        {
  96.160 +            printk(KERN_ALERT "XL VBD: can't get major %d\n", major);
  96.161 +            goto out;
  96.162 +        }
  96.163 +
  96.164 +        if ( is_ide )
  96.165 +        { 
  96.166 +            blksize_size[major]  = xlide_blksize_size;
  96.167 +            hardsect_size[major] = xlide_hardsect_size;
  96.168 +            max_sectors[major]   = xlide_max_sectors;
  96.169 +            read_ahead[major]    = 8;
  96.170 +        } 
  96.171 +        else if ( is_scsi )
  96.172 +        { 
  96.173 +            blksize_size[major]  = xlscsi_blksize_size;
  96.174 +            hardsect_size[major] = xlscsi_hardsect_size;
  96.175 +            max_sectors[major]   = xlscsi_max_sectors;
  96.176 +            read_ahead[major]    = 8;
  96.177 +        }
  96.178 +        else
  96.179 +        { 
  96.180 +            blksize_size[major]  = xlvbd_blksize_size;
  96.181 +            hardsect_size[major] = xlvbd_hardsect_size;
  96.182 +            max_sectors[major]   = xlvbd_max_sectors;
  96.183 +            read_ahead[major]    = 8;
  96.184 +        }
  96.185 +
  96.186 +        blk_init_queue(BLK_DEFAULT_QUEUE(major), do_blkif_request);
  96.187 +
  96.188 +        /*
  96.189 +         * Turn off barking 'headactive' mode. We dequeue buffer heads as
  96.190 +         * soon as we pass them to the back-end driver.
  96.191 +         */
  96.192 +        blk_queue_headactive(BLK_DEFAULT_QUEUE(major), 0);
  96.193 +
  96.194 +        /* Construct an appropriate gendisk structure. */
  96.195 +        gd             = kmalloc(sizeof(struct gendisk), GFP_KERNEL);
  96.196 +        gd->major      = major;
  96.197 +        gd->major_name = major_name; 
  96.198 +    
  96.199 +        gd->max_p      = max_part; 
  96.200 +        if ( is_ide )
  96.201 +        { 
  96.202 +            gd->minor_shift  = XLIDE_PARTN_SHIFT; 
  96.203 +            gd->nr_real      = XLIDE_DEVS_PER_MAJOR; 
  96.204 +        } 
  96.205 +        else if ( is_scsi )
  96.206 +        { 
  96.207 +            gd->minor_shift  = XLSCSI_PARTN_SHIFT; 
  96.208 +            gd->nr_real      = XLSCSI_DEVS_PER_MAJOR; 
  96.209 +        }
  96.210 +        else
  96.211 +        { 
  96.212 +            gd->minor_shift  = XLVBD_PARTN_SHIFT; 
  96.213 +            gd->nr_real      = XLVBD_DEVS_PER_MAJOR; 
  96.214 +        }
  96.215 +
  96.216 +        /* 
  96.217 +        ** The sizes[] and part[] arrays hold the sizes and other 
  96.218 +        ** information about every partition with this 'major' (i.e. 
  96.219 +        ** every disk sharing the 8 bit prefix * max partns per disk) 
  96.220 +        */
  96.221 +        gd->sizes = kmalloc(max_part*gd->nr_real*sizeof(int), GFP_KERNEL);
  96.222 +        gd->part  = kmalloc(max_part*gd->nr_real*sizeof(struct hd_struct), 
  96.223 +                            GFP_KERNEL);
  96.224 +        memset(gd->sizes, 0, max_part * gd->nr_real * sizeof(int));
  96.225 +        memset(gd->part,  0, max_part * gd->nr_real 
  96.226 +               * sizeof(struct hd_struct));
  96.227 +
  96.228 +
  96.229 +        gd->real_devices = kmalloc(gd->nr_real * sizeof(xl_disk_t), 
  96.230 +                                   GFP_KERNEL);
  96.231 +        memset(gd->real_devices, 0, gd->nr_real * sizeof(xl_disk_t));
  96.232 +
  96.233 +        gd->next   = NULL;            
  96.234 +        gd->fops   = &xlvbd_block_fops;
  96.235 +
  96.236 +        gd->de_arr = kmalloc(gd->nr_real * sizeof(*gd->de_arr), 
  96.237 +                             GFP_KERNEL);
  96.238 +        gd->flags  = kmalloc(gd->nr_real * sizeof(*gd->flags), GFP_KERNEL);
  96.239 +    
  96.240 +        memset(gd->de_arr, 0, gd->nr_real * sizeof(*gd->de_arr));
  96.241 +        memset(gd->flags, 0, gd->nr_real *  sizeof(*gd->flags));
  96.242 +
  96.243 +        add_gendisk(gd);
  96.244 +
  96.245 +        blk_size[major] = gd->sizes;
  96.246 +    }
  96.247 +
  96.248 +    if ( xd->info & VDISK_READONLY )
  96.249 +        set_device_ro(device, 1);
  96.250 +
  96.251 +    gd->flags[minor >> gd->minor_shift] |= GENHD_FL_XEN;
  96.252 +
  96.253 +    /* NB. Linux 2.4 only handles 32-bit sector offsets and capacities. */
  96.254 +    capacity = (unsigned long)xd->capacity;
  96.255 +
  96.256 +    if ( partno != 0 )
  96.257 +    {
  96.258 +        /*
  96.259 +         * If this was previously set up as a real disc we will have set 
  96.260 +         * up partition-table information. Virtual partitions override 
  96.261 +         * 'real' partitions, and the two cannot coexist on a device.
  96.262 +         */
  96.263 +        if ( !(gd->flags[minor >> gd->minor_shift] & GENHD_FL_VIRT_PARTNS) &&
  96.264 +             (gd->sizes[minor & ~(max_part-1)] != 0) )
  96.265 +        {
  96.266 +            /*
  96.267 +             * Any non-zero sub-partition entries must be cleaned out before
  96.268 +             * installing 'virtual' partition entries. The two types cannot
  96.269 +             * coexist, and virtual partitions are favoured.
  96.270 +             */
  96.271 +            kdev_t dev = device & ~(max_part-1);
  96.272 +            for ( i = max_part - 1; i > 0; i-- )
  96.273 +            {
  96.274 +                invalidate_device(dev+i, 1);
  96.275 +                gd->part[MINOR(dev+i)].start_sect = 0;
  96.276 +                gd->part[MINOR(dev+i)].nr_sects   = 0;
  96.277 +                gd->sizes[MINOR(dev+i)]           = 0;
  96.278 +            }
  96.279 +            printk(KERN_ALERT
  96.280 +                   "Virtual partitions found for /dev/%s - ignoring any "
  96.281 +                   "real partition information we may have found.\n",
  96.282 +                   disk_name(gd, MINOR(device), buf));
  96.283 +        }
  96.284 +
  96.285 +        /* Need to skankily setup 'partition' information */
  96.286 +        gd->part[minor].start_sect = 0; 
  96.287 +        gd->part[minor].nr_sects   = capacity; 
  96.288 +        gd->sizes[minor]           = capacity >>(BLOCK_SIZE_BITS-9); 
  96.289 +
  96.290 +        gd->flags[minor >> gd->minor_shift] |= GENHD_FL_VIRT_PARTNS;
  96.291 +    }
  96.292 +    else
  96.293 +    {
  96.294 +        gd->part[minor].nr_sects = capacity;
  96.295 +        gd->sizes[minor] = capacity>>(BLOCK_SIZE_BITS-9);
  96.296 +        
  96.297 +        /* Some final fix-ups depending on the device type */
  96.298 +        if ( xd->info & VDISK_REMOVABLE )
  96.299 +        { 
  96.300 +            gd->flags[minor >> gd->minor_shift] |= GENHD_FL_REMOVABLE; 
  96.301 +            printk(KERN_ALERT 
  96.302 +                   "Skipping partition check on %s /dev/%s\n", 
  96.303 +                   (xd->info & VDISK_CDROM) ? "cdrom" : "removable",
  96.304 +                   disk_name(gd, MINOR(device), buf)); 
  96.305 +        }
  96.306 +        else
  96.307 +        {
  96.308 +            /* Only check partitions on real discs (not virtual!). */
  96.309 +            if ( gd->flags[minor>>gd->minor_shift] & GENHD_FL_VIRT_PARTNS )
  96.310 +            {
  96.311 +                printk(KERN_ALERT
  96.312 +                       "Skipping partition check on virtual /dev/%s\n",
  96.313 +                       disk_name(gd, MINOR(device), buf));
  96.314 +                break;
  96.315 +            }
  96.316 +            register_disk(gd, device, gd->max_p, &xlvbd_block_fops, capacity);
  96.317 +        }
  96.318 +    }
  96.319 +
  96.320 + out:
  96.321 +    bdput(bd);    
  96.322 +    return rc;
  96.323 +}
  96.324 +
  96.325 +
  96.326 +/*
  96.327 + * xlvbd_remove_device - remove a device node if possible
  96.328 + * @device:       numeric device ID
  96.329 + *
  96.330 + * Updates the gendisk structure and invalidates devices.
  96.331 + *
  96.332 + * This is OK for now but in future, should perhaps consider where this should
  96.333 + * deallocate gendisks / unregister devices.
  96.334 + */
  96.335 +static int xlvbd_remove_device(int device)
  96.336 +{
  96.337 +    int i, rc = 0, minor = MINOR(device);
  96.338 +    struct gendisk *gd;
  96.339 +    struct block_device *bd;
  96.340 +    xl_disk_t *disk = NULL;
  96.341 +
  96.342 +    if ( (bd = bdget(device)) == NULL )
  96.343 +        return -1;
  96.344 +
  96.345 +    if ( ((gd = get_gendisk(device)) == NULL) ||
  96.346 +         ((disk = xldev_to_xldisk(device)) == NULL) )
  96.347 +        BUG();
  96.348 +
  96.349 +    if ( disk->usage != 0 )
  96.350 +    {
  96.351 +        printk(KERN_ALERT "VBD removal failed - in use [dev=%x]\n", device);
  96.352 +        rc = -1;
  96.353 +        goto out;
  96.354 +    }
  96.355 + 
  96.356 +    if ( (minor & (gd->max_p-1)) != 0 )
  96.357 +    {
  96.358 +        /* 1: The VBD is mapped to a partition rather than a whole unit. */
  96.359 +        invalidate_device(device, 1);
  96.360 +	gd->part[minor].start_sect = 0;
  96.361 +        gd->part[minor].nr_sects   = 0;
  96.362 +        gd->sizes[minor]           = 0;
  96.363 +
  96.364 +        /* Clear the consists-of-virtual-partitions flag if possible. */
  96.365 +        gd->flags[minor >> gd->minor_shift] &= ~GENHD_FL_VIRT_PARTNS;
  96.366 +        for ( i = 1; i < gd->max_p; i++ )
  96.367 +            if ( gd->sizes[(minor & ~(gd->max_p-1)) + i] != 0 )
  96.368 +                gd->flags[minor >> gd->minor_shift] |= GENHD_FL_VIRT_PARTNS;
  96.369 +
  96.370 +        /*
  96.371 +         * If all virtual partitions are now gone, and a 'whole unit' VBD is
  96.372 +         * present, then we can try to grok the unit's real partition table.
  96.373 +         */
  96.374 +        if ( !(gd->flags[minor >> gd->minor_shift] & GENHD_FL_VIRT_PARTNS) &&
  96.375 +             (gd->sizes[minor & ~(gd->max_p-1)] != 0) &&
  96.376 +             !(gd->flags[minor >> gd->minor_shift] & GENHD_FL_REMOVABLE) )
  96.377 +        {
  96.378 +            register_disk(gd,
  96.379 +                          device&~(gd->max_p-1), 
  96.380 +                          gd->max_p, 
  96.381 +                          &xlvbd_block_fops,
  96.382 +                          gd->part[minor&~(gd->max_p-1)].nr_sects);
  96.383 +        }
  96.384 +    }
  96.385 +    else
  96.386 +    {
  96.387 +        /*
  96.388 +         * 2: The VBD is mapped to an entire 'unit'. Clear all partitions.
  96.389 +         * NB. The partition entries are only cleared if there are no VBDs
  96.390 +         * mapped to individual partitions on this unit.
  96.391 +         */
  96.392 +        i = gd->max_p - 1; /* Default: clear subpartitions as well. */
  96.393 +        if ( gd->flags[minor >> gd->minor_shift] & GENHD_FL_VIRT_PARTNS )
  96.394 +            i = 0; /* 'Virtual' mode: only clear the 'whole unit' entry. */
  96.395 +        while ( i >= 0 )
  96.396 +        {
  96.397 +            invalidate_device(device+i, 1);
  96.398 +            gd->part[minor+i].start_sect = 0;
  96.399 +            gd->part[minor+i].nr_sects   = 0;
  96.400 +            gd->sizes[minor+i]           = 0;
  96.401 +            i--;
  96.402 +        }
  96.403 +    }
  96.404 +
  96.405 + out:
  96.406 +    bdput(bd);
  96.407 +    return rc;
  96.408 +}
  96.409 +
  96.410 +/*
  96.411 + * xlvbd_update_vbds - reprobes the VBD status and performs updates driver
  96.412 + * state. The VBDs need to be updated in this way when the domain is
  96.413 + * initialised and also each time we receive an XLBLK_UPDATE event.
  96.414 + */
  96.415 +void xlvbd_update_vbds(void)
  96.416 +{
  96.417 +    int i, j, k, old_nr, new_nr;
  96.418 +    vdisk_t *old_info, *new_info, *merged_info;
  96.419 +
  96.420 +    old_info = vbd_info;
  96.421 +    old_nr   = nr_vbds;
  96.422 +
  96.423 +    new_info = kmalloc(MAX_VBDS * sizeof(vdisk_t), GFP_KERNEL);
  96.424 +    if (!new_info)
  96.425 +        return;
  96.426 +
  96.427 +    if ( unlikely(new_nr = xlvbd_get_vbd_info(new_info)) < 0 )
  96.428 +        goto out;
  96.429 +
  96.430 +    /*
  96.431 +     * Final list maximum size is old list + new list. This occurs only when
  96.432 +     * old list and new list do not overlap at all, and we cannot yet destroy
  96.433 +     * VBDs in the old list because the usage counts are busy.
  96.434 +     */
  96.435 +    merged_info = kmalloc((old_nr + new_nr) * sizeof(vdisk_t), GFP_KERNEL);
  96.436 +    if (!merged_info)
  96.437 +        goto out;
  96.438 +
  96.439 +    /* @i tracks old list; @j tracks new list; @k tracks merged list. */
  96.440 +    i = j = k = 0;
  96.441 +
  96.442 +    while ( (i < old_nr) && (j < new_nr) )
  96.443 +    {
  96.444 +        if ( old_info[i].device < new_info[j].device )
  96.445 +        {
  96.446 +            if ( xlvbd_remove_device(old_info[i].device) != 0 )
  96.447 +                memcpy(&merged_info[k++], &old_info[i], sizeof(vdisk_t));
  96.448 +            i++;
  96.449 +        }
  96.450 +        else if ( old_info[i].device > new_info[j].device )
  96.451 +        {
  96.452 +            if ( xlvbd_init_device(&new_info[j]) == 0 )
  96.453 +                memcpy(&merged_info[k++], &new_info[j], sizeof(vdisk_t));
  96.454 +            j++;
  96.455 +        }
  96.456 +        else
  96.457 +        {
  96.458 +            if ( ((old_info[i].capacity == new_info[j].capacity) &&
  96.459 +                  (old_info[i].info == new_info[j].info)) ||
  96.460 +                 (xlvbd_remove_device(old_info[i].device) != 0) )
  96.461 +                memcpy(&merged_info[k++], &old_info[i], sizeof(vdisk_t));
  96.462 +            else if ( xlvbd_init_device(&new_info[j]) == 0 )
  96.463 +                memcpy(&merged_info[k++], &new_info[j], sizeof(vdisk_t));
  96.464 +            i++; j++;
  96.465 +        }
  96.466 +    }
  96.467 +
  96.468 +    for ( ; i < old_nr; i++ )
  96.469 +    {
  96.470 +        if ( xlvbd_remove_device(old_info[i].device) != 0 )
  96.471 +            memcpy(&merged_info[k++], &old_info[i], sizeof(vdisk_t));
  96.472 +    }
  96.473 +
  96.474 +    for ( ; j < new_nr; j++ )
  96.475 +    {
  96.476 +        if ( xlvbd_init_device(&new_info[j]) == 0 )
  96.477 +            memcpy(&merged_info[k++], &new_info[j], sizeof(vdisk_t));
  96.478 +    }
  96.479 +
  96.480 +    vbd_info = merged_info;
  96.481 +    nr_vbds  = k;
  96.482 +
  96.483 +    kfree(old_info);
  96.484 +out:
  96.485 +    kfree(new_info);
  96.486 +}
  96.487 +
  96.488 +
  96.489 +/*
  96.490 + * Set up all the linux device goop for the virtual block devices (vbd's) that
  96.491 + * we know about. Note that although from the backend driver's p.o.v. VBDs are
  96.492 + * addressed simply an opaque 16-bit device number, the domain creation tools 
  96.493 + * conventionally allocate these numbers to correspond to those used by 'real' 
  96.494 + * linux -- this is just for convenience as it means e.g. that the same 
  96.495 + * /etc/fstab can be used when booting with or without Xen.
  96.496 + */
  96.497 +int xlvbd_init(void)
  96.498 +{
  96.499 +    int i;
  96.500 +    
  96.501 +    /*
  96.502 +     * If compiled as a module, we don't support unloading yet. We therefore 
  96.503 +     * permanently increment the reference count to disallow it.
  96.504 +     */
  96.505 +    SET_MODULE_OWNER(&xlvbd_block_fops);
  96.506 +    MOD_INC_USE_COUNT;
  96.507 +
  96.508 +    /* Initialize the global arrays. */
  96.509 +    for ( i = 0; i < 256; i++ ) 
  96.510 +    {
  96.511 +        xlide_blksize_size[i]  = 1024;
  96.512 +        xlide_hardsect_size[i] = 512;
  96.513 +        xlide_max_sectors[i]   = 512;
  96.514 +
  96.515 +        xlscsi_blksize_size[i]  = 1024;
  96.516 +        xlscsi_hardsect_size[i] = 512;
  96.517 +        xlscsi_max_sectors[i]   = 512;
  96.518 +
  96.519 +        xlvbd_blksize_size[i]  = 512;
  96.520 +        xlvbd_hardsect_size[i] = 512;
  96.521 +        xlvbd_max_sectors[i]   = 512;
  96.522 +    }
  96.523 +
  96.524 +    vbd_info = kmalloc(MAX_VBDS * sizeof(vdisk_t), GFP_KERNEL);
  96.525 +    if (!vbd_info)
  96.526 +        return -ENOMEM;
  96.527 +
  96.528 +    nr_vbds  = xlvbd_get_vbd_info(vbd_info);
  96.529 +
  96.530 +    if ( nr_vbds < 0 )
  96.531 +    {
  96.532 +        kfree(vbd_info);
  96.533 +        vbd_info = NULL;
  96.534 +        nr_vbds  = 0;
  96.535 +    }
  96.536 +    else
  96.537 +    {
  96.538 +        for ( i = 0; i < nr_vbds; i++ )
  96.539 +            xlvbd_init_device(&vbd_info[i]);
  96.540 +    }
  96.541 +
  96.542 +    return 0;
  96.543 +}
    97.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    97.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/drivers/console/Makefile	Mon Jul 11 14:44:08 2005 +0000
    97.3 @@ -0,0 +1,3 @@
    97.4 +O_TARGET := drv.o
    97.5 +obj-$(CONFIG_XEN_CONSOLE) := console.o
    97.6 +include $(TOPDIR)/Rules.make
    98.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    98.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/drivers/dom0/Makefile	Mon Jul 11 14:44:08 2005 +0000
    98.3 @@ -0,0 +1,3 @@
    98.4 +O_TARGET := drv.o
    98.5 +obj-y := core.o
    98.6 +include $(TOPDIR)/Rules.make
    99.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    99.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/drivers/evtchn/Makefile	Mon Jul 11 14:44:08 2005 +0000
    99.3 @@ -0,0 +1,3 @@
    99.4 +O_TARGET := drv.o
    99.5 +obj-y := evtchn.o
    99.6 +include $(TOPDIR)/Rules.make
   100.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   100.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/drivers/netif/Makefile	Mon Jul 11 14:44:08 2005 +0000
   100.3 @@ -0,0 +1,10 @@
   100.4 +
   100.5 +O_TARGET := drv.o
   100.6 +
   100.7 +subdir-$(CONFIG_XEN_NETDEV_FRONTEND) += frontend
   100.8 +obj-$(CONFIG_XEN_NETDEV_FRONTEND)    += frontend/drv.o
   100.9 +
  100.10 +subdir-$(CONFIG_XEN_PHYSDEV_ACCESS) += backend
  100.11 +obj-$(CONFIG_XEN_PHYSDEV_ACCESS)    += backend/drv.o
  100.12 +
  100.13 +include $(TOPDIR)/Rules.make
   101.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   101.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/drivers/netif/backend/Makefile	Mon Jul 11 14:44:08 2005 +0000
   101.3 @@ -0,0 +1,4 @@
   101.4 +O_TARGET := drv.o
   101.5 +export-objs := interface.o
   101.6 +obj-y := main.o control.o interface.o
   101.7 +include $(TOPDIR)/Rules.make
   102.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   102.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/drivers/netif/frontend/Makefile	Mon Jul 11 14:44:08 2005 +0000
   102.3 @@ -0,0 +1,3 @@
   102.4 +O_TARGET := drv.o
   102.5 +obj-y := main.o
   102.6 +include $(TOPDIR)/Rules.make
   103.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   103.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/kernel/Makefile	Mon Jul 11 14:44:08 2005 +0000
   103.3 @@ -0,0 +1,20 @@
   103.4 +
   103.5 +.S.o:
   103.6 +	$(CC) $(AFLAGS) -traditional -c $< -o $*.o
   103.7 +
   103.8 +all: kernel.o head.o init_task.o
   103.9 +
  103.10 +O_TARGET := kernel.o
  103.11 +
  103.12 +export-objs     := i386_ksyms.o gnttab.o skbuff.o ctrl_if.o
  103.13 +
  103.14 +obj-y	:= process.o semaphore.o signal.o entry.o traps.o irq.o  \
  103.15 +		ptrace.o ioport.o ldt.o setup.o time.o sys_i386.o \
  103.16 +		i386_ksyms.o i387.o evtchn.o ctrl_if.o pci-dma.o \
  103.17 +		reboot.o fixup.o gnttab.o skbuff.o
  103.18 +
  103.19 +ifdef CONFIG_PCI
  103.20 +obj-y	+= pci-i386.o pci-pc.o
  103.21 +endif
  103.22 +
  103.23 +include $(TOPDIR)/Rules.make
   104.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   104.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/kernel/entry.S	Mon Jul 11 14:44:08 2005 +0000
   104.3 @@ -0,0 +1,779 @@
   104.4 +/*
   104.5 + *  linux/arch/i386/entry.S
   104.6 + *
   104.7 + *  Copyright (C) 1991, 1992  Linus Torvalds
   104.8 + */
   104.9 +
  104.10 +/*
  104.11 + * entry.S contains the system-call and fault low-level handling routines.
  104.12 + * This also contains the timer-interrupt handler, as well as all interrupts
  104.13 + * and faults that can result in a task-switch.
  104.14 + *
  104.15 + * NOTE: This code handles signal-recognition, which happens every time
  104.16 + * after a timer-interrupt and after each system call.
  104.17 + *
  104.18 + * I changed all the .align's to 4 (16 byte alignment), as that's faster
  104.19 + * on a 486.
  104.20 + *
  104.21 + * Stack layout in 'ret_to_user':
  104.22 + * 	ptrace needs to have all regs on the stack.
  104.23 + *	if the order here is changed, it needs to be
  104.24 + *	updated in fork.c:copy_process, signal.c:do_signal,
  104.25 + *	ptrace.c and ptrace.h
  104.26 + *
  104.27 + *	 0(%esp) - %ebx
  104.28 + *	 4(%esp) - %ecx
  104.29 + *	 8(%esp) - %edx
  104.30 + *       C(%esp) - %esi
  104.31 + *	10(%esp) - %edi
  104.32 + *	14(%esp) - %ebp
  104.33 + *	18(%esp) - %eax
  104.34 + *	1C(%esp) - %ds
  104.35 + *	20(%esp) - %es
  104.36 + *	24(%esp) - orig_eax
  104.37 + *	28(%esp) - %eip
  104.38 + *	2C(%esp) - %cs
  104.39 + *	30(%esp) - %eflags
  104.40 + *	34(%esp) - %oldesp
  104.41 + *	38(%esp) - %oldss
  104.42 + *
  104.43 + * "current" is in register %ebx during any slow entries.
  104.44 + */
  104.45 +
  104.46 +#include <linux/config.h>
  104.47 +#include <linux/sys.h>
  104.48 +#include <linux/linkage.h>
  104.49 +#include <asm/segment.h>
  104.50 +#include <asm/smp.h>
  104.51 +
  104.52 +EBX		= 0x00
  104.53 +ECX		= 0x04
  104.54 +EDX		= 0x08
  104.55 +ESI		= 0x0C
  104.56 +EDI		= 0x10
  104.57 +EBP		= 0x14
  104.58 +EAX		= 0x18
  104.59 +DS		= 0x1C
  104.60 +ES		= 0x20
  104.61 +ORIG_EAX	= 0x24
  104.62 +EIP		= 0x28
  104.63 +CS		= 0x2C
  104.64 +EFLAGS		= 0x30
  104.65 +OLDESP		= 0x34
  104.66 +OLDSS		= 0x38
  104.67 +
  104.68 +CF_MASK		= 0x00000001
  104.69 +TF_MASK		= 0x00000100
  104.70 +IF_MASK		= 0x00000200
  104.71 +DF_MASK		= 0x00000400
  104.72 +NT_MASK		= 0x00004000
  104.73 +
  104.74 +/* Offsets into task_struct. */
  104.75 +state		=  0
  104.76 +flags		=  4
  104.77 +sigpending	=  8
  104.78 +addr_limit	= 12
  104.79 +exec_domain	= 16
  104.80 +need_resched	= 20
  104.81 +tsk_ptrace	= 24
  104.82 +processor	= 52
  104.83 +
  104.84 +/* Offsets into shared_info_t. */
  104.85 +#define evtchn_upcall_pending /* 0 */
  104.86 +#define evtchn_upcall_mask       1
  104.87 +
  104.88 +ENOSYS = 38
  104.89 +
  104.90 +
  104.91 +#define SAVE_ALL \
  104.92 +	cld; \
  104.93 +	pushl %es; \
  104.94 +	pushl %ds; \
  104.95 +	pushl %eax; \
  104.96 +	pushl %ebp; \
  104.97 +	pushl %edi; \
  104.98 +	pushl %esi; \
  104.99 +	pushl %edx; \
 104.100 +	pushl %ecx; \
 104.101 +	pushl %ebx; \
 104.102 +	movl $(__KERNEL_DS),%edx; \
 104.103 +	movl %edx,%ds; \
 104.104 +	movl %edx,%es;
 104.105 +
 104.106 +#define RESTORE_ALL	\
 104.107 +	popl %ebx;	\
 104.108 +	popl %ecx;	\
 104.109 +	popl %edx;	\
 104.110 +	popl %esi;	\
 104.111 +	popl %edi;	\
 104.112 +	popl %ebp;	\
 104.113 +	popl %eax;	\
 104.114 +1:	popl %ds;	\
 104.115 +2:	popl %es;	\
 104.116 +	addl $4,%esp;	\
 104.117 +3:	iret;		\
 104.118 +.section .fixup,"ax";	\
 104.119 +4:	movl $0,(%esp);	\
 104.120 +	jmp 1b;		\
 104.121 +5:	movl $0,(%esp);	\
 104.122 +	jmp 2b;		\
 104.123 +6:	pushl %ss;	\
 104.124 +	popl %ds;	\
 104.125 +	pushl %ss;	\
 104.126 +	popl %es;	\
 104.127 +	pushl $11;	\
 104.128 +	call do_exit;	\
 104.129 +.previous;		\
 104.130 +.section __ex_table,"a";\
 104.131 +	.align 4;	\
 104.132 +	.long 1b,4b;	\
 104.133 +	.long 2b,5b;	\
 104.134 +	.long 3b,6b;	\
 104.135 +.previous
 104.136 +
 104.137 +#define GET_CURRENT(reg) \
 104.138 +	movl $-8192, reg; \
 104.139 +	andl %esp, reg
 104.140 +
 104.141 +ENTRY(lcall7)
 104.142 +	pushfl			# We get a different stack layout with call
 104.143 +	pushl %eax		# gates, which has to be cleaned up later..
 104.144 +	SAVE_ALL
 104.145 +	movl EIP(%esp),%eax	# due to call gates, this is eflags, not eip..
 104.146 +	movl CS(%esp),%edx	# this is eip..
 104.147 +	movl EFLAGS(%esp),%ecx	# and this is cs..
 104.148 +	movl %eax,EFLAGS(%esp)	#
 104.149 +	andl $~(NT_MASK|TF_MASK|DF_MASK), %eax
 104.150 +	pushl %eax
 104.151 +	popfl
 104.152 +	movl %edx,EIP(%esp)	# Now we move them to their "normal" places
 104.153 +	movl %ecx,CS(%esp)	#
 104.154 +	movl %esp,%ebx
 104.155 +	pushl %ebx
 104.156 +	andl $-8192,%ebx	# GET_CURRENT
 104.157 +	movl exec_domain(%ebx),%edx	# Get the execution domain
 104.158 +	movl 4(%edx),%edx	# Get the lcall7 handler for the domain
 104.159 +	pushl $0x7
 104.160 +	call *%edx
 104.161 +	addl $4, %esp
 104.162 +	popl %eax
 104.163 +	jmp ret_to_user
 104.164 +
 104.165 +ENTRY(lcall27)
 104.166 +	pushfl			# We get a different stack layout with call
 104.167 +	pushl %eax		# gates, which has to be cleaned up later..
 104.168 +	SAVE_ALL
 104.169 +	movl EIP(%esp),%eax	# due to call gates, this is eflags, not eip..
 104.170 +	movl CS(%esp),%edx	# this is eip..
 104.171 +	movl EFLAGS(%esp),%ecx	# and this is cs..
 104.172 +	movl %eax,EFLAGS(%esp)	#
 104.173 +	andl $~(NT_MASK|TF_MASK|DF_MASK), %eax
 104.174 +	pushl %eax
 104.175 +	popfl
 104.176 +	movl %edx,EIP(%esp)	# Now we move them to their "normal" places
 104.177 +	movl %ecx,CS(%esp)	#
 104.178 +	movl %esp,%ebx
 104.179 +	pushl %ebx
 104.180 +	andl $-8192,%ebx	# GET_CURRENT
 104.181 +	movl exec_domain(%ebx),%edx	# Get the execution domain
 104.182 +	movl 4(%edx),%edx	# Get the lcall7 handler for the domain
 104.183 +	pushl $0x27
 104.184 +	call *%edx
 104.185 +	addl $4, %esp
 104.186 +	popl %eax
 104.187 +	jmp ret_to_user
 104.188 +
 104.189 +ENTRY(ret_from_fork)
 104.190 +	pushl %ebx
 104.191 +	call SYMBOL_NAME(schedule_tail)
 104.192 +	addl $4, %esp
 104.193 +	GET_CURRENT(%ebx)
 104.194 +	testb $0x02,tsk_ptrace(%ebx)	# PT_TRACESYS
 104.195 +	jne tracesys_exit
 104.196 +	jmp ret_to_user
 104.197 +
 104.198 +/*
 104.199 + * Return to user mode is not as complex as all this looks,
 104.200 + * but we want the default path for a system call return to
 104.201 + * go as quickly as possible which is why some of this is
 104.202 + * less clear than it otherwise should be.
 104.203 + */
 104.204 +ENTRY(system_call)
 104.205 +	pushl %eax			# save orig_eax
 104.206 +	SAVE_ALL
 104.207 +	GET_CURRENT(%ebx)
 104.208 +	testb $0x02,tsk_ptrace(%ebx)	# PT_TRACESYS
 104.209 +	jne tracesys
 104.210 +	cmpl $(NR_syscalls),%eax
 104.211 +	jae badsys
 104.212 +	call *SYMBOL_NAME(sys_call_table)(,%eax,4)
 104.213 +	movl %eax,EAX(%esp)		# save the return value
 104.214 +ret_to_user:
 104.215 +        movl SYMBOL_NAME(HYPERVISOR_shared_info),%esi
 104.216 +        movb $1,evtchn_upcall_mask(%esi) # make tests atomic
 104.217 +ret_to_user_nocli:
 104.218 +	cmpl $0,need_resched(%ebx)
 104.219 +	jne  reschedule
 104.220 +	cmpl $0,sigpending(%ebx)
 104.221 +	je   safesti                    # ensure need_resched updates are seen
 104.222 +/*signal_return:*/
 104.223 +	movb $0,evtchn_upcall_mask(%esi) # reenable event callbacks
 104.224 +	movl %esp,%eax
 104.225 +	xorl %edx,%edx
 104.226 +	call SYMBOL_NAME(do_signal)
 104.227 +	jmp  safesti
 104.228 +
 104.229 +	ALIGN
 104.230 +restore_all:
 104.231 +	RESTORE_ALL
 104.232 +
 104.233 +	ALIGN
 104.234 +tracesys:
 104.235 +	movl $-ENOSYS,EAX(%esp)
 104.236 +	call SYMBOL_NAME(syscall_trace)
 104.237 +	movl ORIG_EAX(%esp),%eax
 104.238 +	cmpl $(NR_syscalls),%eax
 104.239 +	jae tracesys_exit
 104.240 +	call *SYMBOL_NAME(sys_call_table)(,%eax,4)
 104.241 +	movl %eax,EAX(%esp)		# save the return value
 104.242 +tracesys_exit:
 104.243 +	call SYMBOL_NAME(syscall_trace)
 104.244 +	jmp ret_to_user
 104.245 +badsys:
 104.246 +	movl $-ENOSYS,EAX(%esp)
 104.247 +	jmp ret_to_user
 104.248 +
 104.249 +	ALIGN
 104.250 +ENTRY(ret_from_intr)
 104.251 +	GET_CURRENT(%ebx)
 104.252 +ret_from_exception:
 104.253 +	movb CS(%esp),%al
 104.254 +	testl $2,%eax
 104.255 +	jne ret_to_user
 104.256 +	jmp restore_all
 104.257 +
 104.258 +	ALIGN
 104.259 +reschedule:
 104.260 +        movb $0,evtchn_upcall_mask(%esi)  # reenable event callbacks
 104.261 +	call SYMBOL_NAME(schedule)        # test
 104.262 +	jmp  ret_to_user
 104.263 +
 104.264 +ENTRY(divide_error)
 104.265 +	pushl $0		# no error code
 104.266 +	pushl $ SYMBOL_NAME(do_divide_error)
 104.267 +	ALIGN
 104.268 +error_code:
 104.269 +	pushl %ds
 104.270 +	pushl %eax
 104.271 +	xorl %eax,%eax
 104.272 +	pushl %ebp
 104.273 +	pushl %edi
 104.274 +	pushl %esi
 104.275 +	pushl %edx
 104.276 +	decl %eax			# eax = -1
 104.277 +	pushl %ecx
 104.278 +	pushl %ebx
 104.279 +	GET_CURRENT(%ebx)
 104.280 +	cld
 104.281 +	movl %es,%ecx
 104.282 +	movl ORIG_EAX(%esp), %esi	# get the error code
 104.283 +	movl ES(%esp), %edi		# get the function address
 104.284 +	movl %eax, ORIG_EAX(%esp)
 104.285 +	movl %ecx, ES(%esp)
 104.286 +	movl %esp,%edx
 104.287 +	pushl %esi			# push the error code
 104.288 +	pushl %edx			# push the pt_regs pointer
 104.289 +	movl $(__KERNEL_DS),%edx
 104.290 +	movl %edx,%ds
 104.291 +	movl %edx,%es
 104.292 +	call *%edi
 104.293 +	addl $8,%esp
 104.294 +	jmp ret_from_exception
 104.295 +
 104.296 +# A note on the "critical region" in our callback handler.
 104.297 +# We want to avoid stacking callback handlers due to events occurring
 104.298 +# during handling of the last event. To do this, we keep events disabled
 104.299 +# until we've done all processing. HOWEVER, we must enable events before
 104.300 +# popping the stack frame (can't be done atomically) and so it would still
 104.301 +# be possible to get enough handler activations to overflow the stack.
 104.302 +# Although unlikely, bugs of that kind are hard to track down, so we'd
 104.303 +# like to avoid the possibility.
 104.304 +# So, on entry to the handler we detect whether we interrupted an
 104.305 +# existing activation in its critical region -- if so, we pop the current
 104.306 +# activation and restart the handler using the previous one.
 104.307 +ENTRY(hypervisor_callback)
 104.308 +        pushl %eax
 104.309 +        SAVE_ALL
 104.310 +        GET_CURRENT(%ebx)
 104.311 +        movl EIP(%esp),%eax
 104.312 +        cmpl $scrit,%eax
 104.313 +        jb   11f
 104.314 +        cmpl $ecrit,%eax
 104.315 +        jb   critical_region_fixup
 104.316 +11:     push %esp
 104.317 +        call evtchn_do_upcall
 104.318 +        add  $4,%esp
 104.319 +        movl SYMBOL_NAME(HYPERVISOR_shared_info),%esi
 104.320 +        movb CS(%esp),%cl
 104.321 +	test $2,%cl          # slow return to ring 2 or 3
 104.322 +	jne  ret_to_user_nocli
 104.323 +safesti:movb $0,evtchn_upcall_mask(%esi) # reenable event callbacks
 104.324 +scrit:  /**** START OF CRITICAL REGION ****/
 104.325 +        testb $0xFF,evtchn_upcall_pending(%esi)
 104.326 +        jnz  14f              # process more events if necessary...
 104.327 +        RESTORE_ALL
 104.328 +14:     movb $1,evtchn_upcall_mask(%esi)
 104.329 +        jmp  11b
 104.330 +ecrit:  /**** END OF CRITICAL REGION ****/
 104.331 +# [How we do the fixup]. We want to merge the current stack frame with the
 104.332 +# just-interrupted frame. How we do this depends on where in the critical
 104.333 +# region the interrupted handler was executing, and so how many saved
 104.334 +# registers are in each frame. We do this quickly using the lookup table
 104.335 +# 'critical_fixup_table'. For each byte offset in the critical region, it
 104.336 +# provides the number of bytes which have already been popped from the
 104.337 +# interrupted stack frame. 
 104.338 +critical_region_fixup:
 104.339 +        addl $critical_fixup_table-scrit,%eax
 104.340 +        movzbl (%eax),%eax    # %eax contains num bytes popped
 104.341 +        mov  %esp,%esi
 104.342 +        add  %eax,%esi        # %esi points at end of src region
 104.343 +        mov  %esp,%edi
 104.344 +        add  $0x34,%edi       # %edi points at end of dst region
 104.345 +        mov  %eax,%ecx
 104.346 +        shr  $2,%ecx          # convert words to bytes
 104.347 +        je   16f              # skip loop if nothing to copy
 104.348 +15:     subl $4,%esi          # pre-decrementing copy loop
 104.349 +        subl $4,%edi
 104.350 +        movl (%esi),%eax
 104.351 +        movl %eax,(%edi)
 104.352 +        loop 15b
 104.353 +16:     movl %edi,%esp        # final %edi is top of merged stack
 104.354 +        jmp  11b
 104.355 +        
 104.356 +critical_fixup_table:        
 104.357 +        .byte 0x00,0x00,0x00                  # testb $0xFF,(%esi)
 104.358 +        .byte 0x00,0x00                       # jnz  14f
 104.359 +        .byte 0x00                            # pop  %ebx
 104.360 +        .byte 0x04                            # pop  %ecx
 104.361 +        .byte 0x08                            # pop  %edx
 104.362 +        .byte 0x0c                            # pop  %esi
 104.363 +        .byte 0x10                            # pop  %edi
 104.364 +        .byte 0x14                            # pop  %ebp
 104.365 +        .byte 0x18                            # pop  %eax
 104.366 +        .byte 0x1c                            # pop  %ds
 104.367 +        .byte 0x20                            # pop  %es
 104.368 +        .byte 0x24,0x24,0x24                  # add  $4,%esp
 104.369 +        .byte 0x28                            # iret
 104.370 +        .byte 0x00,0x00,0x00,0x00             # movb $1,4(%esi)
 104.371 +        .byte 0x00,0x00                       # jmp  11b
 104.372 +
 104.373 +# Hypervisor uses this for application faults while it executes.
 104.374 +ENTRY(failsafe_callback)
 104.375 +1:      popl %ds
 104.376 +2:      popl %es
 104.377 +3:      popl %fs
 104.378 +4:      popl %gs
 104.379 +5:      iret
 104.380 +.section .fixup,"ax";	\
 104.381 +6:	movl $0,(%esp);	\
 104.382 +	jmp 1b;		\
 104.383 +7:	movl $0,(%esp);	\
 104.384 +	jmp 2b;		\
 104.385 +8:	movl $0,(%esp);	\
 104.386 +	jmp 3b;		\
 104.387 +9:	movl $0,(%esp);	\
 104.388 +	jmp 4b;		\
 104.389 +10:	pushl %ss;	\
 104.390 +	popl %ds;	\
 104.391 +	pushl %ss;	\
 104.392 +	popl %es;	\
 104.393 +	pushl $11;	\
 104.394 +	call do_exit;	\
 104.395 +.previous;		\
 104.396 +.section __ex_table,"a";\
 104.397 +	.align 4;	\
 104.398 +	.long 1b,6b;	\
 104.399 +	.long 2b,7b;	\
 104.400 +	.long 3b,8b;	\
 104.401 +	.long 4b,9b;	\
 104.402 +	.long 5b,10b;	\
 104.403 +.previous
 104.404 +        
 104.405 +ENTRY(coprocessor_error)
 104.406 +	pushl $0
 104.407 +	pushl $ SYMBOL_NAME(do_coprocessor_error)
 104.408 +	jmp error_code
 104.409 +
 104.410 +ENTRY(simd_coprocessor_error)
 104.411 +	pushl $0
 104.412 +	pushl $ SYMBOL_NAME(do_simd_coprocessor_error)
 104.413 +	jmp error_code
 104.414 +
 104.415 +ENTRY(device_not_available)
 104.416 +	pushl $-1		# mark this as an int
 104.417 +	SAVE_ALL
 104.418 +	GET_CURRENT(%ebx)
 104.419 +	call SYMBOL_NAME(math_state_restore)
 104.420 +	jmp ret_from_exception
 104.421 +
 104.422 +ENTRY(debug)
 104.423 +	pushl $0
 104.424 +	pushl $ SYMBOL_NAME(do_debug)
 104.425 +	jmp error_code
 104.426 +
 104.427 +ENTRY(int3)
 104.428 +	pushl $0
 104.429 +	pushl $ SYMBOL_NAME(do_int3)
 104.430 +	jmp error_code
 104.431 +
 104.432 +ENTRY(overflow)
 104.433 +	pushl $0
 104.434 +	pushl $ SYMBOL_NAME(do_overflow)
 104.435 +	jmp error_code
 104.436 +
 104.437 +ENTRY(bounds)
 104.438 +	pushl $0
 104.439 +	pushl $ SYMBOL_NAME(do_bounds)
 104.440 +	jmp error_code
 104.441 +
 104.442 +ENTRY(invalid_op)
 104.443 +	pushl $0
 104.444 +	pushl $ SYMBOL_NAME(do_invalid_op)
 104.445 +	jmp error_code
 104.446 +
 104.447 +ENTRY(coprocessor_segment_overrun)
 104.448 +	pushl $0
 104.449 +	pushl $ SYMBOL_NAME(do_coprocessor_segment_overrun)
 104.450 +	jmp error_code
 104.451 +
 104.452 +ENTRY(double_fault)
 104.453 +	pushl $ SYMBOL_NAME(do_double_fault)
 104.454 +	jmp error_code
 104.455 +
 104.456 +ENTRY(invalid_TSS)
 104.457 +	pushl $ SYMBOL_NAME(do_invalid_TSS)
 104.458 +	jmp error_code
 104.459 +
 104.460 +ENTRY(segment_not_present)
 104.461 +	pushl $ SYMBOL_NAME(do_segment_not_present)
 104.462 +	jmp error_code
 104.463 +
 104.464 +ENTRY(stack_segment)
 104.465 +	pushl $ SYMBOL_NAME(do_stack_segment)
 104.466 +	jmp error_code
 104.467 +
 104.468 +ENTRY(general_protection)
 104.469 +	pushl $ SYMBOL_NAME(do_general_protection)
 104.470 +	jmp error_code
 104.471 +
 104.472 +ENTRY(alignment_check)
 104.473 +	pushl $ SYMBOL_NAME(do_alignment_check)
 104.474 +	jmp error_code
 104.475 +
 104.476 +# This handler is special, because it gets an extra value on its stack,
 104.477 +# which is the linear faulting address.
 104.478 +#define PAGE_FAULT_STUB(_name1, _name2)                                  \
 104.479 +ENTRY(_name1)                                                            \
 104.480 +	pushl %ds                                                      ; \
 104.481 +	pushl %eax                                                     ; \
 104.482 +	xorl %eax,%eax                                                 ; \
 104.483 +	pushl %ebp                                                     ; \
 104.484 +	pushl %edi                                                     ; \
 104.485 +	pushl %esi                                                     ; \
 104.486 +	pushl %edx                                                     ; \
 104.487 +	decl %eax                      /* eax = -1 */                  ; \
 104.488 +	pushl %ecx                                                     ; \
 104.489 +	pushl %ebx                                                     ; \
 104.490 +	GET_CURRENT(%ebx)                                              ; \
 104.491 +	cld                                                            ; \
 104.492 +	movl %es,%ecx                                                  ; \
 104.493 +	movl ORIG_EAX(%esp), %esi      /* get the error code */        ; \
 104.494 +	movl ES(%esp), %edi            /* get the faulting address */  ; \
 104.495 +	movl %eax, ORIG_EAX(%esp)                                      ; \
 104.496 +	movl %ecx, ES(%esp)                                            ; \
 104.497 +	movl %esp,%edx                                                 ; \
 104.498 +        pushl %edi                     /* push the faulting address */ ; \
 104.499 +	pushl %esi                     /* push the error code */       ; \
 104.500 +	pushl %edx                     /* push the pt_regs pointer */  ; \
 104.501 +	movl $(__KERNEL_DS),%edx                                       ; \
 104.502 +	movl %edx,%ds                                                  ; \
 104.503 +	movl %edx,%es                                                  ; \
 104.504 +	call SYMBOL_NAME(_name2)                                       ; \
 104.505 +	addl $12,%esp                                                  ; \
 104.506 +	jmp ret_from_exception                                         ;
 104.507 +PAGE_FAULT_STUB(page_fault, do_page_fault)
 104.508 +
 104.509 +ENTRY(machine_check)
 104.510 +	pushl $0
 104.511 +	pushl $ SYMBOL_NAME(do_machine_check)
 104.512 +	jmp error_code
 104.513 +
 104.514 +ENTRY(fixup_4gb_segment)
 104.515 +	pushl $ SYMBOL_NAME(do_fixup_4gb_segment)
 104.516 +	jmp error_code
 104.517 +
 104.518 +.data
 104.519 +ENTRY(sys_call_table)
 104.520 +	.long SYMBOL_NAME(sys_ni_syscall)	/* 0  -  old "setup()" system call*/
 104.521 +	.long SYMBOL_NAME(sys_exit)
 104.522 +	.long SYMBOL_NAME(sys_fork)
 104.523 +	.long SYMBOL_NAME(sys_read)
 104.524 +	.long SYMBOL_NAME(sys_write)
 104.525 +	.long SYMBOL_NAME(sys_open)		/* 5 */
 104.526 +	.long SYMBOL_NAME(sys_close)
 104.527 +	.long SYMBOL_NAME(sys_waitpid)
 104.528 +	.long SYMBOL_NAME(sys_creat)
 104.529 +	.long SYMBOL_NAME(sys_link)
 104.530 +	.long SYMBOL_NAME(sys_unlink)		/* 10 */
 104.531 +	.long SYMBOL_NAME(sys_execve)
 104.532 +	.long SYMBOL_NAME(sys_chdir)
 104.533 +	.long SYMBOL_NAME(sys_time)
 104.534 +	.long SYMBOL_NAME(sys_mknod)
 104.535 +	.long SYMBOL_NAME(sys_chmod)		/* 15 */
 104.536 +	.long SYMBOL_NAME(sys_lchown16)
 104.537 +	.long SYMBOL_NAME(sys_ni_syscall)				/* old break syscall holder */
 104.538 +	.long SYMBOL_NAME(sys_stat)
 104.539 +	.long SYMBOL_NAME(sys_lseek)
 104.540 +	.long SYMBOL_NAME(sys_getpid)		/* 20 */
 104.541 +	.long SYMBOL_NAME(sys_mount)
 104.542 +	.long SYMBOL_NAME(sys_oldumount)
 104.543 +	.long SYMBOL_NAME(sys_setuid16)
 104.544 +	.long SYMBOL_NAME(sys_getuid16)
 104.545 +	.long SYMBOL_NAME(sys_stime)		/* 25 */
 104.546 +	.long SYMBOL_NAME(sys_ptrace)
 104.547 +	.long SYMBOL_NAME(sys_alarm)
 104.548 +	.long SYMBOL_NAME(sys_fstat)
 104.549 +	.long SYMBOL_NAME(sys_pause)
 104.550 +	.long SYMBOL_NAME(sys_utime)		/* 30 */
 104.551 +	.long SYMBOL_NAME(sys_ni_syscall)				/* old stty syscall holder */
 104.552 +	.long SYMBOL_NAME(sys_ni_syscall)				/* old gtty syscall holder */
 104.553 +	.long SYMBOL_NAME(sys_access)
 104.554 +	.long SYMBOL_NAME(sys_nice)
 104.555 +	.long SYMBOL_NAME(sys_ni_syscall)	/* 35 */		/* old ftime syscall holder */
 104.556 +	.long SYMBOL_NAME(sys_sync)
 104.557 +	.long SYMBOL_NAME(sys_kill)
 104.558 +	.long SYMBOL_NAME(sys_rename)
 104.559 +	.long SYMBOL_NAME(sys_mkdir)
 104.560 +	.long SYMBOL_NAME(sys_rmdir)		/* 40 */
 104.561 +	.long SYMBOL_NAME(sys_dup)
 104.562 +	.long SYMBOL_NAME(sys_pipe)
 104.563 +	.long SYMBOL_NAME(sys_times)
 104.564 +	.long SYMBOL_NAME(sys_ni_syscall)				/* old prof syscall holder */
 104.565 +	.long SYMBOL_NAME(sys_brk)		/* 45 */
 104.566 +	.long SYMBOL_NAME(sys_setgid16)
 104.567 +	.long SYMBOL_NAME(sys_getgid16)
 104.568 +	.long SYMBOL_NAME(sys_signal)
 104.569 +	.long SYMBOL_NAME(sys_geteuid16)
 104.570 +	.long SYMBOL_NAME(sys_getegid16)	/* 50 */
 104.571 +	.long SYMBOL_NAME(sys_acct)
 104.572 +	.long SYMBOL_NAME(sys_umount)					/* recycled never used phys() */
 104.573 +	.long SYMBOL_NAME(sys_ni_syscall)				/* old lock syscall holder */
 104.574 +	.long SYMBOL_NAME(sys_ioctl)
 104.575 +	.long SYMBOL_NAME(sys_fcntl)		/* 55 */
 104.576 +	.long SYMBOL_NAME(sys_ni_syscall)				/* old mpx syscall holder */
 104.577 +	.long SYMBOL_NAME(sys_setpgid)
 104.578 +	.long SYMBOL_NAME(sys_ni_syscall)				/* old ulimit syscall holder */
 104.579 +	.long SYMBOL_NAME(sys_olduname)
 104.580 +	.long SYMBOL_NAME(sys_umask)		/* 60 */
 104.581 +	.long SYMBOL_NAME(sys_chroot)
 104.582 +	.long SYMBOL_NAME(sys_ustat)
 104.583 +	.long SYMBOL_NAME(sys_dup2)
 104.584 +	.long SYMBOL_NAME(sys_getppid)
 104.585 +	.long SYMBOL_NAME(sys_getpgrp)		/* 65 */
 104.586 +	.long SYMBOL_NAME(sys_setsid)
 104.587 +	.long SYMBOL_NAME(sys_sigaction)
 104.588 +	.long SYMBOL_NAME(sys_sgetmask)
 104.589 +	.long SYMBOL_NAME(sys_ssetmask)
 104.590 +	.long SYMBOL_NAME(sys_setreuid16)	/* 70 */
 104.591 +	.long SYMBOL_NAME(sys_setregid16)
 104.592 +	.long SYMBOL_NAME(sys_sigsuspend)
 104.593 +	.long SYMBOL_NAME(sys_sigpending)
 104.594 +	.long SYMBOL_NAME(sys_sethostname)
 104.595 +	.long SYMBOL_NAME(sys_setrlimit)	/* 75 */
 104.596 +	.long SYMBOL_NAME(sys_old_getrlimit)
 104.597 +	.long SYMBOL_NAME(sys_getrusage)
 104.598 +	.long SYMBOL_NAME(sys_gettimeofday)
 104.599 +	.long SYMBOL_NAME(sys_settimeofday)
 104.600 +	.long SYMBOL_NAME(sys_getgroups16)	/* 80 */
 104.601 +	.long SYMBOL_NAME(sys_setgroups16)
 104.602 +	.long SYMBOL_NAME(old_select)
 104.603 +	.long SYMBOL_NAME(sys_symlink)
 104.604 +	.long SYMBOL_NAME(sys_lstat)
 104.605 +	.long SYMBOL_NAME(sys_readlink)		/* 85 */
 104.606 +	.long SYMBOL_NAME(sys_uselib)
 104.607 +	.long SYMBOL_NAME(sys_swapon)
 104.608 +	.long SYMBOL_NAME(sys_reboot)
 104.609 +	.long SYMBOL_NAME(old_readdir)
 104.610 +	.long SYMBOL_NAME(old_mmap)		/* 90 */
 104.611 +	.long SYMBOL_NAME(sys_munmap)
 104.612 +	.long SYMBOL_NAME(sys_truncate)
 104.613 +	.long SYMBOL_NAME(sys_ftruncate)
 104.614 +	.long SYMBOL_NAME(sys_fchmod)
 104.615 +	.long SYMBOL_NAME(sys_fchown16)		/* 95 */
 104.616 +	.long SYMBOL_NAME(sys_getpriority)
 104.617 +	.long SYMBOL_NAME(sys_setpriority)
 104.618 +	.long SYMBOL_NAME(sys_ni_syscall)				/* old profil syscall holder */
 104.619 +	.long SYMBOL_NAME(sys_statfs)
 104.620 +	.long SYMBOL_NAME(sys_fstatfs)		/* 100 */
 104.621 +	.long SYMBOL_NAME(sys_ioperm)
 104.622 +	.long SYMBOL_NAME(sys_socketcall)
 104.623 +	.long SYMBOL_NAME(sys_syslog)
 104.624 +	.long SYMBOL_NAME(sys_setitimer)
 104.625 +	.long SYMBOL_NAME(sys_getitimer)	/* 105 */
 104.626 +	.long SYMBOL_NAME(sys_newstat)
 104.627 +	.long SYMBOL_NAME(sys_newlstat)
 104.628 +	.long SYMBOL_NAME(sys_newfstat)
 104.629 +	.long SYMBOL_NAME(sys_uname)
 104.630 +	.long SYMBOL_NAME(sys_iopl)		/* 110 */
 104.631 +	.long SYMBOL_NAME(sys_vhangup)
 104.632 +	.long SYMBOL_NAME(sys_ni_syscall)	/* old "idle" system call */
 104.633 +	.long SYMBOL_NAME(sys_ni_syscall) /* was VM86 */
 104.634 +	.long SYMBOL_NAME(sys_wait4)
 104.635 +	.long SYMBOL_NAME(sys_swapoff)		/* 115 */
 104.636 +	.long SYMBOL_NAME(sys_sysinfo)
 104.637 +	.long SYMBOL_NAME(sys_ipc)
 104.638 +	.long SYMBOL_NAME(sys_fsync)
 104.639 +	.long SYMBOL_NAME(sys_sigreturn)
 104.640 +	.long SYMBOL_NAME(sys_clone)		/* 120 */
 104.641 +	.long SYMBOL_NAME(sys_setdomainname)
 104.642 +	.long SYMBOL_NAME(sys_newuname)
 104.643 +	.long SYMBOL_NAME(sys_modify_ldt)
 104.644 +	.long SYMBOL_NAME(sys_adjtimex)
 104.645 +	.long SYMBOL_NAME(sys_mprotect)		/* 125 */
 104.646 +	.long SYMBOL_NAME(sys_sigprocmask)
 104.647 +	.long SYMBOL_NAME(sys_create_module)
 104.648 +	.long SYMBOL_NAME(sys_init_module)
 104.649 +	.long SYMBOL_NAME(sys_delete_module)
 104.650 +	.long SYMBOL_NAME(sys_get_kernel_syms)	/* 130 */
 104.651 +	.long SYMBOL_NAME(sys_quotactl)
 104.652 +	.long SYMBOL_NAME(sys_getpgid)
 104.653 +	.long SYMBOL_NAME(sys_fchdir)
 104.654 +	.long SYMBOL_NAME(sys_bdflush)
 104.655 +	.long SYMBOL_NAME(sys_sysfs)		/* 135 */
 104.656 +	.long SYMBOL_NAME(sys_personality)
 104.657 +	.long SYMBOL_NAME(sys_ni_syscall)	/* for afs_syscall */
 104.658 +	.long SYMBOL_NAME(sys_setfsuid16)
 104.659 +	.long SYMBOL_NAME(sys_setfsgid16)
 104.660 +	.long SYMBOL_NAME(sys_llseek)		/* 140 */
 104.661 +	.long SYMBOL_NAME(sys_getdents)
 104.662 +	.long SYMBOL_NAME(sys_select)
 104.663 +	.long SYMBOL_NAME(sys_flock)
 104.664 +	.long SYMBOL_NAME(sys_msync)
 104.665 +	.long SYMBOL_NAME(sys_readv)		/* 145 */
 104.666 +	.long SYMBOL_NAME(sys_writev)
 104.667 +	.long SYMBOL_NAME(sys_getsid)
 104.668 +	.long SYMBOL_NAME(sys_fdatasync)
 104.669 +	.long SYMBOL_NAME(sys_sysctl)
 104.670 +	.long SYMBOL_NAME(sys_mlock)		/* 150 */
 104.671 +	.long SYMBOL_NAME(sys_munlock)
 104.672 +	.long SYMBOL_NAME(sys_mlockall)
 104.673 +	.long SYMBOL_NAME(sys_munlockall)
 104.674 +	.long SYMBOL_NAME(sys_sched_setparam)
 104.675 +	.long SYMBOL_NAME(sys_sched_getparam)   /* 155 */
 104.676 +	.long SYMBOL_NAME(sys_sched_setscheduler)
 104.677 +	.long SYMBOL_NAME(sys_sched_getscheduler)
 104.678 +	.long SYMBOL_NAME(sys_sched_yield)
 104.679 +	.long SYMBOL_NAME(sys_sched_get_priority_max)
 104.680 +	.long SYMBOL_NAME(sys_sched_get_priority_min)  /* 160 */
 104.681 +	.long SYMBOL_NAME(sys_sched_rr_get_interval)
 104.682 +	.long SYMBOL_NAME(sys_nanosleep)
 104.683 +	.long SYMBOL_NAME(sys_mremap)
 104.684 +	.long SYMBOL_NAME(sys_setresuid16)
 104.685 +	.long SYMBOL_NAME(sys_getresuid16)	/* 165 */
 104.686 +	.long SYMBOL_NAME(sys_ni_syscall) /* was VM86 */
 104.687 +	.long SYMBOL_NAME(sys_query_module)
 104.688 +	.long SYMBOL_NAME(sys_poll)
 104.689 +	.long SYMBOL_NAME(sys_nfsservctl)
 104.690 +	.long SYMBOL_NAME(sys_setresgid16)	/* 170 */
 104.691 +	.long SYMBOL_NAME(sys_getresgid16)
 104.692 +	.long SYMBOL_NAME(sys_prctl)
 104.693 +	.long SYMBOL_NAME(sys_rt_sigreturn)
 104.694 +	.long SYMBOL_NAME(sys_rt_sigaction)
 104.695 +	.long SYMBOL_NAME(sys_rt_sigprocmask)	/* 175 */
 104.696 +	.long SYMBOL_NAME(sys_rt_sigpending)
 104.697 +	.long SYMBOL_NAME(sys_rt_sigtimedwait)
 104.698 +	.long SYMBOL_NAME(sys_rt_sigqueueinfo)
 104.699 +	.long SYMBOL_NAME(sys_rt_sigsuspend)
 104.700 +	.long SYMBOL_NAME(sys_pread)		/* 180 */
 104.701 +	.long SYMBOL_NAME(sys_pwrite)
 104.702 +	.long SYMBOL_NAME(sys_chown16)
 104.703 +	.long SYMBOL_NAME(sys_getcwd)
 104.704 +	.long SYMBOL_NAME(sys_capget)
 104.705 +	.long SYMBOL_NAME(sys_capset)           /* 185 */
 104.706 +	.long SYMBOL_NAME(sys_sigaltstack)
 104.707 +	.long SYMBOL_NAME(sys_sendfile)
 104.708 +	.long SYMBOL_NAME(sys_ni_syscall)		/* streams1 */
 104.709 +	.long SYMBOL_NAME(sys_ni_syscall)		/* streams2 */
 104.710 +	.long SYMBOL_NAME(sys_vfork)            /* 190 */
 104.711 +	.long SYMBOL_NAME(sys_getrlimit)
 104.712 +	.long SYMBOL_NAME(sys_mmap2)
 104.713 +	.long SYMBOL_NAME(sys_truncate64)
 104.714 +	.long SYMBOL_NAME(sys_ftruncate64)
 104.715 +	.long SYMBOL_NAME(sys_stat64)		/* 195 */
 104.716 +	.long SYMBOL_NAME(sys_lstat64)
 104.717 +	.long SYMBOL_NAME(sys_fstat64)
 104.718 +	.long SYMBOL_NAME(sys_lchown)
 104.719 +	.long SYMBOL_NAME(sys_getuid)
 104.720 +	.long SYMBOL_NAME(sys_getgid)		/* 200 */
 104.721 +	.long SYMBOL_NAME(sys_geteuid)
 104.722 +	.long SYMBOL_NAME(sys_getegid)
 104.723 +	.long SYMBOL_NAME(sys_setreuid)
 104.724 +	.long SYMBOL_NAME(sys_setregid)
 104.725 +	.long SYMBOL_NAME(sys_getgroups)	/* 205 */
 104.726 +	.long SYMBOL_NAME(sys_setgroups)
 104.727 +	.long SYMBOL_NAME(sys_fchown)
 104.728 +	.long SYMBOL_NAME(sys_setresuid)
 104.729 +	.long SYMBOL_NAME(sys_getresuid)
 104.730 +	.long SYMBOL_NAME(sys_setresgid)	/* 210 */
 104.731 +	.long SYMBOL_NAME(sys_getresgid)
 104.732 +	.long SYMBOL_NAME(sys_chown)
 104.733 +	.long SYMBOL_NAME(sys_setuid)
 104.734 +	.long SYMBOL_NAME(sys_setgid)
 104.735 +	.long SYMBOL_NAME(sys_setfsuid)		/* 215 */
 104.736 +	.long SYMBOL_NAME(sys_setfsgid)
 104.737 +	.long SYMBOL_NAME(sys_pivot_root)
 104.738 +	.long SYMBOL_NAME(sys_mincore)
 104.739 +	.long SYMBOL_NAME(sys_madvise)
 104.740 +	.long SYMBOL_NAME(sys_getdents64)	/* 220 */
 104.741 +	.long SYMBOL_NAME(sys_fcntl64)
 104.742 +	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for TUX */
 104.743 +	.long SYMBOL_NAME(sys_ni_syscall)	/* Reserved for Security */
 104.744 +	.long SYMBOL_NAME(sys_gettid)
 104.745 +	.long SYMBOL_NAME(sys_readahead)	/* 225 */
 104.746 +	.long SYMBOL_NAME(sys_setxattr)
 104.747 +	.long SYMBOL_NAME(sys_lsetxattr)
 104.748 +	.long SYMBOL_NAME(sys_fsetxattr)
 104.749 +	.long SYMBOL_NAME(sys_getxattr)
 104.750 +	.long SYMBOL_NAME(sys_lgetxattr)	/* 230 */
 104.751 +	.long SYMBOL_NAME(sys_fgetxattr)
 104.752 +	.long SYMBOL_NAME(sys_listxattr)
 104.753 +	.long SYMBOL_NAME(sys_llistxattr)
 104.754 +	.long SYMBOL_NAME(sys_flistxattr)
 104.755 +	.long SYMBOL_NAME(sys_removexattr)	/* 235 */
 104.756 +	.long SYMBOL_NAME(sys_lremovexattr)
 104.757 +	.long SYMBOL_NAME(sys_fremovexattr)
 104.758 + 	.long SYMBOL_NAME(sys_tkill)
 104.759 +	.long SYMBOL_NAME(sys_sendfile64)
 104.760 +	.long SYMBOL_NAME(sys_ni_syscall)	/* 240 reserved for futex */
 104.761 +	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for sched_setaffinity */
 104.762 +	.long SYMBOL_NAME(sys_ni_syscall)	/* reserved for sched_getaffinity */
 104.763 +	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_set_thread_area */
 104.764 +	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_get_thread_area */
 104.765 +	.long SYMBOL_NAME(sys_ni_syscall)	/* 245 sys_io_setup */
 104.766 +	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_destroy */
 104.767 +	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_getevents */
 104.768 +	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_submit */
 104.769 +	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_io_cancel */
 104.770 +	.long SYMBOL_NAME(sys_ni_syscall)	/* 250 sys_alloc_hugepages */
 104.771 +	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_free_hugepages */
 104.772 +	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_exit_group */
 104.773 +	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_lookup_dcookie */
 104.774 +	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_epoll_create */
 104.775 +	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_epoll_ctl 255 */
 104.776 +	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_epoll_wait */
 104.777 + 	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_remap_file_pages */
 104.778 + 	.long SYMBOL_NAME(sys_ni_syscall)	/* sys_set_tid_address */
 104.779 +
 104.780 +	.rept NR_syscalls-(.-sys_call_table)/4
 104.781 +		.long SYMBOL_NAME(sys_ni_syscall)
 104.782 +	.endr
   105.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   105.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/kernel/head.S	Mon Jul 11 14:44:08 2005 +0000
   105.3 @@ -0,0 +1,41 @@
   105.4 +
   105.5 +.section __xen_guest
   105.6 +    .ascii "GUEST_OS=linux,GUEST_VER=2.4,XEN_VER=3.0,VIRT_BASE=0xC0000000"
   105.7 +    .ascii ",LOADER=generic"
   105.8 +    .byte  0
   105.9 +
  105.10 +.text
  105.11 +#include <linux/config.h>
  105.12 +#include <linux/threads.h>
  105.13 +#include <linux/linkage.h>
  105.14 +#include <asm/segment.h>
  105.15 +#include <asm/page.h>
  105.16 +#include <asm/pgtable.h>
  105.17 +#include <asm/desc.h>
  105.18 +
  105.19 +ENTRY(stext)
  105.20 +ENTRY(_stext)
  105.21 +        cld
  105.22 +        lss stack_start,%esp
  105.23 +        /* Copy the necessary stuff from xen_start_info structure. */
  105.24 +        mov $SYMBOL_NAME(xen_start_info_union),%edi
  105.25 +        mov $128,%ecx
  105.26 +        rep movsl
  105.27 +        jmp SYMBOL_NAME(start_kernel)
  105.28 +
  105.29 +ENTRY(stack_start)
  105.30 +	.long SYMBOL_NAME(init_task_union)+8192, __KERNEL_DS
  105.31 +
  105.32 +.org 0x1000
  105.33 +ENTRY(empty_zero_page)
  105.34 +
  105.35 +.org 0x2000
  105.36 +ENTRY(default_ldt)
  105.37 +
  105.38 +.org 0x3000
  105.39 +ENTRY(cpu0_pte_quicklist)
  105.40 +
  105.41 +.org 0x3400
  105.42 +ENTRY(cpu0_pgd_quicklist)
  105.43 +        
  105.44 +.org 0x3800
   106.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   106.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/kernel/i386_ksyms.c	Mon Jul 11 14:44:08 2005 +0000
   106.3 @@ -0,0 +1,180 @@
   106.4 +#include <linux/config.h>
   106.5 +#include <linux/module.h>
   106.6 +#include <linux/smp.h>
   106.7 +#include <linux/user.h>
   106.8 +#include <linux/elfcore.h>
   106.9 +#include <linux/mca.h>
  106.10 +#include <linux/sched.h>
  106.11 +#include <linux/in6.h>
  106.12 +#include <linux/interrupt.h>
  106.13 +#include <linux/smp_lock.h>
  106.14 +#include <linux/pm.h>
  106.15 +#include <linux/pci.h>
  106.16 +#include <linux/apm_bios.h>
  106.17 +#include <linux/kernel.h>
  106.18 +#include <linux/string.h>
  106.19 +#include <linux/tty.h>
  106.20 +
  106.21 +#include <asm/semaphore.h>
  106.22 +#include <asm/processor.h>
  106.23 +#include <asm/i387.h>
  106.24 +#include <asm/uaccess.h>
  106.25 +#include <asm/checksum.h>
  106.26 +#include <asm/io.h>
  106.27 +#include <asm/hardirq.h>
  106.28 +#include <asm/delay.h>
  106.29 +#include <asm/irq.h>
  106.30 +#include <asm/mmx.h>
  106.31 +#include <asm/desc.h>
  106.32 +#include <asm/pgtable.h>
  106.33 +#include <asm/pgalloc.h>
  106.34 +
  106.35 +extern void dump_thread(struct pt_regs *, struct user *);
  106.36 +extern spinlock_t rtc_lock;
  106.37 +
  106.38 +#if defined(CONFIG_APMXXX) || defined(CONFIG_APM_MODULEXXX)
  106.39 +extern void machine_real_restart(unsigned char *, int);
  106.40 +EXPORT_SYMBOL(machine_real_restart);
  106.41 +extern void default_idle(void);
  106.42 +EXPORT_SYMBOL(default_idle);
  106.43 +#endif
  106.44 +
  106.45 +#ifdef CONFIG_SMP
  106.46 +extern void FASTCALL( __write_lock_failed(rwlock_t *rw));
  106.47 +extern void FASTCALL( __read_lock_failed(rwlock_t *rw));
  106.48 +#endif
  106.49 +
  106.50 +#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
  106.51 +extern struct drive_info_struct drive_info;
  106.52 +EXPORT_SYMBOL(drive_info);
  106.53 +#endif
  106.54 +
  106.55 +// XXX extern unsigned long get_cmos_time(void);
  106.56 +
  106.57 +/* platform dependent support */
  106.58 +EXPORT_SYMBOL(boot_cpu_data);
  106.59 +EXPORT_SYMBOL(dump_thread);
  106.60 +EXPORT_SYMBOL(dump_fpu);
  106.61 +EXPORT_SYMBOL(dump_extended_fpu);
  106.62 +EXPORT_SYMBOL(__ioremap);
  106.63 +EXPORT_SYMBOL(iounmap);
  106.64 +EXPORT_SYMBOL(enable_irq);
  106.65 +EXPORT_SYMBOL(disable_irq);
  106.66 +EXPORT_SYMBOL(disable_irq_nosync);
  106.67 +EXPORT_SYMBOL(probe_irq_mask);
  106.68 +EXPORT_SYMBOL(kernel_thread);
  106.69 +EXPORT_SYMBOL(pm_idle);
  106.70 +EXPORT_SYMBOL(pm_power_off);
  106.71 +EXPORT_SYMBOL(apm_info);
  106.72 +//EXPORT_SYMBOL(gdt);
  106.73 +EXPORT_SYMBOL(empty_zero_page);
  106.74 +EXPORT_SYMBOL(phys_to_machine_mapping);
  106.75 +
  106.76 +
  106.77 +#ifdef CONFIG_DEBUG_IOVIRT
  106.78 +EXPORT_SYMBOL(__io_virt_debug);
  106.79 +#endif
  106.80 +
  106.81 +EXPORT_SYMBOL_NOVERS(__down_failed);
  106.82 +EXPORT_SYMBOL_NOVERS(__down_failed_interruptible);
  106.83 +EXPORT_SYMBOL_NOVERS(__down_failed_trylock);
  106.84 +EXPORT_SYMBOL_NOVERS(__up_wakeup);
  106.85 +/* Networking helper routines. */
  106.86 +EXPORT_SYMBOL(csum_partial_copy_generic);
  106.87 +/* Delay loops */
  106.88 +EXPORT_SYMBOL(__ndelay);
  106.89 +EXPORT_SYMBOL(__udelay);
  106.90 +EXPORT_SYMBOL(__delay);
  106.91 +EXPORT_SYMBOL(__const_udelay);
  106.92 +
  106.93 +EXPORT_SYMBOL_NOVERS(__get_user_1);
  106.94 +EXPORT_SYMBOL_NOVERS(__get_user_2);
  106.95 +EXPORT_SYMBOL_NOVERS(__get_user_4);
  106.96 +
  106.97 +EXPORT_SYMBOL(strtok);
  106.98 +EXPORT_SYMBOL(strpbrk);
  106.99 +EXPORT_SYMBOL(strstr);
 106.100 +
 106.101 +EXPORT_SYMBOL(strncpy_from_user);
 106.102 +EXPORT_SYMBOL(__strncpy_from_user);
 106.103 +EXPORT_SYMBOL(clear_user);
 106.104 +EXPORT_SYMBOL(__clear_user);
 106.105 +EXPORT_SYMBOL(__generic_copy_from_user);
 106.106 +EXPORT_SYMBOL(__generic_copy_to_user);
 106.107 +EXPORT_SYMBOL(strnlen_user);
 106.108 +
 106.109 +
 106.110 +EXPORT_SYMBOL(pci_alloc_consistent);
 106.111 +EXPORT_SYMBOL(pci_free_consistent);
 106.112 +
 106.113 +#ifdef CONFIG_PCI
 106.114 +EXPORT_SYMBOL(pcibios_penalize_isa_irq);
 106.115 +EXPORT_SYMBOL(pci_mem_start);
 106.116 +#endif
 106.117 +
 106.118 +
 106.119 +#ifdef CONFIG_X86_USE_3DNOW
 106.120 +EXPORT_SYMBOL(_mmx_memcpy);
 106.121 +EXPORT_SYMBOL(mmx_clear_page);
 106.122 +EXPORT_SYMBOL(mmx_copy_page);
 106.123 +#endif
 106.124 +
 106.125 +#ifdef CONFIG_SMP
 106.126 +EXPORT_SYMBOL(cpu_data);
 106.127 +EXPORT_SYMBOL(kernel_flag_cacheline);
 106.128 +EXPORT_SYMBOL(smp_num_cpus);
 106.129 +EXPORT_SYMBOL(cpu_online_map);
 106.130 +EXPORT_SYMBOL_NOVERS(__write_lock_failed);
 106.131 +EXPORT_SYMBOL_NOVERS(__read_lock_failed);
 106.132 +
 106.133 +/* Global SMP irq stuff */
 106.134 +EXPORT_SYMBOL(synchronize_irq);
 106.135 +EXPORT_SYMBOL(global_irq_holder);
 106.136 +EXPORT_SYMBOL(__global_cli);
 106.137 +EXPORT_SYMBOL(__global_sti);
 106.138 +EXPORT_SYMBOL(__global_save_flags);
 106.139 +EXPORT_SYMBOL(__global_restore_flags);
 106.140 +EXPORT_SYMBOL(smp_call_function);
 106.141 +
 106.142 +/* TLB flushing */
 106.143 +EXPORT_SYMBOL(flush_tlb_page);
 106.144 +
 106.145 +/* HT support */
 106.146 +EXPORT_SYMBOL(smp_num_siblings);
 106.147 +EXPORT_SYMBOL(cpu_sibling_map);
 106.148 +#endif
 106.149 +
 106.150 +#ifdef CONFIG_X86_IO_APIC
 106.151 +EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
 106.152 +#endif
 106.153 +
 106.154 +#ifdef CONFIG_VT
 106.155 +EXPORT_SYMBOL(screen_info);
 106.156 +#endif
 106.157 +
 106.158 +EXPORT_SYMBOL(get_wchan);
 106.159 +
 106.160 +EXPORT_SYMBOL(rtc_lock);
 106.161 +
 106.162 +#undef memcpy
 106.163 +#undef memset
 106.164 +extern void * memset(void *,int,__kernel_size_t);
 106.165 +extern void * memcpy(void *,const void *,__kernel_size_t);
 106.166 +EXPORT_SYMBOL_NOVERS(memcpy);
 106.167 +EXPORT_SYMBOL_NOVERS(memset);
 106.168 +
 106.169 +#ifdef CONFIG_HAVE_DEC_LOCK
 106.170 +EXPORT_SYMBOL(atomic_dec_and_lock);
 106.171 +#endif
 106.172 +
 106.173 +#ifdef CONFIG_MULTIQUAD
 106.174 +EXPORT_SYMBOL(xquad_portio);
 106.175 +#endif
 106.176 +
 106.177 +#include <asm/xen_proc.h>
 106.178 +EXPORT_SYMBOL(create_xen_proc_entry);
 106.179 +EXPORT_SYMBOL(remove_xen_proc_entry);
 106.180 +
 106.181 +EXPORT_SYMBOL(evtchn_do_upcall);
 106.182 +EXPORT_SYMBOL(force_evtchn_callback);
 106.183 +EXPORT_SYMBOL(HYPERVISOR_shared_info);
   107.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   107.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/kernel/irq.c	Mon Jul 11 14:44:08 2005 +0000
   107.3 @@ -0,0 +1,1242 @@
   107.4 +/*
   107.5 + *	linux/arch/i386/kernel/irq.c
   107.6 + *
   107.7 + *	Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
   107.8 + *
   107.9 + * This file contains the code used by various IRQ handling routines:
  107.10 + * asking for different IRQ's should be done through these routines
  107.11 + * instead of just grabbing them. Thus setups with different IRQ numbers
  107.12 + * shouldn't result in any weird surprises, and installing new handlers
  107.13 + * should be easier.
  107.14 + */
  107.15 +
  107.16 +/*
  107.17 + * (mostly architecture independent, will move to kernel/irq.c in 2.5.)
  107.18 + *
  107.19 + * IRQs are in fact implemented a bit like signal handlers for the kernel.
  107.20 + * Naturally it's not a 1:1 relation, but there are similarities.
  107.21 + */
  107.22 +
  107.23 +#include <linux/config.h>
  107.24 +#include <linux/ptrace.h>
  107.25 +#include <linux/errno.h>
  107.26 +#include <linux/signal.h>
  107.27 +#include <linux/sched.h>
  107.28 +#include <linux/ioport.h>
  107.29 +#include <linux/interrupt.h>
  107.30 +#include <linux/timex.h>
  107.31 +#include <linux/slab.h>
  107.32 +#include <linux/random.h>
  107.33 +#include <linux/smp_lock.h>
  107.34 +#include <linux/init.h>
  107.35 +#include <linux/kernel_stat.h>
  107.36 +#include <linux/irq.h>
  107.37 +#include <linux/proc_fs.h>
  107.38 +#include <linux/seq_file.h>
  107.39 +
  107.40 +#include <asm/atomic.h>
  107.41 +#include <asm/io.h>
  107.42 +#include <asm/smp.h>
  107.43 +#include <asm/system.h>
  107.44 +#include <asm/bitops.h>
  107.45 +#include <asm/uaccess.h>
  107.46 +#include <asm/pgalloc.h>
  107.47 +#include <asm/delay.h>
  107.48 +#include <asm/desc.h>
  107.49 +#include <asm/irq.h>
  107.50 +
  107.51 +
  107.52 +
  107.53 +/*
  107.54 + * Linux has a controller-independent x86 interrupt architecture.
  107.55 + * every controller has a 'controller-template', that is used
  107.56 + * by the main code to do the right thing. Each driver-visible
  107.57 + * interrupt source is transparently wired to the apropriate
  107.58 + * controller. Thus drivers need not be aware of the
  107.59 + * interrupt-controller.
  107.60 + *
  107.61 + * Various interrupt controllers we handle: 8259 PIC, SMP IO-APIC,
  107.62 + * PIIX4's internal 8259 PIC and SGI's Visual Workstation Cobalt (IO-)APIC.
  107.63 + * (IO-APICs assumed to be messaging to Pentium local-APICs)
  107.64 + *
  107.65 + * the code is designed to be easily extended with new/different
  107.66 + * interrupt controllers, without having to do assembly magic.
  107.67 + */
  107.68 +
  107.69 +/*
  107.70 + * Controller mappings for all interrupt sources:
  107.71 + */
  107.72 +irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned =
  107.73 +	{ [0 ... NR_IRQS-1] = { 0, &no_irq_type, NULL, 0, SPIN_LOCK_UNLOCKED}};
  107.74 +
  107.75 +static void register_irq_proc (unsigned int irq);
  107.76 +
  107.77 +/*
  107.78 + * Special irq handlers.
  107.79 + */
  107.80 +
  107.81 +void no_action(int cpl, void *dev_id, struct pt_regs *regs) { }
  107.82 +
  107.83 +/*
  107.84 + * Generic no controller code
  107.85 + */
  107.86 +
  107.87 +static void enable_none(unsigned int irq) { }
  107.88 +static unsigned int startup_none(unsigned int irq) { return 0; }
  107.89 +static void disable_none(unsigned int irq) { }
  107.90 +static void ack_none(unsigned int irq)
  107.91 +{
  107.92 +/*
  107.93 + * 'what should we do if we get a hw irq event on an illegal vector'.
  107.94 + * each architecture has to answer this themselves, it doesnt deserve
  107.95 + * a generic callback i think.
  107.96 + */
  107.97 +#if CONFIG_X86
  107.98 +	printk("unexpected IRQ trap at vector %02x\n", irq);
  107.99 +#ifdef CONFIG_X86_LOCAL_APIC
 107.100 +	/*
 107.101 +	 * Currently unexpected vectors happen only on SMP and APIC.
 107.102 +	 * We _must_ ack these because every local APIC has only N
 107.103 +	 * irq slots per priority level, and a 'hanging, unacked' IRQ
 107.104 +	 * holds up an irq slot - in excessive cases (when multiple
 107.105 +	 * unexpected vectors occur) that might lock up the APIC
 107.106 +	 * completely.
 107.107 +	 */
 107.108 +	ack_APIC_irq();
 107.109 +#endif
 107.110 +#endif
 107.111 +}
 107.112 +
 107.113 +/* startup is the same as "enable", shutdown is same as "disable" */
 107.114 +#define shutdown_none	disable_none
 107.115 +#define end_none	enable_none
 107.116 +
 107.117 +struct hw_interrupt_type no_irq_type = {
 107.118 +	"none",
 107.119 +	startup_none,
 107.120 +	shutdown_none,
 107.121 +	enable_none,
 107.122 +	disable_none,
 107.123 +	ack_none,
 107.124 +	end_none
 107.125 +};
 107.126 +
 107.127 +atomic_t irq_err_count;
 107.128 +#ifdef CONFIG_X86_IO_APIC
 107.129 +#ifdef APIC_MISMATCH_DEBUG
 107.130 +atomic_t irq_mis_count;
 107.131 +#endif
 107.132 +#endif
 107.133 +
 107.134 +/*
 107.135 + * Generic, controller-independent functions:
 107.136 + */
 107.137 +
 107.138 +int show_interrupts(struct seq_file *p, void *v)
 107.139 +{
 107.140 +	int i, j;
 107.141 +	struct irqaction * action;
 107.142 +
 107.143 +	seq_printf(p, "           ");
 107.144 +	for (j=0; j<smp_num_cpus; j++)
 107.145 +		seq_printf(p, "CPU%d       ",j);
 107.146 +	seq_putc(p,'\n');
 107.147 +
 107.148 +	for (i = 0 ; i < NR_IRQS ; i++) {
 107.149 +		action = irq_desc[i].action;
 107.150 +		if (!action) 
 107.151 +			continue;
 107.152 +		seq_printf(p, "%3d: ",i);
 107.153 +#ifndef CONFIG_SMP
 107.154 +		seq_printf(p, "%10u ", kstat_irqs(i));
 107.155 +#else
 107.156 +		for (j = 0; j < smp_num_cpus; j++)
 107.157 +			seq_printf(p, "%10u ",
 107.158 +				kstat.irqs[cpu_logical_map(j)][i]);
 107.159 +#endif
 107.160 +		seq_printf(p, " %14s", irq_desc[i].handler->typename);
 107.161 +		seq_printf(p, "  %s", action->name);
 107.162 +
 107.163 +		for (action=action->next; action; action = action->next)
 107.164 +			seq_printf(p, ", %s", action->name);
 107.165 +		seq_putc(p,'\n');
 107.166 +	}
 107.167 +	seq_printf(p, "NMI: ");
 107.168 +	for (j = 0; j < smp_num_cpus; j++)
 107.169 +		seq_printf(p, "%10u ",
 107.170 +			nmi_count(cpu_logical_map(j)));
 107.171 +	seq_printf(p, "\n");
 107.172 +#if CONFIG_X86_LOCAL_APIC
 107.173 +	seq_printf(p, "LOC: ");
 107.174 +	for (j = 0; j < smp_num_cpus; j++)
 107.175 +		seq_printf(p, "%10u ",
 107.176 +			apic_timer_irqs[cpu_logical_map(j)]);
 107.177 +	seq_printf(p, "\n");
 107.178 +#endif
 107.179 +	seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
 107.180 +#ifdef CONFIG_X86_IO_APIC
 107.181 +#ifdef APIC_MISMATCH_DEBUG
 107.182 +	seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
 107.183 +#endif
 107.184 +#endif
 107.185 +
 107.186 +	return 0;
 107.187 +}
 107.188 +
 107.189 +
 107.190 +/*
 107.191 + * Global interrupt locks for SMP. Allow interrupts to come in on any
 107.192 + * CPU, yet make cli/sti act globally to protect critical regions..
 107.193 + */
 107.194 +
 107.195 +#ifdef CONFIG_SMP
 107.196 +unsigned char global_irq_holder = NO_PROC_ID;
 107.197 +unsigned volatile long global_irq_lock; /* pendantic: long for set_bit --RR */
 107.198 +
 107.199 +extern void show_stack(unsigned long* esp);
 107.200 +
 107.201 +static void show(char * str)
 107.202 +{
 107.203 +	int i;
 107.204 +	int cpu = smp_processor_id();
 107.205 +
 107.206 +	printk("\n%s, CPU %d:\n", str, cpu);
 107.207 +	printk("irq:  %d [",irqs_running());
 107.208 +	for(i=0;i < smp_num_cpus;i++)
 107.209 +		printk(" %d",local_irq_count(i));
 107.210 +	printk(" ]\nbh:   %d [",spin_is_locked(&global_bh_lock) ? 1 : 0);
 107.211 +	for(i=0;i < smp_num_cpus;i++)
 107.212 +		printk(" %d",local_bh_count(i));
 107.213 +
 107.214 +	printk(" ]\nStack dumps:");
 107.215 +	for(i = 0; i < smp_num_cpus; i++) {
 107.216 +		unsigned long esp;
 107.217 +		if (i == cpu)
 107.218 +			continue;
 107.219 +		printk("\nCPU %d:",i);
 107.220 +		esp = init_tss[i].esp0;
 107.221 +		if (!esp) {
 107.222 +			/* tss->esp0 is set to NULL in cpu_init(),
 107.223 +			 * it's initialized when the cpu returns to user
 107.224 +			 * space. -- manfreds
 107.225 +			 */
 107.226 +			printk(" <unknown> ");
 107.227 +			continue;
 107.228 +		}
 107.229 +		esp &= ~(THREAD_SIZE-1);
 107.230 +		esp += sizeof(struct task_struct);
 107.231 +		show_stack((void*)esp);
 107.232 + 	}
 107.233 +	printk("\nCPU %d:",cpu);
 107.234 +	show_stack(NULL);
 107.235 +	printk("\n");
 107.236 +}
 107.237 +	
 107.238 +#define MAXCOUNT 100000000
 107.239 +
 107.240 +/*
 107.241 + * I had a lockup scenario where a tight loop doing
 107.242 + * spin_unlock()/spin_lock() on CPU#1 was racing with
 107.243 + * spin_lock() on CPU#0. CPU#0 should have noticed spin_unlock(), but
 107.244 + * apparently the spin_unlock() information did not make it
 107.245 + * through to CPU#0 ... nasty, is this by design, do we have to limit
 107.246 + * 'memory update oscillation frequency' artificially like here?
 107.247 + *
 107.248 + * Such 'high frequency update' races can be avoided by careful design, but
 107.249 + * some of our major constructs like spinlocks use similar techniques,
 107.250 + * it would be nice to clarify this issue. Set this define to 0 if you
 107.251 + * want to check whether your system freezes.  I suspect the delay done
 107.252 + * by SYNC_OTHER_CORES() is in correlation with 'snooping latency', but
 107.253 + * i thought that such things are guaranteed by design, since we use
 107.254 + * the 'LOCK' prefix.
 107.255 + */
 107.256 +#define SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND 0
 107.257 +
 107.258 +#if SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND
 107.259 +# define SYNC_OTHER_CORES(x) udelay(x+1)
 107.260 +#else
 107.261 +/*
 107.262 + * We have to allow irqs to arrive between __sti and __cli
 107.263 + */
 107.264 +# define SYNC_OTHER_CORES(x) __asm__ __volatile__ ("nop")
 107.265 +#endif
 107.266 +
 107.267 +static inline void wait_on_irq(int cpu)
 107.268 +{
 107.269 +	int count = MAXCOUNT;
 107.270 +
 107.271 +	for (;;) {
 107.272 +
 107.273 +		/*
 107.274 +		 * Wait until all interrupts are gone. Wait
 107.275 +		 * for bottom half handlers unless we're
 107.276 +		 * already executing in one..
 107.277 +		 */
 107.278 +		if (!irqs_running())
 107.279 +			if (local_bh_count(cpu) || !spin_is_locked(&global_bh_lock))
 107.280 +				break;
 107.281 +
 107.282 +		/* Duh, we have to loop. Release the lock to avoid deadlocks */
 107.283 +		clear_bit(0,&global_irq_lock);
 107.284 +
 107.285 +		for (;;) {
 107.286 +			if (!--count) {
 107.287 +				show("wait_on_irq");
 107.288 +				count = ~0;
 107.289 +			}
 107.290 +			__sti();
 107.291 +			SYNC_OTHER_CORES(cpu);
 107.292 +			__cli();
 107.293 +			if (irqs_running())
 107.294 +				continue;
 107.295 +			if (global_irq_lock)
 107.296 +				continue;
 107.297 +			if (!local_bh_count(cpu) && spin_is_locked(&global_bh_lock))
 107.298 +				continue;
 107.299 +			if (!test_and_set_bit(0,&global_irq_lock))
 107.300 +				break;
 107.301 +		}
 107.302 +	}
 107.303 +}
 107.304 +
 107.305 +/*
 107.306 + * This is called when we want to synchronize with
 107.307 + * interrupts. We may for example tell a device to
 107.308 + * stop sending interrupts: but to make sure there
 107.309 + * are no interrupts that are executing on another
 107.310 + * CPU we need to call this function.
 107.311 + */
 107.312 +void synchronize_irq(void)
 107.313 +{
 107.314 +	if (irqs_running()) {
 107.315 +		/* Stupid approach */
 107.316 +		cli();
 107.317 +		sti();
 107.318 +	}
 107.319 +}
 107.320 +
 107.321 +static inline void get_irqlock(int cpu)
 107.322 +{
 107.323 +	if (test_and_set_bit(0,&global_irq_lock)) {
 107.324 +		/* do we already hold the lock? */
 107.325 +		if ((unsigned char) cpu == global_irq_holder)
 107.326 +			return;
 107.327 +		/* Uhhuh.. Somebody else got it. Wait.. */
 107.328 +		do {
 107.329 +			do {
 107.330 +				rep_nop();
 107.331 +			} while (test_bit(0,&global_irq_lock));
 107.332 +		} while (test_and_set_bit(0,&global_irq_lock));		
 107.333 +	}
 107.334 +	/* 
 107.335 +	 * We also to make sure that nobody else is running
 107.336 +	 * in an interrupt context. 
 107.337 +	 */
 107.338 +	wait_on_irq(cpu);
 107.339 +
 107.340 +	/*
 107.341 +	 * Ok, finally..
 107.342 +	 */
 107.343 +	global_irq_holder = cpu;
 107.344 +}
 107.345 +
 107.346 +/*
 107.347 + * A global "cli()" while in an interrupt context
 107.348 + * turns into just a local cli(). Interrupts
 107.349 + * should use spinlocks for the (very unlikely)
 107.350 + * case that they ever want to protect against
 107.351 + * each other.
 107.352 + *
 107.353 + * If we already have local interrupts disabled,
 107.354 + * this will not turn a local disable into a
 107.355 + * global one (problems with spinlocks: this makes
 107.356 + * save_flags+cli+sti usable inside a spinlock).
 107.357 + */
 107.358 +void __global_cli(void)
 107.359 +{
 107.360 +	unsigned int flags;
 107.361 +
 107.362 +	__save_flags(flags);
 107.363 +	if (!flags) {
 107.364 +		int cpu = smp_processor_id();
 107.365 +		__cli();
 107.366 +		if (!local_irq_count(cpu))
 107.367 +			get_irqlock(cpu);
 107.368 +	}
 107.369 +}
 107.370 +
 107.371 +void __global_sti(void)
 107.372 +{
 107.373 +	int cpu = smp_processor_id();
 107.374 +
 107.375 +	if (!local_irq_count(cpu))
 107.376 +		release_irqlock(cpu);
 107.377 +	__sti();
 107.378 +}
 107.379 +
 107.380 +/*
 107.381 + * SMP flags value to restore to:
 107.382 + * 0 - global cli
 107.383 + * 1 - global sti
 107.384 + * 2 - local cli
 107.385 + * 3 - local sti
 107.386 + */
 107.387 +unsigned long __global_save_flags(void)
 107.388 +{
 107.389 +	int retval;
 107.390 +	int local_enabled;
 107.391 +	unsigned long flags;
 107.392 +	int cpu = smp_processor_id();
 107.393 +
 107.394 +	__save_flags(flags);
 107.395 +	local_enabled = !flags;
 107.396 +	/* default to local */
 107.397 +	retval = 2 + local_enabled;
 107.398 +
 107.399 +	/* check for global flags if we're not in an interrupt */
 107.400 +	if (!local_irq_count(cpu)) {
 107.401 +		if (local_enabled)
 107.402 +			retval = 1;
 107.403 +		if (global_irq_holder == cpu)
 107.404 +			retval = 0;
 107.405 +	}
 107.406 +	return retval;
 107.407 +}
 107.408 +
 107.409 +void __global_restore_flags(unsigned long flags)
 107.410 +{
 107.411 +	switch (flags) {
 107.412 +	case 0:
 107.413 +		__global_cli();
 107.414 +		break;
 107.415 +	case 1:
 107.416 +		__global_sti();
 107.417 +		break;
 107.418 +	case 2:
 107.419 +		__cli();
 107.420 +		break;
 107.421 +	case 3:
 107.422 +		__sti();
 107.423 +		break;
 107.424 +	default:
 107.425 +		printk("global_restore_flags: %08lx (%08lx)\n",
 107.426 +			flags, (&flags)[-1]);
 107.427 +	}
 107.428 +}
 107.429 +
 107.430 +#endif
 107.431 +
 107.432 +/*
 107.433 + * This should really return information about whether
 107.434 + * we should do bottom half handling etc. Right now we
 107.435 + * end up _always_ checking the bottom half, which is a
 107.436 + * waste of time and is not what some drivers would
 107.437 + * prefer.
 107.438 + */
 107.439 +int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action)
 107.440 +{
 107.441 +	int status;
 107.442 +	int cpu = smp_processor_id();
 107.443 +
 107.444 +	irq_enter(cpu, irq);
 107.445 +
 107.446 +	status = 1;	/* Force the "do bottom halves" bit */
 107.447 +
 107.448 +	if (!(action->flags & SA_INTERRUPT))
 107.449 +		__sti();
 107.450 +
 107.451 +	do {
 107.452 +		status |= action->flags;
 107.453 +		action->handler(irq, action->dev_id, regs);
 107.454 +		action = action->next;
 107.455 +	} while (action);
 107.456 +	if (status & SA_SAMPLE_RANDOM)
 107.457 +		add_interrupt_randomness(irq);
 107.458 +	__cli();
 107.459 +
 107.460 +	irq_exit(cpu, irq);
 107.461 +
 107.462 +	return status;
 107.463 +}
 107.464 +
 107.465 +/*
 107.466 + * Generic enable/disable code: this just calls
 107.467 + * down into the PIC-specific version for the actual
 107.468 + * hardware disable after having gotten the irq
 107.469 + * controller lock. 
 107.470 + */
 107.471 + 
 107.472 +/**
 107.473 + *	disable_irq_nosync - disable an irq without waiting
 107.474 + *	@irq: Interrupt to disable
 107.475 + *
 107.476 + *	Disable the selected interrupt line.  Disables and Enables are
 107.477 + *	nested.
 107.478 + *	Unlike disable_irq(), this function does not ensure existing
 107.479 + *	instances of the IRQ handler have completed before returning.
 107.480 + *
 107.481 + *	This function may be called from IRQ context.
 107.482 + */
 107.483 + 
 107.484 +inline void disable_irq_nosync(unsigned int irq)
 107.485 +{
 107.486 +	irq_desc_t *desc = irq_desc + irq;
 107.487 +	unsigned long flags;
 107.488 +
 107.489 +	spin_lock_irqsave(&desc->lock, flags);
 107.490 +	if (!desc->depth++) {
 107.491 +		desc->status |= IRQ_DISABLED;
 107.492 +		desc->handler->disable(irq);
 107.493 +	}
 107.494 +	spin_unlock_irqrestore(&desc->lock, flags);
 107.495 +}
 107.496 +
 107.497 +/**
 107.498 + *	disable_irq - disable an irq and wait for completion
 107.499 + *	@irq: Interrupt to disable
 107.500 + *
 107.501 + *	Disable the selected interrupt line.  Enables and Disables are
 107.502 + *	nested.
 107.503 + *	This function waits for any pending IRQ handlers for this interrupt
 107.504 + *	to complete before returning. If you use this function while
 107.505 + *	holding a resource the IRQ handler may need you will deadlock.
 107.506 + *
 107.507 + *	This function may be called - with care - from IRQ context.
 107.508 + */
 107.509 + 
 107.510 +void disable_irq(unsigned int irq)
 107.511 +{
 107.512 +	disable_irq_nosync(irq);
 107.513 +
 107.514 +	if (!local_irq_count(smp_processor_id())) {
 107.515 +		do {
 107.516 +			barrier();
 107.517 +			cpu_relax();
 107.518 +		} while (irq_desc[irq].status & IRQ_INPROGRESS);
 107.519 +	}
 107.520 +}
 107.521 +
 107.522 +/**
 107.523 + *	enable_irq - enable handling of an irq
 107.524 + *	@irq: Interrupt to enable
 107.525 + *
 107.526 + *	Undoes the effect of one call to disable_irq().  If this
 107.527 + *	matches the last disable, processing of interrupts on this
 107.528 + *	IRQ line is re-enabled.
 107.529 + *
 107.530 + *	This function may be called from IRQ context.
 107.531 + */
 107.532 + 
 107.533 +void enable_irq(unsigned int irq)
 107.534 +{
 107.535 +	irq_desc_t *desc = irq_desc + irq;
 107.536 +	unsigned long flags;
 107.537 +
 107.538 +	spin_lock_irqsave(&desc->lock, flags);
 107.539 +	switch (desc->depth) {
 107.540 +	case 1: {
 107.541 +		unsigned int status = desc->status & ~IRQ_DISABLED;
 107.542 +		desc->status = status;
 107.543 +		if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
 107.544 +			desc->status = status | IRQ_REPLAY;
 107.545 +			hw_resend_irq(desc->handler,irq);
 107.546 +		}
 107.547 +		desc->handler->enable(irq);
 107.548 +		/* fall-through */
 107.549 +	}
 107.550 +	default:
 107.551 +		desc->depth--;
 107.552 +		break;
 107.553 +	case 0:
 107.554 +		printk("enable_irq(%u) unbalanced from %p\n", irq,
 107.555 +		       __builtin_return_address(0));
 107.556 +	}
 107.557 +	spin_unlock_irqrestore(&desc->lock, flags);
 107.558 +}
 107.559 +
 107.560 +/*
 107.561 + * do_IRQ handles all normal device IRQ's (the special
 107.562 + * SMP cross-CPU interrupts have their own specific
 107.563 + * handlers).
 107.564 + */
 107.565 +asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
 107.566 +{	
 107.567 +	/* 
 107.568 +	 * We ack quickly, we don't want the irq controller
 107.569 +	 * thinking we're snobs just because some other CPU has
 107.570 +	 * disabled global interrupts (we have already done the
 107.571 +	 * INT_ACK cycles, it's too late to try to pretend to the
 107.572 +	 * controller that we aren't taking the interrupt).
 107.573 +	 *
 107.574 +	 * 0 return value means that this irq is already being
 107.575 +	 * handled by some other CPU. (or is disabled)
 107.576 +	 */
 107.577 +	int irq = regs->orig_eax & 0xff; /* high bits used in ret_from_ code */
 107.578 +	int cpu = smp_processor_id();
 107.579 +	irq_desc_t *desc = irq_desc + irq;
 107.580 +	struct irqaction * action;
 107.581 +	unsigned int status;
 107.582 +#ifdef CONFIG_DEBUG_STACKOVERFLOW
 107.583 +	long esp;
 107.584 +
 107.585 +	/* Debugging check for stack overflow: is there less than 1KB free? */
 107.586 +	__asm__ __volatile__("andl %%esp,%0" : "=r" (esp) : "0" (8191));
 107.587 +	if (unlikely(esp < (sizeof(struct task_struct) + 1024))) {
 107.588 +		extern void show_stack(unsigned long *);
 107.589 +
 107.590 +		printk("do_IRQ: stack overflow: %ld\n",
 107.591 +			esp - sizeof(struct task_struct));
 107.592 +		__asm__ __volatile__("movl %%esp,%0" : "=r" (esp));
 107.593 +		show_stack((void *)esp);
 107.594 +	}
 107.595 +#endif
 107.596 +
 107.597 +	kstat.irqs[cpu][irq]++;
 107.598 +	spin_lock(&desc->lock);
 107.599 +	desc->handler->ack(irq);
 107.600 +	/*
 107.601 +	   REPLAY is when Linux resends an IRQ that was dropped earlier
 107.602 +	   WAITING is used by probe to mark irqs that are being tested
 107.603 +	   */
 107.604 +	status = desc->status & ~(IRQ_REPLAY | IRQ_WAITING);
 107.605 +	status |= IRQ_PENDING; /* we _want_ to handle it */
 107.606 +
 107.607 +	/*
 107.608 +	 * If the IRQ is disabled for whatever reason, we cannot
 107.609 +	 * use the action we have.
 107.610 +	 */
 107.611 +	action = NULL;
 107.612 +	if (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
 107.613 +		action = desc->action;
 107.614 +		status &= ~IRQ_PENDING; /* we commit to handling */
 107.615 +		status |= IRQ_INPROGRESS; /* we are handling it */
 107.616 +	}
 107.617 +	desc->status = status;
 107.618 +
 107.619 +	/*
 107.620 +	 * If there is no IRQ handler or it was disabled, exit early.
 107.621 +	   Since we set PENDING, if another processor is handling
 107.622 +	   a different instance of this same irq, the other processor
 107.623 +	   will take care of it.
 107.624 +	 */
 107.625 +	if (!action)
 107.626 +		goto out;
 107.627 +
 107.628 +	/*
 107.629 +	 * Edge triggered interrupts need to remember
 107.630 +	 * pending events.
 107.631 +	 * This applies to any hw interrupts that allow a second
 107.632 +	 * instance of the same irq to arrive while we are in do_IRQ
 107.633 +	 * or in the handler. But the code here only handles the _second_
 107.634 +	 * instance of the irq, not the third or fourth. So it is mostly
 107.635 +	 * useful for irq hardware that does not mask cleanly in an
 107.636 +	 * SMP environment.
 107.637 +	 */
 107.638 +	for (;;) {
 107.639 +		spin_unlock(&desc->lock);
 107.640 +		handle_IRQ_event(irq, regs, action);
 107.641 +		spin_lock(&desc->lock);
 107.642 +		
 107.643 +		if (!(desc->status & IRQ_PENDING))
 107.644 +			break;
 107.645 +		desc->status &= ~IRQ_PENDING;
 107.646 +	}
 107.647 +	desc->status &= ~IRQ_INPROGRESS;
 107.648 +out:
 107.649 +	/*
 107.650 +	 * The ->end() handler has to deal with interrupts which got
 107.651 +	 * disabled while the handler was running.
 107.652 +	 */
 107.653 +	desc->handler->end(irq);
 107.654 +	spin_unlock(&desc->lock);
 107.655 +
 107.656 +	if (softirq_pending(cpu))
 107.657 +		do_softirq();
 107.658 +	return 1;
 107.659 +}
 107.660 +
 107.661 +/**
 107.662 + *	request_irq - allocate an interrupt line
 107.663 + *	@irq: Interrupt line to allocate
 107.664 + *	@handler: Function to be called when the IRQ occurs
 107.665 + *	@irqflags: Interrupt type flags
 107.666 + *	@devname: An ascii name for the claiming device
 107.667 + *	@dev_id: A cookie passed back to the handler function
 107.668 + *
 107.669 + *	This call allocates interrupt resources and enables the
 107.670 + *	interrupt line and IRQ handling. From the point this
 107.671 + *	call is made your handler function may be invoked. Since
 107.672 + *	your handler function must clear any interrupt the board 
 107.673 + *	raises, you must take care both to initialise your hardware
 107.674 + *	and to set up the interrupt handler in the right order.
 107.675 + *
 107.676 + *	Dev_id must be globally unique. Normally the address of the
 107.677 + *	device data structure is used as the cookie. Since the handler
 107.678 + *	receives this value it makes sense to use it.
 107.679 + *
 107.680 + *	If your interrupt is shared you must pass a non NULL dev_id
 107.681 + *	as this is required when freeing the interrupt.
 107.682 + *
 107.683 + *	Flags:
 107.684 + *
 107.685 + *	SA_SHIRQ		Interrupt is shared
 107.686 + *
 107.687 + *	SA_INTERRUPT		Disable local interrupts while processing
 107.688 + *
 107.689 + *	SA_SAMPLE_RANDOM	The interrupt can be used for entropy
 107.690 + *
 107.691 + */
 107.692 + 
 107.693 +int request_irq(unsigned int irq, 
 107.694 +		void (*handler)(int, void *, struct pt_regs *),
 107.695 +		unsigned long irqflags, 
 107.696 +		const char * devname,
 107.697 +		void *dev_id)
 107.698 +{
 107.699 +	int retval;
 107.700 +	struct irqaction * action;
 107.701 +
 107.702 +#if 1
 107.703 +	/*
 107.704 +	 * Sanity-check: shared interrupts should REALLY pass in
 107.705 +	 * a real dev-ID, otherwise we'll have trouble later trying
 107.706 +	 * to figure out which interrupt is which (messes up the
 107.707 +	 * interrupt freeing logic etc).
 107.708 +	 */
 107.709 +	if (irqflags & SA_SHIRQ) {
 107.710 +		if (!dev_id)
 107.711 +			printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", devname, (&irq)[-1]);
 107.712 +	}
 107.713 +#endif
 107.714 +
 107.715 +	if (irq >= NR_IRQS)
 107.716 +		return -EINVAL;
 107.717 +	if (!handler)
 107.718 +		return -EINVAL;
 107.719 +
 107.720 +	action = (struct irqaction *)
 107.721 +			kmalloc(sizeof(struct irqaction), GFP_KERNEL);
 107.722 +	if (!action)
 107.723 +		return -ENOMEM;
 107.724 +
 107.725 +	action->handler = handler;
 107.726 +	action->flags = irqflags;
 107.727 +	action->mask = 0;
 107.728 +	action->name = devname;
 107.729 +	action->next = NULL;
 107.730 +	action->dev_id = dev_id;
 107.731 +
 107.732 +	retval = setup_irq(irq, action);
 107.733 +	if (retval)
 107.734 +		kfree(action);
 107.735 +	return retval;
 107.736 +}
 107.737 +
 107.738 +/*
 107.739 + * Internal function to unregister an irqaction - typically used to
 107.740 + * deallocate special interrupts that are part of the architecture.
 107.741 + */
 107.742 +int teardown_irq(unsigned int irq, struct irqaction * old)
 107.743 +{
 107.744 +	irq_desc_t *desc;
 107.745 +	struct irqaction **p;
 107.746 +	unsigned long flags;
 107.747 +
 107.748 +	if (irq >= NR_IRQS)
 107.749 +		return -ENOENT;
 107.750 +
 107.751 +	desc = irq_desc + irq;
 107.752 +	spin_lock_irqsave(&desc->lock,flags);
 107.753 +	p = &desc->action;
 107.754 +	for (;;) {
 107.755 +		struct irqaction * action = *p;
 107.756 +		if (action) {
 107.757 +			struct irqaction **pp = p;
 107.758 +			p = &action->next;
 107.759 +			if (action != old)
 107.760 +				continue;
 107.761 +
 107.762 +			/* Found it - now remove it from the list of entries */
 107.763 +			*pp = action->next;
 107.764 +			if (!desc->action) {
 107.765 +				desc->status |= IRQ_DISABLED;
 107.766 +				desc->handler->shutdown(irq);
 107.767 +			}
 107.768 +			spin_unlock_irqrestore(&desc->lock,flags);
 107.769 +
 107.770 +#ifdef CONFIG_SMP
 107.771 +			/* Wait to make sure it's not being used on another CPU */
 107.772 +			while (desc->status & IRQ_INPROGRESS) {
 107.773 +				barrier();
 107.774 +				cpu_relax();
 107.775 +			}
 107.776 +#endif
 107.777 +			return 0;
 107.778 +		}
 107.779 +		printk("Trying to free free IRQ%d\n",irq);
 107.780 +		spin_unlock_irqrestore(&desc->lock,flags);
 107.781 +		return -ENOENT;
 107.782 +	}
 107.783 +}
 107.784 +
 107.785 +/**
 107.786 + *	free_irq - free an interrupt
 107.787 + *	@irq: Interrupt line to free
 107.788 + *	@dev_id: Device identity to free
 107.789 + *
 107.790 + *	Remove an interrupt handler. The handler is removed and if the
 107.791 + *	interrupt line is no longer in use by any driver it is disabled.
 107.792 + *	On a shared IRQ the caller must ensure the interrupt is disabled
 107.793 + *	on the card it drives before calling this function. The function
 107.794 + *	does not return until any executing interrupts for this IRQ
 107.795 + *	have completed.
 107.796 + *
 107.797 + *	This function may be called from interrupt context. 
 107.798 + *
 107.799 + *	Bugs: Attempting to free an irq in a handler for the same irq hangs
 107.800 + *	      the machine.
 107.801 + */
 107.802 + 
 107.803 +void free_irq(unsigned int irq, void *dev_id)
 107.804 +{
 107.805 +	irq_desc_t *desc;
 107.806 +	struct irqaction *action;
 107.807 +	unsigned long flags;
 107.808 +
 107.809 +	if (irq >= NR_IRQS)
 107.810 +		return;
 107.811 +
 107.812 +	desc = irq_desc + irq;
 107.813 +	spin_lock_irqsave(&desc->lock,flags);
 107.814 +	for (action = desc->action; action != NULL; action = action->next) {
 107.815 +		if (action->dev_id != dev_id)
 107.816 +			continue;
 107.817 +
 107.818 +		spin_unlock_irqrestore(&desc->lock,flags);
 107.819 +
 107.820 +		if (teardown_irq(irq, action) == 0)
 107.821 +			kfree(action);
 107.822 +		return;
 107.823 +	}
 107.824 +	printk("Trying to free free IRQ%d\n",irq);
 107.825 +	spin_unlock_irqrestore(&desc->lock,flags);
 107.826 +	return;
 107.827 +}
 107.828 +
 107.829 +/*
 107.830 + * IRQ autodetection code..
 107.831 + *
 107.832 + * This depends on the fact that any interrupt that
 107.833 + * comes in on to an unassigned handler will get stuck
 107.834 + * with "IRQ_WAITING" cleared and the interrupt
 107.835 + * disabled.
 107.836 + */
 107.837 +
 107.838 +static DECLARE_MUTEX(probe_sem);
 107.839 +
 107.840 +/**
 107.841 + *	probe_irq_on	- begin an interrupt autodetect
 107.842 + *
 107.843 + *	Commence probing for an interrupt. The interrupts are scanned
 107.844 + *	and a mask of potential interrupt lines is returned.
 107.845 + *
 107.846 + */
 107.847 + 
 107.848 +unsigned long probe_irq_on(void)
 107.849 +{
 107.850 +	unsigned int i;
 107.851 +	irq_desc_t *desc;
 107.852 +	unsigned long val;
 107.853 +	unsigned long delay;
 107.854 +
 107.855 +	down(&probe_sem);
 107.856 +	/* 
 107.857 +	 * something may have generated an irq long ago and we want to
 107.858 +	 * flush such a longstanding irq before considering it as spurious. 
 107.859 +	 */
 107.860 +	for (i = NR_PIRQS-1; i > 0; i--)  {
 107.861 +		desc = irq_desc + i;
 107.862 +
 107.863 +		spin_lock_irq(&desc->lock);
 107.864 +		if (!irq_desc[i].action) 
 107.865 +			irq_desc[i].handler->startup(i);
 107.866 +		spin_unlock_irq(&desc->lock);
 107.867 +	}
 107.868 +
 107.869 +	/* Wait for longstanding interrupts to trigger. */
 107.870 +	for (delay = jiffies + HZ/50; time_after(delay, jiffies); )
 107.871 +		/* about 20ms delay */ synchronize_irq();
 107.872 +
 107.873 +	/*
 107.874 +	 * enable any unassigned irqs
 107.875 +	 * (we must startup again here because if a longstanding irq
 107.876 +	 * happened in the previous stage, it may have masked itself)
 107.877 +	 */
 107.878 +	for (i = NR_PIRQS-1; i > 0; i--) {
 107.879 +		desc = irq_desc + i;
 107.880 +
 107.881 +		spin_lock_irq(&desc->lock);
 107.882 +		if (!desc->action) {
 107.883 +			desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
 107.884 +			if (desc->handler->startup(i))
 107.885 +				desc->status |= IRQ_PENDING;
 107.886 +		}
 107.887 +		spin_unlock_irq(&desc->lock);
 107.888 +	}
 107.889 +
 107.890 +	/*
 107.891 +	 * Wait for spurious interrupts to trigger
 107.892 +	 */
 107.893 +	for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
 107.894 +		/* about 100ms delay */ synchronize_irq();
 107.895 +
 107.896 +	/*
 107.897 +	 * Now filter out any obviously spurious interrupts
 107.898 +	 */
 107.899 +	val = 0;
 107.900 +	for (i = 0; i < NR_PIRQS; i++) {
 107.901 +		irq_desc_t *desc = irq_desc + i;
 107.902 +		unsigned int status;
 107.903 +
 107.904 +		spin_lock_irq(&desc->lock);
 107.905 +		status = desc->status;
 107.906 +
 107.907 +		if (status & IRQ_AUTODETECT) {
 107.908 +			/* It triggered already - consider it spurious. */
 107.909 +			if (!(status & IRQ_WAITING)) {
 107.910 +				desc->status = status & ~IRQ_AUTODETECT;
 107.911 +				desc->handler->shutdown(i);
 107.912 +			} else
 107.913 +				if (i < 32)
 107.914 +					val |= 1 << i;
 107.915 +		}
 107.916 +		spin_unlock_irq(&desc->lock);
 107.917 +	}
 107.918 +
 107.919 +	return val;
 107.920 +}
 107.921 +
 107.922 +/*
 107.923 + * Return a mask of triggered interrupts (this
 107.924 + * can handle only legacy ISA interrupts).
 107.925 + */
 107.926 + 
 107.927 +/**
 107.928 + *	probe_irq_mask - scan a bitmap of interrupt lines
 107.929 + *	@val:	mask of interrupts to consider
 107.930 + *
 107.931 + *	Scan the ISA bus interrupt lines and return a bitmap of
 107.932 + *	active interrupts. The interrupt probe logic state is then
 107.933 + *	returned to its previous value.
 107.934 + *
 107.935 + *	Note: we need to scan all the irq's even though we will
 107.936 + *	only return ISA irq numbers - just so that we reset them
 107.937 + *	all to a known state.
 107.938 + */
 107.939 +unsigned int probe_irq_mask(unsigned long val)
 107.940 +{
 107.941 +	int i;
 107.942 +	unsigned int mask;
 107.943 +
 107.944 +	mask = 0;
 107.945 +	for (i = 0; i < NR_PIRQS; i++) {
 107.946 +		irq_desc_t *desc = irq_desc + i;
 107.947 +		unsigned int status;
 107.948 +
 107.949 +		spin_lock_irq(&desc->lock);
 107.950 +		status = desc->status;
 107.951 +
 107.952 +		if (status & IRQ_AUTODETECT) {
 107.953 +			if (i < 16 && !(status & IRQ_WAITING))
 107.954 +				mask |= 1 << i;
 107.955 +
 107.956 +			desc->status = status & ~IRQ_AUTODETECT;
 107.957 +			desc->handler->shutdown(i);
 107.958 +		}
 107.959 +		spin_unlock_irq(&desc->lock);
 107.960 +	}
 107.961 +	up(&probe_sem);
 107.962 +
 107.963 +	return mask & val;
 107.964 +}
 107.965 +
 107.966 +/*
 107.967 + * Return the one interrupt that triggered (this can
 107.968 + * handle any interrupt source).
 107.969 + */
 107.970 +
 107.971 +/**
 107.972 + *	probe_irq_off	- end an interrupt autodetect
 107.973 + *	@val: mask of potential interrupts (unused)
 107.974 + *
 107.975 + *	Scans the unused interrupt lines and returns the line which
 107.976 + *	appears to have triggered the interrupt. If no interrupt was
 107.977 + *	found then zero is returned. If more than one interrupt is
 107.978 + *	found then minus the first candidate is returned to indicate
 107.979 + *	their is doubt.
 107.980 + *
 107.981 + *	The interrupt probe logic state is returned to its previous
 107.982 + *	value.
 107.983 + *
 107.984 + *	BUGS: When used in a module (which arguably shouldnt happen)
 107.985 + *	nothing prevents two IRQ probe callers from overlapping. The
 107.986 + *	results of this are non-optimal.
 107.987 + */
 107.988 + 
 107.989 +int probe_irq_off(unsigned long val)
 107.990 +{
 107.991 +	int i, irq_found, nr_irqs;
 107.992 +
 107.993 +	nr_irqs = 0;
 107.994 +	irq_found = 0;
 107.995 +	for (i = 0; i < NR_PIRQS; i++) {
 107.996 +		irq_desc_t *desc = irq_desc + i;
 107.997 +		unsigned int status;
 107.998 +
 107.999 +		spin_lock_irq(&desc->lock);
107.1000 +		status = desc->status;
107.1001 +
107.1002 +		if (status & IRQ_AUTODETECT) {
107.1003 +			if (!(status & IRQ_WAITING)) {
107.1004 +				if (!nr_irqs)
107.1005 +					irq_found = i;
107.1006 +				nr_irqs++;
107.1007 +			}
107.1008 +			desc->status = status & ~IRQ_AUTODETECT;
107.1009 +			desc->handler->shutdown(i);
107.1010 +		}
107.1011 +		spin_unlock_irq(&desc->lock);
107.1012 +	}
107.1013 +	up(&probe_sem);
107.1014 +
107.1015 +	if (nr_irqs > 1)
107.1016 +		irq_found = -irq_found;
107.1017 +	return irq_found;
107.1018 +}
107.1019 +
107.1020 +/* this was setup_x86_irq but it seems pretty generic */
107.1021 +int setup_irq(unsigned int irq, struct irqaction * new)
107.1022 +{
107.1023 +	int shared = 0;
107.1024 +	unsigned long flags;
107.1025 +	struct irqaction *old, **p;
107.1026 +	irq_desc_t *desc = irq_desc + irq;
107.1027 +
107.1028 +	/*
107.1029 +	 * Some drivers like serial.c use request_irq() heavily,
107.1030 +	 * so we have to be careful not to interfere with a
107.1031 +	 * running system.
107.1032 +	 */
107.1033 +	if (new->flags & SA_SAMPLE_RANDOM) {
107.1034 +		/*
107.1035 +		 * This function might sleep, we want to call it first,
107.1036 +		 * outside of the atomic block.
107.1037 +		 * Yes, this might clear the entropy pool if the wrong
107.1038 +		 * driver is attempted to be loaded, without actually
107.1039 +		 * installing a new handler, but is this really a problem,
107.1040 +		 * only the sysadmin is able to do this.
107.1041 +		 */
107.1042 +		rand_initialize_irq(irq);
107.1043 +	}
107.1044 +
107.1045 +	/*
107.1046 +	 * The following block of code has to be executed atomically
107.1047 +	 */
107.1048 +	spin_lock_irqsave(&desc->lock,flags);
107.1049 +	p = &desc->action;
107.1050 +	if ((old = *p) != NULL) {
107.1051 +		/* Can't share interrupts unless both agree to */
107.1052 +		if (!(old->flags & new->flags & SA_SHIRQ)) {
107.1053 +			spin_unlock_irqrestore(&desc->lock,flags);
107.1054 +			return -EBUSY;
107.1055 +		}
107.1056 +
107.1057 +		/* add new interrupt at end of irq queue */
107.1058 +		do {
107.1059 +			p = &old->next;
107.1060 +			old = *p;
107.1061 +		} while (old);
107.1062 +		shared = 1;
107.1063 +	}
107.1064 +
107.1065 +	*p = new;
107.1066 +
107.1067 +	if (!shared) {
107.1068 +		desc->depth = 0;
107.1069 +		desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
107.1070 +		desc->handler->startup(irq);
107.1071 +	}
107.1072 +	spin_unlock_irqrestore(&desc->lock,flags);
107.1073 +
107.1074 +	register_irq_proc(irq);
107.1075 +	return 0;
107.1076 +}
107.1077 +
107.1078 +static struct proc_dir_entry * root_irq_dir;
107.1079 +static struct proc_dir_entry * irq_dir [NR_IRQS];
107.1080 +
107.1081 +#define HEX_DIGITS 8
107.1082 +
107.1083 +static unsigned int parse_hex_value (const char *buffer,
107.1084 +		unsigned long count, unsigned long *ret)
107.1085 +{
107.1086 +	unsigned char hexnum [HEX_DIGITS];
107.1087 +	unsigned long value;
107.1088 +	int i;
107.1089 +
107.1090 +	if (!count)
107.1091 +		return -EINVAL;
107.1092 +	if (count > HEX_DIGITS)
107.1093 +		count = HEX_DIGITS;
107.1094 +	if (copy_from_user(hexnum, buffer, count))
107.1095 +		return -EFAULT;
107.1096 +
107.1097 +	/*
107.1098 +	 * Parse the first 8 characters as a hex string, any non-hex char
107.1099 +	 * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
107.1100 +	 */
107.1101 +	value = 0;
107.1102 +
107.1103 +	for (i = 0; i < count; i++) {
107.1104 +		unsigned int c = hexnum[i];
107.1105 +
107.1106 +		switch (c) {
107.1107 +			case '0' ... '9': c -= '0'; break;
107.1108 +			case 'a' ... 'f': c -= 'a'-10; break;
107.1109 +			case 'A' ... 'F': c -= 'A'-10; break;
107.1110 +		default:
107.1111 +			goto out;
107.1112 +		}
107.1113 +		value = (value << 4) | c;
107.1114 +	}
107.1115 +out:
107.1116 +	*ret = value;
107.1117 +	return 0;
107.1118 +}
107.1119 +
107.1120 +#if CONFIG_SMP
107.1121 +
107.1122 +static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
107.1123 +
107.1124 +static unsigned long irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = ~0UL };
107.1125 +static int irq_affinity_read_proc (char *page, char **start, off_t off,
107.1126 +			int count, int *eof, void *data)
107.1127 +{
107.1128 +	if (count < HEX_DIGITS+1)
107.1129 +		return -EINVAL;
107.1130 +	return sprintf (page, "%08lx\n", irq_affinity[(long)data]);
107.1131 +}
107.1132 +
107.1133 +static int irq_affinity_write_proc (struct file *file, const char *buffer,
107.1134 +					unsigned long count, void *data)
107.1135 +{
107.1136 +	int irq = (long) data, full_count = count, err;
107.1137 +	unsigned long new_value;
107.1138 +
107.1139 +	if (!irq_desc[irq].handler->set_affinity)
107.1140 +		return -EIO;
107.1141 +
107.1142 +	err = parse_hex_value(buffer, count, &new_value);
107.1143 +
107.1144 +	/*
107.1145 +	 * Do not allow disabling IRQs completely - it's a too easy
107.1146 +	 * way to make the system unusable accidentally :-) At least
107.1147 +	 * one online CPU still has to be targeted.
107.1148 +	 */
107.1149 +	if (!(new_value & cpu_online_map))
107.1150 +		return -EINVAL;
107.1151 +
107.1152 +	irq_affinity[irq] = new_value;
107.1153 +	irq_desc[irq].handler->set_affinity(irq, new_value);
107.1154 +
107.1155 +	return full_count;
107.1156 +}
107.1157 +
107.1158 +#endif
107.1159 +
107.1160 +static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
107.1161 +			int count, int *eof, void *data)
107.1162 +{
107.1163 +	unsigned long *mask = (unsigned long *) data;
107.1164 +	if (count < HEX_DIGITS+1)
107.1165 +		return -EINVAL;
107.1166 +	return sprintf (page, "%08lx\n", *mask);
107.1167 +}
107.1168 +
107.1169 +static int prof_cpu_mask_write_proc (struct file *file, const char *buffer,
107.1170 +					unsigned long count, void *data)
107.1171 +{
107.1172 +	unsigned long *mask = (unsigned long *) data, full_count = count, err;
107.1173 +	unsigned long new_value;
107.1174 +
107.1175 +	err = parse_hex_value(buffer, count, &new_value);
107.1176 +	if (err)
107.1177 +		return err;
107.1178 +
107.1179 +	*mask = new_value;
107.1180 +	return full_count;
107.1181 +}
107.1182 +
107.1183 +#define MAX_NAMELEN 10
107.1184 +
107.1185 +static void register_irq_proc (unsigned int irq)
107.1186 +{
107.1187 +	char name [MAX_NAMELEN];
107.1188 +
107.1189 +	if (!root_irq_dir || (irq_desc[irq].handler == &no_irq_type) ||
107.1190 +			irq_dir[irq])
107.1191 +		return;
107.1192 +
107.1193 +	memset(name, 0, MAX_NAMELEN);
107.1194 +	sprintf(name, "%d", irq);
107.1195 +
107.1196 +	/* create /proc/irq/1234 */
107.1197 +	irq_dir[irq] = proc_mkdir(name, root_irq_dir);
107.1198 +
107.1199 +#if CONFIG_SMP
107.1200 +	{
107.1201 +		struct proc_dir_entry *entry;
107.1202 +
107.1203 +		/* create /proc/irq/1234/smp_affinity */
107.1204 +		entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]);
107.1205 +
107.1206 +		if (entry) {
107.1207 +			entry->nlink = 1;
107.1208 +			entry->data = (void *)(long)irq;
107.1209 +			entry->read_proc = irq_affinity_read_proc;
107.1210 +			entry->write_proc = irq_affinity_write_proc;
107.1211 +		}
107.1212 +
107.1213 +		smp_affinity_entry[irq] = entry;
107.1214 +	}
107.1215 +#endif
107.1216 +}
107.1217 +
107.1218 +unsigned long prof_cpu_mask = -1;
107.1219 +
107.1220 +void init_irq_proc (void)
107.1221 +{
107.1222 +	struct proc_dir_entry *entry;
107.1223 +	int i;
107.1224 +
107.1225 +	/* create /proc/irq */
107.1226 +	root_irq_dir = proc_mkdir("irq", 0);
107.1227 +
107.1228 +	/* create /proc/irq/prof_cpu_mask */
107.1229 +	entry = create_proc_entry("prof_cpu_mask", 0600, root_irq_dir);
107.1230 +
107.1231 +	if (!entry)
107.1232 +	    return;
107.1233 +
107.1234 +	entry->nlink = 1;
107.1235 +	entry->data = (void *)&prof_cpu_mask;
107.1236 +	entry->read_proc = prof_cpu_mask_read_proc;
107.1237 +	entry->write_proc = prof_cpu_mask_write_proc;
107.1238 +
107.1239 +	/*
107.1240 +	 * Create entries for all existing IRQs.
107.1241 +	 */
107.1242 +	for (i = 0; i < NR_IRQS; i++)
107.1243 +		register_irq_proc(i);
107.1244 +}
107.1245 +
   108.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   108.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/kernel/ldt.c	Mon Jul 11 14:44:08 2005 +0000
   108.3 @@ -0,0 +1,272 @@
   108.4 +/*
   108.5 + * linux/kernel/ldt.c
   108.6 + *
   108.7 + * Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
   108.8 + * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
   108.9 + */
  108.10 +
  108.11 +#include <linux/errno.h>
  108.12 +#include <linux/sched.h>
  108.13 +#include <linux/string.h>
  108.14 +#include <linux/mm.h>
  108.15 +#include <linux/smp.h>
  108.16 +#include <linux/smp_lock.h>
  108.17 +#include <linux/vmalloc.h>
  108.18 +#include <linux/slab.h>
  108.19 +
  108.20 +#include <asm/mmu_context.h>
  108.21 +#include <asm/uaccess.h>
  108.22 +#include <asm/system.h>
  108.23 +#include <asm/ldt.h>
  108.24 +#include <asm/desc.h>
  108.25 +
  108.26 +#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
  108.27 +static void flush_ldt(void *mm)
  108.28 +{
  108.29 +	if (current->active_mm)
  108.30 +		load_LDT(&current->active_mm->context);
  108.31 +}
  108.32 +#endif
  108.33 +
  108.34 +static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
  108.35 +{
  108.36 +	void *oldldt;
  108.37 +	void *newldt;
  108.38 +	int oldsize;
  108.39 +
  108.40 +	if (mincount <= pc->size)
  108.41 +		return 0;
  108.42 +	oldsize = pc->size;
  108.43 +	mincount = (mincount+511)&(~511);
  108.44 +	if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE)
  108.45 +		newldt = vmalloc(mincount*LDT_ENTRY_SIZE);
  108.46 +	else
  108.47 +		newldt = kmalloc(mincount*LDT_ENTRY_SIZE, GFP_KERNEL);
  108.48 +
  108.49 +	if (!newldt)
  108.50 +		return -ENOMEM;
  108.51 +
  108.52 +	if (oldsize)
  108.53 +		memcpy(newldt, pc->ldt, oldsize*LDT_ENTRY_SIZE);
  108.54 +
  108.55 +	oldldt = pc->ldt;
  108.56 +	memset(newldt+oldsize*LDT_ENTRY_SIZE, 0, (mincount-oldsize)*LDT_ENTRY_SIZE);
  108.57 +	wmb();
  108.58 +	pc->ldt = newldt;
  108.59 +	pc->size = mincount;
  108.60 +	if (reload) {
  108.61 +		make_pages_readonly(
  108.62 +			pc->ldt,
  108.63 +			(pc->size*LDT_ENTRY_SIZE)/PAGE_SIZE);
  108.64 +		load_LDT(pc);
  108.65 +#ifdef CONFIG_SMP
  108.66 +		if (current->mm->cpu_vm_mask != (1<<smp_processor_id()))
  108.67 +			smp_call_function(flush_ldt, 0, 1, 1);
  108.68 +#endif
  108.69 +	}
  108.70 +	wmb();
  108.71 +	if (oldsize) {
  108.72 +		make_pages_writable(
  108.73 +			oldldt, (oldsize*LDT_ENTRY_SIZE)/PAGE_SIZE);
  108.74 +		if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE)
  108.75 +			vfree(oldldt);
  108.76 +		else
  108.77 +			kfree(oldldt);
  108.78 +	}
  108.79 +	return 0;
  108.80 +}
  108.81 +
  108.82 +static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
  108.83 +{
  108.84 +	int err = alloc_ldt(new, old->size, 0);
  108.85 +	if (err < 0) {
  108.86 +		printk(KERN_WARNING "ldt allocation failed\n");
  108.87 +		new->size = 0;
  108.88 +		return err;
  108.89 +	}
  108.90 +	memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE);
  108.91 +	make_pages_readonly(new->ldt, (new->size*LDT_ENTRY_SIZE)/PAGE_SIZE);
  108.92 +	return 0;
  108.93 +}
  108.94 +
  108.95 +/*
  108.96 + * we do not have to muck with descriptors here, that is
  108.97 + * done in switch_mm() as needed.
  108.98 + */
  108.99 +int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
 108.100 +{
 108.101 +	struct mm_struct * old_mm;
 108.102 +	int retval = 0;
 108.103 +
 108.104 +	init_MUTEX(&mm->context.sem);
 108.105 +	mm->context.size = 0;
 108.106 +	old_mm = current->mm;
 108.107 +	if (old_mm && old_mm->context.size > 0) {
 108.108 +		down(&old_mm->context.sem);
 108.109 +		retval = copy_ldt(&mm->context, &old_mm->context);
 108.110 +		up(&old_mm->context.sem);
 108.111 +	}
 108.112 +	return retval;
 108.113 +}
 108.114 +
 108.115 +/*
 108.116 + * No need to lock the MM as we are the last user
 108.117 + * Do not touch the ldt register, we are already
 108.118 + * in the next thread.
 108.119 + */
 108.120 +void destroy_context(struct mm_struct *mm)
 108.121 +{
 108.122 +	if (mm->context.size) {
 108.123 +		make_pages_writable(
 108.124 +			mm->context.ldt, 
 108.125 +			(mm->context.size*LDT_ENTRY_SIZE)/PAGE_SIZE);
 108.126 +		if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
 108.127 +			vfree(mm->context.ldt);
 108.128 +		else
 108.129 +			kfree(mm->context.ldt);
 108.130 +		mm->context.size = 0;
 108.131 +	}
 108.132 +}
 108.133 +
 108.134 +static int read_ldt(void * ptr, unsigned long bytecount)
 108.135 +{
 108.136 +	int err;
 108.137 +	unsigned long size;
 108.138 +	struct mm_struct * mm = current->mm;
 108.139 +
 108.140 +	if (!mm->context.size)
 108.141 +		return 0;
 108.142 +	if (bytecount > LDT_ENTRY_SIZE*LDT_ENTRIES)
 108.143 +		bytecount = LDT_ENTRY_SIZE*LDT_ENTRIES;
 108.144 +
 108.145 +	down(&mm->context.sem);
 108.146 +	size = mm->context.size*LDT_ENTRY_SIZE;
 108.147 +	if (size > bytecount)
 108.148 +		size = bytecount;
 108.149 +
 108.150 +	err = 0;
 108.151 +	if (copy_to_user(ptr, mm->context.ldt, size))
 108.152 +		err = -EFAULT;
 108.153 +	up(&mm->context.sem);
 108.154 +	if (err < 0)
 108.155 +		return err;
 108.156 +	if (size != bytecount) {
 108.157 +		/* zero-fill the rest */
 108.158 +		clear_user(ptr+size, bytecount-size);
 108.159 +	}
 108.160 +	return bytecount;
 108.161 +}
 108.162 +
 108.163 +static int read_default_ldt(void * ptr, unsigned long bytecount)
 108.164 +{
 108.165 +	int err;
 108.166 +	unsigned long size;
 108.167 +	void *address;
 108.168 +
 108.169 +	err = 0;
 108.170 +	address = &default_ldt[0];
 108.171 +	size = 5*sizeof(struct desc_struct);
 108.172 +	if (size > bytecount)
 108.173 +		size = bytecount;
 108.174 +
 108.175 +	err = size;
 108.176 +	if (copy_to_user(ptr, address, size))
 108.177 +		err = -EFAULT;
 108.178 +
 108.179 +	return err;
 108.180 +}
 108.181 +
 108.182 +static int write_ldt(void * ptr, unsigned long bytecount, int oldmode)
 108.183 +{
 108.184 +	struct mm_struct * mm = current->mm;
 108.185 +	__u32 entry_1, entry_2, *lp;
 108.186 +	unsigned long mach_lp;
 108.187 +	int error;
 108.188 +	struct modify_ldt_ldt_s ldt_info;
 108.189 +
 108.190 +	error = -EINVAL;
 108.191 +	if (bytecount != sizeof(ldt_info))
 108.192 +		goto out;
 108.193 +	error = -EFAULT; 	
 108.194 +	if (copy_from_user(&ldt_info, ptr, sizeof(ldt_info)))
 108.195 +		goto out;
 108.196 +
 108.197 +	error = -EINVAL;
 108.198 +	if (ldt_info.entry_number >= LDT_ENTRIES)
 108.199 +		goto out;
 108.200 +	if (ldt_info.contents == 3) {
 108.201 +		if (oldmode)
 108.202 +			goto out;
 108.203 +		if (ldt_info.seg_not_present == 0)
 108.204 +			goto out;
 108.205 +	}
 108.206 +
 108.207 +	down(&mm->context.sem);
 108.208 +	if (ldt_info.entry_number >= mm->context.size) {
 108.209 +		error = alloc_ldt(&current->mm->context, ldt_info.entry_number+1, 1);
 108.210 +		if (error < 0)
 108.211 +			goto out_unlock;
 108.212 +	}
 108.213 +
 108.214 +	lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.ldt);
 108.215 +	mach_lp = arbitrary_virt_to_machine(lp);
 108.216 +
 108.217 +   	/* Allow LDTs to be cleared by the user. */
 108.218 +   	if (ldt_info.base_addr == 0 && ldt_info.limit == 0) {
 108.219 +		if (oldmode ||
 108.220 +		    (ldt_info.contents == 0		&&
 108.221 +		     ldt_info.read_exec_only == 1	&&
 108.222 +		     ldt_info.seg_32bit == 0		&&
 108.223 +		     ldt_info.limit_in_pages == 0	&&
 108.224 +		     ldt_info.seg_not_present == 1	&&
 108.225 +		     ldt_info.useable == 0 )) {
 108.226 +			entry_1 = 0;
 108.227 +			entry_2 = 0;
 108.228 +			goto install;
 108.229 +		}
 108.230 +	}
 108.231 +
 108.232 +	entry_1 = ((ldt_info.base_addr & 0x0000ffff) << 16) |
 108.233 +		  (ldt_info.limit & 0x0ffff);
 108.234 +	entry_2 = (ldt_info.base_addr & 0xff000000) |
 108.235 +		  ((ldt_info.base_addr & 0x00ff0000) >> 16) |
 108.236 +		  (ldt_info.limit & 0xf0000) |
 108.237 +		  ((ldt_info.read_exec_only ^ 1) << 9) |
 108.238 +		  (ldt_info.contents << 10) |
 108.239 +		  ((ldt_info.seg_not_present ^ 1) << 15) |
 108.240 +		  (ldt_info.seg_32bit << 22) |
 108.241 +		  (ldt_info.limit_in_pages << 23) |
 108.242 +		  0x7000;
 108.243 +	if (!oldmode)
 108.244 +		entry_2 |= (ldt_info.useable << 20);
 108.245 +
 108.246 +	/* Install the new entry ...  */
 108.247 +install:
 108.248 +	error = HYPERVISOR_update_descriptor(mach_lp, entry_1, entry_2);
 108.249 +
 108.250 +out_unlock:
 108.251 +	up(&mm->context.sem);
 108.252 +out:
 108.253 +	return error;
 108.254 +}
 108.255 +
 108.256 +asmlinkage int sys_modify_ldt(int func, void *ptr, unsigned long bytecount)
 108.257 +{
 108.258 +	int ret = -ENOSYS;
 108.259 +
 108.260 +	switch (func) {
 108.261 +	case 0:
 108.262 +		ret = read_ldt(ptr, bytecount);
 108.263 +		break;
 108.264 +	case 1:
 108.265 +		ret = write_ldt(ptr, bytecount, 1);
 108.266 +		break;
 108.267 +	case 2:
 108.268 +		ret = read_default_ldt(ptr, bytecount);
 108.269 +		break;
 108.270 +	case 0x11:
 108.271 +		ret = write_ldt(ptr, bytecount, 0);
 108.272 +		break;
 108.273 +	}
 108.274 +	return ret;
 108.275 +}
   109.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   109.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/kernel/pci-pc.c	Mon Jul 11 14:44:08 2005 +0000
   109.3 @@ -0,0 +1,260 @@
   109.4 +/*
   109.5 + *	Low-Level PCI Support for PC
   109.6 + *
   109.7 + *	(c) 1999--2000 Martin Mares <mj@ucw.cz>
   109.8 + *
   109.9 + * Adjusted to use Xen's interface by Rolf Neugebauer, Intel Research Cambridge
  109.10 + * Further modifications by Keir Fraser, University of Cambridge
  109.11 + */
  109.12 +
  109.13 +#include <linux/config.h>
  109.14 +#include <linux/types.h>
  109.15 +#include <linux/kernel.h>
  109.16 +#include <linux/sched.h>
  109.17 +#include <linux/pci.h>
  109.18 +#include <linux/init.h>
  109.19 +#include <linux/ioport.h>
  109.20 +
  109.21 +#include <asm/segment.h>
  109.22 +#include <asm/io.h>
  109.23 +
  109.24 +#include <asm-xen/xen-public/xen.h>
  109.25 +#include <asm-xen/xen-public/physdev.h>
  109.26 +
  109.27 +#include "pci-i386.h"
  109.28 +
  109.29 +/*
  109.30 + * NB. The following interface functions are not included here:
  109.31 + *  1. void eisa_set_level_irq(unsigned int irq)
  109.32 + *  2. irq_routing_table * __devinit pcibios_get_irq_routing_table(void)
  109.33 + *  3. int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq)
  109.34 + * All are used by the ACPI driver. This should be ported to Xen if it is
  109.35 + * ever required -- Xen is the ultimate source for IRQ-routing knowledge.
  109.36 + */
  109.37 +
  109.38 +struct pci_ops *pci_root_ops = NULL;
  109.39 +
  109.40 +int (*pci_config_read)(int seg, int bus, int dev, int fn, 
  109.41 +                       int reg, int len, u32 *value) = NULL;
  109.42 +int (*pci_config_write)(int seg, int bus, int dev, int fn,
  109.43 +                        int reg, int len, u32 value) = NULL;
  109.44 +
  109.45 +unsigned int pci_probe = PCI_PROBE_BIOS;
  109.46 +
  109.47 +struct pci_fixup pcibios_fixups[] = { { 0 } };
  109.48 +
  109.49 +static int pci_confx_read(int seg, int bus, int dev, int fn, int reg, 
  109.50 +                          int len, u32 *value)
  109.51 +{
  109.52 +    int ret;
  109.53 +    physdev_op_t op;
  109.54 +
  109.55 +    if (bus > 255 || dev > 31 || fn > 7 || reg > 255)
  109.56 +        return -EINVAL;
  109.57 +
  109.58 +    op.cmd = PHYSDEVOP_PCI_CFGREG_READ;
  109.59 +    op.u.pci_cfgreg_read.bus  = bus;
  109.60 +    op.u.pci_cfgreg_read.dev  = dev;
  109.61 +    op.u.pci_cfgreg_read.func = fn;
  109.62 +    op.u.pci_cfgreg_read.reg  = reg;
  109.63 +    op.u.pci_cfgreg_read.len  = len;
  109.64 +
  109.65 +    if ( (ret = HYPERVISOR_physdev_op(&op)) != 0 )
  109.66 +        return ret;
  109.67 +
  109.68 +    *value = op.u.pci_cfgreg_read.value;
  109.69 +
  109.70 +    return 0;
  109.71 +}
  109.72 +
  109.73 +static int pci_confx_write(int seg, int bus, int dev, int fn, int reg, 
  109.74 +                           int len, u32 value)
  109.75 +{
  109.76 +    int ret;
  109.77 +    physdev_op_t op;
  109.78 +
  109.79 +    if ((bus > 255 || dev > 31 || fn > 7 || reg > 255)) 
  109.80 +        return -EINVAL;
  109.81 +
  109.82 +    op.cmd = PHYSDEVOP_PCI_CFGREG_WRITE;
  109.83 +    op.u.pci_cfgreg_write.bus   = bus;
  109.84 +    op.u.pci_cfgreg_write.dev   = dev;
  109.85 +    op.u.pci_cfgreg_write.func  = fn;
  109.86 +    op.u.pci_cfgreg_write.reg   = reg;
  109.87 +    op.u.pci_cfgreg_write.len   = len;
  109.88 +    op.u.pci_cfgreg_write.value = value;
  109.89 +
  109.90 +    if ( (ret = HYPERVISOR_physdev_op(&op)) != 0 )
  109.91 +        return ret;
  109.92 +    return 0;
  109.93 +}
  109.94 +
  109.95 +
  109.96 +static int pci_confx_read_config_byte(struct pci_dev *dev, 
  109.97 +                                      int where, u8 *value)
  109.98 +{
  109.99 +    int result; 
 109.100 +    u32 data;
 109.101 +
 109.102 +    result = pci_confx_read(0, dev->bus->number, PCI_SLOT(dev->devfn), 
 109.103 +                            PCI_FUNC(dev->devfn), where, 1, &data);
 109.104 +
 109.105 +    *value = (u8)data;
 109.106 +
 109.107 +    return result;
 109.108 +}
 109.109 +
 109.110 +static int pci_confx_read_config_word(struct pci_dev *dev, 
 109.111 +                                      int where, u16 *value)
 109.112 +{
 109.113 +    int result; 
 109.114 +    u32 data;
 109.115 +
 109.116 +    result = pci_confx_read(0, dev->bus->number, PCI_SLOT(dev->devfn), 
 109.117 +                            PCI_FUNC(dev->devfn), where, 2, &data);
 109.118 +
 109.119 +    *value = (u16)data;
 109.120 +
 109.121 +    return result;
 109.122 +}
 109.123 +
 109.124 +static int pci_confx_read_config_dword(struct pci_dev *dev, 
 109.125 +                                       int where, u32 *value)
 109.126 +{
 109.127 +    return pci_confx_read(0, dev->bus->number, PCI_SLOT(dev->devfn), 
 109.128 +                          PCI_FUNC(dev->devfn), where, 4, value);
 109.129 +}
 109.130 +
 109.131 +static int pci_confx_write_config_byte(struct pci_dev *dev, 
 109.132 +                                       int where, u8 value)
 109.133 +{
 109.134 +    return pci_confx_write(0, dev->bus->number, PCI_SLOT(dev->devfn), 
 109.135 +                           PCI_FUNC(dev->devfn), where, 1, value);
 109.136 +}
 109.137 +
 109.138 +static int pci_confx_write_config_word(struct pci_dev *dev, 
 109.139 +                                       int where, u16 value)
 109.140 +{
 109.141 +    return pci_confx_write(0, dev->bus->number, PCI_SLOT(dev->devfn), 
 109.142 +                           PCI_FUNC(dev->devfn), where, 2, value);
 109.143 +}
 109.144 +
 109.145 +static int pci_confx_write_config_dword(struct pci_dev *dev, 
 109.146 +                                        int where, u32 value)
 109.147 +{
 109.148 +    return pci_confx_write(0, dev->bus->number, PCI_SLOT(dev->devfn), 
 109.149 +                           PCI_FUNC(dev->devfn), where, 4, value);
 109.150 +}
 109.151 +
 109.152 +static struct pci_ops pci_conf_xen = {
 109.153 +    pci_confx_read_config_byte,
 109.154 +    pci_confx_read_config_word,
 109.155 +    pci_confx_read_config_dword,
 109.156 +    pci_confx_write_config_byte,
 109.157 +    pci_confx_write_config_word,
 109.158 +    pci_confx_write_config_dword
 109.159 +};
 109.160 +
 109.161 +void pcibios_penalize_isa_irq(int irq)
 109.162 +{ 
 109.163 +    /* nothing */
 109.164 +}
 109.165 +
 109.166 +void __devinit pcibios_fixup_bus(struct pci_bus *b)
 109.167 +{
 109.168 +    pci_read_bridge_bases(b);
 109.169 +}
 109.170 +
 109.171 +struct pci_bus * __devinit pcibios_scan_root(int busnum)
 109.172 +{
 109.173 +    struct list_head *list;
 109.174 +    struct pci_bus *bus;
 109.175 +
 109.176 +    list_for_each ( list, &pci_root_buses )
 109.177 +    {
 109.178 +        bus = pci_bus_b(list);
 109.179 +        if ( bus->number == busnum )
 109.180 +            return bus;
 109.181 +    }
 109.182 +
 109.183 +    printk("PCI: Probing PCI hardware (bus %02x)\n", busnum);
 109.184 +    return pci_scan_bus(busnum, pci_root_ops, NULL);
 109.185 +}
 109.186 +
 109.187 +void __init pcibios_init(void)
 109.188 +{
 109.189 +    int bus;
 109.190 +    physdev_op_t op;
 109.191 +
 109.192 +    if ( !pci_probe )
 109.193 +        return;
 109.194 +
 109.195 +    pci_root_ops     = &pci_conf_xen;
 109.196 +    pci_config_read  = pci_confx_read;
 109.197 +    pci_config_write = pci_confx_write;
 109.198 +
 109.199 +    pcibios_set_cacheline_size();
 109.200 +
 109.201 +    op.cmd = PHYSDEVOP_PCI_PROBE_ROOT_BUSES;
 109.202 +    if ( HYPERVISOR_physdev_op(&op) != 0 )
 109.203 +    {
 109.204 +        printk(KERN_WARNING "PCI: System does not support PCI\n");
 109.205 +        return;
 109.206 +    }
 109.207 +
 109.208 +    printk(KERN_INFO "PCI: Probing PCI hardware\n");
 109.209 +    for ( bus = 0; bus < 256; bus++ )
 109.210 +        if ( test_bit(bus, &op.u.pci_probe_root_buses.busmask[0]) )
 109.211 +            (void)pcibios_scan_root(bus);
 109.212 +
 109.213 +    pcibios_resource_survey();
 109.214 +}
 109.215 +
 109.216 +char * __devinit pcibios_setup(char *str)
 109.217 +{
 109.218 +    if ( !strcmp(str, "off") )
 109.219 +        pci_probe = 0;
 109.220 +    return NULL;
 109.221 +}
 109.222 +
 109.223 +unsigned int pcibios_assign_all_busses(void)
 109.224 +{
 109.225 +    return 0;
 109.226 +}
 109.227 +
 109.228 +int pcibios_enable_device(struct pci_dev *dev, int mask)
 109.229 +{
 109.230 +    int err;
 109.231 +    u8  pin;
 109.232 +    physdev_op_t op;
 109.233 +
 109.234 +    /* Inform Xen that we are going to use this device. */
 109.235 +    op.cmd = PHYSDEVOP_PCI_INITIALISE_DEVICE;
 109.236 +    op.u.pci_initialise_device.bus  = dev->bus->number;
 109.237 +    op.u.pci_initialise_device.dev  = PCI_SLOT(dev->devfn);
 109.238 +    op.u.pci_initialise_device.func = PCI_FUNC(dev->devfn);
 109.239 +    if ( (err = HYPERVISOR_physdev_op(&op)) != 0 )
 109.240 +        return err;
 109.241 +
 109.242 +    /* Now we can bind to the very final IRQ line. */
 109.243 +    pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &pin);
 109.244 +    dev->irq = pin;
 109.245 +
 109.246 +    /* Turn on device I/O and memory access as necessary. */
 109.247 +    if ( (err = pcibios_enable_resources(dev, mask)) < 0 )
 109.248 +        return err;
 109.249 +
 109.250 +    /* Sanity-check that an interrupt-producing device is routed to an IRQ. */
 109.251 +    pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
 109.252 +    if ( pin != 0 )
 109.253 +    {
 109.254 +        if ( dev->irq != 0 )
 109.255 +            printk(KERN_INFO "PCI: Obtained IRQ %d for device %s\n",
 109.256 +                   dev->irq, dev->slot_name);
 109.257 +        else
 109.258 +            printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of "
 109.259 +                   "device %s.\n", 'A' + pin - 1, dev->slot_name);
 109.260 +    }
 109.261 +
 109.262 +    return 0;
 109.263 +}
   110.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   110.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/kernel/process.c	Mon Jul 11 14:44:08 2005 +0000
   110.3 @@ -0,0 +1,448 @@
   110.4 +/*
   110.5 + *  linux/arch/i386/kernel/process.c
   110.6 + *
   110.7 + *  Copyright (C) 1995  Linus Torvalds
   110.8 + *
   110.9 + *  Pentium III FXSR, SSE support
  110.10 + *	Gareth Hughes <gareth@valinux.com>, May 2000
  110.11 + */
  110.12 +
  110.13 +/*
  110.14 + * This file handles the architecture-dependent parts of process handling..
  110.15 + */
  110.16 +
  110.17 +#define __KERNEL_SYSCALLS__
  110.18 +#include <stdarg.h>
  110.19 +
  110.20 +#include <linux/errno.h>
  110.21 +#include <linux/sched.h>
  110.22 +#include <linux/kernel.h>
  110.23 +#include <linux/mm.h>
  110.24 +#include <linux/smp.h>
  110.25 +#include <linux/smp_lock.h>
  110.26 +#include <linux/stddef.h>
  110.27 +#include <linux/unistd.h>
  110.28 +#include <linux/ptrace.h>
  110.29 +#include <linux/slab.h>
  110.30 +#include <linux/vmalloc.h>
  110.31 +#include <linux/user.h>
  110.32 +#include <linux/a.out.h>
  110.33 +#include <linux/interrupt.h>
  110.34 +#include <linux/config.h>
  110.35 +#include <linux/delay.h>
  110.36 +#include <linux/reboot.h>
  110.37 +#include <linux/init.h>
  110.38 +#include <linux/mc146818rtc.h>
  110.39 +
  110.40 +#include <asm/uaccess.h>
  110.41 +#include <asm/pgtable.h>
  110.42 +#include <asm/system.h>
  110.43 +#include <asm/io.h>
  110.44 +#include <asm/ldt.h>
  110.45 +#include <asm/processor.h>
  110.46 +#include <asm/i387.h>
  110.47 +#include <asm/desc.h>
  110.48 +#include <asm/mmu_context.h>
  110.49 +#include <asm-xen/xen-public/physdev.h>
  110.50 +
  110.51 +#include <linux/irq.h>
  110.52 +
  110.53 +asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
  110.54 +
  110.55 +int hlt_counter;
  110.56 +
  110.57 +/*
  110.58 + * Powermanagement idle function, if any..
  110.59 + */
  110.60 +void (*pm_idle)(void);
  110.61 +
  110.62 +/*
  110.63 + * Power off function, if any
  110.64 + */
  110.65 +void (*pm_power_off)(void);
  110.66 +
  110.67 +void disable_hlt(void)
  110.68 +{
  110.69 +    hlt_counter++;
  110.70 +}
  110.71 +
  110.72 +void enable_hlt(void)
  110.73 +{
  110.74 +    hlt_counter--;
  110.75 +}
  110.76 +
  110.77 +/*
  110.78 + * The idle thread. There's no useful work to be
  110.79 + * done, so just try to conserve power and have a
  110.80 + * low exit latency (ie sit in a loop waiting for
  110.81 + * somebody to say that they'd like to reschedule)
  110.82 + */
  110.83 +void cpu_idle (void)
  110.84 +{
  110.85 +    extern int set_timeout_timer(void);
  110.86 +
  110.87 +    /* Endless idle loop with no priority at all. */
  110.88 +    init_idle();
  110.89 +    current->nice = 20;
  110.90 +    current->counter = -100;
  110.91 +
  110.92 +    for ( ; ; )
  110.93 +    {
  110.94 +        while ( !current->need_resched )
  110.95 +        {
  110.96 +            __cli();
  110.97 +            if ( current->need_resched )
  110.98 +            {
  110.99 +                /* The race-free check for events failed. */
 110.100 +                __sti();
 110.101 +                break;
 110.102 +            }
 110.103 +            else if ( set_timeout_timer() == 0 )
 110.104 +            {
 110.105 +                /* NB. Blocking reenable events in a race-free manner. */
 110.106 +                HYPERVISOR_block();
 110.107 +            }
 110.108 +            else
 110.109 +            {
 110.110 +                /* No race here: yielding will get us the CPU again anyway. */
 110.111 +                __sti();
 110.112 +                HYPERVISOR_yield();
 110.113 +            }
 110.114 +        }
 110.115 +        schedule();
 110.116 +        check_pgt_cache();
 110.117 +    }
 110.118 +}
 110.119 +
 110.120 +extern void show_trace(unsigned long* esp);
 110.121 +
 110.122 +void show_regs(struct pt_regs * regs)
 110.123 +{
 110.124 +    printk("\n");
 110.125 +    printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
 110.126 +    printk("EIP: %04x:[<%08lx>] CPU: %d",0xffff & regs->xcs,regs->eip, smp_processor_id());
 110.127 +    if (regs->xcs & 2)
 110.128 +        printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
 110.129 +    printk(" EFLAGS: %08lx    %s\n",regs->eflags, print_tainted());
 110.130 +    printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
 110.131 +           regs->eax,regs->ebx,regs->ecx,regs->edx);
 110.132 +    printk("ESI: %08lx EDI: %08lx EBP: %08lx",
 110.133 +           regs->esi, regs->edi, regs->ebp);
 110.134 +    printk(" DS: %04x ES: %04x\n",
 110.135 +           0xffff & regs->xds,0xffff & regs->xes);
 110.136 +
 110.137 +    show_trace(&regs->esp);
 110.138 +}
 110.139 +
 110.140 +
 110.141 +/*
 110.142 + * Create a kernel thread
 110.143 + */
 110.144 +int arch_kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
 110.145 +{
 110.146 +    long retval, d0;
 110.147 +
 110.148 +    __asm__ __volatile__(
 110.149 +        "movl %%esp,%%esi\n\t"
 110.150 +        "int $0x80\n\t"		/* Linux/i386 system call */
 110.151 +        "cmpl %%esp,%%esi\n\t"	/* child or parent? */
 110.152 +        "je 1f\n\t"		/* parent - jump */
 110.153 +        /* Load the argument into eax, and push it.  That way, it does
 110.154 +         * not matter whether the called function is compiled with
 110.155 +         * -mregparm or not.  */
 110.156 +        "movl %4,%%eax\n\t"
 110.157 +        "pushl %%eax\n\t"		
 110.158 +        "call *%5\n\t"		/* call fn */
 110.159 +        "movl %3,%0\n\t"	/* exit */
 110.160 +        "int $0x80\n"
 110.161 +        "1:\t"
 110.162 +        :"=&a" (retval), "=&S" (d0)
 110.163 +        :"0" (__NR_clone), "i" (__NR_exit),
 110.164 +        "r" (arg), "r" (fn),
 110.165 +        "b" (flags | CLONE_VM)
 110.166 +        : "memory");
 110.167 +
 110.168 +    return retval;
 110.169 +}
 110.170 +
 110.171 +/*
 110.172 + * Free current thread data structures etc..
 110.173 + */
 110.174 +void exit_thread(void)
 110.175 +{
 110.176 +    /* nothing to do ... */
 110.177 +}
 110.178 +
 110.179 +void flush_thread(void)
 110.180 +{
 110.181 +    struct task_struct *tsk = current;
 110.182 +
 110.183 +    memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8);
 110.184 +
 110.185 +    /*
 110.186 +     * Forget coprocessor state..
 110.187 +     */
 110.188 +    clear_fpu(tsk);
 110.189 +    tsk->used_math = 0;
 110.190 +}
 110.191 +
 110.192 +void release_thread(struct task_struct *dead_task)
 110.193 +{
 110.194 +    if (dead_task->mm) {
 110.195 +        // temporary debugging check
 110.196 +        if (dead_task->mm->context.size) {
 110.197 +            printk("WARNING: dead process %8s still has LDT? <%p/%08x>\n",
 110.198 +                   dead_task->comm, 
 110.199 +		   dead_task->mm->context.ldt,
 110.200 +		   dead_task->mm->context.size);
 110.201 +            BUG();
 110.202 +        }
 110.203 +    }
 110.204 +    //release_x86_irqs(dead_task);
 110.205 +}
 110.206 +
 110.207 +
 110.208 +/*
 110.209 + * Save a segment.
 110.210 + */
 110.211 +#define savesegment(seg,value) \
 110.212 +	asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value)))
 110.213 +
 110.214 +int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
 110.215 +                unsigned long unused,
 110.216 +                struct task_struct * p, struct pt_regs * regs)
 110.217 +{
 110.218 +    struct pt_regs * childregs;
 110.219 +
 110.220 +    childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p)) - 1;
 110.221 +    struct_cpy(childregs, regs);
 110.222 +    childregs->eax = 0;
 110.223 +    childregs->esp = esp;
 110.224 +
 110.225 +    p->thread.esp = (unsigned long) childregs;
 110.226 +    p->thread.esp0 = (unsigned long) (childregs+1);
 110.227 +
 110.228 +    p->thread.eip = (unsigned long) ret_from_fork;
 110.229 +
 110.230 +    savesegment(fs,p->thread.fs);
 110.231 +    savesegment(gs,p->thread.gs);
 110.232 +
 110.233 +    unlazy_fpu(current);
 110.234 +    struct_cpy(&p->thread.i387, &current->thread.i387);
 110.235 +
 110.236 +    p->thread.io_pl = current->thread.io_pl;
 110.237 +
 110.238 +    return 0;
 110.239 +}
 110.240 +
 110.241 +/*
 110.242 + * fill in the user structure for a core dump..
 110.243 + */
 110.244 +void dump_thread(struct pt_regs * regs, struct user * dump)
 110.245 +{
 110.246 +    int i;
 110.247 +
 110.248 +/* changed the size calculations - should hopefully work better. lbt */
 110.249 +    dump->magic = CMAGIC;
 110.250 +    dump->start_code = 0;
 110.251 +    dump->start_stack = regs->esp & ~(PAGE_SIZE - 1);
 110.252 +    dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
 110.253 +    dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> PAGE_SHIFT;
 110.254 +    dump->u_dsize -= dump->u_tsize;
 110.255 +    dump->u_ssize = 0;
 110.256 +    for (i = 0; i < 8; i++)
 110.257 +        dump->u_debugreg[i] = current->thread.debugreg[i];  
 110.258 +
 110.259 +    if (dump->start_stack < TASK_SIZE)
 110.260 +        dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
 110.261 +
 110.262 +    dump->regs.ebx = regs->ebx;
 110.263 +    dump->regs.ecx = regs->ecx;
 110.264 +    dump->regs.edx = regs->edx;
 110.265 +    dump->regs.esi = regs->esi;
 110.266 +    dump->regs.edi = regs->edi;
 110.267 +    dump->regs.ebp = regs->ebp;
 110.268 +    dump->regs.eax = regs->eax;
 110.269 +    dump->regs.ds = regs->xds;
 110.270 +    dump->regs.es = regs->xes;
 110.271 +    savesegment(fs,dump->regs.fs);
 110.272 +    savesegment(gs,dump->regs.gs);
 110.273 +    dump->regs.orig_eax = regs->orig_eax;
 110.274 +    dump->regs.eip = regs->eip;
 110.275 +    dump->regs.cs = regs->xcs;
 110.276 +    dump->regs.eflags = regs->eflags;
 110.277 +    dump->regs.esp = regs->esp;
 110.278 +    dump->regs.ss = regs->xss;
 110.279 +
 110.280 +    dump->u_fpvalid = dump_fpu (regs, &dump->i387);
 110.281 +}
 110.282 +
 110.283 +/*
 110.284 + *	switch_to(x,yn) should switch tasks from x to y.
 110.285 + *
 110.286 + * We fsave/fwait so that an exception goes off at the right time
 110.287 + * (as a call from the fsave or fwait in effect) rather than to
 110.288 + * the wrong process. Lazy FP saving no longer makes any sense
 110.289 + * with modern CPU's, and this simplifies a lot of things (SMP
 110.290 + * and UP become the same).
 110.291 + *
 110.292 + * NOTE! We used to use the x86 hardware context switching. The
 110.293 + * reason for not using it any more becomes apparent when you
 110.294 + * try to recover gracefully from saved state that is no longer
 110.295 + * valid (stale segment register values in particular). With the
 110.296 + * hardware task-switch, there is no way to fix up bad state in
 110.297 + * a reasonable manner.
 110.298 + *
 110.299 + * The fact that Intel documents the hardware task-switching to
 110.300 + * be slow is a fairly red herring - this code is not noticeably
 110.301 + * faster. However, there _is_ some room for improvement here,
 110.302 + * so the performance issues may eventually be a valid point.
 110.303 + * More important, however, is the fact that this allows us much
 110.304 + * more flexibility.
 110.305 + */
 110.306 +void fastcall __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
 110.307 +{
 110.308 +    struct thread_struct *next = &next_p->thread;
 110.309 +    physdev_op_t op;
 110.310 +    multicall_entry_t _mcl[8], *mcl = _mcl;
 110.311 +
 110.312 +    /*
 110.313 +     * This is basically 'unlazy_fpu', except that we queue a multicall to 
 110.314 +     * indicate FPU task switch, rather than synchronously trapping to Xen.
 110.315 +     */
 110.316 +    if ( prev_p->flags & PF_USEDFPU )
 110.317 +    {
 110.318 +	if ( cpu_has_fxsr )
 110.319 +            asm volatile( "fxsave %0 ; fnclex"
 110.320 +                          : "=m" (prev_p->thread.i387.fxsave) );
 110.321 +	else
 110.322 +            asm volatile( "fnsave %0 ; fwait"
 110.323 +                          : "=m" (prev_p->thread.i387.fsave) );
 110.324 +	prev_p->flags &= ~PF_USEDFPU;
 110.325 +        mcl->op      = __HYPERVISOR_fpu_taskswitch;
 110.326 +        mcl->args[0] = 1;
 110.327 +        mcl++;
 110.328 +    }
 110.329 +
 110.330 +    mcl->op      = __HYPERVISOR_stack_switch;
 110.331 +    mcl->args[0] = __KERNEL_DS;
 110.332 +    mcl->args[1] = next->esp0;
 110.333 +    mcl++;
 110.334 +
 110.335 +    if ( prev_p->thread.io_pl != next->io_pl ) 
 110.336 +    {
 110.337 +        op.cmd             = PHYSDEVOP_SET_IOPL;
 110.338 +	op.u.set_iopl.iopl = next->io_pl;
 110.339 +        mcl->op      = __HYPERVISOR_physdev_op;
 110.340 +        mcl->args[0] = (unsigned long)&op;
 110.341 +        mcl++;
 110.342 +    }
 110.343 +
 110.344 +    (void)HYPERVISOR_multicall(_mcl, mcl - _mcl);
 110.345 +
 110.346 +    /*
 110.347 +     * Restore %fs and %gs.
 110.348 +     */
 110.349 +    loadsegment(fs, next->fs);
 110.350 +    loadsegment(gs, next->gs);
 110.351 +
 110.352 +    /*
 110.353 +     * Now maybe reload the debug registers
 110.354 +     */
 110.355 +    if ( next->debugreg[7] != 0 )
 110.356 +    {
 110.357 +        HYPERVISOR_set_debugreg(0, next->debugreg[0]);
 110.358 +        HYPERVISOR_set_debugreg(1, next->debugreg[1]);
 110.359 +        HYPERVISOR_set_debugreg(2, next->debugreg[2]);
 110.360 +        HYPERVISOR_set_debugreg(3, next->debugreg[3]);
 110.361 +        /* no 4 and 5 */
 110.362 +        HYPERVISOR_set_debugreg(6, next->debugreg[6]);
 110.363 +        HYPERVISOR_set_debugreg(7, next->debugreg[7]);
 110.364 +    }
 110.365 +}
 110.366 +
 110.367 +asmlinkage int sys_fork(struct pt_regs regs)
 110.368 +{
 110.369 +    return do_fork(SIGCHLD, regs.esp, &regs, 0);
 110.370 +}
 110.371 +
 110.372 +asmlinkage int sys_clone(struct pt_regs regs)
 110.373 +{
 110.374 +    unsigned long clone_flags;
 110.375 +    unsigned long newsp;
 110.376 +
 110.377 +    clone_flags = regs.ebx;
 110.378 +    newsp = regs.ecx;
 110.379 +    if (!newsp)
 110.380 +        newsp = regs.esp;
 110.381 +    return do_fork(clone_flags, newsp, &regs, 0);
 110.382 +}
 110.383 +
 110.384 +/*
 110.385 + * This is trivial, and on the face of it looks like it
 110.386 + * could equally well be done in user mode.
 110.387 + *
 110.388 + * Not so, for quite unobvious reasons - register pressure.
 110.389 + * In user mode vfork() cannot have a stack frame, and if
 110.390 + * done by calling the "clone()" system call directly, you
 110.391 + * do not have enough call-clobbered registers to hold all
 110.392 + * the information you need.
 110.393 + */
 110.394 +asmlinkage int sys_vfork(struct pt_regs regs)
 110.395 +{
 110.396 +    return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, &regs, 0);
 110.397 +}
 110.398 +
 110.399 +/*
 110.400 + * sys_execve() executes a new program.
 110.401 + */
 110.402 +asmlinkage int sys_execve(struct pt_regs regs)
 110.403 +{
 110.404 +    int error;
 110.405 +    char * filename;
 110.406 +
 110.407 +    filename = getname((char *) regs.ebx);
 110.408 +    error = PTR_ERR(filename);
 110.409 +    if (IS_ERR(filename))
 110.410 +        goto out;
 110.411 +    error = do_execve(filename, (char **) regs.ecx, (char **) regs.edx, &regs);
 110.412 +    if (error == 0)
 110.413 +        current->ptrace &= ~PT_DTRACE;
 110.414 +    putname(filename);
 110.415 + out:
 110.416 +    return error;
 110.417 +}
 110.418 +
 110.419 +/*
 110.420 + * These bracket the sleeping functions..
 110.421 + */
 110.422 +extern void scheduling_functions_start_here(void);
 110.423 +extern void scheduling_functions_end_here(void);
 110.424 +#define first_sched	((unsigned long) scheduling_functions_start_here)
 110.425 +#define last_sched	((unsigned long) scheduling_functions_end_here)
 110.426 +
 110.427 +unsigned long get_wchan(struct task_struct *p)
 110.428 +{
 110.429 +    unsigned long ebp, esp, eip;
 110.430 +    unsigned long stack_page;
 110.431 +    int count = 0;
 110.432 +    if (!p || p == current || p->state == TASK_RUNNING)
 110.433 +        return 0;
 110.434 +    stack_page = (unsigned long)p;
 110.435 +    esp = p->thread.esp;
 110.436 +    if (!stack_page || esp < stack_page || esp > 8188+stack_page)
 110.437 +        return 0;
 110.438 +    /* include/asm-i386/system.h:switch_to() pushes ebp last. */
 110.439 +    ebp = *(unsigned long *) esp;
 110.440 +    do {
 110.441 +        if (ebp < stack_page || ebp > 8184+stack_page)
 110.442 +            return 0;
 110.443 +        eip = *(unsigned long *) (ebp+4);
 110.444 +        if (eip < first_sched || eip >= last_sched)
 110.445 +            return eip;
 110.446 +        ebp = *(unsigned long *) ebp;
 110.447 +    } while (count++ < 16);
 110.448 +    return 0;
 110.449 +}
 110.450 +#undef last_sched
 110.451 +#undef first_sched
   111.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   111.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/kernel/setup.c	Mon Jul 11 14:44:08 2005 +0000
   111.3 @@ -0,0 +1,1213 @@
   111.4 +/*
   111.5 + *  linux/arch/i386/kernel/setup.c
   111.6 + *
   111.7 + *  Copyright (C) 1995  Linus Torvalds
   111.8 + */
   111.9 +
  111.10 +/*
  111.11 + * This file handles the architecture-dependent parts of initialization
  111.12 + */
  111.13 +
  111.14 +#define __KERNEL_SYSCALLS__
  111.15 +static int errno;
  111.16 +#include <linux/errno.h>
  111.17 +#include <linux/sched.h>
  111.18 +#include <linux/kernel.h>
  111.19 +#include <linux/mm.h>
  111.20 +#include <linux/stddef.h>
  111.21 +#include <linux/unistd.h>
  111.22 +#include <linux/ptrace.h>
  111.23 +#include <linux/slab.h>
  111.24 +#include <linux/user.h>
  111.25 +#include <linux/a.out.h>
  111.26 +#include <linux/tty.h>
  111.27 +#include <linux/ioport.h>
  111.28 +#include <linux/delay.h>
  111.29 +#include <linux/config.h>
  111.30 +#include <linux/init.h>
  111.31 +#include <linux/apm_bios.h>
  111.32 +#ifdef CONFIG_BLK_DEV_RAM
  111.33 +#include <linux/blk.h>
  111.34 +#endif
  111.35 +#include <linux/highmem.h>
  111.36 +#include <linux/bootmem.h>
  111.37 +#include <linux/seq_file.h>
  111.38 +#include <linux/reboot.h>
  111.39 +#include <asm/processor.h>
  111.40 +#include <linux/console.h>
  111.41 +#include <linux/module.h>
  111.42 +#include <asm/mtrr.h>
  111.43 +#include <asm/uaccess.h>
  111.44 +#include <asm/system.h>
  111.45 +#include <asm/io.h>
  111.46 +#include <asm/smp.h>
  111.47 +#include <asm/msr.h>
  111.48 +#include <asm/desc.h>
  111.49 +#include <asm/dma.h>
  111.50 +#include <asm/mpspec.h>
  111.51 +#include <asm/mmu_context.h>
  111.52 +#include <asm/ctrl_if.h>
  111.53 +#include <asm/hypervisor.h>
  111.54 +#include <asm-xen/xen-public/physdev.h>
  111.55 +#include <linux/netdevice.h>
  111.56 +#include <linux/rtnetlink.h>
  111.57 +#include <linux/tqueue.h>
  111.58 +#include <net/pkt_sched.h> /* dev_(de)activate */
  111.59 +
  111.60 +/*
  111.61 + * Point at the empty zero page to start with. We map the real shared_info
  111.62 + * page as soon as fixmap is up and running.
  111.63 + */
  111.64 +shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
  111.65 +
  111.66 +unsigned int *phys_to_machine_mapping, *pfn_to_mfn_frame_list;
  111.67 +
  111.68 +/*
  111.69 + * Machine setup..
  111.70 + */
  111.71 +
  111.72 +char ignore_irq13;		/* set if exception 16 works */
  111.73 +struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
  111.74 +
  111.75 +unsigned long mmu_cr4_features;
  111.76 +
  111.77 +unsigned char * vgacon_mmap;
  111.78 +
  111.79 +/*
  111.80 + * Bus types ..
  111.81 + */
  111.82 +#ifdef CONFIG_EISA
  111.83 +int EISA_bus;
  111.84 +#endif
  111.85 +int MCA_bus;
  111.86 +
  111.87 +/* for MCA, but anyone else can use it if they want */
  111.88 +unsigned int machine_id;
  111.89 +unsigned int machine_submodel_id;
  111.90 +unsigned int BIOS_revision;
  111.91 +unsigned int mca_pentium_flag;
  111.92 +
  111.93 +/* For PCI or other memory-mapped resources */
  111.94 +unsigned long pci_mem_start = 0x10000000;
  111.95 +
  111.96 +/*
  111.97 + * Setup options
  111.98 + */
  111.99 +struct drive_info_struct { char dummy[32]; } drive_info;
 111.100 +struct screen_info screen_info;
 111.101 +struct apm_info apm_info;
 111.102 +struct sys_desc_table_struct {
 111.103 +    unsigned short length;
 111.104 +    unsigned char table[0];
 111.105 +};
 111.106 +
 111.107 +unsigned char aux_device_present;
 111.108 +
 111.109 +extern int root_mountflags;
 111.110 +extern char _text, _etext, _edata, _end;
 111.111 +
 111.112 +extern int blk_nohighio;
 111.113 +
 111.114 +int enable_acpi_smp_table;
 111.115 +
 111.116 +/* Raw start-of-day parameters from the hypervisor. */
 111.117 +union xen_start_info_union xen_start_info_union;
 111.118 +
 111.119 +#define COMMAND_LINE_SIZE MAX_GUEST_CMDLINE
 111.120 +static char command_line[COMMAND_LINE_SIZE];
 111.121 +char saved_command_line[COMMAND_LINE_SIZE];
 111.122 +
 111.123 +/* parse_mem_cmdline()
 111.124 + * returns the value of the mem= boot param converted to pages or 0
 111.125 + */ 
 111.126 +static int __init parse_mem_cmdline (char ** cmdline_p)
 111.127 +{
 111.128 +    char c = ' ', *to = command_line, *from = saved_command_line;
 111.129 +    int len = 0;
 111.130 +    unsigned long long bytes;
 111.131 +    int mem_param = 0;
 111.132 +
 111.133 +    /* Save unparsed command line copy for /proc/cmdline */
 111.134 +    memcpy(saved_command_line, xen_start_info.cmd_line, COMMAND_LINE_SIZE);
 111.135 +    saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
 111.136 +
 111.137 +    for (;;) {
 111.138 +        /*
 111.139 +         * "mem=nopentium" disables the 4MB page tables.
 111.140 +         * "mem=XXX[kKmM]" defines a memory region from HIGH_MEM
 111.141 +         * to <mem>, overriding the bios size.
 111.142 +         * "mem=XXX[KkmM]@XXX[KkmM]" defines a memory region from
 111.143 +         * <start> to <start>+<mem>, overriding the bios size.
 111.144 +         */
 111.145 +        if (c == ' ' && !memcmp(from, "mem=", 4)) {
 111.146 +            if (to != command_line)
 111.147 +                to--;
 111.148 +            if (!memcmp(from+4, "nopentium", 9)) {
 111.149 +                from += 9+4;
 111.150 +            } else if (!memcmp(from+4, "exactmap", 8)) {
 111.151 +                from += 8+4;
 111.152 +            } else {
 111.153 +                bytes = memparse(from+4, &from);
 111.154 +                mem_param = bytes>>PAGE_SHIFT;
 111.155 +		if (*from == '@')
 111.156 +                    (void)memparse(from+1, &from);
 111.157 +            }
 111.158 +        }
 111.159 +
 111.160 +        c = *(from++);
 111.161 +        if (!c)
 111.162 +            break;
 111.163 +        if (COMMAND_LINE_SIZE <= ++len)
 111.164 +            break;
 111.165 +        *(to++) = c;
 111.166 +    }
 111.167 +    *to = '\0';
 111.168 +    *cmdline_p = command_line;
 111.169 +
 111.170 +    return mem_param;
 111.171 +}
 111.172 +
 111.173 +/*
 111.174 + * Every exception-fixup table is sorted (i.e., kernel main table, and every
 111.175 + * module table. Some elements may be out of order if they reference text.init,
 111.176 + * for example. 
 111.177 + */
 111.178 +static void sort_exception_table(struct exception_table_entry *start,
 111.179 +                                 struct exception_table_entry *end)
 111.180 +{
 111.181 +    struct exception_table_entry *p, *q, tmp;
 111.182 +
 111.183 +    for ( p = start; p < end; p++ )
 111.184 +    {
 111.185 +        for ( q = p-1; q > start; q-- )
 111.186 +            if ( p->insn > q->insn )
 111.187 +                break;
 111.188 +        if ( ++q != p )
 111.189 +        {
 111.190 +            tmp = *p;
 111.191 +            memmove(q+1, q, (p-q)*sizeof(*p));
 111.192 +            *q = tmp;
 111.193 +        }
 111.194 +    }
 111.195 +}
 111.196 +
 111.197 +int xen_module_init(struct module *mod)
 111.198 +{
 111.199 +    sort_exception_table(mod->ex_table_start, mod->ex_table_end);
 111.200 +    return 0;
 111.201 +}
 111.202 +
 111.203 +void __init setup_arch(char **cmdline_p)
 111.204 +{
 111.205 +    int i,j;
 111.206 +    unsigned long bootmap_size, start_pfn, lmax_low_pfn;
 111.207 +    int mem_param;  /* user specified memory size in pages */
 111.208 +    int boot_pfn;   /* low pages available for bootmem */
 111.209 +    physdev_op_t op;
 111.210 +
 111.211 +    extern void hypervisor_callback(void);
 111.212 +    extern void failsafe_callback(void);
 111.213 +
 111.214 +    extern unsigned long cpu0_pte_quicklist[];
 111.215 +    extern unsigned long cpu0_pgd_quicklist[];
 111.216 +
 111.217 +    extern const struct exception_table_entry __start___ex_table[];
 111.218 +    extern const struct exception_table_entry __stop___ex_table[];
 111.219 +
 111.220 +    extern char _stext;
 111.221 +
 111.222 +    /* Force a quick death if the kernel panics. */
 111.223 +    extern int panic_timeout;
 111.224 +    if ( panic_timeout == 0 )
 111.225 +        panic_timeout = 1;
 111.226 +
 111.227 +    /* Ensure that the kernel exception-fixup table is sorted. */
 111.228 +    sort_exception_table(__start___ex_table, __stop___ex_table);
 111.229 +
 111.230 +#ifndef CONFIG_HIGHIO
 111.231 +    blk_nohighio = 1;
 111.232 +#endif
 111.233 +
 111.234 +    HYPERVISOR_vm_assist(
 111.235 +        VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
 111.236 +    HYPERVISOR_vm_assist(
 111.237 +        VMASST_CMD_enable, VMASST_TYPE_writable_pagetables);
 111.238 +        
 111.239 +    HYPERVISOR_set_callbacks(
 111.240 +        __KERNEL_CS, (unsigned long)hypervisor_callback,
 111.241 +        __KERNEL_CS, (unsigned long)failsafe_callback);
 111.242 +
 111.243 +    boot_cpu_data.pgd_quick = cpu0_pgd_quicklist;
 111.244 +    boot_cpu_data.pte_quick = cpu0_pte_quicklist;
 111.245 +
 111.246 +    /* This must be initialized to UNNAMED_MAJOR for ipconfig to work
 111.247 +       properly.  Setting ROOT_DEV to default to /dev/ram0 breaks initrd. */
 111.248 +    ROOT_DEV = MKDEV(UNNAMED_MAJOR,0);
 111.249 +    memset(&drive_info, 0, sizeof(drive_info));
 111.250 +    memset(&screen_info, 0, sizeof(screen_info));
 111.251 +    
 111.252 +    /* This is drawn from a dump from vgacon:startup in standard Linux. */
 111.253 +    screen_info.orig_video_mode = 3; 
 111.254 +    screen_info.orig_video_isVGA = 1;
 111.255 +    screen_info.orig_video_lines = 25;
 111.256 +    screen_info.orig_video_cols = 80;
 111.257 +    screen_info.orig_video_ega_bx = 3;
 111.258 +    screen_info.orig_video_points = 16;
 111.259 +
 111.260 +    memset(&apm_info.bios, 0, sizeof(apm_info.bios));
 111.261 +    aux_device_present = 0; 
 111.262 +#ifdef CONFIG_BLK_DEV_RAM
 111.263 +    rd_image_start = 0;
 111.264 +    rd_prompt = 0;
 111.265 +    rd_doload = 0;
 111.266 +#endif
 111.267 +
 111.268 +    root_mountflags &= ~MS_RDONLY;
 111.269 +    init_mm.start_code = (unsigned long) &_text;
 111.270 +    init_mm.end_code = (unsigned long) &_etext;
 111.271 +    init_mm.end_data = (unsigned long) &_edata;
 111.272 +    init_mm.brk = (unsigned long) &_end;
 111.273 +
 111.274 +    /* The mem= kernel command line param overrides the detected amount
 111.275 +     * of memory.   For xenolinux, if this override is larger than detected
 111.276 +     * memory, then boot using only detected memory and make provisions to
 111.277 +     * use all of the override value.   The hypervisor can give this
 111.278 +     * domain more memory later on and it will be added to the free
 111.279 +     * lists at that time.   See claim_new_pages() in
 111.280 +     * arch/xen/drivers/balloon/balloon.c
 111.281 +     */
 111.282 +    mem_param = parse_mem_cmdline(cmdline_p);
 111.283 +    if (mem_param < xen_start_info.nr_pages)
 111.284 +        mem_param = xen_start_info.nr_pages;
 111.285 +
 111.286 +#define PFN_UP(x)	(((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
 111.287 +#define PFN_DOWN(x)	((x) >> PAGE_SHIFT)
 111.288 +#define PFN_PHYS(x)	((x) << PAGE_SHIFT)
 111.289 +
 111.290 +/*
 111.291 + * 128MB for vmalloc(), iomap(), kmap(), and fixaddr mappings.
 111.292 + */
 111.293 +#define VMALLOC_RESERVE	(unsigned long)(128 << 20)
 111.294 +#define MAXMEM		(unsigned long)(HYPERVISOR_VIRT_START-PAGE_OFFSET-VMALLOC_RESERVE)
 111.295 +#define MAXMEM_PFN	PFN_DOWN(MAXMEM)
 111.296 +#define MAX_NONPAE_PFN	(1 << 20)
 111.297 +
 111.298 +    /*
 111.299 +     * Determine low and high memory ranges:
 111.300 +     */
 111.301 +    lmax_low_pfn = max_pfn = mem_param;
 111.302 +    if (lmax_low_pfn > MAXMEM_PFN) {
 111.303 +        lmax_low_pfn = MAXMEM_PFN;
 111.304 +#ifndef CONFIG_HIGHMEM
 111.305 +        /* Maximum memory usable is what is directly addressable */
 111.306 +        printk(KERN_WARNING "Warning only %ldMB will be used.\n",
 111.307 +               MAXMEM>>20);
 111.308 +        if (max_pfn > MAX_NONPAE_PFN)
 111.309 +            printk(KERN_WARNING "Use a PAE enabled kernel.\n");
 111.310 +        else
 111.311 +            printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");
 111.312 +        max_pfn = lmax_low_pfn;
 111.313 +#else /* !CONFIG_HIGHMEM */
 111.314 +#ifndef CONFIG_X86_PAE
 111.315 +        if (max_pfn > MAX_NONPAE_PFN) {
 111.316 +            max_pfn = MAX_NONPAE_PFN;
 111.317 +            printk(KERN_WARNING "Warning only 4GB will be used.\n");
 111.318 +            printk(KERN_WARNING "Use a PAE enabled kernel.\n");
 111.319 +        }
 111.320 +#endif /* !CONFIG_X86_PAE */
 111.321 +#endif /* !CONFIG_HIGHMEM */
 111.322 +    }
 111.323 +
 111.324 +#ifdef CONFIG_HIGHMEM
 111.325 +    highstart_pfn = highend_pfn = max_pfn;
 111.326 +    if (max_pfn > MAXMEM_PFN) {
 111.327 +        highstart_pfn = MAXMEM_PFN;
 111.328 +        printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
 111.329 +               pages_to_mb(highend_pfn - highstart_pfn));
 111.330 +    }
 111.331 +#endif
 111.332 +
 111.333 +    phys_to_machine_mapping = (unsigned int *)xen_start_info.mfn_list;
 111.334 +    cur_pgd = init_mm.pgd = (pgd_t *)xen_start_info.pt_base;
 111.335 +
 111.336 +    start_pfn = (__pa(xen_start_info.pt_base) >> PAGE_SHIFT) + 
 111.337 +        xen_start_info.nr_pt_frames;
 111.338 +
 111.339 +    /*
 111.340 +     * Initialize the boot-time allocator, and free up all RAM. Then reserve 
 111.341 +     * space for OS image, initrd, phys->machine table, bootstrap page table,
 111.342 +     * and the bootmem bitmap. 
 111.343 +     * NB. There is definitely enough room for the bootmem bitmap in the
 111.344 +     * bootstrap page table. We are guaranteed to get >=512kB unused 'padding'
 111.345 +     * for our own use after all bootstrap elements 
 111.346 +     * (see asm-xen/xen-public/xen.h).
 111.347 +     */
 111.348 +    boot_pfn = min((int)xen_start_info.nr_pages,lmax_low_pfn);
 111.349 +    bootmap_size = init_bootmem(start_pfn,boot_pfn);
 111.350 +    free_bootmem(0, PFN_PHYS(boot_pfn));
 111.351 +    reserve_bootmem(__pa(&_stext), 
 111.352 +                    PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1 - 
 111.353 +                    __pa(&_stext));
 111.354 +
 111.355 +    /* init_bootmem() set the global max_low_pfn to boot_pfn.  Now max_low_pfn 
 111.356 +     * can be set to the override value.
 111.357 +     */
 111.358 +    max_low_pfn = lmax_low_pfn;
 111.359 +
 111.360 +#ifdef CONFIG_BLK_DEV_INITRD
 111.361 +    if ( xen_start_info.mod_start != 0 )
 111.362 +    {
 111.363 +        if ( (__pa(xen_start_info.mod_start) + xen_start_info.mod_len) <= 
 111.364 +             (max_low_pfn << PAGE_SHIFT) )
 111.365 +        {
 111.366 +            initrd_start = xen_start_info.mod_start;
 111.367 +            initrd_end   = initrd_start + xen_start_info.mod_len;
 111.368 +            initrd_below_start_ok = 1;
 111.369 +        }
 111.370 +        else
 111.371 +        {
 111.372 +            printk(KERN_ERR "initrd extends beyond end of memory "
 111.373 +                   "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
 111.374 +                   __pa(xen_start_info.mod_start) + xen_start_info.mod_len,
 111.375 +                   max_low_pfn << PAGE_SHIFT);
 111.376 +            initrd_start = 0;
 111.377 +        }
 111.378 +    }
 111.379 +#endif
 111.380 +
 111.381 +    paging_init();
 111.382 +
 111.383 +    /* Make sure we have a correctly sized P->M table. */
 111.384 +    if ( max_pfn != xen_start_info.nr_pages )
 111.385 +    {
 111.386 +        phys_to_machine_mapping = alloc_bootmem_low_pages(
 111.387 +            max_pfn * sizeof(unsigned long));
 111.388 +        if ( max_pfn > xen_start_info.nr_pages )
 111.389 +        {
 111.390 +            memset(phys_to_machine_mapping, ~0,
 111.391 +                   max_pfn * sizeof(unsigned long));
 111.392 +            memcpy(phys_to_machine_mapping,
 111.393 +                   (unsigned long *)xen_start_info.mfn_list,
 111.394 +                   xen_start_info.nr_pages * sizeof(unsigned long));
 111.395 +        }
 111.396 +        else
 111.397 +        {
 111.398 +            memcpy(phys_to_machine_mapping,
 111.399 +                   (unsigned long *)xen_start_info.mfn_list,
 111.400 +                   max_pfn * sizeof(unsigned long));
 111.401 +            if (HYPERVISOR_dom_mem_op(
 111.402 +                MEMOP_decrease_reservation,
 111.403 +                (unsigned long *)xen_start_info.mfn_list + max_pfn,
 111.404 +                xen_start_info.nr_pages - max_pfn, 0) !=
 111.405 +                (xen_start_info.nr_pages - max_pfn))
 111.406 +                BUG();
 111.407 +        }
 111.408 +        free_bootmem(__pa(xen_start_info.mfn_list), 
 111.409 +                     PFN_PHYS(PFN_UP(xen_start_info.nr_pages *
 111.410 +                                     sizeof(unsigned long))));
 111.411 +    }
 111.412 +
 111.413 +    pfn_to_mfn_frame_list = alloc_bootmem_low_pages(PAGE_SIZE);
 111.414 +    for ( i=0, j=0; i < max_pfn; i+=(PAGE_SIZE/sizeof(unsigned long)), j++ )
 111.415 +    {	
 111.416 +        pfn_to_mfn_frame_list[j] = 
 111.417 +            virt_to_machine(&phys_to_machine_mapping[i]) >> PAGE_SHIFT;
 111.418 +    }
 111.419 +    HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list =
 111.420 +	virt_to_machine(pfn_to_mfn_frame_list) >> PAGE_SHIFT;
 111.421 +
 111.422 +    op.cmd             = PHYSDEVOP_SET_IOPL;
 111.423 +    op.u.set_iopl.iopl = current->thread.io_pl = 1;
 111.424 +    HYPERVISOR_physdev_op(&op);
 111.425 +
 111.426 +    if (xen_start_info.flags & SIF_INITDOMAIN )
 111.427 +    {
 111.428 +        if( !(xen_start_info.flags & SIF_PRIVILEGED) )
 111.429 +            panic("Xen granted us console access but not privileged status");
 111.430 +
 111.431 +#if defined(CONFIG_VT)
 111.432 +#if defined(CONFIG_VGA_CONSOLE)
 111.433 +        conswitchp = &vga_con;
 111.434 +#elif defined(CONFIG_DUMMY_CONSOLE)
 111.435 +        conswitchp = &dummy_con;
 111.436 +#endif
 111.437 +#endif
 111.438 +    }
 111.439 +}
 111.440 +
 111.441 +static int cachesize_override __initdata = -1;
 111.442 +static int __init cachesize_setup(char *str)
 111.443 +{
 111.444 +    get_option (&str, &cachesize_override);
 111.445 +    return 1;
 111.446 +}
 111.447 +__setup("cachesize=", cachesize_setup);
 111.448 +
 111.449 +static int __init highio_setup(char *str)
 111.450 +{
 111.451 +    printk("i386: disabling HIGHMEM block I/O\n");
 111.452 +    blk_nohighio = 1;
 111.453 +    return 1;
 111.454 +}
 111.455 +__setup("nohighio", highio_setup);
 111.456 +
 111.457 +static int __init get_model_name(struct cpuinfo_x86 *c)
 111.458 +{
 111.459 +    unsigned int *v;
 111.460 +    char *p, *q;
 111.461 +
 111.462 +    if (cpuid_eax(0x80000000) < 0x80000004)
 111.463 +        return 0;
 111.464 +
 111.465 +    v = (unsigned int *) c->x86_model_id;
 111.466 +    cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]);
 111.467 +    cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]);
 111.468 +    cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]);
 111.469 +    c->x86_model_id[48] = 0;
 111.470 +
 111.471 +    /* Intel chips right-justify this string for some dumb reason;
 111.472 +       undo that brain damage */
 111.473 +    p = q = &c->x86_model_id[0];
 111.474 +    while ( *p == ' ' )
 111.475 +        p++;
 111.476 +    if ( p != q ) {
 111.477 +        while ( *p )
 111.478 +            *q++ = *p++;
 111.479 +        while ( q <= &c->x86_model_id[48] )
 111.480 +            *q++ = '\0';	/* Zero-pad the rest */
 111.481 +    }
 111.482 +
 111.483 +    return 1;
 111.484 +}
 111.485 +
 111.486 +
 111.487 +static void __init display_cacheinfo(struct cpuinfo_x86 *c)
 111.488 +{
 111.489 +    unsigned int n, dummy, ecx, edx, l2size;
 111.490 +
 111.491 +    n = cpuid_eax(0x80000000);
 111.492 +
 111.493 +    if (n >= 0x80000005) {
 111.494 +        cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
 111.495 +        printk(KERN_INFO "CPU: L1 I Cache: %dK (%d bytes/line), D cache %dK (%d bytes/line)\n",
 111.496 +               edx>>24, edx&0xFF, ecx>>24, ecx&0xFF);
 111.497 +        c->x86_cache_size=(ecx>>24)+(edx>>24);	
 111.498 +    }
 111.499 +
 111.500 +    if (n < 0x80000006)	/* Some chips just has a large L1. */
 111.501 +        return;
 111.502 +
 111.503 +    ecx = cpuid_ecx(0x80000006);
 111.504 +    l2size = ecx >> 16;
 111.505 +
 111.506 +    /* AMD errata T13 (order #21922) */
 111.507 +    if ((c->x86_vendor == X86_VENDOR_AMD) && (c->x86 == 6)) {
 111.508 +        if (c->x86_model == 3 && c->x86_mask == 0)	/* Duron Rev A0 */
 111.509 +            l2size = 64;
 111.510 +        if (c->x86_model == 4 &&
 111.511 +            (c->x86_mask==0 || c->x86_mask==1))	/* Tbird rev A1/A2 */
 111.512 +            l2size = 256;
 111.513 +    }
 111.514 +
 111.515 +    /* Intel PIII Tualatin. This comes in two flavours.
 111.516 +     * One has 256kb of cache, the other 512. We have no way
 111.517 +     * to determine which, so we use a boottime override
 111.518 +     * for the 512kb model, and assume 256 otherwise.
 111.519 +     */
 111.520 +    if ((c->x86_vendor == X86_VENDOR_INTEL) && (c->x86 == 6) &&
 111.521 +        (c->x86_model == 11) && (l2size == 0))
 111.522 +        l2size = 256;
 111.523 +
 111.524 +    if (c->x86_vendor == X86_VENDOR_CENTAUR) {
 111.525 +	/* VIA C3 CPUs (670-68F) need further shifting. */
 111.526 +	if ((c->x86 == 6) &&
 111.527 +	    ((c->x86_model == 7) || (c->x86_model == 8))) {
 111.528 +		l2size >>= 8;
 111.529 +	}
 111.530 +
 111.531 +	/* VIA also screwed up Nehemiah stepping 1, and made
 111.532 +	   it return '65KB' instead of '64KB'
 111.533 +	   - Note, it seems this may only be in engineering samples. */
 111.534 +	if ((c->x86==6) && (c->x86_model==9) &&
 111.535 +	    (c->x86_mask==1) && (l2size==65))
 111.536 +		l2size -= 1;
 111.537 +    }
 111.538 +
 111.539 +    /* Allow user to override all this if necessary. */
 111.540 +    if (cachesize_override != -1)
 111.541 +        l2size = cachesize_override;
 111.542 +
 111.543 +    if ( l2size == 0 )
 111.544 +        return;		/* Again, no L2 cache is possible */
 111.545 +
 111.546 +    c->x86_cache_size = l2size;
 111.547 +
 111.548 +    printk(KERN_INFO "CPU: L2 Cache: %dK (%d bytes/line)\n",
 111.549 +           l2size, ecx & 0xFF);
 111.550 +}
 111.551 +
 111.552 +static void __init init_c3(struct cpuinfo_x86 *c)
 111.553 +{
 111.554 +    /* Test for Centaur Extended Feature Flags presence */
 111.555 +    if (cpuid_eax(0xC0000000) >= 0xC0000001) {
 111.556 +        /* store Centaur Extended Feature Flags as
 111.557 +         * word 5 of the CPU capability bit array
 111.558 +         */
 111.559 +        c->x86_capability[5] = cpuid_edx(0xC0000001);
 111.560 +    }
 111.561 +   
 111.562 +    switch (c->x86_model) {
 111.563 +    case 9:	/* Nehemiah */
 111.564 +    default:
 111.565 +        get_model_name(c);
 111.566 +        display_cacheinfo(c);
 111.567 +        break;
 111.568 +    }
 111.569 +}
 111.570 +
 111.571 +static void __init init_centaur(struct cpuinfo_x86 *c)
 111.572 +{
 111.573 +    /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
 111.574 +       3DNow is IDd by bit 31 in extended CPUID (1*3231) anyway */
 111.575 +    clear_bit(0*32+31, &c->x86_capability);
 111.576 +  
 111.577 +    switch (c->x86) {
 111.578 +    case 6:
 111.579 +        init_c3(c);
 111.580 +        break;
 111.581 +    default:
 111.582 +        panic("Unsupported Centaur CPU (%i)\n", c->x86);
 111.583 +    }
 111.584 +}
 111.585 +
 111.586 +static int __init init_amd(struct cpuinfo_x86 *c)
 111.587 +{
 111.588 +    int r;
 111.589 +
 111.590 +    /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
 111.591 +       3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
 111.592 +    clear_bit(0*32+31, &c->x86_capability);
 111.593 +	
 111.594 +    r = get_model_name(c);
 111.595 +
 111.596 +    switch(c->x86)
 111.597 +    {
 111.598 +    case 5: /* We don't like AMD K6 */
 111.599 +        panic("Unsupported AMD processor\n");
 111.600 +    case 6:	/* An Athlon/Duron. We can trust the BIOS probably */
 111.601 +        break;
 111.602 +    }
 111.603 +
 111.604 +    display_cacheinfo(c);
 111.605 +    return r;
 111.606 +}
 111.607 +
 111.608 +
 111.609 +static void __init init_intel(struct cpuinfo_x86 *c)
 111.610 +{
 111.611 +    char *p = NULL;
 111.612 +    unsigned int l1i = 0, l1d = 0, l2 = 0, l3 = 0; /* Cache sizes */
 111.613 +
 111.614 +    if (c->cpuid_level > 1) {
 111.615 +        /* supports eax=2  call */
 111.616 +        int i, j, n;
 111.617 +        int regs[4];
 111.618 +        unsigned char *dp = (unsigned char *)regs;
 111.619 +
 111.620 +        /* Number of times to iterate */
 111.621 +        n = cpuid_eax(2) & 0xFF;
 111.622 +
 111.623 +        for ( i = 0 ; i < n ; i++ ) {
 111.624 +            cpuid(2, &regs[0], &regs[1], &regs[2], &regs[3]);
 111.625 +			
 111.626 +            /* If bit 31 is set, this is an unknown format */
 111.627 +            for ( j = 0 ; j < 3 ; j++ ) {
 111.628 +                if ( regs[j] < 0 ) regs[j] = 0;
 111.629 +            }
 111.630 +
 111.631 +            /* Byte 0 is level count, not a descriptor */
 111.632 +            for ( j = 1 ; j < 16 ; j++ ) {
 111.633 +                unsigned char des = dp[j];
 111.634 +                unsigned char dl, dh;
 111.635 +                unsigned int cs;
 111.636 +
 111.637 +                dh = des >> 4;
 111.638 +                dl = des & 0x0F;
 111.639 +
 111.640 +				/* Black magic... */
 111.641 +
 111.642 +                switch ( dh )
 111.643 +                {
 111.644 +                case 0:
 111.645 +                    switch ( dl ) {
 111.646 +                    case 6:
 111.647 +                        /* L1 I cache */
 111.648 +                        l1i += 8;
 111.649 +                        break;
 111.650 +                    case 8:
 111.651 +                        /* L1 I cache */
 111.652 +                        l1i += 16;
 111.653 +                        break;
 111.654 +                    case 10:
 111.655 +                        /* L1 D cache */
 111.656 +                        l1d += 8;
 111.657 +                        break;
 111.658 +                    case 12:
 111.659 +                        /* L1 D cache */
 111.660 +                        l1d += 16;
 111.661 +                        break;
 111.662 +                    default:;
 111.663 +                        /* TLB, or unknown */
 111.664 +                    }
 111.665 +                    break;
 111.666 +                case 2:
 111.667 +                    if ( dl ) {
 111.668 +                        /* L3 cache */
 111.669 +                        cs = (dl-1) << 9;
 111.670 +                        l3 += cs;
 111.671 +                    }
 111.672 +                    break;
 111.673 +                case 4:
 111.674 +                    if ( c->x86 > 6 && dl ) {
 111.675 +                        /* P4 family */
 111.676 +                        /* L3 cache */
 111.677 +                        cs = 128 << (dl-1);
 111.678 +                        l3 += cs;
 111.679 +                        break;
 111.680 +                    }
 111.681 +                    /* else same as 8 - fall through */
 111.682 +                case 8:
 111.683 +                    if ( dl ) {
 111.684 +                        /* L2 cache */
 111.685 +                        cs = 128 << (dl-1);
 111.686 +                        l2 += cs;
 111.687 +                    }
 111.688 +                    break;
 111.689 +                case 6:
 111.690 +                    if (dl > 5) {
 111.691 +                        /* L1 D cache */
 111.692 +                        cs = 8<<(dl-6);
 111.693 +                        l1d += cs;
 111.694 +                    }
 111.695 +                    break;
 111.696 +                case 7:
 111.697 +                    if ( dl >= 8 ) 
 111.698 +                    {
 111.699 +                        /* L2 cache */
 111.700 +                        cs = 64<<(dl-8);
 111.701 +                        l2 += cs;
 111.702 +                    } else {
 111.703 +                        /* L0 I cache, count as L1 */
 111.704 +                        cs = dl ? (16 << (dl-1)) : 12;
 111.705 +                        l1i += cs;
 111.706 +                    }
 111.707 +                    break;
 111.708 +                default:
 111.709 +                    /* TLB, or something else we don't know about */
 111.710 +                    break;
 111.711 +                }
 111.712 +            }
 111.713 +        }
 111.714 +        if ( l1i || l1d )
 111.715 +            printk(KERN_INFO "CPU: L1 I cache: %dK, L1 D cache: %dK\n",
 111.716 +                   l1i, l1d);
 111.717 +        if ( l2 )
 111.718 +            printk(KERN_INFO "CPU: L2 cache: %dK\n", l2);
 111.719 +        if ( l3 )
 111.720 +            printk(KERN_INFO "CPU: L3 cache: %dK\n", l3);
 111.721 +
 111.722 +        /*
 111.723 +         * This assumes the L3 cache is shared; it typically lives in
 111.724 +         * the northbridge.  The L1 caches are included by the L2
 111.725 +         * cache, and so should not be included for the purpose of
 111.726 +         * SMP switching weights.
 111.727 +         */
 111.728 +        c->x86_cache_size = l2 ? l2 : (l1i+l1d);
 111.729 +    }
 111.730 +
 111.731 +    /* SEP CPUID bug: Pentium Pro reports SEP but doesn't have it */
 111.732 +    if ( c->x86 == 6 && c->x86_model < 3 && c->x86_mask < 3 )
 111.733 +        clear_bit(X86_FEATURE_SEP, &c->x86_capability);
 111.734 +	
 111.735 +    /* Names for the Pentium II/Celeron processors 
 111.736 +       detectable only by also checking the cache size.
 111.737 +       Dixon is NOT a Celeron. */
 111.738 +    if (c->x86 == 6) {
 111.739 +        switch (c->x86_model) {
 111.740 +        case 5:
 111.741 +            if (l2 == 0)
 111.742 +                p = "Celeron (Covington)";
 111.743 +            if (l2 == 256)
 111.744 +                p = "Mobile Pentium II (Dixon)";
 111.745 +            break;
 111.746 +			
 111.747 +        case 6:
 111.748 +            if (l2 == 128)
 111.749 +                p = "Celeron (Mendocino)";
 111.750 +            break;
 111.751 +			
 111.752 +        case 8:
 111.753 +            if (l2 == 128)
 111.754 +                p = "Celeron (Coppermine)";
 111.755 +            break;
 111.756 +        }
 111.757 +    }
 111.758 +
 111.759 +    if ( p )
 111.760 +        strcpy(c->x86_model_id, p);
 111.761 +}
 111.762 +
 111.763 +void __init get_cpu_vendor(struct cpuinfo_x86 *c)
 111.764 +{
 111.765 +    char *v = c->x86_vendor_id;
 111.766 +
 111.767 +    if (!strcmp(v, "GenuineIntel"))
 111.768 +        c->x86_vendor = X86_VENDOR_INTEL;
 111.769 +    else if (!strcmp(v, "AuthenticAMD"))
 111.770 +        c->x86_vendor = X86_VENDOR_AMD;
 111.771 +    else if (!strcmp(v, "CentaurHauls"))
 111.772 +        c->x86_vendor = X86_VENDOR_CENTAUR;
 111.773 +    else
 111.774 +        c->x86_vendor = X86_VENDOR_UNKNOWN;
 111.775 +}
 111.776 +
 111.777 +struct cpu_model_info {
 111.778 +    int vendor;
 111.779 +    int family;
 111.780 +    char *model_names[16];
 111.781 +};
 111.782 +
 111.783 +/* Naming convention should be: <Name> [(<Codename>)] */
 111.784 +/* This table only is used unless init_<vendor>() below doesn't set it; */
 111.785 +/* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */
 111.786 +static struct cpu_model_info cpu_models[] __initdata = {
 111.787 +    { X86_VENDOR_INTEL,	6,
 111.788 +      { "Pentium Pro A-step", "Pentium Pro", NULL, "Pentium II (Klamath)", 
 111.789 +        NULL, "Pentium II (Deschutes)", "Mobile Pentium II",
 111.790 +        "Pentium III (Katmai)", "Pentium III (Coppermine)", NULL,
 111.791 +        "Pentium III (Cascades)", NULL, NULL, NULL, NULL }},
 111.792 +    { X86_VENDOR_AMD,	6, /* Is this this really necessary?? */
 111.793 +      { "Athlon", "Athlon",
 111.794 +        "Athlon", NULL, "Athlon", NULL,
 111.795 +        NULL, NULL, NULL,
 111.796 +        NULL, NULL, NULL, NULL, NULL, NULL, NULL }}
 111.797 +};
 111.798 +
 111.799 +/* Look up CPU names by table lookup. */
 111.800 +static char __init *table_lookup_model(struct cpuinfo_x86 *c)
 111.801 +{
 111.802 +    struct cpu_model_info *info = cpu_models;
 111.803 +    int i;
 111.804 +
 111.805 +    if ( c->x86_model >= 16 )
 111.806 +        return NULL;	/* Range check */
 111.807 +
 111.808 +    for ( i = 0 ; i < sizeof(cpu_models)/sizeof(struct cpu_model_info) ; i++ ) {
 111.809 +        if ( info->vendor == c->x86_vendor &&
 111.810 +             info->family == c->x86 ) {
 111.811 +            return info->model_names[c->x86_model];
 111.812 +        }
 111.813 +        info++;
 111.814 +    }
 111.815 +    return NULL;		/* Not found */
 111.816 +}
 111.817 +
 111.818 +
 111.819 +
 111.820 +/* Standard macro to see if a specific flag is changeable */
 111.821 +static inline int flag_is_changeable_p(u32 flag)
 111.822 +{
 111.823 +    u32 f1, f2;
 111.824 +
 111.825 +    asm("pushfl\n\t"
 111.826 +        "pushfl\n\t"
 111.827 +        "popl %0\n\t"
 111.828 +        "movl %0,%1\n\t"
 111.829 +        "xorl %2,%0\n\t"
 111.830 +        "pushl %0\n\t"
 111.831 +        "popfl\n\t"
 111.832 +        "pushfl\n\t"
 111.833 +        "popl %0\n\t"
 111.834 +        "popfl\n\t"
 111.835 +        : "=&r" (f1), "=&r" (f2)
 111.836 +        : "ir" (flag));
 111.837 +
 111.838 +    return ((f1^f2) & flag) != 0;
 111.839 +}
 111.840 +
 111.841 +
 111.842 +/* Probe for the CPUID instruction */
 111.843 +static int __init have_cpuid_p(void)
 111.844 +{
 111.845 +    return flag_is_changeable_p(X86_EFLAGS_ID);
 111.846 +}
 111.847 +
 111.848 +
 111.849 +
 111.850 +#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
 111.851 +unsigned char eddnr;
 111.852 +struct edd_info edd[EDDMAXNR];
 111.853 +unsigned int edd_disk80_sig;
 111.854 +/**
 111.855 + * copy_edd() - Copy the BIOS EDD information
 111.856 + *              from empty_zero_page into a safe place.
 111.857 + *
 111.858 + */
 111.859 +static inline void copy_edd(void)
 111.860 +{
 111.861 +     eddnr = EDD_NR;
 111.862 +     memcpy(edd, EDD_BUF, sizeof(edd));
 111.863 +     edd_disk80_sig = DISK80_SIGNATURE_BUFFER;
 111.864 +}
 111.865 +#else
 111.866 +static inline void copy_edd(void) {}
 111.867 +#endif
 111.868 +
 111.869 +/*
 111.870 + * This does the hard work of actually picking apart the CPU stuff...
 111.871 + */
 111.872 +void __init identify_cpu(struct cpuinfo_x86 *c)
 111.873 +{
 111.874 +    int junk, i;
 111.875 +    u32 xlvl, tfms;
 111.876 +
 111.877 +    c->loops_per_jiffy = loops_per_jiffy;
 111.878 +    c->x86_cache_size = -1;
 111.879 +    c->x86_vendor = X86_VENDOR_UNKNOWN;
 111.880 +    c->cpuid_level = -1;	/* CPUID not detected */
 111.881 +    c->x86_model = c->x86_mask = 0;	/* So far unknown... */
 111.882 +    c->x86_vendor_id[0] = '\0'; /* Unset */
 111.883 +    c->x86_model_id[0] = '\0';  /* Unset */
 111.884 +    memset(&c->x86_capability, 0, sizeof c->x86_capability);
 111.885 +    c->hard_math = 1;
 111.886 +
 111.887 +    if ( !have_cpuid_p() ) {
 111.888 +        panic("Processor must support CPUID\n");
 111.889 +    } else {
 111.890 +        /* CPU does have CPUID */
 111.891 +
 111.892 +        /* Get vendor name */
 111.893 +        cpuid(0x00000000, &c->cpuid_level,
 111.894 +              (int *)&c->x86_vendor_id[0],
 111.895 +              (int *)&c->x86_vendor_id[8],
 111.896 +              (int *)&c->x86_vendor_id[4]);
 111.897 +		
 111.898 +        get_cpu_vendor(c);
 111.899 +        /* Initialize the standard set of capabilities */
 111.900 +        /* Note that the vendor-specific code below might override */
 111.901 +
 111.902 +        /* Intel-defined flags: level 0x00000001 */
 111.903 +        if ( c->cpuid_level >= 0x00000001 ) {
 111.904 +                        u32 capability, excap;
 111.905 +                        cpuid(0x00000001, &tfms, &junk, &excap, &capability);
 111.906 +                        c->x86_capability[0] = capability;
 111.907 +                        c->x86_capability[4] = excap;
 111.908 +                        c->x86 = (tfms >> 8) & 15;
 111.909 +                        c->x86_model = (tfms >> 4) & 15;
 111.910 +                        if (c->x86 == 0xf) {
 111.911 +                                c->x86 += (tfms >> 20) & 0xff;
 111.912 +                                c->x86_model += ((tfms >> 16) & 0xF) << 4;
 111.913 +                        }
 111.914 +                        c->x86_mask = tfms & 15;
 111.915 +        } else {
 111.916 +            /* Have CPUID level 0 only - unheard of */
 111.917 +            c->x86 = 4;
 111.918 +        }
 111.919 +
 111.920 +        /* AMD-defined flags: level 0x80000001 */
 111.921 +        xlvl = cpuid_eax(0x80000000);
 111.922 +        if ( (xlvl & 0xffff0000) == 0x80000000 ) {
 111.923 +            if ( xlvl >= 0x80000001 )
 111.924 +                c->x86_capability[1] = cpuid_edx(0x80000001);
 111.925 +            if ( xlvl >= 0x80000004 )
 111.926 +                get_model_name(c); /* Default name */
 111.927 +        }
 111.928 +
 111.929 +        /* Transmeta-defined flags: level 0x80860001 */
 111.930 +        xlvl = cpuid_eax(0x80860000);
 111.931 +        if ( (xlvl & 0xffff0000) == 0x80860000 ) {
 111.932 +            if (  xlvl >= 0x80860001 )
 111.933 +                c->x86_capability[2] = cpuid_edx(0x80860001);
 111.934 +        }
 111.935 +    }
 111.936 +
 111.937 +    printk(KERN_DEBUG "CPU: Before vendor init, caps: %08x %08x %08x, vendor = %d\n",
 111.938 +           c->x86_capability[0],
 111.939 +           c->x86_capability[1],
 111.940 +           c->x86_capability[2],
 111.941 +           c->x86_vendor);
 111.942 +
 111.943 +    /*
 111.944 +     * Vendor-specific initialization.  In this section we
 111.945 +     * canonicalize the feature flags, meaning if there are
 111.946 +     * features a certain CPU supports which CPUID doesn't
 111.947 +     * tell us, CPUID claiming incorrect flags, or other bugs,
 111.948 +     * we handle them here.
 111.949 +     *
 111.950 +     * At the end of this section, c->x86_capability better
 111.951 +     * indicate the features this CPU genuinely supports!
 111.952 +     */
 111.953 +    switch ( c->x86_vendor ) {
 111.954 +    case X86_VENDOR_AMD:
 111.955 +        init_amd(c);
 111.956 +        break;
 111.957 +
 111.958 +    case X86_VENDOR_INTEL:
 111.959 +        init_intel(c);
 111.960 +        break;
 111.961 +
 111.962 +    case X86_VENDOR_CENTAUR:
 111.963 +        init_centaur(c);
 111.964 +        break;
 111.965 +        
 111.966 +    default:
 111.967 +        printk("Unsupported CPU vendor (%d) -- please report!\n",
 111.968 +               c->x86_vendor);
 111.969 +    }
 111.970 +	
 111.971 +    printk(KERN_DEBUG "CPU: After vendor init, caps: %08x %08x %08x %08x\n",
 111.972 +           c->x86_capability[0],
 111.973 +           c->x86_capability[1],
 111.974 +           c->x86_capability[2],
 111.975 +           c->x86_capability[3]);
 111.976 +
 111.977 +
 111.978 +    /* If the model name is still unset, do table lookup. */
 111.979 +    if ( !c->x86_model_id[0] ) {
 111.980 +        char *p;
 111.981 +        p = table_lookup_model(c);
 111.982 +        if ( p )
 111.983 +            strcpy(c->x86_model_id, p);
 111.984 +        else
 111.985 +            /* Last resort... */
 111.986 +            sprintf(c->x86_model_id, "%02x/%02x",
 111.987 +                    c->x86_vendor, c->x86_model);
 111.988 +    }
 111.989 +
 111.990 +    /* Now the feature flags better reflect actual CPU features! */
 111.991 +
 111.992 +    printk(KERN_DEBUG "CPU:     After generic, caps: %08x %08x %08x %08x\n",
 111.993 +           c->x86_capability[0],
 111.994 +           c->x86_capability[1],
 111.995 +           c->x86_capability[2],
 111.996 +           c->x86_capability[3]);
 111.997 +
 111.998 +    /*
 111.999 +     * On SMP, boot_cpu_data holds the common feature set between
111.1000 +     * all CPUs; so make sure that we indicate which features are
111.1001 +     * common between the CPUs.  The first time this routine gets
111.1002 +     * executed, c == &boot_cpu_data.
111.1003 +     */
111.1004 +    if ( c != &boot_cpu_data ) {
111.1005 +        /* AND the already accumulated flags with these */
111.1006 +        for ( i = 0 ; i < NCAPINTS ; i++ )
111.1007 +            boot_cpu_data.x86_capability[i] &= c->x86_capability[i];
111.1008 +    }
111.1009 +
111.1010 +    printk(KERN_DEBUG "CPU:             Common caps: %08x %08x %08x %08x\n",
111.1011 +           boot_cpu_data.x86_capability[0],
111.1012 +           boot_cpu_data.x86_capability[1],
111.1013 +           boot_cpu_data.x86_capability[2],
111.1014 +           boot_cpu_data.x86_capability[3]);
111.1015 +}
111.1016 +
111.1017 +
111.1018 +/* These need to match <asm/processor.h> */
111.1019 +static char *cpu_vendor_names[] __initdata = {
111.1020 +    "Intel", "Cyrix", "AMD", "UMC", "NexGen", "Centaur", "Rise", "Transmeta" };
111.1021 +
111.1022 +
111.1023 +void __init print_cpu_info(struct cpuinfo_x86 *c)
111.1024 +{
111.1025 +    char *vendor = NULL;
111.1026 +
111.1027 +    if (c->x86_vendor < sizeof(cpu_vendor_names)/sizeof(char *))
111.1028 +        vendor = cpu_vendor_names[c->x86_vendor];
111.1029 +    else if (c->cpuid_level >= 0)
111.1030 +        vendor = c->x86_vendor_id;
111.1031 +
111.1032 +    if (vendor && strncmp(c->x86_model_id, vendor, strlen(vendor)))
111.1033 +        printk("%s ", vendor);
111.1034 +
111.1035 +    if (!c->x86_model_id[0])
111.1036 +        printk("%d86", c->x86);
111.1037 +    else
111.1038 +        printk("%s", c->x86_model_id);
111.1039 +
111.1040 +    if (c->x86_mask || c->cpuid_level >= 0) 
111.1041 +        printk(" stepping %02x\n", c->x86_mask);
111.1042 +    else
111.1043 +        printk("\n");
111.1044 +}
111.1045 +
111.1046 +/*
111.1047 + *	Get CPU information for use by the procfs.
111.1048 + */
111.1049 +static int show_cpuinfo(struct seq_file *m, void *v)
111.1050 +{
111.1051 +    /* 
111.1052 +     * These flag bits must match the definitions in <asm/cpufeature.h>.
111.1053 +     * NULL means this bit is undefined or reserved; either way it doesn't
111.1054 +     * have meaning as far as Linux is concerned.  Note that it's important
111.1055 +     * to realize there is a difference between this table and CPUID -- if
111.1056 +     * applications want to get the raw CPUID data, they should access
111.1057 +     * /dev/cpu/<cpu_nr>/cpuid instead.
111.1058 +	 */
111.1059 +    static char *x86_cap_flags[] = {
111.1060 +        /* Intel-defined */
111.1061 +        "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce",
111.1062 +        "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov",
111.1063 +        "pat", "pse36", "pn", "clflush", NULL, "dts", "acpi", "mmx",
111.1064 +        "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", "pbe",
111.1065 +
111.1066 +        /* AMD-defined */
111.1067 +        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
111.1068 +        NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL,
111.1069 +        NULL, NULL, NULL, "mp", NULL, NULL, "mmxext", NULL,
111.1070 +        NULL, NULL, NULL, NULL, NULL, "lm", "3dnowext", "3dnow",
111.1071 +
111.1072 +        /* Transmeta-defined */
111.1073 +        "recovery", "longrun", NULL, "lrti", NULL, NULL, NULL, NULL,
111.1074 +        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
111.1075 +        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
111.1076 +        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
111.1077 +
111.1078 +        /* Other (Linux-defined) */
111.1079 +        "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", 
111.1080 +	NULL, NULL, NULL, NULL,
111.1081 +        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
111.1082 +        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
111.1083 +        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
111.1084 +
111.1085 +        /* Intel-defined (#2) */
111.1086 +        "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "tm2",
111.1087 +        "est", NULL, "cid", NULL, NULL, NULL, NULL, NULL,
111.1088 +        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
111.1089 +        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
111.1090 +
111.1091 +        /* VIA/Cyrix/Centaur-defined */
111.1092 +        NULL, NULL, "xstore", NULL, NULL, NULL, NULL, NULL,
111.1093 +        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
111.1094 +        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
111.1095 +        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
111.1096 +
111.1097 +    };
111.1098 +    struct cpuinfo_x86 *c = v;
111.1099 +    int i, n = c - cpu_data;
111.1100 +    int fpu_exception;
111.1101 +
111.1102 +#ifdef CONFIG_SMP
111.1103 +    if (!(cpu_online_map & (1<<n)))
111.1104 +        return 0;
111.1105 +#endif
111.1106 +    seq_printf(m, "processor\t: %d\n"
111.1107 +               "vendor_id\t: %s\n"
111.1108 +               "cpu family\t: %d\n"
111.1109 +               "model\t\t: %d\n"
111.1110 +               "model name\t: %s\n",
111.1111 +               n,
111.1112 +               c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown",
111.1113 +               c->x86,
111.1114 +               c->x86_model,
111.1115 +               c->x86_model_id[0] ? c->x86_model_id : "unknown");
111.1116 +
111.1117 +    if (c->x86_mask || c->cpuid_level >= 0)
111.1118 +        seq_printf(m, "stepping\t: %d\n", c->x86_mask);
111.1119 +    else
111.1120 +        seq_printf(m, "stepping\t: unknown\n");
111.1121 +
111.1122 +    if ( test_bit(X86_FEATURE_TSC, &c->x86_capability) ) {
111.1123 +        seq_printf(m, "cpu MHz\t\t: %lu.%03lu\n",
111.1124 +                   cpu_khz / 1000, (cpu_khz % 1000));
111.1125 +    }
111.1126 +
111.1127 +    /* Cache size */
111.1128 +    if (c->x86_cache_size >= 0)
111.1129 +        seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
111.1130 +	
111.1131 +	/* We use exception 16 if we have hardware math and we've either seen it or the CPU claims it is internal */
111.1132 +    fpu_exception = c->hard_math && (ignore_irq13 || cpu_has_fpu);
111.1133 +    seq_printf(m, "fdiv_bug\t: %s\n"
111.1134 +               "hlt_bug\t\t: %s\n"
111.1135 +               "f00f_bug\t: %s\n"
111.1136 +               "coma_bug\t: %s\n"
111.1137 +               "fpu\t\t: %s\n"
111.1138 +               "fpu_exception\t: %s\n"
111.1139 +               "cpuid level\t: %d\n"
111.1140 +               "wp\t\t: %s\n"
111.1141 +               "flags\t\t:",
111.1142 +               c->fdiv_bug ? "yes" : "no",
111.1143 +               c->hlt_works_ok ? "no" : "yes",
111.1144 +               c->f00f_bug ? "yes" : "no",
111.1145 +               c->coma_bug ? "yes" : "no",
111.1146 +               c->hard_math ? "yes" : "no",
111.1147 +               fpu_exception ? "yes" : "no",
111.1148 +               c->cpuid_level,
111.1149 +               c->wp_works_ok ? "yes" : "no");
111.1150 +
111.1151 +    for ( i = 0 ; i < 32*NCAPINTS ; i++ )
111.1152 +        if ( test_bit(i, &c->x86_capability) &&
111.1153 +             x86_cap_flags[i] != NULL )
111.1154 +            seq_printf(m, " %s", x86_cap_flags[i]);
111.1155 +
111.1156 +    seq_printf(m, "\nbogomips\t: %lu.%02lu\n\n",
111.1157 +               c->loops_per_jiffy/(500000/HZ),
111.1158 +               (c->loops_per_jiffy/(5000/HZ)) % 100);
111.1159 +    return 0;
111.1160 +}
111.1161 +
111.1162 +static void *c_start(struct seq_file *m, loff_t *pos)
111.1163 +{
111.1164 +    return *pos < NR_CPUS ? cpu_data + *pos : NULL;
111.1165 +}
111.1166 +static void *c_next(struct seq_file *m, void *v, loff_t *pos)
111.1167 +{
111.1168 +    ++*pos;
111.1169 +    return c_start(m, pos);
111.1170 +}
111.1171 +static void c_stop(struct seq_file *m, void *v)
111.1172 +{
111.1173 +}
111.1174 +struct seq_operations cpuinfo_op = {
111.1175 +    start:	c_start,
111.1176 +    next:	c_next,
111.1177 +    stop:	c_stop,
111.1178 +    show:	show_cpuinfo,
111.1179 +};
111.1180 +
111.1181 +unsigned long cpu_initialized __initdata = 0;
111.1182 +
111.1183 +/*
111.1184 + * cpu_init() initializes state that is per-CPU. Some data is already
111.1185 + * initialized (naturally) in the bootstrap process, such as the GDT
111.1186 + * and IDT. We reload them nevertheless, this function acts as a
111.1187 + * 'CPU state barrier', nothing should get across.
111.1188 + */
111.1189 +void __init cpu_init (void)
111.1190 +{
111.1191 +    int nr = smp_processor_id();
111.1192 +
111.1193 +    if (test_and_set_bit(nr, &cpu_initialized)) {
111.1194 +        printk(KERN_WARNING "CPU#%d already initialized!\n", nr);
111.1195 +        for (;;) __sti();
111.1196 +    }
111.1197 +    printk(KERN_INFO "Initializing CPU#%d\n", nr);
111.1198 +
111.1199 +    /*
111.1200 +     * set up and load the per-CPU TSS and LDT
111.1201 +     */
111.1202 +    atomic_inc(&init_mm.mm_count);
111.1203 +    current->active_mm = &init_mm;
111.1204 +    if(current->mm)
111.1205 +        BUG();
111.1206 +    enter_lazy_tlb(&init_mm, current, nr);
111.1207 +
111.1208 +    HYPERVISOR_stack_switch(__KERNEL_DS, current->thread.esp0);
111.1209 +
111.1210 +    load_LDT(&init_mm.context);
111.1211 +
111.1212 +    /* Force FPU initialization. */
111.1213 +    current->flags &= ~PF_USEDFPU;
111.1214 +    current->used_math = 0;
111.1215 +    stts();
111.1216 +}
   112.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   112.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/kernel/signal.c	Mon Jul 11 14:44:08 2005 +0000
   112.3 @@ -0,0 +1,717 @@
   112.4 +/*
   112.5 + *  linux/arch/i386/kernel/signal.c
   112.6 + *
   112.7 + *  Copyright (C) 1991, 1992  Linus Torvalds
   112.8 + *
   112.9 + *  1997-11-28  Modified for POSIX.1b signals by Richard Henderson
  112.10 + *  2000-06-20  Pentium III FXSR, SSE support by Gareth Hughes
  112.11 + */
  112.12 +
  112.13 +#include <linux/sched.h>
  112.14 +#include <linux/mm.h>
  112.15 +#include <linux/smp.h>
  112.16 +#include <linux/smp_lock.h>
  112.17 +#include <linux/kernel.h>
  112.18 +#include <linux/signal.h>
  112.19 +#include <linux/errno.h>
  112.20 +#include <linux/wait.h>
  112.21 +#include <linux/ptrace.h>
  112.22 +#include <linux/unistd.h>
  112.23 +#include <linux/stddef.h>
  112.24 +#include <linux/tty.h>
  112.25 +#include <linux/personality.h>
  112.26 +#include <asm/ucontext.h>
  112.27 +#include <asm/uaccess.h>
  112.28 +#include <asm/i387.h>
  112.29 +
  112.30 +#define DEBUG_SIG 0
  112.31 +
  112.32 +#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
  112.33 +
  112.34 +int FASTCALL(do_signal(struct pt_regs *regs, sigset_t *oldset));
  112.35 +
  112.36 +int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
  112.37 +{
  112.38 +	if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t)))
  112.39 +		return -EFAULT;
  112.40 +	if (from->si_code < 0)
  112.41 +		return __copy_to_user(to, from, sizeof(siginfo_t));
  112.42 +	else {
  112.43 +		int err;
  112.44 +
  112.45 +		/* If you change siginfo_t structure, please be sure
  112.46 +		   this code is fixed accordingly.
  112.47 +		   It should never copy any pad contained in the structure
  112.48 +		   to avoid security leaks, but must copy the generic
  112.49 +		   3 ints plus the relevant union member.  */
  112.50 +		err = __put_user(from->si_signo, &to->si_signo);
  112.51 +		err |= __put_user(from->si_errno, &to->si_errno);
  112.52 +		err |= __put_user((short)from->si_code, &to->si_code);
  112.53 +		/* First 32bits of unions are always present.  */
  112.54 +		err |= __put_user(from->si_pid, &to->si_pid);
  112.55 +		switch (from->si_code >> 16) {
  112.56 +		case __SI_FAULT >> 16:
  112.57 +			break;
  112.58 +		case __SI_CHLD >> 16:
  112.59 +			err |= __put_user(from->si_utime, &to->si_utime);
  112.60 +			err |= __put_user(from->si_stime, &to->si_stime);
  112.61 +			err |= __put_user(from->si_status, &to->si_status);
  112.62 +		default:
  112.63 +			err |= __put_user(from->si_uid, &to->si_uid);
  112.64 +			break;
  112.65 +		/* case __SI_RT: This is not generated by the kernel as of now.  */
  112.66 +		}
  112.67 +		return err;
  112.68 +	}
  112.69 +}
  112.70 +
  112.71 +/*
  112.72 + * Atomically swap in the new signal mask, and wait for a signal.
  112.73 + */
  112.74 +asmlinkage int
  112.75 +sys_sigsuspend(int history0, int history1, old_sigset_t mask)
  112.76 +{
  112.77 +	struct pt_regs * regs = (struct pt_regs *) &history0;
  112.78 +	sigset_t saveset;
  112.79 +
  112.80 +	mask &= _BLOCKABLE;
  112.81 +	spin_lock_irq(&current->sigmask_lock);
  112.82 +	saveset = current->blocked;
  112.83 +	siginitset(&current->blocked, mask);
  112.84 +	recalc_sigpending(current);
  112.85 +	spin_unlock_irq(&current->sigmask_lock);
  112.86 +
  112.87 +	regs->eax = -EINTR;
  112.88 +	while (1) {
  112.89 +		current->state = TASK_INTERRUPTIBLE;
  112.90 +		schedule();
  112.91 +		if (do_signal(regs, &saveset))
  112.92 +			return -EINTR;
  112.93 +	}
  112.94 +}
  112.95 +
  112.96 +asmlinkage int
  112.97 +sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize)
  112.98 +{
  112.99 +	struct pt_regs * regs = (struct pt_regs *) &unewset;
 112.100 +	sigset_t saveset, newset;
 112.101 +
 112.102 +	/* XXX: Don't preclude handling different sized sigset_t's.  */
 112.103 +	if (sigsetsize != sizeof(sigset_t))
 112.104 +		return -EINVAL;
 112.105 +
 112.106 +	if (copy_from_user(&newset, unewset, sizeof(newset)))
 112.107 +		return -EFAULT;
 112.108 +	sigdelsetmask(&newset, ~_BLOCKABLE);
 112.109 +
 112.110 +	spin_lock_irq(&current->sigmask_lock);
 112.111 +	saveset = current->blocked;
 112.112 +	current->blocked = newset;
 112.113 +	recalc_sigpending(current);
 112.114 +	spin_unlock_irq(&current->sigmask_lock);
 112.115 +
 112.116 +	regs->eax = -EINTR;
 112.117 +	while (1) {
 112.118 +		current->state = TASK_INTERRUPTIBLE;
 112.119 +		schedule();
 112.120 +		if (do_signal(regs, &saveset))
 112.121 +			return -EINTR;
 112.122 +	}
 112.123 +}
 112.124 +
 112.125 +asmlinkage int 
 112.126 +sys_sigaction(int sig, const struct old_sigaction *act,
 112.127 +	      struct old_sigaction *oact)
 112.128 +{
 112.129 +	struct k_sigaction new_ka, old_ka;
 112.130 +	int ret;
 112.131 +
 112.132 +	if (act) {
 112.133 +		old_sigset_t mask;
 112.134 +		if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
 112.135 +		    __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
 112.136 +		    __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
 112.137 +			return -EFAULT;
 112.138 +		__get_user(new_ka.sa.sa_flags, &act->sa_flags);
 112.139 +		__get_user(mask, &act->sa_mask);
 112.140 +		siginitset(&new_ka.sa.sa_mask, mask);
 112.141 +	}
 112.142 +
 112.143 +	ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
 112.144 +
 112.145 +	if (!ret && oact) {
 112.146 +		if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
 112.147 +		    __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
 112.148 +		    __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
 112.149 +			return -EFAULT;
 112.150 +		__put_user(old_ka.sa.sa_flags, &oact->sa_flags);
 112.151 +		__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
 112.152 +	}
 112.153 +
 112.154 +	return ret;
 112.155 +}
 112.156 +
 112.157 +asmlinkage int
 112.158 +sys_sigaltstack(const stack_t *uss, stack_t *uoss)
 112.159 +{
 112.160 +	struct pt_regs *regs = (struct pt_regs *) &uss;
 112.161 +	return do_sigaltstack(uss, uoss, regs->esp);
 112.162 +}
 112.163 +
 112.164 +
 112.165 +/*
 112.166 + * Do a signal return; undo the signal stack.
 112.167 + */
 112.168 +
 112.169 +struct sigframe
 112.170 +{
 112.171 +	char *pretcode;
 112.172 +	int sig;
 112.173 +	struct sigcontext sc;
 112.174 +	struct _fpstate fpstate;
 112.175 +	unsigned long extramask[_NSIG_WORDS-1];
 112.176 +	char retcode[8];
 112.177 +};
 112.178 +
 112.179 +struct rt_sigframe
 112.180 +{
 112.181 +	char *pretcode;
 112.182 +	int sig;
 112.183 +	struct siginfo *pinfo;
 112.184 +	void *puc;
 112.185 +	struct siginfo info;
 112.186 +	struct ucontext uc;
 112.187 +	struct _fpstate fpstate;
 112.188 +	char retcode[8];
 112.189 +};
 112.190 +
 112.191 +static int
 112.192 +restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc, int *peax)
 112.193 +{
 112.194 +	unsigned int err = 0;
 112.195 +
 112.196 +#define COPY(x)		err |= __get_user(regs->x, &sc->x)
 112.197 +
 112.198 +#define COPY_SEG(seg)							\
 112.199 +	{ unsigned short tmp;						\
 112.200 +	  err |= __get_user(tmp, &sc->seg);				\
 112.201 +	  regs->x##seg = tmp; }
 112.202 +
 112.203 +#define COPY_SEG_STRICT(seg)						\
 112.204 +	{ unsigned short tmp;						\
 112.205 +	  err |= __get_user(tmp, &sc->seg);				\
 112.206 +	  regs->x##seg = tmp|3; }
 112.207 +
 112.208 +#define GET_SEG(seg)							\
 112.209 +	{ unsigned short tmp;						\
 112.210 +	  err |= __get_user(tmp, &sc->seg);				\
 112.211 +	  loadsegment(seg,tmp); }
 112.212 +
 112.213 +	GET_SEG(gs);
 112.214 +	GET_SEG(fs);
 112.215 +	COPY_SEG(es);
 112.216 +	COPY_SEG(ds);
 112.217 +	COPY(edi);
 112.218 +	COPY(esi);
 112.219 +	COPY(ebp);
 112.220 +	COPY(esp);
 112.221 +	COPY(ebx);
 112.222 +	COPY(edx);
 112.223 +	COPY(ecx);
 112.224 +	COPY(eip);
 112.225 +	COPY_SEG_STRICT(cs);
 112.226 +	COPY_SEG_STRICT(ss);
 112.227 +	
 112.228 +	{
 112.229 +		unsigned int tmpflags;
 112.230 +		err |= __get_user(tmpflags, &sc->eflags);
 112.231 +		regs->eflags = (regs->eflags & ~0x40DD5) | (tmpflags & 0x40DD5);
 112.232 +		regs->orig_eax = -1;		/* disable syscall checks */
 112.233 +	}
 112.234 +
 112.235 +	{
 112.236 +		struct _fpstate * buf;
 112.237 +		err |= __get_user(buf, &sc->fpstate);
 112.238 +		if (buf) {
 112.239 +			if (verify_area(VERIFY_READ, buf, sizeof(*buf)))
 112.240 +				goto badframe;
 112.241 +			err |= restore_i387(buf);
 112.242 +		}
 112.243 +	}
 112.244 +
 112.245 +	err |= __get_user(*peax, &sc->eax);
 112.246 +	return err;
 112.247 +
 112.248 +badframe:
 112.249 +	return 1;
 112.250 +}
 112.251 +
 112.252 +asmlinkage int sys_sigreturn(unsigned long __unused)
 112.253 +{
 112.254 +	struct pt_regs *regs = (struct pt_regs *) &__unused;
 112.255 +	struct sigframe *frame = (struct sigframe *)(regs->esp - 8);
 112.256 +	sigset_t set;
 112.257 +	int eax;
 112.258 +
 112.259 +	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
 112.260 +		goto badframe;
 112.261 +	if (__get_user(set.sig[0], &frame->sc.oldmask)
 112.262 +	    || (_NSIG_WORDS > 1
 112.263 +		&& __copy_from_user(&set.sig[1], &frame->extramask,
 112.264 +				    sizeof(frame->extramask))))
 112.265 +		goto badframe;
 112.266 +
 112.267 +	sigdelsetmask(&set, ~_BLOCKABLE);
 112.268 +	spin_lock_irq(&current->sigmask_lock);
 112.269 +	current->blocked = set;
 112.270 +	recalc_sigpending(current);
 112.271 +	spin_unlock_irq(&current->sigmask_lock);
 112.272 +	
 112.273 +	if (restore_sigcontext(regs, &frame->sc, &eax))
 112.274 +		goto badframe;
 112.275 +	return eax;
 112.276 +
 112.277 +badframe:
 112.278 +	force_sig(SIGSEGV, current);
 112.279 +	return 0;
 112.280 +}	
 112.281 +
 112.282 +asmlinkage int sys_rt_sigreturn(unsigned long __unused)
 112.283 +{
 112.284 +	struct pt_regs *regs = (struct pt_regs *) &__unused;
 112.285 +	struct rt_sigframe *frame = (struct rt_sigframe *)(regs->esp - 4);
 112.286 +	sigset_t set;
 112.287 +	stack_t st;
 112.288 +	int eax;
 112.289 +
 112.290 +	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
 112.291 +		goto badframe;
 112.292 +	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
 112.293 +		goto badframe;
 112.294 +
 112.295 +	sigdelsetmask(&set, ~_BLOCKABLE);
 112.296 +	spin_lock_irq(&current->sigmask_lock);
 112.297 +	current->blocked = set;
 112.298 +	recalc_sigpending(current);
 112.299 +	spin_unlock_irq(&current->sigmask_lock);
 112.300 +	
 112.301 +	if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &eax))
 112.302 +		goto badframe;
 112.303 +
 112.304 +	if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st)))
 112.305 +		goto badframe;
 112.306 +	/* It is more difficult to avoid calling this function than to
 112.307 +	   call it and ignore errors.  */
 112.308 +	do_sigaltstack(&st, NULL, regs->esp);
 112.309 +
 112.310 +	return eax;
 112.311 +
 112.312 +badframe:
 112.313 +	force_sig(SIGSEGV, current);
 112.314 +	return 0;
 112.315 +}	
 112.316 +
 112.317 +/*
 112.318 + * Set up a signal frame.
 112.319 + */
 112.320 +
 112.321 +static int
 112.322 +setup_sigcontext(struct sigcontext *sc, struct _fpstate *fpstate,
 112.323 +		 struct pt_regs *regs, unsigned long mask)
 112.324 +{
 112.325 +	int tmp, err = 0;
 112.326 +
 112.327 +	tmp = 0;
 112.328 +	__asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp));
 112.329 +	err |= __put_user(tmp, (unsigned int *)&sc->gs);
 112.330 +	__asm__("movl %%fs,%0" : "=r"(tmp): "0"(tmp));
 112.331 +	err |= __put_user(tmp, (unsigned int *)&sc->fs);
 112.332 +
 112.333 +	err |= __put_user(regs->xes, (unsigned int *)&sc->es);
 112.334 +	err |= __put_user(regs->xds, (unsigned int *)&sc->ds);
 112.335 +	err |= __put_user(regs->edi, &sc->edi);
 112.336 +	err |= __put_user(regs->esi, &sc->esi);
 112.337 +	err |= __put_user(regs->ebp, &sc->ebp);
 112.338 +	err |= __put_user(regs->esp, &sc->esp);
 112.339 +	err |= __put_user(regs->ebx, &sc->ebx);
 112.340 +	err |= __put_user(regs->edx, &sc->edx);
 112.341 +	err |= __put_user(regs->ecx, &sc->ecx);
 112.342 +	err |= __put_user(regs->eax, &sc->eax);
 112.343 +	err |= __put_user(current->thread.trap_no, &sc->trapno);
 112.344 +	err |= __put_user(current->thread.error_code, &sc->err);
 112.345 +	err |= __put_user(regs->eip, &sc->eip);
 112.346 +	err |= __put_user(regs->xcs, (unsigned int *)&sc->cs);
 112.347 +	err |= __put_user(regs->eflags, &sc->eflags);
 112.348 +	err |= __put_user(regs->esp, &sc->esp_at_signal);
 112.349 +	err |= __put_user(regs->xss, (unsigned int *)&sc->ss);
 112.350 +
 112.351 +	tmp = save_i387(fpstate);
 112.352 +	if (tmp < 0)
 112.353 +	  err = 1;
 112.354 +	else
 112.355 +	  err |= __put_user(tmp ? fpstate : NULL, &sc->fpstate);
 112.356 +
 112.357 +	/* non-iBCS2 extensions.. */
 112.358 +	err |= __put_user(mask, &sc->oldmask);
 112.359 +	err |= __put_user(current->thread.cr2, &sc->cr2);
 112.360 +
 112.361 +	return err;
 112.362 +}
 112.363 +
 112.364 +/*
 112.365 + * Determine which stack to use..
 112.366 + */
 112.367 +static inline void *
 112.368 +get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
 112.369 +{
 112.370 +	unsigned long esp;
 112.371 +
 112.372 +	/* Default to using normal stack */
 112.373 +	esp = regs->esp;
 112.374 +
 112.375 +	/* This is the X/Open sanctioned signal stack switching.  */
 112.376 +	if (ka->sa.sa_flags & SA_ONSTACK) {
 112.377 +		if (sas_ss_flags(esp) == 0)
 112.378 +			esp = current->sas_ss_sp + current->sas_ss_size;
 112.379 +	}
 112.380 +
 112.381 +	/* This is the legacy signal stack switching. */
 112.382 +	else if ((regs->xss & 0xffff) != __USER_DS &&
 112.383 +		 !(ka->sa.sa_flags & SA_RESTORER) &&
 112.384 +		 ka->sa.sa_restorer) {
 112.385 +		esp = (unsigned long) ka->sa.sa_restorer;
 112.386 +	}
 112.387 +
 112.388 +	return (void *)((esp - frame_size) & -8ul);
 112.389 +}
 112.390 +
 112.391 +static void setup_frame(int sig, struct k_sigaction *ka,
 112.392 +			sigset_t *set, struct pt_regs * regs)
 112.393 +{
 112.394 +	struct sigframe *frame;
 112.395 +	int err = 0;
 112.396 +
 112.397 +	frame = get_sigframe(ka, regs, sizeof(*frame));
 112.398 +
 112.399 +	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
 112.400 +		goto give_sigsegv;
 112.401 +
 112.402 +	err |= __put_user((current->exec_domain
 112.403 +		           && current->exec_domain->signal_invmap
 112.404 +		           && sig < 32
 112.405 +		           ? current->exec_domain->signal_invmap[sig]
 112.406 +		           : sig),
 112.407 +		          &frame->sig);
 112.408 +	if (err)
 112.409 +		goto give_sigsegv;
 112.410 +
 112.411 +	err |= setup_sigcontext(&frame->sc, &frame->fpstate, regs, set->sig[0]);
 112.412 +	if (err)
 112.413 +		goto give_sigsegv;
 112.414 +
 112.415 +	if (_NSIG_WORDS > 1) {
 112.416 +		err |= __copy_to_user(frame->extramask, &set->sig[1],
 112.417 +				      sizeof(frame->extramask));
 112.418 +	}
 112.419 +	if (err)
 112.420 +		goto give_sigsegv;
 112.421 +
 112.422 +	/* Set up to return from userspace.  If provided, use a stub
 112.423 +	   already in userspace.  */
 112.424 +	if (ka->sa.sa_flags & SA_RESTORER) {
 112.425 +		err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
 112.426 +	} else {
 112.427 +		err |= __put_user(frame->retcode, &frame->pretcode);
 112.428 +		/* This is popl %eax ; movl $,%eax ; int $0x80 */
 112.429 +		err |= __put_user(0xb858, (short *)(frame->retcode+0));
 112.430 +		err |= __put_user(__NR_sigreturn, (int *)(frame->retcode+2));
 112.431 +		err |= __put_user(0x80cd, (short *)(frame->retcode+6));
 112.432 +	}
 112.433 +
 112.434 +	if (err)
 112.435 +		goto give_sigsegv;
 112.436 +
 112.437 +	/* Set up registers for signal handler */
 112.438 +	regs->esp = (unsigned long) frame;
 112.439 +	regs->eip = (unsigned long) ka->sa.sa_handler;
 112.440 +
 112.441 +	set_fs(USER_DS);
 112.442 +	regs->xds = __USER_DS;
 112.443 +	regs->xes = __USER_DS;
 112.444 +	regs->xss = __USER_DS;
 112.445 +	regs->xcs = __USER_CS;
 112.446 +	regs->eflags &= ~TF_MASK;
 112.447 +
 112.448 +#if DEBUG_SIG
 112.449 +	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
 112.450 +		current->comm, current->pid, frame, regs->eip, frame->pretcode);
 112.451 +#endif
 112.452 +
 112.453 +	return;
 112.454 +
 112.455 +give_sigsegv:
 112.456 +	if (sig == SIGSEGV)
 112.457 +		ka->sa.sa_handler = SIG_DFL;
 112.458 +	force_sig(SIGSEGV, current);
 112.459 +}
 112.460 +
 112.461 +static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
 112.462 +			   sigset_t *set, struct pt_regs * regs)
 112.463 +{
 112.464 +	struct rt_sigframe *frame;
 112.465 +	int err = 0;
 112.466 +
 112.467 +	frame = get_sigframe(ka, regs, sizeof(*frame));
 112.468 +
 112.469 +	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
 112.470 +		goto give_sigsegv;
 112.471 +
 112.472 +	err |= __put_user((current->exec_domain
 112.473 +		    	   && current->exec_domain->signal_invmap
 112.474 +		    	   && sig < 32
 112.475 +		    	   ? current->exec_domain->signal_invmap[sig]
 112.476 +			   : sig),
 112.477 +			  &frame->sig);
 112.478 +	err |= __put_user(&frame->info, &frame->pinfo);
 112.479 +	err |= __put_user(&frame->uc, &frame->puc);
 112.480 +	err |= copy_siginfo_to_user(&frame->info, info);
 112.481 +	if (err)
 112.482 +		goto give_sigsegv;
 112.483 +
 112.484 +	/* Create the ucontext.  */
 112.485 +	err |= __put_user(0, &frame->uc.uc_flags);
 112.486 +	err |= __put_user(0, &frame->uc.uc_link);
 112.487 +	err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
 112.488 +	err |= __put_user(sas_ss_flags(regs->esp),
 112.489 +			  &frame->uc.uc_stack.ss_flags);
 112.490 +	err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
 112.491 +	err |= setup_sigcontext(&frame->uc.uc_mcontext, &frame->fpstate,
 112.492 +			        regs, set->sig[0]);
 112.493 +	err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
 112.494 +	if (err)
 112.495 +		goto give_sigsegv;
 112.496 +
 112.497 +	/* Set up to return from userspace.  If provided, use a stub
 112.498 +	   already in userspace.  */
 112.499 +	if (ka->sa.sa_flags & SA_RESTORER) {
 112.500 +		err |= __put_user(ka->sa.sa_restorer, &frame->pretcode);
 112.501 +	} else {
 112.502 +		err |= __put_user(frame->retcode, &frame->pretcode);
 112.503 +		/* This is movl $,%eax ; int $0x80 */
 112.504 +		err |= __put_user(0xb8, (char *)(frame->retcode+0));
 112.505 +		err |= __put_user(__NR_rt_sigreturn, (int *)(frame->retcode+1));
 112.506 +		err |= __put_user(0x80cd, (short *)(frame->retcode+5));
 112.507 +	}
 112.508 +
 112.509 +	if (err)
 112.510 +		goto give_sigsegv;
 112.511 +
 112.512 +	/* Set up registers for signal handler */
 112.513 +	regs->esp = (unsigned long) frame;
 112.514 +	regs->eip = (unsigned long) ka->sa.sa_handler;
 112.515 +
 112.516 +	set_fs(USER_DS);
 112.517 +	regs->xds = __USER_DS;
 112.518 +	regs->xes = __USER_DS;
 112.519 +	regs->xss = __USER_DS;
 112.520 +	regs->xcs = __USER_CS;
 112.521 +	regs->eflags &= ~TF_MASK;
 112.522 +
 112.523 +#if DEBUG_SIG
 112.524 +	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
 112.525 +		current->comm, current->pid, frame, regs->eip, frame->pretcode);
 112.526 +#endif
 112.527 +
 112.528 +	return;
 112.529 +
 112.530 +give_sigsegv:
 112.531 +	if (sig == SIGSEGV)
 112.532 +		ka->sa.sa_handler = SIG_DFL;
 112.533 +	force_sig(SIGSEGV, current);
 112.534 +}
 112.535 +
 112.536 +/*
 112.537 + * OK, we're invoking a handler
 112.538 + */	
 112.539 +
 112.540 +static void
 112.541 +handle_signal(unsigned long sig, struct k_sigaction *ka,
 112.542 +	      siginfo_t *info, sigset_t *oldset, struct pt_regs * regs)
 112.543 +{
 112.544 +	/* Are we from a system call? */
 112.545 +	if (regs->orig_eax >= 0) {
 112.546 +		/* If so, check system call restarting.. */
 112.547 +		switch (regs->eax) {
 112.548 +			case -ERESTARTNOHAND:
 112.549 +				regs->eax = -EINTR;
 112.550 +				break;
 112.551 +
 112.552 +			case -ERESTARTSYS:
 112.553 +				if (!(ka->sa.sa_flags & SA_RESTART)) {
 112.554 +					regs->eax = -EINTR;
 112.555 +					break;
 112.556 +				}
 112.557 +			/* fallthrough */
 112.558 +			case -ERESTARTNOINTR:
 112.559 +				regs->eax = regs->orig_eax;
 112.560 +				regs->eip -= 2;
 112.561 +		}
 112.562 +	}
 112.563 +
 112.564 +	/* Set up the stack frame */
 112.565 +	if (ka->sa.sa_flags & SA_SIGINFO)
 112.566 +		setup_rt_frame(sig, ka, info, oldset, regs);
 112.567 +	else
 112.568 +		setup_frame(sig, ka, oldset, regs);
 112.569 +
 112.570 +	if (ka->sa.sa_flags & SA_ONESHOT)
 112.571 +		ka->sa.sa_handler = SIG_DFL;
 112.572 +
 112.573 +	if (!(ka->sa.sa_flags & SA_NODEFER)) {
 112.574 +		spin_lock_irq(&current->sigmask_lock);
 112.575 +		sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
 112.576 +		sigaddset(&current->blocked,sig);
 112.577 +		recalc_sigpending(current);
 112.578 +		spin_unlock_irq(&current->sigmask_lock);
 112.579 +	}
 112.580 +}
 112.581 +
 112.582 +/*
 112.583 + * Note that 'init' is a special process: it doesn't get signals it doesn't
 112.584 + * want to handle. Thus you cannot kill init even with a SIGKILL even by
 112.585 + * mistake.
 112.586 + */
 112.587 +int fastcall do_signal(struct pt_regs *regs, sigset_t *oldset)
 112.588 +{
 112.589 +	siginfo_t info;
 112.590 +	struct k_sigaction *ka;
 112.591 +
 112.592 +	/*
 112.593 +	 * We want the common case to go fast, which
 112.594 +	 * is why we may in certain cases get here from
 112.595 +	 * kernel mode. Just return without doing anything
 112.596 +	 * if so.
 112.597 +	 */
 112.598 +	if ((regs->xcs & 2) != 2)
 112.599 +		return 1;
 112.600 +
 112.601 +	if (!oldset)
 112.602 +		oldset = &current->blocked;
 112.603 +
 112.604 +	for (;;) {
 112.605 +		unsigned long signr;
 112.606 +
 112.607 +		spin_lock_irq(&current->sigmask_lock);
 112.608 +		signr = dequeue_signal(&current->blocked, &info);
 112.609 +		spin_unlock_irq(&current->sigmask_lock);
 112.610 +
 112.611 +		if (!signr)
 112.612 +			break;
 112.613 +
 112.614 +		if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) {
 112.615 +			/* Let the debugger run.  */
 112.616 +			current->exit_code = signr;
 112.617 +			current->state = TASK_STOPPED;
 112.618 +			notify_parent(current, SIGCHLD);
 112.619 +			schedule();
 112.620 +
 112.621 +			/* We're back.  Did the debugger cancel the sig?  */
 112.622 +			if (!(signr = current->exit_code))
 112.623 +				continue;
 112.624 +			current->exit_code = 0;
 112.625 +
 112.626 +			/* The debugger continued.  Ignore SIGSTOP.  */
 112.627 +			if (signr == SIGSTOP)
 112.628 +				continue;
 112.629 +
 112.630 +			/* Update the siginfo structure.  Is this good?  */
 112.631 +			if (signr != info.si_signo) {
 112.632 +				info.si_signo = signr;
 112.633 +				info.si_errno = 0;
 112.634 +				info.si_code = SI_USER;
 112.635 +				info.si_pid = current->p_pptr->pid;
 112.636 +				info.si_uid = current->p_pptr->uid;
 112.637 +			}
 112.638 +
 112.639 +			/* If the (new) signal is now blocked, requeue it.  */
 112.640 +			if (sigismember(&current->blocked, signr)) {
 112.641 +				send_sig_info(signr, &info, current);
 112.642 +				continue;
 112.643 +			}
 112.644 +		}
 112.645 +
 112.646 +		ka = &current->sig->action[signr-1];
 112.647 +		if (ka->sa.sa_handler == SIG_IGN) {
 112.648 +			if (signr != SIGCHLD)
 112.649 +				continue;
 112.650 +			/* Check for SIGCHLD: it's special.  */
 112.651 +			while (sys_wait4(-1, NULL, WNOHANG, NULL) > 0)
 112.652 +				/* nothing */;
 112.653 +			continue;
 112.654 +		}
 112.655 +
 112.656 +		if (ka->sa.sa_handler == SIG_DFL) {
 112.657 +			int exit_code = signr;
 112.658 +
 112.659 +			/* Init gets no signals it doesn't want.  */
 112.660 +			if (current->pid == 1)
 112.661 +				continue;
 112.662 +
 112.663 +			switch (signr) {
 112.664 +			case SIGCONT: case SIGCHLD: case SIGWINCH: case SIGURG:
 112.665 +				continue;
 112.666 +
 112.667 +			case SIGTSTP: case SIGTTIN: case SIGTTOU:
 112.668 +				if (is_orphaned_pgrp(current->pgrp))
 112.669 +					continue;
 112.670 +				/* FALLTHRU */
 112.671 +
 112.672 +			case SIGSTOP: {
 112.673 +				struct signal_struct *sig;
 112.674 +				current->state = TASK_STOPPED;
 112.675 +				current->exit_code = signr;
 112.676 +				sig = current->p_pptr->sig;
 112.677 +				if (sig && !(sig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDSTOP))
 112.678 +					notify_parent(current, SIGCHLD);
 112.679 +				schedule();
 112.680 +				continue;
 112.681 +			}
 112.682 +
 112.683 +			case SIGQUIT: case SIGILL: case SIGTRAP:
 112.684 +			case SIGABRT: case SIGFPE: case SIGSEGV:
 112.685 +			case SIGBUS: case SIGSYS: case SIGXCPU: case SIGXFSZ:
 112.686 +				if (do_coredump(signr, regs))
 112.687 +					exit_code |= 0x80;
 112.688 +				/* FALLTHRU */
 112.689 +
 112.690 +			default:
 112.691 +				sig_exit(signr, exit_code, &info);
 112.692 +				/* NOTREACHED */
 112.693 +			}
 112.694 +		}
 112.695 +
 112.696 +		/* Reenable any watchpoints before delivering the
 112.697 +		 * signal to user space. The processor register will
 112.698 +		 * have been cleared if the watchpoint triggered
 112.699 +		 * inside the kernel.
 112.700 +		 */
 112.701 +                if ( current->thread.debugreg[7] != 0 )
 112.702 +                    HYPERVISOR_set_debugreg(7, current->thread.debugreg[7]);
 112.703 +
 112.704 +		/* Whee!  Actually deliver the signal.  */
 112.705 +		handle_signal(signr, ka, &info, oldset, regs);
 112.706 +		return 1;
 112.707 +	}
 112.708 +
 112.709 +	/* Did we come from a system call? */
 112.710 +	if (regs->orig_eax >= 0) {
 112.711 +		/* Restart the system call - no handlers present */
 112.712 +		if (regs->eax == -ERESTARTNOHAND ||
 112.713 +		    regs->eax == -ERESTARTSYS ||
 112.714 +		    regs->eax == -ERESTARTNOINTR) {
 112.715 +			regs->eax = regs->orig_eax;
 112.716 +			regs->eip -= 2;
 112.717 +		}
 112.718 +	}
 112.719 +	return 0;
 112.720 +}
   113.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   113.2 +++ b/linux-2.4.30-xen-sparse/arch/xen/kernel/time.c	Mon Jul 11 14:44:08 2005 +0000
   113.3 @@ -0,0 +1,721 @@
   113.4 +/* -*-  Mode:C; c-basic-offset:4; tab-width:4 -*-
   113.5 + ****************************************************************************
   113.6 + * (C) 2002-2003 - Rolf Neugebauer - Intel Research Cambridge
   113.7 + * (C) 2002-2003 - Keir Fraser - University of Cambridge
   113.8 + ****************************************************************************
   113.9 + *
  113.10 + *        File: arch/xen/kernel/time.c
  113.11 + *      Author: Rolf Neugebauer and Keir Fraser
  113.12 + * 
  113.13 + * Description: Interface with Xen to get correct notion of time
  113.14 + */
  113.15 +
  113.16 +/*
  113.17 + *  linux/arch/i386/kernel/time.c
  113.18 + *
  113.19 + *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
  113.20 + *
  113.21 + * This file contains the PC-specific time handling details:
  113.22 + * reading the RTC at bootup, etc..
  113.23 + * 1994-07-02    Alan Modra
  113.24 + * fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime
  113.25 + * 1995-03-26    Markus Kuhn
  113.26 + *      fixed 500 ms bug at call to set_rtc_mmss, fixed DS12887
  113.27 + *      precision CMOS clock update
  113.28 + * 1996-05-03    Ingo Molnar
  113.29 + *      fixed time warps in do_[slow|fast]_gettimeoffset()
  113.30 + * 1997-09-10 Updated NTP code according to technical memorandum Jan '96
  113.31 + *  "A Kernel Model for Precision Timekeeping" by Dave Mills
  113.32 + * 1998-09-05    (Various)
  113.33 + * More robust do_fast_gettimeoffset() algorithm implemented
  113.34 + * (works with APM, Cyrix 6x86MX and Centaur C6),
  113.35 + * monotonic gettimeofday() with fast_get_timeoffset(),
  113.36 + * drift-proof precision TSC calibration on boot
  113.37 + * (C. Scott Ananian <cananian@alumni.princeton.edu>, Andrew D.
  113.38 + * Balsa <andrebalsa@altern.org>, Philip Gladstone <philip@raptor.com>;
  113.39 + * ported from 2.0.35 Jumbo-9 by Michael Krause <m.krause@tu-harburg.de>).
  113.40 + * 1998-12-16    Andrea Arcangeli
  113.41 + * Fixed Jumbo-9 code in 2.1.131: do_gettimeofday was missing 1 jiffy
  113.42 + * because was not accounting lost_ticks.
  113.43 + * 1998-12-24 Copyright (C) 1998  Andrea Arcangeli
  113.44 + * Fixed a xtime SMP race (we need the xtime_lock rw spinlock to
  113.45 + * serialize accesses to xtime/lost_ticks).
  113.46 + */
  113.47 +
  113.48 +#include <asm/smp.h>
  113.49 +#include <asm/irq.h>
  113.50 +#include <asm/msr.h>
  113.51 +#include <asm/delay.h>
  113.52 +#include <asm/mpspec.h>
  113.53 +#include <asm/uaccess.h>
  113.54 +#include <asm/processor.h>
  113.55 +
  113.56 +#include <asm/div64.h>
  113.57 +#include <asm/hypervisor.h>
  113.58 +#include <asm-xen/xen-public/dom0_ops.h>
  113.59 +
  113.60 +#include <linux/mc146818rtc.h>
  113.61 +#include <linux/kernel.h>
  113.62 +#include <linux/interrupt.h>
  113.63 +#include <linux/time.h>
  113.64 +#include <linux/init.h>
  113.65 +#include <linux/smp.h>
  113.66 +#include <linux/irq.h>
  113.67 +#include <linux/sysctl.h>
  113.68 +#include <linux/sysrq.h>
  113.69 +
  113.70 +spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
  113.71 +extern rwlock_t xtime_lock;
  113.72 +extern unsigned long wall_jiffies;
  113.73 +
  113.74 +unsigned long cpu_khz; /* get this from Xen, used elsewhere */
  113.75 +
  113.76 +static unsigned int rdtsc_bitshift;
  113.77 +static u32 st_scale_f; /* convert ticks -> usecs */
  113.78 +static u32 st_scale_i; /* convert ticks -> usecs */
  113.79 +
  113.80 +/* These are peridically updated in shared_info, and then copied here. */
  113.81 +static u32 shadow_tsc_stamp;
  113.82 +static u64 shadow_system_time;
  113.83 +static u32 shadow_time_version;
  113.84 +static struct timeval shadow_tv;
  113.85 +
  113.86 +/*
  113.87 + * We use this to ensure that gettimeofday() is monotonically increasing. We
  113.88 + * only break this guarantee if the wall clock jumps backwards "a long way".
  113.89 + */
  113.90 +static struct timeval last_seen_tv = {0,0};
  113.91 +
  113.92 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  113.93 +/* Periodically propagate synchronised time base to the RTC and to Xen. */
  113.94 +static long last_update_to_rtc, last_update_to_xen;
  113.95 +#endif
  113.96 +
  113.97 +/* Periodically take synchronised time base from Xen, if we need it. */
  113.98 +static long last_update_from_xen;   /* UTC seconds when last read Xen clock. */
  113.99 +
 113.100 +/* Keep track of last time we did processing/updating of jiffies and xtime. */
 113.101 +static u64 processed_system_time;   /* System time (ns) at last processing. */
 113.102 +
 113.103 +#define NS_PER_TICK (1000000000ULL/HZ)
 113.104 +
 113.105 +#ifndef NSEC_PER_SEC
 113.106 +#define NSEC_PER_SEC (1000000000L)
 113.107 +#endif
 113.108 +
 113.109 +#define HANDLE_USEC_UNDERFLOW(_tv)         \
 113.110 +    do {                                   \
 113.111 +        while ( (_tv).tv_usec < 0 )        \
 113.112 +        {                                  \
 113.113 +            (_tv).tv_usec += 1000000;      \
 113.114 +            (_tv).tv_sec--;                \
 113.115 +        }                                  \
 113.116 +    } while ( 0 )
 113.117 +#define HANDLE_USEC_OVERFLOW(_tv)          \
 113.118 +    do {                                   \
 113.119 +        while ( (_tv).tv_usec >= 1000000 ) \
 113.120 +        {                                  \
 113.121 +            (_tv).tv_usec -= 1000000;      \
 113.122 +            (_tv).tv_sec++;                \
 113.123 +        }                                  \
 113.124 +    } while ( 0 )
 113.125 +static inline void __normalize_time(time_t *sec, s64 *nsec)
 113.126 +{
 113.127 +	while (*nsec >= NSEC_PER_SEC) {
 113.128 +		(*nsec) -= NSEC_PER_SEC;
 113.129 +		(*sec)++;
 113.130 +	}
 113.131 +	while (*nsec < 0) {
 113.132 +		(*nsec) += NSEC_PER_SEC;
 113.133 +		(*sec)--;
 113.134 +	}
 113.135 +}
 113.136 +
 113.137 +/* Dynamically-mapped IRQs. */
 113.138 +static int time_irq, debug_irq;
 113.139 +
 113.140 +/* Does this guest OS track Xen time, or set its wall clock independently? */
 113.141 +static int independent_wallclock = 0;
 113.142 +static int __init __independent_wallclock(char *str)
 113.143 +{
 113.144 +    independent_wallclock = 1;
 113.145 +    return 1;
 113.146 +}
 113.147 +__setup("independent_wallclock", __independent_wallclock);
 113.148 +#define INDEPENDENT_WALLCLOCK() \
 113.149 +    (independent_wallclock || (xen_start_info.flags & SIF_INITDOMAIN))
 113.150 +
 113.151 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
 113.152 +/*
 113.153 + * In order to set the CMOS clock precisely, set_rtc_mmss has to be
 113.154 + * called 500 ms after the second nowtime has started, because when
 113.155 + * nowtime is written into the registers of the CMOS clock, it will
 113.156 + * jump to the next second precisely 500 ms later. Check the Motorola
 113.157 + * MC146818A or Dallas DS12887 data sheet for details.
 113.158 + *
 113.159 + * BUG: This routine does not handle hour overflow properly; it just
 113.160 + *      sets the minutes. Usually you'll only notice that after reboot!
 113.161 + */
 113.162 +static int set_rtc_mmss(unsigned long nowtime)
 113.163 +{
 113.164 +    int retval = 0;
 113.165 +    int real_seconds, real_minutes, cmos_minutes;
 113.166 +    unsigned char save_control, save_freq_select;
 113.167 +
 113.168 +    /* gets recalled with irq locally disabled */
 113.169 +    spin_lock(&rtc_lock);
 113.170 +    save_control = CMOS_READ(RTC_CONTROL);
 113.171 +    CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL);
 113.172 +
 113.173 +    save_freq_select = CMOS_READ(RTC_FREQ_SELECT);
 113.174 +    CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT);
 113.175 +
 113.176 +    cmos_minutes = CMOS_READ(RTC_MINUTES);
 113.177 +    if ( !(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD )
 113.178 +        BCD_TO_BIN(cmos_minutes);
 113.179 +
 113.180 +    /*
 113.181 +     * since we're only adjusting minutes and seconds, don't interfere with
 113.182 +     * hour overflow. This avoids messing with unknown time zones but requires
 113.183 +     * your RTC not to be off by more than 15 minutes
 113.184 +     */
 113.185 +    real_seconds = nowtime % 60;
 113.186 +    real_minutes = nowtime / 60;
 113.187 +    if ( ((abs(real_minutes - cmos_minutes) + 15)/30) & 1 )
 113.188 +        real_minutes += 30;  /* correct for half hour time zone */
 113.189 +    real_minutes %= 60;
 113.190 +
 113.191 +    if ( abs(real_minutes - cmos_minutes) < 30 )
 113.192 +    {
 113.193 +        if ( !(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD )
 113.194 +        {
 113.195 +            BIN_TO_BCD(real_seconds);
 113.196 +            BIN_TO_BCD(real_minutes);
 113.197 +        }
 113.198 +        CMOS_WRITE(real_seconds,RTC_SECONDS);
 113.199 +        CMOS_WRITE(real_minutes,RTC_MINUTES);
 113.200 +    }
 113.201 +    else 
 113.202 +    {
 113.203 +        printk(KERN_WARNING
 113.204 +               "set_rtc_mmss: can't update from %d to %d\n",
 113.205 +               cmos_minutes, real_minutes);
 113.206 +        retval = -1;
 113.207 +    }
 113.208 +
 113.209 +    /* The following flags have to be released exactly in this order,
 113.210 +     * otherwise the DS12887 (popular MC146818A clone with integrated
 113.211 +     * battery and quartz) will not reset the oscillator and will not
 113.212 +     * update precisely 500 ms later. You won't find this mentioned in
 113.213 +     * the Dallas Semiconductor data sheets, but who believes data
 113.214 +     * sheets anyway ...                           -- Markus Kuhn
 113.215 +     */
 113.216 +    CMOS_WRITE(save_control, RTC_CONTROL);
 113.217 +    CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
 113.218 +    spin_unlock(&rtc_lock);
 113.219 +
 113.220 +    return retval;
 113.221 +}
 113.222 +#endif
 113.223 +
 113.224 +
 113.225 +/*
 113.226 + * Reads a consistent set of time-base values from Xen, into a shadow data
 113.227 + * area. Must be called with the xtime_lock held for writing.
 113.228 + */
 113.229 +static void __get_time_values_from_xen(void)
 113.230 +{
 113.231 +    do {
 113.232 +        shadow_time_version = HYPERVISOR_shared_info->time_version2;
 113.233 +        rmb();
 113.234 +        shadow_tv.tv_sec    = HYPERVISOR_shared_info->wc_sec;
 113.235 +        shadow_tv.tv_usec   = HYPERVISOR_shared_info->wc_usec;
 113.236 +        shadow_tsc_stamp    = 
 113.237 +            (u32)(HYPERVISOR_shared_info->tsc_timestamp >> rdtsc_bitshift);
 113.238 +        shadow_system_time  = HYPERVISOR_shared_info->system_time;
 113.239 +        rmb();
 113.240 +    }
 113.241 +    while ( shadow_time_version != HYPERVISOR_shared_info->time_version1 );
 113.242 +}
 113.243 +
 113.244 +#define TIME_VALUES_UP_TO_DATE \
 113.245 + ({ rmb(); (shadow_time_version == HYPERVISOR_shared_info->time_version2); })
 113.246 +
 113.247 +
 113.248 +/*
 113.249 + * Returns the system time elapsed, in ns, since the current shadow_timestamp
 113.250 + * was calculated. Must be called with the xtime_lock held for reading.
 113.251 + */
 113.252 +static inline unsigned long __get_time_delta_usecs(void)
 113.253 +{
 113.254 +    s32      delta_tsc;
 113.255 +    u32      low;
 113.256 +    u64      delta, tsc;
 113.257 +
 113.258 +    rdtscll(tsc);
 113.259 +    low = (u32)(tsc >> rdtsc_bitshift);
 113.260 +    delta_tsc = (s32)(low - shadow_tsc_stamp);
 113.261 +    if ( unlikely(delta_tsc < 0) ) delta_tsc = 0;
 113.262 +    delta = ((u64)delta_tsc * st_scale_f);
 113.263 +    delta >>= 32;
 113.264 +    delta += ((u64)delta_tsc * st_scale_i);
 113.265 +
 113.266 +    return (unsigned long)delta;
 113.267 +}
 113.268 +
 113.269 +
 113.270 +/*
 113.271 + * Returns the current time-of-day in UTC timeval format.
 113.272 + */
 113.273 +void do_gettimeofday(struct timeval *tv)
 113.274 +{
 113.275 +    unsigned long flags, lost;
 113.276 +    struct timeval _tv;
 113.277 +    s64 nsec;
 113.278 +
 113.279 + again:
 113.280 +    read_lock_irqsave(&xtime_lock, flags);
 113.281 +
 113.282 +    _tv.tv_usec = __get_time_delta_usecs();
 113.283 +    if ( (lost = (jiffies - wall_jiffies)) != 0 )
 113.284 +        _tv.tv_usec += lost * (1000000 / HZ);
 113.285 +    _tv.tv_sec   = xtime.tv_sec;
 113.286 +    _tv.tv_usec += xtime.tv_usec;
 113.287 +
 113.288 +    nsec = shadow_system_time - processed_system_time;
 113.289 +    __normalize_time(&_tv.tv_sec, &nsec);
 113.290 +    _tv.tv_usec += (long)nsec / 1000L;
 113.291 +
 113.292 +    if ( unlikely(!TIME_VALUES_UP_TO_DATE) )
 113.293 +    {
 113.294 +        /*
 113.295 +         * We may have blocked for a long time, rendering our calculations
 113.296 +         * invalid (e.g. the time delta may have overflowed). Detect that
 113.297 +         * and recalculate with fresh values.
 113.298 +         */
 113.299 +        read_unlock_irqrestore(&xtime_lock, flags);
 113.300 +        write_lock_irqsave(&xtime_lock, flags);
 113.301 +        __get_time_values_from_xen();
 113.302 +        write_unlock_irqrestore(&xtime_lock, flags);
 113.303 +        goto again;
 113.304 +    }
 113.305 +
 113.306 +    HANDLE_USEC_OVERFLOW(_tv);
 113.307 +
 113.308 +    /* Ensure that time-of-day is monotonically increasing. */
 113.309 +    if ( (_tv.tv_sec < last_seen_tv.tv_sec) ||
 113.310 +         ((_tv.tv_sec == last_seen_tv.tv_sec) &&
 113.311 +          (_tv.tv_usec < last_seen_tv.tv_usec)) )
 113.312 +        _tv = last_seen_tv;
 113.313 +    last_seen_tv = _tv;
 113.314 +
 113.315 +    read_unlock_irqrestore(&xtime_lock, flags);
 113.316 +
 113.317 +    *tv = _tv;
 113.318 +}
 113.319 +
 113.320 +
 113.321 +/*
 113.322 + * Sets the current time-of-day based on passed-in UTC timeval parameter.
 113.323 + */
 113.324 +void do_settimeofday(struct timeval *tv)
 113.325 +{
 113.326 +    struct timeval newtv;
 113.327 +    s64            nsec;
 113.328 +    suseconds_t    usec;
 113.329 +    
 113.330 +    if ( !INDEPENDENT_WALLCLOCK() )
 113.331 +        return;
 113.332 +    
 113.333 +    write_lock_irq(&xtime_lock);
 113.334 +    
 113.335 +    /*
 113.336 +     * Ensure we don't get blocked for a long time so that our time delta
 113.337 +     * overflows. If that were to happen then our shadow time values would
 113.338 +     * be stale, so we can retry with fresh ones.
 113.339 +     */
 113.340 + again:
 113.341 +    usec = tv->tv_usec - __get_time_delta_usecs();
 113.342 +
 113.343 +    nsec = shadow_system_time - processed_system_time;
 113.344 +    __normalize_time(&tv->tv_sec, &nsec);
 113.345 +    usec -= (long)nsec / 1000L;
 113.346 +
 113.347 +    if ( unlikely(!TIME_VALUES_UP_TO_DATE) )
 113.348 +    {
 113.349 +        __get_time_values_from_xen();
 113.350 +        goto again;
 113.351 +    }
 113.352 +    tv->tv_usec = usec;
 113.353 +    
 113.354 +    HANDLE_USEC_UNDERFLOW(*tv);
 113.355 +    
 113.356 +    newtv = *tv;
 113.357 +    
 113.358 +    tv->tv_usec -= (jiffies - wall_jiffies) * (1000000 / HZ);
 113.359 +    HANDLE_USEC_UNDERFLOW(*tv);
 113.360 +
 113.361 +    xtime = *tv;
 113.362 +    time_adjust = 0;  /* stop active adjtime() */
 113.363 +    ti