@@ -2466,39 +2466,31 @@ enum {
2466
2466
PPC ,
2467
2467
};
2468
2468
2469
- struct hw_vendor_info {
2470
- u16 valid ;
2471
- char oem_id [ACPI_OEM_ID_SIZE ];
2472
- char oem_table_id [ACPI_OEM_TABLE_ID_SIZE ];
2473
- int oem_pwr_table ;
2474
- };
2475
-
2476
2469
/* Hardware vendor-specific info that has its own power management modes */
2477
- static struct hw_vendor_info vendor_info [] __initdata = {
2478
- {1 , "HP " , "ProLiant" , PSS },
2479
- {1 , "ORACLE" , "X4-2 " , PPC },
2480
- {1 , "ORACLE" , "X4-2L " , PPC },
2481
- {1 , "ORACLE" , "X4-2B " , PPC },
2482
- {1 , "ORACLE" , "X3-2 " , PPC },
2483
- {1 , "ORACLE" , "X3-2L " , PPC },
2484
- {1 , "ORACLE" , "X3-2B " , PPC },
2485
- {1 , "ORACLE" , "X4470M2 " , PPC },
2486
- {1 , "ORACLE" , "X4270M3 " , PPC },
2487
- {1 , "ORACLE" , "X4270M2 " , PPC },
2488
- {1 , "ORACLE" , "X4170M2 " , PPC },
2489
- {1 , "ORACLE" , "X4170 M3" , PPC },
2490
- {1 , "ORACLE" , "X4275 M3" , PPC },
2491
- {1 , "ORACLE" , "X6-2 " , PPC },
2492
- {1 , "ORACLE" , "Sudbury " , PPC },
2493
- {0 , "" , "" },
2470
+ static struct acpi_platform_list plat_info [] __initdata = {
2471
+ {"HP " , "ProLiant" , 0 , ACPI_SIG_FADT , all_versions , 0 , PSS },
2472
+ {"ORACLE" , "X4-2 " , 0 , ACPI_SIG_FADT , all_versions , 0 , PPC },
2473
+ {"ORACLE" , "X4-2L " , 0 , ACPI_SIG_FADT , all_versions , 0 , PPC },
2474
+ {"ORACLE" , "X4-2B " , 0 , ACPI_SIG_FADT , all_versions , 0 , PPC },
2475
+ {"ORACLE" , "X3-2 " , 0 , ACPI_SIG_FADT , all_versions , 0 , PPC },
2476
+ {"ORACLE" , "X3-2L " , 0 , ACPI_SIG_FADT , all_versions , 0 , PPC },
2477
+ {"ORACLE" , "X3-2B " , 0 , ACPI_SIG_FADT , all_versions , 0 , PPC },
2478
+ {"ORACLE" , "X4470M2 " , 0 , ACPI_SIG_FADT , all_versions , 0 , PPC },
2479
+ {"ORACLE" , "X4270M3 " , 0 , ACPI_SIG_FADT , all_versions , 0 , PPC },
2480
+ {"ORACLE" , "X4270M2 " , 0 , ACPI_SIG_FADT , all_versions , 0 , PPC },
2481
+ {"ORACLE" , "X4170M2 " , 0 , ACPI_SIG_FADT , all_versions , 0 , PPC },
2482
+ {"ORACLE" , "X4170 M3" , 0 , ACPI_SIG_FADT , all_versions , 0 , PPC },
2483
+ {"ORACLE" , "X4275 M3" , 0 , ACPI_SIG_FADT , all_versions , 0 , PPC },
2484
+ {"ORACLE" , "X6-2 " , 0 , ACPI_SIG_FADT , all_versions , 0 , PPC },
2485
+ {"ORACLE" , "Sudbury " , 0 , ACPI_SIG_FADT , all_versions , 0 , PPC },
2486
+ { } /* End */
2494
2487
};
2495
2488
2496
2489
static bool __init intel_pstate_platform_pwr_mgmt_exists (void )
2497
2490
{
2498
- struct acpi_table_header hdr ;
2499
- struct hw_vendor_info * v_info ;
2500
2491
const struct x86_cpu_id * id ;
2501
2492
u64 misc_pwr ;
2493
+ int idx ;
2502
2494
2503
2495
id = x86_match_cpu (intel_pstate_cpu_oob_ids );
2504
2496
if (id ) {
@@ -2507,21 +2499,15 @@ static bool __init intel_pstate_platform_pwr_mgmt_exists(void)
2507
2499
return true;
2508
2500
}
2509
2501
2510
- if ( acpi_disabled ||
2511
- ACPI_FAILURE ( acpi_get_table_header ( ACPI_SIG_FADT , 0 , & hdr )) )
2502
+ idx = acpi_match_platform_list ( plat_info );
2503
+ if ( idx < 0 )
2512
2504
return false;
2513
2505
2514
- for (v_info = vendor_info ; v_info -> valid ; v_info ++ ) {
2515
- if (!strncmp (hdr .oem_id , v_info -> oem_id , ACPI_OEM_ID_SIZE ) &&
2516
- !strncmp (hdr .oem_table_id , v_info -> oem_table_id ,
2517
- ACPI_OEM_TABLE_ID_SIZE ))
2518
- switch (v_info -> oem_pwr_table ) {
2519
- case PSS :
2520
- return intel_pstate_no_acpi_pss ();
2521
- case PPC :
2522
- return intel_pstate_has_acpi_ppc () &&
2523
- (!force_load );
2524
- }
2506
+ switch (plat_info [idx ].data ) {
2507
+ case PSS :
2508
+ return intel_pstate_no_acpi_pss ();
2509
+ case PPC :
2510
+ return intel_pstate_has_acpi_ppc () && !force_load ;
2525
2511
}
2526
2512
2527
2513
return false;
0 commit comments