All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fixes for stop monitoring disabled devices series
@ 2020-07-03 10:43 ` Andrzej Pietrasiewicz
  0 siblings, 0 replies; 24+ messages in thread
From: Andrzej Pietrasiewicz @ 2020-07-03 10:43 UTC (permalink / raw)
  To: linux-pm, linux-acpi, netdev, linux-wireless,
	platform-driver-x86, linux-arm-kernel, linux-renesas-soc,
	linux-rockchip
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Daniel Lezcano, Amit Kucheria, Support Opensource, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Niklas Söderlund, Heiko Stuebner,
	Orson Zhai, Baolin Wang, Chunyan Zhang, Zhang Rui,
	Allison Randal, Enrico Weigelt, Gayatri Kammela, Thomas Gleixner,
	Bartlomiej Zolnierkiewicz, Andrzej Pietrasiewicz, kernel

This short series contains fixes for "Stop monitoring disabled devices"
series https://www.spinics.net/lists/arm-kernel/msg817861.html

Invocation of thermal_zone_device_is_enabled() in acpi/thermal is now
redundant, because thermal_zone_device_update() now is capable of
handling disabled devices.

In imx's ->get_temp() the lock must not be taken, otherwise a deadlock
happens. The decision whether explicitly running a measurement cycle
is needed is taken based on driver's local irq_enabled variable.

Finally, thermal_zone_device_is_enabled() is made available to the
core only, as there are no driver users of it.

Andrzej Pietrasiewicz (3):
  acpi: thermal: Don't call thermal_zone_device_is_enabled()
  thermal: imx: Use driver's local data to decide whether to run a
    measurement
  thermal: Make thermal_zone_device_is_enabled() available to core only

 drivers/acpi/thermal.c         | 3 ---
 drivers/thermal/imx_thermal.c  | 7 ++++---
 drivers/thermal/thermal_core.c | 1 -
 drivers/thermal/thermal_core.h | 2 ++
 include/linux/thermal.h        | 5 -----
 5 files changed, 6 insertions(+), 12 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 0/3] Fixes for stop monitoring disabled devices series
@ 2020-07-03 10:43 ` Andrzej Pietrasiewicz
  0 siblings, 0 replies; 24+ messages in thread
From: Andrzej Pietrasiewicz @ 2020-07-03 10:43 UTC (permalink / raw)
  To: linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-acpi-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	platform-driver-x86-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Daniel Lezcano, Amit Kucheria, Support Opensource

This short series contains fixes for "Stop monitoring disabled devices"
series https://www.spinics.net/lists/arm-kernel/msg817861.html

Invocation of thermal_zone_device_is_enabled() in acpi/thermal is now
redundant, because thermal_zone_device_update() now is capable of
handling disabled devices.

In imx's ->get_temp() the lock must not be taken, otherwise a deadlock
happens. The decision whether explicitly running a measurement cycle
is needed is taken based on driver's local irq_enabled variable.

Finally, thermal_zone_device_is_enabled() is made available to the
core only, as there are no driver users of it.

Andrzej Pietrasiewicz (3):
  acpi: thermal: Don't call thermal_zone_device_is_enabled()
  thermal: imx: Use driver's local data to decide whether to run a
    measurement
  thermal: Make thermal_zone_device_is_enabled() available to core only

 drivers/acpi/thermal.c         | 3 ---
 drivers/thermal/imx_thermal.c  | 7 ++++---
 drivers/thermal/thermal_core.c | 1 -
 drivers/thermal/thermal_core.h | 2 ++
 include/linux/thermal.h        | 5 -----
 5 files changed, 6 insertions(+), 12 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 0/3] Fixes for stop monitoring disabled devices series
@ 2020-07-03 10:43 ` Andrzej Pietrasiewicz
  0 siblings, 0 replies; 24+ messages in thread
From: Andrzej Pietrasiewicz @ 2020-07-03 10:43 UTC (permalink / raw)
  To: linux-pm, linux-acpi, netdev, linux-wireless,
	platform-driver-x86, linux-arm-kernel, linux-renesas-soc,
	linux-rockchip
  Cc: Emmanuel Grumbach, Heiko Stuebner, Rafael J . Wysocki,
	Vishal Kulkarni, Luca Coelho, Miquel Raynal, kernel,
	Fabio Estevam, Amit Kucheria, Chunyan Zhang, Daniel Lezcano,
	Allison Randal, NXP Linux Team, Darren Hart, Zhang Rui,
	Gayatri Kammela, Len Brown, Johannes Berg, Intel Linux Wireless,
	Sascha Hauer, Ido Schimmel, Baolin Wang, Jiri Pirko, Orson Zhai,
	Thomas Gleixner, Kalle Valo, Support Opensource, Enrico Weigelt,
	Peter Kaestle, Sebastian Reichel, Andrzej Pietrasiewicz,
	Bartlomiej Zolnierkiewicz, Pengutronix Kernel Team,
	Niklas Söderlund, Shawn Guo, David S . Miller,
	Andy Shevchenko

This short series contains fixes for "Stop monitoring disabled devices"
series https://www.spinics.net/lists/arm-kernel/msg817861.html

Invocation of thermal_zone_device_is_enabled() in acpi/thermal is now
redundant, because thermal_zone_device_update() now is capable of
handling disabled devices.

In imx's ->get_temp() the lock must not be taken, otherwise a deadlock
happens. The decision whether explicitly running a measurement cycle
is needed is taken based on driver's local irq_enabled variable.

Finally, thermal_zone_device_is_enabled() is made available to the
core only, as there are no driver users of it.

Andrzej Pietrasiewicz (3):
  acpi: thermal: Don't call thermal_zone_device_is_enabled()
  thermal: imx: Use driver's local data to decide whether to run a
    measurement
  thermal: Make thermal_zone_device_is_enabled() available to core only

 drivers/acpi/thermal.c         | 3 ---
 drivers/thermal/imx_thermal.c  | 7 ++++---
 drivers/thermal/thermal_core.c | 1 -
 drivers/thermal/thermal_core.h | 2 ++
 include/linux/thermal.h        | 5 -----
 5 files changed, 6 insertions(+), 12 deletions(-)

-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/3] acpi: thermal: Don't call thermal_zone_device_is_enabled()
  2020-07-03 10:43 ` Andrzej Pietrasiewicz
  (?)
@ 2020-07-03 10:43   ` Andrzej Pietrasiewicz
  -1 siblings, 0 replies; 24+ messages in thread
From: Andrzej Pietrasiewicz @ 2020-07-03 10:43 UTC (permalink / raw)
  To: linux-pm, linux-acpi, netdev, linux-wireless,
	platform-driver-x86, linux-arm-kernel, linux-renesas-soc,
	linux-rockchip
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Daniel Lezcano, Amit Kucheria, Support Opensource, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Niklas Söderlund, Heiko Stuebner,
	Orson Zhai, Baolin Wang, Chunyan Zhang, Zhang Rui,
	Allison Randal, Enrico Weigelt, Gayatri Kammela, Thomas Gleixner,
	Bartlomiej Zolnierkiewicz, Andrzej Pietrasiewicz, kernel

thermal_zone_device_update() can now handle disabled thermal zones, so
the check here is not needed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
---
 drivers/acpi/thermal.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 29a2b73fe035..12c0ece746f0 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -499,9 +499,6 @@ static void acpi_thermal_check(void *data)
 {
 	struct acpi_thermal *tz = data;
 
-	if (!thermal_zone_device_is_enabled(tz->thermal_zone))
-		return;
-
 	thermal_zone_device_update(tz->thermal_zone,
 				   THERMAL_EVENT_UNSPECIFIED);
 }
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 1/3] acpi: thermal: Don't call thermal_zone_device_is_enabled()
@ 2020-07-03 10:43   ` Andrzej Pietrasiewicz
  0 siblings, 0 replies; 24+ messages in thread
From: Andrzej Pietrasiewicz @ 2020-07-03 10:43 UTC (permalink / raw)
  To: linux-pm, linux-acpi, netdev, linux-wireless,
	platform-driver-x86, linux-arm-kernel, linux-renesas-soc,
	linux-rockchip
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Daniel Lezcano, Amit Kucheria, Support Opensource

