diff options
author | Michal Simek <michal.simek@xilinx.com> | 2013-11-06 10:36:08 -0500 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2013-11-07 03:22:40 -0500 |
commit | 7f15a256b556bf26780d7a0bd03c88914a852022 (patch) | |
tree | bbb2027e663a55204c63859c61fb06d09796bbb8 | |
parent | edf6844ebf4d66546caf2a75e9d05e579990678c (diff) |
microblaze: Calculate kernel pad automatically
The kernel needs to setup the first two tlbs with pad
which is used for early page allocation which is used
by mapin_ram() to allocate tables for lowmem memory
before memory initialisation is done.
Calculate pad directly from lowmem size.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r-- | arch/microblaze/Kconfig | 4 | ||||
-rw-r--r-- | arch/microblaze/kernel/head.S | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig index d8ec74b4d1ee..655e1cadf692 100644 --- a/arch/microblaze/Kconfig +++ b/arch/microblaze/Kconfig | |||
@@ -245,10 +245,6 @@ config MICROBLAZE_64K_PAGES | |||
245 | 245 | ||
246 | endchoice | 246 | endchoice |
247 | 247 | ||
248 | config KERNEL_PAD | ||
249 | hex "Kernel PAD for unpacking" if ADVANCED_OPTIONS | ||
250 | default "0x80000" if MMU | ||
251 | |||
252 | endmenu | 248 | endmenu |
253 | 249 | ||
254 | source "mm/Kconfig" | 250 | source "mm/Kconfig" |
diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S index fcc797feb9db..817b7eec95b6 100644 --- a/arch/microblaze/kernel/head.S +++ b/arch/microblaze/kernel/head.S | |||
@@ -176,7 +176,7 @@ _invalidate: | |||
176 | /* start to do TLB calculation */ | 176 | /* start to do TLB calculation */ |
177 | addik r12, r0, _end | 177 | addik r12, r0, _end |
178 | rsub r12, r3, r12 | 178 | rsub r12, r3, r12 |
179 | addik r12, r12, CONFIG_KERNEL_PAD /* that's the pad */ | 179 | addik r12, r12, CONFIG_LOWMEM_SIZE >> PTE_SHIFT /* that's the pad */ |
180 | 180 | ||
181 | or r9, r0, r0 /* TLB0 = 0 */ | 181 | or r9, r0, r0 /* TLB0 = 0 */ |
182 | or r10, r0, r0 /* TLB1 = 0 */ | 182 | or r10, r0, r0 /* TLB1 = 0 */ |