Re: [PATCH] powerpc/process: Fix uninitialised variable error

2020-09-24 Thread Michael Ellerman
On Thu, 17 Sep 2020 12:45:09 +1000, Michael Ellerman wrote: > Clang, and GCC with -Wmaybe-uninitialized, can't see that val is > unused in get_fpexec_mode(): > > arch/powerpc/kernel/process.c:1940:7: error: variable 'val' is used > uninitialized whenever 'if' co

Re: [PATCH -next v2] powerpc/book3s64: fix link error with CONFIG_PPC_RADIX_MMU=n

2020-09-24 Thread Michael Ellerman
On Thu, 17 Sep 2020 10:06:43 +0800, Yang Yingliang wrote: > Fix link error when CONFIG_PPC_RADIX_MMU is disabled: > powerpc64-linux-gnu-ld: arch/powerpc/platforms/pseries/lpar.o:(.toc+0x0): > undefined reference to `mmu_pid_bits' Applied to powerpc/next. [1/1] powerpc/book3s64: fix link error

Re: [PATCH v2 0/4] more mm switching vs TLB shootdown and lazy tlb fixes

2020-09-24 Thread Michael Ellerman
On Mon, 14 Sep 2020 14:52:15 +1000, Nicholas Piggin wrote: > This is an attempt to fix a few different related issues around > switching mm, TLB flushing, and lazy tlb mm handling. > > This will require all architectures to eventually move to disabling > irqs over activate_mm, but it's possible

Re: [PATCH] powerpc/prom_init: Check display props exist before enabling btext

2020-09-24 Thread Michael Ellerman
On Fri, 21 Aug 2020 20:34:07 +1000, Michael Ellerman wrote: > It's possible to enable CONFIG_PPC_EARLY_DEBUG_BOOTX for a pseries > kernel (maybe it shouldn't be), which is then booted with qemu/slof. > > But if you do that the kernel crashes in draw_byte(), with a DAR > pointing

Re: [PATCH 1/3] powerpc: Move arch_cpu_idle_dead() into smp.c

2020-09-24 Thread Michael Ellerman
On Wed, 19 Aug 2020 11:56:32 +1000, Michael Ellerman wrote: > arch_cpu_idle_dead() is in idle.c, which makes sense, but it's inside > a CONFIG_HOTPLUG_CPU block. > > It would be more at home in smp.c, inside the existing > CONFIG_HOTPLUG_CPU block. Note that CONFIG_HOTP

Re: [PATCH 1/2] powerpc/mm/64s: Fix slb_setup_new_exec() sparse warning

2020-09-24 Thread Michael Ellerman
On Wed, 16 Sep 2020 21:56:36 +1000, Michael Ellerman wrote: > Sparse says: > symbol slb_setup_new_exec was not declared. Should it be static? > > No, it should have a declaration in a header, add one. Applied to powerpc/next. [1/2] powerpc/mm/64s: Fix slb_setup_new_exec() sp

Re: [PATCH -next] serial: pmac_zilog: use for_each_child_of_node() macro

2020-09-24 Thread Michael Ellerman
On Wed, 16 Sep 2020 14:21:38 +0800, Qinglang Miao wrote: > Use for_each_child_of_node() macro instead of open coding it. Applied to powerpc/next. [1/1] serial: pmac_zilog: use for_each_child_of_node() macro https://git.kernel.org/powerpc/c/1d42e07e9c249b7a032fba82b673ee8a8d6bd7b7 cheers

Re: [PATCH -next] powerpc/powernv: fix wrong warning message in opalcore_config_init()

2020-09-24 Thread Michael Ellerman
On Wed, 16 Sep 2020 14:21:29 +0800, Qinglang Miao wrote: > The logic of the warn output is incorrect. The two args should be > exchanged. Applied to powerpc/next. [1/1] powerpc/powernv: fix wrong warning message in opalcore_config_init()

Re: [PATCH -next] macintosh: smu_sensors: use for_each_child_of_node() macro

2020-09-24 Thread Michael Ellerman
On Wed, 16 Sep 2020 14:21:25 +0800, Qinglang Miao wrote: > Use for_each_child_of_node() macro instead of open coding it. Applied to powerpc/next. [1/1] macintosh: smu_sensors: use for_each_child_of_node() macro https://git.kernel.org/powerpc/c/acff5e6c37fa4bf8d002c917a762c4f7615f6eaf

Re: [PATCH -next] drivers/macintosh/smu.c: use for_each_child_of_node() macro

2020-09-24 Thread Michael Ellerman
On Wed, 16 Sep 2020 14:21:22 +0800, Qinglang Miao wrote: > Use for_each_child_of_node() macro instead of open coding it. Applied to powerpc/next. [1/1] drivers/macintosh/smu.c: use for_each_child_of_node() macro https://git.kernel.org/powerpc/c/9c826d31a73815464bd3df81e56d39b3d908ac73

Re: [PATCH -next] powerpc/pseries: convert to use DEFINE_SEQ_ATTRIBUTE macro

2020-09-24 Thread Michael Ellerman
On Wed, 16 Sep 2020 10:50:26 +0800, Liu Shixin wrote: > Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. Applied to powerpc/next. [1/1] powerpc/pseries: convert to use DEFINE_SEQ_ATTRIBUTE macro https://git.kernel.org/powerpc/c/96543e7352bded5d6d1a0e0022376ebdd6c1b8ab cheers

Re: [PATCH v2 0/7] powerpc: Fix a few W=1 compile warnings

2020-09-24 Thread Michael Ellerman
On Mon, 14 Sep 2020 23:10:00 +0200, Cédric Le Goater wrote: > Here is a small contribution improving compile with W=1. > > Thanks, > > C. > > Changes in v2: > > [...] Patches 1, 3, 4 and 7 applied to powerpc/next. [1/7] powerpc/sysfs: Remove unused 'err' variable in

[GIT PULL] Please pull powerpc/linux.git powerpc-5.9-5 tag

2020-09-18 Thread Michael Ellerman
support on powerpc Gautham R. Shenoy (1): cpuidle: pseries: Fix CEDE latency conversion from tb to us Michael Ellerman (2): selftests/powerpc: Skip PROT_SAO test in guests/LPARS Revert "powerpc/build: vdso linker warning for orphan sections" Vaibhav Jain (1):

Re: [PATCH v2 1/4] mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race

2020-09-18 Thread Michael Ellerman
Nicholas Piggin writes: > Excerpts from pet...@infradead.org's message of September 14, 2020 8:56 pm: >> On Mon, Sep 14, 2020 at 02:52:16PM +1000, Nicholas Piggin wrote: >>> Reading and modifying current->mm and current->active_mm and switching >>> mm should be done with irqs off, to prevent

Re: [PATCH 6/6] powerpc/64: irq replay remove decrementer overflow check

2020-09-18 Thread Michael Ellerman
Nicholas Piggin writes: > This is an ad-hoc way to catch some cases of decrementer overflow. It > won't catch cases where interrupts were hard disabled before any soft > masked interrupts fired, for example. And it doesn't catch cases that > have overflowed an even number of times. > > It's not

Re: [PATCH v6 0/8] powerpc/watchpoint: Bug fixes plus new feature flag

2020-09-18 Thread Michael Ellerman
Rogerio Alves writes: > On 9/2/20 1:29 AM, Ravi Bangoria wrote: >> Patch #1 fixes issue for quardword instruction on p10 predecessors. >> Patch #2 fixes issue for vector instructions. >> Patch #3 fixes a bug about watchpoint not firing when created with >> ptrace PPC_PTRACE_SETHWDEBUG

Re: [PATCH v2 1/2] powerpc/64: Set up a kernel stack for secondaries before cpu_restore()

2020-09-18 Thread Michael Ellerman
Hi Jordan, Jordan Niethe writes: > Currently in generic_secondary_smp_init(), cur_cpu_spec->cpu_restore() > is called before a stack has been set up in r1. This was previously fine > as the cpu_restore() functions were implemented in assembly and did not > use a stack. However commit

Re: [PATCH 2/3] powerpc/mce: Add debugfs interface to inject MCE

2020-09-18 Thread Michael Ellerman
Hi Ganesh, Ganesh Goudar writes: > To test machine check handling, add debugfs interface to inject > slb multihit errors. > > To inject slb multihit: > #echo 1 > /sys/kernel/debug/powerpc/mce_error_inject/inject_slb_multihit Rather than creating a new ad-hoc way to trigger this, can you please

Re: [PATCH -next] ide: Fix symbol undeclared warnings

2020-09-18 Thread Michael Ellerman
David Miller writes: > From: Michael Ellerman > Date: Thu, 17 Sep 2020 22:01:00 +1000 > >> Wang Wensheng writes: >>> Build the object file with `C=2` and get the following warnings: >>> make allmodconfig ARCH=powerpc CROSS_COMPILE=powerpc64-linux-gnu- >

Re: [PATCH] selftests/seccomp: fix ptrace tests on powerpc

2020-09-18 Thread Michael Ellerman
Thadeu Lima de Souza Cascardo writes: > On Thu, Sep 17, 2020 at 03:37:16PM -0700, Kees Cook wrote: >> On Sun, Sep 13, 2020 at 10:34:23PM +1000, Michael Ellerman wrote: >> > Thadeu Lima de Souza Cascardo writes: >> > > On Tue, Sep 08, 2020 at 04:18:17PM -0700, Kees C

Re: [PATCH] powerpc/perf: Exclude pmc5/6 from the irrelevant PMU group constraints

2020-09-17 Thread Michael Ellerman
Athira Rajeev writes: > PMU counter support functions enforces event constraints for group of > events to check if all events in a group can be monitored. Incase of > event codes using PMC5 and PMC6 ( 500fa and 600f4 respectively ), > not all constraints are applicable, say the threshold or

Re: [PATCH -next] ide: Fix symbol undeclared warnings

2020-09-17 Thread Michael Ellerman
Wang Wensheng writes: > Build the object file with `C=2` and get the following warnings: > make allmodconfig ARCH=powerpc CROSS_COMPILE=powerpc64-linux-gnu- > make C=2 drivers/ide/pmac.o ARCH=powerpc64 > CROSS_COMPILE=powerpc64-linux-gnu- > > drivers/ide/pmac.c:228:23: warning: symbol

Re: [PATCH v2] powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h

2020-09-17 Thread Michael Ellerman
[ Cc += linux-arch & Arnd ] Hi Tony, This looks OK to me, but I'm always a bit nervous about changes in uapi. I've Cc'ed linux-arch and Arnd who look after the asm-generic headers, which this is slightly related to, just in case. One minor comment below. Tony Ambardar writes: > A few archs

Re: [PATCH] powerpc/64: Make VDSO32 track COMPAT on 64-bit

2020-09-17 Thread Michael Ellerman
On Tue, 8 Sep 2020 22:58:50 +1000, Michael Ellerman wrote: > When we added the VDSO32 kconfig symbol, which controls building of > the 32-bit VDSO, we made it depend on CPU_BIG_ENDIAN (for 64-bit). > > That was because back then COMPAT was always enabled for 64-bit, so > depend

Re: [PATCH] powerpc/ps3: make two symbols static

2020-09-17 Thread Michael Ellerman
On Fri, 11 Sep 2020 10:01:21 +0800, Jason Yan wrote: > This addresses the following sparse warning: > > arch/powerpc/platforms/ps3/spu.c:451:33: warning: symbol > 'spu_management_ps3_ops' was not declared. Should it be static? > arch/powerpc/platforms/ps3/spu.c:592:28: warning: symbol >

Re: [PATCH -next] drivers/macintosh/smu.c: Fix undeclared symbol warning

2020-09-17 Thread Michael Ellerman
On Mon, 14 Sep 2020 12:26:15 +, Wang Wensheng wrote: > Make kernel with `C=2`: > drivers/macintosh/smu.c:1018:30: warning: symbol > '__smu_get_sdb_partition' was not declared. Should it be static? Applied to powerpc/next. [1/1] drivers/macintosh/smu.c: Fix undeclared symbol warning

Re: [PATCH v2] powerpc/papr_scm: Fix warning triggered by perf_stats_show()

2020-09-17 Thread Michael Ellerman
On Sat, 12 Sep 2020 13:44:51 +0530, Vaibhav Jain wrote: > A warning is reported by the kernel in case perf_stats_show() returns > an error code. The warning is of the form below: > > papr_scm ibm,persistent-memory:ibm,pmemory@4411: > Failed to query performance stats, Err:-10 >

Re: [PATCH v6 0/3] Offline memoryless cpuless node 0

2020-09-17 Thread Michael Ellerman
On Tue, 18 Aug 2020 13:41:01 +0530, Srikar Dronamraju wrote: > Changelog v5:->v6: > - Now the fix is Powerpc specific. > (David Hildenbrand, Michal Hocko, Christopher Lamater) > - rebased to v5.8 > link v5: >

Re: [PATCH v5 00/10] Coregroup support on Powerpc

2020-09-17 Thread Michael Ellerman
no need for generalization > (Michael Ellerman, Peter Zijlstra, >Valentin Schneider, Gautham R. Shenoy) > > [...] Applied to powerpc/next. [01/10] powerpc/smp: Fix a warning under !NEED_MULTIPLE_NODES https://git.kernel.org/powerpc/c/d0fd24bbd27619d7b

Re: [PATCH v3] powerpc/numa: Restrict possible nodes based on platform

2020-09-17 Thread Michael Ellerman
On Mon, 17 Aug 2020 11:22:57 +0530, Srikar Dronamraju wrote: > As per draft LoPAPR (Revision 2.9_pre7), section B.5.3 "Run Time Abstaction > Services (RTAS) Node at > https://openpowerfoundation.org/wp-content/uploads/2020/07/LoPAR-20200611.pdf, > there are 2 device tree property

Re: [PATCH v2 1/2] sched/topology: Allow archs to override cpu_smt_mask

2020-09-17 Thread Michael Ellerman
On Fri, 7 Aug 2020 13:15:16 +0530, Srikar Dronamraju wrote: > cpu_smt_mask tracks topology_sibling_cpumask. This would be good for > most architectures. One of the users of cpu_smt_mask(), would be to > identify idle-cores. On Power9, a pair of SMT4 cores can be presented by > the firmware as a

Re: [PATCH v6 0/8] powerpc/watchpoint: Bug fixes plus new feature flag

2020-09-17 Thread Michael Ellerman
On Wed, 2 Sep 2020 09:59:37 +0530, Ravi Bangoria wrote: > Patch #1 fixes issue for quardword instruction on p10 predecessors. > Patch #2 fixes issue for vector instructions. > Patch #3 fixes a bug about watchpoint not firing when created with > ptrace PPC_PTRACE_SETHWDEBUG and

Re: [PATCH] powerpc/powernv/idle: add a basic stop 0-3 driver for POWER10

2020-09-17 Thread Michael Ellerman
On Wed, 19 Aug 2020 19:47:00 +1000, Nicholas Piggin wrote: > This driver does not restore stop > 3 state, so it limits itself > to states which do not lose full state or TB. > > The POWER10 SPRs are sufficiently different from P9 that it seems > easier to split out the P10 code. The POWER10 deep

Re: [PATCH 0/5] powerpc/tau: TAU driver fixes

2020-09-17 Thread Michael Ellerman
On Sat, 05 Sep 2020 09:02:20 +1000, Finn Thain wrote: > This patch series fixes various bugs in the Thermal Assist Unit driver. > It was tested on 266 MHz and 292 MHz PowerBook G3 laptops. > > > Finn Thain (5): > powerpc/tau: Use appropriate temperature sample interval > powerpc/tau: Convert

Re: [PATCH -next] macintosh: windfarm: use for_each_child_of_node() macro

2020-09-17 Thread Michael Ellerman
On Mon, 14 Sep 2020 14:14:11 +0800, Qinglang Miao wrote: > Use for_each_child_of_node() macro instead of open coding it. Applied to powerpc/next. [1/1] macintosh: windfarm: use for_each_child_of_node() macro https://git.kernel.org/powerpc/c/8f7e57e8e29c4fc788811dd4db96126272b8df91 cheers

Re: [PATCH v2] powerpc/pci: unmap legacy INTx interrupts when a PHB is removed

2020-09-17 Thread Michael Ellerman
On Fri, 7 Aug 2020 12:18:54 +0200, Cédric Le Goater wrote: > When a passthrough IO adapter is removed from a pseries machine using > hash MMU and the XIVE interrupt mode, the POWER hypervisor expects the > guest OS to clear all page table entries related to the adapter. If > some are still

Re: [PATCH v2] powerpc/powermac: Fix low_sleep_handler with KUAP and KUEP

2020-09-17 Thread Michael Ellerman
On Fri, 11 Sep 2020 10:29:15 + (UTC), Christophe Leroy wrote: > low_sleep_handler() has an hardcoded restore of segment registers > that doesn't take KUAP and KUEP into account. > > Use head_32's load_segment_registers() routine instead. Applied to powerpc/next. [1/1] powerpc/powermac: Fix

Re: [PATCH v1] powerpc/process: Tag an #endif to help locate the matching #ifdef.

2020-09-17 Thread Michael Ellerman
On Mon, 17 Aug 2020 05:46:45 + (UTC), Christophe Leroy wrote: > That #endif is more than 100 lines after the matching #ifdef, > and there are several #ifdef/#else/#endif inbetween. > > Tag it as /* CONFIG_PPC_BOOK3S_64 */ to help locate the > matching #ifdef. Applied to powerpc/next. [1/1]

Re: [PATCH v1] powerpc/process: Replace #ifdef CONFIG_KALLSYMS by IS_ENABLED()

2020-09-17 Thread Michael Ellerman
On Mon, 17 Aug 2020 05:46:44 + (UTC), Christophe Leroy wrote: > The #ifdef CONFIG_KALLSYMS encloses some printk which can > compile in all cases. > > Replace by IS_ENABLED(). Applied to powerpc/next. [1/1] powerpc/process: Replace #ifdef CONFIG_KALLSYMS by IS_ENABLED()

Re: [PATCH v1] powerpc/process: Replace an #ifdef CONFIG_PPC_BOOK3S_64 by IS_ENABLED()

2020-09-17 Thread Michael Ellerman
On Mon, 17 Aug 2020 05:46:42 + (UTC), Christophe Leroy wrote: > This #ifdef CONFIG_PPC_BOOK3S_64 calls preload_new_slb_context() > when radix is not enabled. > > radix_enabled() is always defined, and the prototype for > preload_new_slb_context() is always present, so the #ifdef > is

Re: [PATCH v1] powerpc/process: Replace an #ifdef CONFIG_PPC_47x by IS_ENABLED()

2020-09-17 Thread Michael Ellerman
On Mon, 17 Aug 2020 05:46:41 + (UTC), Christophe Leroy wrote: > isync() is always defined, no need for an #ifdef. > > Replace it by IS_ENABLED(CONFIG_PPC_47x). Applied to powerpc/next. [1/1] powerpc/process: Replace an #ifdef CONFIG_PPC_47x by IS_ENABLED()

Re: [PATCH v1] powerpc/process: Replace an #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) by IS_ENABLED()

2020-09-17 Thread Michael Ellerman
On Mon, 17 Aug 2020 05:46:43 + (UTC), Christophe Leroy wrote: > The #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) encloses some > printk which can be compiled in all cases. > > Replace by IS_ENABLED(). Applied to powerpc/next. [1/1] powerpc/process: Replace an #if defined(CONFIG_4xx) ||

Re: [PATCH v1 1/4] powerpc/process: Remove useless #ifdef CONFIG_VSX

2020-09-17 Thread Michael Ellerman
On Mon, 17 Aug 2020 05:47:55 + (UTC), Christophe Leroy wrote: > cpu_has_feature(CPU_FTR_VSX) returns false when CONFIG_VSX is > not set. > > There is no need to enclose the test in an #ifdef CONFIG_VSX. > Remove it. Applied to powerpc/next. [1/4] powerpc/process: Remove useless #ifdef

Re: [PATCH] powerpc/uaccess: Add pre-update addressing to __put_user_asm_goto()

2020-09-17 Thread Michael Ellerman
On Fri, 4 Sep 2020 10:46:47 + (UTC), Christophe Leroy wrote: > Enable pre-update addressing mode in __put_user_asm_goto() Applied to powerpc/next. [1/1] powerpc/uaccess: Add pre-update addressing to __put_user_asm_goto()

Re: [PATCH] powerpc/kasan: Fix CONFIG_KASAN_VMALLOC for 8xx

2020-09-17 Thread Michael Ellerman
On Fri, 11 Sep 2020 05:05:38 + (UTC), Christophe Leroy wrote: > Before the commit identified below, pages tables allocation was > performed after the allocation of final shadow area for linear memory. > But that commit switched the order, leading to page tables being > already allocated at the

Re: [PATCH] powerpc: Fix random segfault when freeing hugetlb range

2020-09-17 Thread Michael Ellerman
On Mon, 31 Aug 2020 07:58:19 + (UTC), Christophe Leroy wrote: > The following random segfault is observed from time to time with > map_hugetlb selftest: > > root@localhost:~# ./map_hugetlb 1 19 > 524288 kB hugepages > Mapping 1 Mbytes > Segmentation fault > > [...] Applied to powerpc/next.

Re: [PATCH 1/3] powerpc/uaccess: Switch __put_user_size_allowed() to __put_user_asm_goto()

2020-09-17 Thread Michael Ellerman
On Fri, 4 Sep 2020 11:01:30 + (UTC), Christophe Leroy wrote: > __put_user_asm_goto() provides more flexibility to GCC and avoids using > a local variable to tell if the write succeeded or not. > GCC can then avoid implementing a cmp in the fast path. > > See the difference for a small

Re: [PATCH 1/2] powerpc/8xx: Refactor calculation of number of entries per PTE in page tables

2020-09-17 Thread Michael Ellerman
On Mon, 31 Aug 2020 08:30:43 + (UTC), Christophe Leroy wrote: > On 8xx, the number of entries occupied by a PTE in the page tables > depends on the size of the page. At the time being, this calculation > is done in two places: in pte_update() and in set_huge_pte_at() > > Refactor this

Re: [PATCH 1/2] powerpc/32: Fix vmap stack - Do not activate MMU before reading task struct

2020-09-17 Thread Michael Ellerman
On Mon, 7 Sep 2020 13:42:09 + (UTC), Christophe Leroy wrote: > We need r1 to be properly set before activating MMU, so > reading task_struct->stack must be done with MMU off. > > This means we need an additional register to play with MSR > bits while r11 now points to the stack. For that,

Re: [PATCH v3] powerpc/pseries/svm: Allocate SWIOTLB buffer anywhere in memory

2020-09-17 Thread Michael Ellerman
On Tue, 18 Aug 2020 19:11:26 -0300, Thiago Jung Bauermann wrote: > POWER secure guests (i.e., guests which use the Protection Execution > Facility) need to use SWIOTLB to be able to do I/O with the hypervisor, but > they don't need the SWIOTLB memory to be in low addresses since the > hypervisor

Re: [PATCH v2 1/4] powerpc/percpu: Update percpu bootmem allocator

2020-09-17 Thread Michael Ellerman
On Mon, 8 Jun 2020 12:39:01 +0530, Aneesh Kumar K.V wrote: > This update the ppc64 version to be closer to x86/sparc. Applied to powerpc/next. [1/4] powerpc/percpu: Update percpu bootmem allocator https://git.kernel.org/powerpc/c/2a32abac8860aa1c3a1fc99973ce67179575b36c [2/4]

Re: [PATCH] powerepc/book3s64/hash: Align start/end address correctly with bolt mapping

2020-09-17 Thread Michael Ellerman
On Mon, 7 Sep 2020 12:55:39 +0530, Aneesh Kumar K.V wrote: > This ensures we don't do a partial mapping of memory. With nvdimm, when > creating namespaces with size not aligned to 16MB, the kernel ends up > partially > mapping the pages. This can result in kernel adding multiple hash page table >

[PATCH] powerpc/process: Fix uninitialised variable error

2020-09-16 Thread Michael Ellerman
)) { ^~~~ We know that CPU_FTR_SPE will only be true iff CONFIG_SPE is also true, but the compiler doesn't. Avoid it by initialising val to zero. Reported-by: kernel test robot Fixes: 532ed1900d37 ("powerpc/process: Remove useless #ifdef CONFIG_SPE") Signed-off-by: Michae

[PATCH 1/2] powerpc/mm/64s: Fix slb_setup_new_exec() sparse warning

2020-09-16 Thread Michael Ellerman
Sparse says: symbol slb_setup_new_exec was not declared. Should it be static? No, it should have a declaration in a header, add one. Signed-off-by: Michael Ellerman --- arch/powerpc/mm/book3s64/internal.h| 2 ++ arch/powerpc/mm/book3s64/mmu_context.c | 4 ++-- 2 files changed, 4

[PATCH 2/2] powerpc/perf: Add declarations to fix sparse warnings

2020-09-16 Thread Michael Ellerman
in internal.h, so just make sure all the C files include that directly or indirectly. Signed-off-by: Michael Ellerman --- arch/powerpc/perf/isa207-common.h | 2 ++ arch/powerpc/perf/power10-pmu.c | 1 - arch/powerpc/perf/power5+-pmu.c | 2 ++ arch/powerpc/perf/power5-pmu.c| 2 ++ arch/powerpc

Re: Injecting SLB miltihit crashes kernel 5.9.0-rc5

2020-09-15 Thread Michael Ellerman
Michal Suchánek writes: > Hello, > > Using the SLB mutihit injection test module (which I did not write so I > do not want to post it here) to verify updates on my 5.3 frankernekernel > I found that the kernel crashes with Oops: kernel bad access. > > I tested on latest upstream kernel build that

Re: [PATCH 00/15] selftests/seccomp: Refactor change_syscall()

2020-09-15 Thread Michael Ellerman
Kees Cook writes: > On Mon, Sep 14, 2020 at 10:15:18PM +1000, Michael Ellerman wrote: >> Kees Cook writes: >> > Hi, >> > >> > This refactors the seccomp selftest macros used in change_syscall(), >> > in an effort to remove special cases for mips, arm

Re: [PATCH v2] powerpc/papr_scm: Fix warning triggered by perf_stats_show()

2020-09-15 Thread Michael Ellerman
Vaibhav Jain writes: > A warning is reported by the kernel in case perf_stats_show() returns > an error code. The warning is of the form below: > > papr_scm ibm,persistent-memory:ibm,pmemory@4411: > Failed to query performance stats, Err:-10 > dev_attr_show:

Re: [PATCH v2 1/4] mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race

2020-09-15 Thread Michael Ellerman
Nicholas Piggin writes: > Excerpts from pet...@infradead.org's message of September 14, 2020 8:56 pm: >> On Mon, Sep 14, 2020 at 02:52:16PM +1000, Nicholas Piggin wrote: >>> Reading and modifying current->mm and current->active_mm and switching >>> mm should be done with irqs off, to prevent

Re: [5.9.0-rc5-20200914] Kernel crash while running LTP(mlock201)

2020-09-15 Thread Michael Ellerman
Sachin Sant writes: > While running LTP tests (specifically mlock201) against next-20200914 tree > on a POWER9 LPAR results in following crash. Looks the same as: https://lore.kernel.org/linux-mm/20200914085545.GB28738@shao2-debian/ cheers > BUG: Kernel NULL pointer dereference on read at

Re: [PATCH 00/15] selftests/seccomp: Refactor change_syscall()

2020-09-14 Thread Michael Ellerman
e changes to deal with powerpc being oddball. Tested-by: Michael Ellerman (powerpc) cheers ./seccomp_bpf TAP version 13 1..86 # Starting 86 tests from 7 test cases. # RUN global.kcmp ... #OK global.kcmp ok 1 global.kcmp # RUN global.mode_stri

Re: [PATCH 13/15] selftests/seccomp: powerpc: Set syscall return during ptrace syscall exit

2020-09-13 Thread Michael Ellerman
Kees Cook writes: > Some archs (like ppc) only support changing the return code during > syscall exit when ptrace is used. As the syscall number might not > be available anymore during syscall exit, it needs to be saved > during syscall enter. Adjust the ptrace tests to do this. I'm not that

Re: [PATCH 12/15] selftests/seccomp: powerpc: Fix seccomp return value testing

2020-09-13 Thread Michael Ellerman
s(+) This looks right to me, and matches what strace does AFAICS. Reviewed-by: Michael Ellerman cheers > diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c > b/tools/testing/selftests/seccomp/seccomp_bpf.c > index 623953a53032..bbab2420d708 100644 > --- a/tools/testing/selft

Re: [PATCH] selftests/seccomp: fix ptrace tests on powerpc

2020-09-13 Thread Michael Ellerman
Thadeu Lima de Souza Cascardo writes: > On Tue, Sep 08, 2020 at 04:18:17PM -0700, Kees Cook wrote: >> On Tue, Jun 30, 2020 at 01:47:39PM -0300, Thadeu Lima de Souza Cascardo >> wrote: ... >> > @@ -1809,10 +1818,15 @@ void tracer_ptrace(struct __test_metadata >> > *_metadata, pid_t tracee, >> >

Re: [PATCH v2] selftests/seccomp: fix ptrace tests on powerpc

2020-09-13 Thread Michael Ellerman
Kees Cook writes: > On Fri, Sep 11, 2020 at 03:10:12PM -0300, Thadeu Lima de Souza Cascardo wrote: ... >> diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c >> b/tools/testing/selftests/seccomp/seccomp_bpf.c >> index 7a6d40286a42..0ddc0846e9c0 100644 >> ---

Re: [PATCH v5 05/10] powerpc/smp: Dont assume l2-cache to be superset of sibling

2020-09-12 Thread Michael Ellerman
Srikar Dronamraju writes: > * Michael Ellerman [2020-09-11 21:55:23]: > >> Srikar Dronamraju writes: >> > Current code assumes that cpumask of cpus sharing a l2-cache mask will >> > always be a superset of cpu_sibling_mask. >> > >> > Lets stop

Re: [PATCH v5 20/23] powerpc/book3s64/hash/kuap: Enable kuap on hash

2020-09-12 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > Signed-off-by: Aneesh Kumar K.V > --- > arch/powerpc/mm/book3s64/pkeys.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/arch/powerpc/mm/book3s64/pkeys.c > b/arch/powerpc/mm/book3s64/pkeys.c > index 391230f93da2..16ea0b2f0ea5 100644 >

Re: [PATCH] powerpc/traps: fix recoverability of machine check handling on book3s/32

2020-09-11 Thread Michael Ellerman
Michal Suchánek writes: > Hello, > > does this logic apply to "Unrecoverable System Reset" as well? Which logic do you mean? We do call die() before checking MSR_RI in system_reset_exception(): /* * No debugger or crash dump registered, print logs then * panic.

Re: [PATCH v1] pseries/hotplug-memory: hot-add: skip redundant LMB lookup

2020-09-11 Thread Michael Ellerman
Hi Scott, Scott Cheloha writes: > During memory hot-add, dlpar_add_lmb() calls memory_add_physaddr_to_nid() > to determine which node id (nid) to use when later calling __add_memory(). > ... > > Consider an LPAR with 126976 LMBs. In one test, hot-adding 126000 Nice little machine you got there

Re: [PATCH] powerpc/powermac: Fix low_sleep_handler with KUAP and KUEP

2020-09-11 Thread Michael Ellerman
Christophe Leroy writes: > Le 11/09/2020 à 01:56, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> low_sleep_handler() has an hardcoded restore of segment registers >>> that doesn't take KUAP and KUEP into account. >>> >>> Use head_

Re: [PATCH v5 05/10] powerpc/smp: Dont assume l2-cache to be superset of sibling

2020-09-11 Thread Michael Ellerman
Srikar Dronamraju writes: > Current code assumes that cpumask of cpus sharing a l2-cache mask will > always be a superset of cpu_sibling_mask. > > Lets stop that assumption. cpu_l2_cache_mask is a superset of > cpu_sibling_mask if and only if shared_caches is set. I'm seeing oopses with this: [

Re: [PATCH] powerpc/powermac: Fix low_sleep_handler with KUAP and KUEP

2020-09-10 Thread Michael Ellerman
Christophe Leroy writes: > low_sleep_handler() has an hardcoded restore of segment registers > that doesn't take KUAP and KUEP into account. > > Use head_32's load_segment_registers() routine instead. > > Signed-off-by: Christophe Leroy > Fixes: a68c31fc01ef ("powerpc/32s: Implement Kernel

Re: [PATCH v2] powerpc/papr_scm: Limit the readability of 'perf_stats' sysfs attribute

2020-09-10 Thread Michael Ellerman
On Mon, 7 Sep 2020 16:35:40 +0530, Vaibhav Jain wrote: > The newly introduced 'perf_stats' attribute uses the default access > mode of 0444 letting non-root users access performance stats of an > nvdimm and potentially force the kernel into issuing large number of > expensive HCALLs. Since the

Re: [PATCH kernel] powerpc/dma: Fix dma_map_ops::get_required_mask

2020-09-10 Thread Michael Ellerman
On Tue, 8 Sep 2020 11:51:06 +1000, Alexey Kardashevskiy wrote: > There are 2 problems with it: > 1. "<" vs expected "<<" > 2. the shift number is an IOMMU page number mask, not an address mask > as the IOMMU page shift is missing. > > This did not hit us before f1565c24b596 ("powerpc: use the

Re: [PATCH v2] cpuidle-pseries: Fix CEDE latency conversion from tb to us

2020-09-10 Thread Michael Ellerman
On Thu, 3 Sep 2020 14:57:27 +0530, Gautham R. Shenoy wrote: > commit d947fb4c965c ("cpuidle: pseries: Fixup exit latency for > CEDE(0)") sets the exit latency of CEDE(0) based on the latency values > of the Extended CEDE states advertised by the platform. The values > advertised by the platform

Re: [PATCH v2] powerpc: Warn about use of smt_snooze_delay

2020-09-10 Thread Michael Ellerman
Michael Ellerman writes: > On Tue, 30 Jun 2020 11:29:35 +0930, Joel Stanley wrote: >> It's not done anything for a long time. Save the percpu variable, and >> emit a warning to remind users to not expect it to do anything. >> >> Fixes: 3fa8cad82b94 ("powerpc/p

Re: [PATCH] powerpc/pseries: explicitly reschedule during drmem_lmb list traversal

2020-09-10 Thread Michael Ellerman
Michael Ellerman writes: > On Tue, 28 Jul 2020 12:37:41 -0500, Nathan Lynch wrote: >> The drmem lmb list can have hundreds of thousands of entries, and >> unfortunately lookups take the form of linear searches. As long as >> this is the case, traversals have the potential

Re: [PATCH v3] powerpc/pseries: explicitly reschedule during drmem_lmb list traversal

2020-09-09 Thread Michael Ellerman
On Thu, 13 Aug 2020 10:11:31 -0500, Nathan Lynch wrote: > The drmem lmb list can have hundreds of thousands of entries, and > unfortunately lookups take the form of linear searches. As long as > this is the case, traversals have the potential to monopolize the CPU > and provoke lockup reports,

Re: [PATCH 0/5] powerpc: Remove five unused variables

2020-09-09 Thread Michael Ellerman
On Tue, 19 Nov 2019 14:14:29 +0800, zhengbin wrote: > zhengbin (5): > powerpc/fadump: Remove set but not used variable 'elf' > powerpc/perf: Remove set but not used variable 'target' > powerpc/powernv: Remove set but not used variable 'total_vfs' > powerpc/powernv: Remove set but not used

Re: [PATCH v2 0/4] ocxl: Cleanup AFU interrupt allocation

2020-09-09 Thread Michael Ellerman
On Fri, 3 Apr 2020 17:38:34 +0200, Frederic Barrat wrote: > Short series to cleanup AFU interrupt allocation for opencapi. > Current code was using its own allocation service, calling opal > directly to get the trigger page. This is not needed and we can use > xive to achieve the same thing. The

Re: [PATCH] powerpc: hwrng; fix missing of_node_put()

2020-09-09 Thread Michael Ellerman
On Mon, 2 Jul 2018 11:08:16 +0200, Nicholas Mc Guire wrote: > The call to of_find_compatible_node() returns a node pointer with refcount > incremented thus it must be explicitly decremented here before returning. Applied to powerpc/next. [1/1] powerpc/pseries: Fix missing of_node_put() in

Re: [PATCH] powerpc: icp-hv: fix missing of_node_put in success path

2020-09-09 Thread Michael Ellerman
On Wed, 4 Jul 2018 10:03:27 +0200, Nicholas Mc Guire wrote: > Both of_find_compatible_node() and of_find_node_by_type() will > return a refcounted node on success - thus for the success path > the node must be explicitly released with a of_node_put(). Applied to powerpc/next. [1/1]

Re: [PATCH 1/6] powerpc/powernv/smp: Fix spurious DBG() warning

2020-09-09 Thread Michael Ellerman
On Tue, 4 Aug 2020 10:54:05 +1000, Oliver O'Halloran wrote: > When building with W=1 we get the following warning: > > arch/powerpc/platforms/powernv/smp.c: In function > ‘pnv_smp_cpu_kill_self’: > arch/powerpc/platforms/powernv/smp.c:276:16: error: suggest braces around > empty body

Re: [PATCH] cxl: Rework error message for incompatible slots

2020-09-09 Thread Michael Ellerman
On Tue, 7 Apr 2020 13:56:01 +0200, Frederic Barrat wrote: > Improve the error message shown if a capi adapter is plugged on a > capi-incompatible slot directly under the PHB (no intermediate switch). Applied to powerpc/next. [1/1] cxl: Rework error message for incompatible slots

Re: [PATCH] powerpc/oprofile: fix spelling mistake "contex" -> "context"

2020-09-09 Thread Michael Ellerman
On Tue, 4 Aug 2020 18:43:16 +0100, Colin King wrote: > There is a spelling mistake in a pr_debug message. Fix it. Applied to powerpc/next. [1/1] powerpc/oprofile: fix spelling mistake "contex" -> "context" https://git.kernel.org/powerpc/c/346427e668163e85cbbe14e4d9a2ddd49df1536c cheers

Re: [v3 1/2] dts: ppc: t4240rdb: remove interrupts property

2020-09-09 Thread Michael Ellerman
On Wed, 27 May 2020 11:42:27 +0800, Biwen Li wrote: > Since the interrupt pin for RTC DS1374 is not connected > to the CPU on T4240RDB, remove the interrupt property > from the device tree. > > This also fix the following warning for hwclock.util-linux: > $ hwclock.util-linux >

Re: [PATCH 1/2] powerpc/vmemmap: Fix memory leak with vmemmap list allocation failures.

2020-09-09 Thread Michael Ellerman
On Fri, 31 Jul 2020 17:04:59 +0530, Aneesh Kumar K.V wrote: > If we fail to allocate vmemmap list, we don't keep track of allocated > vmemmap block buf. Hence on section deactivate we skip vmemmap block > buf free. This results in memory leak. Applied to powerpc/next. [1/2] powerpc/vmemmap: Fix

Re: [PATCH] arch/powerpc: use simple i2c probe function

2020-09-09 Thread Michael Ellerman
On Fri, 7 Aug 2020 17:27:13 +0200, Stephen Kitt wrote: > The i2c probe functions here don't use the id information provided in > their second argument, so the single-parameter i2c probe function > ("probe_new") can be used instead. > > This avoids scanning the identifier tables during probes.

Re: [PATCH 0/2] powerpc: unrel_branch_check.sh: enable llvm-objdump

2020-09-09 Thread Michael Ellerman
On Wed, 12 Aug 2020 18:10:34 +1000, Stephen Rothwell wrote: > These 2 patches enable this script to work properly when llvm-objtool > is being used. > > They depend on my previos series that make this script suck less. Applied to powerpc/next. [1/2] powerpc: unrel_branch_check.sh: use nm to

Re: [PATCH 0/7] powerpc: unrel_branch_check.sh: make it suck less

2020-09-09 Thread Michael Ellerman
On Wed, 12 Aug 2020 00:04:27 +1000, Stephen Rothwell wrote: > Michael Ellerman: "who wants to make > arch/powerpc/tools/unrel_branch_check.sh suck less" > > This series is based off the current powerpc/next branch and keeps the > same functionaity as the original excep

Re: [PATCH] powerpc/tools: Remove 90 line limit in checkpatch script

2020-09-09 Thread Michael Ellerman
On Fri, 28 Aug 2020 12:05:42 +1000, Russell Currey wrote: > As of commit bdc48fa11e46, scripts/checkpatch.pl now has a default line > length warning of 100 characters. The powerpc wrapper script was using > a length of 90 instead of 80 in order to make checkpatch less > restrictive, but now it's

Re: [PATCH] powerpc/64s: handle ISA v3.1 local copy-paste context switches

2020-09-09 Thread Michael Ellerman
On Tue, 25 Aug 2020 17:55:35 +1000, Nicholas Piggin wrote: > The ISA v3.1 the copy-paste facility has a new memory move functionality > which allows the copy buffer to be pasted to domestic memory (RAM) as > opposed to foreign memory (accelerator). > > This means the POWER9 trick of avoiding the

Re: [PATCH] powerpc/pseries/eeh: Fix dumb linebreaks

2020-09-09 Thread Michael Ellerman
On Tue, 18 Aug 2020 14:45:57 +1000, Oliver O'Halloran wrote: > These annoy me every time I see them. Why are they here? They're not even > needed for 80cols compliance. Applied to powerpc/next. [1/1] powerpc/pseries/eeh: Fix dumb linebreaks

Re: [PATCH v3] powerpc/pseries: explicitly reschedule during drmem_lmb list traversal

2020-09-09 Thread Michael Ellerman
On Thu, 13 Aug 2020 10:11:31 -0500, Nathan Lynch wrote: > The drmem lmb list can have hundreds of thousands of entries, and > unfortunately lookups take the form of linear searches. As long as > this is the case, traversals have the potential to monopolize the CPU > and provoke lockup reports,

Re: [PATCH] powerpc/pseries: explicitly reschedule during drmem_lmb list traversal

2020-09-09 Thread Michael Ellerman
On Tue, 28 Jul 2020 12:37:41 -0500, Nathan Lynch wrote: > The drmem lmb list can have hundreds of thousands of entries, and > unfortunately lookups take the form of linear searches. As long as > this is the case, traversals have the potential to monopolize the CPU > and provoke lockup reports,

Re: [PATCH] powerpc/64: Remove unused generic_secondary_thread_init()

2020-09-09 Thread Michael Ellerman
On Wed, 19 Aug 2020 11:57:04 +1000, Michael Ellerman wrote: > The last caller was removed in 2014 in commit fb5a515704d7 ("powerpc: > Remove platforms/wsp and associated pieces"). > > As Jordan noticed even though there are no callers, the code above in > fsl_secondary_th

Re: [PATCH 1/9] selftests/powerpc: Make using_hash_mmu() work on Cell & PowerMac

2020-09-09 Thread Michael Ellerman
On Wed, 19 Aug 2020 11:57:19 +1000, Michael Ellerman wrote: > These platforms don't show the MMU in /proc/cpuinfo, but they always > use hash, so teach using_hash_mmu() that. Applied to powerpc/next. [1/9] selftests/powerpc: Make using_hash_mmu() work on Cell & PowerMac

Re: [PATCH 1/3] selftests/powerpc: Fix TM tests when CPU 0 is offline

2020-09-09 Thread Michael Ellerman
On Thu, 13 Aug 2020 11:34:43 +1000, Michael Ellerman wrote: > Several of the TM tests fail spuriously if CPU 0 is offline, because > they blindly try to affinitise to CPU 0. > > Fix them by picking any online CPU and using that instead. Applied to powerpc/next. [1/3] selftests/pow

Re: [PATCH v5 0/4] Allow bigger 64bit window by removing default DMA window

2020-09-09 Thread Michael Ellerman
On Wed, 5 Aug 2020 00:04:51 -0300, Leonardo Bras wrote: > There are some devices in which a hypervisor may only allow 1 DMA window > to exist at a time, and in those cases, a DDW is never created to them, > since the default DMA window keeps using this resource. > > LoPAR recommends this

Re: [PATCH v3] powerpc: Warn about use of smt_snooze_delay

2020-09-09 Thread Michael Ellerman
On Wed, 2 Sep 2020 09:30:11 +0930, Joel Stanley wrote: > It's not done anything for a long time. Save the percpu variable, and > emit a warning to remind users to not expect it to do anything. > > This uses pr_warn_once instead of pr_warn_ratelimit as testing > 'ppc64_cpu --smt=off' on a 24 core

  1   2   3   4   5   6   7   8   9   10   >