aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/setup.c
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2010-02-08 10:41:38 -0500
committerMichal Simek <monstr@monstr.eu>2012-03-23 04:28:18 -0400
commit95b0f9ea66661681f6ae081ea28416744d622c07 (patch)
treec4d387b9e4a5add47945be3036c7e5682ea5330c /arch/microblaze/kernel/setup.c
parent3a1d26769f61fe8a1f517a66dfcee935a76fd61c (diff)
microblaze: Improve TLB calculation for small systems
Systems with small amount of memory need to be handled differently. Linux can't allocate the whole 32MB with two TLBs because then there is no MMU protection. Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/kernel/setup.c')
-rw-r--r--arch/microblaze/kernel/setup.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c
index 604cd9dd1333..a1fa2a5813bf 100644
--- a/arch/microblaze/kernel/setup.c
+++ b/arch/microblaze/kernel/setup.c
@@ -97,8 +97,11 @@ inline unsigned get_romfs_len(unsigned *addr)
97} 97}
98#endif /* CONFIG_MTD_UCLINUX_EBSS */ 98#endif /* CONFIG_MTD_UCLINUX_EBSS */
99 99
100unsigned long kernel_tlb;
101
100void __init machine_early_init(const char *cmdline, unsigned int ram, 102void __init machine_early_init(const char *cmdline, unsigned int ram,
101 unsigned int fdt, unsigned int msr) 103 unsigned int fdt, unsigned int msr, unsigned int tlb0,
104 unsigned int tlb1)
102{ 105{
103 unsigned long *src, *dst; 106 unsigned long *src, *dst;
104 unsigned int offset = 0; 107 unsigned int offset = 0;
@@ -145,6 +148,12 @@ void __init machine_early_init(const char *cmdline, unsigned int ram,
145 setup_early_printk(NULL); 148 setup_early_printk(NULL);
146#endif 149#endif
147 150
151 /* setup kernel_tlb after BSS cleaning
152 * Maybe worth to move to asm code */
153 kernel_tlb = tlb0 + tlb1;
154 /* printk("TLB1 0x%08x, TLB0 0x%08x, tlb 0x%x\n", tlb0,
155 tlb1, kernel_tlb); */
156
148 printk("Ramdisk addr 0x%08x, ", ram); 157 printk("Ramdisk addr 0x%08x, ", ram);
149 if (fdt) 158 if (fdt)
150 printk("FDT at 0x%08x\n", fdt); 159 printk("FDT at 0x%08x\n", fdt);