// SPDX-License-Identifier: GPL-2.0-or-later /* * k8temp.c - Linux kernel module for hardware monitoring * * Copyright (C) 2006 Rudolf Marek <r.marek@assembler.cz> * * Inspired from the w83785 and amd756 drivers.
*/
if (model == 0xc1 || model == 0x6c || model == 0x7c) return 0;
/* * Differentiate between AM2 and ASB1. * See "Constructing the processor Name String" in "Revision * Guide for AMD NPT Family 0Fh Processors" (33610).
*/
brandidx = cpuid_ebx(0x80000001);
brandidx = (brandidx >> 9) & 0x1f;
/* Single core */ if ((model == 0x6f || model == 0x7f) &&
(brandidx == 0x7 || brandidx == 0x9 || brandidx == 0xc)) return 0;
data = devm_kzalloc(&pdev->dev, sizeof(struct k8temp_data), GFP_KERNEL); if (!data) return -ENOMEM;
model = boot_cpu_data.x86_model;
stepping = boot_cpu_data.x86_stepping;
/* feature available since SH-C0, exclude older revisions */ if ((model == 4 && stepping == 0) ||
(model == 5 && stepping <= 1)) return -ENODEV;
/* * AMD NPT family 0fh, i.e. RevF and RevG: * meaning of SEL_CORE bit is inverted
*/ if (model >= 0x40) {
data->swap_core_select = 1;
dev_warn(&pdev->dev, "Temperature readouts might be wrong - check erratum #141\n");
}
/* * RevG desktop CPUs (i.e. no socket S1G1 or ASB1 parts) need * additional offset, otherwise reported temperature is below * ambient temperature
*/ if (is_rev_g_desktop(model))
data->temp_offset = 21000;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.