Commit 6bd55f0bbaebb79b39e147aa864401fd0c94db82

Authored by Michal Simek
Committed by Michal Simek
1 parent 5b3084b582

microblaze: Fix coding style issues

Fix coding style issues reported by checkpatch.pl.

Signed-off-by: Michal Simek <monstr@monstr.eu>

Showing 32 changed files with 259 additions and 294 deletions Side-by-side Diff

arch/microblaze/include/asm/io.h
... ... @@ -150,7 +150,7 @@
150 150 #define page_to_bus(page) (page_to_phys(page))
151 151 #define bus_to_virt(addr) (phys_to_virt(addr))
152 152  
153   -extern void iounmap(void *addr);
  153 +extern void iounmap(void __iomem *addr);
154 154 /*extern void *__ioremap(phys_addr_t address, unsigned long size,
155 155 unsigned long flags);*/
156 156 extern void __iomem *ioremap(phys_addr_t address, unsigned long size);
arch/microblaze/kernel/cpu/cache.c
... ... @@ -17,82 +17,70 @@
17 17  
18 18 static inline void __enable_icache_msr(void)
19 19 {
20   - __asm__ __volatile__ (" msrset r0, %0; \
21   - nop; " \
  20 + __asm__ __volatile__ (" msrset r0, %0;" \
  21 + "nop;" \
22 22 : : "i" (MSR_ICE) : "memory");
23 23 }
24 24  
25 25 static inline void __disable_icache_msr(void)
26 26 {
27   - __asm__ __volatile__ (" msrclr r0, %0; \
28   - nop; " \
  27 + __asm__ __volatile__ (" msrclr r0, %0;" \
  28 + "nop;" \
29 29 : : "i" (MSR_ICE) : "memory");
30 30 }
31 31  
32 32 static inline void __enable_dcache_msr(void)
33 33 {
34   - __asm__ __volatile__ (" msrset r0, %0; \
35   - nop; " \
36   - : \
37   - : "i" (MSR_DCE) \
38   - : "memory");
  34 + __asm__ __volatile__ (" msrset r0, %0;" \
  35 + "nop;" \
  36 + : : "i" (MSR_DCE) : "memory");
39 37 }
40 38  
41 39 static inline void __disable_dcache_msr(void)
42 40 {
43   - __asm__ __volatile__ (" msrclr r0, %0; \
44   - nop; " \
45   - : \
46   - : "i" (MSR_DCE) \
47   - : "memory");
  41 + __asm__ __volatile__ (" msrclr r0, %0;" \
  42 + "nop; " \
  43 + : : "i" (MSR_DCE) : "memory");
48 44 }
49 45  
50 46 static inline void __enable_icache_nomsr(void)
51 47 {
52   - __asm__ __volatile__ (" mfs r12, rmsr; \
53   - nop; \
54   - ori r12, r12, %0; \
55   - mts rmsr, r12; \
56   - nop; " \
57   - : \
58   - : "i" (MSR_ICE) \
59   - : "memory", "r12");
  48 + __asm__ __volatile__ (" mfs r12, rmsr;" \
  49 + "nop;" \
  50 + "ori r12, r12, %0;" \
  51 + "mts rmsr, r12;" \
  52 + "nop;" \
  53 + : : "i" (MSR_ICE) : "memory", "r12");
60 54 }
61 55  
62 56 static inline void __disable_icache_nomsr(void)
63 57 {
64   - __asm__ __volatile__ (" mfs r12, rmsr; \
65   - nop; \
66   - andi r12, r12, ~%0; \
67   - mts rmsr, r12; \
68   - nop; " \
69   - : \
70   - : "i" (MSR_ICE) \
71   - : "memory", "r12");
  58 + __asm__ __volatile__ (" mfs r12, rmsr;" \
  59 + "nop;" \
  60 + "andi r12, r12, ~%0;" \
  61 + "mts rmsr, r12;" \
  62 + "nop;" \
  63 + : : "i" (MSR_ICE) : "memory", "r12");
72 64 }
73 65  
74 66 static inline void __enable_dcache_nomsr(void)
75 67 {
76   - __asm__ __volatile__ (" mfs r12, rmsr; \
77   - nop; \
78   - ori r12, r12, %0; \
79   - mts rmsr, r12; \
80   - nop; " \
81   - : \
82   - : "i" (MSR_DCE) \
83   - : "memory", "r12");
  68 + __asm__ __volatile__ (" mfs r12, rmsr;" \
  69 + "nop;" \
  70 + "ori r12, r12, %0;" \
  71 + "mts rmsr, r12;" \
  72 + "nop;" \
  73 + : : "i" (MSR_DCE) : "memory", "r12");
84 74 }
85 75  
86 76 static inline void __disable_dcache_nomsr(void)
87 77 {
88   - __asm__ __volatile__ (" mfs r12, rmsr; \
89   - nop; \
90   - andi r12, r12, ~%0; \
91   - mts rmsr, r12; \
92   - nop; " \
93   - : \
94   - : "i" (MSR_DCE) \
95   - : "memory", "r12");
  78 + __asm__ __volatile__ (" mfs r12, rmsr;" \
  79 + "nop;" \
  80 + "andi r12, r12, ~%0;" \
  81 + "mts rmsr, r12;" \
  82 + "nop;" \
  83 + : : "i" (MSR_DCE) : "memory", "r12");
96 84 }
97 85  
98 86  
... ... @@ -106,7 +94,7 @@
106 94 int align = ~(cache_line_length - 1); \
107 95 end = min(start + cache_size, end); \
108 96 start &= align; \
109   -} while (0);
  97 +} while (0)
110 98  
111 99 /*
112 100 * Helper macro to loop over the specified cache_size/line_length and
113 101  
... ... @@ -118,12 +106,12 @@
118 106 int step = -line_length; \
119 107 WARN_ON(step >= 0); \
120 108 \
121   - __asm__ __volatile__ (" 1: " #op " %0, r0; \
122   - bgtid %0, 1b; \
123   - addk %0, %0, %1; \
124   - " : : "r" (len), "r" (step) \
  109 + __asm__ __volatile__ (" 1: " #op " %0, r0;" \
  110 + "bgtid %0, 1b;" \
  111 + "addk %0, %0, %1;" \
  112 + : : "r" (len), "r" (step) \
125 113 : "memory"); \
126   -} while (0);
  114 +} while (0)
127 115  
128 116 /* Used for wdc.flush/clear which can use rB for offset which is not possible
129 117 * to use for simple wdc or wic.
130 118  
... ... @@ -142,12 +130,12 @@
142 130 count = end - start; \
143 131 WARN_ON(count < 0); \
144 132 \
145   - __asm__ __volatile__ (" 1: " #op " %0, %1; \
146   - bgtid %1, 1b; \
147   - addk %1, %1, %2; \
148   - " : : "r" (start), "r" (count), \
  133 + __asm__ __volatile__ (" 1: " #op " %0, %1;" \
  134 + "bgtid %1, 1b;" \
  135 + "addk %1, %1, %2;" \
  136 + : : "r" (start), "r" (count), \
149 137 "r" (step) : "memory"); \
150   -} while (0);
  138 +} while (0)
151 139  
152 140 /* It is used only first parameter for OP - for wic, wdc */
153 141 #define CACHE_RANGE_LOOP_1(start, end, line_length, op) \
154 142  
... ... @@ -157,13 +145,13 @@
157 145 end = ((end & align) == end) ? end - line_length : end & align; \
158 146 WARN_ON(end - start < 0); \
159 147 \
160   - __asm__ __volatile__ (" 1: " #op " %1, r0; \
161   - cmpu %0, %1, %2; \
162   - bgtid %0, 1b; \
163   - addk %1, %1, %3; \
164   - " : : "r" (temp), "r" (start), "r" (end),\
  148 + __asm__ __volatile__ (" 1: " #op " %1, r0;" \
  149 + "cmpu %0, %1, %2;" \
  150 + "bgtid %0, 1b;" \
  151 + "addk %1, %1, %3;" \
  152 + : : "r" (temp), "r" (start), "r" (end), \
165 153 "r" (line_length) : "memory"); \
166   -} while (0);
  154 +} while (0)
