diff options
| -rw-r--r-- | arch/powerpc/boot/.gitignore | 1 | ||||
| -rw-r--r-- | arch/powerpc/boot/dtc-src/.gitignore | 3 | ||||
| -rw-r--r-- | arch/powerpc/include/asm/rio.h | 2 | ||||
| -rw-r--r-- | arch/powerpc/kernel/cputable.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/kernel/prom.c | 27 | ||||
| -rw-r--r-- | arch/powerpc/mm/init_32.c | 15 | ||||
| -rw-r--r-- | arch/powerpc/mm/init_64.c | 14 | ||||
| -rw-r--r-- | arch/powerpc/mm/mem.c | 19 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/fsl_lbc.c | 6 |
9 files changed, 48 insertions, 41 deletions
diff --git a/arch/powerpc/boot/.gitignore b/arch/powerpc/boot/.gitignore index 3d80c3e9cf60..12da77ec0228 100644 --- a/arch/powerpc/boot/.gitignore +++ b/arch/powerpc/boot/.gitignore | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | addnote | 1 | addnote |
| 2 | dtc | ||
| 3 | empty.c | 2 | empty.c |
| 4 | hack-coff | 3 | hack-coff |
| 5 | infblock.c | 4 | infblock.c |
diff --git a/arch/powerpc/boot/dtc-src/.gitignore b/arch/powerpc/boot/dtc-src/.gitignore deleted file mode 100644 index a7c3f94e5e75..000000000000 --- a/arch/powerpc/boot/dtc-src/.gitignore +++ /dev/null | |||
| @@ -1,3 +0,0 @@ | |||
| 1 | dtc-lexer.lex.c | ||
| 2 | dtc-parser.tab.c | ||
| 3 | dtc-parser.tab.h | ||
diff --git a/arch/powerpc/include/asm/rio.h b/arch/powerpc/include/asm/rio.h index d902abd33995..b1d2deceeedb 100644 --- a/arch/powerpc/include/asm/rio.h +++ b/arch/powerpc/include/asm/rio.h | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | #define ASM_PPC_RIO_H | 14 | #define ASM_PPC_RIO_H |
| 15 | 15 | ||
| 16 | extern void platform_rio_init(void); | 16 | extern void platform_rio_init(void); |
| 17 | #ifdef CONFIG_RAPIDIO | 17 | #ifdef CONFIG_FSL_RIO |
| 18 | extern int fsl_rio_mcheck_exception(struct pt_regs *); | 18 | extern int fsl_rio_mcheck_exception(struct pt_regs *); |
| 19 | #else | 19 | #else |
| 20 | static inline int fsl_rio_mcheck_exception(struct pt_regs *regs) {return 0; } | 20 | static inline int fsl_rio_mcheck_exception(struct pt_regs *regs) {return 0; } |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 34d2722b9451..9fb933248ab6 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
| @@ -1979,7 +1979,7 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
| 1979 | .pvr_value = 0x80240000, | 1979 | .pvr_value = 0x80240000, |
| 1980 | .cpu_name = "e5500", | 1980 | .cpu_name = "e5500", |
| 1981 | .cpu_features = CPU_FTRS_E5500, | 1981 | .cpu_features = CPU_FTRS_E5500, |
| 1982 | .cpu_user_features = COMMON_USER_BOOKE, | 1982 | .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, |
| 1983 | .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS | | 1983 | .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS | |
| 1984 | MMU_FTR_USE_TLBILX, | 1984 | MMU_FTR_USE_TLBILX, |
| 1985 | .icache_bsize = 64, | 1985 | .icache_bsize = 64, |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index f2c906b1d8d3..8c3112a57cf2 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
| @@ -82,11 +82,29 @@ static int __init early_parse_mem(char *p) | |||
| 82 | } | 82 | } |
| 83 | early_param("mem", early_parse_mem); | 83 | early_param("mem", early_parse_mem); |
| 84 | 84 | ||
| 85 | /* | ||
| 86 | * overlaps_initrd - check for overlap with page aligned extension of | ||
| 87 | * initrd. | ||
| 88 | */ | ||
| 89 | static inline int overlaps_initrd(unsigned long start, unsigned long size) | ||
| 90 | { | ||
| 91 | #ifdef CONFIG_BLK_DEV_INITRD | ||
| 92 | if (!initrd_start) | ||
| 93 | return 0; | ||
| 94 | |||
| 95 | return (start + size) > _ALIGN_DOWN(initrd_start, PAGE_SIZE) && | ||
| 96 | start <= _ALIGN_UP(initrd_end, PAGE_SIZE); | ||
| 97 | #else | ||
| 98 | return 0; | ||
| 99 | #endif | ||
| 100 | } | ||
| 101 | |||
| 85 | /** | 102 | /** |
| 86 | * move_device_tree - move tree to an unused area, if needed. | 103 | * move_device_tree - move tree to an unused area, if needed. |
| 87 | * | 104 | * |
| 88 | * The device tree may be allocated beyond our memory limit, or inside the | 105 | * The device tree may be allocated beyond our memory limit, or inside the |
| 89 | * crash kernel region for kdump. If so, move it out of the way. | 106 | * crash kernel region for kdump, or within the page aligned range of initrd. |
| 107 | * If so, move it out of the way. | ||
| 90 | */ | 108 | */ |
| 91 | static void __init move_device_tree(void) | 109 | static void __init move_device_tree(void) |
| 92 | { | 110 | { |
| @@ -99,7 +117,8 @@ static void __init move_device_tree(void) | |||
| 99 | size = be32_to_cpu(initial_boot_params->totalsize); | 117 | size = be32_to_cpu(initial_boot_params->totalsize); |
| 100 | 118 | ||
| 101 | if ((memory_limit && (start + size) > PHYSICAL_START + memory_limit) || | 119 | if ((memory_limit && (start + size) > PHYSICAL_START + memory_limit) || |
| 102 | overlaps_crashkernel(start, size)) { | 120 | overlaps_crashkernel(start, size) || |
| 121 | overlaps_initrd(start, size)) { | ||
| 103 | p = __va(memblock_alloc(size, PAGE_SIZE)); | 122 | p = __va(memblock_alloc(size, PAGE_SIZE)); |
| 104 | memcpy(p, initial_boot_params, size); | 123 | memcpy(p, initial_boot_params, size); |
| 105 | initial_boot_params = (struct boot_param_header *)p; | 124 | initial_boot_params = (struct boot_param_header *)p; |
| @@ -555,7 +574,9 @@ static void __init early_reserve_mem(void) | |||
| 555 | #ifdef CONFIG_BLK_DEV_INITRD | 574 | #ifdef CONFIG_BLK_DEV_INITRD |
| 556 | /* then reserve the initrd, if any */ | 575 | /* then reserve the initrd, if any */ |
| 557 | if (initrd_start && (initrd_end > initrd_start)) | 576 | if (initrd_start && (initrd_end > initrd_start)) |
| 558 | memblock_reserve(__pa(initrd_start), initrd_end - initrd_start); | 577 | memblock_reserve(_ALIGN_DOWN(__pa(initrd_start), PAGE_SIZE), |
| 578 | _ALIGN_UP(initrd_end, PAGE_SIZE) - | ||
| 579 | _ALIGN_DOWN(initrd_start, PAGE_SIZE)); | ||
| 559 | #endif /* CONFIG_BLK_DEV_INITRD */ | 580 | #endif /* CONFIG_BLK_DEV_INITRD */ |
| 560 | 581 | ||
| 561 | #ifdef CONFIG_PPC32 | 582 | #ifdef CONFIG_PPC32 |
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index d65b591e5556..5de0f254dbb5 100644 --- a/arch/powerpc/mm/init_32.c +++ b/arch/powerpc/mm/init_32.c | |||
| @@ -223,21 +223,6 @@ void free_initmem(void) | |||
| 223 | #undef FREESEC | 223 | #undef FREESEC |
| 224 | } | 224 | } |
| 225 | 225 | ||
| 226 | #ifdef CONFIG_BLK_DEV_INITRD | ||
| 227 | void free_initrd_mem(unsigned long start, unsigned long end) | ||
| 228 | { | ||
| 229 | if (start < end) | ||
| 230 | printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); | ||
| 231 | for (; start < end; start += PAGE_SIZE) { | ||
| 232 | ClearPageReserved(virt_to_page(start)); | ||
| 233 | init_page_count(virt_to_page(start)); | ||
| 234 | free_page(start); | ||
| 235 | totalram_pages++; | ||
| 236 | } | ||
| 237 | } | ||
| 238 | #endif | ||
| 239 | |||
| 240 | |||
| 241 | #ifdef CONFIG_8xx /* No 8xx specific .c file to put that in ... */ | 226 | #ifdef CONFIG_8xx /* No 8xx specific .c file to put that in ... */ |
| 242 | void setup_initial_memory_limit(phys_addr_t first_memblock_base, | 227 | void setup_initial_memory_limit(phys_addr_t first_memblock_base, |
| 243 | phys_addr_t first_memblock_size) | 228 | phys_addr_t first_memblock_size) |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 6374b2196a17..f6dbb4c20e64 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
| @@ -99,20 +99,6 @@ void free_initmem(void) | |||
| 99 | ((unsigned long)__init_end - (unsigned long)__init_begin) >> 10); | 99 | ((unsigned long)__init_end - (unsigned long)__init_begin) >> 10); |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | #ifdef CONFIG_BLK_DEV_INITRD | ||
| 103 | void free_initrd_mem(unsigned long start, unsigned long end) | ||
| 104 | { | ||
| 105 | if (start < end) | ||
| 106 | printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); | ||
| 107 | for (; start < end; start += PAGE_SIZE) { | ||
| 108 | ClearPageReserved(virt_to_page(start)); | ||
| 109 | init_page_count(virt_to_page(start)); | ||
| 110 | free_page(start); | ||
| 111 | totalram_pages++; | ||
| 112 | } | ||
| 113 | } | ||
| 114 | #endif | ||
| 115 | |||
| 116 | static void pgd_ctor(void *addr) | 102 | static void pgd_ctor(void *addr) |
| 117 | { | 103 | { |
| 118 | memset(addr, 0, PGD_TABLE_SIZE); | 104 | memset(addr, 0, PGD_TABLE_SIZE); |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 57e545b84bf1..29d4dde65c45 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
| @@ -382,6 +382,25 @@ void __init mem_init(void) | |||
| 382 | mem_init_done = 1; | 382 | mem_init_done = 1; |
| 383 | } | 383 | } |
| 384 | 384 | ||
| 385 | #ifdef CONFIG_BLK_DEV_INITRD | ||
| 386 | void __init free_initrd_mem(unsigned long start, unsigned long end) | ||
| 387 | { | ||
| 388 | if (start >= end) | ||
| 389 | return; | ||
| 390 | |||
| 391 | start = _ALIGN_DOWN(start, PAGE_SIZE); | ||
| 392 | end = _ALIGN_UP(end, PAGE_SIZE); | ||
| 393 | pr_info("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); | ||
| 394 | |||
| 395 | for (; start < end; start += PAGE_SIZE) { | ||
| 396 | ClearPageReserved(virt_to_page(start)); | ||
| 397 | init_page_count(virt_to_page(start)); | ||
| 398 | free_page(start); | ||
| 399 | totalram_pages++; | ||
| 400 | } | ||
| 401 | } | ||
| 402 | #endif | ||
| 403 | |||
| 385 | /* | 404 | /* |
| 386 | * This is called when a page has been modified by the kernel. | 405 | * This is called when a page has been modified by the kernel. |
| 387 | * It just marks the page as not i-cache clean. We do the i-cache | 406 | * It just marks the page as not i-cache clean. We do the i-cache |
diff --git a/arch/powerpc/sysdev/fsl_lbc.c b/arch/powerpc/sysdev/fsl_lbc.c index 0608b1657da4..d917573cf1a8 100644 --- a/arch/powerpc/sysdev/fsl_lbc.c +++ b/arch/powerpc/sysdev/fsl_lbc.c | |||
| @@ -196,9 +196,6 @@ static int __devinit fsl_lbc_ctrl_init(struct fsl_lbc_ctrl *ctrl, | |||
| 196 | out_be32(&lbc->lteccr, LTECCR_CLEAR); | 196 | out_be32(&lbc->lteccr, LTECCR_CLEAR); |
| 197 | out_be32(&lbc->ltedr, LTEDR_ENABLE); | 197 | out_be32(&lbc->ltedr, LTEDR_ENABLE); |
| 198 | 198 | ||
| 199 | /* Enable interrupts for any detected events */ | ||
| 200 | out_be32(&lbc->lteir, LTEIR_ENABLE); | ||
| 201 | |||
| 202 | /* Set the monitor timeout value to the maximum for erratum A001 */ | 199 | /* Set the monitor timeout value to the maximum for erratum A001 */ |
| 203 | if (of_device_is_compatible(node, "fsl,elbc")) | 200 | if (of_device_is_compatible(node, "fsl,elbc")) |
| 204 | clrsetbits_be32(&lbc->lbcr, LBCR_BMT, LBCR_BMTPS); | 201 | clrsetbits_be32(&lbc->lbcr, LBCR_BMT, LBCR_BMTPS); |
| @@ -322,6 +319,9 @@ static int __devinit fsl_lbc_ctrl_probe(struct platform_device *dev) | |||
| 322 | goto err; | 319 | goto err; |
| 323 | } | 320 | } |
| 324 | 321 | ||
| 322 | /* Enable interrupts for any detected events */ | ||
| 323 | out_be32(&fsl_lbc_ctrl_dev->regs->lteir, LTEIR_ENABLE); | ||
| 324 | |||
| 325 | return 0; | 325 | return 0; |
| 326 | 326 | ||
| 327 | err: | 327 | err: |
