- Remove a false lockdep backtrace in the LMh driver (Dmitry

Baryshkov)
 
 - Fix sampling handler context ptr in the libthermal (Emil Dahl Juhl)
 
 - Remove the thermal soft link when doing a make clean. The link is
   created at compilation time (Zhang Jiao)
 
 - Accept thermal zone without trip points as stated in the bindings,
   otherwise the thermal zone fails to initialize (Icenowy Zheng)
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEGn3N4YVz0WNVyHskqDIjiipP6E8FAmco62wACgkQqDIjiipP
 6E/WlQf/atNDrm85oN/reH5f3ak/VaxiGQ1IVPKsqMqZKkXPn54c1BU7S72hcXk/
 IAWaCWWxOOWl33OvNdf4hfgbf2qzwAuJmlcIB7kvEZXFOGS9MkkNlVgRL8Z8HvPm
 yLuUMHTQpJERV/BrDj/ScepvFccuGlw2Sd5hUFZwGLlbWuj10WlqnWh7z3b6L834
 OYu+VqEZCjGPH4ChcxQ9hZm5qDhB48RHAAcx7T83jctPMqzjfp2qN1zpHhauXtSU
 zMAZ2xap+WhpKFFej6X+SlsbIeGi7rvSXGRRysv/KYZsW+ecUXQuU9auGPs0CcMH
 OEBwsdH037a/lDRhYqf3i8M1dr1gcQ==
 =Eq8T
 -----END PGP SIGNATURE-----

Merge tag 'thermal-v6.12-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux

Merge thermal driver fixes for 6.12-rc7 from Daniel Lezcano:

"- Remove a false lockdep backtrace in the LMh driver (Dmitry
   Baryshkov)

 - Fix sampling handler context ptr in the libthermal (Emil Dahl Juhl)

 - Remove the thermal soft link when doing a make clean. The link is
   created at compilation time (Zhang Jiao)

 - Accept thermal zone without trip points as stated in the bindings,
   otherwise the thermal zone fails to initialize (Icenowy Zheng)"

* tag 'thermal-v6.12-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux:
  thermal/of: support thermal zones w/o trips subnode
  tools/lib/thermal: Remove the thermal.h soft link when doing make clean
  tools/lib/thermal: Fix sampling handler context ptr
  thermal/drivers/qcom/lmh: Remove false lockdep backtrace
This commit is contained in:
Rafael J. Wysocki 2024-11-04 17:03:04 +01:00
commit 5469a8deac
4 changed files with 22 additions and 12 deletions

View File

@ -73,7 +73,14 @@ static struct irq_chip lmh_irq_chip = {
static int lmh_irq_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw)
{
struct lmh_hw_data *lmh_data = d->host_data;
static struct lock_class_key lmh_lock_key;
static struct lock_class_key lmh_request_key;
/*
* This lock class tells lockdep that GPIO irqs are in a different
* category than their parents, so it won't report false recursion.
*/
irq_set_lockdep_class(irq, &lmh_lock_key, &lmh_request_key);
irq_set_chip_and_handler(irq, &lmh_irq_chip, handle_simple_irq);
irq_set_chip_data(irq, lmh_data);

View File

@ -99,18 +99,15 @@ static struct thermal_trip *thermal_of_trips_init(struct device_node *np, int *n
struct device_node *trips;
int ret, count;
*ntrips = 0;
trips = of_get_child_by_name(np, "trips");
if (!trips) {
pr_err("Failed to find 'trips' node\n");
return ERR_PTR(-EINVAL);
}
if (!trips)
return NULL;
count = of_get_child_count(trips);
if (!count) {
pr_err("No trip point defined\n");
ret = -EINVAL;
goto out_of_node_put;
}
if (!count)
return NULL;
tt = kzalloc(sizeof(*tt) * count, GFP_KERNEL);
if (!tt) {
@ -133,7 +130,6 @@ static struct thermal_trip *thermal_of_trips_init(struct device_node *np, int *n
out_kfree:
kfree(tt);
*ntrips = 0;
out_of_node_put:
of_node_put(trips);
@ -401,11 +397,14 @@ static struct thermal_zone_device *thermal_of_zone_register(struct device_node *
trips = thermal_of_trips_init(np, &ntrips);
if (IS_ERR(trips)) {
pr_err("Failed to find trip points for %pOFn id=%d\n", sensor, id);
pr_err("Failed to parse trip points for %pOFn id=%d\n", sensor, id);
ret = PTR_ERR(trips);
goto out_of_node_put;
}
if (!trips)
pr_info("No trip points found for %pOFn id=%d\n", sensor, id);
ret = thermal_of_monitor_init(np, &delay, &pdelay);
if (ret) {
pr_err("Failed to initialize monitoring delays from %pOFn\n", np);

View File

@ -121,7 +121,9 @@ all: fixdep
clean:
$(call QUIET_CLEAN, libthermal) $(RM) $(LIBTHERMAL_A) \
*.o *~ *.a *.so *.so.$(VERSION) *.so.$(LIBTHERMAL_VERSION) .*.d .*.cmd LIBTHERMAL-CFLAGS $(LIBTHERMAL_PC)
*.o *~ *.a *.so *.so.$(VERSION) *.so.$(LIBTHERMAL_VERSION) \
.*.d .*.cmd LIBTHERMAL-CFLAGS $(LIBTHERMAL_PC) \
$(srctree)/tools/$(THERMAL_UAPI)
$(LIBTHERMAL_PC):
$(QUIET_GEN)sed -e "s|@PREFIX@|$(prefix)|" \

View File

@ -16,6 +16,8 @@ static int handle_thermal_sample(struct nl_msg *n, void *arg)
struct thermal_handler_param *thp = arg;
struct thermal_handler *th = thp->th;
arg = thp->arg;
genlmsg_parse(nlh, 0, attrs, THERMAL_GENL_ATTR_MAX, NULL);
switch (genlhdr->cmd) {