Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212721
b: refs/heads/master
c: f88eff7
h: refs/heads/master
i:
  212719: f09aee9
v: v3
  • Loading branch information
Yinghai Lu authored and H. Peter Anvin committed Aug 27, 2010
1 parent 0dbf14a commit 87daed8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 25 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: fb74fb6db91abc3c1ceeb9d2c17b44866a12c63e
refs/heads/master: f88eff74aa848e58b1ea49768c0bbb874b31357f
6 changes: 0 additions & 6 deletions trunk/arch/x86/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -1069,9 +1069,3 @@ void mark_rodata_ro(void)
#endif
}
#endif

int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
int flags)
{
return reserve_bootmem(phys, len, flags);
}
20 changes: 2 additions & 18 deletions trunk/arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,13 +799,10 @@ void mark_rodata_ro(void)

#endif

#ifndef CONFIG_NO_BOOTMEM
int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
int flags)
{
#ifdef CONFIG_NUMA
int nid, next_nid;
int ret;
#endif
unsigned long pfn = phys >> PAGE_SHIFT;

if (pfn >= max_pfn) {
Expand All @@ -821,21 +818,7 @@ int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
return -EFAULT;
}

/* Should check here against the e820 map to avoid double free */
#ifdef CONFIG_NUMA
nid = phys_to_nid(phys);
next_nid = phys_to_nid(phys + len - 1);
if (nid == next_nid)
ret = reserve_bootmem_node(NODE_DATA(nid), phys, len, flags);
else
ret = reserve_bootmem(phys, len, flags);

if (ret != 0)
return ret;

#else
reserve_bootmem(phys, len, flags);
#endif

if (phys+len <= MAX_DMA_PFN*PAGE_SIZE) {
dma_reserve += len / PAGE_SIZE;
Expand All @@ -844,6 +827,7 @@ int __init reserve_bootmem_generic(unsigned long phys, unsigned long len,

return 0;
}
#endif

int kern_addr_valid(unsigned long addr)
{
Expand Down
6 changes: 6 additions & 0 deletions trunk/mm/bootmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,12 @@ int __init reserve_bootmem(unsigned long addr, unsigned long size,
}

#ifndef CONFIG_NO_BOOTMEM
int __weak __init reserve_bootmem_generic(unsigned long phys, unsigned long len,
int flags)
{
return reserve_bootmem(phys, len, flags);
}

static unsigned long __init align_idx(struct bootmem_data *bdata,
unsigned long idx, unsigned long step)
{
Expand Down

0 comments on commit 87daed8

Please sign in to comment.