From: Konrad Rzeszutek Wilk Date: Fri, 11 May 2012 18:40:21 +0000 (-0400) Subject: Merge branch 'stable/for-linus-3.5.rebased' into uek2-merge X-Git-Tag: v2.6.39-400.9.0~543^2~9 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7176b411e3b21919c286e26ea1c0a235c3665e04;p=users%2Fjedix%2Flinux-maple.git Merge branch 'stable/for-linus-3.5.rebased' into uek2-merge * stable/for-linus-3.5.rebased: (22 commits) x86/apic: Fix UP boot crash xen/apic: implement io apic read with hypercall xen/x86: Implement x86_apic_ops x86/apic: Replace io_apic_ops with x86_io_apic_ops. x86/ioapic: Add io_apic_ops driver layer to allow interception xen: implement IRQ_WORK_VECTOR handler xen: implement apic ipi interface xen/gnttab: add deferred freeing logic xen: enter/exit lazy_mmu_mode around m2p_override calls xen/setup: update VA mapping when releasing memory during setup xen/setup: Combine the two hypercall functions - since they are quite similar. xen/setup: Populate freed MFNs from non-RAM E820 entries and gaps to E820 RAM xen/setup: Only print "Freeing XXX-YYY pfn range: Z pages freed" if Z > 0 xen/p2m: An early bootup variant of set_phys_to_machine xen/p2m: Collapse early_alloc_p2m_middle redundant checks. xen/p2m: Allow alloc_p2m_middle to call reserve_brk depending on argument xen/p2m: Move code around to allow for better re-usage. xen: only limit memory map to maximum reservation for domain 0. xen: release all pages within 1-1 p2m mappings xen: allow extra memory to be in multiple regions ... Conflicts: arch/x86/xen/Makefile arch/x86/xen/enlighten.c arch/x86/xen/setup.c arch/x86/xen/xen-ops.h include/xen/page.h --- 7176b411e3b21919c286e26ea1c0a235c3665e04 diff --cc arch/x86/include/asm/x86_init.h index 7af18bea97e7,2806b487b148..94997b5a54f6 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h @@@ -174,9 -174,15 +174,16 @@@ struct x86_msi_ops int (*setup_msi_irqs)(struct pci_dev *dev, int nvec, int type); void (*teardown_msi_irq)(unsigned int irq); void (*teardown_msi_irqs)(struct pci_dev *dev); + void (*restore_msi_irqs)(struct pci_dev *dev, int irq); }; + struct x86_io_apic_ops { + void (*init) (void); + unsigned int (*read) (unsigned int apic, unsigned int reg); + void (*write) (unsigned int apic, unsigned int reg, unsigned int value); + void (*modify)(unsigned int apic, unsigned int reg, unsigned int value); + }; + extern struct x86_init_ops x86_init; extern struct x86_cpuinit_ops x86_cpuinit; extern struct x86_platform_ops x86_platform; diff --cc arch/x86/kernel/x86_init.c index bd1fe10b174f,7d2eb7cb4616..9b108581dae6 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c @@@ -110,5 -111,11 +111,12 @@@ struct x86_msi_ops x86_msi = .setup_msi_irqs = native_setup_msi_irqs, .teardown_msi_irq = native_teardown_msi_irq, .teardown_msi_irqs = default_teardown_msi_irqs, + .restore_msi_irqs = default_restore_msi_irqs, }; + + struct x86_io_apic_ops x86_io_apic_ops = { + .init = native_io_apic_init_mappings, + .read = native_io_apic_read, + .write = native_io_apic_write, + .modify = native_io_apic_modify, + }; diff --cc arch/x86/xen/Makefile index add2c2d729ce,43e1708b7067..ab517ee88f9a --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@@ -20,5 -20,5 +20,5 @@@ obj-$(CONFIG_EVENT_TRACING) += trace. obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o obj-$(CONFIG_XEN_DEBUG_FS) += debugfs.o - obj-$(CONFIG_XEN_DOM0) += vga.o -obj-$(CONFIG_XEN_DOM0) += apic.o ++obj-$(CONFIG_XEN_DOM0) += vga.o apic.o obj-$(CONFIG_SWIOTLB_XEN) += pci-swiotlb-xen.o diff --cc arch/x86/xen/enlighten.c index bf28d69672c5,fdbd5871ee71..67fc3ba8b23c --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@@ -63,18 -62,11 +63,19 @@@ #include #include #include +#include #include +#ifdef CONFIG_ACPI +#include +#include +#include +#include +#endif + #include "xen-ops.h" #include "mmu.h" + #include "smp.h" #include "multicalls.h" EXPORT_SYMBOL_GPL(hypercall_page); @@@ -1401,8 -1309,6 +1409,9 @@@ asmlinkage void __init xen_start_kernel /* Make sure ACS will be enabled */ pci_request_acs(); - ++ ++ xen_init_apic(); + xen_acpi_sleep_register(); } #ifdef CONFIG_PCI /* PCI BIOS service won't work from a PV guest. */ diff --cc arch/x86/xen/setup.c index 701b464590ca,9703e3dd3339..1131adaec530 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c @@@ -245,7 -347,7 +352,6 @@@ char * __init xen_memory_setup(void /* Make sure the Xen-supplied memory map is well-ordered. */ sanitize_e820_map(map, memmap.nr_entries, &memmap.nr_entries); -- max_pages = xen_get_max_pages(); if (max_pages > max_pfn) extra_pages += max_pages - max_pfn; diff --cc arch/x86/xen/xen-ops.h index b095739ccd4c,75e779ccad5b..202d4c150154 --- a/arch/x86/xen/xen-ops.h +++ b/arch/x86/xen/xen-ops.h @@@ -88,17 -87,10 +87,21 @@@ static inline void xen_uninit_lock_cpu( } #endif +struct dom0_vga_console_info; + +#ifdef CONFIG_XEN_DOM0 +void __init xen_init_vga(const struct dom0_vga_console_info *, size_t size); + void __init xen_init_apic(void); +#else +static inline void __init xen_init_vga(const struct dom0_vga_console_info *info, + size_t size) { } + static inline void __init xen_init_apic(void) ++{ ++} +#endif + /* Declare an asm function, along with symbols needed to make it inlineable */ #define DECL_ASM(ret, name, ...) \