Skip to content

Commit

Permalink
m32r: Fix set_memory() for DISCONTIGMEM
Browse files Browse the repository at this point in the history
In case CONFIG_DISCONTIGMEM is set, the memory size of system was
always determined by CONFIG_MEMORY_SIZE and was not changeable.

This patch fixes set_memory() of arch/m32r/mm/discontig.c so that
we can specify memory size by the "mem=<size>" kernel parameter.

Signed-off-by: Hirokazu Takata <[email protected]>
  • Loading branch information
htakata committed Oct 4, 2009
1 parent bac33bd commit 6b6fabc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/m32r/mm/discontig.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ typedef struct {
} mem_prof_t;
static mem_prof_t mem_prof[MAX_NUMNODES];

extern unsigned long memory_start;
extern unsigned long memory_end;

static void __init mem_prof_init(void)
{
unsigned long start_pfn, holes, free_pfn;
Expand All @@ -42,7 +45,7 @@ static void __init mem_prof_init(void)
/* Node#0 SDRAM */
mp = &mem_prof[0];
mp->start_pfn = PFN_UP(CONFIG_MEMORY_START);
mp->pages = PFN_DOWN(CONFIG_MEMORY_SIZE);
mp->pages = PFN_DOWN(memory_end - memory_start);
mp->holes = 0;
mp->free_pfn = PFN_UP(__pa(_end));

Expand Down

0 comments on commit 6b6fabc

Please sign in to comment.