Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43408
b: refs/heads/master
c: 05f96ef
h: refs/heads/master
v: v3
  • Loading branch information
Russell King authored and Russell King committed Dec 7, 2006
1 parent 7e95889 commit fd0677f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: b7dc96d75309346c1213875be68fdbbec92da5e7
refs/heads/master: 05f96ef1189ecbf2e8548056a0ca016e4f630cef
11 changes: 7 additions & 4 deletions trunk/arch/arm/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,16 +441,19 @@ __early_param("initrd=", early_initrd);

static void __init arm_add_memory(unsigned long start, unsigned long size)
{
struct membank *bank;

/*
* Ensure that start/size are aligned to a page boundary.
* Size is appropriately rounded down, start is rounded up.
*/
size -= start & ~PAGE_MASK;

meminfo.bank[meminfo.nr_banks].start = PAGE_ALIGN(start);
meminfo.bank[meminfo.nr_banks].size = size & PAGE_MASK;
meminfo.bank[meminfo.nr_banks].node = PHYS_TO_NID(start);
meminfo.nr_banks += 1;
bank = &meminfo.bank[meminfo.nr_banks++];

bank->start = PAGE_ALIGN(start);
bank->size = size & PAGE_MASK;
bank->node = PHYS_TO_NID(start);
}

/*
Expand Down

0 comments on commit fd0677f

Please sign in to comment.