aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/include/asm/topology.h12
-rw-r--r--arch/x86/kernel/cpu/intel.c7
-rw-r--r--arch/x86/platform/atom/punit_atom_debug.c5
-rw-r--r--drivers/acpi/acpi_lpss.c5
-rw-r--r--drivers/cpufreq/intel_pstate.c37
-rw-r--r--drivers/idle/intel_idle.c147
-rw-r--r--drivers/mmc/host/sdhci-acpi.c3
-rw-r--r--drivers/platform/x86/intel_telemetry_debugfs.c3
-rw-r--r--drivers/platform/x86/intel_telemetry_pltdrv.c3
-rw-r--r--drivers/powercap/intel_rapl.c50
-rw-r--r--drivers/thermal/intel_soc_dts_thermal.c4
11 files changed, 146 insertions, 130 deletions
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index 7f991bd5031b..c9a4ed73aef4 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -25,16 +25,6 @@
25#ifndef _ASM_X86_TOPOLOGY_H 25#ifndef _ASM_X86_TOPOLOGY_H
26#define _ASM_X86_TOPOLOGY_H 26#define _ASM_X86_TOPOLOGY_H
27 27
28#ifdef CONFIG_X86_32
29# ifdef CONFIG_SMP
30# define ENABLE_TOPO_DEFINES
31# endif
32#else
33# ifdef CONFIG_SMP
34# define ENABLE_TOPO_DEFINES
35# endif
36#endif
37
38/* 28/*
39 * to preserve the visibility of NUMA_NO_NODE definition, 29 * to preserve the visibility of NUMA_NO_NODE definition,
40 * moved to there from here. May be used independent of 30 * moved to there from here. May be used independent of
@@ -123,7 +113,7 @@ extern const struct cpumask *cpu_coregroup_mask(int cpu);
123#define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id) 113#define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id)
124#define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id) 114#define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id)
125 115
126#ifdef ENABLE_TOPO_DEFINES 116#ifdef CONFIG_SMP
127#define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu)) 117#define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu))
128#define topology_sibling_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu)) 118#define topology_sibling_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu))
129 119
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index 6e2ffbebbcdb..c1a89bc026ac 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -300,15 +300,14 @@ static void intel_workarounds(struct cpuinfo_x86 *c)
300 } 300 }
301 301
302 /* 302 /*
303 * P4 Xeon errata 037 workaround. 303 * P4 Xeon erratum 037 workaround.
304 * Hardware prefetcher may cause stale data to be loaded into the cache. 304 * Hardware prefetcher may cause stale data to be loaded into the cache.
305 */ 305 */
306 if ((c->x86 == 15) && (c->x86_model == 1) && (c->x86_mask == 1)) { 306 if ((c->x86 == 15) && (c->x86_model == 1) && (c->x86_mask == 1)) {
307 if (msr_set_bit(MSR_IA32_MISC_ENABLE, 307 if (msr_set_bit(MSR_IA32_MISC_ENABLE,
308 MSR_IA32_MISC_ENABLE_PREFETCH_DISABLE_BIT) 308 MSR_IA32_MISC_ENABLE_PREFETCH_DISABLE_BIT) > 0) {
309 > 0) {
310 pr_info("CPU: C0 stepping P4 Xeon detected.\n"); 309 pr_info("CPU: C0 stepping P4 Xeon detected.\n");
311 pr_info("CPU: Disabling hardware prefetching (Errata 037)\n"); 310 pr_info("CPU: Disabling hardware prefetching (Erratum 037)\n");
312 } 311 }
313 } 312 }
314 313
diff --git a/arch/x86/platform/atom/punit_atom_debug.c b/arch/x86/platform/atom/punit_atom_debug.c
index 81c769e80614..109782996867 100644
--- a/arch/x86/platform/atom/punit_atom_debug.c
+++ b/arch/x86/platform/atom/punit_atom_debug.c
@@ -23,6 +23,7 @@
23#include <linux/seq_file.h> 23#include <linux/seq_file.h>
24#include <linux/io.h> 24#include <linux/io.h>
25#include <asm/cpu_device_id.h> 25#include <asm/cpu_device_id.h>
26#include <asm/intel-family.h>
26#include <asm/iosf_mbi.h> 27#include <asm/iosf_mbi.h>
27 28
28/* Power gate status reg */ 29/* Power gate status reg */
@@ -143,8 +144,8 @@ static void punit_dbgfs_unregister(void)
143 (kernel_ulong_t)&drv_data } 144 (kernel_ulong_t)&drv_data }
144 145
145static const struct x86_cpu_id intel_punit_cpu_ids[] = { 146static const struct x86_cpu_id intel_punit_cpu_ids[] = {
146 ICPU(55, punit_device_byt), /* Valleyview, Bay Trail */ 147 ICPU(INTEL_FAM6_ATOM_SILVERMONT1, punit_device_byt),
147 ICPU(76, punit_device_cht), /* Braswell, Cherry Trail */ 148 ICPU(INTEL_FAM6_ATOM_AIRMONT, punit_device_cht),
148 {} 149 {}
149}; 150};
150 151
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index 0872d5fecb82..357a0b8f860b 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -29,6 +29,7 @@ ACPI_MODULE_NAME("acpi_lpss");
29#ifdef CONFIG_X86_INTEL_LPSS 29#ifdef CONFIG_X86_INTEL_LPSS
30 30
31#include <asm/cpu_device_id.h> 31#include <asm/cpu_device_id.h>
32#include <asm/intel-family.h>
32#include <asm/iosf_mbi.h> 33#include <asm/iosf_mbi.h>
33#include <asm/pmc_atom.h> 34#include <asm/pmc_atom.h>
34 35
@@ -229,8 +230,8 @@ static const struct lpss_device_desc bsw_spi_dev_desc = {
229#define ICPU(model) { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, } 230#define ICPU(model) { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, }
230 231
231static const struct x86_cpu_id lpss_cpu_ids[] = { 232static const struct x86_cpu_id lpss_cpu_ids[] = {
232 ICPU(0x37), /* Valleyview, Bay Trail */ 233 ICPU(INTEL_FAM6_ATOM_SILVERMONT1), /* Valleyview, Bay Trail */
233 ICPU(0x4c), /* Braswell, Cherry Trail */ 234 ICPU(INTEL_FAM6_ATOM_AIRMONT), /* Braswell, Cherry Trail */
234 {} 235 {}
235}; 236};
236 237
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index fe9dc17ea873..a2f7b176f225 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -35,6 +35,7 @@
35#include <asm/msr.h> 35#include <asm/msr.h>
36#include <asm/cpu_device_id.h> 36#include <asm/cpu_device_id.h>
37#include <asm/cpufeature.h> 37#include <asm/cpufeature.h>
38#include <asm/intel-family.h>
38 39
39#define ATOM_RATIOS 0x66a 40#define ATOM_RATIOS 0x66a
40#define ATOM_VIDS 0x66b 41#define ATOM_VIDS 0x66b
@@ -1334,29 +1335,29 @@ static void intel_pstate_update_util(struct update_util_data *data, u64 time,
1334 (unsigned long)&policy } 1335 (unsigned long)&policy }
1335 1336
1336static const struct x86_cpu_id intel_pstate_cpu_ids[] = { 1337static const struct x86_cpu_id intel_pstate_cpu_ids[] = {
1337 ICPU(0x2a, core_params), 1338 ICPU(INTEL_FAM6_SANDYBRIDGE, core_params),
1338 ICPU(0x2d, core_params), 1339 ICPU(INTEL_FAM6_SANDYBRIDGE_X, core_params),
1339 ICPU(0x37, silvermont_params), 1340 ICPU(INTEL_FAM6_ATOM_SILVERMONT1, silvermont_params),
1340 ICPU(0x3a, core_params), 1341 ICPU(INTEL_FAM6_IVYBRIDGE, core_params),
1341 ICPU(0x3c, core_params), 1342 ICPU(INTEL_FAM6_HASWELL_CORE, core_params),
1342 ICPU(0x3d, core_params), 1343 ICPU(INTEL_FAM6_BROADWELL_CORE, core_params),
1343 ICPU(0x3e, core_params), 1344 ICPU(INTEL_FAM6_IVYBRIDGE_X, core_params),
1344 ICPU(0x3f, core_params), 1345 ICPU(INTEL_FAM6_HASWELL_X, core_params),
1345 ICPU(0x45, core_params), 1346 ICPU(INTEL_FAM6_HASWELL_ULT, core_params),
1346 ICPU(0x46, core_params), 1347 ICPU(INTEL_FAM6_HASWELL_GT3E, core_params),
1347 ICPU(0x47, core_params), 1348 ICPU(INTEL_FAM6_BROADWELL_GT3E, core_params),
1348 ICPU(0x4c, airmont_params), 1349 ICPU(INTEL_FAM6_ATOM_AIRMONT, airmont_params),
1349 ICPU(0x4e, core_params), 1350 ICPU(INTEL_FAM6_SKYLAKE_MOBILE, core_params),
1350 ICPU(0x4f, core_params), 1351 ICPU(INTEL_FAM6_BROADWELL_X, core_params),
1351 ICPU(0x5e, core_params), 1352 ICPU(INTEL_FAM6_SKYLAKE_DESKTOP, core_params),
1352 ICPU(0x56, core_params), 1353 ICPU(INTEL_FAM6_BROADWELL_XEON_D, core_params),
1353 ICPU(0x57, knl_params), 1354 ICPU(INTEL_FAM6_XEON_PHI_KNL, knl_params),
1354 {} 1355 {}
1355}; 1356};
1356MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids); 1357MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);
1357 1358
1358static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] = { 1359static const struct x86_cpu_id intel_pstate_cpu_oob_ids[] = {
1359 ICPU(0x56, core_params), 1360 ICPU(INTEL_FAM6_BROADWELL_XEON_D, core_params),
1360 {} 1361 {}
1361}; 1362};
1362 1363
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index c96649292b55..170ab8e01075 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -46,8 +46,6 @@
46 * to avoid complications with the lapic timer workaround. 46 * to avoid complications with the lapic timer workaround.
47 * Have not seen issues with suspend, but may need same workaround here. 47 * Have not seen issues with suspend, but may need same workaround here.
48 * 48 *
49 * There is currently no kernel-based automatic probing/loading mechanism
50 * if the driver is built as a module.
51 */ 49 */
52 50
53/* un-comment DEBUG to enable pr_debug() statements */ 51/* un-comment DEBUG to enable pr_debug() statements */
@@ -60,8 +58,9 @@
60#include <linux/sched.h> 58#include <linux/sched.h>
61#include <linux/notifier.h> 59#include <linux/notifier.h>
62#include <linux/cpu.h> 60#include <linux/cpu.h>
63#include <linux/module.h> 61#include <linux/moduleparam.h>
64#include <asm/cpu_device_id.h> 62#include <asm/cpu_device_id.h>
63#include <asm/intel-family.h>
65#include <asm/mwait.h> 64#include <asm/mwait.h>
66#include <asm/msr.h> 65#include <asm/msr.h>
67 66
@@ -827,6 +826,35 @@ static struct cpuidle_state bxt_cstates[] = {
827 .enter = NULL } 826 .enter = NULL }
828}; 827};
829 828
829static struct cpuidle_state dnv_cstates[] = {
830 {
831 .name = "C1-DNV",
832 .desc = "MWAIT 0x00",
833 .flags = MWAIT2flg(0x00),
834 .exit_latency = 2,
835 .target_residency = 2,
836 .enter = &intel_idle,
837 .enter_freeze = intel_idle_freeze, },
838 {
839 .name = "C1E-DNV",
840 .desc = "MWAIT 0x01",
841 .flags = MWAIT2flg(0x01),
842 .exit_latency = 10,
843 .target_residency = 20,
844 .enter = &intel_idle,
845 .enter_freeze = intel_idle_freeze, },
846 {
847 .name = "C6-DNV",
848 .desc = "MWAIT 0x20",
849 .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED,
850 .exit_latency = 50,
851 .target_residency = 500,
852 .enter = &intel_idle,
853 .enter_freeze = intel_idle_freeze, },
854 {
855 .enter = NULL }
856};
857
830/** 858/**
831 * intel_idle 859 * intel_idle
832 * @dev: cpuidle_device 860 * @dev: cpuidle_device
@@ -1016,45 +1044,50 @@ static const struct idle_cpu idle_cpu_bxt = {
1016 .disable_promotion_to_c1e = true, 1044 .disable_promotion_to_c1e = true,
1017}; 1045};
1018 1046
1047static const struct idle_cpu idle_cpu_dnv = {
1048 .state_table = dnv_cstates,
1049 .disable_promotion_to_c1e = true,
1050};
1051
1019#define ICPU(model, cpu) \ 1052#define ICPU(model, cpu) \
1020 { X86_VENDOR_INTEL, 6, model, X86_FEATURE_MWAIT, (unsigned long)&cpu } 1053 { X86_VENDOR_INTEL, 6, model, X86_FEATURE_MWAIT, (unsigned long)&cpu }
1021 1054
1022static const struct x86_cpu_id intel_idle_ids[] __initconst = { 1055static const struct x86_cpu_id intel_idle_ids[] __initconst = {
1023 ICPU(0x1a, idle_cpu_nehalem), 1056 ICPU(INTEL_FAM6_NEHALEM_EP, idle_cpu_nehalem),
1024 ICPU(0x1e, idle_cpu_nehalem), 1057 ICPU(INTEL_FAM6_NEHALEM, idle_cpu_nehalem),
1025 ICPU(0x1f, idle_cpu_nehalem), 1058 ICPU(INTEL_FAM6_WESTMERE2, idle_cpu_nehalem),
1026 ICPU(0x25, idle_cpu_nehalem), 1059 ICPU(INTEL_FAM6_WESTMERE, idle_cpu_nehalem),
1027 ICPU(0x2c, idle_cpu_nehalem), 1060 ICPU(INTEL_FAM6_WESTMERE_EP, idle_cpu_nehalem),
1028 ICPU(0x2e, idle_cpu_nehalem), 1061 ICPU(INTEL_FAM6_NEHALEM_EX, idle_cpu_nehalem),
1029 ICPU(0x1c, idle_cpu_atom), 1062 ICPU(INTEL_FAM6_ATOM_PINEVIEW, idle_cpu_atom),
1030 ICPU(0x26, idle_cpu_lincroft), 1063 ICPU(INTEL_FAM6_ATOM_LINCROFT, idle_cpu_lincroft),
1031 ICPU(0x2f, idle_cpu_nehalem), 1064 ICPU(INTEL_FAM6_WESTMERE_EX, idle_cpu_nehalem),
1032 ICPU(0x2a, idle_cpu_snb), 1065 ICPU(INTEL_FAM6_SANDYBRIDGE, idle_cpu_snb),
1033 ICPU(0x2d, idle_cpu_snb), 1066 ICPU(INTEL_FAM6_SANDYBRIDGE_X, idle_cpu_snb),
1034 ICPU(0x36, idle_cpu_atom), 1067 ICPU(INTEL_FAM6_ATOM_CEDARVIEW, idle_cpu_atom),
1035 ICPU(0x37, idle_cpu_byt), 1068 ICPU(INTEL_FAM6_ATOM_SILVERMONT1, idle_cpu_byt),
1036 ICPU(0x4c, idle_cpu_cht), 1069 ICPU(INTEL_FAM6_ATOM_AIRMONT, idle_cpu_cht),
1037 ICPU(0x3a, idle_cpu_ivb), 1070 ICPU(INTEL_FAM6_IVYBRIDGE, idle_cpu_ivb),
1038 ICPU(0x3e, idle_cpu_ivt), 1071 ICPU(INTEL_FAM6_IVYBRIDGE_X, idle_cpu_ivt),
1039 ICPU(0x3c, idle_cpu_hsw), 1072 ICPU(INTEL_FAM6_HASWELL_CORE, idle_cpu_hsw),
1040 ICPU(0x3f, idle_cpu_hsw), 1073 ICPU(INTEL_FAM6_HASWELL_X, idle_cpu_hsw),
1041 ICPU(0x45, idle_cpu_hsw), 1074 ICPU(INTEL_FAM6_HASWELL_ULT, idle_cpu_hsw),
1042 ICPU(0x46, idle_cpu_hsw), 1075 ICPU(INTEL_FAM6_HASWELL_GT3E, idle_cpu_hsw),
1043 ICPU(0x4d, idle_cpu_avn), 1076 ICPU(INTEL_FAM6_ATOM_SILVERMONT2, idle_cpu_avn),
1044 ICPU(0x3d, idle_cpu_bdw), 1077 ICPU(INTEL_FAM6_BROADWELL_CORE, idle_cpu_bdw),
1045 ICPU(0x47, idle_cpu_bdw), 1078 ICPU(INTEL_FAM6_BROADWELL_GT3E, idle_cpu_bdw),
1046 ICPU(0x4f, idle_cpu_bdw), 1079 ICPU(INTEL_FAM6_BROADWELL_X, idle_cpu_bdw),
1047 ICPU(0x56, idle_cpu_bdw), 1080 ICPU(INTEL_FAM6_BROADWELL_XEON_D, idle_cpu_bdw),
1048 ICPU(0x4e, idle_cpu_skl), 1081 ICPU(INTEL_FAM6_SKYLAKE_MOBILE, idle_cpu_skl),
1049 ICPU(0x5e, idle_cpu_skl), 1082 ICPU(INTEL_FAM6_SKYLAKE_DESKTOP, idle_cpu_skl),
1050 ICPU(0x8e, idle_cpu_skl), 1083 ICPU(INTEL_FAM6_KABYLAKE_MOBILE, idle_cpu_skl),
1051 ICPU(0x9e, idle_cpu_skl), 1084 ICPU(INTEL_FAM6_KABYLAKE_DESKTOP, idle_cpu_skl),
1052 ICPU(0x55, idle_cpu_skx), 1085 ICPU(INTEL_FAM6_SKYLAKE_X, idle_cpu_skx),
1053 ICPU(0x57, idle_cpu_knl), 1086 ICPU(INTEL_FAM6_XEON_PHI_KNL, idle_cpu_knl),
1054 ICPU(0x5c, idle_cpu_bxt), 1087 ICPU(INTEL_FAM6_ATOM_GOLDMONT, idle_cpu_bxt),
1088 ICPU(INTEL_FAM6_ATOM_DENVERTON, idle_cpu_dnv),
1055 {} 1089 {}
1056}; 1090};
1057MODULE_DEVICE_TABLE(x86cpu, intel_idle_ids);
1058 1091
1059/* 1092/*
1060 * intel_idle_probe() 1093 * intel_idle_probe()
@@ -1261,13 +1294,13 @@ static void intel_idle_state_table_update(void)
1261{ 1294{
1262 switch (boot_cpu_data.x86_model) { 1295 switch (boot_cpu_data.x86_model) {
1263 1296
1264 case 0x3e: /* IVT */ 1297 case INTEL_FAM6_IVYBRIDGE_X:
1265 ivt_idle_state_table_update(); 1298 ivt_idle_state_table_update();
1266 break; 1299 break;
1267 case 0x5c: /* BXT */ 1300 case INTEL_FAM6_ATOM_GOLDMONT:
1268 bxt_idle_state_table_update(); 1301 bxt_idle_state_table_update();
1269 break; 1302 break;
1270 case 0x5e: /* SKL-H */ 1303 case INTEL_FAM6_SKYLAKE_DESKTOP:
1271 sklh_idle_state_table_update(); 1304 sklh_idle_state_table_update();
1272 break; 1305 break;
1273 } 1306 }
@@ -1415,34 +1448,12 @@ static int __init intel_idle_init(void)
1415 1448
1416 return 0; 1449 return 0;
1417} 1450}
1451device_initcall(intel_idle_init);
1418 1452
1419static void __exit intel_idle_exit(void) 1453/*
1420{ 1454 * We are not really modular, but we used to support that. Meaning we also
1421 struct cpuidle_device *dev; 1455 * support "intel_idle.max_cstate=..." at boot and also a read-only export of
1422 int i; 1456 * it at /sys/module/intel_idle/parameters/max_cstate -- so using module_param
1423 1457 * is the easiest way (currently) to continue doing that.
1424 cpu_notifier_register_begin(); 1458 */
1425
1426 if (lapic_timer_reliable_states != LAPIC_TIMER_ALWAYS_RELIABLE)
1427 on_each_cpu(__setup_broadcast_timer, (void *)false, 1);
1428 __unregister_cpu_notifier(&cpu_hotplug_notifier);
1429
1430 for_each_possible_cpu(i) {
1431 dev = per_cpu_ptr(intel_idle_cpuidle_devices, i);
1432 cpuidle_unregister_device(dev);
1433 }
1434
1435 cpu_notifier_register_done();
1436
1437 cpuidle_unregister_driver(&intel_idle_driver);
1438 free_percpu(intel_idle_cpuidle_devices);
1439}
1440
1441module_init(intel_idle_init);
1442module_exit(intel_idle_exit);
1443
1444module_param(max_cstate, int, 0444); 1459module_param(max_cstate, int, 0444);
1445
1446MODULE_AUTHOR("Len Brown <len.brown@intel.com>");
1447MODULE_DESCRIPTION("Cpuidle driver for Intel Hardware v" INTEL_IDLE_VERSION);
1448MODULE_LICENSE("GPL");
diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index 458ffb7637e5..008709c5cb09 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -43,6 +43,7 @@
43 43
44#ifdef CONFIG_X86 44#ifdef CONFIG_X86
45#include <asm/cpu_device_id.h> 45#include <asm/cpu_device_id.h>
46#include <asm/intel-family.h>
46#include <asm/iosf_mbi.h> 47#include <asm/iosf_mbi.h>
47#endif 48#endif
48 49
@@ -126,7 +127,7 @@ static const struct sdhci_acpi_chip sdhci_acpi_chip_int = {
126static bool sdhci_acpi_byt(void) 127static bool sdhci_acpi_byt(void)
127{ 128{
128 static const struct x86_cpu_id byt[] = { 129 static const struct x86_cpu_id byt[] = {
129 { X86_VENDOR_INTEL, 6, 0x37 }, 130 { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_SILVERMONT1 },
130 {} 131 {}
131 }; 132 };
132 133
diff --git a/drivers/platform/x86/intel_telemetry_debugfs.c b/drivers/platform/x86/intel_telemetry_debugfs.c
index f5134acd6ff0..815a7c5e9566 100644
--- a/drivers/platform/x86/intel_telemetry_debugfs.c
+++ b/drivers/platform/x86/intel_telemetry_debugfs.c
@@ -32,6 +32,7 @@
32#include <linux/suspend.h> 32#include <linux/suspend.h>
33 33
34#include <asm/cpu_device_id.h> 34#include <asm/cpu_device_id.h>
35#include <asm/intel-family.h>
35#include <asm/intel_pmc_ipc.h> 36#include <asm/intel_pmc_ipc.h>
36#include <asm/intel_punit_ipc.h> 37#include <asm/intel_punit_ipc.h>
37#include <asm/intel_telemetry.h> 38#include <asm/intel_telemetry.h>
@@ -331,7 +332,7 @@ static struct telemetry_debugfs_conf telem_apl_debugfs_conf = {
331}; 332};
332 333
333static const struct x86_cpu_id telemetry_debugfs_cpu_ids[] = { 334static const struct x86_cpu_id telemetry_debugfs_cpu_ids[] = {
334 TELEM_DEBUGFS_CPU(0x5c, telem_apl_debugfs_conf), 335 TELEM_DEBUGFS_CPU(INTEL_FAM6_ATOM_GOLDMONT, telem_apl_debugfs_conf),
335 {} 336 {}
336}; 337};
337 338
diff --git a/drivers/platform/x86/intel_telemetry_pltdrv.c b/drivers/platform/x86/intel_telemetry_pltdrv.c
index 09c84a2b1c2c..6d884f7d1b9f 100644
--- a/drivers/platform/x86/intel_telemetry_pltdrv.c
+++ b/drivers/platform/x86/intel_telemetry_pltdrv.c
@@ -28,6 +28,7 @@
28#include <linux/platform_device.h> 28#include <linux/platform_device.h>
29 29
30#include <asm/cpu_device_id.h> 30#include <asm/cpu_device_id.h>
31#include <asm/intel-family.h>
31#include <asm/intel_pmc_ipc.h> 32#include <asm/intel_pmc_ipc.h>
32#include <asm/intel_punit_ipc.h> 33#include <asm/intel_punit_ipc.h>
33#include <asm/intel_telemetry.h> 34#include <asm/intel_telemetry.h>
@@ -163,7 +164,7 @@ static struct telemetry_plt_config telem_apl_config = {
163}; 164};
164 165
165static const struct x86_cpu_id telemetry_cpu_ids[] = { 166static const struct x86_cpu_id telemetry_cpu_ids[] = {
166 TELEM_CPU(0x5c, telem_apl_config), 167 TELEM_CPU(INTEL_FAM6_ATOM_GOLDMONT, telem_apl_config),
167 {} 168 {}
168}; 169};
169 170
diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c
index b2766b867b0e..2e8f2be5b6f9 100644
--- a/drivers/powercap/intel_rapl.c
+++ b/drivers/powercap/intel_rapl.c
@@ -33,6 +33,7 @@
33 33
34#include <asm/processor.h> 34#include <asm/processor.h>
35#include <asm/cpu_device_id.h> 35#include <asm/cpu_device_id.h>
36#include <asm/intel-family.h>
36 37
37/* Local defines */ 38/* Local defines */
38#define MSR_PLATFORM_POWER_LIMIT 0x0000065C 39#define MSR_PLATFORM_POWER_LIMIT 0x0000065C
@@ -1096,27 +1097,34 @@ static const struct rapl_defaults rapl_defaults_cht = {
1096 } 1097 }
1097 1098
1098static const struct x86_cpu_id rapl_ids[] __initconst = { 1099static const struct x86_cpu_id rapl_ids[] __initconst = {
1099 RAPL_CPU(0x2a, rapl_defaults_core),/* Sandy Bridge */ 1100 RAPL_CPU(INTEL_FAM6_SANDYBRIDGE, rapl_defaults_core),
1100 RAPL_CPU(0x2d, rapl_defaults_core),/* Sandy Bridge EP */ 1101 RAPL_CPU(INTEL_FAM6_SANDYBRIDGE_X, rapl_defaults_core),
1101 RAPL_CPU(0x37, rapl_defaults_byt),/* Valleyview */ 1102
1102 RAPL_CPU(0x3a, rapl_defaults_core),/* Ivy Bridge */ 1103 RAPL_CPU(INTEL_FAM6_IVYBRIDGE, rapl_defaults_core),
1103 RAPL_CPU(0x3c, rapl_defaults_core),/* Haswell */ 1104
1104 RAPL_CPU(0x3d, rapl_defaults_core),/* Broadwell */ 1105 RAPL_CPU(INTEL_FAM6_HASWELL_CORE, rapl_defaults_core),
1105 RAPL_CPU(0x3f, rapl_defaults_hsw_server),/* Haswell servers */ 1106 RAPL_CPU(INTEL_FAM6_HASWELL_ULT, rapl_defaults_core),
1106 RAPL_CPU(0x4f, rapl_defaults_hsw_server),/* Broadwell servers */ 1107 RAPL_CPU(INTEL_FAM6_HASWELL_GT3E, rapl_defaults_core),
1107 RAPL_CPU(0x45, rapl_defaults_core),/* Haswell ULT */ 1108 RAPL_CPU(INTEL_FAM6_HASWELL_X, rapl_defaults_hsw_server),
1108 RAPL_CPU(0x46, rapl_defaults_core),/* Haswell */ 1109
1109 RAPL_CPU(0x47, rapl_defaults_core),/* Broadwell-H */ 1110 RAPL_CPU(INTEL_FAM6_BROADWELL_CORE, rapl_defaults_core),
1110 RAPL_CPU(0x4E, rapl_defaults_core),/* Skylake */ 1111 RAPL_CPU(INTEL_FAM6_BROADWELL_GT3E, rapl_defaults_core),
1111 RAPL_CPU(0x4C, rapl_defaults_cht),/* Braswell/Cherryview */ 1112 RAPL_CPU(INTEL_FAM6_BROADWELL_XEON_D, rapl_defaults_core),
1112 RAPL_CPU(0x4A, rapl_defaults_tng),/* Tangier */ 1113 RAPL_CPU(INTEL_FAM6_BROADWELL_X, rapl_defaults_hsw_server),
1113 RAPL_CPU(0x56, rapl_defaults_core),/* Future Xeon */ 1114
1114 RAPL_CPU(0x5A, rapl_defaults_ann),/* Annidale */ 1115 RAPL_CPU(INTEL_FAM6_SKYLAKE_DESKTOP, rapl_defaults_core),
1115 RAPL_CPU(0X5C, rapl_defaults_core),/* Broxton */ 1116 RAPL_CPU(INTEL_FAM6_SKYLAKE_MOBILE, rapl_defaults_core),
1116 RAPL_CPU(0x5E, rapl_defaults_core),/* Skylake-H/S */ 1117 RAPL_CPU(INTEL_FAM6_SKYLAKE_X, rapl_defaults_hsw_server),
1117 RAPL_CPU(0x57, rapl_defaults_hsw_server),/* Knights Landing */ 1118 RAPL_CPU(INTEL_FAM6_KABYLAKE_MOBILE, rapl_defaults_core),
1118 RAPL_CPU(0x8E, rapl_defaults_core),/* Kabylake */ 1119 RAPL_CPU(INTEL_FAM6_KABYLAKE_DESKTOP, rapl_defaults_core),
1119 RAPL_CPU(0x9E, rapl_defaults_core),/* Kabylake */ 1120
1121 RAPL_CPU(INTEL_FAM6_ATOM_SILVERMONT1, rapl_defaults_byt),
1122 RAPL_CPU(INTEL_FAM6_ATOM_AIRMONT, rapl_defaults_cht),
1123 RAPL_CPU(INTEL_FAM6_ATOM_MERRIFIELD1, rapl_defaults_tng),
1124 RAPL_CPU(INTEL_FAM6_ATOM_MERRIFIELD2, rapl_defaults_ann),
1125 RAPL_CPU(INTEL_FAM6_ATOM_GOLDMONT, rapl_defaults_core),
1126
1127 RAPL_CPU(INTEL_FAM6_XEON_PHI_KNL, rapl_defaults_hsw_server),
1120 {} 1128 {}
1121}; 1129};
1122MODULE_DEVICE_TABLE(x86cpu, rapl_ids); 1130MODULE_DEVICE_TABLE(x86cpu, rapl_ids);
diff --git a/drivers/thermal/intel_soc_dts_thermal.c b/drivers/thermal/intel_soc_dts_thermal.c
index 4ebb31a35a64..b2bbaa1c60b0 100644
--- a/drivers/thermal/intel_soc_dts_thermal.c
+++ b/drivers/thermal/intel_soc_dts_thermal.c
@@ -18,6 +18,7 @@
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/interrupt.h> 19#include <linux/interrupt.h>
20#include <asm/cpu_device_id.h> 20#include <asm/cpu_device_id.h>
21#include <asm/intel-family.h>
21#include "intel_soc_dts_iosf.h" 22#include "intel_soc_dts_iosf.h"
22 23
23#define CRITICAL_OFFSET_FROM_TJ_MAX 5000 24#define CRITICAL_OFFSET_FROM_TJ_MAX 5000
@@ -42,7 +43,8 @@ static irqreturn_t soc_irq_thread_fn(int irq, void *dev_data)
42} 43}
43 44
44static const struct x86_cpu_id soc_thermal_ids[] = { 45static const struct x86_cpu_id soc_thermal_ids[] = {
45 { X86_VENDOR_INTEL, X86_FAMILY_ANY, 0x37, 0, BYT_SOC_DTS_APIC_IRQ}, 46 { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_SILVERMONT1, 0,
47 BYT_SOC_DTS_APIC_IRQ},
46 {} 48 {}
47}; 49};
48MODULE_DEVICE_TABLE(x86cpu, soc_thermal_ids); 50MODULE_DEVICE_TABLE(x86cpu, soc_thermal_ids);