diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-07-23 18:34:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-07-23 18:34:13 -0400 |
commit | 7442cf9ac2de31b33311209476cd81398d3863cf (patch) | |
tree | 368360ef9b75e9443cea5d6e8defee529d590469 | |
parent | 355cb09304c3387e43946a83b1fa8a34dc8976c0 (diff) | |
parent | 6f5405bc2ee0102bb3856e2cdea64ff415db2e0c (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc fixes from Ben Herrenschmidt:
"Here is a handful of powerpc fixes for 3.16. They are all pretty
simple and self contained and should still make this release"
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc: use _GLOBAL_TOC for memmove
powerpc/pseries: dynamically added OF nodes need to call of_node_init
powerpc: subpage_protect: Increase the array size to take care of 64TB
powerpc: Fix bugs in emulate_step()
powerpc: Disable doorbells on Power8 DD1.x
-rw-r--r-- | arch/powerpc/include/asm/cputable.h | 1 | ||||
-rw-r--r-- | arch/powerpc/include/asm/mmu-hash64.h | 3 | ||||
-rw-r--r-- | arch/powerpc/kernel/cputable.c | 20 | ||||
-rw-r--r-- | arch/powerpc/lib/mem_64.S | 2 | ||||
-rw-r--r-- | arch/powerpc/lib/sstep.c | 10 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/dlpar.c | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/reconfig.c | 1 |
7 files changed, 31 insertions, 7 deletions
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h index bc2347774f0a..0fdd7eece6d9 100644 --- a/arch/powerpc/include/asm/cputable.h +++ b/arch/powerpc/include/asm/cputable.h | |||
@@ -447,6 +447,7 @@ extern const char *powerpc_base_platform; | |||
447 | CPU_FTR_DBELL | CPU_FTR_HAS_PPR | CPU_FTR_DAWR | \ | 447 | CPU_FTR_DBELL | CPU_FTR_HAS_PPR | CPU_FTR_DAWR | \ |
448 | CPU_FTR_ARCH_207S | CPU_FTR_TM_COMP) | 448 | CPU_FTR_ARCH_207S | CPU_FTR_TM_COMP) |
449 | #define CPU_FTRS_POWER8E (CPU_FTRS_POWER8 | CPU_FTR_PMAO_BUG) | 449 | #define CPU_FTRS_POWER8E (CPU_FTRS_POWER8 | CPU_FTR_PMAO_BUG) |
450 | #define CPU_FTRS_POWER8_DD1 (CPU_FTRS_POWER8 & ~CPU_FTR_DBELL) | ||
450 | #define CPU_FTRS_CELL (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ | 451 | #define CPU_FTRS_CELL (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \ |
451 | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ | 452 | CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \ |
452 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ | 453 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \ |
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h index 807014dde821..c2b4dcf23d03 100644 --- a/arch/powerpc/include/asm/mmu-hash64.h +++ b/arch/powerpc/include/asm/mmu-hash64.h | |||
@@ -22,6 +22,7 @@ | |||
22 | */ | 22 | */ |
23 | #include <asm/pgtable-ppc64.h> | 23 | #include <asm/pgtable-ppc64.h> |
24 | #include <asm/bug.h> | 24 | #include <asm/bug.h> |
25 | #include <asm/processor.h> | ||
25 | 26 | ||
26 | /* | 27 | /* |
27 | * Segment table | 28 | * Segment table |
@@ -496,7 +497,7 @@ extern void slb_set_size(u16 size); | |||
496 | */ | 497 | */ |
497 | struct subpage_prot_table { | 498 | struct subpage_prot_table { |
498 | unsigned long maxaddr; /* only addresses < this are protected */ | 499 | unsigned long maxaddr; /* only addresses < this are protected */ |
499 | unsigned int **protptrs[2]; | 500 | unsigned int **protptrs[(TASK_SIZE_USER64 >> 43)]; |
500 | unsigned int *low_prot[4]; | 501 | unsigned int *low_prot[4]; |
501 | }; | 502 | }; |
502 | 503 | ||
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 965291b4c2fa..0c157642c2a1 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -527,6 +527,26 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
527 | .machine_check_early = __machine_check_early_realmode_p8, | 527 | .machine_check_early = __machine_check_early_realmode_p8, |
528 | .platform = "power8", | 528 | .platform = "power8", |
529 | }, | 529 | }, |
530 | { /* Power8 DD1: Does not support doorbell IPIs */ | ||
531 | .pvr_mask = 0xffffff00, | ||
532 | .pvr_value = 0x004d0100, | ||
533 | .cpu_name = "POWER8 (raw)", | ||
534 | .cpu_features = CPU_FTRS_POWER8_DD1, | ||
535 | .cpu_user_features = COMMON_USER_POWER8, | ||
536 | .cpu_user_features2 = COMMON_USER2_POWER8, | ||
537 | .mmu_features = MMU_FTRS_POWER8, | ||
538 | .icache_bsize = 128, | ||
539 | .dcache_bsize = 128, | ||
540 | .num_pmcs = 6, | ||
541 | .pmc_type = PPC_PMC_IBM, | ||
542 | .oprofile_cpu_type = "ppc64/power8", | ||
543 | .oprofile_type = PPC_OPROFILE_INVALID, | ||
544 | .cpu_setup = __setup_cpu_power8, | ||
545 | .cpu_restore = __restore_cpu_power8, | ||
546 | .flush_tlb = __flush_tlb_power8, | ||
547 | .machine_check_early = __machine_check_early_realmode_p8, | ||
548 | .platform = "power8", | ||
549 | }, | ||
530 | { /* Power8 */ | 550 | { /* Power8 */ |
531 | .pvr_mask = 0xffff0000, | 551 | .pvr_mask = 0xffff0000, |
532 | .pvr_value = 0x004d0000, | 552 | .pvr_value = 0x004d0000, |
diff --git a/arch/powerpc/lib/mem_64.S b/arch/powerpc/lib/mem_64.S index 0738f96befbf..43435c6892fb 100644 --- a/arch/powerpc/lib/mem_64.S +++ b/arch/powerpc/lib/mem_64.S | |||
@@ -77,7 +77,7 @@ _GLOBAL(memset) | |||
77 | stb r4,0(r6) | 77 | stb r4,0(r6) |
78 | blr | 78 | blr |
79 | 79 | ||
80 | _GLOBAL(memmove) | 80 | _GLOBAL_TOC(memmove) |
81 | cmplw 0,r3,r4 | 81 | cmplw 0,r3,r4 |
82 | bgt backwards_memcpy | 82 | bgt backwards_memcpy |
83 | b memcpy | 83 | b memcpy |
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c index 412dd46dd0b7..5c09f365c842 100644 --- a/arch/powerpc/lib/sstep.c +++ b/arch/powerpc/lib/sstep.c | |||
@@ -1198,7 +1198,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | |||
1198 | sh = regs->gpr[rb] & 0x3f; | 1198 | sh = regs->gpr[rb] & 0x3f; |
1199 | ival = (signed int) regs->gpr[rd]; | 1199 | ival = (signed int) regs->gpr[rd]; |
1200 | regs->gpr[ra] = ival >> (sh < 32 ? sh : 31); | 1200 | regs->gpr[ra] = ival >> (sh < 32 ? sh : 31); |
1201 | if (ival < 0 && (sh >= 32 || (ival & ((1 << sh) - 1)) != 0)) | 1201 | if (ival < 0 && (sh >= 32 || (ival & ((1ul << sh) - 1)) != 0)) |
1202 | regs->xer |= XER_CA; | 1202 | regs->xer |= XER_CA; |
1203 | else | 1203 | else |
1204 | regs->xer &= ~XER_CA; | 1204 | regs->xer &= ~XER_CA; |
@@ -1208,7 +1208,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | |||
1208 | sh = rb; | 1208 | sh = rb; |
1209 | ival = (signed int) regs->gpr[rd]; | 1209 | ival = (signed int) regs->gpr[rd]; |
1210 | regs->gpr[ra] = ival >> sh; | 1210 | regs->gpr[ra] = ival >> sh; |
1211 | if (ival < 0 && (ival & ((1 << sh) - 1)) != 0) | 1211 | if (ival < 0 && (ival & ((1ul << sh) - 1)) != 0) |
1212 | regs->xer |= XER_CA; | 1212 | regs->xer |= XER_CA; |
1213 | else | 1213 | else |
1214 | regs->xer &= ~XER_CA; | 1214 | regs->xer &= ~XER_CA; |
@@ -1216,7 +1216,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | |||
1216 | 1216 | ||
1217 | #ifdef __powerpc64__ | 1217 | #ifdef __powerpc64__ |
1218 | case 27: /* sld */ | 1218 | case 27: /* sld */ |
1219 | sh = regs->gpr[rd] & 0x7f; | 1219 | sh = regs->gpr[rb] & 0x7f; |
1220 | if (sh < 64) | 1220 | if (sh < 64) |
1221 | regs->gpr[ra] = regs->gpr[rd] << sh; | 1221 | regs->gpr[ra] = regs->gpr[rd] << sh; |
1222 | else | 1222 | else |
@@ -1235,7 +1235,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | |||
1235 | sh = regs->gpr[rb] & 0x7f; | 1235 | sh = regs->gpr[rb] & 0x7f; |
1236 | ival = (signed long int) regs->gpr[rd]; | 1236 | ival = (signed long int) regs->gpr[rd]; |
1237 | regs->gpr[ra] = ival >> (sh < 64 ? sh : 63); | 1237 | regs->gpr[ra] = ival >> (sh < 64 ? sh : 63); |
1238 | if (ival < 0 && (sh >= 64 || (ival & ((1 << sh) - 1)) != 0)) | 1238 | if (ival < 0 && (sh >= 64 || (ival & ((1ul << sh) - 1)) != 0)) |
1239 | regs->xer |= XER_CA; | 1239 | regs->xer |= XER_CA; |
1240 | else | 1240 | else |
1241 | regs->xer &= ~XER_CA; | 1241 | regs->xer &= ~XER_CA; |
@@ -1246,7 +1246,7 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | |||
1246 | sh = rb | ((instr & 2) << 4); | 1246 | sh = rb | ((instr & 2) << 4); |
1247 | ival = (signed long int) regs->gpr[rd]; | 1247 | ival = (signed long int) regs->gpr[rd]; |
1248 | regs->gpr[ra] = ival >> sh; | 1248 | regs->gpr[ra] = ival >> sh; |
1249 | if (ival < 0 && (ival & ((1 << sh) - 1)) != 0) | 1249 | if (ival < 0 && (ival & ((1ul << sh) - 1)) != 0) |
1250 | regs->xer |= XER_CA; | 1250 | regs->xer |= XER_CA; |
1251 | else | 1251 | else |
1252 | regs->xer &= ~XER_CA; | 1252 | regs->xer &= ~XER_CA; |
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c index 022b38e6a80b..2d0b4d68a40a 100644 --- a/arch/powerpc/platforms/pseries/dlpar.c +++ b/arch/powerpc/platforms/pseries/dlpar.c | |||
@@ -86,6 +86,7 @@ static struct device_node *dlpar_parse_cc_node(struct cc_workarea *ccwa, | |||
86 | } | 86 | } |
87 | 87 | ||
88 | of_node_set_flag(dn, OF_DYNAMIC); | 88 | of_node_set_flag(dn, OF_DYNAMIC); |
89 | of_node_init(dn); | ||
89 | 90 | ||
90 | return dn; | 91 | return dn; |
91 | } | 92 | } |
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c index 0435bb65d0aa..1c0a60d98867 100644 --- a/arch/powerpc/platforms/pseries/reconfig.c +++ b/arch/powerpc/platforms/pseries/reconfig.c | |||
@@ -69,6 +69,7 @@ static int pSeries_reconfig_add_node(const char *path, struct property *proplist | |||
69 | 69 | ||
70 | np->properties = proplist; | 70 | np->properties = proplist; |
71 | of_node_set_flag(np, OF_DYNAMIC); | 71 | of_node_set_flag(np, OF_DYNAMIC); |
72 | of_node_init(np); | ||
72 | 73 | ||
73 | np->parent = derive_parent(path); | 74 | np->parent = derive_parent(path); |
74 | if (IS_ERR(np->parent)) { | 75 | if (IS_ERR(np->parent)) { |