+ pgdat-allocation-for-new-node-add-get-node-id-by-acpi.patch added to -mm tree

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

 



The patch titled

     pgdat allocation for new node add (get node id by acpi)

has been added to the -mm tree.  Its filename is

     pgdat-allocation-for-new-node-add-get-node-id-by-acpi.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Yasunori Goto <y-goto@xxxxxxxxxxxxxx>

This is to find node id from acpi's handle of memory_device in DSDT.  _PXM for
the new node can be found by acpi_get_pxm() by using new memory's handle.  So,
node id can be found by pxm_to_nid_map[].

  This patch becomes simpler than v2 of node hot-add patch.
  Because old add_memory() function doesn't have node id parameter.
  So, kernel must find its handle by physical address via DSDT again.
  But, v3 just give node id to add_memory() now.

Signed-off-by: Yasunori Goto <y-goto@xxxxxxxxxxxxxx>
Cc: Dave Hansen <haveblue@xxxxxxxxxx>
Cc: "Brown, Len" <len.brown@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/acpi/acpi_memhotplug.c |    3 ++-
 drivers/acpi/numa.c            |   15 +++++++++++++++
 include/linux/acpi.h           |    6 ++++++
 3 files changed, 23 insertions(+), 1 deletion(-)

diff -puN drivers/acpi/acpi_memhotplug.c~pgdat-allocation-for-new-node-add-get-node-id-by-acpi drivers/acpi/acpi_memhotplug.c
--- devel/drivers/acpi/acpi_memhotplug.c~pgdat-allocation-for-new-node-add-get-node-id-by-acpi	2006-04-20 16:05:36.000000000 -0700
+++ devel-akpm/drivers/acpi/acpi_memhotplug.c	2006-04-20 16:05:36.000000000 -0700
@@ -215,7 +215,7 @@ static int acpi_memory_enable_device(str
 {
 	int result, num_enabled = 0;
 	struct acpi_memory_info *info;
-	int node = 0;
+	int node;
 
 	ACPI_FUNCTION_TRACE("acpi_memory_enable_device");
 
@@ -227,6 +227,7 @@ static int acpi_memory_enable_device(str
 		return result;
 	}
 
+	node = acpi_get_node(mem_device->handle);
 	/*
 	 * Tell the VM there is more memory here...
 	 * Note: Assume that this function returns zero on success
diff -puN drivers/acpi/numa.c~pgdat-allocation-for-new-node-add-get-node-id-by-acpi drivers/acpi/numa.c
--- devel/drivers/acpi/numa.c~pgdat-allocation-for-new-node-add-get-node-id-by-acpi	2006-04-20 16:05:36.000000000 -0700
+++ devel-akpm/drivers/acpi/numa.c	2006-04-20 16:05:36.000000000 -0700
@@ -208,3 +208,18 @@ int acpi_get_pxm(acpi_handle h)
 }
 
 EXPORT_SYMBOL(acpi_get_pxm);
+
+int acpi_get_node(acpi_handle *handle)
+{
+	int pxm, node = -1;
+
+	ACPI_FUNCTION_TRACE("acpi_get_node");
+
+	pxm = acpi_get_pxm(handle);
+	if (pxm >= 0)
+		node = acpi_map_pxm_to_node(pxm);
+
+	return_VALUE(node);
+}
+
+EXPORT_SYMBOL(acpi_get_node);
diff -puN include/linux/acpi.h~pgdat-allocation-for-new-node-add-get-node-id-by-acpi include/linux/acpi.h
--- devel/include/linux/acpi.h~pgdat-allocation-for-new-node-add-get-node-id-by-acpi	2006-04-20 16:05:36.000000000 -0700
+++ devel-akpm/include/linux/acpi.h	2006-04-20 16:05:36.000000000 -0700
@@ -520,12 +520,18 @@ static inline void acpi_set_cstate_limit
 
 #ifdef CONFIG_ACPI_NUMA
 int acpi_get_pxm(acpi_handle handle);
+int acpi_get_node(acpi_handle *handle);
 #else
 static inline int acpi_get_pxm(acpi_handle handle)
 {
 	return 0;
 }
+static inline int acpi_get_node(acpi_handle *handle)
+{
+	return 0;
+}
 #endif
+extern int acpi_paddr_to_node(u64 start_addr, u64 size);
 
 extern int pnpacpi_disabled;
 
_

Patches currently in -mm which might be from y-goto@xxxxxxxxxxxxxx are

catch-notification-of-memory-add-event-of-acpi-via-container-driver-register-start-func-for-memory-device.patch
catch-notification-of-memory-add-event-of-acpi-via-container-driveravoid-redundant-call-add_memory.patch
wait_table-and-zonelist-initializing-for-memory-hotadd-change-name-of-wait_table_size.patch
wait_table-and-zonelist-initializing-for-memory-hotadd-change-to-meminit-for-build_zonelist.patch
wait_table-and-zonelist-initializing-for-memory-hotaddadd-return-code-for-init_current_empty_zone.patch
wait_table-and-zonelist-initializing-for-memory-hotadd-wait_table-initialization.patch
wait_table-and-zonelist-initializing-for-memory-hotadd-wait_table-initialization-fixes.patch
wait_table-and-zonelist-initializing-for-memory-hotadd-update-zonelists.patch
pgdat-allocation-for-new-node-add-specify-node-id.patch
pgdat-allocation-for-new-node-add-specify-node-id-tidy.patch
pgdat-allocation-for-new-node-add-get-node-id-by-acpi.patch
pgdat-allocation-for-new-node-add-generic-alloc-node_data.patch
pgdat-allocation-for-new-node-add-generic-alloc-node_data-tidy.patch
pgdat-allocation-for-new-node-add-refresh-node_data.patch
pgdat-allocation-for-new-node-add-export-kswapd-start-func.patch
pgdat-allocation-for-new-node-add-export-kswapd-start-func-tidy.patch
pgdat-allocation-for-new-node-add-call-pgdat-allocation.patch
unify-pxm_to_node-and-node_to_pxm.patch
unify-pxm_to_node-and-node_to_pxm-update.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux