]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[PATCH] node hotplug: register cpu: remove node struct
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Tue, 27 Jun 2006 09:53:41 +0000 (02:53 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 28 Jun 2006 00:32:37 +0000 (17:32 -0700)
commit76b67ed9dce69a6a329cdd66f94af1787f417b62
tree4d80993e607ae4a870f98ad3441795737570b012
parentdd0932d9d4301bd58a4d5a634a3a8298c4fc5e24
[PATCH] node hotplug: register cpu: remove node struct

With Goto-san's patch, we can add new pgdat/node at runtime.  I'm now
considering node-hot-add with cpu + memory on ACPI.

I found acpi container, which describes node, could evaluate cpu before
memory. This means cpu-hot-add occurs before memory hot add.

In most part, cpu-hot-add doesn't depend on node hot add.  But register_cpu(),
which creates symbolic link from node to cpu, requires that node should be
onlined before register_cpu().  When a node is onlined, its pgdat should be
there.

This patch-set holds off creating symbolic link from node to cpu
until node is onlined.

This removes node arguments from register_cpu().

Now, register_cpu() requires 'struct node' as its argument.  But the array of
struct node is now unified in driver/base/node.c now (By Goto's node hotplug
patch).  We can get struct node in generic way.  So, this argument is not
necessary now.

This patch also guarantees add cpu under node only when node is onlined.  It
is necessary for node-hot-add vs.  cpu-hot-add patch following this.

Moreover, register_cpu calculates cpu->node_id by cpu_to_node() without regard
to its 'struct node *root' argument.  This patch removes it.

Also modify callers of register_cpu()/unregister_cpu, whose args are changed
by register-cpu-remove-node-struct patch.

[Brice.Goglin@ens-lyon.org: fix it]
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Brice Goglin <Brice.Goglin@ens-lyon.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 files changed:
arch/alpha/kernel/setup.c
arch/arm/kernel/setup.c
arch/i386/kernel/topology.c
arch/ia64/kernel/topology.c
arch/m32r/kernel/setup.c
arch/mips/kernel/smp.c
arch/parisc/kernel/topology.c
arch/powerpc/kernel/setup_32.c
arch/powerpc/kernel/sysfs.c
arch/ppc/kernel/setup.c
arch/s390/kernel/smp.c
arch/sh/kernel/setup.c
arch/sh64/kernel/setup.c
arch/sparc64/kernel/setup.c
drivers/base/cpu.c
drivers/base/node.c
include/linux/cpu.h
include/linux/node.h