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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'powerpc-5.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:
"A couple of weeks of fixes.

There's one fix for an oops on Power9 machines with Open CAPI
adapters.

And a fix for probable memory corruption in some of the new NPU code,
caught by smatch though and not seen in the wild.

Plus a few other minor fixes.

There's one non-fix which is the perf_regs change. That was sent
during the merge window but I accidentally only merged the first of
two patches in the series. It's been in linux-next so hopefully
doesn't conflict with anything in acme's tree.

Thanks to: Alexey Kardashevskiy, Andrew Donnellan, Breno Leitao,
Christian Lamparter, Christophe Leroy, Dan Carpenter, Frederic Barrat,
Greg Kurz, Jason A. Donenfeld, Madhavan Srinivasan"

* tag 'powerpc-5.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/syscalls: Fix syscall tracing
powerpc/pseries: Fix build break due to pnv_npu2_init()
powerpc/4xx/ocm: Fix fix for phys_addr_t printf warnings
powerpc/powernv/npu: Fix oops in pnv_try_setup_npu_table_group()
powerpc/tm: Limit TM code inside PPC_TRANSACTIONAL_MEM
powerpc/8xx: fix setting of pagetable for Abatron BDI debug tool.
powerpc/powernv/npu: Allocate enough memory in pnv_try_setup_npu_table_group()
powerpc/perf: Update perf_regs structure to include MMCRA

