From: Greg Kroah-Hartman Date: Tue, 2 Sep 2014 22:09:10 +0000 (-0700) Subject: 3.14-stable patches X-Git-Tag: v3.10.54~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f6b815aec9dc374790e5a3da766babb113437ef6;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: acpi-pci-fix-sysfs-acpi_index-and-label-errors.patch drm-radeon-add-additional-si-pci-ids.patch drm-radeon-add-new-bonaire-pci-ids.patch drm-radeon-add-new-kv-pci-id.patch hpsa-fix-bad-enomem-return-value-in-hpsa_big_passthru_ioctl.patch hpsa-fix-non-x86-builds.patch pci-configure-aspm-when-enabling-device.patch powerpc-pci-reorder-pci-bus-bridge-unregistration-during-phb-removal.patch powerpc-powernv-update-dev-dma_mask-in-pci_set_dma_mask-path.patch x86-don-t-exclude-low-bios-area-when-allocating-address-space-for-non-pci-cards.patch x86-efi-enforce-config_relocatable-for-efi-boot-stub.patch x86-xen-resume-timer-irqs-early.patch x86-xen-use-vmap-to-map-grant-table-pages-in-pvh-guests.patch x86_64-vsyscall-fix-warn_bad_vsyscall-log-output.patch xen-events-fifo-ensure-all-bitops-are-properly-aligned-even-on-x86.patch --- diff --git a/queue-3.14/acpi-pci-fix-sysfs-acpi_index-and-label-errors.patch b/queue-3.14/acpi-pci-fix-sysfs-acpi_index-and-label-errors.patch new file mode 100644 index 00000000000..91358dd460b --- /dev/null +++ b/queue-3.14/acpi-pci-fix-sysfs-acpi_index-and-label-errors.patch @@ -0,0 +1,79 @@ +From dcfa9be83866e28fcb8b7e22b4eeb4ba63bd3174 Mon Sep 17 00:00:00 2001 +From: Simone Gotti +Date: Wed, 18 Jun 2014 16:55:30 +0200 +Subject: ACPI / PCI: Fix sysfs acpi_index and label errors + +From: Simone Gotti + +commit dcfa9be83866e28fcb8b7e22b4eeb4ba63bd3174 upstream. + +Fix errors in handling "device label" _DSM return values. + +If _DSM returns a Unicode string, the ACPI type is ACPI_TYPE_BUFFER, not +ACPI_TYPE_STRING. Fix dsm_label_utf16s_to_utf8s() to convert UTF-16 from +acpi_object->buffer instead of acpi_object->string. + +Prior to v3.14, we accepted Unicode labels (ACPI_TYPE_BUFFER return +values). But after 1d0fcef73283, we accepted only ASCII (ACPI_TYPE_STRING) +(and we incorrectly tried to convert those ASCII labels from UTF-16 to +UTF-8). + +Rejecting Unicode labels made us return -EPERM when reading sysfs +"acpi_index" or "label" files, which in turn caused on-board network +interfaces on a Dell PowerEdge E420 to be renamed (by udev net_id internal) +from eno1/eno2 to enp2s0f0/enp2s0f1. + +Fix this by accepting either ACPI_TYPE_STRING (and treating it as ASCII) or +ACPI_TYPE_BUFFER (and converting from UTF-16 to UTF-8). + +[bhelgaas: changelog] +Fixes: 1d0fcef73283 ("ACPI / PCI: replace open-coded _DSM code with helper functions") +Signed-off-by: Simone Gotti +Signed-off-by: Bjorn Helgaas +Reviewed-by: Jiang Liu +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/pci-label.c | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +--- a/drivers/pci/pci-label.c ++++ b/drivers/pci/pci-label.c +@@ -168,8 +168,8 @@ enum acpi_attr_enum { + static void dsm_label_utf16s_to_utf8s(union acpi_object *obj, char *buf) + { + int len; +- len = utf16s_to_utf8s((const wchar_t *)obj->string.pointer, +- obj->string.length, ++ len = utf16s_to_utf8s((const wchar_t *)obj->buffer.pointer, ++ obj->buffer.length, + UTF16_LITTLE_ENDIAN, + buf, PAGE_SIZE); + buf[len] = '\n'; +@@ -194,16 +194,22 @@ dsm_get_label(struct device *dev, char * + tmp = obj->package.elements; + if (obj->type == ACPI_TYPE_PACKAGE && obj->package.count == 2 && + tmp[0].type == ACPI_TYPE_INTEGER && +- tmp[1].type == ACPI_TYPE_STRING) { ++ (tmp[1].type == ACPI_TYPE_STRING || ++ tmp[1].type == ACPI_TYPE_BUFFER)) { + /* + * The second string element is optional even when + * this _DSM is implemented; when not implemented, + * this entry must return a null string. + */ +- if (attr == ACPI_ATTR_INDEX_SHOW) ++ if (attr == ACPI_ATTR_INDEX_SHOW) { + scnprintf(buf, PAGE_SIZE, "%llu\n", tmp->integer.value); +- else if (attr == ACPI_ATTR_LABEL_SHOW) +- dsm_label_utf16s_to_utf8s(tmp + 1, buf); ++ } else if (attr == ACPI_ATTR_LABEL_SHOW) { ++ if (tmp[1].type == ACPI_TYPE_STRING) ++ scnprintf(buf, PAGE_SIZE, "%s\n", ++ tmp[1].string.pointer); ++ else if (tmp[1].type == ACPI_TYPE_BUFFER) ++ dsm_label_utf16s_to_utf8s(tmp + 1, buf); ++ } + len = strlen(buf) > 0 ? strlen(buf) : -1; + } + diff --git a/queue-3.14/drm-radeon-add-additional-si-pci-ids.patch b/queue-3.14/drm-radeon-add-additional-si-pci-ids.patch new file mode 100644 index 00000000000..2379a54b32a --- /dev/null +++ b/queue-3.14/drm-radeon-add-additional-si-pci-ids.patch @@ -0,0 +1,38 @@ +From 37dbeab788a8f23fd946c0be083e5484d6f929a1 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Thu, 21 Aug 2014 10:55:07 -0400 +Subject: drm/radeon: add additional SI pci ids + +From: Alex Deucher + +commit 37dbeab788a8f23fd946c0be083e5484d6f929a1 upstream. + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + include/drm/drm_pciids.h | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/include/drm/drm_pciids.h ++++ b/include/drm/drm_pciids.h +@@ -165,8 +165,11 @@ + {0x1002, 0x6601, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6602, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6603, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ ++ {0x1002, 0x6604, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ ++ {0x1002, 0x6605, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6606, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6607, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ ++ {0x1002, 0x6608, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6610, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6611, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6613, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ +@@ -300,6 +303,7 @@ + {0x1002, 0x6829, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x682A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x682B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ ++ {0x1002, 0x682C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x682D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x682F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6830, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ diff --git a/queue-3.14/drm-radeon-add-new-bonaire-pci-ids.patch b/queue-3.14/drm-radeon-add-new-bonaire-pci-ids.patch new file mode 100644 index 00000000000..9d4831ef81c --- /dev/null +++ b/queue-3.14/drm-radeon-add-new-bonaire-pci-ids.patch @@ -0,0 +1,27 @@ +From 5fc540edc8ea1297c76685f74bc82a2107fe6731 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Thu, 21 Aug 2014 10:48:11 -0400 +Subject: drm/radeon: add new bonaire pci ids + +From: Alex Deucher + +commit 5fc540edc8ea1297c76685f74bc82a2107fe6731 upstream. + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + include/drm/drm_pciids.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/include/drm/drm_pciids.h ++++ b/include/drm/drm_pciids.h +@@ -176,6 +176,8 @@ + {0x1002, 0x6631, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6640, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6641, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ ++ {0x1002, 0x6646, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ ++ {0x1002, 0x6647, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6649, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6650, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6651, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_NEW_MEMMAP}, \ diff --git a/queue-3.14/drm-radeon-add-new-kv-pci-id.patch b/queue-3.14/drm-radeon-add-new-kv-pci-id.patch new file mode 100644 index 00000000000..5c0c3bba4ba --- /dev/null +++ b/queue-3.14/drm-radeon-add-new-kv-pci-id.patch @@ -0,0 +1,40 @@ +From 6dc14baf4ced769017c7a7045019c7a19f373865 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Thu, 21 Aug 2014 10:41:42 -0400 +Subject: drm/radeon: add new KV pci id + +From: Alex Deucher + +commit 6dc14baf4ced769017c7a7045019c7a19f373865 upstream. + +bug: +https://bugs.freedesktop.org/show_bug.cgi?id=82912 + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/cik.c | 1 + + include/drm/drm_pciids.h | 1 + + 2 files changed, 2 insertions(+) + +--- a/drivers/gpu/drm/radeon/cik.c ++++ b/drivers/gpu/drm/radeon/cik.c +@@ -3231,6 +3231,7 @@ static void cik_gpu_init(struct radeon_d + (rdev->pdev->device == 0x130B) || + (rdev->pdev->device == 0x130E) || + (rdev->pdev->device == 0x1315) || ++ (rdev->pdev->device == 0x1318) || + (rdev->pdev->device == 0x131B)) { + rdev->config.cik.max_cu_per_sh = 4; + rdev->config.cik.max_backends_per_se = 1; +--- a/include/drm/drm_pciids.h ++++ b/include/drm/drm_pciids.h +@@ -17,6 +17,7 @@ + {0x1002, 0x1315, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x1316, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x1317, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ ++ {0x1002, 0x1318, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x131B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x131C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x131D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_KAVERI|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ diff --git a/queue-3.14/hpsa-fix-bad-enomem-return-value-in-hpsa_big_passthru_ioctl.patch b/queue-3.14/hpsa-fix-bad-enomem-return-value-in-hpsa_big_passthru_ioctl.patch new file mode 100644 index 00000000000..3f1b445fc48 --- /dev/null +++ b/queue-3.14/hpsa-fix-bad-enomem-return-value-in-hpsa_big_passthru_ioctl.patch @@ -0,0 +1,34 @@ +From 0758f4f732b08b6ef07f2e5f735655cf69fea477 Mon Sep 17 00:00:00 2001 +From: "Stephen M. Cameron" +Date: Thu, 3 Jul 2014 10:18:03 -0500 +Subject: hpsa: fix bad -ENOMEM return value in hpsa_big_passthru_ioctl + +From: "Stephen M. Cameron" + +commit 0758f4f732b08b6ef07f2e5f735655cf69fea477 upstream. + +When copy_from_user fails, return -EFAULT, not -ENOMEM + +Signed-off-by: Stephen M. Cameron +Reported-by: Robert Elliott +Reviewed-by: Joe Handzik +Reviewed-by: Scott Teel +Reviewed by: Mike MIller +Signed-off-by: Christoph Hellwig +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/hpsa.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/hpsa.c ++++ b/drivers/scsi/hpsa.c +@@ -3131,7 +3131,7 @@ static int hpsa_big_passthru_ioctl(struc + } + if (ioc->Request.Type.Direction == XFER_WRITE) { + if (copy_from_user(buff[sg_used], data_ptr, sz)) { +- status = -ENOMEM; ++ status = -EFAULT; + goto cleanup1; + } + } else diff --git a/queue-3.14/hpsa-fix-non-x86-builds.patch b/queue-3.14/hpsa-fix-non-x86-builds.patch new file mode 100644 index 00000000000..28a7172bf7b --- /dev/null +++ b/queue-3.14/hpsa-fix-non-x86-builds.patch @@ -0,0 +1,48 @@ +From 0b9e7b741f2bf8103b15bb14d5b4a6f5ee91c59a Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Thu, 26 Jun 2014 15:44:52 +0200 +Subject: hpsa: fix non-x86 builds + +From: Arnd Bergmann + +commit 0b9e7b741f2bf8103b15bb14d5b4a6f5ee91c59a upstream. + +commit 28e134464734 "[SCSI] hpsa: enable unit attention reporting" +turns on unit attention notifications, but got the change wrong for +all architectures other than x86, which now store an uninitialized +value into the device register. + +Gcc helpfully warns about this: + +../drivers/scsi/hpsa.c: In function 'hpsa_set_driver_support_bits': +../drivers/scsi/hpsa.c:6373:17: warning: 'driver_support' is used uninitialized in this function [-Wuninitialized] + driver_support |= ENABLE_UNIT_ATTN; + ^ + +This moves the #ifdef so only the prefetch-enable is conditional +on x86, not also reading the initial register contents. + +Signed-off-by: Arnd Bergmann +Fixes: 28e134464734 "[SCSI] hpsa: enable unit attention reporting" +Acked-by: Stephen M. Cameron +Signed-off-by: Christoph Hellwig +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/hpsa.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/hpsa.c ++++ b/drivers/scsi/hpsa.c +@@ -4367,9 +4367,9 @@ static inline void hpsa_set_driver_suppo + { + u32 driver_support; + +-#ifdef CONFIG_X86 +- /* Need to enable prefetch in the SCSI core for 6400 in x86 */ + driver_support = readl(&(h->cfgtable->driver_support)); ++ /* Need to enable prefetch in the SCSI core for 6400 in x86 */ ++#ifdef CONFIG_X86 + driver_support |= ENABLE_SCSI_PREFETCH; + #endif + driver_support |= ENABLE_UNIT_ATTN; diff --git a/queue-3.14/pci-configure-aspm-when-enabling-device.patch b/queue-3.14/pci-configure-aspm-when-enabling-device.patch new file mode 100644 index 00000000000..911f31b8520 --- /dev/null +++ b/queue-3.14/pci-configure-aspm-when-enabling-device.patch @@ -0,0 +1,78 @@ +From 1f6ae47ecff7f23da73417e068018b311f3b5583 Mon Sep 17 00:00:00 2001 +From: Vidya Sagar +Date: Wed, 16 Jul 2014 15:33:42 +0530 +Subject: PCI: Configure ASPM when enabling device + +From: Vidya Sagar + +commit 1f6ae47ecff7f23da73417e068018b311f3b5583 upstream. + +We can't do ASPM configuration at enumeration-time because enabling it +makes some defective hardware unresponsive, even if ASPM is disabled later +(see 41cd766b0659 ("PCI: Don't enable aspm before drivers have had a chance +to veto it"). Therefore, we have to do it after a driver claims the +device. + +We previously configured ASPM in pci_set_power_state(), but that's not a +very good place because it's not really related to setting the PCI device +power state, and doing it there means: + + - We incorrectly skipped ASPM config when setting a device that's + already in D0 to D0. + + - We unnecessarily configured ASPM when setting a device to a low-power + state (the ASPM feature only applies when the device is in D0). + + - We unnecessarily configured ASPM when called from a .resume() method + (ASPM configuration needs to be restored during resume, but + pci_restore_pcie_state() should already do this). + +Move ASPM configuration from pci_set_power_state() to +do_pci_enable_device() so we do it when a driver enables a device. + +[bhelgaas: changelog] +Link: https://bugzilla.kernel.org/show_bug.cgi?id=79621 +Fixes: db288c9c5f9d ("PCI / PM: restore the original behavior of pci_set_power_state()") +Suggested-by: Bjorn Helgaas +Signed-off-by: Vidya Sagar +Signed-off-by: Bjorn Helgaas +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/pci.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +--- a/drivers/pci/pci.c ++++ b/drivers/pci/pci.c +@@ -830,12 +830,6 @@ int pci_set_power_state(struct pci_dev * + + if (!__pci_complete_power_transition(dev, state)) + error = 0; +- /* +- * When aspm_policy is "powersave" this call ensures +- * that ASPM is configured. +- */ +- if (!error && dev->bus->self) +- pcie_aspm_powersave_config_link(dev->bus->self); + + return error; + } +@@ -1181,12 +1175,18 @@ EXPORT_SYMBOL_GPL(pci_load_and_free_save + static int do_pci_enable_device(struct pci_dev *dev, int bars) + { + int err; ++ struct pci_dev *bridge; + u16 cmd; + u8 pin; + + err = pci_set_power_state(dev, PCI_D0); + if (err < 0 && err != -EIO) + return err; ++ ++ bridge = pci_upstream_bridge(dev); ++ if (bridge) ++ pcie_aspm_powersave_config_link(bridge); ++ + err = pcibios_enable_device(dev, bars); + if (err < 0) + return err; diff --git a/queue-3.14/powerpc-pci-reorder-pci-bus-bridge-unregistration-during-phb-removal.patch b/queue-3.14/powerpc-pci-reorder-pci-bus-bridge-unregistration-during-phb-removal.patch new file mode 100644 index 00000000000..68985db2846 --- /dev/null +++ b/queue-3.14/powerpc-pci-reorder-pci-bus-bridge-unregistration-during-phb-removal.patch @@ -0,0 +1,42 @@ +From 7340056567e32b2c9d3554eb146e1977c93da116 Mon Sep 17 00:00:00 2001 +From: Tyrel Datwyler +Date: Tue, 29 Jul 2014 13:48:13 -0400 +Subject: powerpc/pci: Reorder pci bus/bridge unregistration during PHB removal + +From: Tyrel Datwyler + +commit 7340056567e32b2c9d3554eb146e1977c93da116 upstream. + +Commit bcdde7e made __sysfs_remove_dir() recursive and introduced a BUG_ON +during PHB removal while attempting to delete the power managment attribute +group of the bus. This is a result of tearing the bridge and bus devices down +out of order in remove_phb_dynamic. Since, the the bus resides below the bridge +in the sysfs device tree it should be torn down first. + +This patch simply moves the device_unregister call for the PHB bridge device +after the device_unregister call for the PHB bus. + +Fixes: bcdde7e221a8 ("sysfs: make __sysfs_remove_dir() recursive") +Signed-off-by: Tyrel Datwyler +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/platforms/pseries/pci_dlpar.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/powerpc/platforms/pseries/pci_dlpar.c ++++ b/arch/powerpc/platforms/pseries/pci_dlpar.c +@@ -118,10 +118,10 @@ int remove_phb_dynamic(struct pci_contro + } + } + +- /* Unregister the bridge device from sysfs and remove the PCI bus */ +- device_unregister(b->bridge); ++ /* Remove the PCI bus and unregister the bridge device from sysfs */ + phb->bus = NULL; + pci_remove_bus(b); ++ device_unregister(b->bridge); + + /* Now release the IO resource */ + if (res->flags & IORESOURCE_IO) diff --git a/queue-3.14/powerpc-powernv-update-dev-dma_mask-in-pci_set_dma_mask-path.patch b/queue-3.14/powerpc-powernv-update-dev-dma_mask-in-pci_set_dma_mask-path.patch new file mode 100644 index 00000000000..a8ae91cb033 --- /dev/null +++ b/queue-3.14/powerpc-powernv-update-dev-dma_mask-in-pci_set_dma_mask-path.patch @@ -0,0 +1,33 @@ +From a32305bf90a2ae0e6a9a93370c7616565f75e15a Mon Sep 17 00:00:00 2001 +From: Brian W Hart +Date: Thu, 31 Jul 2014 14:24:37 -0500 +Subject: powerpc/powernv: Update dev->dma_mask in pci_set_dma_mask() path + +From: Brian W Hart + +commit a32305bf90a2ae0e6a9a93370c7616565f75e15a upstream. + +powerpc defines various machine-specific routines for handling +pci_set_dma_mask(). The routines for machine "PowerNV" may neglect +to set dev->dma_mask. This could confuse anyone (e.g. drivers) that +consult dev->dma_mask to find the current mask. Set the dma_mask in +the PowerNV leaf routine. + +Signed-off-by: Brian W. Hart +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/platforms/powernv/pci-ioda.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/powerpc/platforms/powernv/pci-ioda.c ++++ b/arch/powerpc/platforms/powernv/pci-ioda.c +@@ -491,6 +491,7 @@ static int pnv_pci_ioda_dma_set_mask(str + set_dma_ops(&pdev->dev, &dma_iommu_ops); + set_iommu_table_base(&pdev->dev, &pe->tce32_table); + } ++ *pdev->dev.dma_mask = dma_mask; + return 0; + } + diff --git a/queue-3.14/series b/queue-3.14/series index c79a17d7b9b..6875a2197b1 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -43,3 +43,18 @@ kvm-nvmx-fix-acknowledge-interrupt-on-exit-when-apicv-is-in-use.patch revert-kvm-x86-increase-the-number-of-fixed-mtrr-regs-to-10.patch kvm-iommu-fix-the-third-parameter-of-kvm_iommu_put_pages-cve-2014-3601.patch ext4-fix-bug_on-in-mb_free_blocks.patch +drm-radeon-add-new-kv-pci-id.patch +drm-radeon-add-new-bonaire-pci-ids.patch +drm-radeon-add-additional-si-pci-ids.patch +pci-configure-aspm-when-enabling-device.patch +acpi-pci-fix-sysfs-acpi_index-and-label-errors.patch +x86-don-t-exclude-low-bios-area-when-allocating-address-space-for-non-pci-cards.patch +powerpc-pci-reorder-pci-bus-bridge-unregistration-during-phb-removal.patch +powerpc-powernv-update-dev-dma_mask-in-pci_set_dma_mask-path.patch +x86_64-vsyscall-fix-warn_bad_vsyscall-log-output.patch +hpsa-fix-non-x86-builds.patch +xen-events-fifo-ensure-all-bitops-are-properly-aligned-even-on-x86.patch +x86-efi-enforce-config_relocatable-for-efi-boot-stub.patch +x86-xen-use-vmap-to-map-grant-table-pages-in-pvh-guests.patch +x86-xen-resume-timer-irqs-early.patch +hpsa-fix-bad-enomem-return-value-in-hpsa_big_passthru_ioctl.patch diff --git a/queue-3.14/x86-don-t-exclude-low-bios-area-when-allocating-address-space-for-non-pci-cards.patch b/queue-3.14/x86-don-t-exclude-low-bios-area-when-allocating-address-space-for-non-pci-cards.patch new file mode 100644 index 00000000000..e39f056405b --- /dev/null +++ b/queue-3.14/x86-don-t-exclude-low-bios-area-when-allocating-address-space-for-non-pci-cards.patch @@ -0,0 +1,90 @@ +From cbace46a9710a480cae51e4611697df5de41713e Mon Sep 17 00:00:00 2001 +From: Christoph Schulz +Date: Wed, 16 Jul 2014 10:00:57 +0200 +Subject: x86: don't exclude low BIOS area when allocating address space for non-PCI cards + +From: Christoph Schulz + +commit cbace46a9710a480cae51e4611697df5de41713e upstream. + +Commit 30919b0bf356 ("x86: avoid low BIOS area when allocating address +space") moved the test for resource allocations that fall within the first +1MB of address space from the PCI-specific path to a generic path, such +that all resource allocations will avoid this area. However, this breaks +ISA cards which need to allocate a memory region within the first 1MB. An +example is the i82365 PCMCIA controller and derivatives like the Ricoh +RF5C296/396 which map part of the PCMCIA socket memory address space into +the first 1MB of system memory address space. They do not work anymore as +no usable memory region exists due to this change: + + Intel ISA PCIC probe: Ricoh RF5C296/396 ISA-to-PCMCIA at port 0x3e0 ofs 0x00, 2 sockets + host opts [0]: none + host opts [1]: none + ISA irqs (scanned) = 3,4,5,9,10 status change on irq 10 + pcmcia_socket pcmcia_socket1: pccard: PCMCIA card inserted into slot 1 + pcmcia_socket pcmcia_socket0: cs: IO port probe 0xc00-0xcff: excluding 0xcf8-0xcff + pcmcia_socket pcmcia_socket0: cs: IO port probe 0xa00-0xaff: clean. + pcmcia_socket pcmcia_socket0: cs: IO port probe 0x100-0x3ff: excluding 0x170-0x177 0x1f0-0x1f7 0x2f8-0x2ff 0x370-0x37f 0x3c0-0x3e7 0x3f0-0x3ff + pcmcia_socket pcmcia_socket0: cs: memory probe 0x0a0000-0x0affff: excluding 0xa0000-0xaffff + pcmcia_socket pcmcia_socket0: cs: memory probe 0x0b0000-0x0bffff: excluding 0xb0000-0xbffff + pcmcia_socket pcmcia_socket0: cs: memory probe 0x0c0000-0x0cffff: excluding 0xc0000-0xcbfff + pcmcia_socket pcmcia_socket0: cs: memory probe 0x0d0000-0x0dffff: clean. + pcmcia_socket pcmcia_socket0: cs: memory probe 0x0e0000-0x0effff: clean. + pcmcia_socket pcmcia_socket0: cs: memory probe 0x60000000-0x60ffffff: clean. + pcmcia_socket pcmcia_socket0: cs: memory probe 0xa0000000-0xa0ffffff: clean. + pcmcia_socket pcmcia_socket1: cs: IO port probe 0xc00-0xcff: excluding 0xcf8-0xcff + pcmcia_socket pcmcia_socket1: cs: IO port probe 0xa00-0xaff: clean. + pcmcia_socket pcmcia_socket1: cs: IO port probe 0x100-0x3ff: excluding 0x170-0x177 0x1f0-0x1f7 0x2f8-0x2ff 0x370-0x37f 0x3c0-0x3e7 0x3f0-0x3ff + pcmcia_socket pcmcia_socket1: cs: memory probe 0x0a0000-0x0affff: excluding 0xa0000-0xaffff + pcmcia_socket pcmcia_socket1: cs: memory probe 0x0b0000-0x0bffff: excluding 0xb0000-0xbffff + pcmcia_socket pcmcia_socket1: cs: memory probe 0x0c0000-0x0cffff: excluding 0xc0000-0xcbfff + pcmcia_socket pcmcia_socket1: cs: memory probe 0x0d0000-0x0dffff: clean. + pcmcia_socket pcmcia_socket1: cs: memory probe 0x0e0000-0x0effff: clean. + pcmcia_socket pcmcia_socket1: cs: memory probe 0x60000000-0x60ffffff: clean. + pcmcia_socket pcmcia_socket1: cs: memory probe 0xa0000000-0xa0ffffff: clean. + pcmcia_socket pcmcia_socket1: cs: memory probe 0x0cc000-0x0effff: excluding 0xe0000-0xeffff + pcmcia_socket pcmcia_socket1: cs: unable to map card memory! + +If filtering out the first 1MB is reverted, everything works as expected. + +Tested-by: Robert Resch +Signed-off-by: Christoph Schulz +Signed-off-by: Bjorn Helgaas +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/resource.c | 8 +++++--- + arch/x86/pci/i386.c | 4 ++++ + 2 files changed, 9 insertions(+), 3 deletions(-) + +--- a/arch/x86/kernel/resource.c ++++ b/arch/x86/kernel/resource.c +@@ -37,10 +37,12 @@ static void remove_e820_regions(struct r + + void arch_remove_reservations(struct resource *avail) + { +- /* Trim out BIOS areas (low 1MB and high 2MB) and E820 regions */ ++ /* ++ * Trim out BIOS area (high 2MB) and E820 regions. We do not remove ++ * the low 1MB unconditionally, as this area is needed for some ISA ++ * cards requiring a memory range, e.g. the i82365 PCMCIA controller. ++ */ + if (avail->flags & IORESOURCE_MEM) { +- if (avail->start < BIOS_END) +- avail->start = BIOS_END; + resource_clip(avail, BIOS_ROM_BASE, BIOS_ROM_END); + + remove_e820_regions(avail); +--- a/arch/x86/pci/i386.c ++++ b/arch/x86/pci/i386.c +@@ -162,6 +162,10 @@ pcibios_align_resource(void *data, const + return start; + if (start & 0x300) + start = (start + 0x3ff) & ~0x3ff; ++ } else if (res->flags & IORESOURCE_MEM) { ++ /* The low 1MB range is reserved for ISA cards */ ++ if (start < BIOS_END) ++ start = BIOS_END; + } + return start; + } diff --git a/queue-3.14/x86-efi-enforce-config_relocatable-for-efi-boot-stub.patch b/queue-3.14/x86-efi-enforce-config_relocatable-for-efi-boot-stub.patch new file mode 100644 index 00000000000..f5ba107ac53 --- /dev/null +++ b/queue-3.14/x86-efi-enforce-config_relocatable-for-efi-boot-stub.patch @@ -0,0 +1,49 @@ +From 7b2a583afb4ab894f78bc0f8bd136e96b6499a7e Mon Sep 17 00:00:00 2001 +From: Matt Fleming +Date: Fri, 11 Jul 2014 08:45:25 +0100 +Subject: x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Matt Fleming + +commit 7b2a583afb4ab894f78bc0f8bd136e96b6499a7e upstream. + +Without CONFIG_RELOCATABLE the early boot code will decompress the +kernel to LOAD_PHYSICAL_ADDR. While this may have been fine in the BIOS +days, that isn't going to fly with UEFI since parts of the firmware +code/data may be located at LOAD_PHYSICAL_ADDR. + +Straying outside of the bounds of the regions we've explicitly requested +from the firmware will cause all sorts of trouble. Bruno reports that +his machine resets while trying to decompress the kernel image. + +We already go to great pains to ensure the kernel is loaded into a +suitably aligned buffer, it's just that the address isn't necessarily +LOAD_PHYSICAL_ADDR, because we can't guarantee that address isn't in-use +by the firmware. + +Explicitly enforce CONFIG_RELOCATABLE for the EFI boot stub, so that we +can load the kernel at any address with the correct alignment. + +Reported-by: Bruno Prémont +Tested-by: Bruno Prémont +Cc: H. Peter Anvin +Signed-off-by: Matt Fleming +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/x86/Kconfig ++++ b/arch/x86/Kconfig +@@ -1597,6 +1597,7 @@ config EFI + config EFI_STUB + bool "EFI stub support" + depends on EFI ++ select RELOCATABLE + ---help--- + This kernel feature allows a bzImage to be loaded directly + by EFI firmware without the use of a bootloader. diff --git a/queue-3.14/x86-xen-resume-timer-irqs-early.patch b/queue-3.14/x86-xen-resume-timer-irqs-early.patch new file mode 100644 index 00000000000..87e545aab31 --- /dev/null +++ b/queue-3.14/x86-xen-resume-timer-irqs-early.patch @@ -0,0 +1,43 @@ +From 8d5999df35314607c38fbd6bdd709e25c3a4eeab Mon Sep 17 00:00:00 2001 +From: David Vrabel +Date: Thu, 7 Aug 2014 17:06:06 +0100 +Subject: x86/xen: resume timer irqs early + +From: David Vrabel + +commit 8d5999df35314607c38fbd6bdd709e25c3a4eeab upstream. + +If the timer irqs are resumed during device resume it is possible in +certain circumstances for the resume to hang early on, before device +interrupts are resumed. For an Ubuntu 14.04 PVHVM guest this would +occur in ~0.5% of resume attempts. + +It is not entirely clear what is occuring the point of the hang but I +think a task necessary for the resume calls schedule_timeout(), +waiting for a timer interrupt (which never arrives). This failure may +require specific tasks to be running on the other VCPUs to trigger +(processes are not frozen during a suspend/resume if PREEMPT is +disabled). + +Add IRQF_EARLY_RESUME to the timer interrupts so they are resumed in +syscore_resume(). + +Signed-off-by: David Vrabel +Reviewed-by: Boris Ostrovsky +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/xen/time.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/xen/time.c ++++ b/arch/x86/xen/time.c +@@ -444,7 +444,7 @@ void xen_setup_timer(int cpu) + + irq = bind_virq_to_irqhandler(VIRQ_TIMER, cpu, xen_timer_interrupt, + IRQF_PERCPU|IRQF_NOBALANCING|IRQF_TIMER| +- IRQF_FORCE_RESUME, ++ IRQF_FORCE_RESUME|IRQF_EARLY_RESUME, + name, NULL); + (void)xen_set_irq_priority(irq, XEN_IRQ_PRIORITY_MAX); + diff --git a/queue-3.14/x86-xen-use-vmap-to-map-grant-table-pages-in-pvh-guests.patch b/queue-3.14/x86-xen-use-vmap-to-map-grant-table-pages-in-pvh-guests.patch new file mode 100644 index 00000000000..a2777405e5e --- /dev/null +++ b/queue-3.14/x86-xen-use-vmap-to-map-grant-table-pages-in-pvh-guests.patch @@ -0,0 +1,63 @@ +From 7d951f3ccb0308c95bf76d5eef9886dea35a7013 Mon Sep 17 00:00:00 2001 +From: David Vrabel +Date: Tue, 5 Aug 2014 11:49:19 +0100 +Subject: x86/xen: use vmap() to map grant table pages in PVH guests + +From: David Vrabel + +commit 7d951f3ccb0308c95bf76d5eef9886dea35a7013 upstream. + +Commit b7dd0e350e0b (x86/xen: safely map and unmap grant frames when +in atomic context) causes PVH guests to crash in +arch_gnttab_map_shared() when they attempted to map the pages for the +grant table. + +This use of a PV-specific function during the PVH grant table setup is +non-obvious and not needed. The standard vmap() function does the +right thing. + +Signed-off-by: David Vrabel +Reported-by: Mukesh Rathor +Tested-by: Mukesh Rathor +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/xen/grant-table.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/arch/x86/xen/grant-table.c ++++ b/arch/x86/xen/grant-table.c +@@ -134,6 +134,7 @@ static int __init xlated_setup_gnttab_pa + { + struct page **pages; + xen_pfn_t *pfns; ++ void *vaddr; + int rc; + unsigned int i; + unsigned long nr_grant_frames = gnttab_max_grant_frames(); +@@ -159,21 +160,20 @@ static int __init xlated_setup_gnttab_pa + for (i = 0; i < nr_grant_frames; i++) + pfns[i] = page_to_pfn(pages[i]); + +- rc = arch_gnttab_map_shared(pfns, nr_grant_frames, nr_grant_frames, +- &xen_auto_xlat_grant_frames.vaddr); +- +- if (rc) { ++ vaddr = vmap(pages, nr_grant_frames, 0, PAGE_KERNEL); ++ if (!vaddr) { + pr_warn("%s Couldn't map %ld pfns rc:%d\n", __func__, + nr_grant_frames, rc); + free_xenballooned_pages(nr_grant_frames, pages); + kfree(pages); + kfree(pfns); +- return rc; ++ return -ENOMEM; + } + kfree(pages); + + xen_auto_xlat_grant_frames.pfn = pfns; + xen_auto_xlat_grant_frames.count = nr_grant_frames; ++ xen_auto_xlat_grant_frames.vaddr = vaddr; + + return 0; + } diff --git a/queue-3.14/x86_64-vsyscall-fix-warn_bad_vsyscall-log-output.patch b/queue-3.14/x86_64-vsyscall-fix-warn_bad_vsyscall-log-output.patch new file mode 100644 index 00000000000..8aea333e12e --- /dev/null +++ b/queue-3.14/x86_64-vsyscall-fix-warn_bad_vsyscall-log-output.patch @@ -0,0 +1,50 @@ +From 53b884ac3745353de220d92ef792515c3ae692f0 Mon Sep 17 00:00:00 2001 +From: Andy Lutomirski +Date: Fri, 25 Jul 2014 16:30:27 -0700 +Subject: x86_64/vsyscall: Fix warn_bad_vsyscall log output + +From: Andy Lutomirski + +commit 53b884ac3745353de220d92ef792515c3ae692f0 upstream. + +This commit in Linux 3.6: + + commit c767a54ba0657e52e6edaa97cbe0b0a8bf1c1655 + Author: Joe Perches + Date: Mon May 21 19:50:07 2012 -0700 + + x86/debug: Add KERN_ to bare printks, convert printks to pr_ + +caused warn_bad_vsyscall to output garbage in the middle of the +line. Revert the bad part of it. + +The printk in question isn't actually bare; the level is "%s". + +The bug this fixes is purely cosmetic; backports are optional. + +Signed-off-by: Andy Lutomirski +Link: http://lkml.kernel.org/r/03eac1f24110bbe496ecc12a4df467e0d88466d4.1406330947.git.luto@amacapital.net +Signed-off-by: H. Peter Anvin +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/vsyscall_64.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/arch/x86/kernel/vsyscall_64.c ++++ b/arch/x86/kernel/vsyscall_64.c +@@ -125,10 +125,10 @@ static void warn_bad_vsyscall(const char + if (!show_unhandled_signals) + return; + +- pr_notice_ratelimited("%s%s[%d] %s ip:%lx cs:%lx sp:%lx ax:%lx si:%lx di:%lx\n", +- level, current->comm, task_pid_nr(current), +- message, regs->ip, regs->cs, +- regs->sp, regs->ax, regs->si, regs->di); ++ printk_ratelimited("%s%s[%d] %s ip:%lx cs:%lx sp:%lx ax:%lx si:%lx di:%lx\n", ++ level, current->comm, task_pid_nr(current), ++ message, regs->ip, regs->cs, ++ regs->sp, regs->ax, regs->si, regs->di); + } + + static int addr_to_vsyscall_nr(unsigned long addr) diff --git a/queue-3.14/xen-events-fifo-ensure-all-bitops-are-properly-aligned-even-on-x86.patch b/queue-3.14/xen-events-fifo-ensure-all-bitops-are-properly-aligned-even-on-x86.patch new file mode 100644 index 00000000000..47fa1693ffa --- /dev/null +++ b/queue-3.14/xen-events-fifo-ensure-all-bitops-are-properly-aligned-even-on-x86.patch @@ -0,0 +1,49 @@ +From dcecb8fd93a65787130a74e61fdf29932c8d85eb Mon Sep 17 00:00:00 2001 +From: David Vrabel +Date: Thu, 31 Jul 2014 16:22:25 +0100 +Subject: xen/events/fifo: ensure all bitops are properly aligned even on x86 + +From: David Vrabel + +commit dcecb8fd93a65787130a74e61fdf29932c8d85eb upstream. + +When using the FIFO-based ABI on x86_64, if the last port is at the +end of an event array page then sync_test_bit() on this port's event +word will read beyond the end of the page and in certain circumstances +this may fault. + +The fault requires the following page in the kernel's direct mapping +to be not present, which would mean: + +a) the array page is the last page of RAM; or + +b) the following page is ballooned out /and/ it has been used for a + foreign mapping by a kernel driver (such as netback or blkback) + /and/ the grant has been unmapped. + +Use the infrastructure added for arm64 to ensure that all bitops +operating on event words are unsigned long aligned. + +Signed-off-by: David Vrabel +Reviewed-by: Boris Ostrovsky +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/xen/events/events_fifo.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/drivers/xen/events/events_fifo.c ++++ b/drivers/xen/events/events_fifo.c +@@ -67,10 +67,9 @@ static event_word_t *event_array[MAX_EVE + static unsigned event_array_pages __read_mostly; + + /* +- * sync_set_bit() and friends must be unsigned long aligned on non-x86 +- * platforms. ++ * sync_set_bit() and friends must be unsigned long aligned. + */ +-#if !defined(CONFIG_X86) && BITS_PER_LONG > 32 ++#if BITS_PER_LONG > 32 + + #define BM(w) (unsigned long *)((unsigned long)w & ~0x7UL) + #define EVTCHN_FIFO_BIT(b, w) \