[RFC PATCH] powerpc/Kconfig: Select FUNCTION_ALIGNMENT_4B

2023-03-06 Thread Sathvika Vasireddy
Commit d49a0626216b95 ("arch: Introduce CONFIG_FUNCTION_ALIGNMENT") introduced a generic function-alignment infrastructure. Move to using FUNCTION_ALIGNMENT_4B on powerpc, to use the same alignment as that of the existing _GLOBAL macro. Signed-off-by: Sathvika Vasireddy Note: Given that alignmen

Re: [PATCH v3 00/24] Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Alexandre Ghiti
On 3/3/23 17:40, Arnd Bergmann wrote: On Fri, Mar 3, 2023, at 12:59, Alexandre Ghiti wrote: On 3/2/23 20:50, H. Peter Anvin wrote: On March 1, 2023 7:17:18 PM PST, Palmer Dabbelt wrote: Commit 622021cd6c560ce7 ("s390: make command line configurable"), I assume? Yes, sorry for that. I got d

[PATCH v5 00/26] Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Alexandre Ghiti
This all came up in the context of increasing COMMAND_LINE_SIZE in the RISC-V port. In theory that's a UABI break, as COMMAND_LINE_SIZE is the maximum length of /proc/cmdline and userspace could staticly rely on that to be correct. Usually I wouldn't mess around with changing this sort of thing,

[PATCH v5 01/26] alpha: Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt As far as I can tell this is not used by userspace and thus should not be part of the user-visible API. Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti Reviewed-by: Philippe Mathieu-Daudé --- arch/alpha/include/asm/setup.h | 4 ++-- arch/alpha/include/u

[PATCH v5 02/26] arm64: Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt As far as I can tell this is not used by userspace and thus should not be part of the user-visible API. Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti Acked-by: Catalin Marinas --- arch/arm64/include/asm/setup.h | 3 ++- arch/arm64/include/uapi/asm/set

[PATCH v5 03/26] arm: Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt As far as I can tell this is not used by userspace and thus should not be part of the user-visible API. Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti Reviewed-by: Russell King (Oracle) --- arch/arm/include/asm/setup.h | 1 + arch/arm/include/uapi/asm/

[PATCH v5 04/26] ia64: Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt As far as I can tell this is not used by userspace and thus should not be part of the user-visible API. Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti --- arch/ia64/include/asm/setup.h | 10 ++ arch/ia64/include/uapi/asm/setup.h | 6 ++ 2 f

[PATCH v5 05/26] m68k: Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt As far as I can tell this is not used by userspace and thus should not be part of the user-visible API. Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti Acked-by: Geert Uytterhoeven --- arch/m68k/include/asm/setup.h | 3 +-- arch/m68k/include/uapi/asm/se

[PATCH v5 06/26] microblaze: Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt As far as I can tell this is not used by userspace and thus should not be part of the user-visible API. Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti --- arch/microblaze/include/asm/setup.h | 2 +- arch/microblaze/include/uapi/asm/setup.h | 2 -- 2 fil

[PATCH v5 07/26] mips: Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt As far as I can tell this is not used by userspace and thus should not be part of the user-visible API. Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti Reviewed-by: Philippe Mathieu-Daudé --- arch/mips/include/asm/setup.h | 3 ++- arch/mips/include/uapi

[PATCH v5 08/26] parisc: Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt As far as I can tell this is not used by userspace and thus should not be part of the user-visible API. Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller --- arch/parisc/include/asm/setup.h | 7 +

[PATCH v5 09/26] powerpc: Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt As far as I can tell this is not used by userspace and thus should not be part of the user-visible API. Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti Acked-by: Michael Ellerman --- arch/powerpc/include/asm/setup.h | 2 +- arch/powerpc/include/uapi/asm

[PATCH v5 10/26] sparc: Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt As far as I can tell this is not used by userspace and thus should not be part of the user-visible API. Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti --- arch/sparc/include/asm/setup.h | 6 +- arch/sparc/include/uapi/asm/setup.h | 7 --- 2 file

[PATCH v5 11/26] xtensa: Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt As far as I can tell this is not used by userspace and thus should not be part of the user-visible API. Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti Acked-by: Max Filippov --- arch/xtensa/include/asm/setup.h | 17 + arch/xtensa/includ

[PATCH v5 12/26] riscv: Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Alexandre Ghiti
As far as I can tell this is not used by userspace and thus should not be part of the user-visible API. Signed-off-by: Alexandre Ghiti --- arch/riscv/include/asm/setup.h | 7 +++ arch/riscv/include/uapi/asm/setup.h | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 10

