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>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
cc4a41fe55
commit
5aa5911a0e
@@ -556,6 +556,25 @@ extern acpi_status acpi_pci_osc_control_set(acpi_handle handle,
|
||||
#define ACPI_OST_SC_DRIVER_LOAD_FAILURE 0x81
|
||||
#define ACPI_OST_SC_INSERT_NOT_SUPPORTED 0x82
|
||||
|
||||
enum acpi_predicate {
|
||||
all_versions,
|
||||
less_than_or_equal,
|
||||
equal,
|
||||
greater_than_or_equal,
|
||||
};
|
||||
|
||||
/* Table must be terminted by a NULL entry */
|
||||
struct acpi_platform_list {
|
||||
char oem_id[ACPI_OEM_ID_SIZE+1];
|
||||
char oem_table_id[ACPI_OEM_TABLE_ID_SIZE+1];
|
||||
u32 oem_revision;
|
||||
char *table;
|
||||
enum acpi_predicate pred;
|
||||
char *reason;
|
||||
u32 data;
|
||||
};
|
||||
int acpi_match_platform_list(const struct acpi_platform_list *plat);
|
||||
|
||||
extern void acpi_early_init(void);
|
||||
extern void acpi_subsystem_init(void);
|
||||
|
||||
|
Reference in New Issue
Block a user