Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99757
b: refs/heads/master
c: d2dbf34
h: refs/heads/master
i:
  99755: 09e834b
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Jul 8, 2008
1 parent 70342a5 commit f16f012
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b1f006b65c12b85df81f12c1073ad18fd26f4a16
refs/heads/master: d2dbf343329dc777d77488743465f7be4245971d
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ void __init early_res_to_bootmem(u64 start, u64 end)
continue;
printk(KERN_INFO " early res: %d [%llx-%llx] %s\n", i,
final_start, final_end - 1, r->name);
reserve_bootmem(final_start, final_end - final_start,
reserve_bootmem_generic(final_start, final_end - final_start,
BOOTMEM_DEFAULT);
}
}
Expand Down
18 changes: 6 additions & 12 deletions trunk/arch/x86/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,10 +859,11 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,

if (!reserve)
return 1;
#ifdef CONFIG_X86_32
reserve_bootmem(virt_to_phys(mpf), PAGE_SIZE,
reserve_bootmem_generic(virt_to_phys(mpf), PAGE_SIZE,
BOOTMEM_DEFAULT);
if (mpf->mpf_physptr) {
unsigned long size = PAGE_SIZE;
#ifdef CONFIG_X86_32
/*
* We cannot access to MPC table to compute
* table size yet, as only few megabytes from
Expand All @@ -872,22 +873,15 @@ static int __init smp_scan_config(unsigned long base, unsigned long length,
* PAGE_SIZE from mpg->mpf_physptr yields BUG()
* in reserve_bootmem.
*/
unsigned long size = PAGE_SIZE;
unsigned long end = max_low_pfn * PAGE_SIZE;
if (mpf->mpf_physptr + size > end)
size = end - mpf->mpf_physptr;
reserve_bootmem(mpf->mpf_physptr, size,
#endif
reserve_bootmem_generic(mpf->mpf_physptr, size,
BOOTMEM_DEFAULT);
}

#else
reserve_bootmem_generic(virt_to_phys(mpf), PAGE_SIZE,
BOOTMEM_DEFAULT);
if (mpf->mpf_physptr)
reserve_bootmem_generic(mpf->mpf_physptr,
PAGE_SIZE, BOOTMEM_DEFAULT);
#endif
return 1;
return 1;
}
bp += 4;
length -= 16;
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/x86/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,3 +785,9 @@ void free_initrd_mem(unsigned long start, unsigned long end)
free_init_pages("initrd memory", start, end);
}
#endif

int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
int flags)
{
return reserve_bootmem(phys, len, flags);
}
3 changes: 2 additions & 1 deletion trunk/arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,8 @@ void free_initrd_mem(unsigned long start, unsigned long end)
}
#endif

int __init reserve_bootmem_generic(unsigned long phys, unsigned len, int flags)
int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
int flags)
{
#ifdef CONFIG_NUMA
int nid, next_nid;
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/asm-x86/proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ extern void ia32_syscall(void);
extern void ia32_cstar_target(void);
extern void ia32_sysenter_target(void);

extern int reserve_bootmem_generic(unsigned long phys, unsigned len, int flags);

extern void syscall32_cpu_init(void);

extern void check_efer(void);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/bootmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ extern int reserve_bootmem(unsigned long addr, unsigned long size, int flags);
__alloc_bootmem_low(x, PAGE_SIZE, 0)
#endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */

extern int reserve_bootmem_generic(unsigned long addr, unsigned long size,
int flags);
extern unsigned long free_all_bootmem(void);
extern unsigned long free_all_bootmem_node(pg_data_t *pgdat);
extern void *__alloc_bootmem_node(pg_data_t *pgdat,
Expand Down

0 comments on commit f16f012

Please sign in to comment.