diff -r 4e78528e3480 linux-2.6-xen-sparse/arch/ia64/Kconfig --- a/linux-2.6-xen-sparse/arch/ia64/Kconfig Tue Jun 06 09:11:25 2006 -0600 +++ b/linux-2.6-xen-sparse/arch/ia64/Kconfig Tue Jun 06 14:08:35 2006 -0600 @@ -56,13 +56,6 @@ config XEN help Enable Xen hypervisor support. Resulting kernel runs both as a guest OS on Xen and natively on hardware. - -config ARCH_XEN - bool - default y - depends on XEN - help - TEMP ONLY. Needs to be on for drivers/xen to build. config XEN_IA64_DOM0_VP bool "dom0 vp model" diff -r 4e78528e3480 linux-2.6-xen-sparse/arch/ia64/kernel/iosapic.c --- a/linux-2.6-xen-sparse/arch/ia64/kernel/iosapic.c Tue Jun 06 09:11:25 2006 -0600 +++ b/linux-2.6-xen-sparse/arch/ia64/kernel/iosapic.c Tue Jun 06 14:08:35 2006 -0600 @@ -670,10 +670,8 @@ register_intr (unsigned int gsi, int vec iosapic_intr_info[vector].dmode = delivery; iosapic_intr_info[vector].trigger = trigger; -#ifdef CONFIG_XEN if (is_running_on_xen()) return 0; -#endif if (trigger == IOSAPIC_EDGE) irq_type = &irq_type_iosapic_edge; @@ -1017,10 +1015,9 @@ iosapic_system_init (int system_pcat_com } pcat_compat = system_pcat_compat; -#ifdef CONFIG_XEN if (is_running_on_xen()) return; -#endif + if (pcat_compat) { /* * Disable the compatibility mode interrupts (8259 style), needs IN/OUT support diff -r 4e78528e3480 linux-2.6-xen-sparse/arch/ia64/kernel/irq_ia64.c --- a/linux-2.6-xen-sparse/arch/ia64/kernel/irq_ia64.c Tue Jun 06 09:11:25 2006 -0600 +++ b/linux-2.6-xen-sparse/arch/ia64/kernel/irq_ia64.c Tue Jun 06 14:08:35 2006 -0600 @@ -66,11 +66,13 @@ assign_irq_vector (int irq) assign_irq_vector (int irq) { int pos, vector; -#ifdef CONFIG_XEN - extern int xen_assign_irq_vector(int); - if (is_running_on_xen()) + +#ifdef CONFIG_XEN + if (is_running_on_xen()) { + extern int xen_assign_irq_vector(int); return xen_assign_irq_vector(irq); -#endif /* CONFIG_XEN */ + } +#endif again: pos = find_first_zero_bit(ia64_vector_mask, IA64_NUM_DEVICE_VECTORS); vector = IA64_FIRST_DEVICE_VECTOR + pos; diff -r 4e78528e3480 linux-2.6-xen-sparse/arch/ia64/kernel/setup.c --- a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c Tue Jun 06 09:11:25 2006 -0600 +++ b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c Tue Jun 06 14:08:35 2006 -0600 @@ -416,6 +416,7 @@ setup_arch (char **cmdline_p) setup_arch (char **cmdline_p) { unw_init(); + #ifdef CONFIG_XEN if (is_running_on_xen()) setup_xen_features(); @@ -933,6 +934,7 @@ cpu_init (void) /* size of physical stacked register partition plus 8 bytes: */ __get_cpu_var(ia64_phys_stacked_size_p8) = num_phys_stacked*8 + 8; platform_cpu_init(); + #ifdef CONFIG_XEN /* Need to be moved into platform_cpu_init later */ if (is_running_on_xen()) { @@ -940,6 +942,7 @@ cpu_init (void) xen_smp_intr_init(); } #endif + pm_idle = default_idle; } diff -r 4e78528e3480 linux-2.6-xen-sparse/arch/ia64/xen/drivers/Makefile --- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/Makefile Tue Jun 06 09:11:25 2006 -0600 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/Makefile Tue Jun 06 14:08:35 2006 -0600 @@ -17,6 +17,5 @@ obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += blk obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += blkfront/ obj-$(CONFIG_XEN_NETDEV_FRONTEND) += netfront/ obj-$(CONFIG_XEN_BLKDEV_TAP) += blktap/ -obj-$(CONFIG_XEN_TPMDEV_FRONTEND) += tpmfront/ obj-$(CONFIG_XEN_PCIDEV_BACKEND) += pciback/ obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += pcifront/ diff -r 4e78528e3480 linux-2.6-xen-sparse/include/asm-ia64/dma-mapping.h --- a/linux-2.6-xen-sparse/include/asm-ia64/dma-mapping.h Tue Jun 06 09:11:25 2006 -0600 +++ b/linux-2.6-xen-sparse/include/asm-ia64/dma-mapping.h Tue Jun 06 14:08:35 2006 -0600 @@ -8,9 +8,10 @@ #include #include #ifdef CONFIG_XEN_IA64_DOM0_VP -#include //XXX to compile arch/i386/kernel/swiotlb.c - // and arch/i386/kernel/pci-dma-xen.c -#include //XXX to compile arch/i386/kernel/swiotlb.c +/* Needed for arch/i386/kernel/swiotlb.c and arch/i386/kernel/pci-dma-xen.c */ +#include +/* Needed for arch/i386/kernel/swiotlb.c */ +#include #endif #ifndef CONFIG_XEN_IA64_DOM0_VP @@ -109,7 +110,7 @@ dma_cache_sync (void *vaddr, size_t size #define dma_is_consistent(dma_handle) (1) /* all we do is coherent memory... */ #ifdef CONFIG_XEN_IA64_DOM0_VP -// arch/i386/kernel/swiotlb.o requires +/* arch/i386/kernel/swiotlb.o requires */ void contiguous_bitmap_init(unsigned long end_pfn); static inline int diff -r 4e78528e3480 linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h --- a/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h Tue Jun 06 09:11:25 2006 -0600 +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h Tue Jun 06 14:08:35 2006 -0600 @@ -33,6 +33,15 @@ #ifndef __HYPERVISOR_H__ #define __HYPERVISOR_H__ +#ifndef CONFIG_XEN +#define is_running_on_xen() (0) +#define HYPERVISOR_ioremap(offset, size) (offset) +#else +extern int running_on_xen; +#define is_running_on_xen() (running_on_xen) +#endif + +#ifdef CONFIG_XEN #include #include #include @@ -46,7 +55,6 @@ #include #include #include -#include // for is_running_on_xen() extern shared_info_t *HYPERVISOR_shared_info; extern start_info_t *xen_start_info; @@ -192,5 +200,6 @@ asmlinkage int xprintk(const char *fmt, asmlinkage int xprintk(const char *fmt, ...); #define xprintd(fmt, ...) xprintk("%s:%d " fmt, __func__, __LINE__, \ ##__VA_ARGS__) +#endif /* CONFIG_XEN */ #endif /* __HYPERVISOR_H__ */ diff -r 4e78528e3480 linux-2.6-xen-sparse/include/asm-ia64/io.h --- a/linux-2.6-xen-sparse/include/asm-ia64/io.h Tue Jun 06 09:11:25 2006 -0600 +++ b/linux-2.6-xen-sparse/include/asm-ia64/io.h Tue Jun 06 14:08:35 2006 -0600 @@ -66,15 +66,13 @@ extern unsigned int num_io_spaces; #define PIO_RESERVED __IA64_UNCACHED_OFFSET #define HAVE_ARCH_PIO_SIZE +#include #include #include #include +#include #include #include -#ifdef CONFIG_XEN -#include -#include -#endif /* * Change virtual addresses to physical addresses and vv. @@ -115,11 +113,13 @@ extern int valid_mmap_phys_addr_range (u #define page_to_pseudophys(page) \ ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) -// XXX -// the following drivers are broken because they use page_to_phys() to -// get bus address. fix them. -// drivers/ide/cris/ide-cris.c -// drivers/scsi/dec_esp.c + +/* + * Drivers that use page_to_phys() for bus addresses are broken. + * This includes: + * drivers/ide/cris/ide-cris.c + * drivers/scsi/dec_esp.c + */ #define page_to_phys(page) (page_to_pseudophys(page)) #define bvec_to_bus(bv) (page_to_bus((bv)->bv_page) + \ (unsigned long) (bv)->bv_offset) @@ -459,9 +459,7 @@ static inline void __iomem * static inline void __iomem * ioremap (unsigned long offset, unsigned long size) { -#ifdef CONFIG_XEN offset = HYPERVISOR_ioremap(offset, size); -#endif return (void __iomem *) (__IA64_UNCACHED_OFFSET | (offset)); } diff -r 4e78528e3480 linux-2.6-xen-sparse/include/asm-ia64/page.h --- a/linux-2.6-xen-sparse/include/asm-ia64/page.h Tue Jun 06 09:11:25 2006 -0600 +++ b/linux-2.6-xen-sparse/include/asm-ia64/page.h Tue Jun 06 14:08:35 2006 -0600 @@ -237,10 +237,12 @@ get_order (unsigned long size) #include // to compile netback, netfront typedef unsigned long maddr_t; // to compile netback, netfront -// XXX hack! -// Linux/IA64 uses PG_arch_1. -// This hack will be removed once PG_foreign bit is taken. -//#include +/* + * XXX hack! + * Linux/IA64 uses PG_arch_1. + * This hack will be removed once PG_foreign bit is taken. + * #include + */ #ifdef __ASM_XEN_FOREIGN_PAGE_H__ # error "don't include include/xen/foreign_page.h!" #endif @@ -272,7 +274,7 @@ extern struct address_space xen_ia64_for }) #define HAVE_ARCH_FREE_PAGE -//XXX xen page size != page size +/* XXX xen page size != page size */ static inline unsigned long pfn_to_mfn_for_dma(unsigned long pfn) @@ -316,7 +318,7 @@ machine_to_phys_for_dma(unsigned long ma #define set_phys_to_machine(pfn, mfn) do { } while (0) #define xen_machphys_update(mfn, pfn) do { } while (0) -//XXX to compile set_phys_to_machine(vaddr, FOREIGN_FRAME(m)) +/* XXX to compile set_phys_to_machine(vaddr, FOREIGN_FRAME(m)) */ #define FOREIGN_FRAME(m) (INVALID_P2M_ENTRY) #define mfn_to_pfn(mfn) (mfn) diff -r 4e78528e3480 linux-2.6-xen-sparse/include/asm-ia64/privop.h --- a/linux-2.6-xen-sparse/include/asm-ia64/privop.h Tue Jun 06 09:11:25 2006 -0600 +++ b/linux-2.6-xen-sparse/include/asm-ia64/privop.h Tue Jun 06 14:08:35 2006 -0600 @@ -7,7 +7,6 @@ * */ -#include #ifdef CONFIG_XEN #include #endif diff -r 4e78528e3480 linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h --- a/linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h Tue Jun 06 09:11:25 2006 -0600 +++ b/linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h Tue Jun 06 14:08:35 2006 -0600 @@ -44,9 +44,6 @@ #endif #ifndef __ASSEMBLY__ -extern int running_on_xen; -#define is_running_on_xen() running_on_xen - #define XEN_HYPER_SSM_I asm("break %0" : : "i" (HYPERPRIVOP_SSM_I)) #define XEN_HYPER_GET_IVR asm("break %0" : : "i" (HYPERPRIVOP_GET_IVR))