Re: [PATCH V3 -next] powerpc: kernel/time.c - cleanup warnings

2021-03-25 Thread Alexandre Belloni
On 24/03/2021 17:46:19+0800, heying (H) wrote: > Many thanks for your suggestion. As you suggest, rtc_lock should be local to > platforms. > > Does it mean not only powerpc but also all other platforms should adapt this > change? Not all the other ones, in the current state, x86 still needs it. I

[PATCH v2] pseries: prevent free CPU ids to be reused on another node

2021-03-25 Thread Laurent Dufour
When a CPU is hot added, the CPU ids are taken from the available mask from the lower possible set. If that set of values was previously used for CPU attached to a different node, this seems to application like if these CPUs have migrated from a node to another one which is not expected in real lif

Re: [PATCH v2 6/7] cmdline: Gives architectures opportunity to use generically defined boot cmdline manipulation

2021-03-25 Thread Christophe Leroy
Le 03/03/2021 à 18:57, Will Deacon a écrit : On Tue, Mar 02, 2021 at 05:25:22PM +, Christophe Leroy wrote: Most architectures have similar boot command line manipulation options. This patchs adds the definition in init/Kconfig, gated by CONFIG_HAVE_CMDLINE that the architectures can selec

[PATCH AUTOSEL 5.11 22/44] powerpc: Force inlining of cpu_has_feature() to avoid build failure

2021-03-25 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit eed5fae00593ab9d261a0c1ffc1bdb786a87a55a ] The code relies on constant folding of cpu_has_feature() based on possible and always true values as defined per CPU_FTRS_ALWAYS and CPU_FTRS_POSSIBLE. Build failure is encountered with for instance book3e_all_d

[PATCH AUTOSEL 5.10 21/39] powerpc: Force inlining of cpu_has_feature() to avoid build failure

2021-03-25 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit eed5fae00593ab9d261a0c1ffc1bdb786a87a55a ] The code relies on constant folding of cpu_has_feature() based on possible and always true values as defined per CPU_FTRS_ALWAYS and CPU_FTRS_POSSIBLE. Build failure is encountered with for instance book3e_all_d

[PATCH AUTOSEL 5.4 15/24] powerpc: Force inlining of cpu_has_feature() to avoid build failure

2021-03-25 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit eed5fae00593ab9d261a0c1ffc1bdb786a87a55a ] The code relies on constant folding of cpu_has_feature() based on possible and always true values as defined per CPU_FTRS_ALWAYS and CPU_FTRS_POSSIBLE. Build failure is encountered with for instance book3e_all_d

[PATCH AUTOSEL 4.19 11/20] powerpc: Force inlining of cpu_has_feature() to avoid build failure

2021-03-25 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit eed5fae00593ab9d261a0c1ffc1bdb786a87a55a ] The code relies on constant folding of cpu_has_feature() based on possible and always true values as defined per CPU_FTRS_ALWAYS and CPU_FTRS_POSSIBLE. Build failure is encountered with for instance book3e_all_d

[PATCH AUTOSEL 4.14 09/16] powerpc: Force inlining of cpu_has_feature() to avoid build failure

2021-03-25 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit eed5fae00593ab9d261a0c1ffc1bdb786a87a55a ] The code relies on constant folding of cpu_has_feature() based on possible and always true values as defined per CPU_FTRS_ALWAYS and CPU_FTRS_POSSIBLE. Build failure is encountered with for instance book3e_all_d

[PATCH AUTOSEL 4.9 06/13] powerpc: Force inlining of cpu_has_feature() to avoid build failure

2021-03-25 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit eed5fae00593ab9d261a0c1ffc1bdb786a87a55a ] The code relies on constant folding of cpu_has_feature() based on possible and always true values as defined per CPU_FTRS_ALWAYS and CPU_FTRS_POSSIBLE. Build failure is encountered with for instance book3e_all_d

[PATCH v3 2/2] powerpc/perf: Add platform specific check_attr_config

2021-03-25 Thread Madhavan Srinivasan
Add platform specific attr.config value checks. Patch includes checks for both power9 and power10. Signed-off-by: Madhavan Srinivasan --- Changelog v2: - Changed function name as suggested. - Added name of source document referred for reserved values Changelog v1: - No changes arch/powerpc/perf

[PATCH v3 1/2] powerpc/perf: Infrastructure to support checking of attr.config*

