From nobody Wed Oct 1 20:23:24 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C4652DBF76 for ; Wed, 1 Oct 2025 11:41:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759318872; cv=none; b=gMp3mrJgEZKYsZsCZk5+iEvFRQMo7AMXhBNmDKwRdKUoAEj9HFOpfGqgPRYLkhAveZLoxCFSxyUdfvPOlAsJ6OpEiOrAoGO3LquBjJ5hwtE8D4y1BAaDjT5Qz15IzItKJj3p8QQAzmkTs2twXEvV8Nr5ypXdAapAVxoh1UkdTt0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759318872; c=relaxed/simple; bh=ntLsFEiu5iqg45mHvg0i/VhGZFLZ11eccVxGS2wRk6U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oA+EfDxCDorTrTsGJJp5sL09ZynRUXey3Qi7kqKL2m7XuPPMfdTt0+uSBKDB7Ru4n9pCYtHxKKQzjnWWcfFlyS/Gip3XjALT0RDzDn6f2Woa8bg0S60sHY3IUGbSgk0F1v1p31vXrXPLas9ei2P1QxweaO++N3JgAYQ0ITcCwdI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1v3vCb-0006lA-Tm; Wed, 01 Oct 2025 13:40:57 +0200 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1v3vCa-001PBZ-2z; Wed, 01 Oct 2025 13:40:56 +0200 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1v3vCa-000000081FZ-3XfH; Wed, 01 Oct 2025 13:40:56 +0200 From: Sascha Hauer Date: Wed, 01 Oct 2025 13:40:55 +0200 Subject: [PATCH 1/3] tools: lib: thermal: use pkg-config to locate libnl3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251001-libthermal-install-v1-1-3071fd3f6612@pengutronix.de> References: <20251001-libthermal-install-v1-0-3071fd3f6612@pengutronix.de> In-Reply-To: <20251001-libthermal-install-v1-0-3071fd3f6612@pengutronix.de> To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Sascha Hauer X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1759318856; l=1159; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=ntLsFEiu5iqg45mHvg0i/VhGZFLZ11eccVxGS2wRk6U=; b=SzzkiOTwpcf1TJ7BXhQTDka+ROR3fSi5YXOWWngvPBI91pzkGsr8WKaLwOLEG8XdZfbJczaBN SiikRssdXKkBeXg/fz6lgNhXOKSGvAqYVX0bzugvjJzG0CfmrWa/X8L X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org To make libthermal more cross compile friendly use pkg-config to locate libnl3. Only if that fails fall back to hardcoded /usr/include/libnl3. Signed-off-by: Sascha Hauer --- tools/lib/thermal/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/lib/thermal/Makefile b/tools/lib/thermal/Makefile index a1f5e388644d31d36f973d3ddce48d036ee0a083..fdde0c4f85b4e511a16c4381059= 0ed45b007a5ad 100644 --- a/tools/lib/thermal/Makefile +++ b/tools/lib/thermal/Makefile @@ -46,8 +46,12 @@ else CFLAGS :=3D -g -Wall endif =20 +NL3_CFLAGS =3D $(shell pkg-config --cflags libnl-3.0 2>/dev/null) +ifeq ($(NL3_CFLAGS),) +NL3_CFLAGS =3D -I/usr/include/libnl3 +endif + INCLUDES =3D \ --I/usr/include/libnl3 \ -I$(srctree)/tools/lib/thermal/include \ -I$(srctree)/tools/lib/ \ -I$(srctree)/tools/include \ @@ -59,6 +63,7 @@ INCLUDES =3D \ override CFLAGS +=3D $(EXTRA_WARNINGS) override CFLAGS +=3D -Werror -Wall override CFLAGS +=3D -fPIC +override CFLAGS +=3D $(NL3_CFLAGS) override CFLAGS +=3D $(INCLUDES) override CFLAGS +=3D -fvisibility=3Dhidden override CFGLAS +=3D -Wl,-L. --=20 2.47.3 From nobody Wed Oct 1 20:23:24 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D0CC2C3263 for ; Wed, 1 Oct 2025 11:41:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759318864; cv=none; b=KXKiE9Yiq1uVPUCTwl/EskSMiw3MhN9y5b4taWGILkvO5r4ubR+PQKslTiLcQP6oActUG4RCREDw/aapgyAewZcdni5fkHsDk9xIstnM0nc336NNPFmUCMrW/vtUeWswhDXJQUZLfCTPwWvEo3p1sYVANr29V7TECvrWZibhyYA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759318864; c=relaxed/simple; bh=+v2vvAqcHagB/C/+KdfLz1rNq1m+3Xlq6Y0GMJwkUpk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hYJM81iL2DPSwpwtIp2vuiY68/ostnQpy9tt8Gh9n6E7TjhVjlbOnEBRR5cRFW/Gd12WUWxEHytwLskC8MlJZ9VVby3JpBuVUK9u1t6lq28jxPeMsoTspaBRfdIUlcvqY2DblOpAoZV/EWSmZZtxC6qEOWwZCJ+K1GEWix7cLFk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1v3vCb-0006l9-Tm; Wed, 01 Oct 2025 13:40:57 +0200 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1v3vCa-001PBb-30; Wed, 01 Oct 2025 13:40:56 +0200 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1v3vCa-000000081FZ-3YpS; Wed, 01 Oct 2025 13:40:56 +0200 From: Sascha Hauer Date: Wed, 01 Oct 2025 13:40:56 +0200 Subject: [PATCH 2/3] tools: lib: thermal: don't preserve owner in install Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251001-libthermal-install-v1-2-3071fd3f6612@pengutronix.de> References: <20251001-libthermal-install-v1-0-3071fd3f6612@pengutronix.de> In-Reply-To: <20251001-libthermal-install-v1-0-3071fd3f6612@pengutronix.de> To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Sascha Hauer , Emil Dahl Juhl X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1759318856; l=1105; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=a2t3Jgg6ZT4N7aIkHuuOSj/xuMgYoif4tSnJKDA+4rg=; b=RKucA8DjTmWMV84NWMy04bQpZa7ZYSgy4Hotlke4jo3/RONephFFKZKTPzHW9Ox7Az8oV9wtx WrqLeuT//a6CI2d9+co1Ie4NQlsN9ObmVHlLfeNlTgATk2FcgXC5Kov X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Emil Dahl Juhl Instead of preserving mode, timestamp, and owner, for the object files during installation, just preserve the mode and timestamp. When installing as root, the installed files should be owned by root. When installing as user, --preserve=3Downership doesn't work anyway. This makes --preserve=3Downership rather pointless. Signed-off-by: Emil Dahl Juhl Signed-off-by: Sascha Hauer --- tools/lib/thermal/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/thermal/Makefile b/tools/lib/thermal/Makefile index fdde0c4f85b4e511a16c43810590ed45b007a5ad..41aa7a324ff4d76351b89d7d7cf= 382df3fc14052 100644 --- a/tools/lib/thermal/Makefile +++ b/tools/lib/thermal/Makefile @@ -139,7 +139,7 @@ endef install_lib: libs $(call QUIET_INSTALL, $(LIBTHERMAL_ALL)) \ $(call do_install_mkdir,$(libdir_SQ)); \ - cp -fpR $(LIBTHERMAL_ALL) $(DESTDIR)$(libdir_SQ) + cp -fR --preserve=3Dmode,timestamp $(LIBTHERMAL_ALL) $(DESTDIR)$(libdir_= SQ) =20 install_headers: $(call QUIET_INSTALL, headers) \ --=20 2.47.3 From nobody Wed Oct 1 20:23:24 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA43D2D879F for ; Wed, 1 Oct 2025 11:41:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759318870; cv=none; b=TwAxQdBUtjtas6pXLiNvYlPQ+52AlcqcId8WHNr08T+4c/1gBHtV0rWaI+FTcGk5t6mMw93jm9mXqeU4+5EpP0zhcqFOiJATVYGB6GguIdpQhDd0CU0BDVK5JeS2yzKKJHY1Ci4ONKcDyw+roBTfvuj7ZIwBBfP9zzG7BNXUYGg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759318870; c=relaxed/simple; bh=sCVcLFGSHBgzzlgCNeih1gUgQqgivxmdb4FjukvBAmE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=n+KqqKiExNFboU5PwL9nRbcUICamlkSuUyBRxxdTSZlVcq7ZrUl9oGGyuqdSpdjD/RJi8GrWOdftOYMwvhSUgtnWHd3w1fYeQ40OfLi69X7fzQ7lvn3XSBNZsEpDFSQWZCfFA08Q8dwnekQJw0MH2pGXqn1ltOHmpk67f9GG/Jo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1v3vCb-0006lB-Tm; Wed, 01 Oct 2025 13:40:57 +0200 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1v3vCa-001PBc-31; Wed, 01 Oct 2025 13:40:56 +0200 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.98.2) (envelope-from ) id 1v3vCa-000000081FZ-3ZmJ; Wed, 01 Oct 2025 13:40:56 +0200 From: Sascha Hauer Date: Wed, 01 Oct 2025 13:40:57 +0200 Subject: [PATCH 3/3] tools: lib: thermal: expose thermal_exit symbols Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251001-libthermal-install-v1-3-3071fd3f6612@pengutronix.de> References: <20251001-libthermal-install-v1-0-3071fd3f6612@pengutronix.de> In-Reply-To: <20251001-libthermal-install-v1-0-3071fd3f6612@pengutronix.de> To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Sascha Hauer , Emil Dahl Juhl X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1759318856; l=1350; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=7+99HolQ3vKPiYZj9kA6mhNE7Y7l1NRpdmL61qkcvDQ=; b=ItLahm49/P2FYDQB9rfkpJV7pmpab07SAEAEYHVD+xZTUJ8bG2ut/qYgSd66JTNFDjGAgdrVA +bDlDhxye/UDEDlWReOBW3BASv1h3YpIZEj6jpQWQljcguICXW9HwfH X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: s.hauer@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Emil Dahl Juhl Remove duplicate entry for thermal_init and add the missing entries for thermal_exit and their respectives in cmd, events, and sampling context. Signed-off-by: Emil Dahl Juhl Signed-off-by: Sascha Hauer --- tools/lib/thermal/libthermal.map | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/lib/thermal/libthermal.map b/tools/lib/thermal/libtherma= l.map index d657176aa47fb52f2db0178069624d2feb9d0c27..1d3d0c04e4b6125f81e6e670fe3= c10ab79e681d6 100644 --- a/tools/lib/thermal/libthermal.map +++ b/tools/lib/thermal/libthermal.map @@ -1,6 +1,5 @@ LIBTHERMAL_0.0.1 { global: - thermal_init; for_each_thermal_zone; for_each_thermal_trip; for_each_thermal_cdev; @@ -9,9 +8,12 @@ LIBTHERMAL_0.0.1 { thermal_zone_find_by_id; thermal_zone_discover; thermal_init; + thermal_exit; + thermal_events_exit; thermal_events_init; thermal_events_handle; thermal_events_fd; + thermal_cmd_exit; thermal_cmd_init; thermal_cmd_get_tz; thermal_cmd_get_cdev; @@ -22,6 +24,7 @@ LIBTHERMAL_0.0.1 { thermal_cmd_threshold_add; thermal_cmd_threshold_delete; thermal_cmd_threshold_flush; + thermal_sampling_exit; thermal_sampling_init; thermal_sampling_handle; thermal_sampling_fd; --=20 2.47.3