Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93691
b: refs/heads/master
c: 8b3cd09
h: refs/heads/master
i:
  93689: ad62a33
  93687: 5f1b8a3
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Apr 26, 2008
1 parent cc1658b commit 387b07d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: a5645a61b3b7e7d7de15e1a642ead600150ce94d
refs/heads/master: 8b3cd09ed23049fcb02479c6286744b36324ac9d
10 changes: 8 additions & 2 deletions trunk/arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
void __init reserve_bootmem_generic(unsigned long phys, unsigned len)
{
#ifdef CONFIG_NUMA
int nid = phys_to_nid(phys);
int nid, next_nid;
#endif
unsigned long pfn = phys >> PAGE_SHIFT;

Expand All @@ -829,10 +829,16 @@ void __init reserve_bootmem_generic(unsigned long phys, unsigned len)

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

if (phys+len <= MAX_DMA_PFN*PAGE_SIZE) {
dma_reserve += len / PAGE_SIZE;
set_dma_reserve(dma_reserve);
Expand Down

0 comments on commit 387b07d

Please sign in to comment.