aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorethan zhao <ethan.zhao@oracle.com>2014-11-30 21:32:08 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-12-02 20:56:04 -0500
commit966916eabfb1726fec7ea7b69f0c7f5ce366e943 (patch)
treeb2628aa8e3637991059437d7412a340c6edc0ad3
parent493b4cd285e68d8d8d5853a2536ea06f8cabeaeb (diff)
intel_pstate: skip this driver if Sun server has _PPC method
Oracle Sun X86 servers have dynamic power capping capability that works via ACPI _PPC method etc, so skip loading this driver if Sun server has ACPI _PPC enabled. Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com> Tested-by: Linda Knippers <linda.knippers@hp.com> Acked-by: Kristen Carlson Accardi <kristen@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/cpufreq/intel_pstate.c45
1 files changed, 41 insertions, 4 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index ab2e100a1807..1405b393c93d 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1025,15 +1025,46 @@ static bool intel_pstate_no_acpi_pss(void)
1025 return true; 1025 return true;
1026} 1026}
1027 1027
1028static bool intel_pstate_has_acpi_ppc(void)
1029{
1030 int i;
1031
1032 for_each_possible_cpu(i) {
1033 struct acpi_processor *pr = per_cpu(processors, i);
1034
1035 if (!pr)
1036 continue;
1037 if (acpi_has_method(pr->handle, "_PPC"))
1038 return true;
1039 }
1040 return false;
1041}
1042
1043enum {
1044 PSS,
1045 PPC,
1046};
1047
1028struct hw_vendor_info { 1048struct hw_vendor_info {
1029 u16 valid; 1049 u16 valid;
1030 char oem_id[ACPI_OEM_ID_SIZE]; 1050 char oem_id[ACPI_OEM_ID_SIZE];
1031 char oem_table_id[ACPI_OEM_TABLE_ID_SIZE]; 1051 char oem_table_id[ACPI_OEM_TABLE_ID_SIZE];
1052 int oem_pwr_table;
1032}; 1053};
1033 1054
1034/* Hardware vendor-specific info that has its own power management modes */ 1055/* Hardware vendor-specific info that has its own power management modes */
1035static struct hw_vendor_info vendor_info[] = { 1056static struct hw_vendor_info vendor_info[] = {
1036 {1, "HP ", "ProLiant"}, 1057 {1, "HP ", "ProLiant", PSS},
1058 {1, "ORACLE", "X4-2 ", PPC},
1059 {1, "ORACLE", "X4-2L ", PPC},
1060 {1, "ORACLE", "X4-2B ", PPC},
1061 {1, "ORACLE", "X3-2 ", PPC},
1062 {1, "ORACLE", "X3-2L ", PPC},
1063 {1, "ORACLE", "X3-2B ", PPC},
1064 {1, "ORACLE", "X4470M2 ", PPC},
1065 {1, "ORACLE", "X4270M3 ", PPC},
1066 {1, "ORACLE", "X4270M2 ", PPC},
1067 {1, "ORACLE", "X4170M2 ", PPC},
1037 {0, "", ""}, 1068 {0, "", ""},
1038}; 1069};
1039 1070
@@ -1057,15 +1088,21 @@ static bool intel_pstate_platform_pwr_mgmt_exists(void)
1057 1088
1058 for (v_info = vendor_info; v_info->valid; v_info++) { 1089 for (v_info = vendor_info; v_info->valid; v_info++) {
1059 if (!strncmp(hdr.oem_id, v_info->oem_id, ACPI_OEM_ID_SIZE) && 1090 if (!strncmp(hdr.oem_id, v_info->oem_id, ACPI_OEM_ID_SIZE) &&
1060 !strncmp(hdr.oem_table_id, v_info->oem_table_id, ACPI_OEM_TABLE_ID_SIZE) && 1091 !strncmp(hdr.oem_table_id, v_info->oem_table_id,
1061 intel_pstate_no_acpi_pss()) 1092 ACPI_OEM_TABLE_ID_SIZE))
1062 return true; 1093 switch (v_info->oem_pwr_table) {
1094 case PSS:
1095 return intel_pstate_no_acpi_pss();
1096 case PPC:
1097 return intel_pstate_has_acpi_ppc();
1098 }
1063 } 1099 }
1064 1100
1065 return false; 1101 return false;
1066} 1102}
1067#else /* CONFIG_ACPI not enabled */ 1103#else /* CONFIG_ACPI not enabled */
1068static inline bool intel_pstate_platform_pwr_mgmt_exists(void) { return false; } 1104static inline bool intel_pstate_platform_pwr_mgmt_exists(void) { return false; }
1105static inline bool intel_pstate_has_acpi_ppc(void) { return false; }
1069#endif /* CONFIG_ACPI */ 1106#endif /* CONFIG_ACPI */
1070 1107
1071static int __init intel_pstate_init(void) 1108static int __init intel_pstate_init(void)