linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ACPI patches for 2.6.26-rc8
@ 2008-06-28  5:32 Len Brown
  2008-06-28  5:32 ` [PATCH 1/3] thermal: Create CONFIG_THERMAL_HWMON=n Len Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Len Brown @ 2008-06-28  5:32 UTC (permalink / raw)
  To: linux-acpi, linux-kernel

These patches are on the acpi release branch.
I've sent a pull request for Linux to snatch them
into 2.6.26 when he returns.

thanks,
-Len



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

* [PATCH 1/3] thermal: Create CONFIG_THERMAL_HWMON=n
  2008-06-28  5:32 ACPI patches for 2.6.26-rc8 Len Brown
@ 2008-06-28  5:32 ` Len Brown
  2008-06-28  5:32   ` [PATCH 2/3] ACPI: don't walk tables if ACPI was disabled Len Brown
  2008-06-28  5:32   ` [PATCH 3/3] dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled Len Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Len Brown @ 2008-06-28  5:32 UTC (permalink / raw)
  To: linux-acpi, linux-kernel; +Cc: Rene Herman, Rene Herman, Len Brown

From: Rene Herman <rene.herman@keyaccess.nl>

A bug in libsensors <= 2.10.6 is exposed
when this new hwmon I/F is enabled.
Create CONFIG_THERMAL_HWMON=n
until some time after libsensors 2.10.7 ships
so those users can run the latest kernel.

libsensors 3.x is already fixed -- those users
can use CONFIG_THERMAL_HWMON=y now.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Acked-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 Documentation/feature-removal-schedule.txt |    9 +++++++++
 drivers/thermal/Kconfig                    |    9 +++++++++
 drivers/thermal/thermal_sys.c              |    4 ++--
 include/linux/thermal.h                    |    6 ++----
 4 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 5b3f31f..46ece3f 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -312,3 +312,12 @@ When:	2.6.26
 Why:	Implementation became generic; users should now include
 	linux/semaphore.h instead.
 Who:	Matthew Wilcox <willy@linux.intel.com>
+
+---------------------------
+
+What:	CONFIG_THERMAL_HWMON
+When:	January 2009
+Why:	This option was introduced just to allow older lm-sensors userspace
+	to keep working over the upgrade to 2.6.26. At the scheduled time of
+	removal fixed lm-sensors (2.x or 3.x) should be readily available.
+Who:	Rene Herman <rene.herman@gmail.com>
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 4b62852..a86e952 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -12,3 +12,12 @@ menuconfig THERMAL
 	  cooling devices.
 	  All platforms with ACPI thermal support can use this driver.
 	  If you want this support, you should say Y or M here.