167 155  
168 156 #define ASM_LOOP
169 157  
... ... @@ -352,7 +340,7 @@
352 340 #endif
353 341 pr_debug("%s\n", __func__);
354 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 344 #else
357 345 for (i = 0; i < cpuinfo.dcache_size;
358 346 i += cpuinfo.dcache_line_length)
... ... @@ -361,7 +349,8 @@
361 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 354 * but can't be called on noMMU in microblaze_cache_init below
366 355 *
367 356 * MS: noMMU kernel won't boot if simple wdc is used
... ... @@ -375,7 +364,7 @@
375 364 pr_debug("%s\n", __func__);
376 365 #ifdef ASM_LOOP
377 366 CACHE_ALL_LOOP(cpuinfo.dcache_size, cpuinfo.dcache_line_length,
378   - wdc)
  367 + wdc);
379 368 #else
380 369 for (i = 0; i < cpuinfo.dcache_size;
381 370 i += cpuinfo.dcache_line_length)
382 371  
383 372  
384 373  
385 374  
386 375  
387 376  
388 377  
389 378  
390 379  
... ... @@ -616,49 +605,48 @@
616 605 #define CPUVER_7_20_A 0x0c
617 606 #define CPUVER_7_20_D 0x0f
618 607  
619   -#define INFO(s) printk(KERN_INFO "cache: " s "\n");
620   -
621 608 void microblaze_cache_init(void)
622 609 {
623 610 if (cpuinfo.use_instr & PVR2_USE_MSR_INSTR) {
624 611 if (cpuinfo.dcache_wb) {
625   - INFO("wb_msr");
  612 + pr_info("wb_msr\n");
626 613 mbc = (struct scache *)&wb_msr;
627 614 if (cpuinfo.ver_code <= CPUVER_7_20_D) {
628 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 618 } else {
632 619 if (cpuinfo.ver_code >= CPUVER_7_20_A) {
633   - INFO("wt_msr_noirq");
  620 + pr_info("wt_msr_noirq\n");
634 621 mbc = (struct scache *)&wt_msr_noirq;
635 622 } else {
636   - INFO("wt_msr");
  623 + pr_info("wt_msr\n");
637 624 mbc = (struct scache *)&wt_msr;
638 625 }
639 626 }
640 627 } else {
641 628 if (cpuinfo.dcache_wb) {
642   - INFO("wb_nomsr");
  629 + pr_info("wb_nomsr\n");
643 630 mbc = (struct scache *)&wb_nomsr;
644 631 if (cpuinfo.ver_code <= CPUVER_7_20_D) {
645 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 635 } else {
649 636 if (cpuinfo.ver_code >= CPUVER_7_20_A) {
650   - INFO("wt_nomsr_noirq");
  637 + pr_info("wt_nomsr_noirq\n");
651 638 mbc = (struct scache *)&wt_nomsr_noirq;
652 639 } else {
653   - INFO("wt_nomsr");
  640 + pr_info("wt_nomsr\n");
654 641 mbc = (struct scache *)&wt_nomsr;
655 642 }
656 643 }
657 644 }
658   -/* FIXME Invalidation is done in U-BOOT
659   - * WT cache: Data is already written to main memory
660   - * WB cache: Discard data on noMMU which caused that kernel doesn't boot
661   - */
  645 + /*
  646 + * FIXME Invalidation is done in U-BOOT
  647 + * WT cache: Data is already written to main memory
  648 + * WB cache: Discard data on noMMU which caused that kernel doesn't boot
  649 + */
662 650 /* invalidate_dcache(); */
663 651 enable_dcache();
664 652  
arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
... ... @@ -27,7 +27,7 @@
27 27 early_printk("ERROR: Microblaze " x "-different for PVR and DTS\n");
28 28 #else
29 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 31 #endif
32 32  
33 33 void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu)
34 34  
... ... @@ -38,12 +38,11 @@
38 38  
39 39 CI(ver_code, VERSION);
40 40 if (!ci->ver_code) {
41   - printk(KERN_ERR "ERROR: MB has broken PVR regs "
42   - "-> use DTS setting\n");
  41 + pr_err("ERROR: MB has broken PVR regs -> use DTS setting\n");
43 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 46 PVR_USE_PCMP_INSTR(pvr) | PVR_USE_DIV(pvr);
48 47 if (ci->use_instr != temp)
49 48 err_printk("BARREL, MSR, PCMP or DIV");
... ... @@ -59,13 +58,13 @@
59 58 err_printk("HW_FPU");
60 59 ci->use_fpu = temp;
61 60  
62   - ci->use_exc = PVR_OPCODE_0x0_ILLEGAL(pvr) |\
63   - PVR_UNALIGNED_EXCEPTION(pvr) |\
64   - PVR_ILL_OPCODE_EXCEPTION(pvr) |\
65   - PVR_IOPB_BUS_EXCEPTION(pvr) |\
66   - PVR_DOPB_BUS_EXCEPTION(pvr) |\
67   - PVR_DIV_ZERO_EXCEPTION(pvr) |\
68   - PVR_FPU_EXCEPTION(pvr) |\
  61 + ci->use_exc = PVR_OPCODE_0x0_ILLEGAL(pvr) |
  62 + PVR_UNALIGNED_EXCEPTION(pvr) |
  63 + PVR_ILL_OPCODE_EXCEPTION(pvr) |
  64 + PVR_IOPB_BUS_EXCEPTION(pvr) |
  65 + PVR_DOPB_BUS_EXCEPTION(pvr) |
  66 + PVR_DIV_ZERO_EXCEPTION(pvr) |
  67 + PVR_FPU_EXCEPTION(pvr) |
69 68 PVR_FSL_EXCEPTION(pvr);
70 69  
71 70 CI(pvr_user1, USER1);
arch/microblaze/kernel/cpu/cpuinfo.c
... ... @@ -68,32 +68,31 @@
68 68  
69 69 cpu = (struct device_node *) of_find_node_by_type(NULL, "cpu");
70 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 75 switch (cpu_has_pvr()) {
76 76 case 0:
77   - printk(KERN_WARNING
78   - "%s: No PVR support. Using static CPU info from FDT\n",
  77 + pr_warn("%s: No PVR support. Using static CPU info from FDT\n",
79 78 __func__);
80 79 set_cpuinfo_static(&cpuinfo, cpu);
81 80 break;
82 81 /* FIXME I found weird behavior with MB 7.00.a/b 7.10.a
83 82 * please do not use FULL PVR with MMU */
84 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 85 __func__);
87 86 set_cpuinfo_static(&cpuinfo, cpu);
88 87 set_cpuinfo_pvr_full(&cpuinfo, cpu);
89 88 break;
90 89 default:
91   - printk(KERN_WARNING "%s: Unsupported PVR setting\n", __func__);
  90 + pr_warn("%s: Unsupported PVR setting\n", __func__);
92 91 set_cpuinfo_static(&cpuinfo, cpu);
93 92 }
94 93  
95 94 if (cpuinfo.mmu_privins)
96   - printk(KERN_WARNING "%s: Stream instructions enabled"
  95 + pr_warn("%s: Stream instructions enabled"
97 96 " - USERSPACE CAN LOCK THIS KERNEL!\n", __func__);
98 97 }
arch/microblaze/kernel/cpu/pvr.c
... ... @@ -27,7 +27,7 @@
27 27 tmp = 0x0; /* Prevent warning about unused */ \
28 28 __asm__ __volatile__ ( \
29 29 "mfs %0, rpvr" #pvrid ";" \
30   - : "=r" (tmp) : : "memory"); \
  30 + : "=r" (tmp) : : "memory"); \
31 31 val = tmp; \
32 32 }
33 33  
arch/microblaze/kernel/dma.c
... ... @@ -11,7 +11,7 @@
11 11 #include <linux/gfp.h>
12 12 #include <linux/dma-debug.h>
13 13 #include <linux/export.h>
14   -#include <asm/bug.h>
  14 +#include <linux/bug.h>
15 15  
16 16 /*
17 17 * Generic direct DMA implementation
18 18  
... ... @@ -197,9 +197,9 @@
197 197  
198 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 204 fs_initcall(dma_init);
arch/microblaze/kernel/early_printk.c
... ... @@ -140,20 +140,20 @@
140 140 switch (version) {
141 141 #ifdef CONFIG_SERIAL_UARTLITE_CONSOLE
142 142 case UARTLITE:
143   - printk(KERN_INFO "Early console on uartlite "
144   - "at 0x%08x\n", base_addr);
  143 + pr_info("Early console on uartlite at 0x%08x\n",
  144 + base_addr);
145 145 early_console = &early_serial_uartlite_console;
146 146 break;
147 147 #endif
148 148 #ifdef CONFIG_SERIAL_8250_CONSOLE
149 149 case UART16550:
150   - printk(KERN_INFO "Early console on uart16650 "
151   - "at 0x%08x\n", base_addr);
  150 + pr_info("Early console on uart16650 at 0x%08x\n",
  151 + base_addr);
152 152 early_console = &early_serial_uart16550_console;
153 153 break;
154 154 #endif
155 155 default:
156   - printk(KERN_INFO "Unsupported early console %d\n",
  156 + pr_info("Unsupported early console %d\n",
157 157 version);
158 158 return 1;
159 159 }
160 160  
... ... @@ -171,10 +171,9 @@
171 171 {
172 172 if (!early_console_initialized || !early_console)
173 173 return;
174   - printk(KERN_INFO "early_printk_console remapping from 0x%x to ",
175   - base_addr);
  174 + pr_info("early_printk_console remapping from 0x%x to ", base_addr);
176 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 178 #ifdef CONFIG_MMU
180 179 /*
... ... @@ -197,7 +196,7 @@
197 196 {
198 197 if (!early_console_initialized || !early_console)
199 198 return;
200   - printk(KERN_WARNING "disabling early console\n");
  199 + pr_warn("disabling early console\n");
201 200 unregister_console(early_console);
202 201 early_console_initialized = 0;
203 202 }
arch/microblaze/kernel/exceptions.c
... ... @@ -40,7 +40,7 @@
40 40 {
41 41 console_verbose();
42 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 44 show_regs(fp);
45 45 spin_unlock_irq(&die_lock);
46 46 /* do_exit() should take care of panic'ing from an interrupt
47 47  
... ... @@ -61,9 +61,9 @@
61 61 {
62 62 siginfo_t info;
63 63  
64   - if (kernel_mode(regs)) {
  64 + if (kernel_mode(regs))
65 65 die("Exception in kernel mode", regs, signr);
66   - }
  66 +
67 67 info.si_signo = signr;
68 68 info.si_errno = 0;
69 69 info.si_code = code;
... ... @@ -79,8 +79,7 @@
79 79 #endif
80 80  
81 81 #if 0
82   - printk(KERN_WARNING "Exception %02x in %s mode, FSR=%08x PC=%08x " \
83   - "ESR=%08x\n",
  82 + pr_warn("Exception %02x in %s mode, FSR=%08x PC=%08x ESR=%08x\n",
84 83 type, user_mode(regs) ? "user" : "kernel", fsr,
85 84 (unsigned int) regs->pc, (unsigned int) regs->esr);
86 85 #endif
... ... @@ -92,8 +91,7 @@
92 91 _exception(SIGILL, regs, ILL_ILLOPC, addr);
93 92 return;
94 93 }
95   - printk(KERN_WARNING "Illegal opcode exception " \
96   - "in kernel mode.\n");
  94 + pr_warn("Illegal opcode exception in kernel mode.\n");
97 95 die("opcode exception", regs, SIGBUS);
98 96 break;
99 97 case MICROBLAZE_IBUS_EXCEPTION:
... ... @@ -102,8 +100,7 @@
102 100 _exception(SIGBUS, regs, BUS_ADRERR, addr);
103 101 return;
104 102 }
105   - printk(KERN_WARNING "Instruction bus error exception " \
106   - "in kernel mode.\n");
  103 + pr_warn("Instruction bus error exception in kernel mode.\n");
107 104 die("bus exception", regs, SIGBUS);
108 105 break;
109 106 case MICROBLAZE_DBUS_EXCEPTION:
... ... @@ -112,8 +109,7 @@
112 109 _exception(SIGBUS, regs, BUS_ADRERR, addr);
113 110 return;
114 111 }
115   - printk(KERN_WARNING "Data bus error exception " \
116   - "in kernel mode.\n");
  112 + pr_warn("Data bus error exception in kernel mode.\n");
117 113 die("bus exception", regs, SIGBUS);
118 114 break;
119 115 case MICROBLAZE_DIV_ZERO_EXCEPTION:
... ... @@ -122,8 +118,7 @@
122 118 _exception(SIGFPE, regs, FPE_INTDIV, addr);
123 119 return;
124 120 }
125   - printk(KERN_WARNING "Divide by zero exception " \
126   - "in kernel mode.\n");
  121 + pr_warn("Divide by zero exception in kernel mode.\n");
127 122 die("Divide by zero exception", regs, SIGBUS);
128 123 break;
129 124 case MICROBLAZE_FPU_EXCEPTION:
... ... @@ -151,8 +146,8 @@
151 146 #endif
152 147 default:
153 148 /* FIXME what to do in unexpected exception */
154   - printk(KERN_WARNING "Unexpected exception %02x "
155   - "PC=%08x in %s mode\n", type, (unsigned int) addr,
  149 + pr_warn("Unexpected exception %02x PC=%08x in %s mode\n",
  150 + type, (unsigned int) addr,
156 151 kernel_mode(regs) ? "kernel" : "user");
157 152 }
158 153 return;
arch/microblaze/kernel/ftrace.c
... ... @@ -35,18 +35,18 @@
35 35 * happen. This tool is too much intrusive to
36 36 * ignore such a protection.
37 37 */
38   - asm volatile(" 1: lwi %0, %2, 0; \
39   - 2: swi %3, %2, 0; \
40   - addik %1, r0, 0; \
41   - 3: \
42   - .section .fixup, \"ax\"; \
43   - 4: brid 3b; \
44   - addik %1, r0, 1; \
45   - .previous; \
46   - .section __ex_table,\"a\"; \
47   - .word 1b,4b; \
48   - .word 2b,4b; \
49   - .previous;" \
  38 + asm volatile(" 1: lwi %0, %2, 0;" \
  39 + "2: swi %3, %2, 0;" \
  40 + " addik %1, r0, 0;" \
  41 + "3:" \
  42 + " .section .fixup, \"ax\";" \
  43 + "4: brid 3b;" \
  44 + " addik %1, r0, 1;" \
  45 + " .previous;" \
  46 + " .section __ex_table,\"a\";" \
  47 + " .word 1b,4b;" \
  48 + " .word 2b,4b;" \
  49 + " .previous;" \
50 50 : "=&r" (old), "=r" (faulted)
51 51 : "r" (parent), "r" (return_hooker)
52 52 );
... ... @@ -81,16 +81,16 @@
81 81 {
82 82 int faulted = 0;
83 83  
84   - __asm__ __volatile__(" 1: swi %2, %1, 0; \
85   - addik %0, r0, 0; \
86   - 2: \
87   - .section .fixup, \"ax\"; \
88   - 3: brid 2b; \
89   - addik %0, r0, 1; \
90   - .previous; \
91   - .section __ex_table,\"a\"; \
92   - .word 1b,3b; \
93   - .previous;" \
  84 + __asm__ __volatile__(" 1: swi %2, %1, 0;" \
  85 + " addik %0, r0, 0;" \
  86 + "2:" \
  87 + " .section .fixup, \"ax\";" \
  88 + "3: brid 2b;" \
  89 + " addik %0, r0, 1;" \
  90 + " .previous;" \
  91 + " .section __ex_table,\"a\";" \
  92 + " .word 1b,3b;" \
  93 + " .previous;" \
94 94 : "=r" (faulted)
95 95 : "r" (addr), "r" (value)
96 96 );
arch/microblaze/kernel/heartbeat.c
... ... @@ -61,7 +61,7 @@
61 61 if (gpio) {
62 62 base_addr = be32_to_cpup(of_get_property(gpio, "reg", NULL));
63 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 66 /* GPIO is configured as output */
67 67 prop = (int *) of_get_property(gpio, "xlnx,is-bidir", NULL);
arch/microblaze/kernel/intc.c
... ... @@ -147,12 +147,12 @@
147 147 intr_mask =
148 148 be32_to_cpup(of_get_property(intc, "xlnx,kind-of-intr", NULL));
149 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 152 #ifdef CONFIG_SELFMOD_INTC
153 153 selfmod_function((int *) arr_func, intc_baseaddr);
154 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 156 intc->name, intc_baseaddr, nr_irq, intr_mask);
157 157  
158 158 /*
arch/microblaze/kernel/kgdb.c
... ... @@ -141,7 +141,7 @@
141 141 /*
142 142 * Global data
143 143 */
144   -struct kgdb_arch arch_kgdb_ops = {
  144 +const struct kgdb_arch arch_kgdb_ops = {
145 145 #ifdef __MICROBLAZEEL__
146 146 .gdb_bpt_instr = {0x18, 0x00, 0x0c, 0xba}, /* brki r16, 0x18 */
147 147 #else
arch/microblaze/kernel/module.c
... ... @@ -108,8 +108,7 @@
108 108 break;
109 109  
110 110 default:
111   - printk(KERN_ERR "module %s: "
112   - "Unknown relocation: %u\n",
  111 + pr_err("module %s: Unknown relocation: %u\n",
113 112 module->name,
114 113 ELF32_R_TYPE(rela[i].r_info));
115 114 return -ENOEXEC;
arch/microblaze/kernel/process.c
... ... @@ -15,29 +15,29 @@
15 15 #include <linux/bitops.h>
16 16 #include <linux/ptrace.h>
17 17 #include <asm/pgalloc.h>
18   -#include <asm/uaccess.h> /* for USER_DS macros */
  18 +#include <linux/uaccess.h> /* for USER_DS macros */
19 19 #include <asm/cacheflush.h>
20 20  
21 21 void show_regs(struct pt_regs *regs)
22 22 {
23   - printk(KERN_INFO " Registers dump: mode=%X\r\n", regs->pt_mode);
24   - printk(KERN_INFO " r1=%08lX, r2=%08lX, r3=%08lX, r4=%08lX\n",
  23 + pr_info(" Registers dump: mode=%X\r\n", regs->pt_mode);
  24 + pr_info(" r1=%08lX, r2=%08lX, r3=%08lX, r4=%08lX\n",
25 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 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 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 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 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 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 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 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 41 regs->msr, regs->ear, regs->esr, regs->fsr);
42 42 }
43 43  
arch/microblaze/kernel/ptrace.c
... ... @@ -40,7 +40,7 @@
40 40 #include <asm/asm-offsets.h>
41 41 #include <asm/cacheflush.h>
42 42 #include <asm/syscall.h>
43   -#include <asm/io.h>
  43 +#include <linux/io.h>
44 44  
45 45 /* Returns the address where the register at REG_OFFS in P is stashed away. */
46 46 static microblaze_reg_t *reg_save_addr(unsigned reg_offs,
arch/microblaze/kernel/setup.c
... ... @@ -150,33 +150,35 @@
150 150 /* printk("TLB1 0x%08x, TLB0 0x%08x, tlb 0x%x\n", tlb0,
151 151 tlb1, kernel_tlb); */
152 152  
153   - printk("Ramdisk addr 0x%08x, ", ram);
  153 + pr_info("Ramdisk addr 0x%08x, ", ram);
154 154 if (fdt)
155   - printk("FDT at 0x%08x\n", fdt);
  155 + pr_info("FDT at 0x%08x\n", fdt);
156 156 else
157   - printk("Compiled-in FDT at 0x%08x\n",
  157 + pr_info("Compiled-in FDT at 0x%08x\n",
158 158 (unsigned int)_fdt_start);
159 159  
160 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 162 romfs_base, romfs_size);
163   - printk("#### klimit %p ####\n", old_klimit);
  163 + pr_info("#### klimit %p ####\n", old_klimit);
164 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 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 170 #endif
171 171  
172 172 #if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
173   - if (msr)
174   - printk("!!!Your kernel has setup MSR instruction but "
175   - "CPU don't have it %x\n", msr);
  173 + if (msr) {
  174 + pr_info("!!!Your kernel has setup MSR instruction but ");
  175 + pr_cont("CPU don't have it %x\n", msr);
  176 + }
176 177 #else
177   - if (!msr)
178   - printk("!!!Your kernel not setup MSR instruction but "
179   - "CPU have it %x\n", msr);
  178 + if (!msr) {
  179 + pr_info("!!!Your kernel not setup MSR instruction but ");
  180 + pr_cont"CPU have it %x\n", msr);
  181 + }
180 182 #endif
181 183  
182 184 /* Do not copy reset vectors. offset = 0x2 means skip the first
arch/microblaze/kernel/signal.c
... ... @@ -255,7 +255,7 @@
255 255 set_fs(USER_DS);
256 256  
257 257 #ifdef DEBUG_SIG
258   - printk(KERN_INFO "SIG deliver (%s:%d): sp=%p pc=%08lx\n",
  258 + pr_info("SIG deliver (%s:%d): sp=%p pc=%08lx\n",
259 259 current->comm, current->pid, frame, regs->pc);
260 260 #endif
261 261  
... ... @@ -330,8 +330,8 @@
330 330 int signr;
331 331 struct k_sigaction ka;
332 332 #ifdef DEBUG_SIG
333   - printk(KERN_INFO "do signal: %p %d\n", regs, in_syscall);
334   - printk(KERN_INFO "do signal2: %lx %lx %ld [%lx]\n", regs->pc, regs->r1,
  333 + pr_info("do signal: %p %d\n", regs, in_syscall);
  334 + pr_info("do signal2: %lx %lx %ld [%lx]\n", regs->pc, regs->r1,
335 335 regs->r12, current_thread_info()->flags);
336 336 #endif
337 337  
arch/microblaze/kernel/sys_microblaze.c
... ... @@ -31,7 +31,6 @@
31 31 #include <linux/uaccess.h>
32 32 #include <linux/unistd.h>
33 33 #include <linux/slab.h>
34   -
35 34 #include <asm/syscalls.h>
36 35  
37 36 asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
arch/microblaze/kernel/traps.c
... ... @@ -26,7 +26,7 @@
26 26  
27 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 31 __setup("kstack=", kstack_setup);
32 32  
... ... @@ -66,9 +66,7 @@
66 66 }
67 67 print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 32, 4, (void *)fp,
68 68 words_to_show << 2, 0);
69   - printk(KERN_INFO "\n\n");
70   -
71   - pr_info("Call Trace:\n");
  69 + pr_info("\n\nCall Trace:\n");
72 70 microblaze_unwind(task, NULL);
73 71 pr_info("\n");
74 72  
arch/microblaze/lib/ashldi3.c
... ... @@ -25,6 +25,5 @@
25 25  
26 26 return w.ll;
27 27 }
28   -
29 28 EXPORT_SYMBOL(__ashldi3);
arch/microblaze/lib/ashrdi3.c
... ... @@ -27,6 +27,5 @@
27 27  
28 28 return w.ll;
29 29 }
30   -
31 30 EXPORT_SYMBOL(__ashrdi3);
arch/microblaze/lib/lshrdi3.c
... ... @@ -25,6 +25,5 @@
25 25  
26 26 return w.ll;
27 27 }
28   -
29 28 EXPORT_SYMBOL(__lshrdi3);
arch/microblaze/lib/memcpy.c
... ... @@ -103,12 +103,12 @@
103 103 }
104 104 #else
105 105 /* Load the holding buffer */
106   - buf_hold = (*i_src++ & 0xFFFFFF00) >>8;
  106 + buf_hold = (*i_src++ & 0xFFFFFF00) >> 8;
107 107  
108 108 for (; c >= 4; c -= 4) {
109 109 value = *i_src++;
110 110 *i_dst++ = buf_hold | ((value & 0xFF) << 24);
111   - buf_hold = (value & 0xFFFFFF00) >>8;
  111 + buf_hold = (value & 0xFFFFFF00) >> 8;
112 112 }
113 113 #endif
114 114 /* Realign the source */
115 115  
... ... @@ -129,12 +129,12 @@
129 129 }
130 130 #else
131 131 /* Load the holding buffer */
132   - buf_hold = (*i_src++ & 0xFFFF0000 )>>16;
  132 + buf_hold = (*i_src++ & 0xFFFF0000) >> 16;
133 133  
134 134 for (; c >= 4; c -= 4) {
135 135 value = *i_src++;
136   - *i_dst++ = buf_hold | ((value & 0xFFFF)<<16);
137   - buf_hold = (value & 0xFFFF0000) >>16;
  136 + *i_dst++ = buf_hold | ((value & 0xFFFF) << 16);
  137 + buf_hold = (value & 0xFFFF0000) >> 16;
138 138 }
139 139 #endif
140 140 /* Realign the source */
arch/microblaze/lib/memmove.c
... ... @@ -129,7 +129,8 @@
129 129  
130 130 for (; c >= 4; c -= 4) {
131 131 value = *--i_src;
132   - *--i_dst = buf_hold | ((value & 0xFFFFFF00)>>8);
  132 + *--i_dst = buf_hold |
  133 + ((value & 0xFFFFFF00) >> 8);
133 134 buf_hold = (value & 0xFF) << 24;
134 135 }
135 136 #endif
... ... @@ -155,7 +156,8 @@
155 156  
156 157 for (; c >= 4; c -= 4) {
157 158 value = *--i_src;
158   - *--i_dst = buf_hold | ((value & 0xFFFF0000)>>16);
  159 + *--i_dst = buf_hold |
  160 + ((value & 0xFFFF0000) >> 16);
159 161 buf_hold = (value & 0xFFFF) << 16;
160 162 }
161 163 #endif
... ... @@ -181,7 +183,8 @@
181 183  
182 184 for (; c >= 4; c -= 4) {
183 185 value = *--i_src;
184   - *--i_dst = buf_hold | ((value & 0xFF000000)>> 24);
  186 + *--i_dst = buf_hold |
  187 + ((value & 0xFF000000) >> 24);
185 188 buf_hold = (value & 0xFFFFFF) << 8;
186 189 }
187 190 #endif
arch/microblaze/mm/consistent.c
... ... @@ -37,7 +37,7 @@
37 37 #include <asm/pgalloc.h>
38 38 #include <linux/io.h>
39 39 #include <linux/hardirq.h>
40   -#include <asm/mmu_context.h>
  40 +#include <linux/mmu_context.h>
41 41 #include <asm/mmu.h>
42 42 #include <linux/uaccess.h>
43 43 #include <asm/pgtable.h>
... ... @@ -102,8 +102,7 @@
102 102 # endif
103 103 if ((unsigned int)ret > cpuinfo.dcache_base &&
104 104 (unsigned int)ret < cpuinfo.dcache_high)
105   - printk(KERN_WARNING
106   - "ERROR: Your cache coherent area is CACHED!!!\n");
  105 + pr_warn("ERROR: Your cache coherent area is CACHED!!!\n");
107 106  
108 107 /* dma_handle is same as physical (shadowed) address */
109 108 *dma_handle = (dma_addr_t)ret;
arch/microblaze/mm/fault.c
... ... @@ -32,7 +32,7 @@
32 32 #include <asm/page.h>
33 33 #include <asm/pgtable.h>
34 34 #include <asm/mmu.h>
35   -#include <asm/mmu_context.h>
  35 +#include <linux/mmu_context.h>
36 36 #include <linux/uaccess.h>
37 37 #include <asm/exceptions.h>
38 38  
... ... @@ -100,7 +100,7 @@
100 100  
101 101 /* On a kernel SLB miss we can only check for a valid exception entry */
102 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 104 _exception(SIGSEGV, regs, code, address);
105 105 }
106 106  
... ... @@ -114,9 +114,9 @@
114 114  
115 115 /* in_atomic() in user mode is really bad,
116 116 as is current->mm == NULL. */
117   - printk(KERN_EMERG "Page fault in user mode with "
118   - "in_atomic(), mm = %p\n", mm);
119   - printk(KERN_EMERG "r15 = %lx MSR = %lx\n",
  117 + pr_emerg("Page fault in user mode with in_atomic(), mm = %p\n",
  118 + mm);
  119 + pr_emerg("r15 = %lx MSR = %lx\n",
120 120 regs->r15, regs->msr);
121 121 die("Weird page fault", regs, SIGSEGV);
122 122 }
arch/microblaze/mm/init.c
... ... @@ -89,7 +89,7 @@
89 89 reservedpages++;
90 90 }
91 91 totalram_pages += totalhigh_pages;
92   - printk(KERN_INFO "High memory: %luk\n",
  92 + pr_info("High memory: %luk\n",
93 93 totalhigh_pages << (PAGE_SHIFT-10));
94 94  
95 95 return reservedpages;
... ... @@ -142,8 +142,8 @@
142 142 ((u32)_text <= (memory_start + lowmem_size - 1))) {
143 143 memory_size = lowmem_size;
144 144 PAGE_OFFSET = memory_start;
145   - printk(KERN_INFO "%s: Main mem: 0x%x, "
146   - "size 0x%08x\n", __func__, (u32) memory_start,
  145 + pr_info("%s: Main mem: 0x%x, size 0x%08x\n",
  146 + __func__, (u32) memory_start,
147 147 (u32) memory_size);
148 148 break;
149 149 }
... ... @@ -158,7 +158,7 @@
158 158 kernel_align_start = PAGE_DOWN((u32)_text);
159 159 /* ALIGN can be remove because _end in vmlinux.lds.S is align */
160 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 162 __func__, kernel_align_start, kernel_align_start
163 163 + kernel_align_size, kernel_align_size);
164 164 memblock_reserve(kernel_align_start, kernel_align_size);
... ... @@ -181,10 +181,10 @@
181 181 max_low_pfn = ((u64)memory_start + (u64)lowmem_size) >> PAGE_SHIFT;
182 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);
185   - printk(KERN_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);
187   - printk(KERN_INFO "%s: max_pfn: %#lx\n", __func__, max_pfn);
  184 + pr_info("%s: max_mapnr: %#lx\n", __func__, max_mapnr);
  185 + pr_info("%s: min_low_pfn: %#lx\n", __func__, min_low_pfn);
  186 + pr_info("%s: max_low_pfn: %#lx\n", __func__, max_low_pfn);
  187 + pr_info("%s: max_pfn: %#lx\n", __func__, max_pfn);
188 188  
189 189 /*
190 190 * Find an area to use for the bootmem bitmap.
... ... @@ -246,7 +246,7 @@
246 246 free_page(addr);
247 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 252 #ifdef CONFIG_BLK_DEV_INITRD
... ... @@ -260,7 +260,7 @@
260 260 totalram_pages++;
261 261 pages++;
262 262 }
263   - printk(KERN_NOTICE "Freeing initrd memory: %dk freed\n",
  263 + pr_notice("Freeing initrd memory: %dk freed\n",
264 264 (int)(pages * (PAGE_SIZE / 1024)));
265 265 }
266 266 #endif
267 267  
... ... @@ -304,11 +304,11 @@
304 304 initsize = (unsigned long)&__init_end - (unsigned long)&__init_begin;
305 305 bsssize = (unsigned long)&__bss_stop - (unsigned long)&__bss_start;
306 306  
307   - pr_info("Memory: %luk/%luk available (%luk kernel code, "
308   - "%luk reserved, %luk data, %luk bss, %luk init)\n",
  307 + pr_info("Memory: %luk/%luk available (%luk kernel code, ",
309 308 nr_free_pages() << (PAGE_SHIFT-10),
310 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 312 reservedpages << (PAGE_SHIFT-10),
313 313 datasize >> 10,
314 314 bsssize >> 10,
315 315  
316 316  
... ... @@ -394,17 +394,17 @@
394 394 unsigned int kstart, ksize;
395 395  
396 396 if (!memblock.reserved.cnt) {
397   - printk(KERN_EMERG "Error memory count\n");
  397 + pr_emerg("Error memory count\n");
398 398 machine_restart(NULL);
399 399 }
400 400  
401 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 403 machine_restart(NULL);
404 404 }
405 405  
406 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 408 machine_restart(NULL);
409 409 }
410 410  
arch/microblaze/mm/pgtable.c
... ... @@ -39,8 +39,6 @@
39 39 #include <asm/sections.h>
40 40 #include <asm/fixmap.h>
41 41  
42   -#define flush_HPTE(X, va, pg) _tlbie(va)
43   -
44 42 unsigned long ioremap_base;
45 43 unsigned long ioremap_bot;
46 44 EXPORT_SYMBOL(ioremap_bot);
... ... @@ -75,9 +73,8 @@
75 73 p >= memory_start && p < virt_to_phys(high_memory) &&
76 74 !(p >= virt_to_phys((unsigned long)&__bss_stop) &&
77 75 p < virt_to_phys((unsigned long)__bss_stop))) {
78   - printk(KERN_WARNING "__ioremap(): phys addr "PTE_FMT
79   - " is RAM lr %pf\n", (unsigned long)p,
80   - __builtin_return_address(0));
  76 + pr_warn("__ioremap(): phys addr "PTE_FMT" is RAM lr %pf\n",
  77 + (unsigned long)p, __builtin_return_address(0));
81 78 return NULL;
82 79 }
83 80  
84 81  
... ... @@ -128,9 +125,10 @@
128 125 }
129 126 EXPORT_SYMBOL(ioremap);
130 127  
131   -void iounmap(void *addr)
  128 +void 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 132 vfree((void *) (PAGE_MASK & (unsigned long) addr));
135 133 }
136 134 EXPORT_SYMBOL(iounmap);
... ... @@ -152,8 +150,7 @@
152 150 set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT,
153 151 __pgprot(flags)));
154 152 if (unlikely(mem_init_done))
155   - flush_HPTE(0, va, pmd_val(*pd));
156   - /* flush_HPTE(0, va, pg); */
  153 + _tlbie(va);
157 154 }
158 155 return err;
159 156 }
arch/microblaze/pci/indirect_pci.c
... ... @@ -15,7 +15,7 @@
15 15 #include <linux/string.h>
16 16 #include <linux/init.h>
17 17  
18   -#include <asm/io.h>
  18 +#include <linux/io.h>
19 19 #include <asm/prom.h>
20 20 #include <asm/pci-bridge.h>
21 21  
arch/microblaze/pci/iomap.c
... ... @@ -7,7 +7,7 @@
7 7 #include <linux/pci.h>
8 8 #include <linux/mm.h>
9 9 #include <linux/export.h>
10   -#include <asm/io.h>
  10 +#include <linux/io.h>
11 11 #include <asm/pci-bridge.h>
12 12  
13 13 void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
arch/microblaze/pci/pci-common.c
... ... @@ -33,7 +33,7 @@
33 33 #include <linux/export.h>
34 34  
35 35 #include <asm/processor.h>
36   -#include <asm/io.h>
  36 +#include <linux/io.h>
37 37 #include <asm/pci-bridge.h>
38 38 #include <asm/byteorder.h>
39 39  
... ... @@ -552,11 +552,10 @@
552 552 */
553 553 if ((offset + size) > hose->isa_mem_size) {
554 554 #ifdef CONFIG_MMU
555   - printk(KERN_DEBUG
556   - "Process %s (pid:%d) mapped non-existing PCI"
557   - "legacy memory for 0%04x:%02x\n",
558   - current->comm, current->pid, pci_domain_nr(bus),
559   - bus->number);
  555 + pr_debug("Process %s (pid:%d) mapped non-existing PCI",
  556 + current->comm, current->pid);
  557 + pr_debug("legacy memory for 0%04x:%02x\n",
  558 + pci_domain_nr(bus), bus->number);
560 559 #endif
561 560 if (vma->vm_flags & VM_SHARED)
562 561 return shmem_zero_setup(vma);
... ... @@ -564,7 +563,7 @@
564 563 }
565 564 offset += hose->isa_mem_phys;
566 565 } else {
567   - unsigned long io_offset = (unsigned long)hose->io_base_virt - \
  566 + unsigned long io_offset = (unsigned long)hose->io_base_virt -
568 567 _IO_BASE;
569 568 unsigned long roffset = offset + io_offset;
570 569 rp = &hose->io_resource;
... ... @@ -668,7 +667,7 @@
668 667 unsigned long long isa_mb = 0;
669 668 struct resource *res;
670 669  
671   - printk(KERN_INFO "PCI host bridge %s %s ranges:\n",
  670 + pr_info("PCI host bridge %s %s ranges:\n",
672 671 dev->full_name, primary ? "(primary)" : "");
673 672  
674 673 /* Get ranges property */
... ... @@ -685,9 +684,10 @@
685 684 cpu_addr = of_translate_address(dev, ranges + 3);
686 685 size = of_read_number(ranges + pna + 3, 2);
687 686  
688   - pr_debug("pci_space: 0x%08x pci_addr:0x%016llx "
689   - "cpu_addr:0x%016llx size:0x%016llx\n",
690   - pci_space, pci_addr, cpu_addr, size);
  687 + pr_debug("pci_space: 0x%08x pci_addr:0x%016llx ",
  688 + pci_space, pci_addr);
  689 + pr_debug("cpu_addr:0x%016llx size:0x%016llx\n",
  690 + cpu_addr, size);
691 691  
692 692 ranges += np;
693 693  
694 694  
... ... @@ -716,14 +716,12 @@
716 716 res = NULL;
717 717 switch ((pci_space >> 24) & 0x3) {
718 718 case 1: /* PCI IO space */
719   - printk(KERN_INFO
720   - " IO 0x%016llx..0x%016llx -> 0x%016llx\n",
  719 + pr_info(" IO 0x%016llx..0x%016llx -> 0x%016llx\n",
721 720 cpu_addr, cpu_addr + size - 1, pci_addr);
722 721  
723 722 /* We support only one IO range */
724 723 if (hose->pci_io_size) {
725   - printk(KERN_INFO
726   - " \\--> Skipped (too many) !\n");
  724 + pr_info(" \\--> Skipped (too many) !\n");
727 725 continue;
728 726 }
729 727 /* On 32 bits, limit I/O space to 16MB */
730 728  
... ... @@ -750,15 +748,13 @@
750 748 break;
751 749 case 2: /* PCI Memory space */
752 750 case 3: /* PCI 64 bits Memory space */
753   - printk(KERN_INFO
754   - " MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n",
  751 + pr_info(" MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n",
755 752 cpu_addr, cpu_addr + size - 1, pci_addr,
756 753 (pci_space & 0x40000000) ? "Prefetch" : "");
757 754  
758 755 /* We support only 3 memory ranges */
759 756 if (memno >= 3) {
760   - printk(KERN_INFO
761   - " \\--> Skipped (too many) !\n");
  757 + pr_info(" \\--> Skipped (too many) !\n");
762 758 continue;
763 759 }
764 760 /* Handles ISA memory hole space here */
... ... @@ -781,8 +777,7 @@
781 777 hose->pci_mem_offset = cpu_addr - pci_addr;
782 778 else if (pci_addr != 0 &&
783 779 hose->pci_mem_offset != cpu_addr - pci_addr) {
784   - printk(KERN_INFO
785   - " \\--> Skipped (offset mismatch) !\n");
  780 + pr_info(" \\--> Skipped (offset mismatch) !\n");
786 781 continue;
787 782 }
788 783  
... ... @@ -809,7 +804,7 @@
809 804 */
810 805 if (isa_hole >= 0 && hose->pci_mem_offset != isa_mb) {
811 806 unsigned int next = isa_hole + 1;
812   - printk(KERN_INFO " Removing ISA hole at 0x%016llx\n", isa_mb);
  807 + pr_info(" Removing ISA hole at 0x%016llx\n", isa_mb);
813 808 if (next < memno)
814 809 memmove(&hose->mem_resources[isa_hole],
815 810 &hose->mem_resources[next],
... ... @@ -833,7 +828,7 @@
833 828 int i;
834 829  
835 830 if (!hose) {
836   - printk(KERN_ERR "No host bridge for PCI dev %s !\n",
  831 + pr_err("No host bridge for PCI dev %s !\n",
837 832 pci_name(dev));
838 833 return;
839 834 }
840 835  
... ... @@ -842,12 +837,12 @@
842 837 if (!res->flags)
843 838 continue;
844 839 if (res->start == 0) {
845   - pr_debug("PCI:%s Resource %d %016llx-%016llx [%x]" \
846   - "is unassigned\n",
  840 + pr_debug("PCI:%s Resource %d %016llx-%016llx [%x]",
847 841 pci_name(dev), i,
848 842 (unsigned long long)res->start,
849 843 (unsigned long long)res->end,
850 844 (unsigned int)res->flags);
  845 + pr_debug("is unassigned\n");
851 846 res->end -= res->start;
852 847 res->start = 0;
853 848 res->flags |= IORESOURCE_UNSET;
... ... @@ -856,7 +851,7 @@
856 851  
857 852 pr_debug("PCI:%s Resource %d %016llx-%016llx [%x]\n",
858 853 pci_name(dev), i,
859   - (unsigned long long)res->start,\
  854 + (unsigned long long)res->start,
860 855 (unsigned long long)res->end,
861 856 (unsigned int)res->flags);
862 857 }
... ... @@ -947,7 +942,7 @@
947 942  
948 943 pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n",
949 944 pci_name(dev), i,
950   - (unsigned long long)res->start,\
  945 + (unsigned long long)res->start,
951 946 (unsigned long long)res->end,
952 947 (unsigned int)res->flags);
953 948  
954 949  
... ... @@ -1154,12 +1149,12 @@
1154 1149 }
1155 1150 }
1156 1151  
1157   - pr_debug("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx "
1158   - "[0x%x], parent %p (%s)\n",
  1152 + pr_debug("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx ",
1159 1153 bus->self ? pci_name(bus->self) : "PHB",
1160 1154 bus->number, i,
1161 1155 (unsigned long long)res->start,
1162   - (unsigned long long)res->end,
  1156 + (unsigned long long)res->end);
  1157 + pr_debug("[0x%x], parent %p (%s)\n",
1163 1158 (unsigned int)res->flags,
1164 1159 pr, (pr && pr->name) ? pr->name : "nil");
1165 1160  
... ... @@ -1174,9 +1169,8 @@
1174 1169 if (reparent_resources(pr, res) == 0)
1175 1170 continue;
1176 1171 }
1177   - printk(KERN_WARNING "PCI: Cannot allocate resource region "
1178   - "%d of PCI bridge %d, will remap\n", i, bus->number);
1179   -
  1172 + pr_warn("PCI: Cannot allocate resource region ");
  1173 + pr_cont("%d of PCI bridge %d, will remap\n", i, bus->number);
1180 1174 res->start = res->end = 0;
1181 1175 res->flags = 0;
1182 1176 }
... ... @@ -1198,8 +1192,8 @@
1198 1192 pr = pci_find_parent_resource(dev, r);
1199 1193 if (!pr || (pr->flags & IORESOURCE_UNSET) ||
1200 1194 request_resource(pr, r) < 0) {
1201   - printk(KERN_WARNING "PCI: Cannot allocate resource region %d"
1202   - " of device %s, will remap\n", idx, pci_name(dev));
  1195 + pr_warn("PCI: Cannot allocate resource region %d ", idx);
  1196 + pr_cont("of device %s, will remap\n", pci_name(dev));
1203 1197 if (pr)
1204 1198 pr_debug("PCI: parent is %p: %016llx-%016llx [%x]\n",
1205 1199 pr,
... ... @@ -1282,8 +1276,7 @@
1282 1276 res->end = (offset + 0xfff) & 0xfffffffful;
1283 1277 pr_debug("Candidate legacy IO: %pR\n", res);
1284 1278 if (request_resource(&hose->io_resource, res)) {
1285   - printk(KERN_DEBUG
1286   - "PCI %04x:%02x Cannot reserve Legacy IO %pR\n",
  1279 + pr_debug("PCI %04x:%02x Cannot reserve Legacy IO %pR\n",
1287 1280 pci_domain_nr(bus), bus->number, res);
1288 1281 kfree(res);
1289 1282 }
... ... @@ -1311,8 +1304,7 @@
1311 1304 res->end = 0xbffff + offset;
1312 1305 pr_debug("Candidate VGA memory: %pR\n", res);
1313 1306 if (request_resource(pres, res)) {
1314   - printk(KERN_DEBUG
1315   - "PCI %04x:%02x Cannot reserve VGA memory %pR\n",
  1307 + pr_debug("PCI %04x:%02x Cannot reserve VGA memory %pR\n",
1316 1308 pci_domain_nr(bus), bus->number, res);
1317 1309 kfree(res);
1318 1310 }
... ... @@ -1362,10 +1354,9 @@
1362 1354 if (r->parent || !r->start || !r->flags)
1363 1355 continue;
1364 1356  
1365   - pr_debug("PCI: Claiming %s: "
1366   - "Resource %d: %016llx..%016llx [%x]\n",
1367   - pci_name(dev), i,
1368   - (unsigned long long)r->start,
  1357 + pr_debug("PCI: Claiming %s: ", pci_name(dev));
  1358 + pr_debug("Resource %d: %016llx..%016llx [%x]\n",
  1359 + i, (unsigned long long)r->start,
1369 1360 (unsigned long long)r->end,
1370 1361 (unsigned int)r->flags);
1371 1362  
... ... @@ -1423,9 +1414,9 @@
1423 1414 res->end = (res->end + io_offset) & 0xffffffffu;
1424 1415  
1425 1416 if (!res->flags) {
1426   - printk(KERN_WARNING "PCI: I/O resource not set for host"
1427   - " bridge %s (domain %d)\n",
1428   - hose->dn->full_name, hose->global_number);
  1417 + pr_warn("PCI: I/O resource not set for host ");
  1418 + pr_cont("bridge %s (domain %d)\n",
  1419 + hose->dn->full_name, hose->global_number);
1429 1420 /* Workaround for lack of IO resource only on 32-bit */
1430 1421 res->start = (unsigned long)hose->io_base_virt - isa_io_base;
1431 1422 res->end = res->start + IO_SPACE_LIMIT;
... ... @@ -1445,9 +1436,9 @@
1445 1436 if (!res->flags) {
1446 1437 if (i > 0)
1447 1438 continue;
1448   - printk(KERN_ERR "PCI: Memory resource 0 not set for "
1449   - "host bridge %s (domain %d)\n",
1450   - hose->dn->full_name, hose->global_number);
  1439 + pr_err("PCI: Memory resource 0 not set for ");
  1440 + pr_cont("host bridge %s (domain %d)\n",
  1441 + hose->dn->full_name, hose->global_number);
1451 1442  
1452 1443 /* Workaround for lack of MEM resource only on 32-bit */
1453 1444 res->start = hose->pci_mem_offset;
... ... @@ -1489,7 +1480,7 @@
1489 1480 bus = pci_scan_root_bus(hose->parent, hose->first_busno,
1490 1481 hose->ops, hose, &resources);
1491 1482 if (bus == NULL) {
1492   - printk(KERN_ERR "Failed to create bus for PCI domain %04x\n",
  1483 + pr_err("Failed to create bus for PCI domain %04x\n",
1493 1484 hose->global_number);
1494 1485 pci_free_resource_list(&resources);
1495 1486 return;
... ... @@ -1505,7 +1496,7 @@
1505 1496 struct pci_controller *hose, *tmp;
1506 1497 int next_busno = 0;
1507 1498  
1508   - printk(KERN_INFO "PCI: Probing PCI hardware\n");
  1499 + pr_info("PCI: Probing PCI hardware\n");
1509 1500  
1510 1501 /* Scan all of the recorded PCI controllers. */
1511 1502 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
... ... @@ -1605,7 +1596,7 @@
1605 1596 static struct pci_bus bus;
1606 1597  
1607 1598 if (!hose)
1608   - printk(KERN_ERR "Can't find hose for PCI bus %d!\n", busnr);
  1599 + pr_err("Can't find hose for PCI bus %d!\n", busnr);
1609 1600  
1610 1601 bus.number = busnr;
1611 1602 bus.sysdata = hose;
arch/microblaze/pci/xilinx_pci.c
... ... @@ -18,7 +18,7 @@
18 18 #include <linux/of.h>
19 19 #include <linux/of_address.h>
20 20 #include <linux/pci.h>
21   -#include <asm/io.h>
  21 +#include <linux/io.h>
22 22  
23 23 #define XPLB_PCI_ADDR 0x10c
24 24 #define XPLB_PCI_DATA 0x110
... ... @@ -82,7 +82,7 @@
82 82 *
83 83 * List pci devices in very early phase.
84 84 */
85   -void __init xilinx_early_pci_scan(struct pci_controller *hose)
  85 +static void __init xilinx_early_pci_scan(struct pci_controller *hose)
86 86 {
87 87 u32 bus = 0;
88 88 u32 val, dev, func, offset;
89 89  
90 90  
91 91  
92 92  
93 93  
... ... @@ -91,27 +91,27 @@
91 91 for (dev = 0; dev < 2; dev++) {
92 92 /* List only first function number - up-to 8 functions */
93 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 95 /* read the first 64 standardized bytes */
96 96 /* Up-to 192 bytes can be list of capabilities */
97 97 for (offset = 0; offset < 64; offset += 4) {
98 98 early_read_config_dword(hose, bus,
99 99 PCI_DEVFN(dev, func), offset, &val);
100 100 if (offset == 0 && val == 0xFFFFFFFF) {
101   - printk(KERN_CONT "\nABSENT");
  101 + pr_cont("\nABSENT");
102 102 break;
103 103 }
104 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 113 #else
114   -void __init xilinx_early_pci_scan(struct pci_controller *hose)
  114 +static void __init xilinx_early_pci_scan(struct pci_controller *hose)
115 115 {
116 116 }
117 117 #endif