thermal_zone_device_update() can now handle disabled thermal zones, so
the check here is not needed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
---
 drivers/acpi/thermal.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 29a2b73fe035..12c0ece746f0 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -499,9 +499,6 @@ static void acpi_thermal_check(void *data)
 {
 	struct acpi_thermal *tz = data;
 
-	if (!thermal_zone_device_is_enabled(tz->thermal_zone))
-		return;
-
 	thermal_zone_device_update(tz->thermal_zone,
 				   THERMAL_EVENT_UNSPECIFIED);
 }
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 1/3] acpi: thermal: Don't call thermal_zone_device_is_enabled()
@ 2020-07-03 10:43   ` Andrzej Pietrasiewicz
  0 siblings, 0 replies; 24+ messages in thread
From: Andrzej Pietrasiewicz @ 2020-07-03 10:43 UTC (permalink / raw)
  To: linux-pm, linux-acpi, netdev, linux-wireless,
	platform-driver-x86, linux-arm-kernel, linux-renesas-soc,
	linux-rockchip
  Cc: Emmanuel Grumbach, Heiko Stuebner, Rafael J . Wysocki,
	Vishal Kulkarni, Luca Coelho, Miquel Raynal, kernel,
	Fabio Estevam, Amit Kucheria, Chunyan Zhang, Daniel Lezcano,
	Allison Randal, NXP Linux Team, Darren Hart, Zhang Rui,
	Gayatri Kammela, Len Brown, Johannes Berg, Intel Linux Wireless,
	Sascha Hauer, Ido Schimmel, Baolin Wang, Jiri Pirko, Orson Zhai,
	Thomas Gleixner, Kalle Valo, Support Opensource, Enrico Weigelt,
	Peter Kaestle, Sebastian Reichel, Andrzej Pietrasiewicz,
	Bartlomiej Zolnierkiewicz, Pengutronix Kernel Team,
	Niklas Söderlund, Shawn Guo, David S . Miller,
	Andy Shevchenko

thermal_zone_device_update() can now handle disabled thermal zones, so
the check here is not needed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
---
 drivers/acpi/thermal.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 29a2b73fe035..12c0ece746f0 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -499,9 +499,6 @@ static void acpi_thermal_check(void *data)
 {
 	struct acpi_thermal *tz = data;
 
-	if (!thermal_zone_device_is_enabled(tz->thermal_zone))
-		return;
-
 	thermal_zone_device_update(tz->thermal_zone,
 				   THERMAL_EVENT_UNSPECIFIED);
 }
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/3] thermal: imx: Use driver's local data to decide whether to run a measurement
  2020-07-03 10:43 ` Andrzej Pietrasiewicz
  (?)
@ 2020-07-03 10:43   ` Andrzej Pietrasiewicz
  -1 siblings, 0 replies; 24+ messages in thread
From: Andrzej Pietrasiewicz @ 2020-07-03 10:43 UTC (permalink / raw)
  To: linux-pm, linux-acpi, netdev, linux-wireless,
	platform-driver-x86, linux-arm-kernel, linux-renesas-soc,
	linux-rockchip
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Daniel Lezcano, Amit Kucheria, Support Opensource, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Niklas Söderlund, Heiko Stuebner,
	Orson Zhai, Baolin Wang, Chunyan Zhang, Zhang Rui,
	Allison Randal, Enrico Weigelt, Gayatri Kammela, Thomas Gleixner,
	Bartlomiej Zolnierkiewicz, Andrzej Pietrasiewicz, kernel

Use driver's local data to evaluate the need to run or not to run a
measurement.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
---
 drivers/thermal/imx_thermal.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index 9700ae39feb7..c0efa7bc48e2 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -252,10 +252,11 @@ static int imx_get_temp(struct thermal_zone_device *tz, int *temp)
 	const struct thermal_soc_data *soc_data = data->socdata;
 	struct regmap *map = data->tempmon;
 	unsigned int n_meas;
-	bool wait;
+	bool wait, run_measurement;
 	u32 val;
 
-	if (thermal_zone_device_is_enabled(tz)) {
+	run_measurement = !data->irq_enabled;
+	if (!run_measurement) {
 		/* Check if a measurement is currently in progress */
 		regmap_read(map, soc_data->temp_data, &val);
 		wait = !(val & soc_data->temp_valid_mask);
@@ -282,7 +283,7 @@ static int imx_get_temp(struct thermal_zone_device *tz, int *temp)
 
 	regmap_read(map, soc_data->temp_data, &val);
 
-	if (!thermal_zone_device_is_enabled(tz)) {
+	if (run_measurement) {
 		regmap_write(map, soc_data->sensor_ctrl + REG_CLR,
 			     soc_data->measure_temp_mask);
 		regmap_write(map, soc_data->sensor_ctrl + REG_SET,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/3] thermal: imx: Use driver's local data to decide whether to run a measurement
@ 2020-07-03 10:43   ` Andrzej Pietrasiewicz
  0 siblings, 0 replies; 24+ messages in thread
From: Andrzej Pietrasiewicz @ 2020-07-03 10:43 UTC (permalink / raw)
  To: linux-pm, linux-acpi, netdev, linux-wireless,
	platform-driver-x86, linux-arm-kernel, linux-renesas-soc,
	linux-rockchip
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Daniel Lezcano, Amit Kucheria, Support Opensource

Use driver's local data to evaluate the need to run or not to run a
measurement.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
---
 drivers/thermal/imx_thermal.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index 9700ae39feb7..c0efa7bc48e2 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -252,10 +252,11 @@ static int imx_get_temp(struct thermal_zone_device *tz, int *temp)
 	const struct thermal_soc_data *soc_data = data->socdata;
 	struct regmap *map = data->tempmon;
 	unsigned int n_meas;
-	bool wait;
+	bool wait, run_measurement;
 	u32 val;
 
