From: Konrad Rzeszutek Wilk Date: Thu, 2 Feb 2012 19:11:52 +0000 (-0500) Subject: Merge branch 'stable/bug.fixes-3.2.rebased' into stable/for-linus-3.3.rebased X-Git-Tag: v2.6.39-400.9.0~595^2~14^2~21 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5b8a96e0d89fd8183f7f1a8c283b812f3bc99b5a;p=users%2Fjedix%2Flinux-maple.git Merge branch 'stable/bug.fixes-3.2.rebased' into stable/for-linus-3.3.rebased * stable/bug.fixes-3.2.rebased: xen: Remove hanging references to CONFIG_XEN_PLATFORM_PCI xen/irq: If we fail during msi_capability_init return proper error code. xen: remove XEN_PLATFORM_PCI config option xen: XEN_PVHVM depends on PCI xen/p2m/debugfs: Make type_name more obvious. xen/p2m/debugfs: Fix potential pointer exception. xen/enlighten: Fix compile warnings and set cx to known value. xen/xenbus: Remove the unnecessary check. xen/events: Don't check the info for NULL as it is already done. xen/pci: Use 'acpi_gsi_to_irq' value unconditionally. xen/pci: Remove 'xen_allocate_pirq_gsi'. xen/pci: Retire unnecessary #ifdef CONFIG_ACPI xen/pci: Move the allocation of IRQs when there are no IOAPIC's to the end xen/pci: Squash pci_xen_initial_domain and xen_setup_pirqs together. xen/pci: Use the xen_register_pirq for HVM and initial domain users xen/pci: In xen_register_pirq bind the GSI to the IRQ after the hypercall. xen/pci: Provide #ifdef CONFIG_ACPI to easy code squashing. xen/pci: Update comments and fix empty spaces. xen/pci: Shuffle code around. Conflicts: drivers/xen/Makefile --- 5b8a96e0d89fd8183f7f1a8c283b812f3bc99b5a diff --cc arch/x86/xen/p2m.c index a8ee9a45c359,795e003517e1..1b267e75158d --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c @@@ -840,14 -782,11 +840,12 @@@ unsigned long m2p_find_override_pfn(uns EXPORT_SYMBOL_GPL(m2p_find_override_pfn); #ifdef CONFIG_XEN_DEBUG_FS - -int p2m_dump_show(struct seq_file *m, void *v) +#include +#include "debugfs.h" +static int p2m_dump_show(struct seq_file *m, void *v) { static const char * const level_name[] = { "top", "middle", - "entry", "abnormal" }; - static const char * const type_name[] = { "identity", "missing", - "pfn", "abnormal"}; + "entry", "abnormal", "error"}; #define TYPE_IDENTITY 0 #define TYPE_MISSING 1 #define TYPE_PFN 2 diff --cc drivers/xen/Makefile index 69f54ff18f40,7c5c64fe52a2..51ba5d582154 --- a/drivers/xen/Makefile +++ b/drivers/xen/Makefile @@@ -14,10 -14,9 +14,10 @@@ obj-$(CONFIG_XEN_GNTDEV) += xen-gntdev obj-$(CONFIG_XEN_GRANT_DEV_ALLOC) += xen-gntalloc.o obj-$(CONFIG_XENFS) += xenfs/ obj-$(CONFIG_XEN_SYS_HYPERVISOR) += sys-hypervisor.o - obj-$(CONFIG_XEN_PLATFORM_PCI) += xen-platform-pci.o + obj-$(CONFIG_XEN_PVHVM) += platform-pci.o obj-$(CONFIG_SWIOTLB_XEN) += swiotlb-xen.o obj-$(CONFIG_XEN_DOM0) += pci.o +obj-$(CONFIG_XEN_PRIVCMD) += xen-privcmd.o xen-evtchn-y := evtchn.o xen-gntdev-y := gntdev.o diff --cc drivers/xen/events.c index f3ea75e53e08,2774006f32da..76ee6fa022c9 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@@ -718,10 -711,10 +714,10 @@@ int xen_bind_pirq_msi_to_irq(struct pci { int irq, ret; - spin_lock(&irq_mapping_update_lock); + mutex_lock(&irq_mapping_update_lock); irq = xen_allocate_irq_dynamic(); - if (irq == -1) + if (irq < 0) goto out; irq_set_chip_and_handler_name(irq, &xen_pirq_chip, handle_edge_irq, @@@ -732,12 -725,12 +728,12 @@@ if (ret < 0) goto error_irq; out: - spin_unlock(&irq_mapping_update_lock); + mutex_unlock(&irq_mapping_update_lock); return irq; error_irq: - spin_unlock(&irq_mapping_update_lock); + mutex_unlock(&irq_mapping_update_lock); xen_free_irq(irq); - return -1; + return ret; } #endif @@@ -784,10 -777,10 +780,10 @@@ int xen_irq_from_pirq(unsigned pirq struct irq_info *info; - spin_lock(&irq_mapping_update_lock); + mutex_lock(&irq_mapping_update_lock); list_for_each_entry(info, &xen_irq_list_head, list) { - if (info == NULL || info->type != IRQT_PIRQ) + if (info->type != IRQT_PIRQ) continue; irq = info->irq; if (info->u.pirq.pirq == pirq)