[PATCH v5 13/26] asm-generic: Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt As far as I can tell this is not used by userspace and thus should not be part of the user-visible API. Since only contains COMMAND_LINE_SIZE we can just move it out of uapi to hide the definition and fix up the only direct use in Loongarch. Signed-off-by: Palmer Dabbelt

[PATCH v5 14/26] alpha: Remove empty

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti --- arch/alpha/include/uapi/asm/setup.h | 5 - 1 file changed, 5 deletions(-) delete mode 100644 arch/alpha/include/uapi/asm/setup.h diff --git a/arch/alpha/include/uapi/asm/setup.h b/arch/alpha/include/ua

[PATCH v5 15/26] arc: Remove empty

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti Reviewed-by: Philippe Mathieu-Daudé --- arch/arc/include/asm/setup.h | 1 - arch/arc/include/uapi/asm/setup.h | 6 -- 2 files changed, 7 deletions(-) delete mode 100644 arch/arc/include/uapi/asm/setup.

[PATCH v5 16/26] m68k: Remove empty

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti Acked-by: Geert Uytterhoeven --- arch/m68k/include/uapi/asm/setup.h | 15 --- 1 file changed, 15 deletions(-) delete mode 100644 arch/m68k/include/uapi/asm/setup.h diff --git a/arch/m68k/include/ua

[PATCH v5 17/26] arm64: Remove empty

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti --- arch/arm64/include/uapi/asm/setup.h | 25 - 1 file changed, 25 deletions(-) delete mode 100644 arch/arm64/include/uapi/asm/setup.h diff --git a/arch/arm64/include/uapi/asm/setup.h b

[PATCH v5 18/26] microblaze: Remove empty

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti --- arch/microblaze/include/uapi/asm/setup.h | 18 -- 1 file changed, 18 deletions(-) delete mode 100644 arch/microblaze/include/uapi/asm/setup.h diff --git a/arch/microblaze/include/uapi/asm/se

[PATCH v5 19/26] sparc: Remove empty

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti --- arch/sparc/include/uapi/asm/setup.h | 9 - 1 file changed, 9 deletions(-) delete mode 100644 arch/sparc/include/uapi/asm/setup.h diff --git a/arch/sparc/include/uapi/asm/setup.h b/arch/sparc/includ

[PATCH v5 20/26] parisc: Remove empty

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti Reviewed-by: Philippe Mathieu-Daudé Acked-by: Helge Deller --- arch/parisc/include/uapi/asm/setup.h | 5 - 1 file changed, 5 deletions(-) delete mode 100644 arch/parisc/include/uapi/asm/setup.h diff --git

[PATCH v5 21/26] x86: Remove empty

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti Reviewed-by: Philippe Mathieu-Daudé --- arch/x86/include/asm/setup.h | 2 -- arch/x86/include/uapi/asm/setup.h | 1 - 2 files changed, 3 deletions(-) delete mode 100644 arch/x86/include/uapi/asm/setup.h d

[PATCH v5 22/26] xtensa: Remove empty

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti Acked-by: Max Filippov --- arch/xtensa/include/uapi/asm/setup.h | 15 --- 1 file changed, 15 deletions(-) delete mode 100644 arch/xtensa/include/uapi/asm/setup.h diff --git a/arch/xtensa/include/ua

[PATCH v5 23/26] powerpc: Remove empty

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti --- arch/powerpc/include/uapi/asm/setup.h | 5 - 1 file changed, 5 deletions(-) delete mode 100644 arch/powerpc/include/uapi/asm/setup.h diff --git a/arch/powerpc/include/uapi/asm/setup.h b/arch/powerpc/in

[PATCH v5 24/26] mips: Remove empty

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti --- arch/mips/include/uapi/asm/setup.h | 5 - 1 file changed, 5 deletions(-) delete mode 100644 arch/mips/include/uapi/asm/setup.h diff --git a/arch/mips/include/uapi/asm/setup.h b/arch/mips/include/uapi/a

[PATCH v5 25/26] s390: Remove empty

2023-03-06 Thread Alexandre Ghiti
From: Palmer Dabbelt Signed-off-by: Palmer Dabbelt Signed-off-by: Alexandre Ghiti Acked-by: Heiko Carstens Reviewed-by: Philippe Mathieu-Daudé --- arch/s390/include/asm/setup.h | 1 - arch/s390/include/uapi/asm/setup.h | 1 - 2 files changed, 2 deletions(-) delete mode 100644 arch/s390

[PATCH v5 26/26] riscv: Remove empty

