[PATCH 16/18] powerpc/pseries: remove memory "re-add" implementation

2020-06-11 Thread Nathan Lynch
dlpar_memory() no longer has any callers which pass PSERIES_HP_ELOG_ACTION_READD. Remove this case and the corresponding unreachable code. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/rtas.h | 1 - .../platforms/pseries/hotplug-memory.c| 42 ---

Re: ppc64le and 32-bit LE userland compatibility

2020-06-11 Thread Christophe Leroy
Le 06/06/2020 à 01:54, Will Springer a écrit : On Saturday, May 30, 2020 3:17:24 PM PDT Will Springer wrote: On Saturday, May 30, 2020 8:37:43 AM PDT Christophe Leroy wrote: There is a series at https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=173231 to switch powerpc to the

Re: [PATCH v4] powerpc/fadump: fix race between pstore write and fadump crash trigger

2020-06-11 Thread kernel test robot
Hi Sourabh, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on linus/master linux/master v5.7 next-20200611] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest

[PATCH 18/18] powerpc/pseries: remove obsolete memory hotplug DT notifier code

2020-06-11 Thread Nathan Lynch
pseries_update_drconf_memory() runs from a DT notifier in response to an update to the ibm,dynamic-memory property of the /ibm,dynamic-reconfiguration-memory node. This property is an older less compact format than the ibm,dynamic-memory-v2 property used in most currently supported firmwares.

[PATCH 17/18] powerpc/pseries: remove dlpar_cpu_readd()

2020-06-11 Thread Nathan Lynch
dlpar_cpu_readd() is unused now. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/topology.h | 1 - arch/powerpc/platforms/pseries/hotplug-cpu.c | 19 --- 2 files changed, 20 deletions(-) diff --git a/arch/powerpc/include/asm/topology.h

[PATCH 15/18] powerpc/pseries: remove prrn special case from DT update path

2020-06-11 Thread Nathan Lynch
pseries_devicetree_update() is no longer called with PRRN_SCOPE. The purpose of prrn_update_node() was to remove and then add back a LMB whose NUMA assignment had changed. This has never been reliable, and this codepath has been default-disabled for several releases. Remove prrn_update_node().

[PATCH 14/18] powerpc/numa: remove arch_update_cpu_topology

2020-06-11 Thread Nathan Lynch
Since arch_update_cpu_topology() doesn't do anything on powerpc now, remove it and associated dead code. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/topology.h | 6 -- arch/powerpc/mm/numa.c | 10 -- 2 files changed, 16 deletions(-) diff --git

[PATCH 12/18] powerpc/rtasd: simplify handle_rtas_event(), emit message on events

2020-06-11 Thread Nathan Lynch
prrn_is_enabled() always returns false/0, so handle_rtas_event() can be simplified and some dead code can be removed. Use machine_is() instead of #ifdef to run this code only on pseries, and add an informational ratelimited message that we are ignoring the events. PRRN events are relatively rare

[PATCH 13/18] powerpc/numa: remove prrn_is_enabled()

2020-06-11 Thread Nathan Lynch
All users of this prrn_is_enabled() are gone; remove it. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/topology.h | 5 - arch/powerpc/mm/numa.c | 5 - 2 files changed, 10 deletions(-) diff --git a/arch/powerpc/include/asm/topology.h

[PATCH 10/18] powerpc/numa: remove timed_topology_update()

2020-06-11 Thread Nathan Lynch
timed_topology_update is a no-op now, so remove it and all call sites. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/topology.h | 5 - arch/powerpc/mm/numa.c | 9 - arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 -- 3 files changed, 16

[PATCH 11/18] powerpc/numa: remove start/stop_topology_update()

2020-06-11 Thread Nathan Lynch
These APIs have become no-ops, so remove them and all call sites. Signed-off-by: Nathan Lynch --- arch/powerpc/include/asm/topology.h | 10 -- arch/powerpc/mm/numa.c| 20 arch/powerpc/platforms/pseries/mobility.c | 4

[PATCH 09/18] powerpc/numa: stub out numa_update_cpu_topology()

2020-06-11 Thread Nathan Lynch
Previous changes have removed the code which sets bits in cpu_associativity_changes_mask and thus it is never modifed at runtime. From this we can reason that numa_update_cpu_topology() always returns 0 without doing anything. Remove the body of numa_update_cpu_topology() and remove all code which

