aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorToshi Kani <toshi.kani@hpe.com>2017-08-23 18:54:43 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-08-28 19:42:48 -0400
commit5aa5911a0ed9355ebb02f83de4be9ba435a45a2c (patch)
treedf42ef212db1c6944058a5114800a7b2706a27e9 /include/linux
parentcc4a41fe5541a73019a864883297bd5043aa6d98 (diff)
ACPI / blacklist: add acpi_match_platform_list()
ACPI OEM ID / OEM Table ID / Revision can be used to identify a platform based on ACPI firmware info. acpi_blacklisted(), intel_pstate_platform_pwr_mgmt_exists(), and some other funcs, have been using similar check to detect a list of platforms that require special handlings. Move the platform check in acpi_blacklisted() to a new common utility function, acpi_match_platform_list(), so that other drivers do not have to implement their own version. There is no change in functionality. Signed-off-by: Toshi Kani <toshi.kani@hpe.com> Reviewed-by: Borislav Petkov <bp@suse.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 27b4b6615263..1c8a97d8b09b 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -556,6 +556,25 @@ extern acpi_status acpi_pci_osc_control_set(acpi_handle handle,
556#define ACPI_OST_SC_DRIVER_LOAD_FAILURE 0x81 556#define ACPI_OST_SC_DRIVER_LOAD_FAILURE 0x81
557#define ACPI_OST_SC_INSERT_NOT_SUPPORTED 0x82 557#define ACPI_OST_SC_INSERT_NOT_SUPPORTED 0x82
558 558
559enum acpi_predicate {
560 all_versions,
561 less_than_or_equal,
562 equal,
563 greater_than_or_equal,
564};
565
566/* Table must be terminted by a NULL entry */
567struct acpi_platform_list {
568 char oem_id[ACPI_OEM_ID_SIZE+1];
569 char oem_table_id[ACPI_OEM_TABLE_ID_SIZE+1];
570 u32 oem_revision;
571 char *table;
572 enum acpi_predicate pred;
573 char *reason;
574 u32 data;
575};
576int acpi_match_platform_list(const struct acpi_platform_list *plat);
577
559extern void acpi_early_init(void); 578extern void acpi_early_init(void);
560extern void acpi_subsystem_init(void); 579extern void acpi_subsystem_init(void);
561 580