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

2020-09-16 Thread Madhavan Srinivasan
On 9/16/20 5:26 PM, Michael Ellerman wrote: Sparse warns about all the init functions: symbol init_ppc970_pmu was not declared. Should it be static? symbol init_power5p_pmu was not declared. Should it be static? symbol init_power5_pmu was not declared. Should it be static? symbol

[PATCH] powerpc/process: Fix uninitialised variable error

2020-09-16 Thread Michael Ellerman
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' condition is true if (cpu_has_feature(CPU_FTR_SPE)) {

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

2020-09-16 Thread Yang Yingliang
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' Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- v2: - enclose radix_init_pseries with CONFIG_PPC_RADIX_MMU -

[PATCH 2/2] powerpc/64s: Convert some cpu_setup() and cpu_restore() functions to C

2020-09-16 Thread Jordan Niethe
The only thing keeping the cpu_setup() and cpu_restore() functions used in the cputable entries for Power7, Power8, Power9 and Power10 in assembly was cpu_restore() being called before there was a stack in generic_secondary_smp_init(). Commit ("powerpc/64: Set up a kernel stack for secondaries

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

2020-09-16 Thread Jordan Niethe
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 5a61ef74f269 ("powerpc/64s: Support new device tree

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

2020-09-16 Thread Ganesh Goudar
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 Signed-off-by: Ganesh Goudar Signed-off-by: Mahesh Salgaonkar --- arch/powerpc/Kconfig.debug | 9

[PATCH 0/3] powerpc/mce: Fix mce handler and add selftest

2020-09-16 Thread Ganesh Goudar
This patch series fixes mce handling for pseries, provides debugfs interface for mce injection and adds selftest to test mce handling on pseries/powernv machines running in hash mmu mode. debugfs interface and sleftest are added only for slb multihit injection, We can add other tests in future if

[PATCH 3/3] selftest/powerpc: Add slb multihit selftest

2020-09-16 Thread Ganesh Goudar
Add selftest to check if the system recovers from slb multihit errors. Signed-off-by: Ganesh Goudar --- tools/testing/selftests/powerpc/Makefile | 3 ++- tools/testing/selftests/powerpc/mces/Makefile| 6 ++ tools/testing/selftests/powerpc/mces/slb_multihit.sh | 9

[PATCH 1/3] powerpc/mce: remove nmi_enter/exit from real mode handler

2020-09-16 Thread Ganesh Goudar
Use of nmi_enter/exit in real mode handler causes the kernel to panic and reboot on injecting slb mutihit on pseries machine running in hash mmu mode, As these calls try to accesses memory outside RMO region in real mode handler where translation is disabled. Add check to not to use these calls

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

2020-09-16 Thread Tony Ambardar
A few archs like powerpc have different errno.h values for macros EDEADLOCK and EDEADLK. In code including both libc and linux versions of errno.h, this can result in multiple definitions of EDEADLOCK in the include chain. Definitions to the same value (e.g. seen with mips) do not raise warnings,

[PATCH] ibmvfc: Protect vhost->task_set increment by the host lock

2020-09-16 Thread Brian King
In the discovery thread, ibmvfc does a vhost->task_set++ without any lock held. This could result in two targets getting the same cancel key, which could have strange effects in error recovery. The actual probability of this occurring should be extremely small, since this should all be done in a

Re: [PATCH] ASoC: fsl_audmix: make clock and output src write only

2020-09-16 Thread Nicolin Chen
On Mon, Sep 14, 2020 at 08:24:34PM +0300, Viorel Suman (OSS) wrote: > From: Viorel Suman > > "alsactl -f state.conf store/restore" sequence fails because setting > "mixing clock source" and "output source" requires active TDM clock > being started for configuration propagation. Make these two

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

2020-09-16 Thread Scott Cheloha
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(). This is wasteful. On pseries, memory_add_physaddr_to_nid() finds an appropriate nid for a given address by looking up the LMB containing the

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

2020-09-16 Thread David Hildenbrand
On 16.09.20 16:39, Scott Cheloha wrote: > On Wed, Sep 16, 2020 at 09:39:53AM +0200, David Hildenbrand wrote: >> On 15.09.20 21:46, Scott Cheloha wrote: >>> During memory hot-add, dlpar_add_lmb() calls memory_add_physaddr_to_nid() >>> to determine which node id (nid) to use when later calling

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

2020-09-16 Thread Scott Cheloha
On Wed, Sep 16, 2020 at 09:39:53AM +0200, David Hildenbrand wrote: > On 15.09.20 21:46, Scott Cheloha wrote: > > 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(). > > > > This is wasteful. On

Re: [PATCH] ibmvfc: Avoid link down on FS9100 canister reboot

2020-09-16 Thread Brian King
On 9/15/20 7:49 PM, Martin K. Petersen wrote: > > Brian, > >> When a canister on a FS9100, or similar storage, running in NPIV mode, >> is rebooted, its WWPNs will fail over to another canister. > > [...] > > Applied to 5.10/scsi-staging, thanks! I fixed a bunch of checkpatch > warnings.

Re: [PATCH] fsl: imx-audmix: Use devm_kcalloc() in imx_audmix_probe()

2020-09-16 Thread Markus Elfring
> A multiplication for the size determination of a memory allocation > indicated that an array data structure should be processed. > Thus use the corresponding function "devm_kcalloc". I find the previous patch subject inappropriate. Would you like to choose an alternative? Regards, Markus

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

2020-09-16 Thread Athira Rajeev
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 sample bits. But current code

[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
Sparse warns about all the init functions: symbol init_ppc970_pmu was not declared. Should it be static? symbol init_power5p_pmu was not declared. Should it be static? symbol init_power5_pmu was not declared. Should it be static? symbol init_power6_pmu was not declared. Should it be

[PATCH -next] ide: Fix symbol undeclared warnings

2020-09-16 Thread Wang Wensheng
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 'mdma_timings_33' was not declared. Should it

[PATCH 2/2] ASoC: dt-bindings: fsl_xcvr: Add document for XCVR

2020-09-16 Thread Viorel Suman (OSS)
From: Viorel Suman XCVR (Audio Transceiver) is a new IP module found on i.MX8MP. Signed-off-by: Viorel Suman --- .../devicetree/bindings/sound/fsl,xcvr.yaml| 104 + 1 file changed, 104 insertions(+) create mode 100644

[PATCH 1/2] ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver

2020-09-16 Thread Viorel Suman (OSS)
From: Viorel Suman XCVR (Audio Transceiver) is a on-chip functional module found on i.MX8MP. It support HDMI2.1 eARC, HDMI1.4 ARC and SPDIF. Signed-off-by: Viorel Suman --- sound/soc/fsl/Kconfig| 10 + sound/soc/fsl/Makefile |2 + sound/soc/fsl/fsl_xcvr.c | 1352

[PATCH 0/2] DAI driver for new XCVR IP

2020-09-16 Thread Viorel Suman (OSS)
From: Viorel Suman DAI driver for new XCVR IP found in i.MX8MP. Viorel Suman (2): ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver ASoC: dt-bindings: fsl_xcvr: Add document for XCVR .../devicetree/bindings/sound/fsl,xcvr.yaml| 104 ++ sound/soc/fsl/Kconfig

Re: [PATCH] Revert "powerpc/64s: machine check interrupt update NMI accounting"

2020-09-16 Thread Michal Suchánek
On Tue, Sep 15, 2020 at 08:16:42PM +0200, pet...@infradead.org wrote: > On Tue, Sep 15, 2020 at 08:06:59PM +0200, Michal Suchanek wrote: > > This reverts commit 116ac378bb3ff844df333e7609e7604651a0db9d. > > > > This commit causes the kernel to oops and reboot when injecting a SLB > > multihit

[PATCH 5/5] arm: dts: ls1021a: fix rcpm failed to claim resource

2020-09-16 Thread Ran Wang
The range of dcfg reg is wrong, which overlap with other device, such as rcpm. This issue causing rcpm driver failed to claim reg resource when calling devm_ioremap_resource(). Signed-off-by: Ran Wang --- arch/arm/boot/dts/ls1021a.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 4/5] arm: dts: ls1021a: fix flextimer failed to wake system

2020-09-16 Thread Ran Wang
The data of property 'fsl,rcpm-wakeup' is not corrcet, which causing RCPM driver incorrectly program register IPPDEXPCR1, then flextimer is wrongly clock gated during system suspend, can't send interrupt to wake. Signed-off-by: Ran Wang --- arch/arm/boot/dts/ls1021a.dtsi | 2 +- 1 file changed,

[PATCH 3/5] arm: dts: ls1021a: fix that FlexTimer cannot wakeup system in deep sleep

2020-09-16 Thread Ran Wang
From: Biwen Li The patch fixes a bug that FlexTimer cannot wakeup system in deep sleep. Signed-off-by: Biwen Li Signed-off-by: Ran Wang --- arch/arm/boot/dts/ls1021a.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi index

[PATCH 2/5] soc: fsl: handle RCPM errata A-008646 on SoC LS1021A

2020-09-16 Thread Ran Wang
From: Biwen Li Description: - Reading configuration register RCPM_IPPDEXPCR1 always return zero Workaround: - Save register RCPM_IPPDEXPCR1's value to register SCFG_SPARECR8.(uboot's psci also need reading value from the register SCFG_SPARECR8

[PATCH 1/5] Documentation: dt: binding: fsl: Add 'fsl, ippdexpcr1-alt-addr' property

2020-09-16 Thread Ran Wang
From: Biwen Li The 'fsl,ippdexpcr1-alt-addr' property is used to handle an errata A-008646 on LS1021A Signed-off-by: Biwen Li Signed-off-by: Ran Wang --- Documentation/devicetree/bindings/soc/fsl/rcpm.txt | 19 +++ 1 file changed, 19 insertions(+) diff --git

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

2020-09-16 Thread Laurent Dufour
Le 15/09/2020 à 21:46, Scott Cheloha a écrit : 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(). This is wasteful. On pseries, memory_add_physaddr_to_nid() finds an appropriate nid for a given

Re: [PATCH] Doc: admin-guide: Add entry for kvm_cma_resv_ratio kernel param

2020-09-16 Thread Satheesh Rajendran
Hi Randy, Thanks for the comments, will send a V2 fixing them. On Tue, Sep 15, 2020 at 11:18:52PM -0700, Randy Dunlap wrote: > On 9/15/20 11:11 PM, sathn...@linux.vnet.ibm.com wrote: > > From: Satheesh Rajendran > > > > Add document entry for kvm_cma_resv_ratio kernel param which > > is used

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

2020-09-16 Thread Tony Ambardar
A few archs like powerpc have different errno.h values for macros EDEADLOCK and EDEADLK. In code including both libc and linux versions of errno.h, this can result in multiple definitions of EDEADLOCK in the include chain. Definitions to the same value (e.g. seen with mips) do not raise warnings,

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

2020-09-16 Thread David Hildenbrand
On 15.09.20 21:46, Scott Cheloha wrote: > 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(). > > This is wasteful. On pseries, memory_add_physaddr_to_nid() finds an > appropriate nid for a given

Re: Injecting SLB miltihit crashes kernel 5.9.0-rc5

2020-09-16 Thread Mahesh Jagannath Salgaonkar
On 9/15/20 2:13 PM, Michal Suchánek wrote: > 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

RE: [PATCH v1] soc: fsl: rcpm: Add ACPI support

2020-09-16 Thread Ran Wang
Hi Ard, On Wednesday, September 16, 2020 2:11 PM, Ard Biesheuvel wrote: > Subject: Re: [PATCH v1] soc: fsl: rcpm: Add ACPI support > > On 9/16/20 3:32 AM, Ran Wang wrote: > > Hi Ard, > > > > On Tuesday, September 15, 2020 7:10 PM, Ard Biesheuvel wrote: > >> Subject: Re: [PATCH v1] soc: fsl:

[PATCH] fsl: imx-audmix : Replace seq_printf with seq_puts

2020-09-16 Thread Xu Wang
A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". Signed-off-by: Xu Wang --- sound/soc/fsl/imx-audmix.c | 8 1 file changed, 4 insertions(+), 4 deletions(-)

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

2020-09-16 Thread Qinglang Miao
Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao --- drivers/tty/serial/pmac_zilog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c index 96e7aa479..063484b22 100644

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

2020-09-16 Thread Qinglang Miao
The logic of the warn output is incorrect. The two args should be exchanged. Signed-off-by: Qinglang Miao --- arch/powerpc/platforms/powernv/opal-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv/opal-core.c

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

2020-09-16 Thread Qinglang Miao
Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao --- drivers/macintosh/windfarm_smu_sensors.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/macintosh/windfarm_smu_sensors.c b/drivers/macintosh/windfarm_smu_sensors.c

[PATCH -next] PCI: rpadlpar: use for_each_child_of_node() and for_each_node_by_name

2020-09-16 Thread Qinglang Miao
Use for_each_child_of_node() and for_each_node_by_name macro instead of open coding it. Signed-off-by: Qinglang Miao --- drivers/pci/hotplug/rpadlpar_core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pci/hotplug/rpadlpar_core.c

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

2020-09-16 Thread Qinglang Miao
Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao --- drivers/macintosh/smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 96684581a..45875e8c6 100644 ---

Re: [PATCH] Doc: admin-guide: Add entry for kvm_cma_resv_ratio kernel param

2020-09-16 Thread Randy Dunlap
On 9/15/20 11:11 PM, sathn...@linux.vnet.ibm.com wrote: > From: Satheesh Rajendran > > Add document entry for kvm_cma_resv_ratio kernel param which > is used to alter the KVM contiguous memory allocation percentage > for hash pagetable allocation used by hash mode PowerPC KVM guests. > > Cc:

[PATCH] Doc: admin-guide: Add entry for kvm_cma_resv_ratio kernel param

2020-09-16 Thread sathnaga
From: Satheesh Rajendran Add document entry for kvm_cma_resv_ratio kernel param which is used to alter the KVM contiguous memory allocation percentage for hash pagetable allocation used by hash mode PowerPC KVM guests. Cc: linux-ker...@vger.kernel.org Cc: kvm-...@vger.kernel.org Cc:

Re: [PATCH v1] soc: fsl: rcpm: Add ACPI support

2020-09-16 Thread Ard Biesheuvel
On 9/16/20 3:32 AM, Ran Wang wrote: Hi Ard, On Tuesday, September 15, 2020 7:10 PM, Ard Biesheuvel wrote: Subject: Re: [PATCH v1] soc: fsl: rcpm: Add ACPI support On 9/15/20 1:06 PM, kuldip dwivedi wrote: Add ACPI support in fsl RCPM driver. This is required to support ACPI S3 state. S3 is