···1822 thash_entries= [KNL,NET]1823 Set number of hash buckets for TCP connection1824000000000000000000001825 time Show timing data prefixed to each printk message line1826 [deprecated, see 'printk.time']1827
···1822 thash_entries= [KNL,NET]1823 Set number of hash buckets for TCP connection18241825+ thermal.act= [HW,ACPI]1826+ -1: disable all active trip points in all thermal zones1827+ <degrees C>: override all lowest active trip points1828+1829+ thermal.nocrt= [HW,ACPI]1830+ Set to disable actions on ACPI thermal zone1831+ critical and hot trip points.1832+1833+ thermal.off= [HW,ACPI]1834+ 1: disable ACPI thermal control1835+1836+ thermal.psv= [HW,ACPI]1837+ -1: disable all passive trip points1838+ <degrees C>: override all passive trip points to this value1839+1840+ thermal.tzp= [HW,ACPI]1841+ Specify global default ACPI thermal zone polling rate1842+ <deci-seconds>: poll all this frequency1843+ 0: no polling (default)1844+1845 time Show timing data prefixed to each printk message line1846 [deprecated, see 'printk.time']1847
+129-14
drivers/acpi/thermal.c
···3334#include <linux/kernel.h>35#include <linux/module.h>036#include <linux/init.h>37#include <linux/types.h>38#include <linux/proc_fs.h>···75MODULE_DESCRIPTION("ACPI Thermal Zone Driver");76MODULE_LICENSE("GPL");77000078static int tzp;79-module_param(tzp, int, 0);80MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n");0000000000008182static int acpi_thermal_add(struct acpi_device *device);83static int acpi_thermal_remove(struct acpi_device *device, int type);···356357 /* Passive: Processors (optional) */358359- status =360- acpi_evaluate_integer(tz->device->handle, "_PSV", NULL,361- &tz->trips.passive.temperature);0000000362 if (ACPI_FAILURE(status)) {363 tz->trips.passive.flags.valid = 0;364 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No passive threshold\n"));···410411 char name[5] = { '_', 'A', 'C', ('0' + i), '\0' };412413- status =414- acpi_evaluate_integer(tz->device->handle, name, NULL,415- &tz->trips.active[i].temperature);416- if (ACPI_FAILURE(status))000000000000000000000417 break;0418419 name[2] = 'L';420 status =···473474static int acpi_thermal_critical(struct acpi_thermal *tz)475{476- if (!tz || !tz->trips.critical.flags.valid)477 return -EINVAL;478479 if (tz->temperature >= tz->trips.critical.temperature) {···495496static int acpi_thermal_hot(struct acpi_thermal *tz)497{498- if (!tz || !tz->trips.hot.flags.valid)499 return -EINVAL;500501 if (tz->temperature >= tz->trips.hot.temperature) {···870 goto end;871872 if (tz->trips.critical.flags.valid)873- seq_printf(seq, "critical (S5): %ld C\n",874- KELVIN_TO_CELSIUS(tz->trips.critical.temperature));0875876 if (tz->trips.hot.flags.valid)877- seq_printf(seq, "hot (S4): %ld C\n",878- KELVIN_TO_CELSIUS(tz->trips.hot.temperature));0879880 if (tz->trips.passive.flags.valid) {881 seq_printf(seq,···1329 return AE_OK;1330}1331000000000000000000000000000000000000000000000000000000000000001332static int __init acpi_thermal_init(void)1333{1334 int result = 0;13350133600001337 acpi_thermal_dir = proc_mkdir(ACPI_THERMAL_CLASS, acpi_root_dir);1338 if (!acpi_thermal_dir)1339 return -ENODEV;
···3334#include <linux/kernel.h>35#include <linux/module.h>36+#include <linux/dmi.h>37#include <linux/init.h>38#include <linux/types.h>39#include <linux/proc_fs.h>···74MODULE_DESCRIPTION("ACPI Thermal Zone Driver");75MODULE_LICENSE("GPL");7677+static int act;78+module_param(act, int, 0644);79+MODULE_PARM_DESC(act, "Disable or override all lowest active trip points.\n");80+81static int tzp;82+module_param(tzp, int, 0444);83MODULE_PARM_DESC(tzp, "Thermal zone polling frequency, in 1/10 seconds.\n");84+85+static int nocrt;86+module_param(nocrt, int, 0);87+MODULE_PARM_DESC(nocrt, "Set to disable action on ACPI thermal zone critical and hot trips.\n");88+89+static int off;90+module_param(off, int, 0);91+MODULE_PARM_DESC(off, "Set to disable ACPI thermal support.\n");92+93+static int psv;94+module_param(psv, int, 0644);95+MODULE_PARM_DESC(psv, "Disable or override all passive trip points.\n");9697static int acpi_thermal_add(struct acpi_device *device);98static int acpi_thermal_remove(struct acpi_device *device, int type);···339340 /* Passive: Processors (optional) */341342+ if (psv == -1) {343+ status = AE_SUPPORT;344+ } else if (psv > 0) {345+ tz->trips.passive.temperature = CELSIUS_TO_KELVIN(psv);346+ status = AE_OK;347+ } else {348+ status = acpi_evaluate_integer(tz->device->handle,349+ "_PSV", NULL, &tz->trips.passive.temperature);350+ }351+352 if (ACPI_FAILURE(status)) {353 tz->trips.passive.flags.valid = 0;354 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No passive threshold\n"));···386387 char name[5] = { '_', 'A', 'C', ('0' + i), '\0' };388389+ if (act == -1)390+ break; /* disable all active trip points */391+392+ status = acpi_evaluate_integer(tz->device->handle,393+ name, NULL, &tz->trips.active[i].temperature);394+395+ if (ACPI_FAILURE(status)) {396+ if (i == 0) /* no active trip points */397+ break;398+ if (act <= 0) /* no override requested */399+ break;400+ if (i == 1) { /* 1 trip point */401+ tz->trips.active[0].temperature =402+ CELSIUS_TO_KELVIN(act);403+ } else { /* multiple trips */404+ /*405+ * Don't allow override higher than406+ * the next higher trip point407+ */408+ tz->trips.active[i - 1].temperature =409+ (tz->trips.active[i - 2].temperature <410+ CELSIUS_TO_KELVIN(act) ?411+ tz->trips.active[i - 2].temperature :412+ CELSIUS_TO_KELVIN(act));413+ }414 break;415+ }416417 name[2] = 'L';418 status =···427428static int acpi_thermal_critical(struct acpi_thermal *tz)429{430+ if (!tz || !tz->trips.critical.flags.valid || nocrt)431 return -EINVAL;432433 if (tz->temperature >= tz->trips.critical.temperature) {···449450static int acpi_thermal_hot(struct acpi_thermal *tz)451{452+ if (!tz || !tz->trips.hot.flags.valid || nocrt)453 return -EINVAL;454455 if (tz->temperature >= tz->trips.hot.temperature) {···824 goto end;825826 if (tz->trips.critical.flags.valid)827+ seq_printf(seq, "critical (S5): %ld C%s",828+ KELVIN_TO_CELSIUS(tz->trips.critical.temperature),829+ nocrt ? " <disabled>\n" : "\n");830831 if (tz->trips.hot.flags.valid)832+ seq_printf(seq, "hot (S4): %ld C%s",833+ KELVIN_TO_CELSIUS(tz->trips.hot.temperature),834+ nocrt ? " <disabled>\n" : "\n");835836 if (tz->trips.passive.flags.valid) {837 seq_printf(seq,···1281 return AE_OK;1282}12831284+#ifdef CONFIG_DMI1285+static int thermal_act(struct dmi_system_id *d) {1286+1287+ if (act == 0) {1288+ printk(KERN_NOTICE "ACPI: %s detected: "1289+ "disabling all active thermal trip points\n", d->ident);1290+ act = -1;1291+ }1292+ return 0;1293+}1294+static int thermal_tzp(struct dmi_system_id *d) {1295+1296+ if (tzp == 0) {1297+ printk(KERN_NOTICE "ACPI: %s detected: "1298+ "enabling thermal zone polling\n", d->ident);1299+ tzp = 300; /* 300 dS = 30 Seconds */1300+ }1301+ return 0;1302+}1303+static int thermal_psv(struct dmi_system_id *d) {1304+1305+ if (psv == 0) {1306+ printk(KERN_NOTICE "ACPI: %s detected: "1307+ "disabling all passive thermal trip points\n", d->ident);1308+ psv = -1;1309+ }1310+ return 0;1311+}1312+1313+static struct dmi_system_id thermal_dmi_table[] __initdata = {1314+ /*1315+ * Award BIOS on this AOpen makes thermal control almost worthless.1316+ * http://bugzilla.kernel.org/show_bug.cgi?id=88421317+ */1318+ {1319+ .callback = thermal_act,1320+ .ident = "AOpen i915GMm-HFS",1321+ .matches = {1322+ DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),1323+ DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),1324+ },1325+ },1326+ {1327+ .callback = thermal_psv,1328+ .ident = "AOpen i915GMm-HFS",1329+ .matches = {1330+ DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),1331+ DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),1332+ },1333+ },1334+ {1335+ .callback = thermal_tzp,1336+ .ident = "AOpen i915GMm-HFS",1337+ .matches = {1338+ DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),1339+ DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),1340+ },1341+ },1342+ {}1343+};1344+#endif /* CONFIG_DMI */1345+1346static int __init acpi_thermal_init(void)1347{1348 int result = 0;13491350+ dmi_check_system(thermal_dmi_table);13511352+ if (off) {1353+ printk(KERN_NOTICE "ACPI: thermal control disabled\n");1354+ return -ENODEV;1355+ }1356 acpi_thermal_dir = proc_mkdir(ACPI_THERMAL_CLASS, acpi_root_dir);1357 if (!acpi_thermal_dir)1358 return -ENODEV;