diff options
Diffstat (limited to 'arch/microblaze/kernel')
24 files changed, 178 insertions, 197 deletions
diff --git a/arch/microblaze/kernel/.gitignore b/arch/microblaze/kernel/.gitignore new file mode 100644 index 000000000000..c5f676c3c224 --- /dev/null +++ b/arch/microblaze/kernel/.gitignore | |||
@@ -0,0 +1 @@ | |||
vmlinux.lds | |||
diff --git a/arch/microblaze/kernel/cpu/cache.c b/arch/microblaze/kernel/cpu/cache.c index 4b7d8a3f4aef..4254514b4c8c 100644 --- a/arch/microblaze/kernel/cpu/cache.c +++ b/arch/microblaze/kernel/cpu/cache.c | |||
@@ -17,82 +17,70 @@ | |||
17 | 17 | ||
18 | static inline void __enable_icache_msr(void) | 18 | static inline void __enable_icache_msr(void) |
19 | { | 19 | { |
20 | __asm__ __volatile__ (" msrset r0, %0; \ | 20 | __asm__ __volatile__ (" msrset r0, %0;" \ |
21 | nop; " \ | 21 | "nop;" \ |
22 | : : "i" (MSR_ICE) : "memory"); | 22 | : : "i" (MSR_ICE) : "memory"); |
23 | } | 23 | } |
24 | 24 | ||
25 | static inline void __disable_icache_msr(void) | 25 | static inline void __disable_icache_msr(void) |
26 | { | 26 | { |
27 | __asm__ __volatile__ (" msrclr r0, %0; \ | 27 | __asm__ __volatile__ (" msrclr r0, %0;" \ |
28 | nop; " \ | 28 | "nop;" \ |
29 | : : "i" (MSR_ICE) : "memory"); | 29 | : : "i" (MSR_ICE) : "memory"); |
30 | } | 30 | } |
31 | 31 | ||
32 | static inline void __enable_dcache_msr(void) | 32 | static inline void __enable_dcache_msr(void) |
33 | { | 33 | { |
34 | __asm__ __volatile__ (" msrset r0, %0; \ | 34 | __asm__ __volatile__ (" msrset r0, %0;" \ |
35 | nop; " \ | 35 | "nop;" \ |
36 | : \ | 36 | : : "i" (MSR_DCE) : "memory"); |
37 | : "i" (MSR_DCE) \ | ||
38 | : "memory"); | ||
39 | } | 37 | } |
40 | 38 | ||
41 | static inline void __disable_dcache_msr(void) | 39 | static inline void __disable_dcache_msr(void) |
42 | { | 40 | { |
43 | __asm__ __volatile__ (" msrclr r0, %0; \ | 41 | __asm__ __volatile__ (" msrclr r0, %0;" \ |
44 | nop; " \ | 42 | "nop; " \ |
45 | : \ | 43 | : : "i" (MSR_DCE) : "memory"); |
46 | : "i" (MSR_DCE) \ | ||
47 | : "memory"); | ||
48 | } | 44 | } |
49 | 45 | ||
50 | static inline void __enable_icache_nomsr(void) | 46 | static inline void __enable_icache_nomsr(void) |
51 | { | 47 | { |
52 | __asm__ __volatile__ (" mfs r12, rmsr; \ | 48 | __asm__ __volatile__ (" mfs r12, rmsr;" \ |
53 | nop; \ | 49 | "nop;" \ |
54 | ori r12, r12, %0; \ | 50 | "ori r12, r12, %0;" \ |
55 | mts rmsr, r12; \ | 51 | "mts rmsr, r12;" \ |
56 | nop; " \ | 52 | "nop;" \ |
57 | : \ | 53 | : : "i" (MSR_ICE) : "memory", "r12"); |
58 | : "i" (MSR_ICE) \ | ||
59 | : "memory", "r12"); | ||
60 | } | 54 | } |
61 | 55 | ||
62 | static inline void __disable_icache_nomsr(void) | 56 | static inline void __disable_icache_nomsr(void) |
63 | { | 57 | { |
64 | __asm__ __volatile__ (" mfs r12, rmsr; \ | 58 | __asm__ __volatile__ (" mfs r12, rmsr;" \ |
65 | nop; \ | 59 | "nop;" \ |
66 | andi r12, r12, ~%0; \ | 60 | "andi r12, r12, ~%0;" \ |
67 | mts rmsr, r12; \ | 61 | "mts rmsr, r12;" \ |
68 | nop; " \ | 62 | "nop;" \ |
69 | : \ | 63 | : : "i" (MSR_ICE) : "memory", "r12"); |
70 | : "i" (MSR_ICE) \ | ||
71 | : "memory", "r12"); | ||
72 | } | 64 | } |
73 | 65 | ||
74 | static inline void __enable_dcache_nomsr(void) | 66 | static inline void __enable_dcache_nomsr(void) |
75 | { | 67 | { |
76 | __asm__ __volatile__ (" mfs r12, rmsr; \ | 68 | __asm__ __volatile__ (" mfs r12, rmsr;" \ |
77 | nop; \ | 69 | "nop;" \ |
78 | ori r12, r12, %0; \ | 70 | "ori r12, r12, %0;" \ |
79 | mts rmsr, r12; \ | 71 | "mts rmsr, r12;" \ |
80 | nop; " \ | 72 | "nop;" \ |
81 | : \ | 73 | : : "i" (MSR_DCE) : "memory", "r12"); |
82 | : "i" (MSR_DCE) \ | ||
83 | : "memory", "r12"); | ||
84 | } | 74 | } |
85 | 75 | ||
86 | static inline void __disable_dcache_nomsr(void) | 76 | static inline void __disable_dcache_nomsr(void) |
87 | { | 77 | { |
88 | __asm__ __volatile__ (" mfs r12, rmsr; \ | 78 | __asm__ __volatile__ (" mfs r12, rmsr;" \ |
89 | nop; \ | 79 | "nop;" \ |
90 | andi r12, r12, ~%0; \ | 80 | "andi r12, r12, ~%0;" \ |
91 | mts rmsr, r12; \ | 81 | "mts rmsr, r12;" \ |
92 | nop; " \ | 82 | "nop;" \ |
93 | : \ | 83 | : : "i" (MSR_DCE) : "memory", "r12"); |
94 | : "i" (MSR_DCE) \ | ||
95 | : "memory", "r12"); | ||
96 | } | 84 | } |
97 | 85 | ||
98 | 86 | ||
@@ -106,7 +94,7 @@ do { \ | |||
106 | int align = ~(cache_line_length - 1); \ | 94 | int align = ~(cache_line_length - 1); \ |
107 | end = min(start + cache_size, end); \ | 95 | end = min(start + cache_size, end); \ |
108 | start &= align; \ | 96 | start &= align; \ |
109 | } while (0); | 97 | } while (0) |
110 | 98 | ||
111 | /* | 99 | /* |
112 | * Helper macro to loop over the specified cache_size/line_length and | 100 | * Helper macro to loop over the specified cache_size/line_length and |
@@ -118,12 +106,12 @@ do { \ | |||
118 | int step = -line_length; \ | 106 | int step = -line_length; \ |
119 | WARN_ON(step >= 0); \ | 107 | WARN_ON(step >= 0); \ |
120 | \ | 108 | \ |
121 | __asm__ __volatile__ (" 1: " #op " %0, r0; \ | 109 | __asm__ __volatile__ (" 1: " #op " %0, r0;" \ |
122 | bgtid %0, 1b; \ | 110 | "bgtid %0, 1b;" \ |
123 | addk %0, %0, %1; \ | 111 | "addk %0, %0, %1;" \ |
124 | " : : "r" (len), "r" (step) \ | 112 | : : "r" (len), "r" (step) \ |
125 | : "memory"); \ | 113 | : "memory"); \ |
126 | } while (0); | 114 | } while (0) |
127 | 115 | ||
128 | /* Used for wdc.flush/clear which can use rB for offset which is not possible | 116 | /* Used for wdc.flush/clear which can use rB for offset which is not possible |
129 | * to use for simple wdc or wic. | 117 | * to use for simple wdc or wic. |
@@ -142,12 +130,12 @@ do { \ | |||
142 | count = end - start; \ | 130 | count = end - start; \ |
143 | WARN_ON(count < 0); \ | 131 | WARN_ON(count < 0); \ |
144 | \ | 132 | \ |
145 | __asm__ __volatile__ (" 1: " #op " %0, %1; \ | 133 | __asm__ __volatile__ (" 1: " #op " %0, %1;" \ |
146 | bgtid %1, 1b; \ | 134 | "bgtid %1, 1b;" \ |
147 | addk %1, %1, %2; \ | 135 | "addk %1, %1, %2;" \ |
148 | " : : "r" (start), "r" (count), \ | 136 | : : "r" (start), "r" (count), \ |
149 | "r" (step) : "memory"); \ | 137 | "r" (step) : "memory"); \ |
150 | } while (0); | 138 | } while (0) |
151 | 139 | ||
152 | /* It is used only first parameter for OP - for wic, wdc */ | 140 | /* It is used only first parameter for OP - for wic, wdc */ |
153 | #define CACHE_RANGE_LOOP_1(start, end, line_length, op) \ | 141 | #define CACHE_RANGE_LOOP_1(start, end, line_length, op) \ |
@@ -157,13 +145,13 @@ do { \ | |||
157 | end = ((end & align) == end) ? end - line_length : end & align; \ | 145 | end = ((end & align) == end) ? end - line_length : end & align; \ |
158 | WARN_ON(end - start < 0); \ | 146 | WARN_ON(end - start < 0); \ |
159 | \ | 147 | \ |
160 | __asm__ __volatile__ (" 1: " #op " %1, r0; \ | 148 | __asm__ __volatile__ (" 1: " #op " %1, r0;" \ |
161 | cmpu %0, %1, %2; \ | 149 | "cmpu %0, %1, %2;" \ |
162 | bgtid %0, 1b; \ | 150 | "bgtid %0, 1b;" \ |
163 | addk %1, %1, %3; \ | 151 | "addk %1, %1, %3;" \ |
164 | " : : "r" (temp), "r" (start), "r" (end),\ | 152 | : : "r" (temp), "r" (start), "r" (end), \ |
165 | "r" (line_length) : "memory"); \ | 153 | "r" (line_length) : "memory"); \ |
166 | } while (0); | 154 | } while (0) |
167 | 155 | ||
168 | #define ASM_LOOP | 156 | #define ASM_LOOP |
169 | 157 | ||
@@ -352,7 +340,7 @@ static void __invalidate_dcache_all_noirq_wt(void) | |||
352 | #endif | 340 | #endif |
353 | pr_debug("%s\n", __func__); | 341 | pr_debug("%s\n", __func__); |
354 | #ifdef ASM_LOOP | 342 | #ifdef ASM_LOOP |
355 | CACHE_ALL_LOOP(cpuinfo.dcache_size, cpuinfo.dcache_line_length, wdc) | 343 | CACHE_ALL_LOOP(cpuinfo.dcache_size, cpuinfo.dcache_line_length, wdc); |
356 | #else | 344 | #else |
357 | for (i = 0; i < cpuinfo.dcache_size; | 345 | for (i = 0; i < cpuinfo.dcache_size; |
358 | i += cpuinfo.dcache_line_length) | 346 | i += cpuinfo.dcache_line_length) |
@@ -361,7 +349,8 @@ static void __invalidate_dcache_all_noirq_wt(void) | |||
361 | #endif | 349 | #endif |
362 | } | 350 | } |
363 | 351 | ||
364 | /* FIXME It is blindly invalidation as is expected | 352 | /* |
353 | * FIXME It is blindly invalidation as is expected | ||
365 | * but can't be called on noMMU in microblaze_cache_init below | 354 | * but can't be called on noMMU in microblaze_cache_init below |
366 | * | 355 | * |
367 | * MS: noMMU kernel won't boot if simple wdc is used | 356 | * MS: noMMU kernel won't boot if simple wdc is used |
@@ -375,7 +364,7 @@ static void __invalidate_dcache_all_wb(void) | |||
375 | pr_debug("%s\n", __func__); | 364 | pr_debug("%s\n", __func__); |
376 | #ifdef ASM_LOOP | 365 | #ifdef ASM_LOOP |
377 | CACHE_ALL_LOOP(cpuinfo.dcache_size, cpuinfo.dcache_line_length, | 366 | CACHE_ALL_LOOP(cpuinfo.dcache_size, cpuinfo.dcache_line_length, |
378 | wdc) | 367 | wdc); |
379 | #else | 368 | #else |
380 | for (i = 0; i < cpuinfo.dcache_size; | 369 | for (i = 0; i < cpuinfo.dcache_size; |
381 | i += cpuinfo.dcache_line_length) | 370 | i += cpuinfo.dcache_line_length) |
@@ -616,49 +605,48 @@ static const struct scache wt_nomsr_noirq = { | |||
616 | #define CPUVER_7_20_A 0x0c | 605 | #define CPUVER_7_20_A 0x0c |
617 | #define CPUVER_7_20_D 0x0f | 606 | #define CPUVER_7_20_D 0x0f |
618 | 607 | ||
619 | #define INFO(s) printk(KERN_INFO "cache: " s "\n"); | ||
620 | |||
621 | void microblaze_cache_init(void) | 608 | void microblaze_cache_init(void) |
622 | { | 609 | { |
623 | if (cpuinfo.use_instr & PVR2_USE_MSR_INSTR) { | 610 | if (cpuinfo.use_instr & PVR2_USE_MSR_INSTR) { |
624 | if (cpuinfo.dcache_wb) { | 611 | if (cpuinfo.dcache_wb) { |
625 | INFO("wb_msr"); | 612 | pr_info("wb_msr\n"); |
626 | mbc = (struct scache *)&wb_msr; | 613 | mbc = (struct scache *)&wb_msr; |
627 | if (cpuinfo.ver_code <= CPUVER_7_20_D) { | 614 | if (cpuinfo.ver_code <= CPUVER_7_20_D) { |
628 | /* MS: problem with signal handling - hw bug */ | 615 | /* MS: problem with signal handling - hw bug */ |
629 | INFO("WB won't work properly"); | 616 | pr_info("WB won't work properly\n"); |
630 | } | 617 | } |
631 | } else { | 618 | } else { |
632 | if (cpuinfo.ver_code >= CPUVER_7_20_A) { | 619 | if (cpuinfo.ver_code >= CPUVER_7_20_A) { |
633 | INFO("wt_msr_noirq"); | 620 | pr_info("wt_msr_noirq\n"); |
634 | mbc = (struct scache *)&wt_msr_noirq; | 621 | mbc = (struct scache *)&wt_msr_noirq; |
635 | } else { | 622 | } else { |
636 | INFO("wt_msr"); | 623 | pr_info("wt_msr\n"); |
637 | mbc = (struct scache *)&wt_msr; | 624 | mbc = (struct scache *)&wt_msr; |
638 | } | 625 | } |
639 | } | 626 | } |
640 | } else { | 627 | } else { |
641 | if (cpuinfo.dcache_wb) { | 628 | if (cpuinfo.dcache_wb) { |
642 | INFO("wb_nomsr"); | 629 | pr_info("wb_nomsr\n"); |
643 | mbc = (struct scache *)&wb_nomsr; | 630 | mbc = (struct scache *)&wb_nomsr; |
644 | if (cpuinfo.ver_code <= CPUVER_7_20_D) { | 631 | if (cpuinfo.ver_code <= CPUVER_7_20_D) { |
645 | /* MS: problem with signal handling - hw bug */ | 632 | /* MS: problem with signal handling - hw bug */ |
646 | INFO("WB won't work properly"); | 633 | pr_info("WB won't work properly\n"); |
647 | } | 634 | } |
648 | } else { | 635 | } else { |
649 | if (cpuinfo.ver_code >= CPUVER_7_20_A) { | 636 | if (cpuinfo.ver_code >= CPUVER_7_20_A) { |
650 | INFO("wt_nomsr_noirq"); | 637 | pr_info("wt_nomsr_noirq\n"); |
651 | mbc = (struct scache *)&wt_nomsr_noirq; | 638 | mbc = (struct scache *)&wt_nomsr_noirq; |
652 | } else { | 639 | } else { |
653 | INFO("wt_nomsr"); | 640 | pr_info("wt_nomsr\n"); |
654 | mbc = (struct scache *)&wt_nomsr; | 641 | mbc = (struct scache *)&wt_nomsr; |
655 | } | 642 | } |
656 | } | 643 | } |
657 | } | 644 | } |
658 | /* FIXME Invalidation is done in U-BOOT | 645 | /* |
659 | * WT cache: Data is already written to main memory | 646 | * FIXME Invalidation is done in U-BOOT |
660 | * WB cache: Discard data on noMMU which caused that kernel doesn't boot | 647 | * WT cache: Data is already written to main memory |
661 | */ | 648 | * WB cache: Discard data on noMMU which caused that kernel doesn't boot |
649 | */ | ||
662 | /* invalidate_dcache(); */ | 650 | /* invalidate_dcache(); */ |
663 | enable_dcache(); | 651 | enable_dcache(); |
664 | 652 | ||
diff --git a/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c b/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c index 916aaedf1945..ee4689415410 100644 --- a/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c +++ b/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c | |||
@@ -27,7 +27,7 @@ | |||
27 | early_printk("ERROR: Microblaze " x "-different for PVR and DTS\n"); | 27 | early_printk("ERROR: Microblaze " x "-different for PVR and DTS\n"); |
28 | #else | 28 | #else |
29 | #define err_printk(x) \ | 29 | #define err_printk(x) \ |
30 | printk(KERN_INFO "ERROR: Microblaze " x "-different for PVR and DTS\n"); | 30 | pr_info("ERROR: Microblaze " x "-different for PVR and DTS\n"); |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu) | 33 | void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu) |
@@ -38,12 +38,11 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu) | |||
38 | 38 | ||
39 | CI(ver_code, VERSION); | 39 | CI(ver_code, VERSION); |
40 | if (!ci->ver_code) { | 40 | if (!ci->ver_code) { |
41 | printk(KERN_ERR "ERROR: MB has broken PVR regs " | 41 | pr_err("ERROR: MB has broken PVR regs -> use DTS setting\n"); |
42 | "-> use DTS setting\n"); | ||
43 | return; | 42 | return; |
44 | } | 43 | } |
45 | 44 | ||
46 | temp = PVR_USE_BARREL(pvr) | PVR_USE_MSR_INSTR(pvr) |\ | 45 | temp = PVR_USE_BARREL(pvr) | PVR_USE_MSR_INSTR(pvr) | |
47 | PVR_USE_PCMP_INSTR(pvr) | PVR_USE_DIV(pvr); | 46 | PVR_USE_PCMP_INSTR(pvr) | PVR_USE_DIV(pvr); |
48 | if (ci->use_instr != temp) | 47 | if (ci->use_instr != temp) |
49 | err_printk("BARREL, MSR, PCMP or DIV"); | 48 | err_printk("BARREL, MSR, PCMP or DIV"); |
@@ -59,13 +58,13 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu) | |||
59 | err_printk("HW_FPU"); | 58 | err_printk("HW_FPU"); |
60 | ci->use_fpu = temp; | 59 | ci->use_fpu = temp; |
61 | 60 | ||
62 | ci->use_exc = PVR_OPCODE_0x0_ILLEGAL(pvr) |\ | 61 | ci->use_exc = PVR_OPCODE_0x0_ILLEGAL(pvr) | |
63 | PVR_UNALIGNED_EXCEPTION(pvr) |\ | 62 | PVR_UNALIGNED_EXCEPTION(pvr) | |
64 | PVR_ILL_OPCODE_EXCEPTION(pvr) |\ | 63 | PVR_ILL_OPCODE_EXCEPTION(pvr) | |
65 | PVR_IOPB_BUS_EXCEPTION(pvr) |\ | 64 | PVR_IOPB_BUS_EXCEPTION(pvr) | |
66 | PVR_DOPB_BUS_EXCEPTION(pvr) |\ | 65 | PVR_DOPB_BUS_EXCEPTION(pvr) | |
67 | PVR_DIV_ZERO_EXCEPTION(pvr) |\ | 66 | PVR_DIV_ZERO_EXCEPTION(pvr) | |
68 | PVR_FPU_EXCEPTION(pvr) |\ | 67 | PVR_FPU_EXCEPTION(pvr) | |
69 | PVR_FSL_EXCEPTION(pvr); | 68 | PVR_FSL_EXCEPTION(pvr); |
70 | 69 | ||
71 | CI(pvr_user1, USER1); | 70 | CI(pvr_user1, USER1); |
diff --git a/arch/microblaze/kernel/cpu/cpuinfo.c b/arch/microblaze/kernel/cpu/cpuinfo.c index eab6abf5652e..0b2299bcb948 100644 --- a/arch/microblaze/kernel/cpu/cpuinfo.c +++ b/arch/microblaze/kernel/cpu/cpuinfo.c | |||
@@ -68,31 +68,30 @@ void __init setup_cpuinfo(void) | |||
68 | 68 | ||
69 | cpu = (struct device_node *) of_find_node_by_type(NULL, "cpu"); | 69 | cpu = (struct device_node *) of_find_node_by_type(NULL, "cpu"); |
70 | if (!cpu) | 70 | if (!cpu) |
71 | printk(KERN_ERR "You don't have cpu!!!\n"); | 71 | pr_err("You don't have cpu!!!\n"); |
72 | 72 | ||
73 | printk(KERN_INFO "%s: initialising\n", __func__); | 73 | pr_info("%s: initialising\n", __func__); |
74 | 74 | ||
75 | switch (cpu_has_pvr()) { | 75 | switch (cpu_has_pvr()) { |
76 | case 0: | 76 | case 0: |
77 | printk(KERN_WARNING | 77 | pr_warn("%s: No PVR support. Using static CPU info from FDT\n", |
78 | "%s: No PVR support. Using static CPU info from FDT\n", | ||
79 | __func__); | 78 | __func__); |
80 | set_cpuinfo_static(&cpuinfo, cpu); | 79 | set_cpuinfo_static(&cpuinfo, cpu); |
81 | break; | 80 | break; |
82 | /* FIXME I found weird behavior with MB 7.00.a/b 7.10.a | 81 | /* FIXME I found weird behavior with MB 7.00.a/b 7.10.a |
83 | * please do not use FULL PVR with MMU */ | 82 | * please do not use FULL PVR with MMU */ |
84 | case 1: | 83 | case 1: |
85 | printk(KERN_INFO "%s: Using full CPU PVR support\n", | 84 | pr_info("%s: Using full CPU PVR support\n", |
86 | __func__); | 85 | __func__); |
87 | set_cpuinfo_static(&cpuinfo, cpu); | 86 | set_cpuinfo_static(&cpuinfo, cpu); |
88 | set_cpuinfo_pvr_full(&cpuinfo, cpu); | 87 | set_cpuinfo_pvr_full(&cpuinfo, cpu); |
89 | break; | 88 | break; |
90 | default: | 89 | default: |
91 | printk(KERN_WARNING "%s: Unsupported PVR setting\n", __func__); | 90 | pr_warn("%s: Unsupported PVR setting\n", __func__); |
92 | set_cpuinfo_static(&cpuinfo, cpu); | 91 | set_cpuinfo_static(&cpuinfo, cpu); |
93 | } | 92 | } |
94 | 93 | ||
95 | if (cpuinfo.mmu_privins) | 94 | if (cpuinfo.mmu_privins) |
96 | printk(KERN_WARNING "%s: Stream instructions enabled" | 95 | pr_warn("%s: Stream instructions enabled" |
97 | " - USERSPACE CAN LOCK THIS KERNEL!\n", __func__); | 96 | " - USERSPACE CAN LOCK THIS KERNEL!\n", __func__); |
98 | } | 97 | } |
diff --git a/arch/microblaze/kernel/cpu/pvr.c b/arch/microblaze/kernel/cpu/pvr.c index 3a749d5e71fd..8d0dc6db48cf 100644 --- a/arch/microblaze/kernel/cpu/pvr.c +++ b/arch/microblaze/kernel/cpu/pvr.c | |||
@@ -27,7 +27,7 @@ | |||
27 | tmp = 0x0; /* Prevent warning about unused */ \ | 27 | tmp = 0x0; /* Prevent warning about unused */ \ |
28 | __asm__ __volatile__ ( \ | 28 | __asm__ __volatile__ ( \ |
29 | "mfs %0, rpvr" #pvrid ";" \ | 29 | "mfs %0, rpvr" #pvrid ";" \ |
30 | : "=r" (tmp) : : "memory"); \ | 30 | : "=r" (tmp) : : "memory"); \ |
31 | val = tmp; \ | 31 | val = tmp; \ |
32 | } | 32 | } |
33 | 33 | ||
diff --git a/arch/microblaze/kernel/dma.c b/arch/microblaze/kernel/dma.c index a2bfa2ca5730..da68d00fd087 100644 --- a/arch/microblaze/kernel/dma.c +++ b/arch/microblaze/kernel/dma.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <linux/gfp.h> | 11 | #include <linux/gfp.h> |
12 | #include <linux/dma-debug.h> | 12 | #include <linux/dma-debug.h> |
13 | #include <linux/export.h> | 13 | #include <linux/export.h> |
14 | #include <asm/bug.h> | 14 | #include <linux/bug.h> |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Generic direct DMA implementation | 17 | * Generic direct DMA implementation |
@@ -197,8 +197,8 @@ EXPORT_SYMBOL(dma_direct_ops); | |||
197 | 197 | ||
198 | static int __init dma_init(void) | 198 | static int __init dma_init(void) |
199 | { | 199 | { |
200 | dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); | 200 | dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); |
201 | 201 | ||
202 | return 0; | 202 | return 0; |
203 | } | 203 | } |
204 | fs_initcall(dma_init); | 204 | fs_initcall(dma_init); |
diff --git a/arch/microblaze/kernel/early_printk.c b/arch/microblaze/kernel/early_printk.c index aba1f9a97d5d..60dcacc68038 100644 --- a/arch/microblaze/kernel/early_printk.c +++ b/arch/microblaze/kernel/early_printk.c | |||
@@ -140,20 +140,20 @@ int __init setup_early_printk(char *opt) | |||
140 | switch (version) { | 140 | switch (version) { |
141 | #ifdef CONFIG_SERIAL_UARTLITE_CONSOLE | 141 | #ifdef CONFIG_SERIAL_UARTLITE_CONSOLE |
142 | case UARTLITE: | 142 | case UARTLITE: |
143 | printk(KERN_INFO "Early console on uartlite " | 143 | pr_info("Early console on uartlite at 0x%08x\n", |
144 | "at 0x%08x\n", base_addr); | 144 | base_addr); |
145 | early_console = &early_serial_uartlite_console; | 145 | early_console = &early_serial_uartlite_console; |
146 | break; | 146 | break; |
147 | #endif | 147 | #endif |
148 | #ifdef CONFIG_SERIAL_8250_CONSOLE | 148 | #ifdef CONFIG_SERIAL_8250_CONSOLE |
149 | case UART16550: | 149 | case UART16550: |
150 | printk(KERN_INFO "Early console on uart16650 " | 150 | pr_info("Early console on uart16650 at 0x%08x\n", |
151 | "at 0x%08x\n", base_addr); | 151 | base_addr); |
152 | early_console = &early_serial_uart16550_console; | 152 | early_console = &early_serial_uart16550_console; |
153 | break; | 153 | break; |
154 | #endif | 154 | #endif |
155 | default: | 155 | default: |
156 | printk(KERN_INFO "Unsupported early console %d\n", | 156 | pr_info("Unsupported early console %d\n", |
157 | version); | 157 | version); |
158 | return 1; | 158 | return 1; |
159 | } | 159 | } |
@@ -171,10 +171,9 @@ 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 remapping from 0x%x to ", | 174 | pr_info("early_printk_console remapping from 0x%x to ", base_addr); |
175 | base_addr); | ||
176 | base_addr = (u32) ioremap(base_addr, PAGE_SIZE); | 175 | base_addr = (u32) ioremap(base_addr, PAGE_SIZE); |
177 | printk(KERN_CONT "0x%x\n", base_addr); | 176 | pr_cont("0x%x\n", base_addr); |
178 | 177 | ||
179 | #ifdef CONFIG_MMU | 178 | #ifdef CONFIG_MMU |
180 | /* | 179 | /* |
@@ -197,7 +196,7 @@ void __init disable_early_printk(void) | |||
197 | { | 196 | { |
198 | if (!early_console_initialized || !early_console) | 197 | if (!early_console_initialized || !early_console) |
199 | return; | 198 | return; |
200 | printk(KERN_WARNING "disabling early console\n"); | 199 | pr_warn("disabling early console\n"); |
201 | unregister_console(early_console); | 200 | unregister_console(early_console); |
202 | early_console_initialized = 0; | 201 | early_console_initialized = 0; |
203 | } | 202 | } |
diff --git a/arch/microblaze/kernel/exceptions.c b/arch/microblaze/kernel/exceptions.c index 6348dc82f428..42dd12a62ff5 100644 --- a/arch/microblaze/kernel/exceptions.c +++ b/arch/microblaze/kernel/exceptions.c | |||
@@ -13,11 +13,11 @@ | |||
13 | * This file handles the architecture-dependent parts of hardware exceptions | 13 | * This file handles the architecture-dependent parts of hardware exceptions |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/export.h> | ||
16 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
17 | #include <linux/signal.h> | 18 | #include <linux/signal.h> |
18 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
19 | #include <linux/kallsyms.h> | 20 | #include <linux/kallsyms.h> |
20 | #include <linux/module.h> | ||
21 | 21 | ||
22 | #include <asm/exceptions.h> | 22 | #include <asm/exceptions.h> |
23 | #include <asm/entry.h> /* For KM CPU var */ | 23 | #include <asm/entry.h> /* For KM CPU var */ |
@@ -40,7 +40,7 @@ void die(const char *str, struct pt_regs *fp, long err) | |||
40 | { | 40 | { |
41 | console_verbose(); | 41 | console_verbose(); |
42 | spin_lock_irq(&die_lock); | 42 | spin_lock_irq(&die_lock); |
43 | printk(KERN_WARNING "Oops: %s, sig: %ld\n", str, err); | 43 | pr_warn("Oops: %s, sig: %ld\n", str, err); |
44 | show_regs(fp); | 44 | show_regs(fp); |
45 | spin_unlock_irq(&die_lock); | 45 | spin_unlock_irq(&die_lock); |
46 | /* do_exit() should take care of panic'ing from an interrupt | 46 | /* do_exit() should take care of panic'ing from an interrupt |
@@ -61,9 +61,9 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) | |||
61 | { | 61 | { |
62 | siginfo_t info; | 62 | siginfo_t info; |
63 | 63 | ||
64 | if (kernel_mode(regs)) { | 64 | if (kernel_mode(regs)) |
65 | die("Exception in kernel mode", regs, signr); | 65 | die("Exception in kernel mode", regs, signr); |
66 | } | 66 | |
67 | info.si_signo = signr; | 67 | info.si_signo = signr; |
68 | info.si_errno = 0; | 68 | info.si_errno = 0; |
69 | info.si_code = code; | 69 | info.si_code = code; |
@@ -79,8 +79,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, | |||
79 | #endif | 79 | #endif |
80 | 80 | ||
81 | #if 0 | 81 | #if 0 |
82 | printk(KERN_WARNING "Exception %02x in %s mode, FSR=%08x PC=%08x " \ | 82 | pr_warn("Exception %02x in %s mode, FSR=%08x PC=%08x ESR=%08x\n", |
83 | "ESR=%08x\n", | ||
84 | type, user_mode(regs) ? "user" : "kernel", fsr, | 83 | type, user_mode(regs) ? "user" : "kernel", fsr, |
85 | (unsigned int) regs->pc, (unsigned int) regs->esr); | 84 | (unsigned int) regs->pc, (unsigned int) regs->esr); |
86 | #endif | 85 | #endif |
@@ -92,8 +91,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, | |||
92 | _exception(SIGILL, regs, ILL_ILLOPC, addr); | 91 | _exception(SIGILL, regs, ILL_ILLOPC, addr); |
93 | return; | 92 | return; |
94 | } | 93 | } |
95 | printk(KERN_WARNING "Illegal opcode exception " \ | 94 | pr_warn("Illegal opcode exception in kernel mode.\n"); |
96 | "in kernel mode.\n"); | ||
97 | die("opcode exception", regs, SIGBUS); | 95 | die("opcode exception", regs, SIGBUS); |
98 | break; | 96 | break; |
99 | case MICROBLAZE_IBUS_EXCEPTION: | 97 | case MICROBLAZE_IBUS_EXCEPTION: |
@@ -102,8 +100,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, | |||
102 | _exception(SIGBUS, regs, BUS_ADRERR, addr); | 100 | _exception(SIGBUS, regs, BUS_ADRERR, addr); |
103 | return; | 101 | return; |
104 | } | 102 | } |
105 | printk(KERN_WARNING "Instruction bus error exception " \ | 103 | pr_warn("Instruction bus error exception in kernel mode.\n"); |
106 | "in kernel mode.\n"); | ||
107 | die("bus exception", regs, SIGBUS); | 104 | die("bus exception", regs, SIGBUS); |
108 | break; | 105 | break; |
109 | case MICROBLAZE_DBUS_EXCEPTION: | 106 | case MICROBLAZE_DBUS_EXCEPTION: |
@@ -112,8 +109,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, | |||
112 | _exception(SIGBUS, regs, BUS_ADRERR, addr); | 109 | _exception(SIGBUS, regs, BUS_ADRERR, addr); |
113 | return; | 110 | return; |
114 | } | 111 | } |
115 | printk(KERN_WARNING "Data bus error exception " \ | 112 | pr_warn("Data bus error exception in kernel mode.\n"); |
116 | "in kernel mode.\n"); | ||
117 | die("bus exception", regs, SIGBUS); | 113 | die("bus exception", regs, SIGBUS); |
118 | break; | 114 | break; |
119 | case MICROBLAZE_DIV_ZERO_EXCEPTION: | 115 | case MICROBLAZE_DIV_ZERO_EXCEPTION: |
@@ -122,8 +118,7 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, | |||
122 | _exception(SIGFPE, regs, FPE_INTDIV, addr); | 118 | _exception(SIGFPE, regs, FPE_INTDIV, addr); |
123 | return; | 119 | return; |
124 | } | 120 | } |
125 | printk(KERN_WARNING "Divide by zero exception " \ | 121 | pr_warn("Divide by zero exception in kernel mode.\n"); |
126 | "in kernel mode.\n"); | ||
127 | die("Divide by zero exception", regs, SIGBUS); | 122 | die("Divide by zero exception", regs, SIGBUS); |
128 | break; | 123 | break; |
129 | case MICROBLAZE_FPU_EXCEPTION: | 124 | case MICROBLAZE_FPU_EXCEPTION: |
@@ -151,8 +146,8 @@ asmlinkage void full_exception(struct pt_regs *regs, unsigned int type, | |||
151 | #endif | 146 | #endif |
152 | default: | 147 | default: |
153 | /* FIXME what to do in unexpected exception */ | 148 | /* FIXME what to do in unexpected exception */ |
154 | printk(KERN_WARNING "Unexpected exception %02x " | 149 | pr_warn("Unexpected exception %02x PC=%08x in %s mode\n", |
155 | "PC=%08x in %s mode\n", type, (unsigned int) addr, | 150 | type, (unsigned int) addr, |
156 | kernel_mode(regs) ? "kernel" : "user"); | 151 | kernel_mode(regs) ? "kernel" : "user"); |
157 | } | 152 | } |
158 | return; | 153 | return; |
diff --git a/arch/microblaze/kernel/ftrace.c b/arch/microblaze/kernel/ftrace.c index 357d56abe24a..e8a5e9cf4ed1 100644 --- a/arch/microblaze/kernel/ftrace.c +++ b/arch/microblaze/kernel/ftrace.c | |||
@@ -35,18 +35,18 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) | |||
35 | * happen. This tool is too much intrusive to | 35 | * happen. This tool is too much intrusive to |
36 | * ignore such a protection. | 36 | * ignore such a protection. |
37 | */ | 37 | */ |
38 | asm volatile(" 1: lwi %0, %2, 0; \ | 38 | asm volatile(" 1: lwi %0, %2, 0;" \ |
39 | 2: swi %3, %2, 0; \ | 39 | "2: swi %3, %2, 0;" \ |
40 | addik %1, r0, 0; \ | 40 | " addik %1, r0, 0;" \ |
41 | 3: \ | 41 | "3:" \ |
42 | .section .fixup, \"ax\"; \ | 42 | " .section .fixup, \"ax\";" \ |
43 | 4: brid 3b; \ | 43 | "4: brid 3b;" \ |
44 | addik %1, r0, 1; \ | 44 | " addik %1, r0, 1;" \ |
45 | .previous; \ | 45 | " .previous;" \ |
46 | .section __ex_table,\"a\"; \ | 46 | " .section __ex_table,\"a\";" \ |
47 | .word 1b,4b; \ | 47 | " .word 1b,4b;" \ |
48 | .word 2b,4b; \ | 48 | " .word 2b,4b;" \ |
49 | .previous;" \ | 49 | " .previous;" \ |
50 | : "=&r" (old), "=r" (faulted) | 50 | : "=&r" (old), "=r" (faulted) |
51 | : "r" (parent), "r" (return_hooker) | 51 | : "r" (parent), "r" (return_hooker) |
52 | ); | 52 | ); |
@@ -81,16 +81,16 @@ static int ftrace_modify_code(unsigned long addr, unsigned int value) | |||
81 | { | 81 | { |
82 | int faulted = 0; | 82 | int faulted = 0; |
83 | 83 | ||
84 | __asm__ __volatile__(" 1: swi %2, %1, 0; \ | 84 | __asm__ __volatile__(" 1: swi %2, %1, 0;" \ |
85 | addik %0, r0, 0; \ | 85 | " addik %0, r0, 0;" \ |
86 | 2: \ | 86 | "2:" \ |
87 | .section .fixup, \"ax\"; \ | 87 | " .section .fixup, \"ax\";" \ |
88 | 3: brid 2b; \ | 88 | "3: brid 2b;" \ |
89 | addik %0, r0, 1; \ | 89 | " addik %0, r0, 1;" \ |
90 | .previous; \ | 90 | " .previous;" \ |
91 | .section __ex_table,\"a\"; \ | 91 | " .section __ex_table,\"a\";" \ |
92 | .word 1b,3b; \ | 92 | " .word 1b,3b;" \ |
93 | .previous;" \ | 93 | " .previous;" \ |
94 | : "=r" (faulted) | 94 | : "=r" (faulted) |
95 | : "r" (addr), "r" (value) | 95 | : "r" (addr), "r" (value) |
96 | ); | 96 | ); |
diff --git a/arch/microblaze/kernel/heartbeat.c b/arch/microblaze/kernel/heartbeat.c index 154756f3c694..1879a0527776 100644 --- a/arch/microblaze/kernel/heartbeat.c +++ b/arch/microblaze/kernel/heartbeat.c | |||
@@ -61,7 +61,7 @@ void setup_heartbeat(void) | |||
61 | if (gpio) { | 61 | if (gpio) { |
62 | base_addr = be32_to_cpup(of_get_property(gpio, "reg", NULL)); | 62 | base_addr = be32_to_cpup(of_get_property(gpio, "reg", NULL)); |
63 | base_addr = (unsigned long) ioremap(base_addr, PAGE_SIZE); | 63 | base_addr = (unsigned long) ioremap(base_addr, PAGE_SIZE); |
64 | printk(KERN_NOTICE "Heartbeat GPIO at 0x%x\n", base_addr); | 64 | pr_notice("Heartbeat GPIO at 0x%x\n", base_addr); |
65 | 65 | ||
66 | /* GPIO is configured as output */ | 66 | /* GPIO is configured as output */ |
67 | prop = (int *) of_get_property(gpio, "xlnx,is-bidir", NULL); | 67 | prop = (int *) of_get_property(gpio, "xlnx,is-bidir", NULL); |
diff --git a/arch/microblaze/kernel/intc.c b/arch/microblaze/kernel/intc.c index 7a1a8d4354fe..8778adf72bd3 100644 --- a/arch/microblaze/kernel/intc.c +++ b/arch/microblaze/kernel/intc.c | |||
@@ -147,12 +147,12 @@ void __init init_IRQ(void) | |||
147 | intr_mask = | 147 | intr_mask = |
148 | be32_to_cpup(of_get_property(intc, "xlnx,kind-of-intr", NULL)); | 148 | be32_to_cpup(of_get_property(intc, "xlnx,kind-of-intr", NULL)); |
149 | if (intr_mask > (u32)((1ULL << nr_irq) - 1)) | 149 | if (intr_mask > (u32)((1ULL << nr_irq) - 1)) |
150 | printk(KERN_INFO " ERROR: Mismatch in kind-of-intr param\n"); | 150 | pr_info(" ERROR: Mismatch in kind-of-intr param\n"); |
151 | 151 | ||
152 | #ifdef CONFIG_SELFMOD_INTC | 152 | #ifdef CONFIG_SELFMOD_INTC |
153 | selfmod_function((int *) arr_func, intc_baseaddr); | 153 | selfmod_function((int *) arr_func, intc_baseaddr); |
154 | #endif | 154 | #endif |
155 | printk(KERN_INFO "%s #0 at 0x%08x, num_irq=%d, edge=0x%x\n", | 155 | pr_info("%s #0 at 0x%08x, num_irq=%d, edge=0x%x\n", |
156 | intc->name, intc_baseaddr, nr_irq, intr_mask); | 156 | intc->name, intc_baseaddr, nr_irq, intr_mask); |
157 | 157 | ||
158 | /* | 158 | /* |
diff --git a/arch/microblaze/kernel/kgdb.c b/arch/microblaze/kernel/kgdb.c index 09a5e8286137..8adc92443100 100644 --- a/arch/microblaze/kernel/kgdb.c +++ b/arch/microblaze/kernel/kgdb.c | |||
@@ -141,7 +141,7 @@ void kgdb_arch_exit(void) | |||
141 | /* | 141 | /* |
142 | * Global data | 142 | * Global data |
143 | */ | 143 | */ |
144 | struct kgdb_arch arch_kgdb_ops = { | 144 | const struct kgdb_arch arch_kgdb_ops = { |
145 | #ifdef __MICROBLAZEEL__ | 145 | #ifdef __MICROBLAZEEL__ |
146 | .gdb_bpt_instr = {0x18, 0x00, 0x0c, 0xba}, /* brki r16, 0x18 */ | 146 | .gdb_bpt_instr = {0x18, 0x00, 0x0c, 0xba}, /* brki r16, 0x18 */ |
147 | #else | 147 | #else |
diff --git a/arch/microblaze/kernel/microblaze_ksyms.c b/arch/microblaze/kernel/microblaze_ksyms.c index 2b25bcf05c00..9f1d02c4c5cc 100644 --- a/arch/microblaze/kernel/microblaze_ksyms.c +++ b/arch/microblaze/kernel/microblaze_ksyms.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/module.h> | 10 | #include <linux/export.h> |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/cryptohash.h> | 12 | #include <linux/cryptohash.h> |
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
diff --git a/arch/microblaze/kernel/module.c b/arch/microblaze/kernel/module.c index f39257a5abcf..182e6be856cd 100644 --- a/arch/microblaze/kernel/module.c +++ b/arch/microblaze/kernel/module.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/module.h> | 10 | #include <linux/export.h> |
11 | #include <linux/moduleloader.h> | 11 | #include <linux/moduleloader.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/elf.h> | 13 | #include <linux/elf.h> |
@@ -108,8 +108,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, | |||
108 | break; | 108 | break; |
109 | 109 | ||
110 | default: | 110 | default: |
111 | printk(KERN_ERR "module %s: " | 111 | pr_err("module %s: Unknown relocation: %u\n", |
112 | "Unknown relocation: %u\n", | ||
113 | module->name, | 112 | module->name, |
114 | ELF32_R_TYPE(rela[i].r_info)); | 113 | ELF32_R_TYPE(rela[i].r_info)); |
115 | return -ENOEXEC; | 114 | return -ENOEXEC; |
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c index 08f87343f8d0..fa0ea609137c 100644 --- a/arch/microblaze/kernel/process.c +++ b/arch/microblaze/kernel/process.c | |||
@@ -8,36 +8,36 @@ | |||
8 | * for more details. | 8 | * for more details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/export.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/pm.h> | 13 | #include <linux/pm.h> |
14 | #include <linux/tick.h> | 14 | #include <linux/tick.h> |
15 | #include <linux/bitops.h> | 15 | #include <linux/bitops.h> |
16 | #include <linux/ptrace.h> | 16 | #include <linux/ptrace.h> |
17 | #include <asm/pgalloc.h> | 17 | #include <asm/pgalloc.h> |
18 | #include <asm/uaccess.h> /* for USER_DS macros */ | 18 | #include <linux/uaccess.h> /* for USER_DS macros */ |
19 | #include <asm/cacheflush.h> | 19 | #include <asm/cacheflush.h> |
20 | 20 | ||
21 | void show_regs(struct pt_regs *regs) | 21 | void show_regs(struct pt_regs *regs) |
22 | { | 22 | { |
23 | printk(KERN_INFO " Registers dump: mode=%X\r\n", regs->pt_mode); | 23 | pr_info(" Registers dump: mode=%X\r\n", regs->pt_mode); |
24 | printk(KERN_INFO " r1=%08lX, r2=%08lX, r3=%08lX, r4=%08lX\n", | 24 | pr_info(" r1=%08lX, r2=%08lX, r3=%08lX, r4=%08lX\n", |
25 | regs->r1, regs->r2, regs->r3, regs->r4); | 25 | regs->r1, regs->r2, regs->r3, regs->r4); |
26 | printk(KERN_INFO " r5=%08lX, r6=%08lX, r7=%08lX, r8=%08lX\n", | 26 | pr_info(" r5=%08lX, r6=%08lX, r7=%08lX, r8=%08lX\n", |
27 | regs->r5, regs->r6, regs->r7, regs->r8); | 27 | regs->r5, regs->r6, regs->r7, regs->r8); |
28 | printk(KERN_INFO " r9=%08lX, r10=%08lX, r11=%08lX, r12=%08lX\n", | 28 | pr_info(" r9=%08lX, r10=%08lX, r11=%08lX, r12=%08lX\n", |
29 | regs->r9, regs->r10, regs->r11, regs->r12); | 29 | regs->r9, regs->r10, regs->r11, regs->r12); |
30 | printk(KERN_INFO " r13=%08lX, r14=%08lX, r15=%08lX, r16=%08lX\n", | 30 | pr_info(" r13=%08lX, r14=%08lX, r15=%08lX, r16=%08lX\n", |
31 | regs->r13, regs->r14, regs->r15, regs->r16); | 31 | regs->r13, regs->r14, regs->r15, regs->r16); |
32 | printk(KERN_INFO " r17=%08lX, r18=%08lX, r19=%08lX, r20=%08lX\n", | 32 | pr_info(" r17=%08lX, r18=%08lX, r19=%08lX, r20=%08lX\n", |
33 | regs->r17, regs->r18, regs->r19, regs->r20); | 33 | regs->r17, regs->r18, regs->r19, regs->r20); |
34 | printk(KERN_INFO " r21=%08lX, r22=%08lX, r23=%08lX, r24=%08lX\n", | 34 | pr_info(" r21=%08lX, r22=%08lX, r23=%08lX, r24=%08lX\n", |
35 | regs->r21, regs->r22, regs->r23, regs->r24); | 35 | regs->r21, regs->r22, regs->r23, regs->r24); |
36 | printk(KERN_INFO " r25=%08lX, r26=%08lX, r27=%08lX, r28=%08lX\n", | 36 | pr_info(" r25=%08lX, r26=%08lX, r27=%08lX, r28=%08lX\n", |
37 | regs->r25, regs->r26, regs->r27, regs->r28); | 37 | regs->r25, regs->r26, regs->r27, regs->r28); |
38 | printk(KERN_INFO " r29=%08lX, r30=%08lX, r31=%08lX, rPC=%08lX\n", | 38 | pr_info(" r29=%08lX, r30=%08lX, r31=%08lX, rPC=%08lX\n", |
39 | regs->r29, regs->r30, regs->r31, regs->pc); | 39 | regs->r29, regs->r30, regs->r31, regs->pc); |
40 | printk(KERN_INFO " msr=%08lX, ear=%08lX, esr=%08lX, fsr=%08lX\n", | 40 | pr_info(" msr=%08lX, ear=%08lX, esr=%08lX, fsr=%08lX\n", |
41 | regs->msr, regs->ear, regs->esr, regs->fsr); | 41 | regs->msr, regs->ear, regs->esr, regs->fsr); |
42 | } | 42 | } |
43 | 43 | ||
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c index a744e3f18883..0a2c68f9f9b0 100644 --- a/arch/microblaze/kernel/prom.c +++ b/arch/microblaze/kernel/prom.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <stdarg.h> | 16 | #include <stdarg.h> |
17 | #include <linux/export.h> | ||
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | #include <linux/string.h> | 19 | #include <linux/string.h> |
19 | #include <linux/init.h> | 20 | #include <linux/init.h> |
@@ -25,7 +26,6 @@ | |||
25 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
26 | #include <linux/initrd.h> | 27 | #include <linux/initrd.h> |
27 | #include <linux/bitops.h> | 28 | #include <linux/bitops.h> |
28 | #include <linux/module.h> | ||
29 | #include <linux/kexec.h> | 29 | #include <linux/kexec.h> |
30 | #include <linux/debugfs.h> | 30 | #include <linux/debugfs.h> |
31 | #include <linux/irq.h> | 31 | #include <linux/irq.h> |
diff --git a/arch/microblaze/kernel/prom_parse.c b/arch/microblaze/kernel/prom_parse.c index 47187cc2cf00..068762f55fd6 100644 --- a/arch/microblaze/kernel/prom_parse.c +++ b/arch/microblaze/kernel/prom_parse.c | |||
@@ -1,8 +1,8 @@ | |||
1 | #undef DEBUG | 1 | #undef DEBUG |
2 | 2 | ||
3 | #include <linux/export.h> | ||
3 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
4 | #include <linux/string.h> | 5 | #include <linux/string.h> |
5 | #include <linux/module.h> | ||
6 | #include <linux/ioport.h> | 6 | #include <linux/ioport.h> |
7 | #include <linux/etherdevice.h> | 7 | #include <linux/etherdevice.h> |
8 | #include <linux/of_address.h> | 8 | #include <linux/of_address.h> |
diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c index b050219c42e6..39cf50841f6d 100644 --- a/arch/microblaze/kernel/ptrace.c +++ b/arch/microblaze/kernel/ptrace.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/asm-offsets.h> | 40 | #include <asm/asm-offsets.h> |
41 | #include <asm/cacheflush.h> | 41 | #include <asm/cacheflush.h> |
42 | #include <asm/syscall.h> | 42 | #include <asm/syscall.h> |
43 | #include <asm/io.h> | 43 | #include <linux/io.h> |
44 | 44 | ||
45 | /* Returns the address where the register at REG_OFFS in P is stashed away. */ | 45 | /* Returns the address where the register at REG_OFFS in P is stashed away. */ |
46 | static microblaze_reg_t *reg_save_addr(unsigned reg_offs, | 46 | static microblaze_reg_t *reg_save_addr(unsigned reg_offs, |
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index 954348f83505..0263da7b83dd 100644 --- a/arch/microblaze/kernel/setup.c +++ b/arch/microblaze/kernel/setup.c | |||
@@ -150,33 +150,35 @@ void __init machine_early_init(const char *cmdline, unsigned int ram, | |||
150 | /* printk("TLB1 0x%08x, TLB0 0x%08x, tlb 0x%x\n", tlb0, | 150 | /* printk("TLB1 0x%08x, TLB0 0x%08x, tlb 0x%x\n", tlb0, |
151 | tlb1, kernel_tlb); */ | 151 | tlb1, kernel_tlb); */ |
152 | 152 | ||
153 | printk("Ramdisk addr 0x%08x, ", ram); | 153 | pr_info("Ramdisk addr 0x%08x, ", ram); |
154 | if (fdt) | 154 | if (fdt) |
155 | printk("FDT at 0x%08x\n", fdt); | 155 | pr_info("FDT at 0x%08x\n", fdt); |
156 | else | 156 | else |
157 | printk("Compiled-in FDT at 0x%08x\n", | 157 | pr_info("Compiled-in FDT at 0x%08x\n", |
158 | (unsigned int)_fdt_start); | 158 | (unsigned int)_fdt_start); |
159 | 159 | ||
160 | #ifdef CONFIG_MTD_UCLINUX | 160 | #ifdef CONFIG_MTD_UCLINUX |
161 | printk("Found romfs @ 0x%08x (0x%08x)\n", | 161 | pr_info("Found romfs @ 0x%08x (0x%08x)\n", |
162 | romfs_base, romfs_size); | 162 | romfs_base, romfs_size); |
163 | printk("#### klimit %p ####\n", old_klimit); | 163 | pr_info("#### klimit %p ####\n", old_klimit); |
164 | BUG_ON(romfs_size < 0); /* What else can we do? */ | 164 | BUG_ON(romfs_size < 0); /* What else can we do? */ |
165 | 165 | ||
166 | printk("Moved 0x%08x bytes from 0x%08x to 0x%08x\n", | 166 | pr_info("Moved 0x%08x bytes from 0x%08x to 0x%08x\n", |
167 | romfs_size, romfs_base, (unsigned)&__bss_stop); | 167 | romfs_size, romfs_base, (unsigned)&__bss_stop); |
168 | 168 | ||
169 | printk("New klimit: 0x%08x\n", (unsigned)klimit); | 169 | pr_info("New klimit: 0x%08x\n", (unsigned)klimit); |
170 | #endif | 170 | #endif |
171 | 171 | ||
172 | #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR | 172 | #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR |
173 | if (msr) | 173 | if (msr) { |
174 | printk("!!!Your kernel has setup MSR instruction but " | 174 | pr_info("!!!Your kernel has setup MSR instruction but "); |
175 | "CPU don't have it %x\n", msr); | 175 | pr_cont("CPU don't have it %x\n", msr); |
176 | } | ||
176 | #else | 177 | #else |
177 | if (!msr) | 178 | if (!msr) { |
178 | printk("!!!Your kernel not setup MSR instruction but " | 179 | pr_info("!!!Your kernel not setup MSR instruction but "); |
179 | "CPU have it %x\n", msr); | 180 | pr_cont"CPU have it %x\n", msr); |
181 | } | ||
180 | #endif | 182 | #endif |
181 | 183 | ||
182 | /* Do not copy reset vectors. offset = 0x2 means skip the first | 184 | /* Do not copy reset vectors. offset = 0x2 means skip the first |
@@ -216,6 +218,8 @@ static int __init debugfs_tlb(void) | |||
216 | d = debugfs_create_u32("tlb_skip", S_IRUGO, of_debugfs_root, &tlb_skip); | 218 | d = debugfs_create_u32("tlb_skip", S_IRUGO, of_debugfs_root, &tlb_skip); |
217 | if (!d) | 219 | if (!d) |
218 | return -ENOMEM; | 220 | return -ENOMEM; |
221 | |||
222 | return 0; | ||
219 | } | 223 | } |
220 | device_initcall(debugfs_tlb); | 224 | device_initcall(debugfs_tlb); |
221 | # endif | 225 | # endif |
diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c index 9f7a8bde0686..d26d7e7a6913 100644 --- a/arch/microblaze/kernel/signal.c +++ b/arch/microblaze/kernel/signal.c | |||
@@ -242,7 +242,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
242 | set_fs(USER_DS); | 242 | set_fs(USER_DS); |
243 | 243 | ||
244 | #ifdef DEBUG_SIG | 244 | #ifdef DEBUG_SIG |
245 | printk(KERN_INFO "SIG deliver (%s:%d): sp=%p pc=%08lx\n", | 245 | pr_info("SIG deliver (%s:%d): sp=%p pc=%08lx\n", |
246 | current->comm, current->pid, frame, regs->pc); | 246 | current->comm, current->pid, frame, regs->pc); |
247 | #endif | 247 | #endif |
248 | 248 | ||
@@ -317,8 +317,8 @@ static void do_signal(struct pt_regs *regs, int in_syscall) | |||
317 | int signr; | 317 | int signr; |
318 | struct k_sigaction ka; | 318 | struct k_sigaction ka; |
319 | #ifdef DEBUG_SIG | 319 | #ifdef DEBUG_SIG |
320 | printk(KERN_INFO "do signal: %p %d\n", regs, in_syscall); | 320 | pr_info("do signal: %p %d\n", regs, in_syscall); |
321 | printk(KERN_INFO "do signal2: %lx %lx %ld [%lx]\n", regs->pc, regs->r1, | 321 | pr_info("do signal2: %lx %lx %ld [%lx]\n", regs->pc, regs->r1, |
322 | regs->r12, current_thread_info()->flags); | 322 | regs->r12, current_thread_info()->flags); |
323 | #endif | 323 | #endif |
324 | 324 | ||
diff --git a/arch/microblaze/kernel/stacktrace.c b/arch/microblaze/kernel/stacktrace.c index 84bc6686102c..b4debe283a79 100644 --- a/arch/microblaze/kernel/stacktrace.c +++ b/arch/microblaze/kernel/stacktrace.c | |||
@@ -9,11 +9,11 @@ | |||
9 | * for more details. | 9 | * for more details. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/export.h> | ||
12 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
13 | #include <linux/stacktrace.h> | 14 | #include <linux/stacktrace.h> |
14 | #include <linux/thread_info.h> | 15 | #include <linux/thread_info.h> |
15 | #include <linux/ptrace.h> | 16 | #include <linux/ptrace.h> |
16 | #include <linux/module.h> | ||
17 | #include <asm/unwind.h> | 17 | #include <asm/unwind.h> |
18 | 18 | ||
19 | void save_stack_trace(struct stack_trace *trace) | 19 | void save_stack_trace(struct stack_trace *trace) |
diff --git a/arch/microblaze/kernel/sys_microblaze.c b/arch/microblaze/kernel/sys_microblaze.c index 63647c586b43..f905b3ae68c7 100644 --- a/arch/microblaze/kernel/sys_microblaze.c +++ b/arch/microblaze/kernel/sys_microblaze.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
16 | #include <linux/export.h> | ||
16 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
17 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
18 | #include <linux/syscalls.h> | 19 | #include <linux/syscalls.h> |
@@ -24,14 +25,12 @@ | |||
24 | #include <linux/sys.h> | 25 | #include <linux/sys.h> |
25 | #include <linux/ipc.h> | 26 | #include <linux/ipc.h> |
26 | #include <linux/file.h> | 27 | #include <linux/file.h> |
27 | #include <linux/module.h> | ||
28 | #include <linux/err.h> | 28 | #include <linux/err.h> |
29 | #include <linux/fs.h> | 29 | #include <linux/fs.h> |
30 | #include <linux/semaphore.h> | 30 | #include <linux/semaphore.h> |
31 | #include <linux/uaccess.h> | 31 | #include <linux/uaccess.h> |
32 | #include <linux/unistd.h> | 32 | #include <linux/unistd.h> |
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | |||
35 | #include <asm/syscalls.h> | 34 | #include <asm/syscalls.h> |
36 | 35 | ||
37 | asmlinkage long sys_mmap(unsigned long addr, unsigned long len, | 36 | asmlinkage long sys_mmap(unsigned long addr, unsigned long len, |
diff --git a/arch/microblaze/kernel/traps.c b/arch/microblaze/kernel/traps.c index 5541ac559593..30e6b5004a6a 100644 --- a/arch/microblaze/kernel/traps.c +++ b/arch/microblaze/kernel/traps.c | |||
@@ -8,9 +8,9 @@ | |||
8 | * for more details. | 8 | * for more details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/export.h> | ||
11 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
12 | #include <linux/kallsyms.h> | 13 | #include <linux/kallsyms.h> |
13 | #include <linux/module.h> | ||
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/debug_locks.h> | 15 | #include <linux/debug_locks.h> |
16 | 16 | ||
@@ -26,7 +26,7 @@ static unsigned long kstack_depth_to_print; /* 0 == entire stack */ | |||
26 | 26 | ||
27 | static int __init kstack_setup(char *s) | 27 | static int __init kstack_setup(char *s) |
28 | { | 28 | { |
29 | return !strict_strtoul(s, 0, &kstack_depth_to_print); | 29 | return !kstrtoul(s, 0, &kstack_depth_to_print); |
30 | } | 30 | } |
31 | __setup("kstack=", kstack_setup); | 31 | __setup("kstack=", kstack_setup); |
32 | 32 | ||
@@ -66,9 +66,7 @@ void show_stack(struct task_struct *task, unsigned long *sp) | |||
66 | } | 66 | } |
67 | print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 32, 4, (void *)fp, | 67 | print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 32, 4, (void *)fp, |
68 | words_to_show << 2, 0); | 68 | words_to_show << 2, 0); |
69 | printk(KERN_INFO "\n\n"); | 69 | pr_info("\n\nCall Trace:\n"); |
70 | |||
71 | pr_info("Call Trace:\n"); | ||
72 | microblaze_unwind(task, NULL); | 70 | microblaze_unwind(task, NULL); |
73 | pr_info("\n"); | 71 | pr_info("\n"); |
74 | 72 | ||
diff --git a/arch/microblaze/kernel/unwind.c b/arch/microblaze/kernel/unwind.c index 6be4ae3c3351..1f7b8d449668 100644 --- a/arch/microblaze/kernel/unwind.c +++ b/arch/microblaze/kernel/unwind.c | |||
@@ -13,13 +13,13 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | /* #define DEBUG 1 */ | 15 | /* #define DEBUG 1 */ |
16 | #include <linux/export.h> | ||
16 | #include <linux/kallsyms.h> | 17 | #include <linux/kallsyms.h> |
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | 19 | #include <linux/sched.h> |
19 | #include <linux/stacktrace.h> | 20 | #include <linux/stacktrace.h> |
20 | #include <linux/types.h> | 21 | #include <linux/types.h> |
21 | #include <linux/errno.h> | 22 | #include <linux/errno.h> |
22 | #include <linux/module.h> | ||
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <asm/sections.h> | 24 | #include <asm/sections.h> |
25 | #include <asm/exceptions.h> | 25 | #include <asm/exceptions.h> |