-	if (thermal_zone_device_is_enabled(tz)) {
+	run_measurement = !data->irq_enabled;
+	if (!run_measurement) {
 		/* Check if a measurement is currently in progress */
 		regmap_read(map, soc_data->temp_data, &val);
 		wait = !(val & soc_data->temp_valid_mask);
@@ -282,7 +283,7 @@ static int imx_get_temp(struct thermal_zone_device *tz, int *temp)
 
 	regmap_read(map, soc_data->temp_data, &val);
 
-	if (!thermal_zone_device_is_enabled(tz)) {
+	if (run_measurement) {
 		regmap_write(map, soc_data->sensor_ctrl + REG_CLR,
 			     soc_data->measure_temp_mask);
 		regmap_write(map, soc_data->sensor_ctrl + REG_SET,
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/3] thermal: imx: Use driver's local data to decide whether to run a measurement
@ 2020-07-03 10:43   ` Andrzej Pietrasiewicz
  0 siblings, 0 replies; 24+ messages in thread
From: Andrzej Pietrasiewicz @ 2020-07-03 10:43 UTC (permalink / raw)
  To: linux-pm, linux-acpi, netdev, linux-wireless,
	platform-driver-x86, linux-arm-kernel, linux-renesas-soc,
	linux-rockchip
  Cc: Emmanuel Grumbach, Heiko Stuebner, Rafael J . Wysocki,
	Vishal Kulkarni, Luca Coelho, Miquel Raynal, kernel,
	Fabio Estevam, Amit Kucheria, Chunyan Zhang, Daniel Lezcano,
	Allison Randal, NXP Linux Team, Darren Hart, Zhang Rui,
	Gayatri Kammela, Len Brown, Johannes Berg, Intel Linux Wireless,
	Sascha Hauer, Ido Schimmel, Baolin Wang, Jiri Pirko, Orson Zhai,
	Thomas Gleixner, Kalle Valo, Support Opensource, Enrico Weigelt,
	Peter Kaestle, Sebastian Reichel, Andrzej Pietrasiewicz,
	Bartlomiej Zolnierkiewicz, Pengutronix Kernel Team,
	Niklas Söderlund, Shawn Guo, David S . Miller,
	Andy Shevchenko

Use driver's local data to evaluate the need to run or not to run a
measurement.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
---
 drivers/thermal/imx_thermal.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index 9700ae39feb7..c0efa7bc48e2 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -252,10 +252,11 @@ static int imx_get_temp(struct thermal_zone_device *tz, int *temp)
 	const struct thermal_soc_data *soc_data = data->socdata;
 	struct regmap *map = data->tempmon;
 	unsigned int n_meas;
-	bool wait;
+	bool wait, run_measurement;
 	u32 val;
 
-	if (thermal_zone_device_is_enabled(tz)) {
+	run_measurement = !data->irq_enabled;
+	if (!run_measurement) {
 		/* Check if a measurement is currently in progress */
 		regmap_read(map, soc_data->temp_data, &val);
 		wait = !(val & soc_data->temp_valid_mask);
@@ -282,7 +283,7 @@ static int imx_get_temp(struct thermal_zone_device *tz, int *temp)
 
 	regmap_read(map, soc_data->temp_data, &val);
 
-	if (!thermal_zone_device_is_enabled(tz)) {
+	if (run_measurement) {
 		regmap_write(map, soc_data->sensor_ctrl + REG_CLR,
 			     soc_data->measure_temp_mask);
 		regmap_write(map, soc_data->sensor_ctrl + REG_SET,
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 3/3] thermal: Make thermal_zone_device_is_enabled() available to core only
  2020-07-03 10:43 ` Andrzej Pietrasiewicz
  (?)
@ 2020-07-03 10:43   ` Andrzej Pietrasiewicz
  -1 siblings, 0 replies; 24+ messages in thread
From: Andrzej Pietrasiewicz @ 2020-07-03 10:43 UTC (permalink / raw)
  To: linux-pm, linux-acpi, netdev, linux-wireless,
	platform-driver-x86, linux-arm-kernel, linux-renesas-soc,
	linux-rockchip
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Daniel Lezcano, Amit Kucheria, Support Opensource, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Niklas Söderlund, Heiko Stuebner,
	Orson Zhai, Baolin Wang, Chunyan Zhang, Zhang Rui,
	Allison Randal, Enrico Weigelt, Gayatri Kammela, Thomas Gleixner,
	Bartlomiej Zolnierkiewicz, Andrzej Pietrasiewicz, kernel

This function is not needed by drivers.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
---
 drivers/thermal/thermal_core.c | 1 -
 drivers/thermal/thermal_core.h | 2 ++
 include/linux/thermal.h        | 5 -----
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index a61e91513584..052343c59b0a 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -519,7 +519,6 @@ int thermal_zone_device_is_enabled(struct thermal_zone_device *tz)
 
 	return mode == THERMAL_DEVICE_ENABLED;
 }
-EXPORT_SYMBOL_GPL(thermal_zone_device_is_enabled);
 
 void thermal_zone_device_update(struct thermal_zone_device *tz,
 				enum thermal_notify_event event)
diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
index c95689586e19..b1464b3a21e2 100644
--- a/drivers/thermal/thermal_core.h
+++ b/drivers/thermal/thermal_core.h
@@ -166,4 +166,6 @@ of_thermal_get_trip_points(struct thermal_zone_device *tz)
 }
 #endif
 
+int thermal_zone_device_is_enabled(struct thermal_zone_device *tz);
+
 #endif /* __THERMAL_CORE_H__ */
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index b9efaa780d88..108251f23e5c 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -418,7 +418,6 @@ void thermal_cdev_update(struct thermal_cooling_device *);
 void thermal_notify_framework(struct thermal_zone_device *, int);
 int thermal_zone_device_enable(struct thermal_zone_device *tz);
 int thermal_zone_device_disable(struct thermal_zone_device *tz);
-int thermal_zone_device_is_enabled(struct thermal_zone_device *tz);
 #else
 static inline struct thermal_zone_device *thermal_zone_device_register(
 	const char *type, int trips, int mask, void *devdata,
@@ -472,10 +471,6 @@ static inline int thermal_zone_device_enable(struct thermal_zone_device *tz)
 
 static inline int thermal_zone_device_disable(struct thermal_zone_device *tz)
 { return -ENODEV; }
-
-static inline int
-thermal_zone_device_is_enabled(struct thermal_zone_device *tz)
-{ return -ENODEV; }
 #endif /* CONFIG_THERMAL */
 
 #endif /* __THERMAL_H__ */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 3/3] thermal: Make thermal_zone_device_is_enabled() available to core only
@ 2020-07-03 10:43   ` Andrzej Pietrasiewicz
  0 siblings, 0 replies; 24+ messages in thread
From: Andrzej Pietrasiewicz @ 2020-07-03 10:43 UTC (permalink / raw)
  To: linux-pm, linux-acpi, netdev, linux-wireless,
	platform-driver-x86, linux-arm-kernel, linux-renesas-soc,
	linux-rockchip
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Daniel Lezcano, Amit Kucheria, Support Opensource

This function is not needed by drivers.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
---
 drivers/thermal/thermal_core.c | 1 -
 drivers/thermal/thermal_core.h | 2 ++
 include/linux/thermal.h        | 5 -----
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index a61e91513584..052343c59b0a 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -519,7 +519,6 @@ int thermal_zone_device_is_enabled(struct thermal_zone_device *tz)
 
 	return mode == THERMAL_DEVICE_ENABLED;
 }
-EXPORT_SYMBOL_GPL(thermal_zone_device_is_enabled);
 
 void thermal_zone_device_update(struct thermal_zone_device *tz,
 				enum thermal_notify_event event)
diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
index c95689586e19..b1464b3a21e2 100644
--- a/drivers/thermal/thermal_core.h
+++ b/drivers/thermal/thermal_core.h
@@ -166,4 +166,6 @@ of_thermal_get_trip_points(struct thermal_zone_device *tz)
 }
 #endif
 
+int thermal_zone_device_is_enabled(struct thermal_zone_device *tz);
+
 #endif /* __THERMAL_CORE_H__ */
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index b9efaa780d88..108251f23e5c 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -418,7 +418,6 @@ void thermal_cdev_update(struct thermal_cooling_device *);
 void thermal_notify_framework(struct thermal_zone_device *, int);
 int thermal_zone_device_enable(struct thermal_zone_device *tz);
 int thermal_zone_device_disable(struct thermal_zone_device *tz);
-int thermal_zone_device_is_enabled(struct thermal_zone_device *tz);
 #else
 static inline struct thermal_zone_device *thermal_zone_device_register(
 	const char *type, int trips, int mask, void *devdata,
@@ -472,10 +471,6 @@ static inline int thermal_zone_device_enable(struct thermal_zone_device *tz)
 
 static inline int thermal_zone_device_disable(struct thermal_zone_device *tz)
 { return -ENODEV; }
-
-static inline int
-thermal_zone_device_is_enabled(struct thermal_zone_device *tz)
-{ return -ENODEV; }
 #endif /* CONFIG_THERMAL */
 
 #endif /* __THERMAL_H__ */
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 3/3] thermal: Make thermal_zone_device_is_enabled() available to core only
@ 2020-07-03 10:43   ` Andrzej Pietrasiewicz
  0 siblings, 0 replies; 24+ messages in thread
From: Andrzej Pietrasiewicz @ 2020-07-03 10:43 UTC (permalink / raw)
  To: linux-pm, linux-acpi, netdev, linux-wireless,
	platform-driver-x86, linux-arm-kernel, linux-renesas-soc,
	linux-rockchip
  Cc: Emmanuel Grumbach, Heiko Stuebner, Rafael J . Wysocki,
	Vishal Kulkarni, Luca Coelho, Miquel Raynal, kernel,
	Fabio Estevam, Amit Kucheria, Chunyan Zhang, Daniel Lezcano,
	Allison Randal, NXP Linux Team, Darren Hart, Zhang Rui,
	Gayatri Kammela, Len Brown, Johannes Berg, Intel Linux Wireless,
	Sascha Hauer, Ido Schimmel, Baolin Wang, Jiri Pirko, Orson Zhai,
	Thomas Gleixner, Kalle Valo, Support Opensource, Enrico Weigelt,
	Peter Kaestle, Sebastian Reichel, Andrzej Pietrasiewicz,
	Bartlomiej Zolnierkiewicz, Pengutronix Kernel Team,
	Niklas Söderlund, Shawn Guo, David S . Miller,
	Andy Shevchenko

This function is not needed by drivers.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
---
 drivers/thermal/thermal_core.c | 1 -
 drivers/thermal/thermal_core.h | 2 ++
 include/linux/thermal.h        | 5 -----
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index a61e91513584..052343c59b0a 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -519,7 +519,6 @@ int thermal_zone_device_is_enabled(struct thermal_zone_device *tz)
 
 	return mode == THERMAL_DEVICE_ENABLED;
 }
-EXPORT_SYMBOL_GPL(thermal_zone_device_is_enabled);
 
 void thermal_zone_device_update(struct thermal_zone_device *tz,
 				enum thermal_notify_event event)
diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
index c95689586e19..b1464b3a21e2 100644
--- a/drivers/thermal/thermal_core.h
+++ b/drivers/thermal/thermal_core.h
@@ -166,4 +166,6 @@ of_thermal_get_trip_points(struct thermal_zone_device *tz)
 }
 #endif
 
+int thermal_zone_device_is_enabled(struct thermal_zone_device *tz);
+
 #endif /* __THERMAL_CORE_H__ */
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index b9efaa780d88..108251f23e5c 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -418,7 +418,6 @@ void thermal_cdev_update(struct thermal_cooling_device *);
 void thermal_notify_framework(struct thermal_zone_device *, int);
 int thermal_zone_device_enable(struct thermal_zone_device *tz);
 int thermal_zone_device_disable(struct thermal_zone_device *tz);
-int thermal_zone_device_is_enabled(struct thermal_zone_device *tz);
 #else
 static inline struct thermal_zone_device *thermal_zone_device_register(
 	const char *type, int trips, int mask, void *devdata,
@@ -472,10 +471,6 @@ static inline int thermal_zone_device_enable(struct thermal_zone_device *tz)
 
 static inline int thermal_zone_device_disable(struct thermal_zone_device *tz)
 { return -ENODEV; }
-
-static inline int
-thermal_zone_device_is_enabled(struct thermal_zone_device *tz)
-{ return -ENODEV; }
 #endif /* CONFIG_THERMAL */
 
 #endif /* __THERMAL_H__ */
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/3] Fixes for stop monitoring disabled devices series
  2020-07-03 10:43 ` Andrzej Pietrasiewicz
  (?)
@ 2020-07-03 11:06   ` Daniel Lezcano
  -1 siblings, 0 replies; 24+ messages in thread
From: Daniel Lezcano @ 2020-07-03 11:06 UTC (permalink / raw)
  To: Andrzej Pietrasiewicz, linux-pm, linux-acpi, netdev,
	linux-wireless, platform-driver-x86, linux-arm-kernel,
	linux-renesas-soc, linux-rockchip
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Amit Kucheria, Support Opensource, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Niklas Söderlund, Heiko Stuebner, Orson Zhai, Baolin Wang,
	Chunyan Zhang, Zhang Rui, Allison Randal, Enrico Weigelt,
	Gayatri Kammela, Thomas Gleixner, Bartlomiej Zolnierkiewicz,
	kernel

On 03/07/2020 12:43, Andrzej Pietrasiewicz wrote:
> This short series contains fixes for "Stop monitoring disabled devices"
> series https://www.spinics.net/lists/arm-kernel/msg817861.html
> 
> Invocation of thermal_zone_device_is_enabled() in acpi/thermal is now
> redundant, because thermal_zone_device_update() now is capable of
> handling disabled devices.
> 
> In imx's ->get_temp() the lock must not be taken, otherwise a deadlock
> happens. The decision whether explicitly running a measurement cycle
> is needed is taken based on driver's local irq_enabled variable.
> 
> Finally, thermal_zone_device_is_enabled() is made available to the
> core only, as there are no driver users of it.
> 
> Andrzej Pietrasiewicz (3):
>   acpi: thermal: Don't call thermal_zone_device_is_enabled()
>   thermal: imx: Use driver's local data to decide whether to run a
>     measurement
>   thermal: Make thermal_zone_device_is_enabled() available to core only
> 
>  drivers/acpi/thermal.c         | 3 ---
>  drivers/thermal/imx_thermal.c  | 7 ++++---
>  drivers/thermal/thermal_core.c | 1 -
>  drivers/thermal/thermal_core.h | 2 ++
>  include/linux/thermal.h        | 5 -----
>  5 files changed, 6 insertions(+), 12 deletions(-)

Is this series easily merge-able with the other series?




-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/3] Fixes for stop monitoring disabled devices series
@ 2020-07-03 11:06   ` Daniel Lezcano
  0 siblings, 0 replies; 24+ messages in thread
From: Daniel Lezcano @ 2020-07-03 11:06 UTC (permalink / raw)
  To: Andrzej Pietrasiewicz, linux-pm, linux-acpi, netdev,
	linux-wireless, platform-driver-x86, linux-arm-kernel,
	linux-renesas-soc, linux-rockchip
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Amit Kucheria, Support Opensource, Shawn Guo

On 03/07/2020 12:43, Andrzej Pietrasiewicz wrote:
> This short series contains fixes for "Stop monitoring disabled devices"
> series https://www.spinics.net/lists/arm-kernel/msg817861.html
> 
> Invocation of thermal_zone_device_is_enabled() in acpi/thermal is now
> redundant, because thermal_zone_device_update() now is capable of
> handling disabled devices.
> 
> In imx's ->get_temp() the lock must not be taken, otherwise a deadlock
> happens. The decision whether explicitly running a measurement cycle
> is needed is taken based on driver's local irq_enabled variable.
> 
> Finally, thermal_zone_device_is_enabled() is made available to the
> core only, as there are no driver users of it.
> 
> Andrzej Pietrasiewicz (3):
>   acpi: thermal: Don't call thermal_zone_device_is_enabled()
>   thermal: imx: Use driver's local data to decide whether to run a
>     measurement
>   thermal: Make thermal_zone_device_is_enabled() available to core only
> 
>  drivers/acpi/thermal.c         | 3 ---
>  drivers/thermal/imx_thermal.c  | 7 ++++---
>  drivers/thermal/thermal_core.c | 1 -
>  drivers/thermal/thermal_core.h | 2 ++
>  include/linux/thermal.h        | 5 -----
>  5 files changed, 6 insertions(+), 12 deletions(-)

Is this series easily merge-able with the other series?




-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/3] Fixes for stop monitoring disabled devices series
@ 2020-07-03 11:06   ` Daniel Lezcano
  0 siblings, 0 replies; 24+ messages in thread
From: Daniel Lezcano @ 2020-07-03 11:06 UTC (permalink / raw)
  To: Andrzej Pietrasiewicz, linux-pm, linux-acpi, netdev,
	linux-wireless, platform-driver-x86, linux-arm-kernel,
	linux-renesas-soc, linux-rockchip
  Cc: Emmanuel Grumbach, Heiko Stuebner, Rafael J . Wysocki,
	Vishal Kulkarni, Luca Coelho, Miquel Raynal, kernel,
	Fabio Estevam, Amit Kucheria, Chunyan Zhang,
	Bartlomiej Zolnierkiewicz, Allison Randal, NXP Linux Team,
	Darren Hart, Zhang Rui, Gayatri Kammela, Len Brown,
	Johannes Berg, Intel Linux Wireless, Sascha Hauer, Ido Schimmel,
	Baolin Wang, Jiri Pirko, Orson Zhai, Thomas Gleixner, Kalle Valo,
	Support Opensource, Enrico Weigelt, Peter Kaestle,
	Sebastian Reichel, Pengutronix Kernel Team,
	Niklas Söderlund, Shawn Guo, David S . Miller,
	Andy Shevchenko

On 03/07/2020 12:43, Andrzej Pietrasiewicz wrote:
> This short series contains fixes for "Stop monitoring disabled devices"
> series https://www.spinics.net/lists/arm-kernel/msg817861.html
> 
> Invocation of thermal_zone_device_is_enabled() in acpi/thermal is now
> redundant, because thermal_zone_device_update() now is capable of
> handling disabled devices.
> 
> In imx's ->get_temp() the lock must not be taken, otherwise a deadlock
> happens. The decision whether explicitly running a measurement cycle
> is needed is taken based on driver's local irq_enabled variable.
> 
> Finally, thermal_zone_device_is_enabled() is made available to the
> core only, as there are no driver users of it.
> 
> Andrzej Pietrasiewicz (3):
>   acpi: thermal: Don't call thermal_zone_device_is_enabled()
>   thermal: imx: Use driver's local data to decide whether to run a
>     measurement
>   thermal: Make thermal_zone_device_is_enabled() available to core only
> 
>  drivers/acpi/thermal.c         | 3 ---
>  drivers/thermal/imx_thermal.c  | 7 ++++---
>  drivers/thermal/thermal_core.c | 1 -
>  drivers/thermal/thermal_core.h | 2 ++
>  include/linux/thermal.h        | 5 -----
>  5 files changed, 6 insertions(+), 12 deletions(-)

Is this series easily merge-able with the other series?




-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/3] Fixes for stop monitoring disabled devices series
  2020-07-03 11:06   ` Daniel Lezcano
  (?)
@ 2020-07-03 11:57     ` Andrzej Pietrasiewicz
  -1 siblings, 0 replies; 24+ messages in thread
From: Andrzej Pietrasiewicz @ 2020-07-03 11:57 UTC (permalink / raw)
  To: Daniel Lezcano, linux-pm, linux-acpi, netdev, linux-wireless,
	platform-driver-x86, linux-arm-kernel, linux-renesas-soc,
	linux-rockchip
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Amit Kucheria, Support Opensource, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Niklas Söderlund, Heiko Stuebner, Orson Zhai, Baolin Wang,
	Chunyan Zhang, Zhang Rui, Allison Randal, Enrico Weigelt,
	Gayatri Kammela, Thomas Gleixner, Bartlomiej Zolnierkiewicz,
	kernel

Hi,

W dniu 03.07.2020 o 13:06, Daniel Lezcano pisze:
> On 03/07/2020 12:43, Andrzej Pietrasiewicz wrote:
>> This short series contains fixes for "Stop monitoring disabled devices"
>> series https://www.spinics.net/lists/arm-kernel/msg817861.html
>>
>> Invocation of thermal_zone_device_is_enabled() in acpi/thermal is now
>> redundant, because thermal_zone_device_update() now is capable of
>> handling disabled devices.
>>
>> In imx's ->get_temp() the lock must not be taken, otherwise a deadlock
>> happens. The decision whether explicitly running a measurement cycle
>> is needed is taken based on driver's local irq_enabled variable.
>>
>> Finally, thermal_zone_device_is_enabled() is made available to the
>> core only, as there are no driver users of it.
>>
>> Andrzej Pietrasiewicz (3):
>>    acpi: thermal: Don't call thermal_zone_device_is_enabled()
>>    thermal: imx: Use driver's local data to decide whether to run a
>>      measurement
>>    thermal: Make thermal_zone_device_is_enabled() available to core only
>>
>>   drivers/acpi/thermal.c         | 3 ---
>>   drivers/thermal/imx_thermal.c  | 7 ++++---
>>   drivers/thermal/thermal_core.c | 1 -
>>   drivers/thermal/thermal_core.h | 2 ++
>>   include/linux/thermal.h        | 5 -----
>>   5 files changed, 6 insertions(+), 12 deletions(-)
> 
> Is this series easily merge-able with the other series?
> 

So-so.

Some simple conflicts needed to be resolved.

I have created a branch for you to look at and decide
how far off it is from the original and whether the
original Acked-by/Reviewed-by can be retained.

Note that I might have lost some portions of code
during conflict resolution. It seems to me I haven't
but you know.

The branch:

https://gitlab.collabora.com/andrzej.p/kernel-tests/-/tree/thermal-dont-poll-disabled-for-daniel

The code compiles at each stage on x86_64 + COMPILE_TEST.

Andrzej








^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/3] Fixes for stop monitoring disabled devices series
@ 2020-07-03 11:57     ` Andrzej Pietrasiewicz
  0 siblings, 0 replies; 24+ messages in thread
From: Andrzej Pietrasiewicz @ 2020-07-03 11:57 UTC (permalink / raw)
  To: Daniel Lezcano, linux-pm, linux-acpi, netdev, linux-wireless,
	platform-driver-x86, linux-arm-kernel, linux-renesas-soc,
	linux-rockchip
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Amit Kucheria, Support Opensource, Shawn Guo

Hi,

W dniu 03.07.2020 o 13:06, Daniel Lezcano pisze:
> On 03/07/2020 12:43, Andrzej Pietrasiewicz wrote:
>> This short series contains fixes for "Stop monitoring disabled devices"
>> series https://www.spinics.net/lists/arm-kernel/msg817861.html
>>
>> Invocation of thermal_zone_device_is_enabled() in acpi/thermal is now
>> redundant, because thermal_zone_device_update() now is capable of
>> handling disabled devices.
>>
>> In imx's ->get_temp() the lock must not be taken, otherwise a deadlock
>> happens. The decision whether explicitly running a measurement cycle
>> is needed is taken based on driver's local irq_enabled variable.
>>
>> Finally, thermal_zone_device_is_enabled() is made available to the
>> core only, as there are no driver users of it.
>>
>> Andrzej Pietrasiewicz (3):
>>    acpi: thermal: Don't call thermal_zone_device_is_enabled()
>>    thermal: imx: Use driver's local data to decide whether to run a
>>      measurement
>>    thermal: Make thermal_zone_device_is_enabled() available to core only
>>
>>   drivers/acpi/thermal.c         | 3 ---
>>   drivers/thermal/imx_thermal.c  | 7 ++++---
>>   drivers/thermal/thermal_core.c | 1 -
>>   drivers/thermal/thermal_core.h | 2 ++
>>   include/linux/thermal.h        | 5 -----
>>   5 files changed, 6 insertions(+), 12 deletions(-)
> 
> Is this series easily merge-able with the other series?
> 

So-so.

Some simple conflicts needed to be resolved.

I have created a branch for you to look at and decide
how far off it is from the original and whether the
original Acked-by/Reviewed-by can be retained.

Note that I might have lost some portions of code
during conflict resolution. It seems to me I haven't
but you know.

The branch:

https://gitlab.collabora.com/andrzej.p/kernel-tests/-/tree/thermal-dont-poll-disabled-for-daniel

The code compiles at each stage on x86_64 + COMPILE_TEST.

Andrzej

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/3] Fixes for stop monitoring disabled devices series
@ 2020-07-03 11:57     ` Andrzej Pietrasiewicz
  0 siblings, 0 replies; 24+ messages in thread
From: Andrzej Pietrasiewicz @ 2020-07-03 11:57 UTC (permalink / raw)
  To: Daniel Lezcano, linux-pm, linux-acpi, netdev, linux-wireless,
	platform-driver-x86, linux-arm-kernel, linux-renesas-soc,
	linux-rockchip
  Cc: Emmanuel Grumbach, Heiko Stuebner, Rafael J . Wysocki,
	Vishal Kulkarni, Luca Coelho, Miquel Raynal, kernel,
	Fabio Estevam, Amit Kucheria, Chunyan Zhang,
	Bartlomiej Zolnierkiewicz, Allison Randal, NXP Linux Team,
	Darren Hart, Zhang Rui, Gayatri Kammela, Len Brown,
	Johannes Berg, Intel Linux Wireless, Sascha Hauer, Ido Schimmel,
	Baolin Wang, Jiri Pirko, Orson Zhai, Thomas Gleixner, Kalle Valo,
	Support Opensource, Enrico Weigelt, Peter Kaestle,
	Sebastian Reichel, Pengutronix Kernel Team,
	Niklas Söderlund, Shawn Guo, David S . Miller,
	Andy Shevchenko

Hi,

W dniu 03.07.2020 o 13:06, Daniel Lezcano pisze:
> On 03/07/2020 12:43, Andrzej Pietrasiewicz wrote:
>> This short series contains fixes for "Stop monitoring disabled devices"
>> series https://www.spinics.net/lists/arm-kernel/msg817861.html
>>
>> Invocation of thermal_zone_device_is_enabled() in acpi/thermal is now
>> redundant, because thermal_zone_device_update() now is capable of
>> handling disabled devices.
>>
>> In imx's ->get_temp() the lock must not be taken, otherwise a deadlock
>> happens. The decision whether explicitly running a measurement cycle
>> is needed is taken based on driver's local irq_enabled variable.
>>
>> Finally, thermal_zone_device_is_enabled() is made available to the
>> core only, as there are no driver users of it.
>>
>> Andrzej Pietrasiewicz (3):
>>    acpi: thermal: Don't call thermal_zone_device_is_enabled()
>>    thermal: imx: Use driver's local data to decide whether to run a
>>      measurement
>>    thermal: Make thermal_zone_device_is_enabled() available to core only
>>
>>   drivers/acpi/thermal.c         | 3 ---
>>   drivers/thermal/imx_thermal.c  | 7 ++++---
>>   drivers/thermal/thermal_core.c | 1 -
>>   drivers/thermal/thermal_core.h | 2 ++
>>   include/linux/thermal.h        | 5 -----
>>   5 files changed, 6 insertions(+), 12 deletions(-)
> 
> Is this series easily merge-able with the other series?
> 

So-so.

Some simple conflicts needed to be resolved.

I have created a branch for you to look at and decide
how far off it is from the original and whether the
original Acked-by/Reviewed-by can be retained.

Note that I might have lost some portions of code
during conflict resolution. It seems to me I haven't
but you know.

The branch:

https://gitlab.collabora.com/andrzej.p/kernel-tests/-/tree/thermal-dont-poll-disabled-for-daniel

The code compiles at each stage on x86_64 + COMPILE_TEST.

Andrzej








_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/3] Fixes for stop monitoring disabled devices series
  2020-07-03 11:57     ` Andrzej Pietrasiewicz
  (?)