2023-03-06 Thread Alexandre Ghiti
Signed-off-by: Alexandre Ghiti --- arch/riscv/include/uapi/asm/setup.h | 6 -- 1 file changed, 6 deletions(-) delete mode 100644 arch/riscv/include/uapi/asm/setup.h diff --git a/arch/riscv/include/uapi/asm/setup.h b/arch/riscv/include/uapi/asm/setup.h deleted file mode 100644 index 17fcecd

Re: [PATCH 1/2] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope

2023-03-06 Thread Kautuk Consul
On 2023-02-24 16:45:45, Sathvika Vasireddy wrote: > On 23/02/23 10:39, Kautuk Consul wrote: > > > Hi Sathvika, > > > Just one question though. Went through the code again and I think > > > that this place shouldn't be proper to insert a SYM_FUNC_END > > > because we haven't entered the guest at th

Re: [PATCH 2/2] arch/powerpc/kvm: kvmppc_hv_entry: remove r4 argument

2023-03-06 Thread Kautuk Consul
Hi, On 2023-02-20 10:53:55, Kautuk Consul wrote: > kvmppc_hv_entry is called from only 2 locations within > book3s_hv_rmhandlers.S. Both of those locations set r4 > as HSTATE_KVM_VCPU(r13) before calling kvmppc_hv_entry. > So, shift the r4 load instruction to kvmppc_hv_entry and > thus modify the

[PATCH v2 0/2] Improving calls to kvmppc_hv_entry

2023-03-06 Thread Kautuk Consul
- remove .global scope of kvmppc_hv_entry - remove r4 argument to kvmppc_hv_entry as it is not required Changes since v1: - replaced .global by SYM_INNER_LABEL for kvmpcc_hv_entry Kautuk Consul (2): arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope arch/powerpc/kvm: kvmppc_hv_entry: rem

[PATCH v2 1/2] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope

2023-03-06 Thread Kautuk Consul
kvmppc_hv_entry isn't called from anywhere other than book3s_hv_rmhandlers.S itself. Removing .global scope for this function and annotating it with SYM_INNER_LABEL. Signed-off-by: Kautuk Consul --- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[PATCH v2 2/2] arch/powerpc/kvm: kvmppc_hv_entry: remove r4 argument

2023-03-06 Thread Kautuk Consul
kvmppc_hv_entry is called from only 2 locations within book3s_hv_rmhandlers.S. Both of those locations set r4 as HSTATE_KVM_VCPU(r13) before calling kvmppc_hv_entry. So, shift the r4 load instruction to kvmppc_hv_entry and thus modify the calling convention of this function. Signed-off-by: Kautuk

Re: [PATCH v5 00/26] Remove COMMAND_LINE_SIZE from uapi

2023-03-06 Thread Philippe Mathieu-Daudé
On 6/3/23 11:04, Alexandre Ghiti wrote: This all came up in the context of increasing COMMAND_LINE_SIZE in the RISC-V port. In theory that's a UABI break, as COMMAND_LINE_SIZE is the maximum length of /proc/cmdline and userspace could staticly rely on that to be correct. Usually I wouldn't mess

Re: Selftests powerpc/primitives test hangs (linux-next)

2023-03-06 Thread Laurent Dufour
On 03/03/2023 10:19:29, Sachin Sant wrote: > While running powerpc/primitives selftests, the test (load_unaligned_zeropad) > hangs indefinitely. This behaviour is seen with linux-next 6.2.0-next-20230303 > on a Power10 logical partition. > > Git bisect points to following commit > > commit 169db3

[PATCH] powerpc/mm: fix mmap_lock bad unlock

2023-03-06 Thread Laurent Dufour
When page fault is tried holding the per VMA lock, bad_access_pkey() and bad_access() should not be called because it is assuming the mmap_lock is held. In the case a bad access is detected, fall back to the default path, grabbing the mmap_lock to handle the fault and report the error. Fixes: 169d

Re: [PATCH] powerpc/mm: fix mmap_lock bad unlock

2023-03-06 Thread David Hildenbrand
On 06.03.23 14:55, Laurent Dufour wrote: When page fault is tried holding the per VMA lock, bad_access_pkey() and bad_access() should not be called because it is assuming the mmap_lock is held. In the case a bad access is detected, fall back to the default path, grabbing the mmap_lock to handle t

Re: [PATCH] powerpc/mm: fix mmap_lock bad unlock

2023-03-06 Thread Laurent Dufour
On 06/03/2023 15:07:26, David Hildenbrand wrote: > On 06.03.23 14:55, Laurent Dufour wrote: >> When page fault is tried holding the per VMA lock, bad_access_pkey() and >> bad_access() should not be called because it is assuming the mmap_lock is >> held. >> In the case a bad access is detected, fall

Re: [PATCH v6 01/10] dt-bindings: soc: fsl: cpm_qe: Add TSA controller

