[Hotplug_sig] [Lhms-devel] acpi emulation for memory hotplug. [2/3] emulate acpi memory hotadd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With this patch, acpi memory device will driver _PS0 method when notify comes.
by adding following swich to DSDT, you can emulate acpi memory hotplug.
==
                Name (L1st,0)
                Method(_STA,0,NotSerialized) {
                        If ( LEqual(L1st,1) ) {
                                Return (0x0f)
                        } else {
                                Return (0x00)
                        }
                }
                Method(_PS0, 0, NotSerialized) {
                        Store(1,L1st)
                }
==
_PS0 is evaluated and changes return value of _STA, when notify comes.

Index: linux-2.6.17-rc5-mm2/drivers/acpi/acpi_memhotplug.c
===================================================================
--- linux-2.6.17-rc5-mm2.orig/drivers/acpi/acpi_memhotplug.c	2006-06-07 17:08:14.000000000 +0900
+++ linux-2.6.17-rc5-mm2/drivers/acpi/acpi_memhotplug.c	2006-06-07 17:10:03.000000000 +0900
@@ -322,6 +322,10 @@
 	struct acpi_memory_device *mem_device;
 	struct acpi_device *device;
 
+        /* for emulation, evaluate our switch, _PS0 */
+	if ((event == ACPI_NOTIFY_BUS_CHECK) || (event == ACPI_NOTIFY_DEVICE_CHECK))
+		acpi_evaluate_object(handle, "_PS0", NULL, NULL);
+
 	switch (event) {
 	case ACPI_NOTIFY_BUS_CHECK:
 		ACPI_DEBUG_PRINT((ACPI_DB_INFO,



[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux