PCI / ACPI: Request _OSC control once for each root bridge
Subsystems (4)
PATCH 1/1 PCI / ACPI: Request _OSC control once for each root bridge
From: Rafael J. Wysocki <[email protected]>
Move the evaluation of acpi_pci_osc_control_set() (to request control of PCI Express native features) into acpi_pci_root_add() to avoid calling it many times for the same root complex with the same arguments. Additionally, check if all of the requisite _OSC support bits are set before calling acpi_pci_osc_control_set() for a given root complex.
--- drivers/acpi/pci_root.c | 31 +++++++++++++++++++++++++++++++ drivers/pci/pci.h | 8 -------- drivers/pci/pcie/aer/aerdrv.c | 1 + drivers/pci/pcie/aer/aerdrv.h | 3 --- drivers/pci/pcie/portdrv_acpi.c | 23 ++++------------------- include/linux/pci-acpi.h | 6 ++++++ include/linux/pci.h | 8 ++++++++ 7 files changed, 50 insertions(+), 30 deletions(-)
drivers/acpi/pci_root.c +31 -0
@@ -47,6 +47,11 @@ static int acpi_pci_root_add(struct acpistatic int acpi_pci_root_remove (struct acpi_device *device,int type);static int acpi_pci_root_start (struct acpi_device *device); +#define ACPI_PCIE_REQ_SUPPORT (OSC_EXT_PCI_CONFIG_SUPPORT \ + | OSC_ACTIVE_STATE_PWR_SUPPORT \ + | OSC_CLOCK_PWR_CAPABILITY_SUPPORT \ + | OSC_MSI_SUPPORT) +static const struct acpi_device_id root_device_ids[] = { {"PNP0A03" ,0 }, {"" ,0 },
@@ -566,6 +571,32 @@ static int __devinit acpi_pci_root_add(sif (flags != base_flags)acpi_pci_osc_support (root, flags); +if ((flags &ACPI_PCIE_REQ_SUPPORT ) ==ACPI_PCIE_REQ_SUPPORT ) { + flags =OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL + |OSC_PCI_EXPRESS_NATIVE_HP_CONTROL + |OSC_PCI_EXPRESS_PME_CONTROL ; + +if (pci_aer_available ()) { +if (aer_acpi_firmware_first ()) +dev_dbg (root->bus->bridge, +"PCIe errors handled by BIOS.\n" ); +else + flags |=OSC_PCI_EXPRESS_AER_CONTROL ; + } + +dev_info (root->bus->bridge, +"Requesting ACPI _OSC control (0x%02x)\n" , flags); + + status =acpi_pci_osc_control_set (device->handle, &flags, +OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL ); +if (ACPI_SUCCESS (status)) +dev_info (root->bus->bridge, +"ACPI _OSC control (0x%02x) granted\n" , flags); +else +dev_dbg (root->bus->bridge, +"ACPI _OSC request failed (code %d)\n" , status); + } +pci_acpi_add_bus_pm_notifier (device, root->bus);if (device->wakeup.flags.run_wake)device_set_run_wake (root->bus->bridge, true);
drivers/pci/pcie/portdrv_acpi.c +4 -19
@@ -33,7 +33,7 @@*/ int pcie_port_acpi_setup (struct pci_dev *port,int *srv_mask) { -acpi_status status; +struct acpi_pci_root *root;acpi_handle handle;u32 flags;
@@ -44,26 +44,11 @@ int pcie_port_acpi_setup(struct pci_devif (!handle)return -EINVAL ; - flags =OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL - |OSC_PCI_EXPRESS_NATIVE_HP_CONTROL - |OSC_PCI_EXPRESS_PME_CONTROL ; - -if (pci_aer_available ()) { -if (aer_acpi_firmware_first ()) -dev_dbg (&port->dev,"PCIe errors handled by BIOS.\n" ); -else - flags |=OSC_PCI_EXPRESS_AER_CONTROL ; - } - - status =acpi_pci_osc_control_set (handle, &flags, -OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL ); -if (ACPI_FAILURE (status)) { -dev_dbg (&port->dev,"ACPI _OSC request failed (code %d)\n" , - status); + root =acpi_pci_find_root (handle); +if (!root)return -ENODEV ; - } -dev_info (&port->dev,"ACPI _OSC control granted for 0x%02x\n" , flags); + flags = root->osc_control_set; *srv_mask =PCIE_PORT_SERVICE_VC ;if (flags &OSC_PCI_EXPRESS_NATIVE_HP_CONTROL )
drivers/pci/pci.h +0 -8
@@ -146,14 +146,6 @@ static inline void pci_no_msi(void) { }static inline void pci_msi_init_pci_dev (struct pci_dev *dev) { }#endif -#ifdef CONFIG_PCIEAER -void pci_no_aer (void ); -bool pci_aer_available (void ); -#else -static inline void pci_no_aer (void ) { } -static inline bool pci_aer_available (void ) {return false; } -#endif -static inline int pci_no_d1d2 (struct pci_dev *dev) {unsigned int parent_dstates =0 ;
include/linux/pci.h +8 -0
@@ -1002,6 +1002,14 @@ static inline int pcie_aspm_enabled(voidextern int pcie_aspm_enabled (void );#endif +#ifdef CONFIG_PCIEAER +void pci_no_aer (void ); +bool pci_aer_available (void ); +#else +static inline void pci_no_aer (void ) { } +static inline bool pci_aer_available (void ) {return false; } +#endif +#ifndef CONFIG_PCIE_ECRC static inline void pcie_set_ecrc_checking (struct pci_dev *dev) {
drivers/pci/pcie/aer/aerdrv.h +0 -3
@@ -132,7 +132,6 @@ static inline int aer_osc_setup(struct p#ifdef CONFIG_ACPI_APEI extern int pcie_aer_get_firmware_first (struct pci_dev *pci_dev); -extern bool aer_acpi_firmware_first (void );#else static inline int pcie_aer_get_firmware_first (struct pci_dev *pci_dev) {
@@ -140,8 +139,6 @@ static inline int pcie_aer_get_firmware_return pci_dev->__aer_firmware_first;return 0 ; } - -static inline bool aer_acpi_firmware_first (void ) {return false; }#endif static inline void pcie_aer_force_firmware_first(struct pci_dev *pci_dev,
include/linux/pci-acpi.h +6 -0
@@ -40,4 +40,10 @@ static inline acpi_handle acpi_find_root {return NULL ; }#endif +#ifdef CONFIG_ACPI_APEI +extern bool aer_acpi_firmware_first (void ); +#else +static inline bool aer_acpi_firmware_first (void ) {return false; } +#endif +#endif /* _PCI_ACPI_H_ */
drivers/pci/pcie/aer/aerdrv.c +1 -0
@@ -17,6 +17,7 @@#include <linux/module.h> #include <linux/pci.h> +#include <linux/pci-acpi.h> #include <linux/sched.h> #include <linux/kernel.h> #include <linux/errno.h>
PATCH 1/1 PCI / ACPI: Request _OSC control once for each root bridge (v2)
From: Rafael J. Wysocki <[email protected]>
Move the evaluation of acpi_pci_osc_control_set() (to request control of PCI Express native features) into acpi_pci_root_add() to avoid calling it many times for the same root complex with the same arguments. Additionally, check if all of the requisite _OSC support bits are set before calling acpi_pci_osc_control_set() for a given root complex.
---
Hi,
The previous version wouldn't work correctly with pcie_ports=compat.
Thanks,
Rafael
--- drivers/acpi/pci_root.c | 32 ++++++++++++++++++++++++++++++++ drivers/pci/pci.h | 8 -------- drivers/pci/pcie/aer/aerdrv.c | 1 + drivers/pci/pcie/aer/aerdrv.h | 3 --- drivers/pci/pcie/portdrv.h | 3 --- drivers/pci/pcie/portdrv_acpi.c | 23 ++++------------------- include/linux/pci-acpi.h | 6 ++++++ include/linux/pci.h | 11 +++++++++++ 8 files changed, 54 insertions(+), 33 deletions(-)
drivers/acpi/pci_root.c +32 -0
@@ -47,6 +47,11 @@ static int acpi_pci_root_add(struct acpistatic int acpi_pci_root_remove (struct acpi_device *device,int type);static int acpi_pci_root_start (struct acpi_device *device); +#define ACPI_PCIE_REQ_SUPPORT (OSC_EXT_PCI_CONFIG_SUPPORT \ + | OSC_ACTIVE_STATE_PWR_SUPPORT \ + | OSC_CLOCK_PWR_CAPABILITY_SUPPORT \ + | OSC_MSI_SUPPORT) +static const struct acpi_device_id root_device_ids[] = { {"PNP0A03" ,0 }, {"" ,0 },
@@ -566,6 +571,33 @@ static int __devinit acpi_pci_root_add(sif (flags != base_flags)acpi_pci_osc_support (root, flags); +if (!pcie_ports_disabled + && (flags &ACPI_PCIE_REQ_SUPPORT ) ==ACPI_PCIE_REQ_SUPPORT ) { + flags =OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL + |OSC_PCI_EXPRESS_NATIVE_HP_CONTROL + |OSC_PCI_EXPRESS_PME_CONTROL ; + +if (pci_aer_available ()) { +if (aer_acpi_firmware_first ()) +dev_dbg (root->bus->bridge, +"PCIe errors handled by BIOS.\n" ); +else + flags |=OSC_PCI_EXPRESS_AER_CONTROL ; + } + +dev_info (root->bus->bridge, +"Requesting ACPI _OSC control (0x%02x)\n" , flags); + + status =acpi_pci_osc_control_set (device->handle, &flags, +OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL ); +if (ACPI_SUCCESS (status)) +dev_info (root->bus->bridge, +"ACPI _OSC control (0x%02x) granted\n" , flags); +else +dev_dbg (root->bus->bridge, +"ACPI _OSC request failed (code %d)\n" , status); + } +pci_acpi_add_bus_pm_notifier (device, root->bus);if (device->wakeup.flags.run_wake)device_set_run_wake (root->bus->bridge, true);
drivers/pci/pcie/portdrv_acpi.c +4 -19
@@ -33,7 +33,7 @@*/ int pcie_port_acpi_setup (struct pci_dev *port,int *srv_mask) { -acpi_status status; +struct acpi_pci_root *root;acpi_handle handle;u32 flags;
@@ -44,26 +44,11 @@ int pcie_port_acpi_setup(struct pci_devif (!handle)return -EINVAL ; - flags =OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL - |OSC_PCI_EXPRESS_NATIVE_HP_CONTROL - |OSC_PCI_EXPRESS_PME_CONTROL ; - -if (pci_aer_available ()) { -if (aer_acpi_firmware_first ()) -dev_dbg (&port->dev,"PCIe errors handled by BIOS.\n" ); -else - flags |=OSC_PCI_EXPRESS_AER_CONTROL ; - } - - status =acpi_pci_osc_control_set (handle, &flags, -OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL ); -if (ACPI_FAILURE (status)) { -dev_dbg (&port->dev,"ACPI _OSC request failed (code %d)\n" , - status); + root =acpi_pci_find_root (handle); +if (!root)return -ENODEV ; - } -dev_info (&port->dev,"ACPI _OSC control granted for 0x%02x\n" , flags); + flags = root->osc_control_set; *srv_mask =PCIE_PORT_SERVICE_VC ;if (flags &OSC_PCI_EXPRESS_NATIVE_HP_CONTROL )
drivers/pci/pci.h +0 -8
@@ -146,14 +146,6 @@ static inline void pci_no_msi(void) { }static inline void pci_msi_init_pci_dev (struct pci_dev *dev) { }#endif -#ifdef CONFIG_PCIEAER -void pci_no_aer (void ); -bool pci_aer_available (void ); -#else -static inline void pci_no_aer (void ) { } -static inline bool pci_aer_available (void ) {return false; } -#endif -static inline int pci_no_d1d2 (struct pci_dev *dev) {unsigned int parent_dstates =0 ;
include/linux/pci.h +11 -0
@@ -993,6 +993,9 @@ extern void pci_restore_msi_state(structextern int pci_msi_enabled (void );#endif +extern bool pcie_ports_disabled; +extern bool pcie_ports_auto; +#ifndef CONFIG_PCIEASPM static inline int pcie_aspm_enabled (void ) {
@@ -1002,6 +1005,14 @@ static inline int pcie_aspm_enabled(voidextern int pcie_aspm_enabled (void );#endif +#ifdef CONFIG_PCIEAER +void pci_no_aer (void ); +bool pci_aer_available (void ); +#else +static inline void pci_no_aer (void ) { } +static inline bool pci_aer_available (void ) {return false; } +#endif +#ifndef CONFIG_PCIE_ECRC static inline void pcie_set_ecrc_checking (struct pci_dev *dev) {
drivers/pci/pcie/aer/aerdrv.h +0 -3
@@ -132,7 +132,6 @@ static inline int aer_osc_setup(struct p#ifdef CONFIG_ACPI_APEI extern int pcie_aer_get_firmware_first (struct pci_dev *pci_dev); -extern bool aer_acpi_firmware_first (void );#else static inline int pcie_aer_get_firmware_first (struct pci_dev *pci_dev) {
@@ -140,8 +139,6 @@ static inline int pcie_aer_get_firmware_return pci_dev->__aer_firmware_first;return 0 ; } - -static inline bool aer_acpi_firmware_first (void ) {return false; }#endif static inline void pcie_aer_force_firmware_first(struct pci_dev *pci_dev,
include/linux/pci-acpi.h +6 -0
@@ -40,4 +40,10 @@ static inline acpi_handle acpi_find_root {return NULL ; }#endif +#ifdef CONFIG_ACPI_APEI +extern bool aer_acpi_firmware_first (void ); +#else +static inline bool aer_acpi_firmware_first (void ) {return false; } +#endif +#endif /* _PCI_ACPI_H_ */
drivers/pci/pcie/aer/aerdrv.c +1 -0
@@ -17,6 +17,7 @@#include <linux/module.h> #include <linux/pci.h> +#include <linux/pci-acpi.h> #include <linux/sched.h> #include <linux/kernel.h> #include <linux/errno.h>
drivers/pci/pcie/portdrv.h +0 -3
@@ -20,9 +20,6 @@#define get_descriptor_id (type, service) (((type - 4) << 4) | service) -extern bool pcie_ports_disabled; -extern bool pcie_ports_auto; -extern struct bus_type pcie_port_bus_type;extern int pcie_port_device_register (struct pci_dev *dev);#ifdef CONFIG_PM
PATCH 1/1 PCI / ACPI: Request _OSC control once for each root bridge (v3)
From: Rafael J. Wysocki <[email protected]>
Move the evaluation of acpi_pci_osc_control_set() (to request control of PCI Express native features) into acpi_pci_root_add() to avoid calling it many times for the same root complex with the same arguments. Additionally, check if all of the requisite _OSC support bits are set before calling acpi_pci_osc_control_set() for a given root complex.
---
Hi,
The previous versions were buggy, because they assumed that hest_init() would be called before acpi_pci_root_init(), but that need not be the case. This version fixes the problem (hopefully, it's the last update of this patch).
Thanks,
Rafael
--- drivers/acpi/apei/hest.c | 22 +++++++++------------- drivers/acpi/pci_root.c | 35 +++++++++++++++++++++++++++++++++++ drivers/pci/pci.h | 8 -------- drivers/pci/pcie/aer/aerdrv.c | 1 + drivers/pci/pcie/aer/aerdrv.h | 3 --- drivers/pci/pcie/portdrv.h | 3 --- drivers/pci/pcie/portdrv_acpi.c | 23 ++++------------------- include/acpi/apei.h | 6 ++++++ include/linux/pci-acpi.h | 6 ++++++ include/linux/pci.h | 11 +++++++++++ 10 files changed, 72 insertions(+), 46 deletions(-)
drivers/acpi/pci_root.c +35 -0
@@ -36,6 +36,7 @@#include <linux/slab.h> #include <acpi/acpi_bus.h> #include <acpi/acpi_drivers.h> +#include <acpi/apei.h> #define PREFIX "ACPI: "
@@ -47,6 +48,11 @@ static int acpi_pci_root_add(struct acpistatic int acpi_pci_root_remove (struct acpi_device *device,int type);static int acpi_pci_root_start (struct acpi_device *device); +#define ACPI_PCIE_REQ_SUPPORT (OSC_EXT_PCI_CONFIG_SUPPORT \ + | OSC_ACTIVE_STATE_PWR_SUPPORT \ + | OSC_CLOCK_PWR_CAPABILITY_SUPPORT \ + | OSC_MSI_SUPPORT) +static const struct acpi_device_id root_device_ids[] = { {"PNP0A03" ,0 }, {"" ,0 },
@@ -566,6 +572,33 @@ static int __devinit acpi_pci_root_add(sif (flags != base_flags)acpi_pci_osc_support (root, flags); +if (!pcie_ports_disabled + && (flags &ACPI_PCIE_REQ_SUPPORT ) ==ACPI_PCIE_REQ_SUPPORT ) { + flags =OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL + |OSC_PCI_EXPRESS_NATIVE_HP_CONTROL + |OSC_PCI_EXPRESS_PME_CONTROL ; + +if (pci_aer_available ()) { +if (aer_acpi_firmware_first ()) +dev_dbg (root->bus->bridge, +"PCIe errors handled by BIOS.\n" ); +else + flags |=OSC_PCI_EXPRESS_AER_CONTROL ; + } + +dev_info (root->bus->bridge, +"Requesting ACPI _OSC control (0x%02x)\n" , flags); + + status =acpi_pci_osc_control_set (device->handle, &flags, +OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL ); +if (ACPI_SUCCESS (status)) +dev_info (root->bus->bridge, +"ACPI _OSC control (0x%02x) granted\n" , flags); +else +dev_dbg (root->bus->bridge, +"ACPI _OSC request failed (code %d)\n" , status); + } +pci_acpi_add_bus_pm_notifier (device, root->bus);if (device->wakeup.flags.run_wake)device_set_run_wake (root->bus->bridge, true);
@@ -603,6 +636,8 @@ static int __init acpi_pci_root_init(voiif (acpi_pci_disabled)return 0 ; +acpi_hest_init (); +pci_acpi_crs_quirks ();if (acpi_bus_register_driver (&acpi_pci_root_driver) <0 )return -ENODEV ;
drivers/pci/pcie/portdrv_acpi.c +4 -19
@@ -33,7 +33,7 @@*/ int pcie_port_acpi_setup (struct pci_dev *port,int *srv_mask) { -acpi_status status; +struct acpi_pci_root *root;acpi_handle handle;u32 flags;
@@ -44,26 +44,11 @@ int pcie_port_acpi_setup(struct pci_devif (!handle)return -EINVAL ; - flags =OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL - |OSC_PCI_EXPRESS_NATIVE_HP_CONTROL - |OSC_PCI_EXPRESS_PME_CONTROL ; - -if (pci_aer_available ()) { -if (aer_acpi_firmware_first ()) -dev_dbg (&port->dev,"PCIe errors handled by BIOS.\n" ); -else - flags |=OSC_PCI_EXPRESS_AER_CONTROL ; - } - - status =acpi_pci_osc_control_set (handle, &flags, -OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL ); -if (ACPI_FAILURE (status)) { -dev_dbg (&port->dev,"ACPI _OSC request failed (code %d)\n" , - status); + root =acpi_pci_find_root (handle); +if (!root)return -ENODEV ; - } -dev_info (&port->dev,"ACPI _OSC control granted for 0x%02x\n" , flags); + flags = root->osc_control_set; *srv_mask =PCIE_PORT_SERVICE_VC ;if (flags &OSC_PCI_EXPRESS_NATIVE_HP_CONTROL )
drivers/pci/pci.h +0 -8
@@ -146,14 +146,6 @@ static inline void pci_no_msi(void) { }static inline void pci_msi_init_pci_dev (struct pci_dev *dev) { }#endif -#ifdef CONFIG_PCIEAER -void pci_no_aer (void ); -bool pci_aer_available (void ); -#else -static inline void pci_no_aer (void ) { } -static inline bool pci_aer_available (void ) {return false; } -#endif -static inline int pci_no_d1d2 (struct pci_dev *dev) {unsigned int parent_dstates =0 ;
include/linux/pci.h +11 -0
@@ -993,6 +993,9 @@ extern void pci_restore_msi_state(structextern int pci_msi_enabled (void );#endif +extern bool pcie_ports_disabled; +extern bool pcie_ports_auto; +#ifndef CONFIG_PCIEASPM static inline int pcie_aspm_enabled (void ) {
@@ -1002,6 +1005,14 @@ static inline int pcie_aspm_enabled(voidextern int pcie_aspm_enabled (void );#endif +#ifdef CONFIG_PCIEAER +void pci_no_aer (void ); +bool pci_aer_available (void ); +#else +static inline void pci_no_aer (void ) { } +static inline bool pci_aer_available (void ) {return false; } +#endif +#ifndef CONFIG_PCIE_ECRC static inline void pcie_set_ecrc_checking (struct pci_dev *dev) {
drivers/pci/pcie/aer/aerdrv.h +0 -3
@@ -132,7 +132,6 @@ static inline int aer_osc_setup(struct p#ifdef CONFIG_ACPI_APEI extern int pcie_aer_get_firmware_first (struct pci_dev *pci_dev); -extern bool aer_acpi_firmware_first (void );#else static inline int pcie_aer_get_firmware_first (struct pci_dev *pci_dev) {
@@ -140,8 +139,6 @@ static inline int pcie_aer_get_firmware_return pci_dev->__aer_firmware_first;return 0 ; } - -static inline bool aer_acpi_firmware_first (void ) {return false; }#endif static inline void pcie_aer_force_firmware_first(struct pci_dev *pci_dev,
include/linux/pci-acpi.h +6 -0
@@ -40,4 +40,10 @@ static inline acpi_handle acpi_find_root {return NULL ; }#endif +#ifdef CONFIG_ACPI_APEI +extern bool aer_acpi_firmware_first (void ); +#else +static inline bool aer_acpi_firmware_first (void ) {return false; } +#endif +#endif /* _PCI_ACPI_H_ */
drivers/pci/pcie/aer/aerdrv.c +1 -0
@@ -17,6 +17,7 @@#include <linux/module.h> #include <linux/pci.h> +#include <linux/pci-acpi.h> #include <linux/sched.h> #include <linux/kernel.h> #include <linux/errno.h>
drivers/pci/pcie/portdrv.h +0 -3
@@ -20,9 +20,6 @@#define get_descriptor_id (type, service) (((type - 4) << 4) | service) -extern bool pcie_ports_disabled; -extern bool pcie_ports_auto; -extern struct bus_type pcie_port_bus_type;extern int pcie_port_device_register (struct pci_dev *dev);#ifdef CONFIG_PM
drivers/acpi/apei/hest.c +9 -13
@@ -195,24 +195,24 @@ static int __init setup_hest_disable(cha__setup ("hest_disable" , setup_hest_disable); -static int __init hest_init (void ) +void __init acpi_hest_init (void ) {acpi_status status;int rc = -ENODEV ;unsigned int ghes_count =0 ;if (acpi_disabled) - goto err; +return ;if (hest_disable) { -pr_info (HEST_PFX "HEST tabling parsing is disabled.\n" ); - goto err; +pr_info (HEST_PFX "Table parsing disabled.\n" ); +return ; } status =acpi_get_table (ACPI_SIG_HEST ,0 , (struct acpi_table_header **)&hest_tab);if (status ==AE_NOT_FOUND ) { -pr_info (HEST_PFX "Table is not found!\n" ); +pr_info (HEST_PFX "Table not found.\n" ); goto err; }else if (ACPI_FAILURE (status)) {const char *msg =acpi_format_exception (status);
@@ -226,15 +226,11 @@ static int __init hest_init(void) goto err; rc =hest_ghes_dev_register (ghes_count); -if (rc) - goto err; - -pr_info (HEST_PFX "HEST table parsing is initialized.\n" ); +if (!rc) { +pr_info (HEST_PFX "Table parsing has been initialized.\n" ); +return ; + } -return 0 ; err: hest_disable =1 ; -return rc; } - -subsys_initcall (hest_init);
include/acpi/apei.h +6 -0
@@ -19,6 +19,12 @@extern int hest_disable;extern int erst_disable; +#ifdef CONFIG_ACPI_APEI +void __init acpi_hest_init (void ); +#else +static inline void acpi_hest_init (void ) {return ; } +#endif +typedef int (*apei_hest_func_t )(struct acpi_hest_header *hest_hdr,void *data);int apei_hest_parse (apei_hest_func_t func,void *data);