2021-03-25 Thread Madhavan Srinivasan
Introduce code to support the checking of attr.config* for values which are reserved for a given platform. Performance Monitoring Unit (PMU) configuration registers have fields that are reserved and some specific values for bit fields are reserved. For ex., MMCRA[61:62] is Random Sampling Mode (SM)

Re: [PATCH v2 3/7] powerpc: convert config files to generic cmdline

2021-03-25 Thread Christophe Leroy
Le 24/03/2021 à 18:32, Rob Herring a écrit : On Wed, Mar 24, 2021 at 11:01 AM Christophe Leroy wrote: Le 09/03/2021 à 22:29, Daniel Walker a écrit : On Tue, Mar 09, 2021 at 08:47:09AM +0100, Christophe Leroy wrote: Le 09/03/2021 à 01:02, Daniel Walker a écrit : This is a scripted mas

Re: [PATCH v7] powerpc/irq: Inline call_do_irq() and call_do_softirq()

2021-03-25 Thread Segher Boessenkool
On Wed, Mar 24, 2021 at 11:26:01PM +1100, Michael Ellerman wrote: > Christophe Leroy writes: > > Hmm. It is the first time we use named parameters in powerpc assembly, > > isn't it ? > Yeah I'd like us to use it more, I think it helps readability a lot. ..in some cases. Not in most cases :-(

Re: [PATCH V2 1/5] powerpc/perf: Expose processor pipeline stage cycles using PERF_SAMPLE_WEIGHT_STRUCT

2021-03-25 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 24, 2021 at 10:05:23AM +0530, Madhavan Srinivasan escreveu: > > On 3/22/21 8:27 PM, Athira Rajeev wrote: > > Performance Monitoring Unit (PMU) registers in powerpc provides > > information on cycles elapsed between different stages in the > > pipeline. This can be used for application

Re: [PATCH V2 1/5] powerpc/perf: Expose processor pipeline stage cycles using PERF_SAMPLE_WEIGHT_STRUCT

2021-03-25 Thread Arnaldo Carvalho de Melo
Em Wed, Mar 24, 2021 at 10:05:23AM +0530, Madhavan Srinivasan escreveu: > > On 3/22/21 8:27 PM, Athira Rajeev wrote: > > Performance Monitoring Unit (PMU) registers in powerpc provides > > information on cycles elapsed between different stages in the > > pipeline. This can be used for application

Re: [PATCH v2 3/7] powerpc: convert config files to generic cmdline

2021-03-25 Thread Rob Herring
On Thu, Mar 25, 2021 at 6:06 AM Christophe Leroy wrote: > > > > Le 24/03/2021 à 18:32, Rob Herring a écrit : > > On Wed, Mar 24, 2021 at 11:01 AM Christophe Leroy > > wrote: > >> > >> > >> > >> Le 09/03/2021 à 22:29, Daniel Walker a écrit : > >>> On Tue, Mar 09, 2021 at 08:47:09AM +0100, Christop

Re: [PATCH V2 1/5] powerpc/perf: Expose processor pipeline stage cycles using PERF_SAMPLE_WEIGHT_STRUCT

2021-03-25 Thread Peter Zijlstra
On Thu, Mar 25, 2021 at 10:01:35AM -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Mar 24, 2021 at 10:05:23AM +0530, Madhavan Srinivasan escreveu: > > > > On 3/22/21 8:27 PM, Athira Rajeev wrote: > > > Performance Monitoring Unit (PMU) registers in powerpc provides > > > information on cycles ela

Re: [PATCH V2 1/5] powerpc/perf: Expose processor pipeline stage cycles using PERF_SAMPLE_WEIGHT_STRUCT

2021-03-25 Thread Arnaldo
On March 25, 2021 11:38:01 AM GMT-03:00, Peter Zijlstra wrote: >On Thu, Mar 25, 2021 at 10:01:35AM -0300, Arnaldo Carvalho de Melo >wrote:. >> > > Also for CPU_FTR_ARCH_31, capture the two cycle counter >information in >> > > two 16 bit fields of perf_sample_weight structure. >> > >> > Change

Re: VDSO ELF header

2021-03-25 Thread Christophe Leroy
Hi Laurent Le 25/03/2021 à 17:11, Laurent Dufour a écrit : Hi Christophe, Since v5.11 and the changes you made to the VDSO code, it no more exposing the ELF header at the beginning of the VDSO mapping in user space. This is confusing CRIU which is checking for this ELF header cookie (https:

Re: VDSO ELF header

2021-03-25 Thread Laurent Dufour
Le 25/03/2021 à 17:46, Christophe Leroy a écrit : Hi Laurent Le 25/03/2021 à 17:11, Laurent Dufour a écrit : Hi Christophe, Since v5.11 and the changes you made to the VDSO code, it no more exposing the ELF header at the beginning of the VDSO mapping in user space. This is confusing CRIU wh

Re: [PATCH] docs: powerpc: Fix a typo

2021-03-25 Thread Jonathan Corbet
Bhaskar Chowdhury writes: > s/struture/structure/ > > Signed-off-by: Bhaskar Chowdhury > --- > Documentation/powerpc/firmware-assisted-dump.rst | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/powerpc/firmware-assisted-dump.rst > b/Documentation/powerpc/fi

Re: VDSO ELF header

2021-03-25 Thread Laurent Dufour
Le 25/03/2021 à 17:56, Laurent Dufour a écrit : Le 25/03/2021 à 17:46, Christophe Leroy a écrit : Hi Laurent Le 25/03/2021 à 17:11, Laurent Dufour a écrit : Hi Christophe, Since v5.11 and the changes you made to the VDSO code, it no more exposing the ELF header at the beginning of the VDSO m

Re: [PATCH v2 6/7] cmdline: Gives architectures opportunity to use generically defined boot cmdline manipulation

2021-03-25 Thread Will Deacon
On Thu, Mar 25, 2021 at 12:18:38PM +0100, Christophe Leroy wrote: > > > Le 03/03/2021 à 18:57, Will Deacon a écrit : > > On Tue, Mar 02, 2021 at 05:25:22PM +, Christophe Leroy wrote: > > > Most architectures have similar boot command line manipulation > > > options. This patchs adds the defin

Re: [PATCH v2 3/7] powerpc: convert config files to generic cmdline

2021-03-25 Thread Daniel Walker
On Wed, Mar 24, 2021 at 05:59:59PM +0100, Christophe Leroy wrote: > > I think my changes maintain most of this due to the override of > > CONFIG_CMDLINE_PREPEND. This is an upgrade and the inflexibility in powerpc > > is > > an example of why these changes were created in the first place. > > "in

Re: [PATCH v2 3/7] powerpc: convert config files to generic cmdline

2021-03-25 Thread Daniel Walker
On Thu, Mar 25, 2021 at 01:03:55PM +0100, Christophe Leroy wrote: > > Ok, so you agree we don't need to provide two CMDLINE, one to be appended and > one to be prepended. > > Let's only provide once CMDLINE as of today, and ask the user to select > whether he wants it appended or prepended or re

Re: [PATCH v2 4/7] CMDLINE: powerpc: convert to generic builtin command line

2021-03-25 Thread Daniel Walker
On Wed, Mar 24, 2021 at 04:31:35PM +0100, Christophe Leroy wrote: > > > Le 09/03/2021 à 22:40, Daniel Walker a écrit : > > On Tue, Mar 09, 2021 at 08:56:47AM +0100, Christophe Leroy wrote: > > > > > > > > > Le 09/03/2021 à 01:02, Daniel Walker a écrit : > > > > This updates the powerpc code to

[PATCH] selftests: powerpc: unmark non-kernel-doc comments

2021-03-25 Thread Randy Dunlap
Drop the 'beginning of kernel-doc' notation markers (/**) in places that are not in kernel-doc format. Signed-off-by: Randy Dunlap Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org --- tools/testing/selftests/powerpc/tm/tm-trap.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH v2 05/15] powerpc/uaccess: Move get_user_instr helpers in asm/inst.h

2021-03-25 Thread Daniel Axtens
Hi Christophe, > Those helpers use get_user helpers but they don't participate > in their implementation, so they do not belong to asm/uaccess.h > > Move them in asm/inst.h Hmm, is asm/inst.h the right place for this? asm/inst.h seems to be entirely concerned with the ppc_inst type: converting t

Re: [PATCH v2 06/15] powerpc/align: Don't use __get_user_instr() on kernel addresses

2021-03-25 Thread Daniel Axtens
Christophe Leroy writes: > In the old days, when we didn't have kernel userspace access > protection and had set_fs(), it was wise to use __get_user() > and friends to read kernel memory. > > Nowadays, get_user() is granting userspace access and is exclusively > for userspace access. > > In align

Re: [PATCH v2 07/15] powerpc/uaccess: Call might_fault() inconditionaly

2021-03-25 Thread Daniel Axtens
Hi Christophe, > Commit 6bfd93c32a50 ("powerpc: Fix incorrect might_sleep in > __get_user/__put_user on kernel addresses") added a check to not call > might_sleep() on kernel addresses. This was to enable the use of > __get_user() in the alignment exception handler for any address. > > Then commit

Re: [PATCH v2 07/15] powerpc/uaccess: Call might_fault() inconditionaly

2021-03-25 Thread Daniel Axtens
Daniel Axtens writes: > Hi Christophe, > >> Commit 6bfd93c32a50 ("powerpc: Fix incorrect might_sleep in >> __get_user/__put_user on kernel addresses") added a check to not call >> might_sleep() on kernel addresses. This was to enable the use of >> __get_user() in the alignment exception handler f

Re: [PATCH v2 3/7] powerpc: convert config files to generic cmdline

2021-03-25 Thread Rob Herring
On Thu, Mar 25, 2021 at 2:00 PM Daniel Walker wrote: > > On Thu, Mar 25, 2021 at 01:03:55PM +0100, Christophe Leroy wrote: > > > > Ok, so you agree we don't need to provide two CMDLINE, one to be appended > > and one to be prepended. > > > > Let's only provide once CMDLINE as of today, and ask th

Re: [PATCH v4 24/46] KVM: PPC: Book3S HV P9: Use large decrementer for HDEC

2021-03-25 Thread Alexey Kardashevskiy
On 23/03/2021 12:02, Nicholas Piggin wrote: On processors that don't suppress the HDEC exceptions when LPCR[HDICE]=0, this could help reduce needless guest exits due to leftover exceptions on entering the guest. Reviewed-by: Alexey Kardashevskiy Signed-off-by: Nicholas Piggin ERROR: modp

Re: [PATCH] soc/fsl: qbman: fix conflicting alignment attributes

2021-03-25 Thread Li Yang
On Tue, Mar 23, 2021 at 8:17 AM Arnd Bergmann wrote: > > From: Arnd Bergmann > > When building with W=1, gcc points out that the __packed attribute > on struct qm_eqcr_entry conflicts with the 8-byte alignment > attribute on struct qm_fd inside it: > > drivers/soc/fsl/qbman/qman.c:189:1: error: a

Re: [PATCH] selftests: powerpc: unmark non-kernel-doc comments

2021-03-25 Thread Daniel Axtens
Randy Dunlap writes: > Drop the 'beginning of kernel-doc' notation markers (/**) > in places that are not in kernel-doc format. This looks good to me. Arguably we don't need the comments at all, but it doesn't seem to hurt to keep them. checkpatch is OK with the entire file, so there's nothing

Re: [PATCH -next] powerpc/smp: Remove unused inline functions

2021-03-25 Thread Daniel Axtens
Hi, > commit 441c19c8a290 ("powerpc/kvm/book3s_hv: Rework the secondary inhibit > code") > left behind this, so can remove it. > Interesting: that commit removed some instances of (un)inhibit_secondary_onlining, but it seems to have missed the ones for the uni-processor case, which your patch re

Re: [PATCH -next] powerpc/eeh: Remove unused inline function eeh_dev_phb_init_dynamic()

2021-03-25 Thread Daniel Axtens
Hi, > commit 475028efc708 ("powerpc/eeh: Remove eeh_dev_phb_init_dynamic()") > left behind this, so can remove it. I had a look: the inline that you are removing here is for the !CONFIG_EEH case, which explains why it was missed the first time. This looks like a good change. Out of interest, wha

Re: [PATCH v2 1/1] hotplug-cpu.c: show 'last online CPU' error in dlpar_cpu_offline()

2021-03-25 Thread Daniel Axtens
Hi Daniel, Two small nitpicks: > This patch adds a 'last online' check in dlpar_cpu_offline() to catch > the 'last online CPU' offline error, eturning a more informative error ^--- s/eturning/returning/; > + /* device_offline() will ret

Re: [PATCH] [v2] arch: powerpc: Remove duplicate includes

2021-03-25 Thread Daniel Axtens
Wan Jiabing writes: > mmu-hash.h: asm/bug.h has been included at line 12, so remove > the duplicate one at line 21. Looking at the file I had wondered if this was due to a #ifdef being removed, but no, the second one was just added in commit 891121e6c02c ("powerpc/mm: Differentiate between huge

Re: [PATCH] [v2] tools: testing: Remove duplicate includes

2021-03-25 Thread Daniel Axtens
Wan Jiabing writes: > sched.h has been included at line 33, so remove the > duplicate one at line 36. > pthread.h has been included at line 17,so remove the > duplicate one at line 20. I can see that both of these are correct from the diff. > inttypes.h has been included at line 19, so remov

Re: [PATCH] powerpc/iommu/debug: Remove redundant NULL check

2021-03-25 Thread Daniel Axtens
Hi Jiapeng Chong, writes: > Fix the following coccicheck warnings: > > ./fs/io_uring.c:5989:4-9: WARNING: NULL check before some freeing > functions is not needed. This looks correct to me, and matches the description of debugfs_remove in Documentation/filesystems/debugfs.rst. If you have a num

Re: [PATCH] crypto: vmx: fix incorrect kernel-doc comment syntax in files

2021-03-25 Thread Daniel Axtens
Hi Aditya, Thanks for your patch! > The opening comment mark '/**' is used for highlighting the beginning of > kernel-doc comments. > There are certain files in drivers/crypto/vmx, which follow this syntax, > but the content inside does not comply with kernel-doc. > Such lines were probably not m

Re: [PATCH] powerpc/iommu/debug: Remove redundant NULL check

2021-03-25 Thread Daniel Axtens
Daniel Axtens writes: It looks like the kernel test robot also reported this: "[PATCH] powerpc/iommu/debug: fix ifnullfree.cocci warnings" Weirdly I don't see it in patchwork. I'm not sure which one mpe will want to take but either would do. >> Fix the following coccicheck warnings: >> >> ./fs/

remove the nvlink2 pci_vfio subdriver v2

2021-03-25 Thread Christoph Hellwig
Hi all, the nvlink2 vfio subdriver is a weird beast. It supports a hardware feature without any open source component - what would normally be the normal open source userspace that we require for kernel drivers, although in this particular case user space could of course be a kernel driver in a V

[PATCH 2/2] powerpc/powernv: remove the nvlink support

2021-03-25 Thread Christoph Hellwig
This code was only used by the vfio-nvlink2 code, which itself had no proper use. Drop this huge chunk of code build into every powernv or generic build. Signed-off-by: Christoph Hellwig Acked-by: Greg Kroah-Hartman --- arch/powerpc/include/asm/opal.h| 3 - arch/powerpc/include/a

[PATCH 1/2] vfio/pci: remove vfio_pci_nvlink2

2021-03-25 Thread Christoph Hellwig
This driver never had any open userspace (which for VFIO would include VM kernel drivers) that use it, and thus should never have been added by our normal userspace ABI rules. Signed-off-by: Christoph Hellwig Acked-by: Greg Kroah-Hartman --- drivers/vfio/pci/Kconfig| 6 - drivers/

Re: [PATCH v2 6/7] cmdline: Gives architectures opportunity to use generically defined boot cmdline manipulation

2021-03-25 Thread Christophe Leroy
Le 25/03/2021 à 20:32, Will Deacon a écrit : On Thu, Mar 25, 2021 at 12:18:38PM +0100, Christophe Leroy wrote: - For ARM it means to append the bootloader arguments to the CONFIG_CMDLINE - For Powerpc it means to append the CONFIG_CMDLINE to the bootloader arguments - For SH it means to app

Re: [PATCH v2 6/7] cmdline: Gives architectures opportunity to use generically defined boot cmdline manipulation

2021-03-25 Thread Christophe Leroy
Le 03/03/2021 à 18:57, Will Deacon a écrit : On Tue, Mar 02, 2021 at 05:25:22PM +, Christophe Leroy wrote: Most architectures have similar boot command line manipulation options. This patchs adds the definition in init/Kconfig, gated by CONFIG_HAVE_CMDLINE that the architectures can selec

[PATCH -next] selftests/powerpc: Remove duplicated include from tm-poison.c

2021-03-25 Thread Zheng Yongjun
Remove duplicated include. Reported-by: Hulk Robot Signed-off-by: Zheng Yongjun --- tools/testing/selftests/powerpc/tm/tm-poison.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/powerpc/tm/tm-poison.c b/tools/testing/selftests/powerpc/tm/tm-poison.c index 29e5f26af7

[PATCH -next] treewide: Remove duplicated include from tm-vmx-unavail.c

2021-03-25 Thread Zheng Yongjun
Remove duplicated include. Reported-by: Hulk Robot Signed-off-by: Zheng Yongjun --- tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c b/tools/testing/selftests/powerpc/tm/tm-vmx-unavail.c i