@ 2020-07-03 12:05       ` Daniel Lezcano
  -1 siblings, 0 replies; 24+ messages in thread
From: Daniel Lezcano @ 2020-07-03 12:05 UTC (permalink / raw)
  To: Andrzej Pietrasiewicz, linux-pm, linux-acpi, netdev,
	linux-wireless, platform-driver-x86, linux-arm-kernel,
	linux-renesas-soc, linux-rockchip
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Amit Kucheria, Support Opensource, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Niklas Söderlund, Heiko Stuebner, Orson Zhai, Baolin Wang,
	Chunyan Zhang, Zhang Rui, Allison Randal, Enrico Weigelt,
	Gayatri Kammela, Thomas Gleixner, Bartlomiej Zolnierkiewicz,
	kernel

On 03/07/2020 13:57, Andrzej Pietrasiewicz wrote:
> Hi,
> 
> W dniu 03.07.2020 o 13:06, Daniel Lezcano pisze:
>> On 03/07/2020 12:43, Andrzej Pietrasiewicz wrote:
>>> This short series contains fixes for "Stop monitoring disabled devices"
>>> series https://www.spinics.net/lists/arm-kernel/msg817861.html
>>>
>>> Invocation of thermal_zone_device_is_enabled() in acpi/thermal is now
>>> redundant, because thermal_zone_device_update() now is capable of
>>> handling disabled devices.
>>>
>>> In imx's ->get_temp() the lock must not be taken, otherwise a deadlock
>>> happens. The decision whether explicitly running a measurement cycle
>>> is needed is taken based on driver's local irq_enabled variable.
>>>
>>> Finally, thermal_zone_device_is_enabled() is made available to the
>>> core only, as there are no driver users of it.
>>>
>>> Andrzej Pietrasiewicz (3):
>>>    acpi: thermal: Don't call thermal_zone_device_is_enabled()
>>>    thermal: imx: Use driver's local data to decide whether to run a
>>>      measurement
>>>    thermal: Make thermal_zone_device_is_enabled() available to core only
>>>
>>>   drivers/acpi/thermal.c         | 3 ---
>>>   drivers/thermal/imx_thermal.c  | 7 ++++---
>>>   drivers/thermal/thermal_core.c | 1 -
>>>   drivers/thermal/thermal_core.h | 2 ++
>>>   include/linux/thermal.h        | 5 -----
>>>   5 files changed, 6 insertions(+), 12 deletions(-)
>>
>> Is this series easily merge-able with the other series?
>>
> 
> So-so.
> 
> Some simple conflicts needed to be resolved.
> 
> I have created a branch for you to look at and decide
> how far off it is from the original and whether the
> original Acked-by/Reviewed-by can be retained.
> 
> Note that I might have lost some portions of code
> during conflict resolution. It seems to me I haven't
> but you know.
> 
> The branch:
> 
> https://gitlab.collabora.com/andrzej.p/kernel-tests/-/tree/thermal-dont-poll-disabled-for-daniel

Ok, I propose to keep the these three patches on top of V7.

Rui are you fine with that ?



-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/3] Fixes for stop monitoring disabled devices series
@ 2020-07-03 12:05       ` Daniel Lezcano
  0 siblings, 0 replies; 24+ messages in thread