2023-03-06 Thread Herve Codina
Hi Rob, On Sun, 26 Feb 2023 11:48:33 -0600 Rob Herring wrote: [...] > > + '#size-cells': > > +const: 0 > > + > > + '#fsl,serial-cells': > > #foo-cells is for when there are differing foo providers which need > different number of cells. That's not the case here. > Ok, I will remove th

[PATCH] powerpc/mm: fix mmap_lock bad unlock

2023-03-06 Thread Laurent Dufour
When page fault is tried holding the per VMA lock, bad_access_pkey() and bad_access() should not be called because it is assuming the mmap_lock is held. In the case a bad access is detected, fall back to the default path, grabbing the mmap_lock to handle the fault and report the error. Fixes: 169d

[PATCH] mm: add PTE pointer parameter to flush_tlb_fix_spurious_fault()

2023-03-06 Thread Gerald Schaefer
s390 can do more fine-grained handling of spurious TLB protection faults, when there also is the PTE pointer available. Therefore, pass on the PTE pointer to flush_tlb_fix_spurious_fault() as an additional parameter. This will add no functional change to other architectures, but those with privat

[PATCH v7 00/10] Add the PowerQUICC audio support using the QMC

2023-03-06 Thread Herve Codina
Hi, This series adds support for audio using the QMC controller available in some Freescale PowerQUICC SoCs. This series contains three parts in order to show the different blocks hierarchy and their usage in this support. The first one is related to TSA (Time Slot Assigner). The TSA handles the

[PATCH v7 01/10] dt-bindings: soc: fsl: cpm_qe: Add TSA controller

2023-03-06 Thread Herve Codina
Add support for the time slot assigner (TSA) available in some PowerQUICC SoC such as MPC885 or MPC866. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- .../bindings/soc/fsl/cpm_qe/fsl,cpm1-tsa.yaml | 205 ++ include/dt-bindings/soc/cpm1-fsl,tsa.h| 13 ++ 2

[PATCH v7 02/10] soc: fsl: cpm1: Add support for TSA

2023-03-06 Thread Herve Codina
The TSA (Time Slot Assigner) purpose is to route some TDM time-slots to other internal serial controllers. It is available in some PowerQUICC SoC such as the MPC885 or MPC866. It is also available on some Quicc Engine SoCs. This current version support CPM1 SoCs only and some enhancement are need

[PATCH v7 03/10] MAINTAINERS: add the Freescale TSA controller entry

2023-03-06 Thread Herve Codina
After contributing the driver, add myself as the maintainer for the Freescale TSA controller. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8d5bc223f305..fea9ee7ade8e 100644

[PATCH v7 04/10] powerpc/8xx: Use a larger CPM1 command check mask

2023-03-06 Thread Herve Codina
The CPM1 command mask is defined for use with the standard CPM1 command register as described in the user's manual: 0 |13|47|8 11|12 14| 15| RST|- |OPCODE|CH_NUM| -|FLG| In the QMC extension the CPM1 command register is redefined (QMC supplement user's manue

[PATCH v7 05/10] dt-bindings: soc: fsl: cpm_qe: Add QMC controller

2023-03-06 Thread Herve Codina
Add support for the QMC (QUICC Multichannel Controller) available in some PowerQUICC SoC such as MPC885 or MPC866. Signed-off-by: Herve Codina Reviewed-by: Krzysztof Kozlowski Reviewed-by: Christophe Leroy --- .../soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml | 162 ++ 1 file chang

[PATCH v7 06/10] soc: fsl: cpm1: Add support for QMC

2023-03-06 Thread Herve Codina
The QMC (QUICC Multichannel Controller) emulates up to 64 channels within one serial controller using the same TDM physical interface routed from the TSA. It is available in some PowerQUICC SoC such as the MPC885 or MPC866. It is also available on some Quicc Engine SoCs. This current version supp

[PATCH v7 07/10] MAINTAINERS: add the Freescale QMC controller entry

2023-03-06 Thread Herve Codina
After contributing the driver, add myself as the maintainer for the Freescale QMC controller. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index fea9ee7ade8e..5597d402fbd8 100644 -

[PATCH v7 08/10] dt-bindings: sound: Add support for QMC audio

2023-03-06 Thread Herve Codina
The QMC (QUICC mutichannel controller) is a controller present in some PowerQUICC SoC such as MPC885. The QMC audio is an ASoC component that uses the QMC controller to transfer the audio data. Signed-off-by: Herve Codina Reviewed-by: Krzysztof Kozlowski Reviewed-by: Christophe Leroy --- .../b

[PATCH v7 09/10] ASoC: fsl: Add support for QMC audio

