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