All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.36.stable] ACPI: install ACPI table handler before any dynamic tables being loaded
@ 2010-11-02  3:09 Len Brown
  2010-11-02  3:18 ` [PATCH 2.6.35.stable] " Len Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Len Brown @ 2010-11-02  3:09 UTC (permalink / raw)
  To: stable; +Cc: linux-acpi


From: Zhang Rui <rui.zhang@intel.com>

upstream b1d248d96c71665c79befb81207f38f894c7c082

ACPI table sysfs I/F is broken by commit

78f1699659963fff97975df44db6d5dbe7218e55
Author: Alex Chiang <achiang@hp.com>
Date:   Sun Dec 20 12:19:09 2009 -0700
    ACPI: processor: call _PDC early

because dynamic SSDT tables may be loaded in _PDC,
before installing the ACPI table handler.
As a result, the sysfs I/F of these dynamic tables are
located at  /sys/firmware/acpi/tables instead of
/sys/firmware/acpi/tables/dynamic, which is not true.

Invoke acpi_sysfs_init() before acpi_early_processor_set_pdc(),
so that the table handler is installed before any dynamic tables loaded.

https://bugzilla.kernel.org/show_bug.cgi?id=21142

CC: Dennis Jansen <dennis.jansen@web.de>
CC: Alex Chiang <achiang@hp.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/acpi/bus.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 310e3b9..d68bd61 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -935,6 +935,12 @@ static int __init acpi_bus_init(void)
 		goto error1;
 	}
 
+	/*
+	 * _PDC control method may load dynamic SSDT tables,
+	 * and we need to install the table handler before that.
+	 */
+	acpi_sysfs_init();
+
 	acpi_early_processor_set_pdc();
 
 	/*
@@ -1026,7 +1032,6 @@ static int __init acpi_init(void)
 	acpi_scan_init();
 	acpi_ec_init();
 	acpi_power_init();
-	acpi_sysfs_init();
 	acpi_debugfs_init();
 	acpi_sleep_proc_init();
 	acpi_wakeup_device_init();
-- 
1.7.3.2.146.gca209


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

* [PATCH 2.6.35.stable] ACPI: install ACPI table handler before any dynamic tables being loaded
  2010-11-02  3:09 [PATCH 2.6.36.stable] ACPI: install ACPI table handler before any dynamic tables being loaded Len Brown
@ 2010-11-02  3:18 ` Len Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2010-11-02  3:18 UTC (permalink / raw)
  To: stable; +Cc: linux-acpi

From: Zhang Rui <rui.zhang@intel.com>

upstream b1d248d96c71665c79befb81207f38f894c7c082

back-ported to 2.6.35

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/acpi/bus.c      |    6 ++++++
 drivers/acpi/internal.h |    1 +
 drivers/acpi/system.c   |   13 +++----------
 3 files changed, 10 insertions(+), 10 deletions(-)

Index: linux-2.6.35.y/drivers/acpi/bus.c
===================================================================
--- linux-2.6.35.y.orig/drivers/acpi/bus.c
+++ linux-2.6.35.y/drivers/acpi/bus.c
@@ -935,6 +935,12 @@ static int __init acpi_bus_init(void)
 		goto error1;
 	}
 
+	/*
+	 * _PDC control method may load dynamic SSDT tables,
+	 * and we need to install the table handler before that.
+	*/
+	acpi_system_sysfs_init();
+
 	acpi_early_processor_set_pdc();
 
 	/*
Index: linux-2.6.35.y/drivers/acpi/internal.h
===================================================================
--- linux-2.6.35.y.orig/drivers/acpi/internal.h
+++ linux-2.6.35.y/drivers/acpi/internal.h
@@ -23,6 +23,7 @@
 int init_acpi_device_notify(void);
 int acpi_scan_init(void);
 int acpi_system_init(void);
+int acpi_system_sysfs_init(void);
 
 #ifdef CONFIG_ACPI_DEBUG
 int acpi_debug_init(void);
Index: linux-2.6.35.y/drivers/acpi/system.c
===================================================================
--- linux-2.6.35.y.orig/drivers/acpi/system.c
+++ linux-2.6.35.y/drivers/acpi/system.c
@@ -164,7 +164,7 @@ acpi_sysfs_table_handler(u32 event, void
 	return AE_OK;
 }
 
-static int acpi_system_sysfs_init(void)
+int __init acpi_system_sysfs_init(void)
 {
 	struct acpi_table_attr *table_attr;
 	struct acpi_table_header *table_header = NULL;
@@ -627,13 +627,6 @@ static int acpi_system_procfs_init(void)
 
 int __init acpi_system_init(void)
 {
-	int result;
-
-	result = acpi_system_procfs_init();
-	if (result)
-		return result;
-
-	result = acpi_system_sysfs_init();
-
-	return result;
+	return acpi_system_procfs_init();
 }
+

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

end of thread, other threads:[~2010-11-02  3:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-02  3:09 [PATCH 2.6.36.stable] ACPI: install ACPI table handler before any dynamic tables being loaded Len Brown
2010-11-02  3:18 ` [PATCH 2.6.35.stable] " Len Brown

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.