From: Daniel Lezcano @ 2020-07-03 12:05 UTC (permalink / raw)
  To: Andrzej Pietrasiewicz, linux-pm, linux-acpi, netdev,
	linux-wireless, platform-driver-x86, linux-arm-kernel,
	linux-renesas-soc, linux-rockchip
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Amit Kucheria, Support Opensource, Shawn Guo

On 03/07/2020 13:57, Andrzej Pietrasiewicz wrote:
> Hi,
> 
> W dniu 03.07.2020 o 13:06, Daniel Lezcano pisze:
>> On 03/07/2020 12:43, Andrzej Pietrasiewicz wrote:
>>> This short series contains fixes for "Stop monitoring disabled devices"
>>> series https://www.spinics.net/lists/arm-kernel/msg817861.html
>>>
>>> Invocation of thermal_zone_device_is_enabled() in acpi/thermal is now
>>> redundant, because thermal_zone_device_update() now is capable of
>>> handling disabled devices.
>>>
>>> In imx's ->get_temp() the lock must not be taken, otherwise a deadlock
>>> happens. The decision whether explicitly running a measurement cycle
>>> is needed is taken based on driver's local irq_enabled variable.
>>>
>>> Finally, thermal_zone_device_is_enabled() is made available to the
>>> core only, as there are no driver users of it.
>>>
>>> Andrzej Pietrasiewicz (3):
>>>    acpi: thermal: Don't call thermal_zone_device_is_enabled()
>>>    thermal: imx: Use driver's local data to decide whether to run a
>>>      measurement
>>>    thermal: Make thermal_zone_device_is_enabled() available to core only
>>>
>>>   drivers/acpi/thermal.c         | 3 ---
>>>   drivers/thermal/imx_thermal.c  | 7 ++++---
>>>   drivers/thermal/thermal_core.c | 1 -
>>>   drivers/thermal/thermal_core.h | 2 ++
>>>   include/linux/thermal.h        | 5 -----
>>>   5 files changed, 6 insertions(+), 12 deletions(-)
>>
>> Is this series easily merge-able with the other series?
>>
> 
> So-so.
> 
> Some simple conflicts needed to be resolved.
> 
> I have created a branch for you to look at and decide
> how far off it is from the original and whether the
> original Acked-by/Reviewed-by can be retained.
> 
> Note that I might have lost some portions of code
> during conflict resolution. It seems to me I haven't
> but you know.
> 
> The branch:
> 
> https://gitlab.collabora.com/andrzej.p/kernel-tests/-/tree/thermal-dont-poll-disabled-for-daniel

