Commit 7c0d2615 authored by Michal Simek's avatar Michal Simek

microblaze: Fix mapin_ram function

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: default avatarMichal Simek <monstr@monstr.eu>
parent 2f2f371f
...@@ -136,6 +136,7 @@ extern unsigned long max_pfn; ...@@ -136,6 +136,7 @@ extern unsigned long max_pfn;
extern unsigned long memory_start; extern unsigned long memory_start;
extern unsigned long memory_size; extern unsigned long memory_size;
extern unsigned long lowmem_size;
extern int page_is_ram(unsigned long pfn); extern int page_is_ram(unsigned long pfn);
......
...@@ -167,7 +167,7 @@ void __init mapin_ram(void) ...@@ -167,7 +167,7 @@ void __init mapin_ram(void)
v = CONFIG_KERNEL_START; v = CONFIG_KERNEL_START;
p = memory_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 | f = _PAGE_PRESENT | _PAGE_ACCESSED |
_PAGE_SHARED | _PAGE_HWEXEC; _PAGE_SHARED | _PAGE_HWEXEC;
if ((char *) v < _stext || (char *) v >= _etext) if ((char *) v < _stext || (char *) v >= _etext)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment