From: Francesco Dolcini <francesco.dolcini@toradex.com> To: "Rafael J . Wysocki" <rafael@kernel.org>, Daniel Lezcano <daniel.lezcano@linaro.org>, linux-pm@vger.kernel.org Cc: Francesco Dolcini <francesco.dolcini@toradex.com>, Amit Kucheria <amitk@kernel.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com>, linux-arm-kernel@lists.infradead.org, Tim Harvey <tharvey@gateworks.com>, Jon Nettleton <jon@solid-run.com> Subject: [PATCH v1] thermal: imx: Update critical temp threshold Date: Wed, 20 Apr 2022 11:13:00 +0200 [thread overview] Message-ID: <20220420091300.179753-1-francesco.dolcini@toradex.com> (raw) Increase the critical temperature threshold to the datasheet defined value according to the temperature grade of the SoC, increasing the actual critical temperature value of 5 degrees. Without this change the emergency shutdown will trigger earlier then required affecting applications that are expected to be working on this close to the limit, but yet valid, temperature range. Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> --- Not sure if there is an alternative to this patch, the critical threshold seems to be read-only and it is not possible to just change it from user space that would be my preferred solution. According to the original discussion [1] the reasoning was the following: On Tue, Jul 28, 2015 at 4:50 PM, Tim Harvey <tharvey@gateworks.com> wrote: > Yes - the purpose of lowering the critical threshold from the hardware > default is to allow Linux to shutdown more cleanly. But I do not understand it. [1] https://lore.kernel.org/all/CAJ+vNU1PQZa9KoCU9o_ws6jAAjhGVJby-1P583SVejT5TrAFTQ@mail.gmail.com/ --- drivers/thermal/imx_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 16663373b682..75a631a23e61 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -504,10 +504,10 @@ static void imx_init_temp_grade(struct platform_device *pdev, u32 ocotp_mem0) } /* - * Set the critical trip point at 5 °C under max + * Set the critical trip point at max * Set the passive trip point at 10 °C under max (changeable via sysfs) */ - data->temp_critical = data->temp_max - (1000 * 5); + data->temp_critical = data->temp_max; data->temp_passive = data->temp_max - (1000 * 10); } -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Francesco Dolcini <francesco.dolcini@toradex.com> To: "Rafael J . Wysocki" <rafael@kernel.org>, Daniel Lezcano <daniel.lezcano@linaro.org>, linux-pm@vger.kernel.org Cc: Francesco Dolcini <francesco.dolcini@toradex.com>, Amit Kucheria <amitk@kernel.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com>, linux-arm-kernel@lists.infradead.org, Tim Harvey <tharvey@gateworks.com>, Jon Nettleton <jon@solid-run.com> Subject: [PATCH v1] thermal: imx: Update critical temp threshold Date: Wed, 20 Apr 2022 11:13:00 +0200 [thread overview] Message-ID: <20220420091300.179753-1-francesco.dolcini@toradex.com> (raw) Increase the critical temperature threshold to the datasheet defined value according to the temperature grade of the SoC, increasing the actual critical temperature value of 5 degrees. Without this change the emergency shutdown will trigger earlier then required affecting applications that are expected to be working on this close to the limit, but yet valid, temperature range. Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> --- Not sure if there is an alternative to this patch, the critical threshold seems to be read-only and it is not possible to just change it from user space that would be my preferred solution. According to the original discussion [1] the reasoning was the following: On Tue, Jul 28, 2015 at 4:50 PM, Tim Harvey <tharvey@gateworks.com> wrote: > Yes - the purpose of lowering the critical threshold from the hardware > default is to allow Linux to shutdown more cleanly. But I do not understand it. [1] https://lore.kernel.org/all/CAJ+vNU1PQZa9KoCU9o_ws6jAAjhGVJby-1P583SVejT5TrAFTQ@mail.gmail.com/ --- drivers/thermal/imx_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 16663373b682..75a631a23e61 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -504,10 +504,10 @@ static void imx_init_temp_grade(struct platform_device *pdev, u32 ocotp_mem0) } /* - * Set the critical trip point at 5 °C under max + * Set the critical trip point at max * Set the passive trip point at 10 °C under max (changeable via sysfs) */ - data->temp_critical = data->temp_max - (1000 * 5); + data->temp_critical = data->temp_max; data->temp_passive = data->temp_max - (1000 * 10); } -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2022-04-20 9:13 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-20 9:13 Francesco Dolcini [this message] 2022-04-20 9:13 ` [PATCH v1] thermal: imx: Update critical temp threshold Francesco Dolcini 2022-05-09 9:55 ` Daniel Lezcano 2022-05-09 9:55 ` Daniel Lezcano 2022-05-12 7:36 ` Francesco Dolcini 2022-05-12 7:36 ` Francesco Dolcini 2022-05-12 10:08 ` Lucas Stach 2022-05-12 10:08 ` Lucas Stach 2022-05-12 10:24 ` Francesco Dolcini 2022-05-12 10:24 ` Francesco Dolcini 2022-05-12 10:52 ` Daniel Lezcano 2022-05-12 10:52 ` Daniel Lezcano 2022-05-12 13:56 ` Francesco Dolcini 2022-05-12 13:56 ` Francesco Dolcini 2022-05-13 16:25 ` Daniel Lezcano 2022-05-13 16:25 ` Daniel Lezcano
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220420091300.179753-1-francesco.dolcini@toradex.com \ --to=francesco.dolcini@toradex.com \ --cc=amitk@kernel.org \ --cc=daniel.lezcano@linaro.org \ --cc=festevam@gmail.com \ --cc=jon@solid-run.com \ --cc=kernel@pengutronix.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-imx@nxp.com \ --cc=linux-pm@vger.kernel.org \ --cc=rafael@kernel.org \ --cc=s.hauer@pengutronix.de \ --cc=shawnguo@kernel.org \ --cc=tharvey@gateworks.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.