diff options
author | Tejun Heo <tj@kernel.org> | 2009-02-20 02:29:09 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-02-20 02:29:09 -0500 |
commit | 11124411aa95827404d6bfdfc14c908e1b54513c (patch) | |
tree | e613edf6df9d1130e0ebe853ba1390c8389b25b3 /arch/x86/mm/init_64.c | |
parent | fbf59bc9d74d1fb30b8e0630743aff2806eafcea (diff) |
x86: convert to the new dynamic percpu allocator
Impact: use new dynamic allocator, unified access to static/dynamic
percpu memory
Convert to the new dynamic percpu allocator.
* implement populate_extra_pte() for both 32 and 64
* update setup_per_cpu_areas() to use pcpu_setup_static()
* define __addr_to_pcpu_ptr() and __pcpu_ptr_to_addr()
* define config HAVE_DYNAMIC_PER_CPU_AREA
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r-- | arch/x86/mm/init_64.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index e6d36b490250..7f91e2cdc4ce 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -223,6 +223,25 @@ set_pte_vaddr(unsigned long vaddr, pte_t pteval) | |||
223 | set_pte_vaddr_pud(pud_page, vaddr, pteval); | 223 | set_pte_vaddr_pud(pud_page, vaddr, pteval); |
224 | } | 224 | } |
225 | 225 | ||
226 | void __init populate_extra_pte(unsigned long vaddr) | ||
227 | { | ||
228 | pgd_t *pgd; | ||
229 | pud_t *pud; | ||
230 | |||
231 | pgd = pgd_offset_k(vaddr); | ||
232 | if (pgd_none(*pgd)) { | ||
233 | pud = (pud_t *)spp_getpage(); | ||
234 | pgd_populate(&init_mm, pgd, pud); | ||
235 | if (pud != pud_offset(pgd, 0)) { | ||
236 | printk(KERN_ERR "PAGETABLE BUG #00! %p <-> %p\n", | ||
237 | pud, pud_offset(pgd, 0)); | ||
238 | return; | ||
239 | } | ||
240 | } | ||
241 | |||
242 | set_pte_vaddr_pud((pud_t *)pgd_page_vaddr(*pgd), vaddr, __pte(0)); | ||
243 | } | ||
244 | |||
226 | /* | 245 | /* |
227 | * Create large page table mappings for a range of physical addresses. | 246 | * Create large page table mappings for a range of physical addresses. |
228 | */ | 247 | */ |