aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-22 22:59:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-22 23:16:14 -0400
commitd4c6fa73fe984e504d52f3d6bba291fd76fe49f7 (patch)
tree47842ddebb2a48cc1513b36fba18835678e2b94e /arch/x86/pci
parentaab008db8063364dc3c8ccf4981c21124866b395 (diff)
parent4bc25af79ec54b79266148f8c1b84bb1e7ff2621 (diff)
Merge tag 'stable/for-linus-3.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
Pull xen updates from Konrad Rzeszutek Wilk: "which has three neat features: - PV multiconsole support, so that there can be hvc1, hvc2, etc; This can be used in HVM and in PV mode. - P-state and C-state power management driver that uploads said power management data to the hypervisor. It also inhibits cpufreq scaling drivers to load so that only the hypervisor can make power management decisions - fixing a weird perf bug. There is one thing in the Kconfig that you won't like: "default y if (X86_ACPI_CPUFREQ = y || X86_POWERNOW_K8 = y)" (note, that it all depends on CONFIG_XEN which depends on CONFIG_PARAVIRT which by default is off). I've a fix to convert that boolean expression into "default m" which I am going to post after the cpufreq git pull - as the two patches to make this work depend on a fix in Dave Jones's tree. - Function Level Reset (FLR) support in the Xen PCI backend. Fixes: - Kconfig dependencies for Xen PV keyboard and video - Compile warnings and constify fixes - Change over to use percpu_xxx instead of this_cpu_xxx" Fix up trivial conflicts in drivers/tty/hvc/hvc_xen.c due to changes to a removed commit. * tag 'stable/for-linus-3.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: xen kconfig: relax INPUT_XEN_KBDDEV_FRONTEND deps xen/acpi-processor: C and P-state driver that uploads said data to hypervisor. xen: constify all instances of "struct attribute_group" xen/xenbus: ignore console/0 hvc_xen: introduce HVC_XEN_FRONTEND hvc_xen: implement multiconsole support hvc_xen: support PV on HVM consoles xenbus: don't free other end details too early xen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it. xen/setup/pm/acpi: Remove the call to boot_option_idle_override. xenbus: address compiler warnings xen: use this_cpu_xxx replace percpu_xxx funcs xen/pciback: Support pci_reset_function, aka FLR or D3 support. pci: Introduce __pci_reset_function_locked to be used when holding device_lock. xen: Utilize the restore_msi_irqs hook.
Diffstat (limited to 'arch/x86/pci')
-rw-r--r--arch/x86/pci/xen.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index d99346ea8fdb..7415aa927913 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -324,6 +324,32 @@ static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
324out: 324out:
325 return ret; 325 return ret;
326} 326}
327
328static void xen_initdom_restore_msi_irqs(struct pci_dev *dev, int irq)
329{
330 int ret = 0;
331
332 if (pci_seg_supported) {
333 struct physdev_pci_device restore_ext;
334
335 restore_ext.seg = pci_domain_nr(dev->bus);
336 restore_ext.bus = dev->bus->number;
337 restore_ext.devfn = dev->devfn;
338 ret = HYPERVISOR_physdev_op(PHYSDEVOP_restore_msi_ext,
339 &restore_ext);
340 if (ret == -ENOSYS)
341 pci_seg_supported = false;
342 WARN(ret && ret != -ENOSYS, "restore_msi_ext -> %d\n", ret);
343 }
344 if (!pci_seg_supported) {
345 struct physdev_restore_msi restore;
346
347 restore.bus = dev->bus->number;
348 restore.devfn = dev->devfn;
349 ret = HYPERVISOR_physdev_op(PHYSDEVOP_restore_msi, &restore);
350 WARN(ret && ret != -ENOSYS, "restore_msi -> %d\n", ret);
351 }
352}
327#endif 353#endif
328 354
329static void xen_teardown_msi_irqs(struct pci_dev *dev) 355static void xen_teardown_msi_irqs(struct pci_dev *dev)
@@ -446,6 +472,7 @@ int __init pci_xen_initial_domain(void)
446#ifdef CONFIG_PCI_MSI 472#ifdef CONFIG_PCI_MSI
447 x86_msi.setup_msi_irqs = xen_initdom_setup_msi_irqs; 473 x86_msi.setup_msi_irqs = xen_initdom_setup_msi_irqs;
448 x86_msi.teardown_msi_irq = xen_teardown_msi_irq; 474 x86_msi.teardown_msi_irq = xen_teardown_msi_irq;
475 x86_msi.restore_msi_irqs = xen_initdom_restore_msi_irqs;
449#endif 476#endif
450 xen_setup_acpi_sci(); 477 xen_setup_acpi_sci();
451 __acpi_register_gsi = acpi_register_gsi_xen; 478 __acpi_register_gsi = acpi_register_gsi_xen;