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

From: Keiichiro Tokunaga
Date: Wed Sep 22 2004 - 08:20:57 EST


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@xxxxxxxxx>
> 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@xxxxxxxxxxxxxx>
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-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/