diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-27 21:20:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-27 21:20:56 -0400 |
commit | 30eebb54b13ef198a3f1a143ee9dd68f295c60de (patch) | |
tree | 64a489015c8f5def32820ac069534c6f7297ab70 /arch/microblaze/kernel | |
parent | 9e4db1c3eed55c22328d8022c2c80adb3093833f (diff) | |
parent | e02db0aa3e1976ae4e23a66077d252a2f3ba74c7 (diff) |
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
Pull arch/microblaze fixes from Michal Simek
* 'next' of git://git.monstr.eu/linux-2.6-microblaze:
microblaze: Handle TLB skip size dynamically
microblaze: Introduce TLB skip size
microblaze: Improve TLB calculation for small systems
microblaze: Extend space for compiled-in FDT to 32kB
microblaze: Clear all MSR flags on the first kernel instruction
microblaze: Use node name instead of compatible string
microblaze: Fix mapin_ram function
microblaze: Highmem support
microblaze: Use active regions
microblaze: Show more detailed information about memory
microblaze: Introduce fixmap
microblaze: mm: Fix lowmem max memory size limits
microblaze: mm: Use ZONE_DMA instead of ZONE_NORMAL
microblaze: trivial: Fix typo fault in timer.c
microblaze: Use vsprintf extention %pf with builtin_return_address
microblaze: Add PVR version string for MB 8.20.b and 8.30.a
microblaze: Fix makefile to work with latest toolchain
microblaze: Fix typo in early_printk.c
Diffstat (limited to 'arch/microblaze/kernel')
-rw-r--r-- | arch/microblaze/kernel/cpu/cpuinfo.c | 2 | ||||
-rw-r--r-- | arch/microblaze/kernel/early_printk.c | 16 | ||||
-rw-r--r-- | arch/microblaze/kernel/head.S | 129 | ||||
-rw-r--r-- | arch/microblaze/kernel/hw_exception_handler.S | 13 | ||||
-rw-r--r-- | arch/microblaze/kernel/intc.c | 4 | ||||
-rw-r--r-- | arch/microblaze/kernel/misc.S | 13 | ||||
-rw-r--r-- | arch/microblaze/kernel/setup.c | 24 | ||||
-rw-r--r-- | arch/microblaze/kernel/timer.c | 6 | ||||
-rw-r--r-- | arch/microblaze/kernel/vmlinux.lds.S | 2 |
9 files changed, 179 insertions, 30 deletions
diff --git a/arch/microblaze/kernel/cpu/cpuinfo.c b/arch/microblaze/kernel/cpu/cpuinfo.c index 54194b28574..eab6abf5652 100644 --- a/arch/microblaze/kernel/cpu/cpuinfo.c +++ b/arch/microblaze/kernel/cpu/cpuinfo.c | |||
@@ -35,6 +35,8 @@ const struct cpu_ver_key cpu_ver_lookup[] = { | |||
35 | {"8.00.b", 0x13}, | 35 | {"8.00.b", 0x13}, |
36 | {"8.10.a", 0x14}, | 36 | {"8.10.a", 0x14}, |
37 | {"8.20.a", 0x15}, | 37 | {"8.20.a", 0x15}, |
38 | {"8.20.b", 0x16}, | ||
39 | {"8.30.a", 0x17}, | ||
38 | {NULL, 0}, | 40 | {NULL, 0}, |
39 | }; | 41 | }; |
40 | 42 | ||
diff --git a/arch/microblaze/kernel/early_printk.c b/arch/microblaze/kernel/early_printk.c index 8356e47631c..ec485876d0d 100644 --- a/arch/microblaze/kernel/early_printk.c +++ b/arch/microblaze/kernel/early_printk.c | |||
@@ -171,10 +171,24 @@ void __init remap_early_printk(void) | |||
171 | { | 171 | { |
172 | if (!early_console_initialized || !early_console) | 172 | if (!early_console_initialized || !early_console) |
173 | return; | 173 | return; |
174 | printk(KERN_INFO "early_printk_console remaping from 0x%x to ", | 174 | printk(KERN_INFO "early_printk_console remapping from 0x%x to ", |
175 | base_addr); | 175 | base_addr); |
176 | base_addr = (u32) ioremap(base_addr, PAGE_SIZE); | 176 | base_addr = (u32) ioremap(base_addr, PAGE_SIZE); |
177 | printk(KERN_CONT "0x%x\n", base_addr); | 177 | printk(KERN_CONT "0x%x\n", base_addr); |
178 | |||
179 | /* | ||
180 | * Early console is on the top of skipped TLB entries | ||
181 | * decrease tlb_skip size ensure that hardcoded TLB entry will be | ||
182 | * used by generic algorithm | ||
183 | * FIXME check if early console mapping is on the top by rereading | ||
184 | * TLB entry and compare baseaddr | ||
185 | * mts rtlbx, (tlb_skip - 1) | ||
186 | * nop | ||
187 | * mfs rX, rtlblo | ||
188 | * nop | ||
189 | * cmp rX, orig_base_addr | ||
190 | */ | ||
191 | tlb_skip -= 1; | ||
178 | } | 192 | } |
179 | 193 | ||
180 | void __init disable_early_printk(void) | 194 | void __init disable_early_printk(void) |
diff --git a/arch/microblaze/kernel/head.S b/arch/microblaze/kernel/head.S index 77320b8fc16..98b17f9f904 100644 --- a/arch/microblaze/kernel/head.S +++ b/arch/microblaze/kernel/head.S | |||
@@ -63,9 +63,7 @@ ENTRY(_start) | |||
63 | real_start: | 63 | real_start: |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | mfs r1, rmsr | 66 | mts rmsr, r0 |
67 | andi r1, r1, ~2 | ||
68 | mts rmsr, r1 | ||
69 | /* | 67 | /* |
70 | * According to Xilinx, msrclr instruction behaves like 'mfs rX,rpc' | 68 | * According to Xilinx, msrclr instruction behaves like 'mfs rX,rpc' |
71 | * if the msrclr instruction is not enabled. We use this to detect | 69 | * if the msrclr instruction is not enabled. We use this to detect |
@@ -73,6 +71,7 @@ real_start: | |||
73 | * r8 == 0 - msr instructions are implemented | 71 | * r8 == 0 - msr instructions are implemented |
74 | * r8 != 0 - msr instructions are not implemented | 72 | * r8 != 0 - msr instructions are not implemented |
75 | */ | 73 | */ |
74 | mfs r1, rmsr | ||
76 | msrclr r8, 0 /* clear nothing - just read msr for test */ | 75 | msrclr r8, 0 /* clear nothing - just read msr for test */ |
77 | cmpu r8, r8, r1 /* r1 must contain msr reg content */ | 76 | cmpu r8, r8, r1 /* r1 must contain msr reg content */ |
78 | 77 | ||
@@ -96,7 +95,7 @@ big_endian: | |||
96 | _prepare_copy_fdt: | 95 | _prepare_copy_fdt: |
97 | or r11, r0, r0 /* incremment */ | 96 | or r11, r0, r0 /* incremment */ |
98 | ori r4, r0, TOPHYS(_fdt_start) | 97 | ori r4, r0, TOPHYS(_fdt_start) |
99 | ori r3, r0, (0x4000 - 4) | 98 | ori r3, r0, (0x8000 - 4) |
100 | _copy_fdt: | 99 | _copy_fdt: |
101 | lw r12, r7, r11 /* r12 = r7 + r11 */ | 100 | lw r12, r7, r11 /* r12 = r7 + r11 */ |
102 | sw r12, r4, r11 /* addr[r4 + r11] = r12 */ | 101 | sw r12, r4, r11 /* addr[r4 + r11] = r12 */ |
@@ -150,6 +149,7 @@ _copy_bram: | |||
150 | _invalidate: | 149 | _invalidate: |
151 | mts rtlbx, r3 | 150 | mts rtlbx, r3 |
152 | mts rtlbhi, r0 /* flush: ensure V is clear */ | 151 | mts rtlbhi, r0 /* flush: ensure V is clear */ |
152 | mts rtlblo, r0 | ||
153 | bgtid r3, _invalidate /* loop for all entries */ | 153 | bgtid r3, _invalidate /* loop for all entries */ |
154 | addik r3, r3, -1 | 154 | addik r3, r3, -1 |
155 | /* sync */ | 155 | /* sync */ |
@@ -169,6 +169,53 @@ _invalidate: | |||
169 | addik r3,r0, CONFIG_KERNEL_START /* Load the kernel virtual address */ | 169 | addik r3,r0, CONFIG_KERNEL_START /* Load the kernel virtual address */ |
170 | tophys(r4,r3) /* Load the kernel physical address */ | 170 | tophys(r4,r3) /* Load the kernel physical address */ |
171 | 171 | ||
172 | /* start to do TLB calculation */ | ||
173 | addik r12, r0, _end | ||
174 | rsub r12, r3, r12 | ||
175 | addik r12, r12, CONFIG_KERNEL_PAD /* that's the pad */ | ||
176 | |||
177 | or r9, r0, r0 /* TLB0 = 0 */ | ||
178 | or r10, r0, r0 /* TLB1 = 0 */ | ||
179 | |||
180 | addik r11, r12, -0x1000000 | ||
181 | bgei r11, GT16 /* size is greater than 16MB */ | ||
182 | addik r11, r12, -0x0800000 | ||
183 | bgei r11, GT8 /* size is greater than 8MB */ | ||
184 | addik r11, r12, -0x0400000 | ||
185 | bgei r11, GT4 /* size is greater than 4MB */ | ||
186 | /* size is less than 4MB */ | ||
187 | addik r11, r12, -0x0200000 | ||
188 | bgei r11, GT2 /* size is greater than 2MB */ | ||
189 | addik r9, r0, 0x0100000 /* TLB0 must be 1MB */ | ||
190 | addik r11, r12, -0x0100000 | ||
191 | bgei r11, GT1 /* size is greater than 1MB */ | ||
192 | /* TLB1 is 0 which is setup above */ | ||
193 | bri tlb_end | ||
194 | GT4: /* r11 contains the rest - will be either 1 or 4 */ | ||
195 | ori r9, r0, 0x400000 /* TLB0 is 4MB */ | ||
196 | bri TLB1 | ||
197 | GT16: /* TLB0 is 16MB */ | ||
198 | addik r9, r0, 0x1000000 /* means TLB0 is 16MB */ | ||
199 | TLB1: | ||
200 | /* must be used r2 because of substract if failed */ | ||
201 | addik r2, r11, -0x0400000 | ||
202 | bgei r2, GT20 /* size is greater than 16MB */ | ||
203 | /* size is >16MB and <20MB */ | ||
204 | addik r11, r11, -0x0100000 | ||
205 | bgei r11, GT17 /* size is greater than 17MB */ | ||
206 | /* kernel is >16MB and < 17MB */ | ||
207 | GT1: | ||
208 | addik r10, r0, 0x0100000 /* means TLB1 is 1MB */ | ||
209 | bri tlb_end | ||
210 | GT2: /* TLB0 is 0 and TLB1 will be 4MB */ | ||
211 | GT17: /* TLB1 is 4MB - kernel size <20MB */ | ||
212 | addik r10, r0, 0x0400000 /* means TLB1 is 4MB */ | ||
213 | bri tlb_end | ||
214 | GT8: /* TLB0 is still zero that's why I can use only TLB1 */ | ||
215 | GT20: /* TLB1 is 16MB - kernel size >20MB */ | ||
216 | addik r10, r0, 0x1000000 /* means TLB1 is 16MB */ | ||
217 | tlb_end: | ||
218 | |||
172 | /* | 219 | /* |
173 | * Configure and load two entries into TLB slots 0 and 1. | 220 | * Configure and load two entries into TLB slots 0 and 1. |
174 | * In case we are pinning TLBs, these are reserved in by the | 221 | * In case we are pinning TLBs, these are reserved in by the |
@@ -178,28 +225,81 @@ _invalidate: | |||
178 | andi r4,r4,0xfffffc00 /* Mask off the real page number */ | 225 | andi r4,r4,0xfffffc00 /* Mask off the real page number */ |
179 | ori r4,r4,(TLB_WR | TLB_EX) /* Set the write and execute bits */ | 226 | ori r4,r4,(TLB_WR | TLB_EX) /* Set the write and execute bits */ |
180 | 227 | ||
228 | /* | ||
229 | * TLB0 is always used - check if is not zero (r9 stores TLB0 value) | ||
230 | * if is use TLB1 value and clear it (r10 stores TLB1 value) | ||
231 | */ | ||
232 | bnei r9, tlb0_not_zero | ||
233 | add r9, r10, r0 | ||
234 | add r10, r0, r0 | ||
235 | tlb0_not_zero: | ||
236 | |||
237 | /* look at the code below */ | ||
238 | ori r30, r0, 0x200 | ||
239 | andi r29, r9, 0x100000 | ||
240 | bneid r29, 1f | ||
241 | addik r30, r30, 0x80 | ||
242 | andi r29, r9, 0x400000 | ||
243 | bneid r29, 1f | ||
244 | addik r30, r30, 0x80 | ||
245 | andi r29, r9, 0x1000000 | ||
246 | bneid r29, 1f | ||
247 | addik r30, r30, 0x80 | ||
248 | 1: | ||
181 | andi r3,r3,0xfffffc00 /* Mask off the effective page number */ | 249 | andi r3,r3,0xfffffc00 /* Mask off the effective page number */ |
182 | ori r3,r3,(TLB_VALID | TLB_PAGESZ(PAGESZ_16M)) | 250 | ori r3,r3,(TLB_VALID) |
251 | or r3, r3, r30 | ||
183 | 252 | ||
184 | mts rtlbx,r0 /* TLB slow 0 */ | 253 | /* Load tlb_skip size value which is index to first unused TLB entry */ |
254 | lwi r11, r0, TOPHYS(tlb_skip) | ||
255 | mts rtlbx,r11 /* TLB slow 0 */ | ||
185 | 256 | ||
186 | mts rtlblo,r4 /* Load the data portion of the entry */ | 257 | mts rtlblo,r4 /* Load the data portion of the entry */ |
187 | mts rtlbhi,r3 /* Load the tag portion of the entry */ | 258 | mts rtlbhi,r3 /* Load the tag portion of the entry */ |
188 | 259 | ||
189 | addik r4, r4, 0x01000000 /* Map next 16 M entries */ | 260 | /* Increase tlb_skip size */ |
190 | addik r3, r3, 0x01000000 | 261 | addik r11, r11, 1 |
262 | swi r11, r0, TOPHYS(tlb_skip) | ||
263 | |||
264 | /* TLB1 can be zeroes that's why we not setup it */ | ||
265 | beqi r10, jump_over2 | ||
266 | |||
267 | /* look at the code below */ | ||
268 | ori r30, r0, 0x200 | ||
269 | andi r29, r10, 0x100000 | ||
270 | bneid r29, 1f | ||
271 | addik r30, r30, 0x80 | ||
272 | andi r29, r10, 0x400000 | ||
273 | bneid r29, 1f | ||
274 | addik r30, r30, 0x80 | ||
275 | andi r29, r10, 0x1000000 | ||
276 | bneid r29, 1f | ||
277 | addik r30, r30, 0x80 | ||
278 | 1: | ||
279 | addk r4, r4, r9 /* previous addr + TLB0 size */ | ||
280 | addk r3, r3, r9 | ||
191 | 281 | ||
192 | ori r6,r0,1 /* TLB slot 1 */ | 282 | andi r3,r3,0xfffffc00 /* Mask off the effective page number */ |
193 | mts rtlbx,r6 | 283 | ori r3,r3,(TLB_VALID) |
284 | or r3, r3, r30 | ||
285 | |||
286 | lwi r11, r0, TOPHYS(tlb_skip) | ||
287 | mts rtlbx, r11 /* r11 is used from TLB0 */ | ||
194 | 288 | ||
195 | mts rtlblo,r4 /* Load the data portion of the entry */ | 289 | mts rtlblo,r4 /* Load the data portion of the entry */ |
196 | mts rtlbhi,r3 /* Load the tag portion of the entry */ | 290 | mts rtlbhi,r3 /* Load the tag portion of the entry */ |
197 | 291 | ||
292 | /* Increase tlb_skip size */ | ||
293 | addik r11, r11, 1 | ||
294 | swi r11, r0, TOPHYS(tlb_skip) | ||
295 | |||
296 | jump_over2: | ||
198 | /* | 297 | /* |
199 | * Load a TLB entry for LMB, since we need access to | 298 | * Load a TLB entry for LMB, since we need access to |
200 | * the exception vectors, using a 4k real==virtual mapping. | 299 | * the exception vectors, using a 4k real==virtual mapping. |
201 | */ | 300 | */ |
202 | ori r6,r0,3 /* TLB slot 3 */ | 301 | /* Use temporary TLB_ID for LMB - clear this temporary mapping later */ |
302 | ori r6, r0, MICROBLAZE_LMB_TLB_ID | ||
203 | mts rtlbx,r6 | 303 | mts rtlbx,r6 |
204 | 304 | ||
205 | ori r4,r0,(TLB_WR | TLB_EX) | 305 | ori r4,r0,(TLB_WR | TLB_EX) |
@@ -238,8 +338,8 @@ start_here: | |||
238 | * Please see $(ARCH)/mach-$(SUBARCH)/setup.c for | 338 | * Please see $(ARCH)/mach-$(SUBARCH)/setup.c for |
239 | * the function. | 339 | * the function. |
240 | */ | 340 | */ |
241 | addik r9, r0, machine_early_init | 341 | addik r11, r0, machine_early_init |
242 | brald r15, r9 | 342 | brald r15, r11 |
243 | nop | 343 | nop |
244 | 344 | ||
245 | #ifndef CONFIG_MMU | 345 | #ifndef CONFIG_MMU |
@@ -268,8 +368,7 @@ start_here: | |||
268 | 368 | ||
269 | /* Load up the kernel context */ | 369 | /* Load up the kernel context */ |
270 | kernel_load_context: | 370 | kernel_load_context: |
271 | # Keep entry 0 and 1 valid. Entry 3 mapped to LMB can go away. | 371 | ori r5, r0, MICROBLAZE_LMB_TLB_ID |
272 | ori r5,r0,3 | ||
273 | mts rtlbx,r5 | 372 | mts rtlbx,r5 |
274 | nop | 373 | nop |
275 | mts rtlbhi,r0 | 374 | mts rtlbhi,r0 |
diff --git a/arch/microblaze/kernel/hw_exception_handler.S b/arch/microblaze/kernel/hw_exception_handler.S index e62be837960..aa510f450ac 100644 --- a/arch/microblaze/kernel/hw_exception_handler.S +++ b/arch/microblaze/kernel/hw_exception_handler.S | |||
@@ -820,19 +820,26 @@ ex_handler_done: | |||
820 | * Upon exit, we reload everything and RFI. | 820 | * Upon exit, we reload everything and RFI. |
821 | * A common place to load the TLB. | 821 | * A common place to load the TLB. |
822 | */ | 822 | */ |
823 | .section .data | ||
824 | .align 4 | ||
825 | .global tlb_skip | ||
826 | tlb_skip: | ||
827 | .long MICROBLAZE_TLB_SKIP | ||
823 | tlb_index: | 828 | tlb_index: |
824 | .long 1 /* MS: storing last used tlb index */ | 829 | /* MS: storing last used tlb index */ |
830 | .long MICROBLAZE_TLB_SIZE/2 | ||
831 | .previous | ||
825 | finish_tlb_load: | 832 | finish_tlb_load: |
826 | /* MS: load the last used TLB index. */ | 833 | /* MS: load the last used TLB index. */ |
827 | lwi r5, r0, TOPHYS(tlb_index) | 834 | lwi r5, r0, TOPHYS(tlb_index) |
828 | addik r5, r5, 1 /* MS: inc tlb_index -> use next one */ | 835 | addik r5, r5, 1 /* MS: inc tlb_index -> use next one */ |
829 | 836 | ||
830 | /* MS: FIXME this is potential fault, because this is mask not count */ | 837 | /* MS: FIXME this is potential fault, because this is mask not count */ |
831 | andi r5, r5, (MICROBLAZE_TLB_SIZE-1) | 838 | andi r5, r5, MICROBLAZE_TLB_SIZE - 1 |
832 | ori r6, r0, 1 | 839 | ori r6, r0, 1 |
833 | cmp r31, r5, r6 | 840 | cmp r31, r5, r6 |
834 | blti r31, ex12 | 841 | blti r31, ex12 |
835 | addik r5, r6, 1 | 842 | lwi r5, r0, TOPHYS(tlb_skip) |
836 | ex12: | 843 | ex12: |
837 | /* MS: save back current TLB index */ | 844 | /* MS: save back current TLB index */ |
838 | swi r5, r0, TOPHYS(tlb_index) | 845 | swi r5, r0, TOPHYS(tlb_index) |
diff --git a/arch/microblaze/kernel/intc.c b/arch/microblaze/kernel/intc.c index ad120672cee..6c54d4dcdec 100644 --- a/arch/microblaze/kernel/intc.c +++ b/arch/microblaze/kernel/intc.c | |||
@@ -151,8 +151,8 @@ void __init init_IRQ(void) | |||
151 | #ifdef CONFIG_SELFMOD_INTC | 151 | #ifdef CONFIG_SELFMOD_INTC |
152 | selfmod_function((int *) arr_func, intc_baseaddr); | 152 | selfmod_function((int *) arr_func, intc_baseaddr); |
153 | #endif | 153 | #endif |
154 | printk(KERN_INFO "XPS intc #0 at 0x%08x, num_irq=%d, edge=0x%x\n", | 154 | printk(KERN_INFO "%s #0 at 0x%08x, num_irq=%d, edge=0x%x\n", |
155 | intc_baseaddr, nr_irq, intr_mask); | 155 | intc->name, intc_baseaddr, nr_irq, intr_mask); |
156 | 156 | ||
157 | /* | 157 | /* |
158 | * Disable all external interrupts until they are | 158 | * Disable all external interrupts until they are |
diff --git a/arch/microblaze/kernel/misc.S b/arch/microblaze/kernel/misc.S index 206da3da361..1dafddeb8a0 100644 --- a/arch/microblaze/kernel/misc.S +++ b/arch/microblaze/kernel/misc.S | |||
@@ -29,16 +29,16 @@ | |||
29 | .type _tlbia, @function | 29 | .type _tlbia, @function |
30 | .align 4; | 30 | .align 4; |
31 | _tlbia: | 31 | _tlbia: |
32 | addik r12, r0, MICROBLAZE_TLB_SIZE - 1 /* flush all entries (63 - 3) */ | 32 | lwi r12, r0, tlb_skip; |
33 | /* isync */ | 33 | /* isync */ |
34 | _tlbia_1: | 34 | _tlbia_1: |
35 | mts rtlbx, r12 | 35 | mts rtlbx, r12 |
36 | nop | 36 | nop |
37 | mts rtlbhi, r0 /* flush: ensure V is clear */ | 37 | mts rtlbhi, r0 /* flush: ensure V is clear */ |
38 | nop | 38 | nop |
39 | addik r11, r12, -2 | 39 | rsubi r11, r12, MICROBLAZE_TLB_SIZE - 1 |
40 | bneid r11, _tlbia_1 /* loop for all entries */ | 40 | bneid r11, _tlbia_1 /* loop for all entries */ |
41 | addik r12, r12, -1 | 41 | addik r12, r12, 1 |
42 | /* sync */ | 42 | /* sync */ |
43 | rtsd r15, 8 | 43 | rtsd r15, 8 |
44 | nop | 44 | nop |
@@ -75,7 +75,7 @@ early_console_reg_tlb_alloc: | |||
75 | * Load a TLB entry for the UART, so that microblaze_progress() can use | 75 | * Load a TLB entry for the UART, so that microblaze_progress() can use |
76 | * the UARTs nice and early. We use a 4k real==virtual mapping. | 76 | * the UARTs nice and early. We use a 4k real==virtual mapping. |
77 | */ | 77 | */ |
78 | ori r4, r0, MICROBLAZE_TLB_SIZE - 1 | 78 | lwi r4, r0, tlb_skip |
79 | mts rtlbx, r4 /* TLB slot 63 */ | 79 | mts rtlbx, r4 /* TLB slot 63 */ |
80 | 80 | ||
81 | or r4,r5,r0 | 81 | or r4,r5,r0 |
@@ -89,6 +89,11 @@ early_console_reg_tlb_alloc: | |||
89 | nop | 89 | nop |
90 | mts rtlbhi,r5 /* Load the tag portion of the entry */ | 90 | mts rtlbhi,r5 /* Load the tag portion of the entry */ |
91 | nop | 91 | nop |
92 | |||
93 | lwi r5, r0, tlb_skip | ||
94 | addik r5, r5, 1 | ||
95 | swi r5, r0, tlb_skip | ||
96 | |||
92 | rtsd r15, 8 | 97 | rtsd r15, 8 |
93 | nop | 98 | nop |
94 | 99 | ||
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index 70e6d0b41ab..9f79fb3bbfa 100644 --- a/arch/microblaze/kernel/setup.c +++ b/arch/microblaze/kernel/setup.c | |||
@@ -95,8 +95,11 @@ inline unsigned get_romfs_len(unsigned *addr) | |||
95 | } | 95 | } |
96 | #endif /* CONFIG_MTD_UCLINUX_EBSS */ | 96 | #endif /* CONFIG_MTD_UCLINUX_EBSS */ |
97 | 97 | ||
98 | unsigned long kernel_tlb; | ||
99 | |||
98 | void __init machine_early_init(const char *cmdline, unsigned int ram, | 100 | void __init machine_early_init(const char *cmdline, unsigned int ram, |
99 | unsigned int fdt, unsigned int msr) | 101 | unsigned int fdt, unsigned int msr, unsigned int tlb0, |
102 | unsigned int tlb1) | ||
100 | { | 103 | { |
101 | unsigned long *src, *dst; | 104 | unsigned long *src, *dst; |
102 | unsigned int offset = 0; | 105 | unsigned int offset = 0; |
@@ -143,6 +146,12 @@ void __init machine_early_init(const char *cmdline, unsigned int ram, | |||
143 | setup_early_printk(NULL); | 146 | setup_early_printk(NULL); |
144 | #endif | 147 | #endif |
145 | 148 | ||
149 | /* setup kernel_tlb after BSS cleaning | ||
150 | * Maybe worth to move to asm code */ | ||
151 | kernel_tlb = tlb0 + tlb1; | ||
152 | /* printk("TLB1 0x%08x, TLB0 0x%08x, tlb 0x%x\n", tlb0, | ||
153 | tlb1, kernel_tlb); */ | ||
154 | |||
146 | printk("Ramdisk addr 0x%08x, ", ram); | 155 | printk("Ramdisk addr 0x%08x, ", ram); |
147 | if (fdt) | 156 | if (fdt) |
148 | printk("FDT at 0x%08x\n", fdt); | 157 | printk("FDT at 0x%08x\n", fdt); |
@@ -197,6 +206,19 @@ static int microblaze_debugfs_init(void) | |||
197 | return of_debugfs_root == NULL; | 206 | return of_debugfs_root == NULL; |
198 | } | 207 | } |
199 | arch_initcall(microblaze_debugfs_init); | 208 | arch_initcall(microblaze_debugfs_init); |
209 | |||
210 | static int __init debugfs_tlb(void) | ||
211 | { | ||
212 | struct dentry *d; | ||
213 | |||
214 | if (!of_debugfs_root) | ||
215 | return -ENODEV; | ||
216 | |||
217 | d = debugfs_create_u32("tlb_skip", S_IRUGO, of_debugfs_root, &tlb_skip); | ||
218 | if (!d) | ||
219 | return -ENOMEM; | ||
220 | } | ||
221 | device_initcall(debugfs_tlb); | ||
200 | #endif | 222 | #endif |
201 | 223 | ||
202 | static int dflt_bus_notify(struct notifier_block *nb, | 224 | static int dflt_bus_notify(struct notifier_block *nb, |
diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c index 3cb0bf64013..cadfd5608af 100644 --- a/arch/microblaze/kernel/timer.c +++ b/arch/microblaze/kernel/timer.c | |||
@@ -79,7 +79,7 @@ static inline void microblaze_timer0_start_periodic(unsigned long load_val) | |||
79 | * !PWMA - disable pwm | 79 | * !PWMA - disable pwm |
80 | * TINT - clear interrupt status | 80 | * TINT - clear interrupt status |
81 | * ENT- enable timer itself | 81 | * ENT- enable timer itself |
82 | * EINT - enable interrupt | 82 | * ENIT - enable interrupt |
83 | * !LOAD - clear the bit to let go | 83 | * !LOAD - clear the bit to let go |
84 | * ARHT - auto reload | 84 | * ARHT - auto reload |
85 | * !CAPT - no external trigger | 85 | * !CAPT - no external trigger |
@@ -274,8 +274,8 @@ void __init time_init(void) | |||
274 | #ifdef CONFIG_SELFMOD_TIMER | 274 | #ifdef CONFIG_SELFMOD_TIMER |
275 | selfmod_function((int *) arr_func, timer_baseaddr); | 275 | selfmod_function((int *) arr_func, timer_baseaddr); |
276 | #endif | 276 | #endif |
277 | printk(KERN_INFO "XPS timer #0 at 0x%08x, irq=%d\n", | 277 | printk(KERN_INFO "%s #0 at 0x%08x, irq=%d\n", |
278 | timer_baseaddr, irq); | 278 | timer->name, timer_baseaddr, irq); |
279 | 279 | ||
280 | /* If there is clock-frequency property than use it */ | 280 | /* If there is clock-frequency property than use it */ |
281 | prop = of_get_property(timer, "clock-frequency", NULL); | 281 | prop = of_get_property(timer, "clock-frequency", NULL); |
diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S index ac0e1a5d478..109e9d86ade 100644 --- a/arch/microblaze/kernel/vmlinux.lds.S +++ b/arch/microblaze/kernel/vmlinux.lds.S | |||
@@ -44,7 +44,7 @@ SECTIONS { | |||
44 | __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) { | 44 | __fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET) { |
45 | _fdt_start = . ; /* place for fdt blob */ | 45 | _fdt_start = . ; /* place for fdt blob */ |
46 | *(__fdt_blob) ; /* Any link-placed DTB */ | 46 | *(__fdt_blob) ; /* Any link-placed DTB */ |
47 | . = _fdt_start + 0x4000; /* Pad up to 16kbyte */ | 47 | . = _fdt_start + 0x8000; /* Pad up to 32kbyte */ |
48 | _fdt_end = . ; | 48 | _fdt_end = . ; |
49 | } | 49 | } |
50 | 50 | ||