Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

microblaze: Fix coding style issues

Fix coding style issues reported by checkpatch.pl.

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

authored by

Michal Simek and committed by
Michal Simek
6bd55f0b 5b3084b5

+259 -294
+1 -1
arch/microblaze/include/asm/io.h
··· 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);
+68 -80
arch/microblaze/kernel/cpu/cache.c
··· 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 ··· 94 106 int align = ~(cache_line_length - 1); \ 95 107 end = min(start + cache_size, end); \ 96 108 start &= align; \ 97 - } while (0); 109 + } while (0) 98 110 99 111 /* 100 112 * Helper macro to loop over the specified cache_size/line_length and ··· 106 118 int step = -line_length; \ 107 119 WARN_ON(step >= 0); \ 108 120 \ 109 - __asm__ __volatile__ (" 1: " #op " %0, r0; \ 110 - bgtid %0, 1b; \ 111 - addk %0, %0, %1; \ 112 - " : : "r" (len), "r" (step) \ 121 + __asm__ __volatile__ (" 1: " #op " %0, r0;" \ 122 + "bgtid %0, 1b;" \ 123 + "addk %0, %0, %1;" \ 124 + : : "r" (len), "r" (step) \ 113 125 : "memory"); \ 114 - } while (0); 126 + } while (0) 115 127 116 128 /* Used for wdc.flush/clear which can use rB for offset which is not possible 117 129 * to use for simple wdc or wic. ··· 130 142 count = end - start; \ 131 143 WARN_ON(count < 0); \ 132 144 \ 133 - __asm__ __volatile__ (" 1: " #op " %0, %1; \ 134 - bgtid %1, 1b; \ 135 - addk %1, %1, %2; \ 136 - " : : "r" (start), "r" (count), \ 145 + __asm__ __volatile__ (" 1: " #op " %0, %1;" \ 146 + "bgtid %1, 1b;" \ 147 + "addk %1, %1, %2;" \ 148 + : : "r" (start), "r" (count), \ 137 149 "r" (step) : "memory"); \ 138 - } while (0); 150 + } while (0) 139 151 140 152 /* It is used only first parameter for OP - for wic, wdc */ 141 153 #define CACHE_RANGE_LOOP_1(start, end, line_length, op) \ ··· 145 157 end = ((end & align) == end) ? end - line_length : end & align; \ 146 158 WARN_ON(end - start < 0); \ 147 159 \ 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),\ 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), \ 153 165 "r" (line_length) : "memory"); \ 154 - } while (0); 166 + } while (0) 155 167 156 168 #define ASM_LOOP 157 169 ··· 340 352 #endif 341 353 pr_debug("%s\n", __func__); 342 354 #ifdef ASM_LOOP 343 - CACHE_ALL_LOOP(cpuinfo.dcache_size, cpuinfo.dcache_line_length, wdc) 355 + CACHE_ALL_LOOP(cpuinfo.dcache_size, cpuinfo.dcache_line_length, wdc); 344 356 #else 345 357 for (i = 0; i < cpuinfo.dcache_size; 346 358 i += cpuinfo.dcache_line_length) ··· 349 361 #endif 350 362 } 351 363 352 - /* FIXME It is blindly invalidation as is expected 364 + /* 365 + * FIXME It is blindly invalidation as is expected 353 366 * but can't be called on noMMU in microblaze_cache_init below 354 367 * 355 368 * MS: noMMU kernel won't boot if simple wdc is used ··· 364 375 pr_debug("%s\n", __func__); 365 376 #ifdef ASM_LOOP 366 377 CACHE_ALL_LOOP(cpuinfo.dcache_size, cpuinfo.dcache_line_length, 367 - wdc) 378 + wdc); 368 379 #else 369 380 for (i = 0; i < cpuinfo.dcache_size; 370 381 i += cpuinfo.dcache_line_length) ··· 605 616 #define CPUVER_7_20_A 0x0c 606 617 #define CPUVER_7_20_D 0x0f 607 618 608 - #define INFO(s) printk(KERN_INFO "cache: " s "\n"); 609 - 610 619 void microblaze_cache_init(void) 611 620 { 612 621 if (cpuinfo.use_instr & PVR2_USE_MSR_INSTR) { 613 622 if (cpuinfo.dcache_wb) { 614 - INFO("wb_msr"); 623 + pr_info("wb_msr\n"); 615 624 mbc = (struct scache *)&wb_msr; 616 625 if (cpuinfo.ver_code <= CPUVER_7_20_D) { 617 626 /* MS: problem with signal handling - hw bug */ 618 - INFO("WB won't work properly"); 627 + pr_info("WB won't work properly\n"); 619 628 } 620 629 } else { 621 630 if (cpuinfo.ver_code >= CPUVER_7_20_A) { 622 - INFO("wt_msr_noirq"); 631 + pr_info("wt_msr_noirq\n"); 623 632 mbc = (struct scache *)&wt_msr_noirq; 624 633 } else { 625 - INFO("wt_msr"); 634 + pr_info("wt_msr\n"); 626 635 mbc = (struct scache *)&wt_msr; 627 636 } 628 637 } 629 638 } else { 630 639 if (cpuinfo.dcache_wb) { 631 - INFO("wb_nomsr"); 640 + pr_info("wb_nomsr\n"); 632 641 mbc = (struct scache *)&wb_nomsr; 633 642 if (cpuinfo.ver_code <= CPUVER_7_20_D) { 634 643 /* MS: problem with signal handling - hw bug */ 635 - INFO("WB won't work properly"); 644 + pr_info("WB won't work properly\n"); 636 645 } 637 646 } else { 638 647 if (cpuinfo.ver_code >= CPUVER_7_20_A) { 639 - INFO("wt_nomsr_noirq"); 648 + pr_info("wt_nomsr_noirq\n"); 640 649 mbc = (struct scache *)&wt_nomsr_noirq; 641 650 } else { 642 - INFO("wt_nomsr"); 651 + pr_info("wt_nomsr\n"); 643 652 mbc = (struct scache *)&wt_nomsr; 644 653 } 645 654 } 646 655 } 647 - /* FIXME Invalidation is done in U-BOOT 648 - * WT cache: Data is already written to main memory 649 - * WB cache: Discard data on noMMU which caused that kernel doesn't boot 650 - */ 656 + /* 657 + * FIXME Invalidation is done in U-BOOT 658 + * WT cache: Data is already written to main memory 659 + * WB cache: Discard data on noMMU which caused that kernel doesn't boot 660 + */ 651 661 /* invalidate_dcache(); */ 652 662 enable_dcache(); 653 663
+10 -11
arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
··· 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) ··· 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"); ··· 58 59 err_printk("HW_FPU"); 59 60 ci->use_fpu = temp; 60 61 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) |\ 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) | 68 69 PVR_FSL_EXCEPTION(pvr); 69 70 70 71 CI(pvr_user1, USER1);
+6 -7
arch/microblaze/kernel/cpu/cpuinfo.c
··· 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 }
+1 -1
arch/microblaze/kernel/cpu/pvr.c
··· 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
+3 -3
arch/microblaze/kernel/dma.c
··· 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 ··· 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);
+8 -9
arch/microblaze/kernel/early_printk.c
··· 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 } ··· 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 /* ··· 196 197 { 197 198 if (!early_console_initialized || !early_console) 198 199 return; 199 - printk(KERN_WARNING "disabling early console\n"); 200 + pr_warn("disabling early console\n"); 200 201 unregister_console(early_console); 201 202 early_console_initialized = 0; 202 203 }
+10 -15
arch/microblaze/kernel/exceptions.c
··· 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 ··· 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 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 ··· 91 92 _exception(SIGILL, regs, ILL_ILLOPC, addr); 92 93 return; 93 94 } 94 - printk(KERN_WARNING "Illegal opcode exception " \ 95 - "in kernel mode.\n"); 95 + pr_warn("Illegal opcode exception in kernel mode.\n"); 96 96 die("opcode exception", regs, SIGBUS); 97 97 break; 98 98 case MICROBLAZE_IBUS_EXCEPTION: ··· 100 102 _exception(SIGBUS, regs, BUS_ADRERR, addr); 101 103 return; 102 104 } 103 - printk(KERN_WARNING "Instruction bus error exception " \ 104 - "in kernel mode.\n"); 105 + pr_warn("Instruction bus error exception in kernel mode.\n"); 105 106 die("bus exception", regs, SIGBUS); 106 107 break; 107 108 case MICROBLAZE_DBUS_EXCEPTION: ··· 109 112 _exception(SIGBUS, regs, BUS_ADRERR, addr); 110 113 return; 111 114 } 112 - printk(KERN_WARNING "Data bus error exception " \ 113 - "in kernel mode.\n"); 115 + pr_warn("Data bus error exception in kernel mode.\n"); 114 116 die("bus exception", regs, SIGBUS); 115 117 break; 116 118 case MICROBLAZE_DIV_ZERO_EXCEPTION: ··· 118 122 _exception(SIGFPE, regs, FPE_INTDIV, addr); 119 123 return; 120 124 } 121 - printk(KERN_WARNING "Divide by zero exception " \ 122 - "in kernel mode.\n"); 125 + pr_warn("Divide by zero exception in kernel mode.\n"); 123 126 die("Divide by zero exception", regs, SIGBUS); 124 127 break; 125 128 case MICROBLAZE_FPU_EXCEPTION: ··· 146 151 #endif 147 152 default: 148 153 /* FIXME what to do in unexpected exception */ 149 - printk(KERN_WARNING "Unexpected exception %02x " 150 - "PC=%08x in %s mode\n", type, (unsigned int) addr, 154 + pr_warn("Unexpected exception %02x PC=%08x in %s mode\n", 155 + type, (unsigned int) addr, 151 156 kernel_mode(regs) ? "kernel" : "user"); 152 157 } 153 158 return;
+22 -22
arch/microblaze/kernel/ftrace.c
··· 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 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 );
+1 -1
arch/microblaze/kernel/heartbeat.c
··· 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);
+2 -2
arch/microblaze/kernel/intc.c
··· 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 /*
+1 -1
arch/microblaze/kernel/kgdb.c
··· 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
+1 -2
arch/microblaze/kernel/module.c
··· 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;
+11 -11
arch/microblaze/kernel/process.c
··· 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
+1 -1
arch/microblaze/kernel/ptrace.c
··· 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,
+15 -13
arch/microblaze/kernel/setup.c
··· 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
+3 -3
arch/microblaze/kernel/signal.c
··· 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 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
-1
arch/microblaze/kernel/sys_microblaze.c
··· 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,
+2 -4
arch/microblaze/kernel/traps.c
··· 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 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
-1
arch/microblaze/lib/ashldi3.c
··· 25 25 26 26 return w.ll; 27 27 } 28 - 29 28 EXPORT_SYMBOL(__ashldi3);
-1
arch/microblaze/lib/ashrdi3.c
··· 27 27 28 28 return w.ll; 29 29 } 30 - 31 30 EXPORT_SYMBOL(__ashrdi3);
-1
arch/microblaze/lib/lshrdi3.c
··· 25 25 26 26 return w.ll; 27 27 } 28 - 29 28 EXPORT_SYMBOL(__lshrdi3);
+5 -5
arch/microblaze/lib/memcpy.c
··· 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 */ ··· 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 */
+6 -3
arch/microblaze/lib/memmove.c
··· 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 ··· 156 155 157 156 for (; c >= 4; c -= 4) { 158 157 value = *--i_src; 159 - *--i_dst = buf_hold | ((value & 0xFFFF0000)>>16); 158 + *--i_dst = buf_hold | 159 + ((value & 0xFFFF0000) >> 16); 160 160 buf_hold = (value & 0xFFFF) << 16; 161 161 } 162 162 #endif ··· 183 181 184 182 for (; c >= 4; c -= 4) { 185 183 value = *--i_src; 186 - *--i_dst = buf_hold | ((value & 0xFF000000)>> 24); 184 + *--i_dst = buf_hold | 185 + ((value & 0xFF000000) >> 24); 187 186 buf_hold = (value & 0xFFFFFF) << 8; 188 187 } 189 188 #endif
+2 -3
arch/microblaze/mm/consistent.c
··· 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 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;
+5 -5
arch/microblaze/mm/fault.c
··· 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 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 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 }
+16 -16
arch/microblaze/mm/init.c
··· 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 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 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 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 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 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 ··· 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, ··· 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
+6 -9
arch/microblaze/mm/pgtable.c
··· 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); ··· 73 75 p >= memory_start && p < virt_to_phys(high_memory) && 74 76 !(p >= virt_to_phys((unsigned long)&__bss_stop) && 75 77 p < virt_to_phys((unsigned long)__bss_stop))) { 76 - printk(KERN_WARNING "__ioremap(): phys addr "PTE_FMT 77 - " is RAM lr %pf\n", (unsigned long)p, 78 - __builtin_return_address(0)); 78 + pr_warn("__ioremap(): phys addr "PTE_FMT" is RAM lr %pf\n", 79 + (unsigned long)p, __builtin_return_address(0)); 79 80 return NULL; 80 81 } 81 82 ··· 125 128 } 126 129 EXPORT_SYMBOL(ioremap); 127 130 128 - void iounmap(void *addr) 131 + void iounmap(void __iomem *addr) 129 132 { 130 - if (addr > high_memory && (unsigned long) addr < ioremap_bot) 133 + if ((__force void *)addr > high_memory && 134 + (unsigned long) addr < ioremap_bot) 131 135 vfree((void *) (PAGE_MASK & (unsigned long) addr)); 132 136 } 133 137 EXPORT_SYMBOL(iounmap); ··· 150 152 set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, 151 153 __pgprot(flags))); 152 154 if (unlikely(mem_init_done)) 153 - flush_HPTE(0, va, pmd_val(*pd)); 154 - /* flush_HPTE(0, va, pg); */ 155 + _tlbie(va); 155 156 } 156 157 return err; 157 158 }
+1 -1
arch/microblaze/pci/indirect_pci.c
··· 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
+1 -1
arch/microblaze/pci/iomap.c
··· 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)
+43 -52
arch/microblaze/pci/pci-common.c
··· 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 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); ··· 563 564 } 564 565 offset += hose->isa_mem_phys; 565 566 } else { 566 - unsigned long io_offset = (unsigned long)hose->io_base_virt - \ 567 + unsigned long io_offset = (unsigned long)hose->io_base_virt - 567 568 _IO_BASE; 568 569 unsigned long roffset = offset + io_offset; 569 570 rp = &hose->io_resource; ··· 667 668 unsigned long long isa_mb = 0; 668 669 struct resource *res; 669 670 670 - printk(KERN_INFO "PCI host bridge %s %s ranges:\n", 671 + pr_info("PCI host bridge %s %s ranges:\n", 671 672 dev->full_name, primary ? "(primary)" : ""); 672 673 673 674 /* Get ranges property */ ··· 684 685 cpu_addr = of_translate_address(dev, ranges + 3); 685 686 size = of_read_number(ranges + pna + 3, 2); 686 687 687 - pr_debug("pci_space: 0x%08x pci_addr:0x%016llx " 688 - "cpu_addr:0x%016llx size:0x%016llx\n", 689 - pci_space, pci_addr, cpu_addr, size); 688 + pr_debug("pci_space: 0x%08x pci_addr:0x%016llx ", 689 + pci_space, pci_addr); 690 + pr_debug("cpu_addr:0x%016llx size:0x%016llx\n", 691 + cpu_addr, size); 690 692 691 693 ranges += np; 692 694 ··· 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 */ ··· 748 750 break; 749 751 case 2: /* PCI Memory space */ 750 752 case 3: /* PCI 64 bits Memory space */ 751 - printk(KERN_INFO 752 - " MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n", 753 + pr_info(" MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n", 753 754 cpu_addr, cpu_addr + size - 1, pci_addr, 754 755 (pci_space & 0x40000000) ? "Prefetch" : ""); 755 756 756 757 /* We support only 3 memory ranges */ 757 758 if (memno >= 3) { 758 - printk(KERN_INFO 759 - " \\--> Skipped (too many) !\n"); 759 + pr_info(" \\--> Skipped (too many) !\n"); 760 760 continue; 761 761 } 762 762 /* Handles ISA memory hole space here */ ··· 777 781 hose->pci_mem_offset = cpu_addr - pci_addr; 778 782 else if (pci_addr != 0 && 779 783 hose->pci_mem_offset != cpu_addr - pci_addr) { 780 - printk(KERN_INFO 781 - " \\--> Skipped (offset mismatch) !\n"); 784 + pr_info(" \\--> Skipped (offset mismatch) !\n"); 782 785 continue; 783 786 } 784 787 ··· 804 809 */ 805 810 if (isa_hole >= 0 && hose->pci_mem_offset != isa_mb) { 806 811 unsigned int next = isa_hole + 1; 807 - printk(KERN_INFO " Removing ISA hole at 0x%016llx\n", isa_mb); 812 + pr_info(" Removing ISA hole at 0x%016llx\n", isa_mb); 808 813 if (next < memno) 809 814 memmove(&hose->mem_resources[isa_hole], 810 815 &hose->mem_resources[next], ··· 828 833 int i; 829 834 830 835 if (!hose) { 831 - printk(KERN_ERR "No host bridge for PCI dev %s !\n", 836 + pr_err("No host bridge for PCI dev %s !\n", 832 837 pci_name(dev)); 833 838 return; 834 839 } ··· 837 842 if (!res->flags) 838 843 continue; 839 844 if (res->start == 0) { 840 - pr_debug("PCI:%s Resource %d %016llx-%016llx [%x]" \ 841 - "is unassigned\n", 845 + pr_debug("PCI:%s Resource %d %016llx-%016llx [%x]", 842 846 pci_name(dev), i, 843 847 (unsigned long long)res->start, 844 848 (unsigned long long)res->end, 845 849 (unsigned int)res->flags); 850 + pr_debug("is unassigned\n"); 846 851 res->end -= res->start; 847 852 res->start = 0; 848 853 res->flags |= IORESOURCE_UNSET; ··· 851 856 852 857 pr_debug("PCI:%s Resource %d %016llx-%016llx [%x]\n", 853 858 pci_name(dev), i, 854 - (unsigned long long)res->start,\ 859 + (unsigned long long)res->start, 855 860 (unsigned long long)res->end, 856 861 (unsigned int)res->flags); 857 862 } ··· 942 947 943 948 pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n", 944 949 pci_name(dev), i, 945 - (unsigned long long)res->start,\ 950 + (unsigned long long)res->start, 946 951 (unsigned long long)res->end, 947 952 (unsigned int)res->flags); 948 953 ··· 1149 1154 } 1150 1155 } 1151 1156 1152 - pr_debug("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx " 1153 - "[0x%x], parent %p (%s)\n", 1157 + pr_debug("PCI: %s (bus %d) bridge rsrc %d: %016llx-%016llx ", 1154 1158 bus->self ? pci_name(bus->self) : "PHB", 1155 1159 bus->number, i, 1156 1160 (unsigned long long)res->start, 1157 - (unsigned long long)res->end, 1161 + (unsigned long long)res->end); 1162 + pr_debug("[0x%x], parent %p (%s)\n", 1158 1163 (unsigned int)res->flags, 1159 1164 pr, (pr && pr->name) ? pr->name : "nil"); 1160 1165 ··· 1169 1174 if (reparent_resources(pr, res) == 0) 1170 1175 continue; 1171 1176 } 1172 - printk(KERN_WARNING "PCI: Cannot allocate resource region " 1173 - "%d of PCI bridge %d, will remap\n", i, bus->number); 1174 - 1177 + pr_warn("PCI: Cannot allocate resource region "); 1178 + pr_cont("%d of PCI bridge %d, will remap\n", i, bus->number); 1175 1179 res->start = res->end = 0; 1176 1180 res->flags = 0; 1177 1181 } ··· 1192 1198 pr = pci_find_parent_resource(dev, r); 1193 1199 if (!pr || (pr->flags & IORESOURCE_UNSET) || 1194 1200 request_resource(pr, r) < 0) { 1195 - printk(KERN_WARNING "PCI: Cannot allocate resource region %d" 1196 - " of device %s, will remap\n", idx, pci_name(dev)); 1201 + pr_warn("PCI: Cannot allocate resource region %d ", idx); 1202 + pr_cont("of device %s, will remap\n", pci_name(dev)); 1197 1203 if (pr) 1198 1204 pr_debug("PCI: parent is %p: %016llx-%016llx [%x]\n", 1199 1205 pr, ··· 1276 1282 res->end = (offset + 0xfff) & 0xfffffffful; 1277 1283 pr_debug("Candidate legacy IO: %pR\n", res); 1278 1284 if (request_resource(&hose->io_resource, res)) { 1279 - printk(KERN_DEBUG 1280 - "PCI %04x:%02x Cannot reserve Legacy IO %pR\n", 1285 + pr_debug("PCI %04x:%02x Cannot reserve Legacy IO %pR\n", 1281 1286 pci_domain_nr(bus), bus->number, res); 1282 1287 kfree(res); 1283 1288 } ··· 1304 1311 res->end = 0xbffff + offset; 1305 1312 pr_debug("Candidate VGA memory: %pR\n", res); 1306 1313 if (request_resource(pres, res)) { 1307 - printk(KERN_DEBUG 1308 - "PCI %04x:%02x Cannot reserve VGA memory %pR\n", 1314 + pr_debug("PCI %04x:%02x Cannot reserve VGA memory %pR\n", 1309 1315 pci_domain_nr(bus), bus->number, res); 1310 1316 kfree(res); 1311 1317 } ··· 1354 1362 if (r->parent || !r->start || !r->flags) 1355 1363 continue; 1356 1364 1357 - pr_debug("PCI: Claiming %s: " 1358 - "Resource %d: %016llx..%016llx [%x]\n", 1359 - pci_name(dev), i, 1360 - (unsigned long long)r->start, 1365 + pr_debug("PCI: Claiming %s: ", pci_name(dev)); 1366 + pr_debug("Resource %d: %016llx..%016llx [%x]\n", 1367 + i, (unsigned long long)r->start, 1361 1368 (unsigned long long)r->end, 1362 1369 (unsigned int)r->flags); 1363 1370 ··· 1414 1423 res->end = (res->end + io_offset) & 0xffffffffu; 1415 1424 1416 1425 if (!res->flags) { 1417 - printk(KERN_WARNING "PCI: I/O resource not set for host" 1418 - " bridge %s (domain %d)\n", 1419 - hose->dn->full_name, hose->global_number); 1426 + pr_warn("PCI: I/O resource not set for host "); 1427 + pr_cont("bridge %s (domain %d)\n", 1428 + hose->dn->full_name, hose->global_number); 1420 1429 /* Workaround for lack of IO resource only on 32-bit */ 1421 1430 res->start = (unsigned long)hose->io_base_virt - isa_io_base; 1422 1431 res->end = res->start + IO_SPACE_LIMIT; ··· 1436 1445 if (!res->flags) { 1437 1446 if (i > 0) 1438 1447 continue; 1439 - printk(KERN_ERR "PCI: Memory resource 0 not set for " 1440 - "host bridge %s (domain %d)\n", 1441 - hose->dn->full_name, hose->global_number); 1448 + pr_err("PCI: Memory resource 0 not set for "); 1449 + pr_cont("host bridge %s (domain %d)\n", 1450 + hose->dn->full_name, hose->global_number); 1442 1451 1443 1452 /* Workaround for lack of MEM resource only on 32-bit */ 1444 1453 res->start = hose->pci_mem_offset; ··· 1480 1489 bus = pci_scan_root_bus(hose->parent, hose->first_busno, 1481 1490 hose->ops, hose, &resources); 1482 1491 if (bus == NULL) { 1483 - printk(KERN_ERR "Failed to create bus for PCI domain %04x\n", 1492 + pr_err("Failed to create bus for PCI domain %04x\n", 1484 1493 hose->global_number); 1485 1494 pci_free_resource_list(&resources); 1486 1495 return; ··· 1496 1505 struct pci_controller *hose, *tmp; 1497 1506 int next_busno = 0; 1498 1507 1499 - printk(KERN_INFO "PCI: Probing PCI hardware\n"); 1508 + pr_info("PCI: Probing PCI hardware\n"); 1500 1509 1501 1510 /* Scan all of the recorded PCI controllers. */ 1502 1511 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { ··· 1596 1605 static struct pci_bus bus; 1597 1606 1598 1607 if (!hose) 1599 - printk(KERN_ERR "Can't find hose for PCI bus %d!\n", busnr); 1608 + pr_err("Can't find hose for PCI bus %d!\n", busnr); 1600 1609 1601 1610 bus.number = busnr; 1602 1611 bus.sysdata = hose;
+8 -8
arch/microblaze/pci/xilinx_pci.c
··· 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 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; ··· 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