diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-09-06 17:24:37 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-09-14 16:27:49 -0400 |
commit | 7ece14175376051b18a9b97f0e6125cb8b864155 (patch) | |
tree | bcfcc5f761bf26b4356634c67e74bd9ae2e44163 | |
parent | 9ff25e6b3eb0012297288dfa87930c7b62ef6ab1 (diff) |
PCI/AER: Remove aerdriver.forceload kernel parameter
Per the PCI Firmware spec, r3.0, sec 4.5.1, on ACPI systems, the OS must
not use AER unless _OSC is present and _OSC grants AER control to the OS.
The aerdriver.forceload kernel parameter was a way to enable Linux AER
support on ACPI systems that lack _OSC or fail to grant control the the OS.
Enabling Linux AER support when the firmware doesn't want us to is a recipe
for problems, e.g., the firmware might be handling AER itself.
Remove the aerdriver.forceload kernel parameter and related supporting
code.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r-- | Documentation/PCI/pcieaer-howto.txt | 22 | ||||
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv.c | 7 | ||||
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv.h | 8 | ||||
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv_core.c | 19 |
4 files changed, 10 insertions, 46 deletions
diff --git a/Documentation/PCI/pcieaer-howto.txt b/Documentation/PCI/pcieaer-howto.txt index 4956df36c59d..ea8cafba255c 100644 --- a/Documentation/PCI/pcieaer-howto.txt +++ b/Documentation/PCI/pcieaer-howto.txt | |||
@@ -49,21 +49,17 @@ depends on CONFIG_PCIEPORTBUS, so pls. set CONFIG_PCIEPORTBUS=y and | |||
49 | CONFIG_PCIEAER = y. | 49 | CONFIG_PCIEAER = y. |
50 | 50 | ||
51 | 2.2 Load PCI Express AER Root Driver | 51 | 2.2 Load PCI Express AER Root Driver |
52 | There is a case where a system has AER support in BIOS. Enabling the AER | 52 | |
53 | Root driver and having AER support in BIOS may result unpredictable | 53 | Some systems have AER support in firmware. Enabling Linux AER support at |
54 | behavior. To avoid this conflict, a successful load of the AER Root driver | 54 | the same time the firmware handles AER may result in unpredictable |
55 | requires ACPI _OSC support in the BIOS to allow the AER Root driver to | 55 | behavior. Therefore, Linux does not handle AER events unless the firmware |
56 | request for native control of AER. See the PCI FW 3.0 Specification for | 56 | grants AER control to the OS via the ACPI _OSC method. See the PCI FW 3.0 |
57 | details regarding OSC usage. Currently, lots of firmwares don't provide | 57 | Specification for details regarding _OSC usage. |
58 | _OSC support while they use PCI Express. To support such firmwares, | ||
59 | forceload, a parameter of type bool, could enable AER to continue to | ||
60 | be initiated although firmwares have no _OSC support. To enable the | ||
61 | walkaround, pls. add aerdriver.forceload=y to kernel boot parameter line | ||
62 | when booting kernel. Note that forceload=n by default. | ||
63 | 58 | ||
64 | 2.3 AER error output | 59 | 2.3 AER error output |
65 | When a PCI-E AER error is captured, an error message will be outputted to | 60 | |
66 | console. If it's a correctable error, it is outputted as a warning. | 61 | When a PCIe AER error is captured, an error message will be output to |
62 | console. If it's a correctable error, it is output as a warning. | ||
67 | Otherwise, it is printed as an error. So users could choose different | 63 | Otherwise, it is printed as an error. So users could choose different |
68 | log level to filter out correctable error messages. | 64 | log level to filter out correctable error messages. |
69 | 65 | ||
diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c index 48d21e0edd56..08ce257077db 100644 --- a/drivers/pci/pcie/aer/aerdrv.c +++ b/drivers/pci/pcie/aer/aerdrv.c | |||
@@ -70,7 +70,7 @@ static int pcie_aer_disable; | |||
70 | 70 | ||
71 | void pci_no_aer(void) | 71 | void pci_no_aer(void) |
72 | { | 72 | { |
73 | pcie_aer_disable = 1; /* has priority over 'forceload' */ | 73 | pcie_aer_disable = 1; |
74 | } | 74 | } |
75 | 75 | ||
76 | bool pci_aer_available(void) | 76 | bool pci_aer_available(void) |
@@ -304,11 +304,6 @@ static int aer_probe(struct pcie_device *dev) | |||
304 | struct aer_rpc *rpc; | 304 | struct aer_rpc *rpc; |
305 | struct device *device = &dev->device; | 305 | struct device *device = &dev->device; |
306 | 306 | ||
307 | /* Init */ | ||
308 | status = aer_init(dev); | ||
309 | if (status) | ||
310 | return status; | ||
311 | |||
312 | /* Alloc rpc data structure */ | 307 | /* Alloc rpc data structure */ |
313 | rpc = aer_alloc_rpc(dev); | 308 | rpc = aer_alloc_rpc(dev); |
314 | if (!rpc) { | 309 | if (!rpc) { |
diff --git a/drivers/pci/pcie/aer/aerdrv.h b/drivers/pci/pcie/aer/aerdrv.h index 945c939a86c5..f15ca8dc3882 100644 --- a/drivers/pci/pcie/aer/aerdrv.h +++ b/drivers/pci/pcie/aer/aerdrv.h | |||
@@ -105,7 +105,6 @@ static inline pci_ers_result_t merge_result(enum pci_ers_result orig, | |||
105 | } | 105 | } |
106 | 106 | ||
107 | extern struct bus_type pcie_port_bus_type; | 107 | extern struct bus_type pcie_port_bus_type; |
108 | int aer_init(struct pcie_device *dev); | ||
109 | void aer_isr(struct work_struct *work); | 108 | void aer_isr(struct work_struct *work); |
110 | void aer_print_error(struct pci_dev *dev, struct aer_err_info *info); | 109 | void aer_print_error(struct pci_dev *dev, struct aer_err_info *info); |
111 | void aer_print_port_info(struct pci_dev *dev, struct aer_err_info *info); | 110 | void aer_print_port_info(struct pci_dev *dev, struct aer_err_info *info); |
@@ -121,11 +120,4 @@ static inline int pcie_aer_get_firmware_first(struct pci_dev *pci_dev) | |||
121 | return 0; | 120 | return 0; |
122 | } | 121 | } |
123 | #endif | 122 | #endif |
124 | |||
125 | static inline void pcie_aer_force_firmware_first(struct pci_dev *pci_dev, | ||
126 | int enable) | ||
127 | { | ||
128 | pci_dev->__aer_firmware_first = !!enable; | ||
129 | pci_dev->__aer_firmware_first_valid = 1; | ||
130 | } | ||
131 | #endif /* _AERDRV_H_ */ | 123 | #endif /* _AERDRV_H_ */ |
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index f8a9b17da949..8262527e7fed 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c | |||
@@ -27,9 +27,6 @@ | |||
27 | #include <linux/kfifo.h> | 27 | #include <linux/kfifo.h> |
28 | #include "aerdrv.h" | 28 | #include "aerdrv.h" |
29 | 29 | ||
30 | static bool forceload; | ||
31 | module_param(forceload, bool, 0); | ||
32 | |||
33 | #define PCI_EXP_AER_FLAGS (PCI_EXP_DEVCTL_CERE | PCI_EXP_DEVCTL_NFERE | \ | 30 | #define PCI_EXP_AER_FLAGS (PCI_EXP_DEVCTL_CERE | PCI_EXP_DEVCTL_NFERE | \ |
34 | PCI_EXP_DEVCTL_FERE | PCI_EXP_DEVCTL_URRE) | 31 | PCI_EXP_DEVCTL_FERE | PCI_EXP_DEVCTL_URRE) |
35 | 32 | ||
@@ -811,19 +808,3 @@ void aer_isr(struct work_struct *work) | |||
811 | aer_isr_one_error(p_device, &e_src); | 808 | aer_isr_one_error(p_device, &e_src); |
812 | mutex_unlock(&rpc->rpc_mutex); | 809 | mutex_unlock(&rpc->rpc_mutex); |
813 | } | 810 | } |
814 | |||
815 | /** | ||
816 | * aer_init - provide AER initialization | ||
817 | * @dev: pointer to AER pcie device | ||
818 | * | ||
819 | * Invoked when AER service driver is loaded. | ||
820 | */ | ||
821 | int aer_init(struct pcie_device *dev) | ||
822 | { | ||
823 | if (forceload) { | ||
824 | dev_printk(KERN_DEBUG, &dev->device, | ||
825 | "aerdrv forceload requested.\n"); | ||
826 | pcie_aer_force_firmware_first(dev->port, 0); | ||
827 | } | ||
828 | return 0; | ||
829 | } | ||