]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Merge branch 'devel/acpi-s3.v4.rebased' into uek2-merge
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 24 Feb 2012 04:54:01 +0000 (23:54 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 24 Feb 2012 04:54:01 +0000 (23:54 -0500)
* devel/acpi-s3.v4.rebased:
  xen/pci:use hypercall PHYSDEVOP_restore_msi_ext to restore MSI/MSI-X vectors
  xen/acpi/sleep: Register to the acpi_suspend_lowlevel a callback.
  xen/acpi/sleep: Enable ACPI sleep via the __acpi_override_sleep
  xen/acpi: Domain0 acpi parser related platform hypercall
  xen: Utilize the restore_msi_irqs hook.
  x86/acpi/sleep: Provide registration for acpi_suspend_lowlevel.
  x86, acpi, tboot: Have a ACPI sleep override instead of calling tboot_sleep.
  x86: Expand the x86_msi_ops to have a restore MSIs.

Conflicts:
drivers/xen/Makefile
include/xen/interface/physdev.h
include/xen/interface/platform.h

1  2 
arch/x86/kernel/acpi/boot.c
arch/x86/pci/xen.c
arch/x86/xen/enlighten.c
drivers/xen/Makefile
include/xen/interface/physdev.h

Simple merge
index 27d0caf0205195cbeecacf62587ce069165057f0,32f17f0fcdd70c93d5a7f4c729f749897115e228..a22ad4bf11ba517cd4e5607773c434db66312e2a
@@@ -324,29 -243,72 +324,55 @@@ static int xen_initdom_setup_msi_irqs(s
  out:
        return ret;
  }
+ static void xen_initdom_restore_msi_irqs(struct pci_dev *dev, int irq)
+ {
+       int ret = 0;
+       if (pci_seg_supported) {
+               struct physdev_pci_device restore_ext;
+               restore_ext.seg = pci_domain_nr(dev->bus);
+               restore_ext.bus = dev->bus->number;
+               restore_ext.devfn = dev->devfn;
+               ret = HYPERVISOR_physdev_op(PHYSDEVOP_restore_msi_ext,
+                                           &restore_ext);
+               if (ret == -ENOSYS)
+                       pci_seg_supported = false;
+               WARN(ret && ret != -ENOSYS, "restore_msi_ext -> %d\n", ret);
+       }
+       if (!pci_seg_supported) {
+               struct physdev_restore_msi restore;
+               restore.bus = dev->bus->number;
+               restore.devfn = dev->devfn;
+               ret = HYPERVISOR_physdev_op(PHYSDEVOP_restore_msi, &restore);
+               WARN(ret && ret != -ENOSYS, "restore_msi -> %d\n", ret);
+       }
+ }
  #endif
 -#endif
  
 -static int xen_pcifront_enable_irq(struct pci_dev *dev)
 +static void xen_teardown_msi_irqs(struct pci_dev *dev)
  {
 -      int rc;
 -      int share = 1;
 -      int pirq;
 -      u8 gsi;
 -
 -      rc = pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &gsi);
 -      if (rc < 0) {
 -              dev_warn(&dev->dev, "Xen PCI: failed to read interrupt line: %d\n",
 -                       rc);
 -              return rc;
 -      }
 -
 -      rc = xen_allocate_pirq_gsi(gsi);
 -      if (rc < 0) {
 -              dev_warn(&dev->dev, "Xen PCI: failed to allocate a PIRQ for GSI%d: %d\n",
 -                       gsi, rc);
 -              return rc;
 -      }
 -      pirq = rc;
 +      struct msi_desc *msidesc;
  
 -      if (gsi < NR_IRQS_LEGACY)
 -              share = 0;
 +      msidesc = list_entry(dev->msi_list.next, struct msi_desc, list);
 +      if (msidesc->msi_attrib.is_msix)
 +              xen_pci_frontend_disable_msix(dev);
 +      else
 +              xen_pci_frontend_disable_msi(dev);
  
 -      rc = xen_bind_pirq_gsi_to_irq(gsi, pirq, share, "pcifront");
 -      if (rc < 0) {
 -              dev_warn(&dev->dev, "Xen PCI: failed to bind GSI%d (PIRQ%d) to IRQ: %d\n",
 -                       gsi, pirq, rc);
 -              return rc;
 -      }
 +      /* Free the IRQ's and the msidesc using the generic code. */
 +      default_teardown_msi_irqs(dev);
 +}
  
 -      dev->irq = rc;
 -      dev_info(&dev->dev, "Xen PCI mapped GSI%d to IRQ%d\n", gsi, dev->irq);
 -      return 0;
 +static void xen_teardown_msi_irq(unsigned int irq)
 +{
 +      xen_destroy_irq(irq);
  }
  
 +#endif
 +
  int __init pci_xen_init(void)
  {
        if (!xen_pv_domain() || xen_initial_domain())
index 1813892b810a5d7e74d408c67fcf467ab96a8527,6962653a1d2a41caa40bac2cd01225ac5bac6302..ebb8551c188bb4e710e31ebee22f51618f483af1
@@@ -1353,16 -1249,10 +1354,18 @@@ asmlinkage void __init xen_start_kernel
                if (pci_xen)
                        x86_init.pci.arch_init = pci_xen_init;
        } else {
 +              const struct dom0_vga_console_info *info =
 +                      (void *)((char *)xen_start_info +
 +                               xen_start_info->console.dom0.info_off);
 +
 +              xen_init_vga(info, xen_start_info->console.dom0.info_size);
 +              xen_start_info->console.domU.mfn = 0;
 +              xen_start_info->console.domU.evtchn = 0;
 +
                /* Make sure ACS will be enabled */
                pci_request_acs();
+               xen_acpi_sleep_register();
        }
                
  
index 12346a125a8b2063016fa0c29daac23a4a133046,0b0058c151d9c304af6fc8c1bb69d260f9e43900..e32d0326dbd6b201752e65a712d488a127fcf300
@@@ -14,13 -14,11 +14,13 @@@ 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_XEN_TMEM)                        += tmem.o
  obj-$(CONFIG_SWIOTLB_XEN)             += swiotlb-xen.o
- obj-$(CONFIG_XEN_DOM0)                        += pci.o
+ obj-$(CONFIG_XEN_DOM0)                        += pci.o acpi.o
 +obj-$(CONFIG_XEN_PRIVCMD)             += xen-privcmd.o
 +obj-$(CONFIG_XEN_PROCESSOR_PASSTHRU)  += processor-passthru.o
  obj-$(CONFIG_XEN_PCIDEV_BACKEND)      += xen-pciback/
 -
  xen-evtchn-y                          := evtchn.o
  xen-gntdev-y                          := gntdev.o
  xen-gntalloc-y                                := gntalloc.o
Simple merge