Re: [ACPI] PATCH-ACPI based CPU hotplug[3/6]-Mapping lsapic to cpu

From: Keiichiro Tokunaga <tokunaga.keiich_at_jp.fujitsu.com>
Date: 2004-09-22 23:15:38
On Mon, 20 Sep 2004 09:38:19 -0700 Keshavamurthy Anil S wrote:
> ---
> Name:acpi_hotplug_arch.patch
> Status: Tested on 2.6.9-rc2
> Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
> Depends:	
> Version: applies on 2.6.9-rc2	
> Description: 
> This patch provides the architecture specifice support for mapping lsapic to cpu array.
> Currently this supports just IA64. Support for IA32 and x86_64 is in progress
> ---

I would like to suggest introducing a new function 'acpi_get_pxm()'
since other drivers might need it in the future.  Acutally, ACPI container
hotplug will be use it soon.

Here is a patch creating the function.

Thanks,
Keiichiro Tokunaga

Name: acpi_pxm_support.patch
Status: 2.6.9-rc2
Signed-off-by: Keiichiro Tokunaga <tokuanga.keiich@jp.fujitsu.com>
Description:
Introduce acpi_get_pxm().


---

 linux-2.6.9-rc2-fix-kei/drivers/acpi/numa.c  |   22 +++++++++++++++++++++-
 linux-2.6.9-rc2-fix-kei/include/linux/acpi.h |    8 ++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)

diff -puN drivers/acpi/numa.c~acpi_pxm_support drivers/acpi/numa.c
--- linux-2.6.9-rc2-fix/drivers/acpi/numa.c~acpi_pxm_support	2004-09-22 21:53:53.490202242 +0900
+++ linux-2.6.9-rc2-fix-kei/drivers/acpi/numa.c	2004-09-22 21:53:53.495085087 +0900
@@ -22,7 +22,7 @@
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  *
  */
-
+#include <linux/module.h>
 #include <linux/config.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
@@ -195,3 +195,23 @@ acpi_numa_init()
 	acpi_numa_arch_fixup();
 	return 0;
 }
+
+int
+acpi_get_pxm(acpi_handle h)
+{
+	unsigned long pxm=-1;
+	acpi_status status;
+	acpi_handle handle ;
+	acpi_handle phandle = h;
+
+	do {
+		handle = phandle;
+		status = acpi_evaluate_integer(handle,"_PXM",NULL,&pxm);
+		if (ACPI_SUCCESS(status))  {
+			return (int)pxm;
+		}
+		status = acpi_get_parent(handle,&phandle);
+	} while( ACPI_SUCCESS(status) );
+	return -1;
+}
+EXPORT_SYMBOL(acpi_get_pxm);
diff -puN include/linux/acpi.h~acpi_pxm_support include/linux/acpi.h
--- linux-2.6.9-rc2-fix/include/linux/acpi.h~acpi_pxm_support	2004-09-22 18:53:53.492155380 +0900
+++ linux-2.6.9-rc2-fix-kei/include/linux/acpi.h	2004-09-22 18:53:53.495085087 +0900
@@ -477,4 +477,12 @@ static inline int acpi_blacklisted(void)
 
 #endif /*!CONFIG_ACPI_INTERPRETER*/
 
+#ifdef CONFIG_ACPI_NUMA
+int acpi_get_pxm(acpi_handle handle);
+#else
+static inline int acpi_get_pxm(acpi_handle hanle)
+{
+	return 0;
+}
+#endif
 #endif /*_LINUX_ACPI_H*/

_
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Sep 22 09:19:47 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:30 EST