Re: [PATCH 04/14] powerpc/64s: avoid reloading (H)SRR registers if they are still valid

2021-04-02 Thread Michael Ellerman
Nicholas Piggin writes: > diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S > index ccf913cedd29..b466b3e1bb3f 100644 > --- a/arch/powerpc/kernel/entry_64.S > +++ b/arch/powerpc/kernel/entry_64.S > @@ -64,6 +64,30 @@ exception_marker: > .section".text" >

[PATCH] powerpc/dts: fix not include DTC_FLAGS

2021-04-02 Thread Youlin Song
I wanted to build the fsl dts in my machine and found that the dtb have not extra space,so uboot will cause about FDT_ERR_NOSPACE issue. Signed-off-by: Youlin Song --- arch/powerpc/boot/dts/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/boot/dts/Makefile

Re: [PATCH 04/14] powerpc/64s: avoid reloading (H)SRR registers if they are still valid

2021-04-02 Thread Michael Ellerman
Nicholas Piggin writes: > When an interrupt is taken, the SRR registers are set to return to > where it left off. Unless they are modified in the meantime, or the > return address or MSR are modified, there is no need to reload these > registers when returning from interrupt. > > Introduce

Re: [PATCH v5 31/48] KVM: PPC: Book3S HV P9: inline kvmhv_load_hv_regs_and_go into __kvmhv_vcpu_entry_p9

