Skip to content

Commit 02a2484

Browse files
superm1groeck
authored andcommitted
hwmon: (k10temp) Don't show Tdie for all Zen/Zen2/Zen3 CPU/APU
Tdie is an offset calculation that should only be shown when temp_offset is actually put into a table. This is useless to show for all CPU/APU. Show it only when necessary. Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
1 parent 128066c commit 02a2484

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/hwmon/k10temp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
426426
} else if (boot_cpu_data.x86 == 0x17 || boot_cpu_data.x86 == 0x18) {
427427
data->temp_adjust_mask = ZEN_CUR_TEMP_RANGE_SEL_MASK;
428428
data->read_tempreg = read_tempreg_nb_zen;
429-
data->show_temp |= BIT(TDIE_BIT); /* show Tdie */
430429
data->is_zen = true;
431430

432431
switch (boot_cpu_data.x86_model) {
@@ -446,7 +445,6 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
446445
} else if (boot_cpu_data.x86 == 0x19) {
447446
data->temp_adjust_mask = ZEN_CUR_TEMP_RANGE_SEL_MASK;
448447
data->read_tempreg = read_tempreg_nb_zen;
449-
data->show_temp |= BIT(TDIE_BIT);
450448
data->is_zen = true;
451449

452450
switch (boot_cpu_data.x86_model) {
@@ -466,6 +464,7 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id)
466464

467465
if (boot_cpu_data.x86 == entry->model &&
468466
strstr(boot_cpu_data.x86_model_id, entry->id)) {
467+
data->show_temp |= BIT(TDIE_BIT); /* show Tdie */
469468
data->temp_offset = entry->offset;
470469
break;
471470
}

0 commit comments

Comments
 (0)