Skip to content

Commit

Permalink
Merge tag 'thermal-v5.8-rc6' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/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
  • Loading branch information
Linus Torvalds committed Jul 16, 2020
2 parents f845669 + a8f62f1 commit 7e8d2f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
7 changes: 6 additions & 1 deletion drivers/thermal/intel/int340x_thermal/int3400_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,16 @@ static int int3400_thermal_run_osc(acpi_handle handle,
acpi_status status;
int result = 0;
struct acpi_osc_context context = {
.uuid_str = int3400_thermal_uuids[uuid],
.uuid_str = NULL,
.rev = 1,
.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_SUPPORT_DWORD] = enable;

Expand Down
2 changes: 1 addition & 1 deletion drivers/thermal/intel/int340x_thermal/int3403_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static void int3403_notify(acpi_handle handle,
THERMAL_TRIP_CHANGED);
break;
default:
dev_err(&priv->pdev->dev, "Unsupported event [0x%x]\n", event);
dev_dbg(&priv->pdev->dev, "Unsupported event [0x%x]\n", event);
break;
}
}
Expand Down
6 changes: 2 additions & 4 deletions drivers/thermal/mtk_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,7 @@ static int mtk_thermal_bank_temperature(struct mtk_thermal_bank *bank)
u32 raw;

for (i = 0; i < conf->bank_data[bank->id].num_sensors; i++) {
raw = readl(mt->thermal_base +
conf->msr[conf->bank_data[bank->id].sensors[i]]);
raw = readl(mt->thermal_base + conf->msr[i]);

temp = raw_to_mcelsius(mt,
conf->bank_data[bank->id].sensors[i],
Expand Down Expand Up @@ -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++)
writel(conf->sensor_mux_values[conf->bank_data[num].sensors[i]],
mt->thermal_base +
conf->adcpnp[conf->bank_data[num].sensors[i]]);
mt->thermal_base + conf->adcpnp[i]);

writel((1 << conf->bank_data[num].num_sensors) - 1,
controller_base + TEMP_MONCTL0);
Expand Down

0 comments on commit 7e8d2f6

Please sign in to comment.