2023-03-06 Thread Herve Codina
The QMC audio is an ASoC component which provides DAIs that use the QMC (QUICC Multichannel Controller) to transfer the audio data. It provides as many DAIs as the number of QMC channels it references. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Tested-by: Christophe Leroy --- s

[PATCH v7 10/10] MAINTAINERS: add the Freescale QMC audio entry

2023-03-06 Thread Herve Codina
After contributing the component, add myself as the maintainer for the Freescale QMC audio ASoC component. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5597d402fbd8..a6e6b70c

Re: [PATCH v7 00/10] Add the PowerQUICC audio support using the QMC

2023-03-06 Thread Mark Brown
On Mon, Mar 06, 2023 at 05:17:44PM +0100, Herve Codina wrote: > Hi, > > This series adds support for audio using the QMC controller available in > some Freescale PowerQUICC SoCs. > > This series contains three parts in order to show the different blocks > hierarchy and their usage in this support

Re: [PATCH] mm: add PTE pointer parameter to flush_tlb_fix_spurious_fault()

2023-03-06 Thread Catalin Marinas
On Mon, Mar 06, 2023 at 05:15:48PM +0100, Gerald Schaefer wrote: > diff --git a/arch/arm64/include/asm/pgtable.h > b/arch/arm64/include/asm/pgtable.h > index b6ba466e2e8a..0bd18de9fd97 100644 > --- a/arch/arm64/include/asm/pgtable.h > +++ b/arch/arm64/include/asm/pgtable.h > @@ -57,7 +57,7 @@ stat

Re: [PATCH] powerpc/mm: fix mmap_lock bad unlock

2023-03-06 Thread Suren Baghdasaryan
On Mon, Mar 6, 2023 at 6:09 AM Laurent Dufour wrote: > > On 06/03/2023 15:07:26, David Hildenbrand wrote: > > On 06.03.23 14:55, Laurent Dufour wrote: > >> When page fault is tried holding the per VMA lock, bad_access_pkey() and > >> bad_access() should not be called because it is assuming the mma

[PATCH v2 3/4] powerpc/iommu: Add iommu_ops to report capabilities and

2023-03-06 Thread Timothy Pearson
allow blocking domains Up until now PPC64 managed to avoid using iommu_ops. The VFIO driver uses a SPAPR TCE sub-driver and all iommu_ops uses were kept in the Type1 VFIO driver. Recent development added 2 uses of iommu_ops to the generic VFIO which broke POWER: - a coherency capability check; -

[PATCH v2 4/4] Add myself to MAINTAINERS for Power VFIO support

2023-03-06 Thread Timothy Pearson
Signed-off-by: Timothy Pearson --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8d5bc223f305..876f96e82d66 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9836,6 +9836,11 @@ F: drivers/crypto/vmx/ghash* F: drivers/crypto/vmx/ppc-xl

[PATCH v2] KVM: PPC: Make KVM_CAP_IRQFD_RESAMPLE support platform

2023-03-06 Thread Timothy Pearson
dependent When introduced, IRQFD resampling worked on POWER8 with XICS. However KVM on POWER9 has never implemented it - the compatibility mode code ("XICS-on-XIVE") misses the kvm_notify_acked_irq() call and the native XIVE mode does not handle INTx in KVM at all. This moved the capability supp

[PATCH v2 2/4] powerpc/pci_64: Init pcibios subsys a bit later

2023-03-06 Thread Timothy Pearson
The following patches are going to add dependency/use of iommu_ops which is initialized in subsys_initcall as well. This moves pciobios_init() to the next initcall level. This should not cause behavioral change. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Timothy Pearson --- arch/power

[PATCH v2 1/4] powerpc/iommu: Add "borrowing" iommu_table_group_ops

2023-03-06 Thread Timothy Pearson
PPC64 IOMMU API defines iommu_table_group_ops which handles DMA windows for PEs: control the ownership, create/set/unset a table the hardware for dynamic DMA windows (DDW). VFIO uses the API to implement support on POWER. So far only PowerNV IODA2 (POWER8 and newer machines) implemented this and

[PATCH v2 0/4] Reenable VFIO support on POWER systems

2023-03-06 Thread Timothy Pearson
This patch series reenables VFIO support on POWER systems. It is based on Alexey Kardashevskiys's patch series, rebased and successfully tested under QEMU with a Marvell PCIe SATA controller on a POWER9 Blackbird host. Alexey Kardashevskiy (3): powerpc/iommu: Add "borrowing" iommu_table_group_o

Re: [PATCH] mm: add PTE pointer parameter to flush_tlb_fix_spurious_fault()

