diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-12-29 23:19:31 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-12-29 23:19:31 -0500 |
commit | dece8ada993e1764a115bdff0f1effffaa5fc8dc (patch) | |
tree | ba35b26bce046c3062bf13b2fd7611cf9265e66e /arch/powerpc/kernel | |
parent | a68c33f3592eef63304a5f5ab68466539ccac56c (diff) | |
parent | f991db1cf1bdca43675b5d2df0af991719727029 (diff) |
Merge branch 'merge' into next
Merge a pile of fixes that went into the "merge" branch (3.13-rc's) such
as Anton Little Endian fixes.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/crash_dump.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/machine_kexec.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/misc_64.S | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/ptrace.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/smp.c | 4 |
7 files changed, 16 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c index 779a78c26435..11c1d069d920 100644 --- a/arch/powerpc/kernel/crash_dump.c +++ b/arch/powerpc/kernel/crash_dump.c | |||
@@ -124,15 +124,15 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf, | |||
124 | void crash_free_reserved_phys_range(unsigned long begin, unsigned long end) | 124 | void crash_free_reserved_phys_range(unsigned long begin, unsigned long end) |
125 | { | 125 | { |
126 | unsigned long addr; | 126 | unsigned long addr; |
127 | const u32 *basep, *sizep; | 127 | const __be32 *basep, *sizep; |
128 | unsigned int rtas_start = 0, rtas_end = 0; | 128 | unsigned int rtas_start = 0, rtas_end = 0; |
129 | 129 | ||
130 | basep = of_get_property(rtas.dev, "linux,rtas-base", NULL); | 130 | basep = of_get_property(rtas.dev, "linux,rtas-base", NULL); |
131 | sizep = of_get_property(rtas.dev, "rtas-size", NULL); | 131 | sizep = of_get_property(rtas.dev, "rtas-size", NULL); |
132 | 132 | ||
133 | if (basep && sizep) { | 133 | if (basep && sizep) { |
134 | rtas_start = *basep; | 134 | rtas_start = be32_to_cpup(basep); |
135 | rtas_end = *basep + *sizep; | 135 | rtas_end = rtas_start + be32_to_cpup(sizep); |
136 | } | 136 | } |
137 | 137 | ||
138 | for (addr = begin; addr < end; addr += PAGE_SIZE) { | 138 | for (addr = begin; addr < end; addr += PAGE_SIZE) { |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 2ae41aba4053..4f0946de2d5c 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -80,6 +80,7 @@ END_FTR_SECTION(0, 1) | |||
80 | * of the function that the cpu should jump to to continue | 80 | * of the function that the cpu should jump to to continue |
81 | * initialization. | 81 | * initialization. |
82 | */ | 82 | */ |
83 | .balign 8 | ||
83 | .globl __secondary_hold_spinloop | 84 | .globl __secondary_hold_spinloop |
84 | __secondary_hold_spinloop: | 85 | __secondary_hold_spinloop: |
85 | .llong 0x0 | 86 | .llong 0x0 |
@@ -470,6 +471,7 @@ _STATIC(__after_prom_start) | |||
470 | mtctr r8 | 471 | mtctr r8 |
471 | bctr | 472 | bctr |
472 | 473 | ||
474 | .balign 8 | ||
473 | p_end: .llong _end - _stext | 475 | p_end: .llong _end - _stext |
474 | 476 | ||
475 | 4: /* Now copy the rest of the kernel up to _end */ | 477 | 4: /* Now copy the rest of the kernel up to _end */ |
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index 88a7fb458dfd..75d4f7340da8 100644 --- a/arch/powerpc/kernel/machine_kexec.c +++ b/arch/powerpc/kernel/machine_kexec.c | |||
@@ -148,7 +148,7 @@ void __init reserve_crashkernel(void) | |||
148 | * a small SLB (128MB) since the crash kernel needs to place | 148 | * a small SLB (128MB) since the crash kernel needs to place |
149 | * itself and some stacks to be in the first segment. | 149 | * itself and some stacks to be in the first segment. |
150 | */ | 150 | */ |
151 | crashk_res.start = min(0x80000000ULL, (ppc64_rma_size / 2)); | 151 | crashk_res.start = min(0x8000000ULL, (ppc64_rma_size / 2)); |
152 | #else | 152 | #else |
153 | crashk_res.start = KDUMP_KERNELBASE; | 153 | crashk_res.start = KDUMP_KERNELBASE; |
154 | #endif | 154 | #endif |
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index a9f7a79a3a40..3d0249599d52 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S | |||
@@ -252,8 +252,8 @@ _GLOBAL(__bswapdi2) | |||
252 | or r3,r7,r9 | 252 | or r3,r7,r9 |
253 | blr | 253 | blr |
254 | 254 | ||
255 | #if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) | ||
256 | 255 | ||
256 | #ifdef CONFIG_PPC_EARLY_DEBUG_BOOTX | ||
257 | _GLOBAL(rmci_on) | 257 | _GLOBAL(rmci_on) |
258 | sync | 258 | sync |
259 | isync | 259 | isync |
@@ -283,6 +283,9 @@ _GLOBAL(rmci_off) | |||
283 | isync | 283 | isync |
284 | sync | 284 | sync |
285 | blr | 285 | blr |
286 | #endif /* CONFIG_PPC_EARLY_DEBUG_BOOTX */ | ||
287 | |||
288 | #if defined(CONFIG_PPC_PMAC) || defined(CONFIG_PPC_MAPLE) | ||
286 | 289 | ||
287 | /* | 290 | /* |
288 | * Do an IO access in real mode | 291 | * Do an IO access in real mode |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 75fb40498b41..2e3d2bf536c5 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -1555,7 +1555,7 @@ long arch_ptrace(struct task_struct *child, long request, | |||
1555 | 1555 | ||
1556 | flush_fp_to_thread(child); | 1556 | flush_fp_to_thread(child); |
1557 | if (fpidx < (PT_FPSCR - PT_FPR0)) | 1557 | if (fpidx < (PT_FPSCR - PT_FPR0)) |
1558 | memcpy(&tmp, &child->thread.fp_state.fpr, | 1558 | memcpy(&tmp, &child->thread.TS_FPR(fpidx), |
1559 | sizeof(long)); | 1559 | sizeof(long)); |
1560 | else | 1560 | else |
1561 | tmp = child->thread.fp_state.fpscr; | 1561 | tmp = child->thread.fp_state.fpscr; |
@@ -1588,7 +1588,7 @@ long arch_ptrace(struct task_struct *child, long request, | |||
1588 | 1588 | ||
1589 | flush_fp_to_thread(child); | 1589 | flush_fp_to_thread(child); |
1590 | if (fpidx < (PT_FPSCR - PT_FPR0)) | 1590 | if (fpidx < (PT_FPSCR - PT_FPR0)) |
1591 | memcpy(&child->thread.fp_state.fpr, &data, | 1591 | memcpy(&child->thread.TS_FPR(fpidx), &data, |
1592 | sizeof(long)); | 1592 | sizeof(long)); |
1593 | else | 1593 | else |
1594 | child->thread.fp_state.fpscr = data; | 1594 | child->thread.fp_state.fpscr = data; |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index febc80445d25..bc76cc6b419c 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -479,7 +479,7 @@ void __init smp_setup_cpu_maps(void) | |||
479 | if (machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR) && | 479 | if (machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR) && |
480 | (dn = of_find_node_by_path("/rtas"))) { | 480 | (dn = of_find_node_by_path("/rtas"))) { |
481 | int num_addr_cell, num_size_cell, maxcpus; | 481 | int num_addr_cell, num_size_cell, maxcpus; |
482 | const unsigned int *ireg; | 482 | const __be32 *ireg; |
483 | 483 | ||
484 | num_addr_cell = of_n_addr_cells(dn); | 484 | num_addr_cell = of_n_addr_cells(dn); |
485 | num_size_cell = of_n_size_cells(dn); | 485 | num_size_cell = of_n_size_cells(dn); |
@@ -489,7 +489,7 @@ void __init smp_setup_cpu_maps(void) | |||
489 | if (!ireg) | 489 | if (!ireg) |
490 | goto out; | 490 | goto out; |
491 | 491 | ||
492 | maxcpus = ireg[num_addr_cell + num_size_cell]; | 492 | maxcpus = be32_to_cpup(ireg + num_addr_cell + num_size_cell); |
493 | 493 | ||
494 | /* Double maxcpus for processors which have SMT capability */ | 494 | /* Double maxcpus for processors which have SMT capability */ |
495 | if (cpu_has_feature(CPU_FTR_SMT)) | 495 | if (cpu_has_feature(CPU_FTR_SMT)) |
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 19d654b0150a..ac2621af3154 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -575,7 +575,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle) | |||
575 | int cpu_to_core_id(int cpu) | 575 | int cpu_to_core_id(int cpu) |
576 | { | 576 | { |
577 | struct device_node *np; | 577 | struct device_node *np; |
578 | const int *reg; | 578 | const __be32 *reg; |
579 | int id = -1; | 579 | int id = -1; |
580 | 580 | ||
581 | np = of_get_cpu_node(cpu, NULL); | 581 | np = of_get_cpu_node(cpu, NULL); |
@@ -586,7 +586,7 @@ int cpu_to_core_id(int cpu) | |||
586 | if (!reg) | 586 | if (!reg) |
587 | goto out; | 587 | goto out; |
588 | 588 | ||
589 | id = *reg; | 589 | id = be32_to_cpup(reg); |
590 | out: | 590 | out: |
591 | of_node_put(np); | 591 | of_node_put(np); |
592 | return id; | 592 | return id; |