From 5bb5b51619693574483342e2f71c99f261e0deaa Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Mon, 29 Oct 2007 21:18:10 +0100 Subject: [PATCH] --- yaml --- r: 72757 b: refs/heads/master c: f7402e0361d4472535e07cfca648f2fa81d85cd2 h: refs/heads/master i: 72755: 6d11858f7f5b73688805ebb28b0265f6b27793ea v: v3 --- [refs] | 2 +- trunk/arch/x86/mm/init_64.c | 6 ++++++ trunk/include/linux/bootmem.h | 1 + trunk/kernel/sched.c | 2 +- trunk/mm/sparse.c | 11 +++++++++++ 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 6829491f1d2a..49edb91c4192 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6a22c57b8d2a62dea7280a6b2ac807a539ef0716 +refs/heads/master: f7402e0361d4472535e07cfca648f2fa81d85cd2 diff --git a/trunk/arch/x86/mm/init_64.c b/trunk/arch/x86/mm/init_64.c index a7308b2cd058..1e3862e41065 100644 --- a/trunk/arch/x86/mm/init_64.c +++ b/trunk/arch/x86/mm/init_64.c @@ -728,6 +728,12 @@ int in_gate_area_no_task(unsigned long addr) return (addr >= VSYSCALL_START) && (addr < VSYSCALL_END); } +void * __init alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size) +{ + return __alloc_bootmem_core(pgdat->bdata, size, + SMP_CACHE_BYTES, (4UL*1024*1024*1024), 0); +} + const char *arch_vma_name(struct vm_area_struct *vma) { if (vma->vm_mm && vma->vm_start == (long)vma->vm_mm->context.vdso) diff --git a/trunk/include/linux/bootmem.h b/trunk/include/linux/bootmem.h index 0365ec9fc0c9..c83534ee1e79 100644 --- a/trunk/include/linux/bootmem.h +++ b/trunk/include/linux/bootmem.h @@ -59,6 +59,7 @@ extern void *__alloc_bootmem_core(struct bootmem_data *bdata, unsigned long align, unsigned long goal, unsigned long limit); +extern void *alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size); #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE extern void reserve_bootmem(unsigned long addr, unsigned long size); diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index b4fbbc440453..74dbb4020cf5 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -3355,7 +3355,7 @@ void account_user_time(struct task_struct *p, cputime_t cputime) * @p: the process that the cpu time gets accounted to * @cputime: the cpu time spent in virtual machine since the last update */ -void account_guest_time(struct task_struct *p, cputime_t cputime) +static void account_guest_time(struct task_struct *p, cputime_t cputime) { cputime64_t tmp; struct cpu_usage_stat *cpustat = &kstat_this_cpu.cpustat; diff --git a/trunk/mm/sparse.c b/trunk/mm/sparse.c index e06f514fe04f..08fb14f5eea3 100644 --- a/trunk/mm/sparse.c +++ b/trunk/mm/sparse.c @@ -220,6 +220,12 @@ static int __meminit sparse_init_one_section(struct mem_section *ms, return 1; } +__attribute__((weak)) __init +void *alloc_bootmem_high_node(pg_data_t *pgdat, unsigned long size) +{ + return NULL; +} + static unsigned long usemap_size(void) { unsigned long size_bytes; @@ -261,6 +267,11 @@ struct page __init *sparse_mem_map_populate(unsigned long pnum, int nid) if (map) return map; + map = alloc_bootmem_high_node(NODE_DATA(nid), + sizeof(struct page) * PAGES_PER_SECTION); + if (map) + return map; + map = alloc_bootmem_node(NODE_DATA(nid), sizeof(struct page) * PAGES_PER_SECTION); return map;