+
+config THERMAL_HWMON
+	bool "Hardware monitoring support"
+	depends on HWMON=y || HWMON=THERMAL
+	help
+	  The generic thermal sysfs driver's hardware monitoring support
+	  requires a 2.10.7/3.0.2 or later lm-sensors userspace.
+
+	  Say Y if your user-space is new enough.
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 6098787..fe07462 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -295,8 +295,8 @@ thermal_cooling_device_trip_point_show(struct device *dev,
 
 /* Device management */
 
-#if defined(CONFIG_HWMON) ||	\
-	(defined(CONFIG_HWMON_MODULE) && defined(CONFIG_THERMAL_MODULE))
+#if defined(CONFIG_THERMAL_HWMON)
+
 /* hwmon sys I/F */
 #include <linux/hwmon.h>
 static LIST_HEAD(thermal_hwmon_list);
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 06d3e6e..917707e 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -66,8 +66,7 @@ struct thermal_cooling_device {
 				((long)t-2732+5)/10 : ((long)t-2732-5)/10)
 #define CELSIUS_TO_KELVIN(t)	((t)*10+2732)
 
-#if defined(CONFIG_HWMON) ||	\
-	(defined(CONFIG_HWMON_MODULE) && defined(CONFIG_THERMAL_MODULE))
+#if defined(CONFIG_THERMAL_HWMON)
 /* thermal zone devices with the same type share one hwmon device */
 struct thermal_hwmon_device {
 	char type[THERMAL_NAME_LENGTH];
@@ -94,8 +93,7 @@ struct thermal_zone_device {
 	struct idr idr;
 	struct mutex lock;	/* protect cooling devices list */
 	struct list_head node;
-#if defined(CONFIG_HWMON) ||	\
-	(defined(CONFIG_HWMON_MODULE) && defined(CONFIG_THERMAL_MODULE))
+#if defined(CONFIG_THERMAL_HWMON)
 	struct list_head hwmon_node;
 	struct thermal_hwmon_device *hwmon;
 	struct thermal_hwmon_attr temp_input;	/* hwmon sys attr */
-- 
1.5.6.1.89.gd544


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

* [PATCH 2/3] ACPI: don't walk tables if ACPI was disabled
  2008-06-28  5:32 ` [PATCH 1/3] thermal: Create CONFIG_THERMAL_HWMON=n Len Brown
@ 2008-06-28  5:32   ` Len Brown
  2008-06-28  5:32   ` [PATCH 3/3] dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled Len Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Len Brown @ 2008-06-28  5:32 UTC (permalink / raw)
  To: linux-acpi, linux-kernel; +Cc: Vegard Nossum, Len Brown

From: Vegard Nossum <vegard.nossum@gmail.com>

Ingo Molnar wrote:
> -tip auto-testing started triggering this spinlock corruption message
> yesterday:
>
> [    3.976213] calling  acpi_rtc_init+0x0/0xd3
> [    3.980213] ACPI Exception (utmutex-0263): AE_BAD_PARAMETER, Thread F7C50000 could not acquire Mutex [3] [20080321]
> [    3.992213] BUG: spinlock bad magic on CPU#0, swapper/1
> [    3.992213]  lock: c2508dc4, .magic: 00000000, .owner: swapper/1, .owner_cpu: 0

This is apparently because some parts of ACPI, including mutexes, are not
initialized when acpi=off is passed to the kernel.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/acpi/glue.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 2808dc6..9b227d4 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -333,6 +333,9 @@ static int __init acpi_rtc_init(void)
 {
 	struct device *dev = get_rtc_dev();
 
+	if (acpi_disabled)
+		return 0;
+
 	if (dev) {
 		rtc_wake_setup();
 		rtc_info.wake_on = rtc_wake_on;
-- 
1.5.6.1.89.gd544


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

* [PATCH 3/3] dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled.
  2008-06-28  5:32 ` [PATCH 1/3] thermal: Create CONFIG_THERMAL_HWMON=n Len Brown
  2008-06-28  5:32   ` [PATCH 2/3] ACPI: don't walk tables if ACPI was disabled Len Brown
@ 2008-06-28  5:32   ` Len Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Len Brown @ 2008-06-28  5:32 UTC (permalink / raw)
  To: linux-acpi, linux-kernel; +Cc: Len Brown

From: Len Brown <len.brown@intel.com>

Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/acpi/bay.c  |    3 +++
 drivers/acpi/dock.c |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c
index 26038c2..61b6c5b 100644
--- a/drivers/acpi/bay.c
+++ b/drivers/acpi/bay.c
@@ -377,6 +377,9 @@ static int __init bay_init(void)
 
 	INIT_LIST_HEAD(&drive_bays);
 
+	if (acpi_disabled)
+		return -ENODEV;
+
 	/* look for dockable drive bays */
 	acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
 		ACPI_UINT32_MAX, find_bay, &bays, NULL);
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 96c542f..bb7c51f 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -917,6 +917,9 @@ static int __init dock_init(void)
 
 	dock_station = NULL;
 
+	if (acpi_disabled)
+		return 0;
+
 	/* look for a dock station */
 	acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
 			    ACPI_UINT32_MAX, find_dock, &num, NULL);
-- 
1.5.6.1.89.gd544


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

end of thread, other threads:[~2008-06-28  5:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-28  5:32 ACPI patches for 2.6.26-rc8 Len Brown
2008-06-28  5:32 ` [PATCH 1/3] thermal: Create CONFIG_THERMAL_HWMON=n Len Brown
2008-06-28  5:32   ` [PATCH 2/3] ACPI: don't walk tables if ACPI was disabled Len Brown
2008-06-28  5:32   ` [PATCH 3/3] dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).