Skip to content

Commit

Permalink
microblaze: Fix mapin_ram function
Browse files Browse the repository at this point in the history
Fix how many pages are allocated in mapin_ram. It is lowmem_size
not setup CONFIG_LOWMEM_SIZE because it is the same for all systems.
Which means that wrong pages are allocated if memory size is smaller
than CONFIG_LOWMEM_SIZE. It has dramatic impact on bootup time.
On sp605 MMU full hw design is 7s.

Signed-off-by: Michal Simek <monstr@monstr.eu>
  • Loading branch information
Michal Simek committed Mar 23, 2012
1 parent 2f2f371 commit 7c0d261
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/microblaze/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ extern unsigned long max_pfn;

extern unsigned long memory_start;
extern unsigned long memory_size;
extern unsigned long lowmem_size;

extern int page_is_ram(unsigned long pfn);

Expand Down
2 changes: 1 addition & 1 deletion arch/microblaze/mm/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void __init mapin_ram(void)

v = CONFIG_KERNEL_START;
p = memory_start;
for (s = 0; s < CONFIG_LOWMEM_SIZE; s += PAGE_SIZE) {
for (s = 0; s < lowmem_size; s += PAGE_SIZE) {
f = _PAGE_PRESENT | _PAGE_ACCESSED |
_PAGE_SHARED | _PAGE_HWEXEC;
if ((char *) v < _stext || (char *) v >= _etext)
Expand Down

0 comments on commit 7c0d261

Please sign in to comment.