[PATCH 08/18] powerpc/numa: remove vphn_enabled and prrn_enabled internal flags

2020-06-11 Thread Nathan Lynch
These flags are always zero now; remove them and suitably adjust the remaining references to them. Signed-off-by: Nathan Lynch --- arch/powerpc/mm/numa.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index

[PATCH 07/18] powerpc/numa: remove unreachable topology workqueue code

2020-06-11 Thread Nathan Lynch
Since vphn_enabled is always 0, we can remove the call to topology_schedule_update() and remove the code which becomes unreachable as a result. Signed-off-by: Nathan Lynch --- arch/powerpc/mm/numa.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/arch/powerpc/mm/numa.c

[PATCH 06/18] powerpc/numa: remove unreachable topology timer code

2020-06-11 Thread Nathan Lynch
Since vphn_enabled is always 0, we can stub out timed_topology_update() and remove the code which becomes unreachable. Signed-off-by: Nathan Lynch --- arch/powerpc/mm/numa.c | 21 - 1 file changed, 21 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c

[PATCH 05/18] powerpc/numa: make vphn_enabled, prrn_enabled flags const

2020-06-11 Thread Nathan Lynch
Previous changes have made it so these flags are never changed; enforce this by making them const. Signed-off-by: Nathan Lynch --- arch/powerpc/mm/numa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index

[PATCH 04/18] powerpc/numa: remove unreachable topology update code

2020-06-11 Thread Nathan Lynch
Since the topology_updates_enabled flag is now always false, remove it and the code which has become unreachable. This is the minimum change that prevents 'defined but unused' warnings emitted by the compiler after stubbing out the start/stop_topology_updates() functions. Signed-off-by: Nathan

[PATCH 02/18] powerpc/rtas: don't online CPUs for partition suspend

2020-06-11 Thread Nathan Lynch
Partition suspension, used for hibernation and migration, requires that the OS place all but one of the LPAR's processor threads into one of two states prior to calling the ibm,suspend-me RTAS function: * the architected offline state (via RTAS stop-self); or * the H_JOIN hcall, which does

[PATCH 03/18] powerpc/numa: remove ability to enable topology updates

2020-06-11 Thread Nathan Lynch
Remove the /proc/powerpc/topology_updates interface and the topology_updates=on/off command line argument. The internal topology_updates_enabled flag remains for now, but always false. Signed-off-by: Nathan Lynch --- arch/powerpc/mm/numa.c | 71 +- 1 file

[PATCH 00/18] remove extended cede offline mode and bogus topology update code

2020-06-11 Thread Nathan Lynch
Two major parts to this series: 1. Removal of the extended cede offline mode for CPUs as well as the partition suspend code which accommodates it by temporarily onlining all CPUs prior to suspending the LPAR. This solves some accounting problems, simplifies the pseries CPU hotplug code,

[PATCH 01/18] powerpc/pseries: remove cede offline state for CPUs

2020-06-11 Thread Nathan Lynch
This effectively reverts commit 3aa565f53c39 ("powerpc/pseries: Add hooks to put the CPU into an appropriate offline state"), which added an offline mode for CPUs which uses the H_CEDE hcall instead of the architected stop-self RTAS function in order to facilitate "folding" of dedicated mode

Re: [RFC PATCH v2 3/3] ASoC: fsl_asrc_dma: Reuse the dma channel if available in Back-End

2020-06-11 Thread Nicolin Chen
On Fri, Jun 12, 2020 at 10:17:08AM +0800, Shengjiu Wang wrote: > > > diff --git a/sound/soc/fsl/fsl_asrc_common.h > > > b/sound/soc/fsl/fsl_asrc_common.h > > > + * @req_dma_chan_dev_to_dev: flag for release dev_to_dev chan > > > > Since we only have dma_request call for back-end only: > > + *

[PATCH kernel] powerpc/xive: Ignore kmemleak false positives

2020-06-11 Thread Alexey Kardashevskiy
xive_native_provision_pages() allocates memory and passes the pointer to OPAL so kmemleak cannot find the pointer usage in the kernel memory and produces a false positive report (below) (even if the kernel did scan OPAL memory, it is unable to deal with __pa() addresses anyway). This silences the

Re: [RFC PATCH v2 3/3] ASoC: fsl_asrc_dma: Reuse the dma channel if available in Back-End