2023-03-06 Thread Gerald Schaefer
On Mon, 6 Mar 2023 17:06:44 + Catalin Marinas wrote: > On Mon, Mar 06, 2023 at 05:15:48PM +0100, Gerald Schaefer wrote: > > diff --git a/arch/arm64/include/asm/pgtable.h > > b/arch/arm64/include/asm/pgtable.h > > index b6ba466e2e8a..0bd18de9fd97 100644 > > --- a/arch/arm64/include/asm/pgtabl

[PATCH v2 0/4] KVM: Refactor KVM stats macros and enable custom stat names

2023-03-06 Thread David Matlack
This series refactors the KVM stats macros to reduce duplication and adds the support for choosing custom names for stats. Custom name makes it possible to decouple the userspace-visible stat names from their internal representation in C. This can allow future commits to refactor the various stats

[PATCH v2 2/4] KVM: Refactor designated initializer macros for struct _kvm_stats_desc

2023-03-06 Thread David Matlack
Refactor the macros that generate struct _kvm_stats_desc designated initializers to cut down on duplication. No functional change intended. Signed-off-by: David Matlack --- include/linux/kvm_host.h | 75 +++- 1 file changed, 35 insertions(+), 40 deletions(-)

[PATCH v2 1/4] KVM: Refactor stats descriptor generation macros

2023-03-06 Thread David Matlack
Refactor the various KVM stats macros to reduce the amount of duplicate macro code. This change also improves readability by spelling out "CUMULATIVE", "INSTANT", and "PEAK" instead of the previous short-hands which were less clear ("COUNTER", "ICOUNTER", and "PCOUNTER"). No functional change inte

[PATCH v2 3/4] KVM: Allow custom names for KVM_STAT()

2023-03-06 Thread David Matlack
Allow custom names to be specified for stats built on KVM_STAT() via a new inner macro __KVM_STAT(). e.g. KVM_STAT(VM, CUMULATIVE, NONE, foo), __KVM_STAT(VM, CUMULATIVE, NONE, bar, "custom_name"), ... Custom name support enables decoupling the userspace-visible stat names from their interna

[PATCH v2 4/4] KVM: x86: Drop union for pages_{4k,2m,1g} stats

2023-03-06 Thread David Matlack
Drop the union for the pages_{4k,2m,1g} stats. The union is no longer necessary now that KVM supports choosing a custom name for stats. Eliminating the union also would allow future commits to more easily move pages[] into common code, e.g. if KVM ever gains support for a common page table code.

[PATCH v10 05/13] dt-bindings: clock: Add ids for Lynx 10g PLLs

2023-03-06 Thread Sean Anderson
This adds ids for the Lynx 10g SerDes's internal PLLs. These may be used with assigned-clock* to specify a particular frequency to use. For example, to set the second PLL (at offset 0x20)'s frequency, use LYNX10G_PLLa(1). These are for use only in the device tree, and are not otherwise used by the

[PATCH v10 00/13] phy: Add support for Lynx 10G SerDes

2023-03-06 Thread Sean Anderson
This adds support for the Lynx 10G SerDes found on the QorIQ T-series and Layerscape series. Due to limited time and hardware, only support for the LS1046ARDB and LS1088ARDB is added in this initial series. This series is based on phy/next, but it requires phylink support. This is already present

[PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml

2023-03-06 Thread Sean Anderson
This is a generic binding for simple MMIO GPIO controllers. Although we have a single driver for these controllers, they were previously spread over several files. Consolidate them. The register descriptions are adapted from the comments in the source. There is no set order for the registers, so I

[PATCH v10 02/13] dt-bindings: phy: Add Lynx 10G phy binding

2023-03-06 Thread Sean Anderson
This adds a binding for the SerDes module found on QorIQ processors. Each phy is a subnode of the top-level device, possibly supporting multiple lanes and protocols. This "thick" #phy-cells is used due to allow for better organization of parameters. Note that the particular parameters necessary to

[PATCH v10 06/13] clk: Add Lynx 10G SerDes PLL driver

2023-03-06 Thread Sean Anderson
This adds support for the PLLs found in Lynx 10G "SerDes" devices found on various NXP QorIQ SoCs. There are two PLLs in each SerDes. This driver has been split from the main PHY driver to allow for better review, even though these PLLs are not present anywhere else besides the SerDes. An auxiliary

[PATCH v10 01/13] dt-bindings: phy: Add 2500BASE-X and 10GBASE-R

2023-03-06 Thread Sean Anderson
This adds some modes necessary for Lynx 10G support. 2500BASE-X, also known as 2.5G SGMII, is 1000BASE-X/SGMII overclocked to 3.125 GHz, with autonegotiation disabled. 10GBASE-R, also known as XFI, is the protocol spoken between the PMA and PMD ethernet layers for 10GBASE-T and 10GBASE-S/L/E. It is

[PATCH v10 04/13] dt-bindings: gpio-mmio: Add compatible for QIXIS

2023-03-06 Thread Sean Anderson
NXP has a "QIXIS" FPGA on several of their reference design boards. On the LS1088ARDB there are several registers which control GPIOs. These can be modeled with the MMIO GPIO driver. Signed-off-by: Sean Anderson --- Changes in v10: - New .../devicetree/bindings/gpio/gpio-mmio.yaml| 14

[PATCH v10 09/13] arm64: dts: ls1046a: Add serdes nodes

2023-03-06 Thread Sean Anderson
This adds nodes for the SerDes devices. They are disabled by default to prevent any breakage on existing boards. Signed-off-by: Sean Anderson --- Changes in v10: - Move serdes bindings to SoC dtsi - Add support for all (ethernet) serdes modes - Refer to "nodes" instead of "bindings" - Move compa

[PATCH v10 08/13] phy: lynx10g: Enable by default on Layerscape

2023-03-06 Thread Sean Anderson
The next few patches will break ethernet if the serdes is not enabled, so enable the serdes driver by default on Layerscape. Signed-off-by: Sean Anderson --- Changes in v10: - New drivers/phy/freescale/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/phy/freescale/Kconfig b/

[PATCH v10 10/13] arm64: dts: ls1046ardb: Add serdes descriptions

2023-03-06 Thread Sean Anderson
This adds appropriate descriptions for the macs which use the SerDes. The 156.25MHz fixed clock is a crystal. The 100MHz clocks (there are actually 3) come from a Renesas 6V49205B at address 69 on i2c0. There is no driver for this device (and as far as I know all you can do with the 100MHz clocks i

[PATCH v10 11/13] arm64: dts: ls1088a: Add serdes nodes

2023-03-06 Thread Sean Anderson
This adds nodes for the SerDes devices. They are disabled by default to prevent any breakage on existing boards. Signed-off-by: Sean Anderson --- Changes in v10: - Move serdes bindings to SoC dtsi - Add support for all (ethernet) serdes modes - Refer to "nodes" instead of "bindings" - Move compa

[PATCH v10 13/13] arm64: dts: ls1088ardb: Add serdes descriptions

2023-03-06 Thread Sean Anderson
This adds serdes support to the LS1088ARDB. I have tested the QSGMII ports as well as the two 10G ports. The SFP slot is now fully supported, instead of being modeled as a fixed-link. Linux hangs around when the serdes is initialized if the si5341 is enabled with the in-tree driver, so I have mode

[PATCH v10 12/13] arm64: dts: ls1088a: Prevent PCSs from probing as phys

2023-03-06 Thread Sean Anderson
The internal PCSs are not always accessible during boot (such as if the serdes has deselected the appropriate link mode). Give them appropriate compatible strings so they don't automatically (fail to) probe as genphys. Signed-off-by: Sean Anderson --- (no changes since v8) Changes in v8: - New

[PATCH v10 07/13] phy: fsl: Add Lynx 10G SerDes driver

2023-03-06 Thread Sean Anderson
This adds support for the Lynx 10G "SerDes" devices found on various NXP QorIQ SoCs. There may be up to four SerDes devices on each SoC, each supporting up to eight lanes. Protocol support for each SerDes is highly heterogeneous, with each SoC typically having a totally different selection of suppo

Re: [PATCH v4 31/33] powerc/mm: try VMA lock-based page fault handling first

2023-03-06 Thread Suren Baghdasaryan
On Mon, Feb 27, 2023 at 9:37 AM Suren Baghdasaryan wrote: > > From: Laurent Dufour > > Attempt VMA lock-based page fault handling first, and fall back to the > existing mmap_lock-based handling if that fails. > Copied from "x86/mm: try VMA lock-based page fault handling first" Hi Andrew, Laurent

Re: [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml

2023-03-06 Thread Jonas Gorski
Hi, On Mon, 6 Mar 2023 at 20:16, Sean Anderson wrote: > > This is a generic binding for simple MMIO GPIO controllers. Although we > have a single driver for these controllers, they were previously spread > over several files. Consolidate them. The register descriptions are > adapted from the comm

Re: [PATCH v10 03/13] dt-bindings: Convert gpio-mmio to yaml

2023-03-06 Thread Sean Anderson
On 3/6/23 15:51, Jonas Gorski wrote: > Hi, > > On Mon, 6 Mar 2023 at 20:16, Sean Anderson wrote: >> >> This is a generic binding for simple MMIO GPIO controllers. Although we >> have a single driver for these controllers, they were previously spread >> over several files. Consolidate them. The re

[PATCH 4/8] powerpc/rtas: fix miswording in rtas_function kerneldoc

2023-03-06 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch The 'filter' member is a pointer, not a bool; fix the wording accordingly. Signed-off-by: Nathan Lynch --- arch/powerpc/kernel/rtas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index c73b01d722f

[PATCH 7/8] powerpc/rtas: warn on unsafe argument to rtas_call_unlocked()

2023-03-06 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Any caller of rtas_call_unlocked() must provide an rtas_args parameter block distinct from the core rtas_args buffer used by the rtas_call() path. It's an unlikely error to make, but the potential consequences are grim, and it's trivial to check. Signed-off-by: Nathan Lynch -

[PATCH 3/8] powerpc/rtas: rtas_call_unlocked() kerneldoc

2023-03-06 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Add documentation for rtas_call_unlocked(), including details on how it differs from rtas_call(). Signed-off-by: Nathan Lynch --- arch/powerpc/kernel/rtas.c | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kerne

[PATCH 8/8] powerpc/rtas: consume retry statuses in sys_rtas()

2023-03-06 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch The kernel can handle retrying RTAS function calls in response to -2/990x in the sys_rtas() handler instead of relaying the intermediate status to user space. Justifications: * Currently it's nondeterministic and quite variable in practice whether a retry status is returned

[PATCH 0/8] RTAS changes for 6.4

2023-03-06 Thread Nathan Lynch via B4 Relay
Proposed changes for the RTAS subsystem and client code. Fixes that are subject to backporting are at the front of the queue, followed by documentation and cleanups, with enhancements at the end. Noteworthy changes: * Change sys_rtas() to consume -2/990x statuses instead of returning them to us

[PATCH 1/8] powerpc/rtas: ensure 8-byte alignment for struct rtas_args

2023-03-06 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch CHRP and PAPR agree: "In order to make an RTAS call, the operating system must construct an argument call buffer aligned on an eight byte boundary in physically contiguous real memory [...]." (7.2.7 Calling Mechanism and Conventions). struct rtas_args is the type used for this

[PATCH 5/8] powerpc/rtas: rename va_rtas_call_unlocked() to va_rtas_call()

2023-03-06 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch The function name va_rtas_call_unlocked() is confusing: it may be called with or without rtas_lock held. Rename it to va_rtas_call(). Signed-off-by: Nathan Lynch --- arch/powerpc/kernel/rtas.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/

[PATCH 2/8] powerpc/rtas: use memmove for potentially overlapping buffer copy

2023-03-06 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Using memcpy() isn't safe when buf is identical to rtas_err_buf, which can happen during boot before slab is up. Full context which may not be obvious from the diff: if (altbuf) { buf = altbuf; } else { buf = rtas_err_buf;

[PATCH 6/8] powerpc/rtas: lockdep annotations

2023-03-06 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Add lockdep annotations for the following properties that must hold: * Any error log retrieval must be atomically coupled with the prior RTAS call, without a window for another RTAS call to occur before the error log can be retrieved. * All users of the core rtas_args par

[PATCH V5 00/15] spi: Add support for stacked/parallel memories

2023-03-06 Thread Amit Kumar Mahapatra
This patch is in the continuation to the discussions which happened on 'commit f89504300e94 ("spi: Stacked/parallel memories bindings")' for adding dt-binding support for stacked/parallel memories. This patch series updated the spi-nor, spi core and the spi drivers to add stacked and parallel memo

[PATCH V5 01/15] spi: Replace all spi->chip_select and spi->cs_gpiod references with function call

2023-03-06 Thread Amit Kumar Mahapatra
Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select

[PATCH V5 02/15] net: Replace all spi->chip_select and spi->cs_gpiod references with function call

2023-03-06 Thread Amit Kumar Mahapatra
Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select

[PATCH V5 03/15] iio: imu: Replace all spi->chip_select and spi->cs_gpiod references with function call

2023-03-06 Thread Amit Kumar Mahapatra
Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select

[PATCH V5 04/15] mtd: devices: Replace all spi->chip_select and spi->cs_gpiod references with function call

2023-03-06 Thread Amit Kumar Mahapatra
Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select

[PATCH V5 05/15] staging: Replace all spi->chip_select and spi->cs_gpiod references with function call

2023-03-06 Thread Amit Kumar Mahapatra
Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod members of struct spi_device to be an array. But changing the type of these members to array would break the spi driver functionality. To make the transition smoother introduced four new APIs to get/set the spi->chip_select

  1   2   >