diff options
author | Tejun Heo <tj@kernel.org> | 2009-07-04 08:11:00 +0900 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-07-04 08:11:00 +0900 |
commit | 2f39e637ea240efb74cf807d31c93a71a0b89174 (patch) | |
tree | d26bd3ad962031c5b495a528b4115c2ed4ff7a80 /arch/sparc/kernel/smp_64.c | |
parent | ce3141a277ff6cc37e51008b8888dc2cb7456ef1 (diff) | |
download | linux-2f39e637ea240efb74cf807d31c93a71a0b89174.tar.gz linux-2f39e637ea240efb74cf807d31c93a71a0b89174.tar.bz2 linux-2f39e637ea240efb74cf807d31c93a71a0b89174.zip |
percpu: allow non-linear / sparse cpu -> unit mapping
Currently cpu and unit are always identity mapped. To allow more
efficient large page support on NUMA and lazy allocation for possible
but offline cpus, cpu -> unit mapping needs to be non-linear and/or
sparse. This can be easily implemented by adding a cpu -> unit
mapping array and using it whenever looking up the matching unit for a
cpu.
The only unusal conversion is in pcpu_chunk_addr_search(). The passed
in address is unit0 based and unit0 might not be in use so it needs to
be converted to address of an in-use unit. This is easily done by
adding the unit offset for the current processor.
[ Impact: allows non-linear/sparse cpu -> unit mapping, no visible change yet ]
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/smp_64.c')
-rw-r--r-- | arch/sparc/kernel/smp_64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index f2f22ee97a7a..6970333b48b8 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c @@ -1516,7 +1516,7 @@ void __init setup_per_cpu_areas(void) pcpu_unit_size = pcpu_setup_first_chunk(static_size, PERCPU_MODULE_RESERVE, dyn_size, - PCPU_CHUNK_SIZE, vm.addr); + PCPU_CHUNK_SIZE, vm.addr, NULL); free_bootmem(__pa(ptrs), ptrs_size); |