drivers/pci changes for SMBIOS and System Firmware
RFC PATCH 21/35 drivers/pci changes for SMBIOS and System Firmware
drivers/pci changes for SMBIOS and System Firmware
--- drivers/pci/dmar.c | 14 ++-- drivers/pci/hotplug/cpqphp.h | 81 +-------------- drivers/pci/hotplug/cpqphp_core.c | 207 +++++-------------------------------- drivers/pci/intel-iommu.c | 20 ++-- drivers/pci/pci-label.c | 82 +++++++-------- drivers/pci/pci.h | 2 +- drivers/pci/pcie/portdrv_pci.c | 26 +++--- drivers/pci/quirks.c | 29 ++++- 8 files changed, 120 insertions(+), 341 deletions(-)
drivers/pci/dmar.c +7 -7
@@ -34,7 +34,7 @@#include <linux/irq.h> #include <linux/interrupt.h> #include <linux/tboot.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/slab.h> #include <asm/iommu_table.h>
@@ -367,9 +367,9 @@ dmar_parse_one_rhsa(struct acpi_dmar_header *header)"Your BIOS is broken; RHSA refers to non-existent DMAR unit at %llx\n" "BIOS vendor: %s; Ver: %s; Product Version: %s\n" , drhd->reg_base_addr, -dmi_get_system_info (DMI_BIOS_VENDOR ), -dmi_get_system_info (DMI_BIOS_VERSION ), - dmi_get_system_info(DMI_PRODUCT_VERSION)); +sysfw_lookup (SYSFW_BIOS_VENDOR ), +sysfw_lookup (SYSFW_BIOS_VERSION ), + sysfw_lookup(SYSFW_PRODUCT_VERSION));return 0 ; }
@@ -629,9 +629,9 @@ static void warn_invalid_dmar(u64 addr, const char *message)"Your BIOS is broken; DMAR reported at address %llx%s!\n" "BIOS vendor: %s; Ver: %s; Product Version: %s\n" , addr, message, -dmi_get_system_info (DMI_BIOS_VENDOR ), -dmi_get_system_info (DMI_BIOS_VERSION ), - dmi_get_system_info(DMI_PRODUCT_VERSION)); +sysfw_lookup (SYSFW_BIOS_VENDOR ), +sysfw_lookup (SYSFW_BIOS_VERSION ), + sysfw_lookup(SYSFW_PRODUCT_VERSION)); }int __init check_zero_address (void )
drivers/pci/hotplug/cpqphp.h +2 -79
99 lines not on this page · raw message
drivers/pci/hotplug/cpqphp_core.c +28 -179
277 lines not on this page · raw message
drivers/pci/intel-iommu.c +10 -10
@@ -38,7 +38,7 @@#include <linux/intel-iommu.h> #include <linux/syscore_ops.h> #include <linux/tboot.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/pci-ats.h> #include <asm/cacheflush.h> #include <asm/iommu.h>
@@ -1976,9 +1976,9 @@ static int iommu_prepare_identity_map(struct pci_dev *pdev,if (end < start) {WARN (1 ,"Your BIOS is broken; RMRR ends before it starts!\n" "BIOS vendor: %s; Ver: %s; Product Version: %s\n" , -dmi_get_system_info (DMI_BIOS_VENDOR ), -dmi_get_system_info (DMI_BIOS_VERSION ), -dmi_get_system_info (DMI_PRODUCT_VERSION )); +sysfw_lookup (SYSFW_BIOS_VENDOR ), +sysfw_lookup (SYSFW_BIOS_VERSION ), +sysfw_lookup (SYSFW_PRODUCT_VERSION )); ret = -EIO ; goto error; }
@@ -1987,9 +1987,9 @@ static int iommu_prepare_identity_map(struct pci_dev *pdev,WARN (1 ,"Your BIOS is broken; RMRR exceeds permitted address width (%d bits)\n" "BIOS vendor: %s; Ver: %s; Product Version: %s\n" ,agaw_to_width (domain->agaw), -dmi_get_system_info (DMI_BIOS_VENDOR ), -dmi_get_system_info (DMI_BIOS_VERSION ), -dmi_get_system_info (DMI_PRODUCT_VERSION )); +sysfw_lookup (SYSFW_BIOS_VENDOR ), +sysfw_lookup (SYSFW_BIOS_VERSION ), +sysfw_lookup (SYSFW_PRODUCT_VERSION )); ret = -EIO ; goto error; }
@@ -3843,9 +3843,9 @@ static void __init check_tylersburg_isoch(void)if (!vtisochctrl) {WARN (1 ,"Your BIOS is broken; DMA routed to ISOCH DMAR unit but no TLB space.\n" "BIOS vendor: %s; Ver: %s; Product Version: %s\n" , -dmi_get_system_info (DMI_BIOS_VENDOR ), -dmi_get_system_info (DMI_BIOS_VERSION ), -dmi_get_system_info (DMI_PRODUCT_VERSION )); +sysfw_lookup (SYSFW_BIOS_VENDOR ), +sysfw_lookup (SYSFW_BIOS_VERSION ), +sysfw_lookup (SYSFW_PRODUCT_VERSION )); iommu_identity_mapping |=IDENTMAP_AZALIA ;return ; }
drivers/pci/pci-label.c +36 -46
119 lines not on this page · raw message
drivers/pci/pci.h +1 -1
@@ -11,7 +11,7 @@extern int pci_uevent (struct device *dev,struct kobj_uevent_env *env);extern int pci_create_sysfs_dev_files (struct pci_dev *pdev);extern void pci_remove_sysfs_dev_files (struct pci_dev *pdev); -#if !defined(CONFIG_DMI ) && !defined(CONFIG_ACPI ) +#ifndef CONFIG_ACPI static inline void pci_create_firmware_label_files (struct pci_dev *pdev) {return ; }static inline void pci_remove_firmware_label_files (struct pci_dev *pdev)
drivers/pci/pcie/portdrv_pci.c +13 -13
@@ -14,7 +14,7 @@#include <linux/init.h> #include <linux/pcieport_if.h> #include <linux/aer.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/pci-aspm.h> #include "portdrv.h"
@@ -330,7 +330,7 @@ static struct pci_driver pcie_portdriver = { .driver.pm = PCIE_PORTDRV_PM_OPS, }; -static int __init dmi_pcie_pme_disable_msi (const struct dmi_system_id *d) +static int __init id_pcie_pme_disable_msi (const struct sysfw_id *d) {pr_notice ("%s detected: will not use MSI for PCIe PME signaling\n" , d->ident);
@@ -338,20 +338,20 @@ static int __init dmi_pcie_pme_disable_msi(const struct dmi_system_id *d)return 0 ; } -static struct dmi_system_id __initdata pcie_portdrv_dmi_table[] = { +static struct sysfw_id __initdata pcie_portdrv_id_table[] = {/* * Boxes that should not use MSI for PCIe PME signaling. */ { - .callback = dmi_pcie_pme_disable_msi, - .ident ="MSI Wind U-100" , - .matches = { -DMI_MATCH (DMI_SYS_VENDOR , -"MICRO-STAR INTERNATIONAL CO., LTD" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"U-100" ), - }, - }, - {} + .callback = id_pcie_pme_disable_msi, + .ident ="MSI Wind U-100" , + .matches = { +SYSFW_MATCH (SYSFW_SYS_VENDOR , +"MICRO-STAR INTERNATIONAL CO., LTD" ), +SYSFW_MATCH (SYSFW_PRODUCT_NAME ,"U-100" ), + }, + }, + {} };static int __init pcie_portdrv_init (void )
@@ -361,7 +361,7 @@ static int __init pcie_portdrv_init(void)if (pcie_ports_disabled)return pci_register_driver (&pcie_portdriver); -dmi_check_system (pcie_portdrv_dmi_table); +sysfw_callback (pcie_portdrv_id_table); retval =pcie_port_bus_register ();if (retval) {
drivers/pci/quirks.c +23 -6
@@ -22,7 +22,7 @@#include <linux/delay.h> #include <linux/acpi.h> #include <linux/kallsyms.h> -#include <linux/dmi.h> +#include <linux/sysfw.h> #include <linux/pci-aspm.h> #include <linux/ioport.h> #include <asm/dma.h> /* isa_dma_bridge_buggy */
@@ -2343,19 +2343,36 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SERVERWORKS,DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,PCI_DEVICE_ID_AMD_8132_BRIDGE , ht_enable_msi_mapping); +static const struct sysfw_id __initdata nvenet_msi_disable_table[] = { + { + .ident ="5N32-SLI PREMIUM" , + .matches = { +SYSFW_MATCH (SYSFW_BOARD_NAME ,"P5N32-SLI PREMIUM" ), + }, + .exactmatch =1 , + }, + { + .ident ="P5N32-E SLI" , + .matches = { +SYSFW_MATCH (SYSFW_BOARD_NAME ,"P5N32-E SLI" ), + }, + .exactmatch =1 , + }, + {} +}; +/* The P5N32-SLI motherboards from Asus have a problem with msi * for the MCP55 NIC. It is not yet determined whether the msi problem * also affects other devices. As for now, turn off msi for this device. */ static void __devinit nvenet_msi_disable (struct pci_dev *dev) { -const char *board_name =dmi_get_system_info (DMI_BOARD_NAME ); +const struct sysfw_id *id; -if (board_name && - (strstr (board_name,"P5N32-SLI PREMIUM" ) || -strstr (board_name,"P5N32-E SLI" ))) { + id =sysfw_callback (nvenet_msi_disable_table); +if (id) {dev_info (&dev->dev, -"Disabling msi for MCP55 NIC on P5N32-SLI\n" ); +"Disabling msi for MCP55 NIC on %s\n" , id->ident); dev->no_msi =1 ; } }
Signature · 1 line
1.7.5.1