aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/microblaze/Makefile9
-rw-r--r--arch/microblaze/boot/.gitignore3
-rw-r--r--arch/microblaze/include/asm/io.h2
-rw-r--r--arch/microblaze/kernel/.gitignore1
-rw-r--r--arch/microblaze/kernel/cpu/cache.c148
-rw-r--r--arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c21
-rw-r--r--arch/microblaze/kernel/cpu/cpuinfo.c13
-rw-r--r--arch/microblaze/kernel/cpu/pvr.c2
-rw-r--r--arch/microblaze/kernel/dma.c6
-rw-r--r--arch/microblaze/kernel/early_printk.c17
-rw-r--r--arch/microblaze/kernel/exceptions.c27
-rw-r--r--arch/microblaze/kernel/ftrace.c44
-rw-r--r--arch/microblaze/kernel/heartbeat.c2
-rw-r--r--arch/microblaze/kernel/intc.c4
-rw-r--r--arch/microblaze/kernel/kgdb.c2
-rw-r--r--arch/microblaze/kernel/microblaze_ksyms.c2
-rw-r--r--arch/microblaze/kernel/module.c5
-rw-r--r--arch/microblaze/kernel/process.c24
-rw-r--r--arch/microblaze/kernel/prom.c2
-rw-r--r--arch/microblaze/kernel/prom_parse.c2
-rw-r--r--arch/microblaze/kernel/ptrace.c2
-rw-r--r--arch/microblaze/kernel/setup.c30
-rw-r--r--arch/microblaze/kernel/signal.c6
-rw-r--r--arch/microblaze/kernel/stacktrace.c2
-rw-r--r--arch/microblaze/kernel/sys_microblaze.c3
-rw-r--r--arch/microblaze/kernel/traps.c8
-rw-r--r--arch/microblaze/kernel/unwind.c2
-rw-r--r--arch/microblaze/lib/ashldi3.c3
-rw-r--r--arch/microblaze/lib/ashrdi3.c3
-rw-r--r--arch/microblaze/lib/cmpdi2.c2
-rw-r--r--arch/microblaze/lib/lshrdi3.c3
-rw-r--r--arch/microblaze/lib/memcpy.c12
-rw-r--r--arch/microblaze/lib/memmove.c11
-rw-r--r--arch/microblaze/lib/memset.c2
-rw-r--r--arch/microblaze/lib/muldi3.c2
-rw-r--r--arch/microblaze/lib/uaccess_old.S9
-rw-r--r--arch/microblaze/lib/ucmpdi2.c2
-rw-r--r--arch/microblaze/mm/consistent.c7
-rw-r--r--arch/microblaze/mm/fault.c10
-rw-r--r--arch/microblaze/mm/highmem.c2
-rw-r--r--arch/microblaze/mm/init.c32
-rw-r--r--arch/microblaze/mm/pgtable.c17
-rw-r--r--arch/microblaze/pci/indirect_pci.c2
-rw-r--r--arch/microblaze/pci/iomap.c2
-rw-r--r--arch/microblaze/pci/pci-common.c96
-rw-r--r--arch/microblaze/pci/xilinx_pci.c16
-rw-r--r--include/asm-generic/io.h8
47 files changed, 299 insertions, 331 deletions
diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile
index d26fb905ee0a..0a603d3ecf24 100644
--- a/arch/microblaze/Makefile
+++ b/arch/microblaze/Makefile
@@ -69,16 +69,13 @@ export MMU DTB
69 69
70all: linux.bin 70all: linux.bin
71 71
72# With make 3.82 we cannot mix normal and wildcard targets
73BOOT_TARGETS1 = linux.bin linux.bin.gz
74BOOT_TARGETS2 = simpleImage.%
75
76archclean: 72archclean:
77 $(Q)$(MAKE) $(clean)=$(boot) 73 $(Q)$(MAKE) $(clean)=$(boot)
78 74
79$(BOOT_TARGETS1): vmlinux 75linux.bin linux.bin.gz: vmlinux
80 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ 76 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
81$(BOOT_TARGETS2): vmlinux 77
78simpleImage.%: vmlinux
82 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ 79 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
83 80
84define archhelp 81define archhelp
diff --git a/arch/microblaze/boot/.gitignore b/arch/microblaze/boot/.gitignore
new file mode 100644
index 000000000000..bf0459186027
--- /dev/null
+++ b/arch/microblaze/boot/.gitignore
@@ -0,0 +1,3 @@
1*.dtb
2linux.bin*
3simpleImage.*
diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h
index 4fbfdc1ac7f8..8cb8a8566ede 100644
--- a/arch/microblaze/include/asm/io.h
+++ b/arch/microblaze/include/asm/io.h
@@ -150,7 +150,7 @@ static inline void writel(unsigned int v, volatile void __iomem *addr)
150#define page_to_bus(page) (page_to_phys(page)) 150#define page_to_bus(page) (page_to_phys(page))
151#define bus_to_virt(addr) (phys_to_virt(addr)) 151#define bus_to_virt(addr) (phys_to_virt(addr))
152 152
153extern void iounmap(void *addr); 153extern void iounmap(void __iomem *addr);
154/*extern void *__ioremap(phys_addr_t address, unsigned long size, 154/*extern void *__ioremap(phys_addr_t address, unsigned long size,
155 unsigned long flags);*/ 155 unsigned long flags);*/
156extern void __iomem *ioremap(phys_addr_t address, unsigned long size); 156extern void __iomem *ioremap(phys_addr_t address, unsigned long size);
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
18static inline void __enable_icache_msr(void) 18static 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
25static inline void __disable_icache_msr(void) 25static 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
32static inline void __enable_dcache_msr(void) 32static 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
41static inline void __disable_dcache_msr(void) 39static 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
50static inline void __enable_icache_nomsr(void) 46static 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
62static inline void __disable_icache_nomsr(void) 56static 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
74static inline void __enable_dcache_nomsr(void) 66static 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
86static inline void __disable_dcache_nomsr(void) 76static 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
621void microblaze_cache_init(void) 608void 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
33void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu) 33void 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
198static int __init dma_init(void) 198static 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}
204fs_initcall(dma_init); 204fs_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 */
144struct kgdb_arch arch_kgdb_ops = { 144const 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
21void show_regs(struct pt_regs *regs) 21void 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. */
46static microblaze_reg_t *reg_save_addr(unsigned reg_offs, 46static 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}
220device_initcall(debugfs_tlb); 224device_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
19void save_stack_trace(struct stack_trace *trace) 19void 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
37asmlinkage long sys_mmap(unsigned long addr, unsigned long len, 36asmlinkage 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
27static int __init kstack_setup(char *s) 27static 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>
diff --git a/arch/microblaze/lib/ashldi3.c b/arch/microblaze/lib/ashldi3.c
index beb80f316095..1af904cd972d 100644
--- a/arch/microblaze/lib/ashldi3.c
+++ b/arch/microblaze/lib/ashldi3.c
@@ -1,4 +1,4 @@
1#include <linux/module.h> 1#include <linux/export.h>
2 2
3#include "libgcc.h" 3#include "libgcc.h"
4 4
@@ -25,5 +25,4 @@ long long __ashldi3(long long u, word_type b)
25 25
26 return w.ll; 26 return w.ll;
27} 27}
28
29EXPORT_SYMBOL(__ashldi3); 28EXPORT_SYMBOL(__ashldi3);
diff --git a/arch/microblaze/lib/ashrdi3.c b/arch/microblaze/lib/ashrdi3.c
index c884a912b660..32c334c05d04 100644
--- a/arch/microblaze/lib/ashrdi3.c
+++ b/arch/microblaze/lib/ashrdi3.c
@@ -1,4 +1,4 @@
1#include <linux/module.h> 1#include <linux/export.h>
2 2
3#include "libgcc.h" 3#include "libgcc.h"
4 4
@@ -27,5 +27,4 @@ long long __ashrdi3(long long u, word_type b)
27 27
28 return w.ll; 28 return w.ll;
29} 29}
30
31EXPORT_SYMBOL(__ashrdi3); 30EXPORT_SYMBOL(__ashrdi3);
diff --git a/arch/microblaze/lib/cmpdi2.c b/arch/microblaze/lib/cmpdi2.c
index a708400ea7b7..67abc9ac1bd4 100644
--- a/arch/microblaze/lib/cmpdi2.c
+++ b/arch/microblaze/lib/cmpdi2.c
@@ -1,4 +1,4 @@
1#include <linux/module.h> 1#include <linux/export.h>
2 2
3#include "libgcc.h" 3#include "libgcc.h"
4 4
diff --git a/arch/microblaze/lib/lshrdi3.c b/arch/microblaze/lib/lshrdi3.c
index dcf8d6810b7c..adcb253f11c8 100644
--- a/arch/microblaze/lib/lshrdi3.c
+++ b/arch/microblaze/lib/lshrdi3.c
@@ -1,4 +1,4 @@
1#include <linux/module.h> 1#include <linux/export.h>
2 2
3#include "libgcc.h" 3#include "libgcc.h"
4 4
@@ -25,5 +25,4 @@ long long __lshrdi3(long long u, word_type b)
25 25
26 return w.ll; 26 return w.ll;
27} 27}
28
29EXPORT_SYMBOL(__lshrdi3); 28EXPORT_SYMBOL(__lshrdi3);
diff --git a/arch/microblaze/lib/memcpy.c b/arch/microblaze/lib/memcpy.c
index fe9c53fafdea..f536e81b8168 100644
--- a/arch/microblaze/lib/memcpy.c
+++ b/arch/microblaze/lib/memcpy.c
@@ -24,10 +24,10 @@
24 * not any responsibility to update it. 24 * not any responsibility to update it.
25 */ 25 */
26 26
27#include <linux/export.h>
27#include <linux/types.h> 28#include <linux/types.h>
28#include <linux/stddef.h> 29#include <linux/stddef.h>
29#include <linux/compiler.h> 30#include <linux/compiler.h>
30#include <linux/module.h>
31 31
32#include <linux/string.h> 32#include <linux/string.h>
33 33
@@ -103,12 +103,12 @@ void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c)
103 } 103 }
104#else 104#else
105 /* Load the holding buffer */ 105 /* Load the holding buffer */
106 buf_hold = (*i_src++ & 0xFFFFFF00) >>8; 106 buf_hold = (*i_src++ & 0xFFFFFF00) >> 8;
107 107
108 for (; c >= 4; c -= 4) { 108 for (; c >= 4; c -= 4) {
109 value = *i_src++; 109 value = *i_src++;
110 *i_dst++ = buf_hold | ((value & 0xFF) << 24); 110 *i_dst++ = buf_hold | ((value & 0xFF) << 24);
111 buf_hold = (value & 0xFFFFFF00) >>8; 111 buf_hold = (value & 0xFFFFFF00) >> 8;
112 } 112 }
113#endif 113#endif
114 /* Realign the source */ 114 /* Realign the source */
@@ -129,12 +129,12 @@ void *memcpy(void *v_dst, const void *v_src, __kernel_size_t c)
129 } 129 }
130#else 130#else
131 /* Load the holding buffer */ 131 /* Load the holding buffer */
132 buf_hold = (*i_src++ & 0xFFFF0000 )>>16; 132 buf_hold = (*i_src++ & 0xFFFF0000) >> 16;
133 133
134 for (; c >= 4; c -= 4) { 134 for (; c >= 4; c -= 4) {
135 value = *i_src++; 135 value = *i_src++;
136 *i_dst++ = buf_hold | ((value & 0xFFFF)<<16); 136 *i_dst++ = buf_hold | ((value & 0xFFFF) << 16);
137 buf_hold = (value & 0xFFFF0000) >>16; 137 buf_hold = (value & 0xFFFF0000) >> 16;
138 } 138 }
139#endif 139#endif
140 /* Realign the source */ 140 /* Realign the source */
diff --git a/arch/microblaze/lib/memmove.c b/arch/microblaze/lib/memmove.c
index 2146c3752a80..3611ce70415b 100644
--- a/arch/microblaze/lib/memmove.c
+++ b/arch/microblaze/lib/memmove.c
@@ -24,10 +24,10 @@
24 * not any responsibility to update it. 24 * not any responsibility to update it.
25 */ 25 */
26 26
27#include <linux/export.h>
27#include <linux/types.h> 28#include <linux/types.h>
28#include <linux/stddef.h> 29#include <linux/stddef.h>
29#include <linux/compiler.h> 30#include <linux/compiler.h>
30#include <linux/module.h>
31#include <linux/string.h> 31#include <linux/string.h>
32 32
33#ifdef __HAVE_ARCH_MEMMOVE 33#ifdef __HAVE_ARCH_MEMMOVE
@@ -129,7 +129,8 @@ void *memmove(void *v_dst, const void *v_src, __kernel_size_t c)
129 129
130 for (; c >= 4; c -= 4) { 130 for (; c >= 4; c -= 4) {
131 value = *--i_src; 131 value = *--i_src;
132 *--i_dst = buf_hold | ((value & 0xFFFFFF00)>>8); 132 *--i_dst = buf_hold |
133 ((value & 0xFFFFFF00) >> 8);
133 buf_hold = (value & 0xFF) << 24; 134 buf_hold = (value & 0xFF) << 24;
134 } 135 }
135#endif 136#endif
@@ -155,7 +156,8 @@ void *memmove(void *v_dst, const void *v_src, __kernel_size_t c)
155 156
156 for (; c >= 4; c -= 4) { 157 for (; c >= 4; c -= 4) {
157 value = *--i_src; 158 value = *--i_src;
158 *--i_dst = buf_hold | ((value & 0xFFFF0000)>>16); 159 *--i_dst = buf_hold |
160 ((value & 0xFFFF0000) >> 16);
159 buf_hold = (value & 0xFFFF) << 16; 161 buf_hold = (value & 0xFFFF) << 16;
160 } 162 }
161#endif 163#endif
@@ -181,7 +183,8 @@ void *memmove(void *v_dst, const void *v_src, __kernel_size_t c)
181 183
182 for (; c >= 4; c -= 4) { 184 for (; c >= 4; c -= 4) {
183 value = *--i_src; 185 value = *--i_src;
184 *--i_dst = buf_hold | ((value & 0xFF000000)>> 24); 186 *--i_dst = buf_hold |
187 ((value & 0xFF000000) >> 24);
185 buf_hold = (value & 0xFFFFFF) << 8; 188 buf_hold = (value & 0xFFFFFF) << 8;
186 } 189 }
187#endif 190#endif
diff --git a/arch/microblaze/lib/memset.c b/arch/microblaze/lib/memset.c
index ddf67939576d..04ea72c8a81d 100644
--- a/arch/microblaze/lib/memset.c
+++ b/arch/microblaze/lib/memset.c
@@ -24,10 +24,10 @@
24 * not any responsibility to update it. 24 * not any responsibility to update it.
25 */ 25 */
26 26
27#include <linux/export.h>
27#include <linux/types.h> 28#include <linux/types.h>
28#include <linux/stddef.h> 29#include <linux/stddef.h>
29#include <linux/compiler.h> 30#include <linux/compiler.h>
30#include <linux/module.h>
31#include <linux/string.h> 31#include <linux/string.h>
32 32
33#ifdef __HAVE_ARCH_MEMSET 33#ifdef __HAVE_ARCH_MEMSET
diff --git a/arch/microblaze/lib/muldi3.c b/arch/microblaze/lib/muldi3.c
index d3659244ab6f..a3f9a03acdcd 100644
--- a/arch/microblaze/lib/muldi3.c
+++ b/arch/microblaze/lib/muldi3.c
@@ -1,4 +1,4 @@
1#include <linux/module.h> 1#include <linux/export.h>
2 2
3#include "libgcc.h" 3#include "libgcc.h"
4 4
diff --git a/arch/microblaze/lib/uaccess_old.S b/arch/microblaze/lib/uaccess_old.S
index f085995ee848..0e8cc2710c27 100644
--- a/arch/microblaze/lib/uaccess_old.S
+++ b/arch/microblaze/lib/uaccess_old.S
@@ -38,15 +38,14 @@ __strncpy_user:
38 addik r3,r7,0 /* temp_count = len */ 38 addik r3,r7,0 /* temp_count = len */
391: 391:
40 lbu r4,r6,r0 40 lbu r4,r6,r0
41 beqid r4,2f
41 sb r4,r5,r0 42 sb r4,r5,r0
42 43
43 addik r3,r3,-1
44 beqi r3,2f /* break on len */
45
46 addik r5,r5,1 44 addik r5,r5,1
47 bneid r4,1b
48 addik r6,r6,1 /* delay slot */ 45 addik r6,r6,1 /* delay slot */
49 addik r3,r3,1 /* undo "temp_count--" */ 46
47 addik r3,r3,-1
48 bnei r3,1b /* break on len */
502: 492:
51 rsubk r3,r3,r7 /* temp_count = len - temp_count */ 50 rsubk r3,r3,r7 /* temp_count = len - temp_count */
523: 513:
diff --git a/arch/microblaze/lib/ucmpdi2.c b/arch/microblaze/lib/ucmpdi2.c
index 63ca105b6713..d05f1585121c 100644
--- a/arch/microblaze/lib/ucmpdi2.c
+++ b/arch/microblaze/lib/ucmpdi2.c
@@ -1,4 +1,4 @@
1#include <linux/module.h> 1#include <linux/export.h>
2 2
3#include "libgcc.h" 3#include "libgcc.h"
4 4
diff --git a/arch/microblaze/mm/consistent.c b/arch/microblaze/mm/consistent.c
index a1e2e18e0961..5226b09cbbb2 100644
--- a/arch/microblaze/mm/consistent.c
+++ b/arch/microblaze/mm/consistent.c
@@ -13,7 +13,7 @@
13 * published by the Free Software Foundation. 13 * published by the Free Software Foundation.
14 */ 14 */
15 15
16#include <linux/module.h> 16#include <linux/export.h>
17#include <linux/signal.h> 17#include <linux/signal.h>
18#include <linux/sched.h> 18#include <linux/sched.h>
19#include <linux/kernel.h> 19#include <linux/kernel.h>
@@ -37,7 +37,7 @@
37#include <asm/pgalloc.h> 37#include <asm/pgalloc.h>
38#include <linux/io.h> 38#include <linux/io.h>
39#include <linux/hardirq.h> 39#include <linux/hardirq.h>
40#include <asm/mmu_context.h> 40#include <linux/mmu_context.h>
41#include <asm/mmu.h> 41#include <asm/mmu.h>
42#include <linux/uaccess.h> 42#include <linux/uaccess.h>
43#include <asm/pgtable.h> 43#include <asm/pgtable.h>
@@ -102,8 +102,7 @@ void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *dma_handle)
102# endif 102# endif
103 if ((unsigned int)ret > cpuinfo.dcache_base && 103 if ((unsigned int)ret > cpuinfo.dcache_base &&
104 (unsigned int)ret < cpuinfo.dcache_high) 104 (unsigned int)ret < cpuinfo.dcache_high)
105 printk(KERN_WARNING 105 pr_warn("ERROR: Your cache coherent area is CACHED!!!\n");
106 "ERROR: Your cache coherent area is CACHED!!!\n");
107 106
108 /* dma_handle is same as physical (shadowed) address */ 107 /* dma_handle is same as physical (shadowed) address */
109 *dma_handle = (dma_addr_t)ret; 108 *dma_handle = (dma_addr_t)ret;
diff --git a/arch/microblaze/mm/fault.c b/arch/microblaze/mm/fault.c
index 714b35a9c4f7..731f739d17a1 100644
--- a/arch/microblaze/mm/fault.c
+++ b/arch/microblaze/mm/fault.c
@@ -32,7 +32,7 @@
32#include <asm/page.h> 32#include <asm/page.h>
33#include <asm/pgtable.h> 33#include <asm/pgtable.h>
34#include <asm/mmu.h> 34#include <asm/mmu.h>
35#include <asm/mmu_context.h> 35#include <linux/mmu_context.h>
36#include <linux/uaccess.h> 36#include <linux/uaccess.h>
37#include <asm/exceptions.h> 37#include <asm/exceptions.h>
38 38
@@ -100,7 +100,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
100 100
101 /* On a kernel SLB miss we can only check for a valid exception entry */ 101 /* On a kernel SLB miss we can only check for a valid exception entry */
102 if (unlikely(kernel_mode(regs) && (address >= TASK_SIZE))) { 102 if (unlikely(kernel_mode(regs) && (address >= TASK_SIZE))) {
103 printk(KERN_WARNING "kernel task_size exceed"); 103 pr_warn("kernel task_size exceed");
104 _exception(SIGSEGV, regs, code, address); 104 _exception(SIGSEGV, regs, code, address);
105 } 105 }
106 106
@@ -114,9 +114,9 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
114 114
115 /* in_atomic() in user mode is really bad, 115 /* in_atomic() in user mode is really bad,
116 as is current->mm == NULL. */ 116 as is current->mm == NULL. */
117 printk(KERN_EMERG "Page fault in user mode with " 117 pr_emerg("Page fault in user mode with in_atomic(), mm = %p\n",
118 "in_atomic(), mm = %p\n", mm); 118 mm);
119 printk(KERN_EMERG "r15 = %lx MSR = %lx\n", 119 pr_emerg("r15 = %lx MSR = %lx\n",
120 regs->r15, regs->msr); 120 regs->r15, regs->msr);
121 die("Weird page fault", regs, SIGSEGV); 121 die("Weird page fault", regs, SIGSEGV);
122 } 122 }
diff --git a/arch/microblaze/mm/highmem.c b/arch/microblaze/mm/highmem.c
index 7d78838e8bfa..5a92576fad92 100644
--- a/arch/microblaze/mm/highmem.c
+++ b/arch/microblaze/mm/highmem.c
@@ -20,8 +20,8 @@
20 * highmem.h by Benjamin Herrenschmidt (c) 2009 IBM Corp. 20 * highmem.h by Benjamin Herrenschmidt (c) 2009 IBM Corp.
21 */ 21 */
22 22
23#include <linux/export.h>
23#include <linux/highmem.h> 24#include <linux/highmem.h>
24#include <linux/module.h>
25 25
26/* 26/*
27 * The use of kmap_atomic/kunmap_atomic is discouraged - kmap/kunmap 27 * The use of kmap_atomic/kunmap_atomic is discouraged - kmap/kunmap
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index ce80823051ba..8f8b367c079e 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -89,7 +89,7 @@ static unsigned long highmem_setup(void)
89 reservedpages++; 89 reservedpages++;
90 } 90 }
91 totalram_pages += totalhigh_pages; 91 totalram_pages += totalhigh_pages;
92 printk(KERN_INFO "High memory: %luk\n", 92 pr_info("High memory: %luk\n",
93 totalhigh_pages << (PAGE_SHIFT-10)); 93 totalhigh_pages << (PAGE_SHIFT-10));
94 94
95 return reservedpages; 95 return reservedpages;
@@ -142,8 +142,8 @@ void __init setup_memory(void)
142 ((u32)_text <= (memory_start + lowmem_size - 1))) { 142 ((u32)_text <= (memory_start + lowmem_size - 1))) {
143 memory_size = lowmem_size; 143 memory_size = lowmem_size;
144 PAGE_OFFSET = memory_start; 144 PAGE_OFFSET = memory_start;
145 printk(KERN_INFO "%s: Main mem: 0x%x, " 145 pr_info("%s: Main mem: 0x%x, size 0x%08x\n",
146 "size 0x%08x\n", __func__, (u32) memory_start, 146 __func__, (u32) memory_start,
147 (u32) memory_size); 147 (u32) memory_size);
148 break; 148 break;
149 } 149 }
@@ -158,7 +158,7 @@ void __init setup_memory(void)
158 kernel_align_start = PAGE_DOWN((u32)_text); 158 kernel_align_start = PAGE_DOWN((u32)_text);
159 /* ALIGN can be remove because _end in vmlinux.lds.S is align */ 159 /* ALIGN can be remove because _end in vmlinux.lds.S is align */
160 kernel_align_size = PAGE_UP((u32)klimit) - kernel_align_start; 160 kernel_align_size = PAGE_UP((u32)klimit) - kernel_align_start;
161 printk(KERN_INFO "%s: kernel addr:0x%08x-0x%08x size=0x%08x\n", 161 pr_info("%s: kernel addr:0x%08x-0x%08x size=0x%08x\n",
162 __func__, kernel_align_start, kernel_align_start 162 __func__, kernel_align_start, kernel_align_start
163 + kernel_align_size, kernel_align_size); 163 + kernel_align_size, kernel_align_size);
164 memblock_reserve(kernel_align_start, kernel_align_size); 164 memblock_reserve(kernel_align_start, kernel_align_size);
@@ -181,10 +181,10 @@ void __init setup_memory(void)
181 max_low_pfn = ((u64)memory_start + (u64)lowmem_size) >> PAGE_SHIFT; 181 max_low_pfn = ((u64)memory_start + (u64)lowmem_size) >> PAGE_SHIFT;
182 max_pfn = ((u64)memory_start + (u64)memory_size) >> PAGE_SHIFT; 182 max_pfn = ((u64)memory_start + (u64)memory_size) >> PAGE_SHIFT;
183 183
184 printk(KERN_INFO "%s: max_mapnr: %#lx\n", __func__, max_mapnr); 184 pr_info("%s: max_mapnr: %#lx\n", __func__, max_mapnr);
185 printk(KERN_INFO "%s: min_low_pfn: %#lx\n", __func__, min_low_pfn); 185 pr_info("%s: min_low_pfn: %#lx\n", __func__, min_low_pfn);
186 printk(KERN_INFO "%s: max_low_pfn: %#lx\n", __func__, max_low_pfn); 186 pr_info("%s: max_low_pfn: %#lx\n", __func__, max_low_pfn);
187 printk(KERN_INFO "%s: max_pfn: %#lx\n", __func__, max_pfn); 187 pr_info("%s: max_pfn: %#lx\n", __func__, max_pfn);
188 188
189 /* 189 /*
190 * Find an area to use for the bootmem bitmap. 190 * Find an area to use for the bootmem bitmap.
@@ -246,7 +246,7 @@ void free_init_pages(char *what, unsigned long begin, unsigned long end)
246 free_page(addr); 246 free_page(addr);
247 totalram_pages++; 247 totalram_pages++;
248 } 248 }
249 printk(KERN_INFO "Freeing %s: %ldk freed\n", what, (end - begin) >> 10); 249 pr_info("Freeing %s: %ldk freed\n", what, (end - begin) >> 10);
250} 250}
251 251
252#ifdef CONFIG_BLK_DEV_INITRD 252#ifdef CONFIG_BLK_DEV_INITRD
@@ -260,7 +260,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
260 totalram_pages++; 260 totalram_pages++;
261 pages++; 261 pages++;
262 } 262 }
263 printk(KERN_NOTICE "Freeing initrd memory: %dk freed\n", 263 pr_notice("Freeing initrd memory: %dk freed\n",
264 (int)(pages * (PAGE_SIZE / 1024))); 264 (int)(pages * (PAGE_SIZE / 1024)));
265} 265}
266#endif 266#endif
@@ -304,11 +304,11 @@ void __init mem_init(void)
304 initsize = (unsigned long)&__init_end - (unsigned long)&__init_begin; 304 initsize = (unsigned long)&__init_end - (unsigned long)&__init_begin;
305 bsssize = (unsigned long)&__bss_stop - (unsigned long)&__bss_start; 305 bsssize = (unsigned long)&__bss_stop - (unsigned long)&__bss_start;
306 306
307 pr_info("Memory: %luk/%luk available (%luk kernel code, " 307 pr_info("Memory: %luk/%luk available (%luk kernel code, ",
308 "%luk reserved, %luk data, %luk bss, %luk init)\n",
309 nr_free_pages() << (PAGE_SHIFT-10), 308 nr_free_pages() << (PAGE_SHIFT-10),
310 num_physpages << (PAGE_SHIFT-10), 309 num_physpages << (PAGE_SHIFT-10),
311 codesize >> 10, 310 codesize >> 10);
311 pr_cont("%luk reserved, %luk data, %luk bss, %luk init)\n",
312 reservedpages << (PAGE_SHIFT-10), 312 reservedpages << (PAGE_SHIFT-10),
313 datasize >> 10, 313 datasize >> 10,
314 bsssize >> 10, 314 bsssize >> 10,
@@ -394,17 +394,17 @@ asmlinkage void __init mmu_init(void)
394 unsigned int kstart, ksize; 394 unsigned int kstart, ksize;
395 395
396 if (!memblock.reserved.cnt) { 396 if (!memblock.reserved.cnt) {
397 printk(KERN_EMERG "Error memory count\n"); 397 pr_emerg("Error memory count\n");
398 machine_restart(NULL); 398 machine_restart(NULL);
399 } 399 }
400 400
401 if ((u32) memblock.memory.regions[0].size < 0x400000) { 401 if ((u32) memblock.memory.regions[0].size < 0x400000) {
402 printk(KERN_EMERG "Memory must be greater than 4MB\n"); 402 pr_emerg("Memory must be greater than 4MB\n");
403 machine_restart(NULL); 403 machine_restart(NULL);
404 } 404 }
405 405
406 if ((u32) memblock.memory.regions[0].size < kernel_tlb) { 406 if ((u32) memblock.memory.regions[0].size < kernel_tlb) {
407 printk(KERN_EMERG "Kernel size is greater than memory node\n"); 407 pr_emerg("Kernel size is greater than memory node\n");
408 machine_restart(NULL); 408 machine_restart(NULL);
409 } 409 }
410 410
diff --git a/arch/microblaze/mm/pgtable.c b/arch/microblaze/mm/pgtable.c
index d1c06d07fed8..10b3bd0a980d 100644
--- a/arch/microblaze/mm/pgtable.c
+++ b/arch/microblaze/mm/pgtable.c
@@ -26,8 +26,8 @@
26 * 26 *
27 */ 27 */
28 28
29#include <linux/export.h>
29#include <linux/kernel.h> 30#include <linux/kernel.h>
30#include <linux/module.h>
31#include <linux/types.h> 31#include <linux/types.h>
32#include <linux/vmalloc.h> 32#include <linux/vmalloc.h>
33#include <linux/init.h> 33#include <linux/init.h>
@@ -39,8 +39,6 @@
39#include <asm/sections.h> 39#include <asm/sections.h>
40#include <asm/fixmap.h> 40#include <asm/fixmap.h>
41 41
42#define flush_HPTE(X, va, pg) _tlbie(va)
43
44unsigned long ioremap_base; 42unsigned long ioremap_base;
45unsigned long ioremap_bot; 43unsigned long ioremap_bot;
46EXPORT_SYMBOL(ioremap_bot); 44EXPORT_SYMBOL(ioremap_bot);
@@ -75,9 +73,8 @@ static void __iomem *__ioremap(phys_addr_t addr, unsigned long size,
75 p >= memory_start && p < virt_to_phys(high_memory) && 73 p >= memory_start && p < virt_to_phys(high_memory) &&
76 !(p >= virt_to_phys((unsigned long)&__bss_stop) && 74 !(p >= virt_to_phys((unsigned long)&__bss_stop) &&
77 p < virt_to_phys((unsigned long)__bss_stop))) { 75 p < virt_to_phys((unsigned long)__bss_stop))) {
78 printk(KERN_WARNING "__ioremap(): phys addr "PTE_FMT 76 pr_warn("__ioremap(): phys addr "PTE_FMT" is RAM lr %pf\n",
79 " is RAM lr %pf\n", (unsigned long)p, 77 (unsigned long)p, __builtin_return_address(0));
80 __builtin_return_address(0));
81 return NULL; 78 return NULL;
82 } 79 }
83 80
@@ -128,9 +125,10 @@ void __iomem *ioremap(phys_addr_t addr, unsigned long size)
128} 125}
129EXPORT_SYMBOL(ioremap); 126EXPORT_SYMBOL(ioremap);
130 127
131void iounmap(void *addr) 128void iounmap(void __iomem *addr)
132{ 129{
133 if (addr > high_memory && (unsigned long) addr < ioremap_bot) 130 if ((__force void *)addr > high_memory &&
131 (unsigned long) addr < ioremap_bot)
134 vfree((void *) (PAGE_MASK & (unsigned long) addr)); 132 vfree((void *) (PAGE_MASK & (unsigned long) addr));
135} 133}
136EXPORT_SYMBOL(iounmap); 134EXPORT_SYMBOL(iounmap);
@@ -152,8 +150,7 @@ int map_page(unsigned long va, phys_addr_t pa, int flags)
152 set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, 150 set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT,
153 __pgprot(flags))); 151 __pgprot(flags)));
154 if (unlikely(mem_init_done)) 152 if (unlikely(mem_init_done))
155 flush_HPTE(0, va, pmd_val(*pd)); 153 _tlbie(va);
156 /* flush_HPTE(0, va, pg); */
157 } 154 }
158 return err; 155 return err;
159} 156}
diff --git a/arch/microblaze/pci/indirect_pci.c b/arch/microblaze/pci/indirect_pci.c
index 4196eb6bd764..ae4fca46c9f6 100644
--- a/arch/microblaze/pci/indirect_pci.c
+++ b/arch/microblaze/pci/indirect_pci.c
@@ -15,7 +15,7 @@
15#include <linux/string.h> 15#include <linux/string.h>
16#include <linux/init.h> 16#include <linux/init.h>
17 17
18#include <asm/io.h> 18#include <linux/io.h>
19#include <asm/prom.h> 19#include <asm/prom.h>
20#include <asm/pci-bridge.h> 20#include <asm/pci-bridge.h>
21 21
diff --git a/arch/microblaze/pci/iomap.c b/arch/microblaze/pci/iomap.c
index b07abbac0319..94149f5e6ebe 100644
--- a/arch/microblaze/pci/iomap.c
+++ b/arch/microblaze/pci/iomap.c
@@ -7,7 +7,7 @@
7#include <linux/pci.h> 7#include <linux/pci.h>
8#include <linux/mm.h> 8#include <linux/mm.h>
9#include <linux/export.h> 9#include <linux/export.h>
10#include <asm/io.h> 10#include <linux/io.h>
11#include <asm/pci-bridge.h> 11#include <asm/pci-bridge.h>
12 12
13void pci_iounmap(struct pci_dev *dev, void __iomem *addr) 13void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index 96416553cb36..9ea521e4959e 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -30,10 +30,11 @@
30#include <linux/of.h> 30#include <linux/of.h>
31#include <linux/of_address.h> 31#include <linux/of_address.h>
32#include <linux/of_pci.h> 32#include <linux/of_pci.h>
33#include <linux/pci.h>
33#include <linux/export.h> 34#include <linux/export.h>
34 35
35#include <asm/processor.h> 36#include <asm/processor.h>
36#include <asm/io.h> 37#include <linux/io.h>
37#include <asm/pci-bridge.h> 38#include <asm/pci-bridge.h>
38#include <asm/byteorder.h> 39#include <asm/byteorder.h>
39 40
@@ -552,11 +553,10 @@ int pci_mmap_legacy_page_range(struct pci_bus *bus,
552 */ 553 */
553 if ((offset + size) > hose->isa_mem_size) { 554 if ((offset + size) > hose->isa_mem_size) {
554#ifdef CONFIG_MMU 555#ifdef CONFIG_MMU
555 printk(KERN_DEBUG 556 pr_debug("Process %s (pid:%d) mapped non-existing PCI",
556 "Process %s (pid:%d) mapped non-existing PCI" 557 current->comm, current->pid);
557 "legacy memory for 0%04x:%02x\n", 558 pr_debug("legacy memory for 0%04x:%02x\n",
558 current->comm, current->pid, pci_domain_nr(bus), 559 pci_domain_nr(bus), bus->number);
559 bus->number);
560#endif 560#endif
561 if (vma->vm_flags & VM_SHARED) 561 if (vma->vm_flags & VM_SHARED)
562 return shmem_zero_setup(vma); 562 return shmem_zero_setup(vma);
@@ -564,7 +564,7 @@ int pci_mmap_legacy_page_range(struct pci_bus *bus,
564 } 564 }
565 offset += hose->isa_mem_phys; 565 offset += hose->isa_mem_phys;
566 } else { 566 } else {
567 unsigned long io_offset = (unsigned long)hose->io_base_virt - \ 567 unsigned long io_offset = (unsigned long)hose->io_base_virt -
568 _IO_BASE; 568 _IO_BASE;
569 unsigned long roffset = offset + io_offset; 569 unsigned long roffset = offset + io_offset;
570 rp = &hose->io_resource; 570 rp = &hose->io_resource;
@@ -668,7 +668,7 @@ void pci_process_bridge_OF_ranges(struct pci_controller *hose,
668 unsigned long long isa_mb = 0; 668 unsigned long long isa_mb = 0;
669 struct resource *res; 669 struct resource *res;
670 670
671 printk(KERN_INFO "PCI host bridge %s %s ranges:\n", 671 pr_info("PCI host bridge %s %s ranges:\n",
672 dev->full_name, primary ? "(primary)" : ""); 672 dev->full_name, primary ? "(primary)" : "");
673 673
674 /* Get ranges property */ 674 /* Get ranges property */
@@ -685,9 +685,10 @@ void pci_process_bridge_OF_ranges(struct pci_controller *hose,
685 cpu_addr = of_translate_address(dev, ranges + 3); 685 cpu_addr = of_translate_address(dev, ranges + 3);
686 size = of_read_number(ranges + pna + 3, 2); 686 size = of_read_number(ranges + pna + 3, 2);
687 687
688 pr_debug("pci_space: 0x%08x pci_addr:0x%016llx " 688 pr_debug("pci_space: 0x%08x pci_addr:0x%016llx ",
689 "cpu_addr:0x%016llx size:0x%016llx\n", 689 pci_space, pci_addr);
690 pci_space, pci_addr, cpu_addr, size); 690 pr_debug("cpu_addr:0x%016llx size:0x%016llx\n",
691 cpu_addr, size);
691 692
692 ranges += np; 693 ranges += np;
693 694
@@ -716,14 +717,12 @@ void pci_process_bridge_OF_ranges(struct pci_controller *hose,
716 res = NULL; 717 res = NULL;
717 switch ((pci_space >> 24) & 0x3) { 718 switch ((pci_space >> 24) & 0x3) {
718 case 1: /* PCI IO space */ 719 case 1: /* PCI IO space */
719 printk(KERN_INFO 720 pr_info(" IO 0x%016llx..0x%016llx -> 0x%016llx\n",
720 " IO 0x%016llx..0x%016llx -> 0x%016llx\n",
721 cpu_addr, cpu_addr + size - 1, pci_addr); 721 cpu_addr, cpu_addr + size - 1, pci_addr);
722 722
723 /* We support only one IO range */ 723 /* We support only one IO range */
724 if (hose->pci_io_size) { 724 if (hose->pci_io_size) {
725 printk(KERN_INFO 725 pr_info(" \\--> Skipped (too many) !\n");
726 " \\--> Skipped (too many) !\n");
727 continue; 726 continue;
728 } 727 }
729 /* On 32 bits, limit I/O space to 16MB */ 728 /* On 32 bits, limit I/O space to 16MB */
@@ -750,15 +749,13 @@ void pci_process_bridge_OF_ranges(struct pci_controller *hose,
750 break; 749 break;
751 case 2: /* PCI Memory space */ 750 case 2: /* PCI Memory space */
752 case 3: /* PCI 64 bits Memory space */ 751 case 3: /* PCI 64 bits Memory space */
753 printk(KERN_INFO 752 pr_info(" MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n",
754 " MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n",
755 cpu_addr, cpu_addr + size - 1, pci_addr, 753 cpu_addr, cpu_addr + size - 1, pci_addr,
756 (pci_space & 0x40000000) ? "Prefetch" : ""); 754 (pci_space & 0x40000000) ? "Prefetch" : "");
757 755
758 /* We support only 3 memory ranges */ 756 /* We support only 3 memory ranges */
759 if (memno >= 3) { 757 if (memno >= 3) {
760 printk(KERN_INFO 758 pr_info(" \\--> Skipped (too many) !\n");
761 " \\--> Skipped (too many) !\n");
762 continue; 759 continue;
763 } 760 }
764 /* Handles ISA memory hole space here */ 761 /* Handles ISA memory hole space here */
@@ -781,8 +778,7 @@ void pci_process_bridge_OF_ranges(struct pci_controller *hose,
781 hose->pci_mem_offset = cpu_addr - pci_addr; 778 hose->pci_mem_offset = cpu_addr - pci_addr;
782 else if (pci_addr != 0 && 779 else if (pci_addr != 0 &&
783 hose->pci_mem_offset != cpu_addr - pci_addr) { 780 hose->pci_mem_offset != cpu_addr - pci_addr) {
784 printk(KERN_INFO 781 pr_info(" \\--> Skipped (offset mismatch) !\n");
785 " \\--> Skipped (offset mismatch) !\n");
786 continue; 782 continue;
787 } 783 }
788 784
@@ -809,7 +805,7 @@ void pci_process_bridge_OF_ranges(struct pci_controller *hose,
809 */ 805 */
810 if (isa_hole >= 0 && hose->pci_mem_offset != isa_mb) { 806 if (isa_hole >= 0 && hose->pci_mem_offset != isa_mb) {
811 unsigned int next = isa_hole + 1; 807 unsigned int next = isa_hole + 1;
812 printk(KERN_INFO " Removing ISA hole at 0x%016llx\n", isa_mb); 808 pr_info(" Removing ISA hole at 0x%016llx\n", isa_mb);
813 if (next < memno) 809 if (next < memno)
814 memmove(&hose->mem_resources[isa_hole], 810 memmove(&hose->mem_resources[isa_hole],
815 &hose->mem_resources[next], 811 &hose->mem_resources[next],
@@ -833,7 +829,7 @@ static void pcibios_fixup_resources(struct pci_dev *dev)
833 int i; 829 int i;
834 830
835 if (!hose) { 831 if (!hose) {
836 printk(KERN_ERR "No host bridge for PCI dev %s !\n", 832 pr_err("No host bridge for PCI dev %s !\n",
837 pci_name(dev)); 833 pci_name(dev));
838 return; 834 return;
839 } 835 }
@@ -842,12 +838,12 @@ static void pcibios_fixup_resources(struct pci_dev *dev)
842 if (!res->flags) 838 if (!res->flags)
843 continue; 839 continue;
844 if (res->start == 0) { 840 if (res->start == 0) {
845 pr_debug("PCI:%s Resource %d %016llx-%016llx [%x]" \ 841 pr_debug("PCI:%s Resource %d %016llx-%016llx [%x]",
846 "is unassigned\n",
847 pci_name(dev), i, 842 pci_name(dev), i,
848 (unsigned long long)res->start, 843 (unsigned long long)res->start,
849 (unsigned long long)res->end, 844 (unsigned long long)res->end,
850 (unsigned int)res->flags); 845 (unsigned int)res->flags);
846 pr_debug("is unassigned\n");
851 res->end -= res->start; 847 res->end -= res->start;
852 res->start = 0; 848 res->start = 0;
853 res->flags |= IORESOURCE_UNSET; 849 res->flags |= IORESOURCE_UNSET;
@@ -856,7 +852,7 @@ static void pcibios_fixup_resources(struct pci_dev *dev)
856 852
857 pr_debug("PCI:%s Resource %d %016llx-%016llx [%x]\n", 853 pr_debug("PCI:%s Resource %d %016llx-%016llx [%x]\n",
858 pci_name(dev), i, 854 pci_name(dev), i,
859 (unsigned long long)res->start,\ 855 (unsigned long long)res->start,
860 (unsigned long long)res->end, 856 (unsigned long long)res->end,
861 (unsigned int)res->flags); 857 (unsigned int)res->flags);
862 } 858 }
@@ -947,7 +943,7 @@ static void pcibios_fixup_bridge(struct pci_bus *bus)
947 943
948 pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n", 944 pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n",
949 pci_name(dev), i, 945 pci_name(dev), i,
950 (unsigned long long)res->start,\ 946 (unsigned long long)res->start,
951 (unsigned long long)res->end, 947 (unsigned long long)res->end,
952 (unsigned int)res->flags); 948 (unsigned int)res->flags);
953 949
@@ -1154,12 +1150,12 @@ static void pcibios_allocate_bus_resources(struct pci_bus *bus)
1154 } 1150 }
1155 } 1151 }
1156 1152
1157 pr_debug("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx " 1153 pr_debug("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx ",
1158 "[0x%x], parent %p (%s)\n",
1159 bus->self ? pci_name(bus->self) : "PHB", 1154 bus->self ? pci_name(bus->self) : "PHB",
1160 bus->number, i, 1155 bus->number, i,
1161 (unsigned long long)res->start, 1156 (unsigned long long)res->start,
1162 (unsigned long long)res->end, 1157 (unsigned long long)res->end);
1158 pr_debug("[0x%x], parent %p (%s)\n",
1163 (unsigned int)res->flags, 1159 (unsigned int)res->flags,
1164 pr, (pr && pr->name) ? pr->name : "nil"); 1160 pr, (pr && pr->name) ? pr->name : "nil");
1165 1161
@@ -1174,9 +1170,8 @@ static void pcibios_allocate_bus_resources(struct pci_bus *bus)
1174 if (reparent_resources(pr, res) == 0) 1170 if (reparent_resources(pr, res) == 0)
1175 continue; 1171 continue;
1176 } 1172 }
1177 printk(KERN_WARNING "PCI: Cannot allocate resource region " 1173 pr_warn("PCI: Cannot allocate resource region ");
1178 "%d of PCI bridge %d, will remap\n", i, bus->number); 1174 pr_cont("%d of PCI bridge %d, will remap\n", i, bus->number);
1179
1180 res->start = res->end = 0; 1175 res->start = res->end = 0;
1181 res->flags = 0; 1176 res->flags = 0;
1182 } 1177 }
@@ -1198,8 +1193,8 @@ static inline void alloc_resource(struct pci_dev *dev, int idx)
1198 pr = pci_find_parent_resource(dev, r); 1193 pr = pci_find_parent_resource(dev, r);
1199 if (!pr || (pr->flags & IORESOURCE_UNSET) || 1194 if (!pr || (pr->flags & IORESOURCE_UNSET) ||
1200 request_resource(pr, r) < 0) { 1195 request_resource(pr, r) < 0) {
1201 printk(KERN_WARNING "PCI: Cannot allocate resource region %d" 1196 pr_warn("PCI: Cannot allocate resource region %d ", idx);
1202 " of device %s, will remap\n", idx, pci_name(dev)); 1197 pr_cont("of device %s, will remap\n", pci_name(dev));
1203 if (pr) 1198 if (pr)
1204 pr_debug("PCI: parent is %p: %016llx-%016llx [%x]\n", 1199 pr_debug("PCI: parent is %p: %016llx-%016llx [%x]\n",
1205 pr, 1200 pr,
@@ -1282,8 +1277,7 @@ static void __init pcibios_reserve_legacy_regions(struct pci_bus *bus)
1282 res->end = (offset + 0xfff) & 0xfffffffful; 1277 res->end = (offset + 0xfff) & 0xfffffffful;
1283 pr_debug("Candidate legacy IO: %pR\n", res); 1278 pr_debug("Candidate legacy IO: %pR\n", res);
1284 if (request_resource(&hose->io_resource, res)) { 1279 if (request_resource(&hose->io_resource, res)) {
1285 printk(KERN_DEBUG 1280 pr_debug("PCI %04x:%02x Cannot reserve Legacy IO %pR\n",
1286 "PCI %04x:%02x Cannot reserve Legacy IO %pR\n",
1287 pci_domain_nr(bus), bus->number, res); 1281 pci_domain_nr(bus), bus->number, res);
1288 kfree(res); 1282 kfree(res);
1289 } 1283 }
@@ -1311,8 +1305,7 @@ static void __init pcibios_reserve_legacy_regions(struct pci_bus *bus)
1311 res->end = 0xbffff + offset; 1305 res->end = 0xbffff + offset;
1312 pr_debug("Candidate VGA memory: %pR\n", res); 1306 pr_debug("Candidate VGA memory: %pR\n", res);
1313 if (request_resource(pres, res)) { 1307 if (request_resource(pres, res)) {
1314 printk(KERN_DEBUG 1308 pr_debug("PCI %04x:%02x Cannot reserve VGA memory %pR\n",
1315 "PCI %04x:%02x Cannot reserve VGA memory %pR\n",
1316 pci_domain_nr(bus), bus->number, res); 1309 pci_domain_nr(bus), bus->number, res);
1317 kfree(res); 1310 kfree(res);
1318 } 1311 }
@@ -1362,10 +1355,9 @@ void pcibios_claim_one_bus(struct pci_bus *bus)
1362 if (r->parent || !r->start || !r->flags) 1355 if (r->parent || !r->start || !r->flags)
1363 continue; 1356 continue;
1364 1357
1365 pr_debug("PCI: Claiming %s: " 1358 pr_debug("PCI: Claiming %s: ", pci_name(dev));
1366 "Resource %d: %016llx..%016llx [%x]\n", 1359 pr_debug("Resource %d: %016llx..%016llx [%x]\n",
1367 pci_name(dev), i, 1360 i, (unsigned long long)r->start,
1368 (unsigned long long)r->start,
1369 (unsigned long long)r->end, 1361 (unsigned long long)r->end,
1370 (unsigned int)r->flags); 1362 (unsigned int)r->flags);
1371 1363
@@ -1423,9 +1415,9 @@ static void pcibios_setup_phb_resources(struct pci_controller *hose,
1423 res->end = (res->end + io_offset) & 0xffffffffu; 1415 res->end = (res->end + io_offset) & 0xffffffffu;
1424 1416
1425 if (!res->flags) { 1417 if (!res->flags) {
1426 printk(KERN_WARNING "PCI: I/O resource not set for host" 1418 pr_warn("PCI: I/O resource not set for host ");
1427 " bridge %s (domain %d)\n", 1419 pr_cont("bridge %s (domain %d)\n",
1428 hose->dn->full_name, hose->global_number); 1420 hose->dn->full_name, hose->global_number);
1429 /* Workaround for lack of IO resource only on 32-bit */ 1421 /* Workaround for lack of IO resource only on 32-bit */
1430 res->start = (unsigned long)hose->io_base_virt - isa_io_base; 1422 res->start = (unsigned long)hose->io_base_virt - isa_io_base;
1431 res->end = res->start + IO_SPACE_LIMIT; 1423 res->end = res->start + IO_SPACE_LIMIT;
@@ -1445,9 +1437,9 @@ static void pcibios_setup_phb_resources(struct pci_controller *hose,
1445 if (!res->flags) { 1437 if (!res->flags) {
1446 if (i > 0) 1438 if (i > 0)
1447 continue; 1439 continue;
1448 printk(KERN_ERR "PCI: Memory resource 0 not set for " 1440 pr_err("PCI: Memory resource 0 not set for ");
1449 "host bridge %s (domain %d)\n", 1441 pr_cont("host bridge %s (domain %d)\n",
1450 hose->dn->full_name, hose->global_number); 1442 hose->dn->full_name, hose->global_number);
1451 1443
1452 /* Workaround for lack of MEM resource only on 32-bit */ 1444 /* Workaround for lack of MEM resource only on 32-bit */
1453 res->start = hose->pci_mem_offset; 1445 res->start = hose->pci_mem_offset;
@@ -1489,7 +1481,7 @@ static void pcibios_scan_phb(struct pci_controller *hose)
1489 bus = pci_scan_root_bus(hose->parent, hose->first_busno, 1481 bus = pci_scan_root_bus(hose->parent, hose->first_busno,
1490 hose->ops, hose, &resources); 1482 hose->ops, hose, &resources);
1491 if (bus == NULL) { 1483 if (bus == NULL) {
1492 printk(KERN_ERR "Failed to create bus for PCI domain %04x\n", 1484 pr_err("Failed to create bus for PCI domain %04x\n",
1493 hose->global_number); 1485 hose->global_number);
1494 pci_free_resource_list(&resources); 1486 pci_free_resource_list(&resources);
1495 return; 1487 return;
@@ -1505,7 +1497,7 @@ static int __init pcibios_init(void)
1505 struct pci_controller *hose, *tmp; 1497 struct pci_controller *hose, *tmp;
1506 int next_busno = 0; 1498 int next_busno = 0;
1507 1499
1508 printk(KERN_INFO "PCI: Probing PCI hardware\n"); 1500 pr_info("PCI: Probing PCI hardware\n");
1509 1501
1510 /* Scan all of the recorded PCI controllers. */ 1502 /* Scan all of the recorded PCI controllers. */
1511 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { 1503 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
@@ -1605,7 +1597,7 @@ fake_pci_bus(struct pci_controller *hose, int busnr)
1605 static struct pci_bus bus; 1597 static struct pci_bus bus;
1606 1598
1607 if (!hose) 1599 if (!hose)
1608 printk(KERN_ERR "Can't find hose for PCI bus %d!\n", busnr); 1600 pr_err("Can't find hose for PCI bus %d!\n", busnr);
1609 1601
1610 bus.number = busnr; 1602 bus.number = busnr;
1611 bus.sysdata = hose; 1603 bus.sysdata = hose;
diff --git a/arch/microblaze/pci/xilinx_pci.c b/arch/microblaze/pci/xilinx_pci.c
index 0687a42a5bd4..14c7da5fd039 100644
--- a/arch/microblaze/pci/xilinx_pci.c
+++ b/arch/microblaze/pci/xilinx_pci.c
@@ -18,7 +18,7 @@
18#include <linux/of.h> 18#include <linux/of.h>
19#include <linux/of_address.h> 19#include <linux/of_address.h>
20#include <linux/pci.h> 20#include <linux/pci.h>
21#include <asm/io.h> 21#include <linux/io.h>
22 22
23#define XPLB_PCI_ADDR 0x10c 23#define XPLB_PCI_ADDR 0x10c
24#define XPLB_PCI_DATA 0x110 24#define XPLB_PCI_DATA 0x110
@@ -82,7 +82,7 @@ xilinx_pci_exclude_device(struct pci_controller *hose, u_char bus, u8 devfn)
82 * 82 *
83 * List pci devices in very early phase. 83 * List pci devices in very early phase.
84 */ 84 */
85void __init xilinx_early_pci_scan(struct pci_controller *hose) 85static void __init xilinx_early_pci_scan(struct pci_controller *hose)
86{ 86{
87 u32 bus = 0; 87 u32 bus = 0;
88 u32 val, dev, func, offset; 88 u32 val, dev, func, offset;
@@ -91,27 +91,27 @@ void __init xilinx_early_pci_scan(struct pci_controller *hose)
91 for (dev = 0; dev < 2; dev++) { 91 for (dev = 0; dev < 2; dev++) {
92 /* List only first function number - up-to 8 functions */ 92 /* List only first function number - up-to 8 functions */
93 for (func = 0; func < 1; func++) { 93 for (func = 0; func < 1; func++) {
94 printk(KERN_INFO "%02x:%02x:%02x", bus, dev, func); 94 pr_info("%02x:%02x:%02x", bus, dev, func);
95 /* read the first 64 standardized bytes */ 95 /* read the first 64 standardized bytes */
96 /* Up-to 192 bytes can be list of capabilities */ 96 /* Up-to 192 bytes can be list of capabilities */
97 for (offset = 0; offset < 64; offset += 4) { 97 for (offset = 0; offset < 64; offset += 4) {
98 early_read_config_dword(hose, bus, 98 early_read_config_dword(hose, bus,
99 PCI_DEVFN(dev, func), offset, &val); 99 PCI_DEVFN(dev, func), offset, &val);
100 if (offset == 0 && val == 0xFFFFFFFF) { 100 if (offset == 0 && val == 0xFFFFFFFF) {
101 printk(KERN_CONT "\nABSENT"); 101 pr_cont("\nABSENT");
102 break; 102 break;
103 } 103 }
104 if (!(offset % 0x10)) 104 if (!(offset % 0x10))
105 printk(KERN_CONT "\n%04x: ", offset); 105 pr_cont("\n%04x: ", offset);
106 106
107 printk(KERN_CONT "%08x ", val); 107 pr_cont("%08x ", val);
108 } 108 }
109 printk(KERN_INFO "\n"); 109 pr_info("\n");
110 } 110 }
111 } 111 }
112} 112}
113#else 113#else
114void __init xilinx_early_pci_scan(struct pci_controller *hose) 114static void __init xilinx_early_pci_scan(struct pci_controller *hose)
115{ 115{
116} 116}
117#endif 117#endif
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 8e260cf01351..aba53083297d 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -239,15 +239,15 @@ static inline void outsl(unsigned long addr, const void *buffer, int count)
239#ifndef CONFIG_GENERIC_IOMAP 239#ifndef CONFIG_GENERIC_IOMAP
240#define ioread8(addr) readb(addr) 240#define ioread8(addr) readb(addr)
241#define ioread16(addr) readw(addr) 241#define ioread16(addr) readw(addr)
242#define ioread16be(addr) be16_to_cpu(ioread16(addr)) 242#define ioread16be(addr) __be16_to_cpu(__raw_readw(addr))
243#define ioread32(addr) readl(addr) 243#define ioread32(addr) readl(addr)
244#define ioread32be(addr) be32_to_cpu(ioread32(addr)) 244#define ioread32be(addr) __be32_to_cpu(__raw_readl(addr))
245 245
246#define iowrite8(v, addr) writeb((v), (addr)) 246#define iowrite8(v, addr) writeb((v), (addr))
247#define iowrite16(v, addr) writew((v), (addr)) 247#define iowrite16(v, addr) writew((v), (addr))
248#define iowrite16be(v, addr) iowrite16(be16_to_cpu(v), (addr)) 248#define iowrite16be(v, addr) __raw_writew(__cpu_to_be16(v), addr)
249#define iowrite32(v, addr) writel((v), (addr)) 249#define iowrite32(v, addr) writel((v), (addr))
250#define iowrite32be(v, addr) iowrite32(be32_to_cpu(v), (addr)) 250#define iowrite32be(v, addr) __raw_writel(__cpu_to_be32(v), addr)
251 251
252#define ioread8_rep(p, dst, count) \ 252#define ioread8_rep(p, dst, count) \
253 insb((unsigned long) (p), (dst), (count)) 253 insb((unsigned long) (p), (dst), (count))