Ok, I propose to keep the these three patches on top of V7.

Rui are you fine with that ?



-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/3] Fixes for stop monitoring disabled devices series
@ 2020-07-03 12:05       ` Daniel Lezcano
  0 siblings, 0 replies; 24+ messages in thread
From: Daniel Lezcano @ 2020-07-03 12:05 UTC (permalink / raw)
  To: Andrzej Pietrasiewicz, linux-pm, linux-acpi, netdev,
	linux-wireless, platform-driver-x86, linux-arm-kernel,
	linux-renesas-soc, linux-rockchip
  Cc: Emmanuel Grumbach, Heiko Stuebner, Rafael J . Wysocki,
	Vishal Kulkarni, Luca Coelho, Miquel Raynal, kernel,
	Fabio Estevam, Amit Kucheria, Chunyan Zhang,
	Bartlomiej Zolnierkiewicz, Allison Randal, NXP Linux Team,
	Darren Hart, Zhang Rui, Gayatri Kammela, Len Brown,
	Johannes Berg, Intel Linux Wireless, Sascha Hauer, Ido Schimmel,
	Baolin Wang, Jiri Pirko, Orson Zhai, Thomas Gleixner, Kalle Valo,
	Support Opensource, Enrico Weigelt, Peter Kaestle,
	Sebastian Reichel, Pengutronix Kernel Team,
	Niklas Söderlund, Shawn Guo, David S . Miller,
	Andy Shevchenko

On 03/07/2020 13:57, Andrzej Pietrasiewicz wrote:
> Hi,
> 
> W dniu 03.07.2020 o 13:06, Daniel Lezcano pisze:
>> On 03/07/2020 12:43, Andrzej Pietrasiewicz wrote:
>>> This short series contains fixes for "Stop monitoring disabled devices"
>>> series https://www.spinics.net/lists/arm-kernel/msg817861.html
>>>
>>> Invocation of thermal_zone_device_is_enabled() in acpi/thermal is now
>>> redundant, because thermal_zone_device_update() now is capable of
>>> handling disabled devices.
>>>
>>> In imx's ->get_temp() the lock must not be taken, otherwise a deadlock
>>> happens. The decision whether explicitly running a measurement cycle
>>> is needed is taken based on driver's local irq_enabled variable.
>>>
>>> Finally, thermal_zone_device_is_enabled() is made available to the
>>> core only, as there are no driver users of it.
>>>
>>> Andrzej Pietrasiewicz (3):
>>>    acpi: thermal: Don't call thermal_zone_device_is_enabled()
>>>    thermal: imx: Use driver's local data to decide whether to run a
>>>      measurement
>>>    thermal: Make thermal_zone_device_is_enabled() available to core only
>>>
>>>   drivers/acpi/thermal.c         | 3 ---
>>>   drivers/thermal/imx_thermal.c  | 7 ++++---
>>>   drivers/thermal/thermal_core.c | 1 -
>>>   drivers/thermal/thermal_core.h | 2 ++
>>>   include/linux/thermal.h        | 5 -----
>>>   5 files changed, 6 insertions(+), 12 deletions(-)
>>
>> Is this series easily merge-able with the other series?
>>
> 
> So-so.
> 
> Some simple conflicts needed to be resolved.
> 
> I have created a branch for you to look at and decide
> how far off it is from the original and whether the
> original Acked-by/Reviewed-by can be retained.
> 
> Note that I might have lost some portions of code
> during conflict resolution. It seems to me I haven't
> but you know.
> 
> The branch:
> 
> https://gitlab.collabora.com/andrzej.p/kernel-tests/-/tree/thermal-dont-poll-disabled-for-daniel

Ok, I propose to keep the these three patches on top of V7.

Rui are you fine with that ?



-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/3] Fixes for stop monitoring disabled devices series
  2020-07-03 12:05       ` Daniel Lezcano
  (?)