2021-04-02 Thread kernel test robot
in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Nicholas-Piggin/KVM-PPC-Book3S-C-ify-the-P9-entry-exit-code/20210401-232743 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc64-randconfig-r033-20210402 (attached

Re: [PATCH 6/8] drivers: firmware: efi: libstub: enable generic commandline

2021-04-02 Thread Christophe Leroy
Le 30/03/2021 à 19:57, Daniel Walker a écrit : This adds code to handle the generic command line changes. The efi code appears that it doesn't benefit as much from this design as it could. For example, if you had a prepend command line with "nokaslr" then you might be helpful to re-enable it

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

2021-04-02 Thread Christophe Leroy
Le 30/03/2021 à 19:56, Daniel Walker a écrit : This updates the powerpc code to use the CONFIG_GENERIC_CMDLINE option. This includes a scripted mass convert of the config files to use the new generic cmdline. There is a bit of a trim effect here. It would seems that some of the config

Re: [PATCH 3/8] powerpc: convert strcpy to strlcpy in prom_init

2021-04-02 Thread Christophe Leroy
Le 30/03/2021 à 19:56, Daniel Walker a écrit : There's only two users of strcpy and one is the command line handling. The generic command line handling uses strlcpy and it makes sense to convert this one other user to strlcpy to keep prom_init size consistent. Cc: xe-linux-exter...@cisco.com

Re: [PATCH 2/8] CMDLINE: drivers: of: ifdef out cmdline section

2021-04-02 Thread Christophe Leroy
Le 30/03/2021 à 19:56, Daniel Walker a écrit : It looks like there's some seepage of cmdline stuff into the generic device tree code. This conflicts with the generic cmdline implementation so I remove it in the case when that's enabled. Cc: xe-linux-exter...@cisco.com Signed-off-by: Ruslan

Re: [PATCH 1/8] CMDLINE: add generic builtin command line

2021-04-02 Thread Christophe Leroy
Le 30/03/2021 à 19:56, Daniel Walker a écrit : This code allows architectures to use a generic builtin command line. The state of the builtin command line options across architecture is diverse. MIPS and X86 once has similar systems, then mips added some options to allow extending the command

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

2021-04-02 Thread Nathan Lynch
Laurent Dufour writes: > Le 02/04/2021 à 15:34, Nathan Lynch a écrit : >> Laurent Dufour writes: >>> 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

Re: [PATCH v5 41/48] KVM: PPC: Book3S HV: Remove unused nested HV tests in XICS emulation

2021-04-02 Thread Cédric Le Goater
On 4/1/21 5:03 PM, Nicholas Piggin wrote: > Commit f3c18e9342a44 ("KVM: PPC: Book3S HV: Use XICS hypercalls when > running as a nested hypervisor") added nested HV tests in XICS > hypercalls, but not all are required. > > * icp_eoi is only called by kvmppc_deliver_irq_passthru which is only >

Re: [PATCH v3 12/17] sh: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
Le 26/03/2021 à 14:44, Christophe Leroy a écrit : This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index e798e55915c2..fab84f62448c 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -16,6 +16,7 @@

Re: [PATCH v3 09/17] nios2: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
Le 29/03/2021 à 03:35, Tan, Ley Foon a écrit : -Original Message- From: Christophe Leroy Sent: Friday, March 26, 2021 9:45 PM To: w...@kernel.org; danie...@cisco.com; r...@kernel.org; dan...@gimpelevich.san-francisco.ca.us Cc: linux-a...@vger.kernel.org;

Re: [PATCH v3 01/17] cmdline: Add generic function to build command line.

2021-04-02 Thread Christophe Leroy
Le 30/03/2021 à 19:27, Daniel Walker a écrit : On Fri, Mar 26, 2021 at 01:44:48PM +, Christophe Leroy wrote: This code provides architectures with a way to build command line based on what is built in the kernel and what is handed over by the bootloader, based on selected compile-time

Re: [PATCH v5 41/48] KVM: PPC: Book3S HV: Remove unused nested HV tests in XICS emulation

2021-04-02 Thread kernel test robot
in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Nicholas-Piggin/KVM-PPC-Book3S-C-ify-the-P9-entry-exit-code/20210401-232743 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc64-randconfig-s032-20210402

Re: [PATCH v3 05/17] arm: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
Le 26/03/2021 à 16:47, Rob Herring a écrit : On Fri, Mar 26, 2021 at 7:44 AM Christophe Leroy wrote: This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- arch/arm/Kconfig | 38 +--

Re: [PATCH v3 01/17] cmdline: Add generic function to build command line.

2021-04-02 Thread Christophe Leroy
Le 26/03/2021 à 16:42, Rob Herring a écrit : On Fri, Mar 26, 2021 at 7:44 AM Christophe Leroy wrote: This code provides architectures with a way to build command line based on what is built in the kernel and what is handed over by the bootloader, based on selected compile-time options.

Re: [PATCH v3 11/17] riscv: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
Le 26/03/2021 à 16:26, Rob Herring a écrit : On Fri, Mar 26, 2021 at 8:20 AM Christophe Leroy wrote: Le 26/03/2021 à 15:08, Andreas Schwab a écrit : On Mär 26 2021, Christophe Leroy wrote: diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c index

Re: [PATCH v3 00/17] Implement GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
Le 26/03/2021 à 16:04, Rob Herring a écrit : On Fri, Mar 26, 2021 at 7:44 AM Christophe Leroy wrote: The purpose of this series is to improve and enhance the handling of kernel boot arguments. It is first focussed on powerpc but also extends the capability for other arches. This is based

Re: [PATCH v3 05/17] arm: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
Le 26/03/2021 à 16:47, Rob Herring a écrit : On Fri, Mar 26, 2021 at 7:44 AM Christophe Leroy wrote: This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- arch/arm/Kconfig | 38 +--

[PATCH v4 20/20] cmdline: Remove CONFIG_CMDLINE_EXTEND

2021-04-02 Thread Christophe Leroy
All architectures providing CONFIG_CMDLINE_EXTEND are now converted to GENERIC_CMDLINE. This configuration item is not used anymore, drop it. Signed-off-by: Christophe Leroy --- include/linux/cmdline.h | 2 +- init/Kconfig| 6 -- 2 files changed, 1 insertion(+), 7 deletions(-)

[PATCH v4 19/20] mips: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- arch/mips/Kconfig | 1 + arch/mips/Kconfig.debug | 44 --- arch/mips/configs/ar7_defconfig | 1 - arch/mips/configs/bcm47xx_defconfig

[PATCH v4 18/20] x86: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- arch/x86/Kconfig| 45 ++--- arch/x86/kernel/setup.c | 17 ++-- 2 files changed, 4 insertions(+), 58 deletions(-) diff --git a/arch/x86/Kconfig

[PATCH v4 17/20] xtensa: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- arch/xtensa/Kconfig | 15 +-- arch/xtensa/configs/audio_kc705_defconfig | 1 - arch/xtensa/configs/common_defconfig| 1 -

[PATCH v4 16/20] sparc: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- arch/sparc/Kconfig | 18 +- arch/sparc/prom/bootstr_64.c | 2 +- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index

[PATCH v4 15/20] sh: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- v4: Restore the removed 'endmenu' in Kconfig --- arch/sh/Kconfig | 28 + arch/sh/configs/ap325rxa_defconfig | 2 +-

[PATCH v4 14/20] riscv: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- v4: Remove the message when forcing --- arch/riscv/Kconfig| 44 +-- arch/riscv/kernel/setup.c | 7 +++ 2 files changed, 4 insertions(+), 47 deletions(-) diff

[PATCH v4 12/20] nios2: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- v4: Added missing selection of CONFIG_GENERIC_CMDLINE in Kconfig --- arch/nios2/Kconfig| 25 ++--- arch/nios2/kernel/setup.c | 13 - 2 files changed, 6 insertions(+),

[PATCH v4 13/20] openrisc: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- arch/openrisc/Kconfig | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig index 591acc5990dc..ca1d0f18fe16 100644 ---

[PATCH v4 11/20] microblaze: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- arch/microblaze/Kconfig | 24 +--- arch/microblaze/configs/mmu_defconfig | 2 +- arch/microblaze/kernel/head.S | 4 ++-- 3 files changed, 4 insertions(+), 26

[PATCH v4 10/20] hexagon: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- arch/hexagon/Kconfig| 11 +-- arch/hexagon/kernel/setup.c | 10 ++ 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index

[PATCH v4 09/20] arm64: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- arch/arm64/Kconfig | 33 +- arch/arm64/kernel/idreg-override.c | 9 2 files changed, 5 insertions(+), 37 deletions(-) diff --git a/arch/arm64/Kconfig

[PATCH v4 06/20] powerpc: convert strcpy to strlcpy in prom_init

2021-04-02 Thread Christophe Leroy
From: Daniel Walker There's only two users of strcpy and one is the command line handling. The generic command line handling uses strlcpy and it makes sense to convert this one other user to strlcpy to keep prom_init size consistent. Cc: xe-linux-exter...@cisco.com Signed-off-by: Daniel Walker

[PATCH v4 07/20] powerpc: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
This updates the powerpc code to use the new cmdline building function. The cmdline_build() defines a temporary string in __initdata. powerpc uses __prombss instead at the moment, so we must call cmdline_build() with destination different from the source to allow GCC to optimise the temporary

[PATCH v4 08/20] arm: Convert to GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
This converts the architecture to GENERIC_CMDLINE. Signed-off-by: Christophe Leroy --- v4: - Removed dependency to ATAGS - Removed the message when forcing --- arch/arm/Kconfig | 38 +-- arch/arm/kernel/atags_parse.c | 13 +++- 2 files

[PATCH v4 05/20] cmdline: Gives architectures opportunity to use generically defined boot cmdline manipulation

2021-04-02 Thread Christophe Leroy
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 select to use them. CONFIG_CMDLINE_EXTEND is understood differently by architectures. For some of them it appends

[PATCH v4 04/20] drivers: firmware: efi: use cmdline building function

2021-04-02 Thread Christophe Leroy
Use cmdline building function in EFI. EFI cannot use pr_err() and doesn't have a .init.data section, so use the __cmdline_build() internal function and provides both a source and a destination. Remove the handling of too long command lines as it is handled by the generic CMDLINE. Signed-off-by:

[PATCH v4 01/20] cmdline: Add generic function to build command line.

2021-04-02 Thread Christophe Leroy
This code provides architectures with a way to build command line based on what is built in the kernel and what is handed over by the bootloader, based on selected compile-time options. Signed-off-by: Christophe Leroy --- v3: - Addressed comments from Will - Added capability to have src == dst

[PATCH v4 03/20] x86/efi: Replace CONFIG_CMDLINE_OVERRIDE by CONFIG_CMDLINE_FORCE

2021-04-02 Thread Christophe Leroy
During boot, x86 uses EFI driver. That driver is also used by ARM. In order to refactor the command line processing in that driver in a following patch, rename CONFIG_CMDLINE_OVERRIDE by CONFIG_CMDLINE_FORCE on the x86 in order to be similar to ARM (and most other architectures). Signed-off-by:

[PATCH v4 00/20] Implement GENERIC_CMDLINE

2021-04-02 Thread Christophe Leroy
The purpose of this series is to improve and enhance the handling of kernel boot arguments. Current situation is that most if not all architectures are using similar options to do some manupulation on command line arguments: - Prepend built-in arguments in front of bootloader provided arguments -

[PATCH v4 02/20] drivers: of: use cmdline building function

2021-04-02 Thread Christophe Leroy
This patch uses the new cmdline building function to concatenate the of provided cmdline with built-in parts based on compile-time options. Signed-off-by: Christophe Leroy --- drivers/of/fdt.c | 23 --- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git

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

2021-04-02 Thread Laurent Dufour
Thanks Nathan for reviewing this. Le 02/04/2021 à 15:34, Nathan Lynch a écrit : Hi Laurent, Laurent Dufour writes: 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

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

2021-04-02 Thread Nathan Lynch
Hi Laurent, Laurent Dufour writes: > 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

Re: [PATCH v3 8/9] powerpc/xive: Map one IPI interrupt per node

2021-04-02 Thread Cédric Le Goater
> I gave the patch below a try and we are reaching the same results, > even better. The simplest solution is always the best. Nick, you > should send that single patch. FYI, here are results in a KVM guests with pinned vCPUs. * P9 DD2.2 - 2s * 64 threads - KVM guest :

Re: [PATCH v3 8/9] powerpc/xive: Map one IPI interrupt per node

2021-04-02 Thread Cédric Le Goater
On 4/1/21 2:50 PM, Nicholas Piggin wrote: > Excerpts from Cédric Le Goater's message of April 1, 2021 12:45 am: >> ipistorm [*] can be used to benchmark the raw interrupt rate of an >> interrupt controller by measuring the number of IPIs a system can >> sustain. When applied to the XIVE interrupt

Re: [PATCH v5 29/48] powerpc: add set_dec_or_work API for safely updating decrementer

2021-04-02 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of April 2, 2021 1:03 am: > Decrementer updates must always check for new irq work to avoid an > irq work decrementer interrupt being lost. > > Add an API for this in the timer code so callers don't have to care > about details. Oh I forgot to update the

Re: [PATCH] powerpc/powernv: Enable HAIL (HV AIL) for ISA v3.1 processors

2021-04-02 Thread Nicholas Piggin
Excerpts from Cédric Le Goater's message of April 2, 2021 4:10 pm: > On 4/2/21 4:41 AM, Nicholas Piggin wrote: >> Starting with ISA v3.1, LPCR[AIL] no longer controls the interrupt >> mode for HV=1 interrupts. Instead, a new LPCR[HAIL] bit is defined >> which behaves like AIL=3 for HV interrupts

Re: [PATCH v4 29/46] KVM: PPC: Book3S HV P9: Implement the rest of the P9 path in C

2021-04-02 Thread Nicholas Piggin
Excerpts from Alexey Kardashevskiy's message of April 2, 2021 2:36 pm: > > > On 01/04/2021 21:35, Nicholas Piggin wrote: >> Excerpts from Alexey Kardashevskiy's message of April 1, 2021 3:30 pm: >>> >>> >>> On 3/23/21 12:02 PM, Nicholas Piggin wrote: Almost all logic is moved to C, by

Re: [RFC/PATCH] powerpc/smp: Add SD_SHARE_PKG_RESOURCES flag to MC sched-domain

2021-04-02 Thread Gautham R Shenoy
(Missed cc'ing Cc Peter in the original posting) On Fri, Apr 02, 2021 at 11:07:54AM +0530, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" > > On POWER10 systems, the L2 cache is at the SMT4 small core level. The > following commits ensure that L2 cache gets correctly discovered and > the

[RFC/PATCH] powerpc/smp: Add SD_SHARE_PKG_RESOURCES flag to MC sched-domain

2021-04-02 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" On POWER10 systems, the L2 cache is at the SMT4 small core level. The following commits ensure that L2 cache gets correctly discovered and the Last-Level-Cache domain (LLC) is set to the SMT sched-domain. 790a166 powerpc/smp: Parse ibm,thread-groups with multiple

Re: [PATCH] powerpc/powernv: Enable HAIL (HV AIL) for ISA v3.1 processors

2021-04-02 Thread Cédric Le Goater
On 4/2/21 4:41 AM, Nicholas Piggin wrote: > Starting with ISA v3.1, LPCR[AIL] no longer controls the interrupt > mode for HV=1 interrupts. Instead, a new LPCR[HAIL] bit is defined > which behaves like AIL=3 for HV interrupts when set. Will QEMU need an update ? Thanks, C. > Set HAIL on bare