2020-06-11 Thread Shengjiu Wang
On Fri, Jun 12, 2020 at 8:33 AM Nicolin Chen wrote: > > On Wed, Jun 10, 2020 at 06:05:49PM +0800, Shengjiu Wang wrote: > > The dma channel has been requested by Back-End cpu dai driver already. > > If fsl_asrc_dma requests dma chan with same dma:tx symlink, then > > there will be below warning

Re: [RFC PATCH v2 3/3] ASoC: fsl_asrc_dma: Reuse the dma channel if available in Back-End

2020-06-11 Thread Nicolin Chen
On Wed, Jun 10, 2020 at 06:05:49PM +0800, Shengjiu Wang wrote: > The dma channel has been requested by Back-End cpu dai driver already. > If fsl_asrc_dma requests dma chan with same dma:tx symlink, then > there will be below warning with SDMA. > > [ 48.174236] fsl-esai-dai 2024000.esai: Cannot

Re: [PATCH v4 1/2] powerpc/uaccess: Implement unsafe_put_user() using 'asm goto'

2020-06-11 Thread Segher Boessenkool
On Thu, Jun 11, 2020 at 03:43:55PM -0700, Nick Desaulniers wrote: > Segher, Cristophe, I suspect Clang is missing support for the %L and %U > output templates [1]. The arch/powerpc kernel first used the %U output modifier in 0c176fa80fdf (from 2016), and %L in b8b572e1015f (2008).

[PATCH v3 2/2] powerpc: configs: remove CMDLINE_BOOL

2020-06-11 Thread Chris Packham
Regenerate defconfigs to remove CONFIG_CMDLINE_BOOL and the default CONFIG_CMDLINE where applicable. Signed-off-by: Chris Packham --- Changes in v3: - new arch/powerpc/configs/44x/akebono_defconfig | 2 -- arch/powerpc/configs/44x/arches_defconfig | 2 --

[PATCH v3 1/2] powerpc: Remove inaccessible CMDLINE default

2020-06-11 Thread Chris Packham
Since commit cbe46bd4f510 ("powerpc: remove CONFIG_CMDLINE #ifdef mess") CONFIG_CMDLINE has always had a value regardless of CONFIG_CMDLINE_BOOL. For example: $ make ARCH=powerpc defconfig $ cat .config # CONFIG_CMDLINE_BOOL is not set CONFIG_CMDLINE="" When enabling CONFIG_CMDLINE_BOOL

[PATCH v3 0/2] powerpc: CMDLINE config cleanup

2020-06-11 Thread Chris Packham
This series cleans up the config options related to the boot command line. Chris Packham (2): powerpc: Remove inaccessible CMDLINE default powerpc: configs: remove CMDLINE_BOOL arch/powerpc/Kconfig | 6 +- arch/powerpc/configs/44x/akebono_defconfig | 2 --

[no subject]

2020-06-11 Thread ndesaulniers
Date: Thu, 11 Jun 2020 15:38:38 -0700 From: Nick Desaulniers To: Michael Ellerman , christophe.le...@c-s.fr, seg...@kernel.crashing.org Cc: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , npig...@gmail.com, seg...@kernel.crashing.org,

Re: [PATCH v5 1/4] riscv: Move kernel mapping to vmalloc zone

2020-06-11 Thread Atish Patra
On Sun, Jun 7, 2020 at 1:01 AM Alexandre Ghiti wrote: > > This is a preparatory patch for relocatable kernel. > > The kernel used to be linked at PAGE_OFFSET address and used to be loaded > physically at the beginning of the main memory. Therefore, we could use > the linear mapping for the kernel

Re: [PATCH v2] powerpc: Remove inaccessible CMDLINE default

2020-06-11 Thread Chris Packham
On 11/06/20 5:46 pm, Christophe Leroy wrote: > > > Le 11/06/2020 à 05:41, Chris Packham a écrit : >> Since commit cbe46bd4f510 ("powerpc: remove CONFIG_CMDLINE #ifdef mess") >> CONFIG_CMDLINE has always had a value regardless of CONFIG_CMDLINE_BOOL. >> >> For example: >> >>   $ make ARCH=powerpc

Re: [PATCH v2] All arch: remove system call sys_sysctl