@ 2020-07-05  6:04         ` Zhang Rui
  -1 siblings, 0 replies; 24+ messages in thread
From: Zhang Rui @ 2020-07-05  6:04 UTC (permalink / raw)
  To: Daniel Lezcano, Andrzej Pietrasiewicz, linux-pm, linux-acpi,
	netdev, linux-wireless, platform-driver-x86, linux-arm-kernel,
	linux-renesas-soc, linux-rockchip
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Amit Kucheria, Support Opensource, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Niklas Söderlund, Heiko Stuebner, Orson Zhai, Baolin Wang,
	Chunyan Zhang, Allison Randal, Enrico Weigelt, Gayatri Kammela,
	Thomas Gleixner, Bartlomiej Zolnierkiewicz, kernel

On Fri, 2020-07-03 at 14:05 +0200, Daniel Lezcano wrote:
> On 03/07/2020 13:57, Andrzej Pietrasiewicz wrote:
> > Hi,
> > 
> > W dniu 03.07.2020 o 13:06, Daniel Lezcano pisze:
> > > On 03/07/2020 12:43, Andrzej Pietrasiewicz wrote:
> > > > This short series contains fixes for "Stop monitoring disabled
> > > > devices"
> > > > series https://www.spinics.net/lists/arm-kernel/msg817861.html
> > > > 
> > > > Invocation of thermal_zone_device_is_enabled() in acpi/thermal
> > > > is now
> > > > redundant, because thermal_zone_device_update() now is capable
> > > > of
> > > > handling disabled devices.
> > > > 
> > > > In imx's ->get_temp() the lock must not be taken, otherwise a
> > > > deadlock
> > > > happens. The decision whether explicitly running a measurement
> > > > cycle
> > > > is needed is taken based on driver's local irq_enabled
> > > > variable.
> > > > 
> > > > Finally, thermal_zone_device_is_enabled() is made available to
> > > > the
> > > > core only, as there are no driver users of it.
> > > > 
> > > > Andrzej Pietrasiewicz (3):
> > > >    acpi: thermal: Don't call thermal_zone_device_is_enabled()
> > > >    thermal: imx: Use driver's local data to decide whether to
> > > > run a
> > > >      measurement
> > > >    thermal: Make thermal_zone_device_is_enabled() available to
> > > > core only
> > > > 
> > > >   drivers/acpi/thermal.c         | 3 ---
> > > >   drivers/thermal/imx_thermal.c  | 7 ++++---
> > > >   drivers/thermal/thermal_core.c | 1 -
> > > >   drivers/thermal/thermal_core.h | 2 ++
> > > >   include/linux/thermal.h        | 5 -----
> > > >   5 files changed, 6 insertions(+), 12 deletions(-)
> > > 
> > > Is this series easily merge-able with the other series?
> > > 
> > 
> > So-so.
> > 
> > Some simple conflicts needed to be resolved.
> > 
> > I have created a branch for you to look at and decide
> > how far off it is from the original and whether the
> > original Acked-by/Reviewed-by can be retained.
> > 
> > Note that I might have lost some portions of code
> > during conflict resolution. It seems to me I haven't
> > but you know.
> > 
> > The branch:
> > 
> > 
https://gitlab.collabora.com/andrzej.p/kernel-tests/-/tree/thermal-dont-poll-disabled-for-daniel
> 
> Ok, I propose to keep the these three patches on top of V7.
> 
> Rui are you fine with that ?

Yes, that works for me.

thanks,
rui
> 
> 
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/3] Fixes for stop monitoring disabled devices series
@ 2020-07-05  6:04         ` Zhang Rui
  0 siblings, 0 replies; 24+ messages in thread
From: Zhang Rui @ 2020-07-05  6:04 UTC (permalink / raw)
  To: Daniel Lezcano, Andrzej Pietrasiewicz, linux-pm, linux-acpi,
	netdev, linux-wireless, platform-driver-x86, linux-arm-kernel,
	linux-renesas-soc, linux-rockchip
  Cc: Rafael J . Wysocki, Len Brown, Vishal Kulkarni, David S . Miller,
	Jiri Pirko, Ido Schimmel, Johannes Berg, Emmanuel Grumbach,
	Luca Coelho, Intel Linux Wireless, Kalle Valo, Peter Kaestle,
	Darren Hart, Andy Shevchenko, Sebastian Reichel, Miquel Raynal,
	Amit Kucheria, Support Opensource, Shawn Guo