+25 -17
+1
arch/powerpc/include/uapi/asm/perf_regs.h
··· 47 47 PERF_REG_POWERPC_DAR, 48 48 PERF_REG_POWERPC_DSISR, 49 49 PERF_REG_POWERPC_SIER, 50 + PERF_REG_POWERPC_MMCRA, 50 51 PERF_REG_POWERPC_MAX, 51 52 }; 52 53 #endif /* _UAPI_ASM_POWERPC_PERF_REGS_H */
+2 -1
arch/powerpc/kernel/head_8xx.S
··· 852 852 853 853 /* set up the PTE pointers for the Abatron bdiGDB. 854 854 */ 855 - tovirt(r6,r6) 856 855 lis r5, abatron_pteptrs@h 857 856 ori r5, r5, abatron_pteptrs@l 858 857 stw r5, 0xf0(0) /* Must match your Abatron config file */ 859 858 tophys(r5,r5) 859 + lis r6, swapper_pg_dir@h 860 + ori r6, r6, swapper_pg_dir@l 860 861 stw r6, 0(r5) 861 862 862 863 /* Now turn on the MMU for real! */
+4 -3
arch/powerpc/kernel/signal_64.c
··· 755 755 if (restore_tm_sigcontexts(current, &uc->uc_mcontext, 756 756 &uc_transact->uc_mcontext)) 757 757 goto badframe; 758 - } 758 + } else 759 759 #endif 760 - /* Fall through, for non-TM restore */ 761 - if (!MSR_TM_ACTIVE(msr)) { 760 + { 762 761 /* 762 + * Fall through, for non-TM restore 763 + * 763 764 * Unset MSR[TS] on the thread regs since MSR from user 764 765 * context does not have MSR active, and recheckpoint was 765 766 * not called since restore_tm_sigcontexts() was not called
-7
arch/powerpc/kernel/trace/ftrace.c
··· 967 967 } 968 968 #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ 969 969 970 - #if defined(CONFIG_FTRACE_SYSCALLS) && defined(CONFIG_PPC64) 971 - unsigned long __init arch_syscall_addr(int nr) 972 - { 973 - return sys_call_table[nr*2]; 974 - } 975 - #endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_PPC64 */ 976 - 977 970 #ifdef PPC64_ELF_ABI_v1 978 971 char *arch_ftrace_match_adjust(char *str, const char *search) 979 972 {
+6
arch/powerpc/perf/perf_regs.c
··· 70 70 PT_REGS_OFFSET(PERF_REG_POWERPC_DAR, dar), 71 71 PT_REGS_OFFSET(PERF_REG_POWERPC_DSISR, dsisr), 72 72 PT_REGS_OFFSET(PERF_REG_POWERPC_SIER, dar), 73 + PT_REGS_OFFSET(PERF_REG_POWERPC_MMCRA, dsisr), 73 74 }; 74 75 75 76 u64 perf_reg_value(struct pt_regs *regs, int idx) ··· 82 81 (IS_ENABLED(CONFIG_FSL_EMB_PERF_EVENT) || 83 82 IS_ENABLED(CONFIG_PPC32) || 84 83 !is_sier_available())) 84 + return 0; 85 + 86 + if (idx == PERF_REG_POWERPC_MMCRA && 87 + (IS_ENABLED(CONFIG_FSL_EMB_PERF_EVENT) || 88 + IS_ENABLED(CONFIG_PPC32))) 85 89 return 0; 86 90 87 91 return regs_get_register(regs, pt_regs_offset[idx]);
+3 -3
arch/powerpc/platforms/4xx/ocm.c
··· 237 237 continue; 238 238 239 239 seq_printf(m, "PPC4XX OCM : %d\n", ocm->index); 240 - seq_printf(m, "PhysAddr : %pa[p]\n", &(ocm->phys)); 240 + seq_printf(m, "PhysAddr : %pa\n", &(ocm->phys)); 241 241 seq_printf(m, "MemTotal : %d Bytes\n", ocm->memtotal); 242 242 seq_printf(m, "MemTotal(NC) : %d Bytes\n", ocm->nc.memtotal); 243 243 seq_printf(m, "MemTotal(C) : %d Bytes\n\n", ocm->c.memtotal); 244 244 245 - seq_printf(m, "NC.PhysAddr : %pa[p]\n", &(ocm->nc.phys)); 245 + seq_printf(m, "NC.PhysAddr : %pa\n", &(ocm->nc.phys)); 246 246 seq_printf(m, "NC.VirtAddr : 0x%p\n", ocm->nc.virt); 247 247 seq_printf(m, "NC.MemTotal : %d Bytes\n", ocm->nc.memtotal); 248 248 seq_printf(m, "NC.MemFree : %d Bytes\n", ocm->nc.memfree); ··· 252 252 blk->size, blk->owner); 253 253 } 254 254 255 - seq_printf(m, "\nC.PhysAddr : %pa[p]\n", &(ocm->c.phys)); 255 + seq_printf(m, "\nC.PhysAddr : %pa\n", &(ocm->c.phys)); 256 256 seq_printf(m, "C.VirtAddr : 0x%p\n", ocm->c.virt); 257 257 seq_printf(m, "C.MemTotal : %d Bytes\n", ocm->c.memtotal); 258 258 seq_printf(m, "C.MemFree : %d Bytes\n", ocm->c.memfree);
+1 -1
arch/powerpc/platforms/powernv/npu-dma.c
··· 564 564 } 565 565 } else { 566 566 /* Create a group for 1 GPU and attached NPUs for POWER8 */ 567 - pe->npucomp = kzalloc(sizeof(pe->npucomp), GFP_KERNEL); 567 + pe->npucomp = kzalloc(sizeof(*pe->npucomp), GFP_KERNEL); 568 568 table_group = &pe->npucomp->table_group; 569 569 table_group->ops = &pnv_npu_peers_ops; 570 570 iommu_register_group(table_group, hose->global_number,
+2 -1
arch/powerpc/platforms/powernv/pci-ioda.c
··· 2681 2681 list_for_each_entry(hose, &hose_list, list_node) { 2682 2682 phb = hose->private_data; 2683 2683 2684 - if (phb->type == PNV_PHB_NPU_NVLINK) 2684 + if (phb->type == PNV_PHB_NPU_NVLINK || 2685 + phb->type == PNV_PHB_NPU_OCAPI) 2685 2686 continue; 2686 2687 2687 2688 list_for_each_entry(pe, &phb->ioda.pe_list, list) {
+2
arch/powerpc/platforms/pseries/pci.c
··· 264 264 if (!of_device_is_compatible(nvdn->parent, 265 265 "ibm,power9-npu")) 266 266 continue; 267 + #ifdef CONFIG_PPC_POWERNV 267 268 WARN_ON_ONCE(pnv_npu2_init(hose)); 269 + #endif 268 270 break; 269 271 } 270 272 }
+1
tools/arch/powerpc/include/uapi/asm/perf_regs.h
··· 47 47 PERF_REG_POWERPC_DAR, 48 48 PERF_REG_POWERPC_DSISR, 49 49 PERF_REG_POWERPC_SIER, 50 + PERF_REG_POWERPC_MMCRA, 50 51 PERF_REG_POWERPC_MAX, 51 52 }; 52 53 #endif /* _UAPI_ASM_POWERPC_PERF_REGS_H */
+2 -1
tools/perf/arch/powerpc/include/perf_regs.h
··· 63 63 [PERF_REG_POWERPC_TRAP] = "trap", 64 64 [PERF_REG_POWERPC_DAR] = "dar", 65 65 [PERF_REG_POWERPC_DSISR] = "dsisr", 66 - [PERF_REG_POWERPC_SIER] = "sier" 66 + [PERF_REG_POWERPC_SIER] = "sier", 67 + [PERF_REG_POWERPC_MMCRA] = "mmcra" 67 68 }; 68 69 69 70 static inline const char *perf_reg_name(int id)
+1
tools/perf/arch/powerpc/util/perf_regs.c
··· 53 53 SMPL_REG(dar, PERF_REG_POWERPC_DAR), 54 54 SMPL_REG(dsisr, PERF_REG_POWERPC_DSISR), 55 55 SMPL_REG(sier, PERF_REG_POWERPC_SIER), 56 + SMPL_REG(mmcra, PERF_REG_POWERPC_MMCRA), 56 57 SMPL_REG_END 57 58 }; 58 59