2020-06-11 Thread Eric W. Biederman
Rich Felker writes: > On Thu, Jun 11, 2020 at 12:01:11PM -0500, Eric W. Biederman wrote: >> Rich Felker writes: >> >> > On Thu, Jun 11, 2020 at 06:43:00AM -0500, Eric W. Biederman wrote: >> >> Xiaoming Ni writes: >> >> >> >> > Since the commit 61a47c1ad3a4dc ("sysctl: Remove the sysctl

Re: [PATCH v2] All arch: remove system call sys_sysctl

2020-06-11 Thread Eric W. Biederman
Rich Felker writes: > On Thu, Jun 11, 2020 at 06:43:00AM -0500, Eric W. Biederman wrote: >> Xiaoming Ni writes: >> >> > Since the commit 61a47c1ad3a4dc ("sysctl: Remove the sysctl system call"), >> > sys_sysctl is actually unavailable: any input can only return an error. >> > >> > We have been

Re: [PATCH v2] All arch: remove system call sys_sysctl

2020-06-11 Thread Rich Felker
On Thu, Jun 11, 2020 at 12:01:11PM -0500, Eric W. Biederman wrote: > Rich Felker writes: > > > On Thu, Jun 11, 2020 at 06:43:00AM -0500, Eric W. Biederman wrote: > >> Xiaoming Ni writes: > >> > >> > Since the commit 61a47c1ad3a4dc ("sysctl: Remove the sysctl system > >> > call"), > >> >

Re: [PATCH v2] All arch: remove system call sys_sysctl

2020-06-11 Thread Rich Felker
On Thu, Jun 11, 2020 at 06:43:00AM -0500, Eric W. Biederman wrote: > Xiaoming Ni writes: > > > Since the commit 61a47c1ad3a4dc ("sysctl: Remove the sysctl system call"), > > sys_sysctl is actually unavailable: any input can only return an error. > > > > We have been warning about people using

Re: Linux powerpc new system call instruction and ABI

2020-06-11 Thread Segher Boessenkool
Hi! On Thu, Jun 11, 2020 at 06:12:01PM +1000, Nicholas Piggin wrote: > Calling convention > -- > The proposal is for scv 0 to provide the standard Linux system call ABI > with the following differences from sc convention[1]: > > - lr is to be volatile across scv calls. This is

Re: [PATCH v5 2/4] riscv: Introduce CONFIG_RELOCATABLE

2020-06-11 Thread Alex Ghiti
Hi Jerome, Le 6/10/20 à 10:10 AM, Jerome Forissier a écrit : On 6/7/20 9:59 AM, Alexandre Ghiti wrote: [...] +config RELOCATABLE + bool + depends on MMU + help + This builds a kernel as a Position Independent Executable (PIE), + which retains all relocation

Re: [PATCH v11 5/6] ndctl/papr_scm, uapi: Add support for PAPR nvdimm specific methods

2020-06-11 Thread Vaibhav Jain
Dan Williams writes: > On Wed, Jun 10, 2020 at 5:10 AM Vaibhav Jain wrote: >> >> Dan Williams writes: >> >> > On Tue, Jun 9, 2020 at 10:54 AM Vaibhav Jain wrote: >> >> >> >> Thanks Dan for the consideration and taking time to look into this. >> >> >> >> My responses below: >> >> >> >> Dan

Re: PowerPC KVM-PR issue

2020-06-11 Thread Christian Zigotzky
On 10 June 2020 at 01:23 pm, Christian Zigotzky wrote: On 10 June 2020 at 11:06 am, Christian Zigotzky wrote: On 10 June 2020 at 00:18 am, Christian Zigotzky wrote: Hello, KVM-PR doesn't work anymore on my Nemo board [1]. I figured out that the Git kernels and the kernel 5.7 are affected.

Re: [PATCH] powerpc/64: indirect function call use bctrl rather than blrl in ret_from_kernel_thread

2020-06-11 Thread Christophe Leroy
Le 11/06/2020 à 14:11, Nicholas Piggin a écrit : blrl is not recommended to use as an indirect function call, as it may corrupt the link stack predictor. This is not a performance critical path but this should be fixed for consistency. There's exactly the same in entry_32.S Should it be

[PATCH] powerpc/64: indirect function call use bctrl rather than blrl in ret_from_kernel_thread

2020-06-11 Thread Nicholas Piggin
blrl is not recommended to use as an indirect function call, as it may corrupt the link stack predictor. This is not a performance critical path but this should be fixed for consistency. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/entry_64.S | 4 ++-- 1 file changed, 2

Re: [PATCH v2] All arch: remove system call sys_sysctl

2020-06-11 Thread Eric W. Biederman
Xiaoming Ni writes: > Since the commit 61a47c1ad3a4dc ("sysctl: Remove the sysctl system call"), > sys_sysctl is actually unavailable: any input can only return an error. > > We have been warning about people using the sysctl system call for years > and believe there are no more users. Even if

[PATCH] powerpc/kvm/book3s64/nested: Fix kernel crash with nested kvm

2020-06-11 Thread Aneesh Kumar K.V
__pa() do check for addr value passed and if < PAGE_OFFSET results in BUG. #define __pa(x) \ ({ \ VIRTUAL_BUG_ON((unsigned long)(x) < PAGE_OFFSET);

Re: [PATCH? v2] powerpc: Hard wire PT_SOFTE value to 1 in gpr_get() too

2020-06-11 Thread Jan Kratochvil
On Thu, 11 Jun 2020 12:58:31 +0200, Oleg Nesterov wrote: > On 06/11, Madhavan Srinivasan wrote: > > On 6/10/20 8:37 PM, Oleg Nesterov wrote: > > > > This is not consistent and this breaks > > > > http://sourceware.org/systemtap/wiki/utrace/tests/user-regs-peekpoke > > this is 404. Attaching the

Re: [PATCH? v2] powerpc: Hard wire PT_SOFTE value to 1 in gpr_get() too

2020-06-11 Thread Oleg Nesterov
On 06/11, Madhavan Srinivasan wrote: > > > On 6/10/20 8:37 PM, Oleg Nesterov wrote: > >Hi, > > > >looks like this patch was forgotten. > > yep, I missed this. But mpe did have comments for the patch. > > https://lkml.org/lkml/2019/9/19/107 Yes, and I thought that I have replied... apparently not,

Re: [PATCH? v2] powerpc: Hard wire PT_SOFTE value to 1 in gpr_get() too

2020-06-11 Thread Madhavan Srinivasan
On 6/10/20 8:37 PM, Oleg Nesterov wrote: Hi, looks like this patch was forgotten. yep, I missed this. But mpe did have comments for the patch. https://lkml.org/lkml/2019/9/19/107 Maddy Do you think this should be fixed or should we document that PTRACE_GETREGS is not consistent with

[PATCH 2/2] powerpc/64s: system call support for scv/rfscv instructions

2020-06-11 Thread Nicholas Piggin
Add support for the scv instruction on POWER9 and later CPUs. For now this implements the zeroth scv vector 'scv 0', as identical to 'sc' system calls, with the exception that lr is not preserved, nor are volatile cr registers, and error is not indicated with CR0[SO], but by returning a negative

[PATCH 1/2] powerpc/64s/exception: treat NIA below __end_interrupts as soft-masked

2020-06-11 Thread Nicholas Piggin
The scv instruction causes an interrupt which can enter the kernel with MSR[EE]=1, thus allowing interrupts to hit at any time. These must not be taken as normal interrupts, because they come from MSR[PR]=0 context, and yet the kernel stack is not yet set up and r13 is not set to the PACA). Treat

Linux powerpc new system call instruction and ABI

2020-06-11 Thread Nicholas Piggin
Thanks to everyone who has given feedback on the proposed new system call instruction and ABI, I think it has reached agreement and the implementation can be merged into Linux. I have a hacked glibc implementation (that doesn't do all the right HWCAP detection and misses a few things) that I've

Re: [PATCH v2] All arch: remove system call sys_sysctl

2020-06-11 Thread Will Deacon
On Thu, Jun 11, 2020 at 11:54:00AM +0800, Xiaoming Ni wrote: > Since the commit 61a47c1ad3a4dc ("sysctl: Remove the sysctl system call"), > sys_sysctl is actually unavailable: any input can only return an error. > > We have been warning about people using the sysctl system call for years > and

[Bug 205183] PPC64: Signal delivery fails with SIGSEGV if between about 1KB and 4KB bytes of stack remain

2020-06-11 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205183 --- Comment #4 from Daniel Black (dan...@linux.ibm.com) --- Still broken. danielgb@talos2:~$ gcc -g -Wall -O stacktest.c danielgb@talos2:~$ ./a.out 124 & [1] 494618 danielgb@talos2:~$ cat /proc/$(pidof a.out)/maps | grep stack