On Fri, 2020-07-03 at 14:05 +0200, Daniel Lezcano wrote:
> On 03/07/2020 13:57, Andrzej Pietrasiewicz wrote:
> > Hi,
> > 
> > W dniu 03.07.2020 o 13:06, Daniel Lezcano pisze:
> > > On 03/07/2020 12:43, Andrzej Pietrasiewicz wrote:
> > > > This short series contains fixes for "Stop monitoring disabled
> > > > devices"
> > > > series https://www.spinics.net/lists/arm-kernel/msg817861.html
> > > > 
> > > > Invocation of thermal_zone_device_is_enabled() in acpi/thermal
> > > > is now
> > > > redundant, because thermal_zone_device_update() now is capable
> > > > of
> > > > handling disabled devices.
> > > > 
> > > > In imx's ->get_temp() the lock must not be taken, otherwise a
> > > > deadlock
> > > > happens. The decision whether explicitly running a measurement
> > > > cycle
> > > > is needed is taken based on driver's local irq_enabled
> > > > variable.
> > > > 
> > > > Finally, thermal_zone_device_is_enabled() is made available to
> > > > the
> > > > core only, as there are no driver users of it.
> > > > 
> > > > Andrzej Pietrasiewicz (3):
> > > >    acpi: thermal: Don't call thermal_zone_device_is_enabled()
> > > >    thermal: imx: Use driver's local data to decide whether to
> > > > run a
> > > >      measurement
> > > >    thermal: Make thermal_zone_device_is_enabled() available to
> > > > core only
> > > > 
> > > >   drivers/acpi/thermal.c         | 3 ---
> > > >   drivers/thermal/imx_thermal.c  | 7 ++++---
> > > >   drivers/thermal/thermal_core.c | 1 -
> > > >   drivers/thermal/thermal_core.h | 2 ++
> > > >   include/linux/thermal.h        | 5 -----
> > > >   5 files changed, 6 insertions(+), 12 deletions(-)
> > > 
> > > Is this series easily merge-able with the other series?
> > > 
> > 
> > So-so.
> > 
> > Some simple conflicts needed to be resolved.
> > 
> > I have created a branch for you to look at and decide
> > how far off it is from the original and whether the
> > original Acked-by/Reviewed-by can be retained.
> > 
> > Note that I might have lost some portions of code
> > during conflict resolution. It seems to me I haven't
> > but you know.
> > 
> > The branch:
> > 
> > 
https://gitlab.collabora.com/andrzej.p/kernel-tests/-/tree/thermal-dont-poll-disabled-for-daniel
> 
> Ok, I propose to keep the these three patches on top of V7.
> 
> Rui are you fine with that ?

Yes, that works for me.

thanks,
rui
> 
> 
> 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/3] Fixes for stop monitoring disabled devices series
@ 2020-07-05  6:04         ` Zhang Rui
  0 siblings, 0 replies; 24+ messages in thread
From: Zhang Rui @ 2020-07-05  6:04 UTC (permalink / raw)
  To: Daniel Lezcano, Andrzej Pietrasiewicz, linux-pm, linux-acpi,
	netdev, linux-wireless, platform-driver-x86, linux-arm-kernel,
	linux-renesas-soc, linux-rockchip
  Cc: Emmanuel Grumbach, Heiko Stuebner, Rafael J . Wysocki,
	Vishal Kulkarni, Luca Coelho, Miquel Raynal, kernel,
	Fabio Estevam, Amit Kucheria, Chunyan Zhang,
	Bartlomiej Zolnierkiewicz, Allison Randal, NXP Linux Team,
	Darren Hart, Gayatri Kammela, Len Brown, Johannes Berg,
	Intel Linux Wireless, Sascha Hauer, Ido Schimmel, Baolin Wang,
	Jiri Pirko, Orson Zhai, Thomas Gleixner, Kalle Valo,
	Support Opensource, Enrico Weigelt, Peter Kaestle,
	Sebastian Reichel, Pengutronix Kernel Team,
	Niklas Söderlund, Shawn Guo, David S . Miller,
	Andy Shevchenko

On Fri, 2020-07-03 at 14:05 +0200, Daniel Lezcano wrote:
> On 03/07/2020 13:57, Andrzej Pietrasiewicz wrote:
> > Hi,
> > 
> > W dniu 03.07.2020 o 13:06, Daniel Lezcano pisze:
> > > On 03/07/2020 12:43, Andrzej Pietrasiewicz wrote:
> > > > This short series contains fixes for "Stop monitoring disabled
> > > > devices"
> > > > series https://www.spinics.net/lists/arm-kernel/msg817861.html
> > > > 
> > > > Invocation of thermal_zone_device_is_enabled() in acpi/thermal
> > > > is now
> > > > redundant, because thermal_zone_device_update() now is capable
> > > > of
> > > > handling disabled devices.
> > > > 
> > > > In imx's ->get_temp() the lock must not be taken, otherwise a
> > > > deadlock
> > > > happens. The decision whether explicitly running a measurement
> > > > cycle
> > > > is needed is taken based on driver's local irq_enabled
> > > > variable.
> > > > 
> > > > Finally, thermal_zone_device_is_enabled() is made available to
> > > > the
> > > > core only, as there are no driver users of it.
> > > > 
> > > > Andrzej Pietrasiewicz (3):
> > > >    acpi: thermal: Don't call thermal_zone_device_is_enabled()
> > > >    thermal: imx: Use driver's local data to decide whether to
> > > > run a
> > > >      measurement
> > > >    thermal: Make thermal_zone_device_is_enabled() available to
> > > > core only
> > > > 
> > > >   drivers/acpi/thermal.c         | 3 ---
> > > >   drivers/thermal/imx_thermal.c  | 7 ++++---
> > > >   drivers/thermal/thermal_core.c | 1 -
> > > >   drivers/thermal/thermal_core.h | 2 ++
> > > >   include/linux/thermal.h        | 5 -----
> > > >   5 files changed, 6 insertions(+), 12 deletions(-)
> > > 
> > > Is this series easily merge-able with the other series?
> > > 
> > 
> > So-so.
> > 
> > Some simple conflicts needed to be resolved.
> > 
> > I have created a branch for you to look at and decide
> > how far off it is from the original and whether the
> > original Acked-by/Reviewed-by can be retained.
> > 
> > Note that I might have lost some portions of code
> > during conflict resolution. It seems to me I haven't
> > but you know.
> > 
> > The branch:
> > 
> > 
https://gitlab.collabora.com/andrzej.p/kernel-tests/-/tree/thermal-dont-poll-disabled-for-daniel
> 
> Ok, I propose to keep the these three patches on top of V7.
> 
> Rui are you fine with that ?

Yes, that works for me.

thanks,
rui
> 
> 
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2020-07-05  6:06 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-03 10:43 [PATCH 0/3] Fixes for stop monitoring disabled devices series Andrzej Pietrasiewicz
2020-07-03 10:43 ` Andrzej Pietrasiewicz
2020-07-03 10:43 ` Andrzej Pietrasiewicz
2020-07-03 10:43 ` [PATCH 1/3] acpi: thermal: Don't call thermal_zone_device_is_enabled() Andrzej Pietrasiewicz
2020-07-03 10:43   ` Andrzej Pietrasiewicz
2020-07-03 10:43   ` Andrzej Pietrasiewicz
2020-07-03 10:43 ` [PATCH 2/3] thermal: imx: Use driver's local data to decide whether to run a measurement Andrzej Pietrasiewicz
2020-07-03 10:43   ` Andrzej Pietrasiewicz
2020-07-03 10:43   ` Andrzej Pietrasiewicz
2020-07-03 10:43 ` [PATCH 3/3] thermal: Make thermal_zone_device_is_enabled() available to core only Andrzej Pietrasiewicz
2020-07-03 10:43   ` Andrzej Pietrasiewicz
2020-07-03 10:43   ` Andrzej Pietrasiewicz
2020-07-03 11:06 ` [PATCH 0/3] Fixes for stop monitoring disabled devices series Daniel Lezcano
2020-07-03 11:06   ` Daniel Lezcano
2020-07-03 11:06   ` Daniel Lezcano
2020-07-03 11:57   ` Andrzej Pietrasiewicz
2020-07-03 11:57     ` Andrzej Pietrasiewicz
2020-07-03 11:57     ` Andrzej Pietrasiewicz
2020-07-03 12:05     ` Daniel Lezcano
2020-07-03 12:05       ` Daniel Lezcano
2020-07-03 12:05       ` Daniel Lezcano
2020-07-05  6:04       ` Zhang Rui
2020-07-05  6:04         ` Zhang Rui
2020-07-05  6:04         ` Zhang Rui

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.