Commit 7e8d2f6d authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'thermal-v5.8-rc6' of...

Merge tag 'thermal-v5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux into master

Pull thermal fixes from Daniel Lezcano:

 - Fix invalid index array access on int340x_thermal leading to a kernel
   panic (Bartosz Szczepanek)

 - Fix debug message level to prevent flooding on some platform (Alex
   Hung)

 - Fix invalid bank access by reverting "thermal: mediatek: fix register
   index error" (Enric Balletbo i Serra)

* tag 'thermal-v5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux:
  Revert "thermal: mediatek: fix register index error"
  thermal: int3403_thermal: Downgrade error message
  thermal/int340x_thermal: Prevent page fault on .set_mode() op
parents f8456690 a8f62f18
...@@ -216,11 +216,16 @@ static int int3400_thermal_run_osc(acpi_handle handle, ...@@ -216,11 +216,16 @@ static int int3400_thermal_run_osc(acpi_handle handle,
acpi_status status; acpi_status status;
int result = 0; int result = 0;
struct acpi_osc_context context = { struct acpi_osc_context context = {
.uuid_str = int3400_thermal_uuids[uuid], .uuid_str = NULL,
.rev = 1, .rev = 1,
.cap.length = 8, .cap.length = 8,
}; };
if (uuid < 0 || uuid >= INT3400_THERMAL_MAXIMUM_UUID)
return -EINVAL;
context.uuid_str = int3400_thermal_uuids[uuid];
buf[OSC_QUERY_DWORD] = 0; buf[OSC_QUERY_DWORD] = 0;
buf[OSC_SUPPORT_DWORD] = enable; buf[OSC_SUPPORT_DWORD] = enable;
......
...@@ -74,7 +74,7 @@ static void int3403_notify(acpi_handle handle, ...@@ -74,7 +74,7 @@ static void int3403_notify(acpi_handle handle,
THERMAL_TRIP_CHANGED); THERMAL_TRIP_CHANGED);
break; break;
default: default:
dev_err(&priv->pdev->dev, "Unsupported event [0x%x]\n", event); dev_dbg(&priv->pdev->dev, "Unsupported event [0x%x]\n", event);
break; break;
} }
} }
......
...@@ -594,8 +594,7 @@ static int mtk_thermal_bank_temperature(struct mtk_thermal_bank *bank) ...@@ -594,8 +594,7 @@ static int mtk_thermal_bank_temperature(struct mtk_thermal_bank *bank)
u32 raw; u32 raw;
for (i = 0; i < conf->bank_data[bank->id].num_sensors; i++) { for (i = 0; i < conf->bank_data[bank->id].num_sensors; i++) {
raw = readl(mt->thermal_base + raw = readl(mt->thermal_base + conf->msr[i]);
conf->msr[conf->bank_data[bank->id].sensors[i]]);
temp = raw_to_mcelsius(mt, temp = raw_to_mcelsius(mt,
conf->bank_data[bank->id].sensors[i], conf->bank_data[bank->id].sensors[i],
...@@ -736,8 +735,7 @@ static void mtk_thermal_init_bank(struct mtk_thermal *mt, int num, ...@@ -736,8 +735,7 @@ static void mtk_thermal_init_bank(struct mtk_thermal *mt, int num,
for (i = 0; i < conf->bank_data[num].num_sensors; i++) for (i = 0; i < conf->bank_data[num].num_sensors; i++)
writel(conf->sensor_mux_values[conf->bank_data[num].sensors[i]], writel(conf->sensor_mux_values[conf->bank_data[num].sensors[i]],
mt->thermal_base + mt->thermal_base + conf->adcpnp[i]);
conf->adcpnp[conf->bank_data[num].sensors[i]]);
writel((1 << conf->bank_data[num].num_sensors) - 1, writel((1 << conf->bank_data[num].num_sensors) - 1,
controller_base + TEMP_MONCTL0); controller_base + TEMP_MONCTL0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment