[PATCH] powerpc/perf/hv-24x7: Update domain value check

2023-08-24 Thread Kajol Jain
Valid domain value is in range 1 to HV_PERF_DOMAIN_MAX. Current code has check for domain value greater than or equal to HV_PERF_DOMAIN_MAX. But the check for domain value 0 is missing. Fix this issue by adding check for domain value 0. Fixes: ebd4a5a3ebd9 ("powerpc/perf/hv-24x7: Minor

Re: [PATCH] kbuild: Show Kconfig fragments in "help"

2023-08-24 Thread Christophe Leroy
Le 25/08/2023 à 00:36, Kees Cook a écrit : > Doing a "make help" would show only hard-coded Kconfig targets and > depended on the archhelp target to include ".config" targets. There was > nothing showing global kernel/configs/ targets. Solve this by walking > the wildcard list and include them

Re: [RFC PATCH v2 0/7] Add audio support in v4l2 framework

2023-08-24 Thread Shengjiu Wang
On Fri, Aug 25, 2023 at 4:21 AM Mark Brown wrote: > > On Thu, Aug 24, 2023 at 07:03:09PM +0200, Takashi Iwai wrote: > > Shengjiu Wang wrote: > > > > But there are several issues: > > > 1. Need to create sound cards. ASRC module support multi instances, then > > > need to create multi sound cards

Re: (subset) [PATCH 00/17] -Wmissing-prototype warning fixes

2023-08-24 Thread Martin K. Petersen
On Thu, 10 Aug 2023 16:19:18 +0200, Arnd Bergmann wrote: > Most of the patches I sent so far for the -Wmissing-prototype warnings > have made it into linux-next now. There are a few that I'm resending > now as nobody has picked them up, and then a number of fixes that I > found while

Re: (subset) [PATCH 00/17] -Wmissing-prototype warning fixes

2023-08-24 Thread Michael Schmitz
Hi Martin, Arnd, On 25/08/23 13:12, Martin K. Petersen wrote: On Thu, 10 Aug 2023 16:19:18 +0200, Arnd Bergmann wrote: Most of the patches I sent so far for the -Wmissing-prototype warnings have made it into linux-next now. There are a few that I'm resending now as nobody has picked them up,

Re: [PATCH v7 02/24] iommu: Add IOMMU_DOMAIN_PLATFORM

2023-08-24 Thread Jerry Snitselaar
On Wed, Aug 23, 2023 at 01:47:16PM -0300, Jason Gunthorpe wrote: > This is used when the iommu driver is taking control of the dma_ops, > currently only on S390 and power spapr. It is designed to preserve the > original ops->detach_dev() semantic that these S390 was built around. > > Provide an

[PATCH] powerpc/dexcr: Move HASHCHK trap handler

2023-08-24 Thread Benjamin Gray
To determine if a trap was caused by a HASHCHK instruction, we inspect the user instruction that triggered the trap. However this may sleep if the page needs to be faulted in. Move the HASHCHK handler logic to after we allow IRQs, which is fine because we are only interested in HASHCHK if it's a

Re: [PATCH v7 5/8] KVM: x86/mmu: Don't pass FOLL_GET to __kvm_follow_pfn

2023-08-24 Thread David Stevens
On Fri, Aug 25, 2023 at 12:15 AM Sean Christopherson wrote: > > On Thu, Aug 24, 2023, David Stevens wrote: > > On Wed, Jul 5, 2023 at 7:25 PM Yu Zhang wrote: > > > > > > On Tue, Jul 04, 2023 at 04:50:50PM +0900, David Stevens wrote: > > > > @@ -4529,7 +4540,8 @@ static int

Re: [PATCH 4/4] powerpc/64s: Use POWER10 stsync barrier for wmb()

2023-08-24 Thread Joel Stanley
On Thu, 24 Aug 2023 at 12:12, Michael Ellerman wrote: > > Michael Ellerman writes: > > Michael Ellerman writes: > >> "Nicholas Piggin" writes: > >>> On Wed Jun 14, 2023 at 3:56 PM AEST, Michael Ellerman wrote: > Michael Ellerman writes: > > Nicholas Piggin writes: > >> The

Re: [PATCH 0/7] Expect immutable pointer in virt_to_phys/isa_virt_to_bus prototypes

2023-08-24 Thread Stanislav Kinsburskii
On Fri, Apr 28, 2023 at 08:40:51AM +0100, Arnd Bergmann wrote: > On Sat, Apr 15, 2023, at 12:17, Stanislav Kinsburskii wrote: > > This series is aimed to address compilation warnings when a constant pointer > > is passed to virt_to_phys and isa_virt_to_bus functions: > > > > warning: passing

Re: [PATCH] kbuild: Show Kconfig fragments in "help"

2023-08-24 Thread Randy Dunlap
Hi Kees, On 8/24/23 15:36, Kees Cook wrote: > Doing a "make help" would show only hard-coded Kconfig targets and > depended on the archhelp target to include ".config" targets. There was > nothing showing global kernel/configs/ targets. Solve this by walking > the wildcard list and include them

[PATCH] kbuild: Show Kconfig fragments in "help"

2023-08-24 Thread Kees Cook
Doing a "make help" would show only hard-coded Kconfig targets and depended on the archhelp target to include ".config" targets. There was nothing showing global kernel/configs/ targets. Solve this by walking the wildcard list and include them in the output, using the first comment line as the

Re: [PATCH v14 00/15] phy: Add support for Lynx 10G SerDes

2023-08-24 Thread Sean Anderson
On 8/21/23 19:59, Vladimir Oltean wrote: > On Mon, Aug 21, 2023 at 07:39:15PM -0400, Sean Anderson wrote: >> Well, I think we should take the opportunity to think about the hardware >> which exists and how we plan to model it. IMO grouping lanes into a >> single phy simplifies both the phy driver

Re: [PATCH v14 00/15] phy: Add support for Lynx 10G SerDes

2023-08-24 Thread Sean Anderson
On 8/22/23 10:55, Ioana Ciornei wrote: > On Mon, Aug 21, 2023 at 02:46:53PM -0400, Sean Anderson wrote: >> On 8/21/23 14:13, Ioana Ciornei wrote: >> > On Mon, Aug 21, 2023 at 01:45:44PM -0400, Sean Anderson wrote: >> >> Well, we have two pieces of information we need >> >> >> >> - What values do

Re: [RFC PATCH v2 0/7] Add audio support in v4l2 framework

2023-08-24 Thread Mark Brown
On Thu, Aug 24, 2023 at 07:03:09PM +0200, Takashi Iwai wrote: > Shengjiu Wang wrote: > > But there are several issues: > > 1. Need to create sound cards. ASRC module support multi instances, then > > need to create multi sound cards for each instance. > Hm, why can't it be multiple PCM

Re: [RFC PATCH v2 0/7] Add audio support in v4l2 framework

2023-08-24 Thread Takashi Iwai
On Wed, 23 Aug 2023 16:33:19 +0200, Shengjiu Wang wrote: > > On Fri, Aug 11, 2023 at 7:05 PM Shengjiu Wang wrote: > > > > Hi Mark, Takashi > > > > On Thu, Aug 3, 2023 at 9:11 PM Shengjiu Wang > > wrote: > > > > > > On Thu, Aug 3, 2023 at 1:28 AM Mark Brown wrote: > > > > > > > > On Wed, Aug

Re: [PATCH v4 21/28] net: wan: Add framer framework support

2023-08-24 Thread Herve Codina
Hi Simon, On Sun, 20 Aug 2023 19:15:11 +0200 Simon Horman wrote: > On Fri, Aug 18, 2023 at 06:39:15PM +0200, Christophe Leroy wrote: > > From: Herve Codina > > > > A framer is a component in charge of an E1/T1 line interface. > > Connected usually to a TDM bus, it converts TDM frames to/from

Re: [PATCH v4 21/28] net: wan: Add framer framework support

2023-08-24 Thread Herve Codina
Hi Christophe, On Mon, 21 Aug 2023 08:02:10 +0200 Christophe JAILLET wrote: > Le 18/08/2023 à 18:39, Christophe Leroy a écrit : > > From: Herve Codina > > > > A framer is a component in charge of an E1/T1 line interface. > > Connected usually to a TDM bus, it converts TDM frames to/from E1/T1

Re: [PATCH v4 20/28] wan: qmc_hdlc: Add runtime timeslots changes support

2023-08-24 Thread Herve Codina
Hi Christophe, On Mon, 21 Aug 2023 07:40:26 +0200 Christophe JAILLET wrote: > Le 18/08/2023 à 18:39, Christophe Leroy a écrit : > > From: Herve Codina > > > > QMC channels support runtime timeslots changes but nothing is done at > > the QMC HDLC driver to handle these changes. > > > > Use

Re: [PATCH v4 22/28] dt-bindings: net: Add the Lantiq PEF2256 E1/T1/J1 framer

2023-08-24 Thread Herve Codina
Hi Rob, On Mon, 21 Aug 2023 15:49:29 -0500 Rob Herring wrote: > On Fri, Aug 18, 2023 at 06:39:16PM +0200, Christophe Leroy wrote: > > From: Herve Codina > > > > The Lantiq PEF2256 is a framer and line interface component designed to > > fulfill all required interfacing between an analog

Re: [PATCH v4 06/28] dt-bindings: net: Add support for QMC HDLC

2023-08-24 Thread Herve Codina
On Mon, 21 Aug 2023 15:42:58 -0500 Rob Herring wrote: > On Fri, Aug 18, 2023 at 06:39:00PM +0200, Christophe Leroy wrote: > > From: Herve Codina > > > > The QMC (QUICC mutichannel controller) is a controller present in some > > PowerQUICC SoC such as MPC885. > > The QMC HDLC uses the QMC

Re: [PATCH v7 5/8] KVM: x86/mmu: Don't pass FOLL_GET to __kvm_follow_pfn

2023-08-24 Thread Sean Christopherson
On Thu, Aug 24, 2023, David Stevens wrote: > On Wed, Jul 5, 2023 at 7:25 PM Yu Zhang wrote: > > > > On Tue, Jul 04, 2023 at 04:50:50PM +0900, David Stevens wrote: > > > @@ -4529,7 +4540,8 @@ static int kvm_tdp_mmu_page_fault(struct kvm_vcpu > > > *vcpu, > > > > > > out_unlock: > > >

Re: [powerpc:next] BUILD REGRESSION 0f71dcfb4aef6043da6cc509e7a7f6a3ae87c12d

2023-08-24 Thread Christophe Leroy
g-r023-20230822 gcc > arm randconfig-r025-20230823 clang > arm stm32_defconfig gcc > arm64allmodconfig gcc > arm64 allnoconfig gcc > arm64allyesconfig gcc >

Re: [PATCH v3] powerpc: Use shared font data

2023-08-24 Thread Dr. David Alan Gilbert
* Michael Ellerman (m...@ellerman.id.au) wrote: > "Dr. David Alan Gilbert" writes: > > * li...@treblig.org (li...@treblig.org) wrote: > >> From: "Dr. David Alan Gilbert" > >> > >> PowerPC has a 'btext' font used for the console which is almost identical > >> to the shared font_sun8x16, so use

[powerpc:merge] BUILD SUCCESS 64064aca208d7b078c36be8399825ce8b2cab5be

2023-08-24 Thread kernel test robot
gcc arm64randconfig-r012-20230824 clang arm64randconfig-r013-20230822 clang arm64randconfig-r021-20230823 gcc arm64randconfig-r026-20230823 gcc csky allmodconfig gcc csky

[PATCH] powerpc/mm: Allow ARCH_FORCE_MAX_ORDER up to 12

2023-08-24 Thread Michael Ellerman
Christophe reported that the change to ARCH_FORCE_MAX_ORDER to limit the range to 10 had broken his ability to configure hugepages: # echo 1 > /sys/kernel/mm/hugepages/hugepages-8192kB/nr_hugepages sh: write error: Invalid argument Several of the powerpc defconfigs previously set the

Re: [PATCH 4/4] powerpc/64s: Use POWER10 stsync barrier for wmb()

2023-08-24 Thread Michael Ellerman
Michael Ellerman writes: > Michael Ellerman writes: >> "Nicholas Piggin" writes: >>> On Wed Jun 14, 2023 at 3:56 PM AEST, Michael Ellerman wrote: Michael Ellerman writes: > Nicholas Piggin writes: >> The most expensive ordering for hwsync to provide is the store-load >>

Re: [PATCH 4/4] powerpc/64s: Use POWER10 stsync barrier for wmb()

2023-08-24 Thread Michael Ellerman
Michael Ellerman writes: > "Nicholas Piggin" writes: >> On Wed Jun 14, 2023 at 3:56 PM AEST, Michael Ellerman wrote: >>> Michael Ellerman writes: >>> > Nicholas Piggin writes: >>> >> The most expensive ordering for hwsync to provide is the store-load >>> >> barrier, because all prior stores

Re: [PATCH v8 5/8] KVM: x86/mmu: Don't pass FOLL_GET to __kvm_follow_pfn

2023-08-24 Thread Mika Penttilä
On 8/24/23 11:04, David Stevens wrote: From: David Stevens Stop passing FOLL_GET to __kvm_follow_pfn. This allows the host to map memory into the guest that is backed by un-refcounted struct pages - for example, the tail pages of higher order non-compound pages allocated by the amdgpu driver

[powerpc:next-test] BUILD SUCCESS 18e9506562a0e93e7542cf44fc7d107b7aad9610

2023-08-24 Thread kernel test robot
alpharandconfig-r002-20230823 gcc alpharandconfig-r002-20230824 gcc alpharandconfig-r003-20230824 gcc alpharandconfig-r014-20230823 gcc alpharandconfig-r035-20230823 gcc arc

Re: [PATCH RFC 2/2] powerpc/selftests: add test for papr-vpd

2023-08-24 Thread Nathan Lynch
Russell Currey writes: > snowpatch has found a compiler error with this patch. > > >Error: papr_vpd.c:346:33: error: passing argument 2 of 'test_harness' >discards 'const' qualifier from pointer target type [-Werror=discarded- >qualifiers] > if (test_harness(t->function,

[powerpc:next] BUILD REGRESSION 0f71dcfb4aef6043da6cc509e7a7f6a3ae87c12d

2023-08-24 Thread kernel test robot
gcc arm64allyesconfig gcc arm64 defconfig gcc arm64randconfig-r012-20230824 clang arm64randconfig-r021-20230823 gcc arm64randconfig-r026-20230822 clang arm64

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-08-24 Thread Michael Ellerman
Erhard Furtner writes: > On Tue, 22 Aug 2023 07:31:54 + > Christophe Leroy wrote: > >> Le 18/08/2023 à 18:23, Erhard Furtner a écrit : >> > On Fri, 18 Aug 2023 15:47:38 + >> > Christophe Leroy wrote: >> > >> >> I'm wondering if the problem is just linked to the kernel being built >>

Re: [PATCH v3] powerpc: Use shared font data

2023-08-24 Thread Michael Ellerman
"Dr. David Alan Gilbert" writes: > * li...@treblig.org (li...@treblig.org) wrote: >> From: "Dr. David Alan Gilbert" >> >> PowerPC has a 'btext' font used for the console which is almost identical >> to the shared font_sun8x16, so use it rather than duplicating the data. >> >> They were

Re: [PATCH rfc v2 04/10] s390: mm: use try_vma_locked_page_fault()

2023-08-24 Thread Heiko Carstens
On Thu, Aug 24, 2023 at 10:16:33AM +0200, Alexander Gordeev wrote: > On Mon, Aug 21, 2023 at 08:30:50PM +0800, Kefeng Wang wrote: > > Use new try_vma_locked_page_fault() helper to simplify code. > > No functional change intended. > > > > Signed-off-by: Kefeng Wang > > --- > >

Re: [PATCH rfc v2 04/10] s390: mm: use try_vma_locked_page_fault()

2023-08-24 Thread Alexander Gordeev
On Mon, Aug 21, 2023 at 08:30:50PM +0800, Kefeng Wang wrote: > Use new try_vma_locked_page_fault() helper to simplify code. > No functional change intended. > > Signed-off-by: Kefeng Wang > --- > arch/s390/mm/fault.c | 66 ++-- > 1 file changed, 27

Re: [PATCH v4 1/2] PCI: layerscape: Add support for Link down notification

2023-08-24 Thread Lorenzo Pieralisi
On Thu, 20 Jul 2023 09:58:33 -0400, Frank Li wrote: > Add support to pass Link down notification to Endpoint function driver > so that the LINK_DOWN event can be processed by the function. > > Applied to controller/layerscape, thanks! [1/2] PCI: layerscape: Add support for Link down

[PATCH v8 0/8] KVM: allow mapping non-refcounted pages

2023-08-24 Thread David Stevens
From: David Stevens This patch series adds support for mapping VM_IO and VM_PFNMAP memory that is backed by struct pages that aren't currently being refcounted (e.g. tail pages of non-compound higher order allocations) into the guest. Our use case is virtio-gpu blob resources [1], which

[PATCH v8 8/8] KVM: mmu: remove __gfn_to_pfn_memslot

2023-08-24 Thread David Stevens
From: David Stevens All callers have been migrated to __kvm_follow_pfn. Signed-off-by: David Stevens --- virt/kvm/kvm_main.c | 33 - 1 file changed, 33 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index fa1848c6c84f..aebaf4a7340e 100644

[PATCH v8 7/8] KVM: PPC: Migrate to __kvm_follow_pfn

2023-08-24 Thread David Stevens
From: David Stevens Migrate from __gfn_to_pfn_memslot to __kvm_follow_pfn. As part of the refactoring, remove the redundant calls to get_user_page_fast_only, since the check for !async && !atomic was removed from the KVM generic code in b9b33da2aa74. Also, remove the kvm_ro parameter because the

[PATCH v8 6/8] KVM: arm64: Migrate to __kvm_follow_pfn

2023-08-24 Thread David Stevens
From: David Stevens Migrate from __gfn_to_pfn_memslot to __kvm_follow_pfn. Signed-off-by: David Stevens --- arch/arm64/kvm/mmu.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c index

[PATCH v8 5/8] KVM: x86/mmu: Don't pass FOLL_GET to __kvm_follow_pfn

2023-08-24 Thread David Stevens
From: David Stevens Stop passing FOLL_GET to __kvm_follow_pfn. This allows the host to map memory into the guest that is backed by un-refcounted struct pages - for example, the tail pages of higher order non-compound pages allocated by the amdgpu driver via ttm_pool_alloc_page. The bulk of this

[PATCH v8 4/8] KVM: x86/mmu: Migrate to __kvm_follow_pfn

2023-08-24 Thread David Stevens
From: David Stevens Migrate from __gfn_to_pfn_memslot to __kvm_follow_pfn. Most arguments directly map to the new API. The largest change is replacing the async in/out parameter with FOLL_NOWAIT parameter and the KVM_PFN_ERR_NEEDS_IO return value. Signed-off-by: David Stevens ---

[PATCH v8 3/8] KVM: mmu: Make __kvm_follow_pfn not imply FOLL_GET

2023-08-24 Thread David Stevens
From: David Stevens Make it so that __kvm_follow_pfn does not imply FOLL_GET. This allows callers to resolve a gfn when the associated pfn has a valid struct page that isn't being actively refcounted (e.g. tail pages of non-compound higher order pages). For a caller to safely omit FOLL_GET, all

[PATCH v8 2/8] KVM: mmu: Introduce __kvm_follow_pfn function

2023-08-24 Thread David Stevens
From: David Stevens Introduce __kvm_follow_pfn, which will replace __gfn_to_pfn_memslot. __kvm_follow_pfn refactors the old API's arguments into a struct and, where possible, combines the boolean arguments into a single flags argument. Signed-off-by: David Stevens --- include/linux/kvm_host.h

[PATCH v8 1/8] KVM: Assert that a page's refcount is elevated when marking accessed/dirty

2023-08-24 Thread David Stevens
From: Sean Christopherson Assert that a page's refcount is elevated, i.e. that _something_ holds a reference to the page, when KVM marks a page as accessed and/or dirty. KVM typically doesn't hold a reference to pages that are mapped into the guest, e.g. to allow page migration, compaction,

Re: [PATCH v7 5/8] KVM: x86/mmu: Don't pass FOLL_GET to __kvm_follow_pfn

2023-08-24 Thread David Stevens
On Wed, Jul 5, 2023 at 7:25 PM Yu Zhang wrote: > > On Tue, Jul 04, 2023 at 04:50:50PM +0900, David Stevens wrote: > > From: David Stevens > > > > Stop passing FOLL_GET to __kvm_follow_pfn. This allows the host to map > > memory into the guest that is backed by un-refcounted struct pages - for >

Re: [PATCH v7 4/8] KVM: x86/mmu: Migrate to __kvm_follow_pfn

2023-08-24 Thread David Stevens
On Thu, Jul 6, 2023 at 10:54 AM Isaku Yamahata wrote: > > On Tue, Jul 04, 2023 at 04:50:49PM +0900, > David Stevens wrote: > > > From: David Stevens > > > > Migrate from __gfn_to_pfn_memslot to __kvm_follow_pfn. > > > > Signed-off-by: David Stevens > > --- > > arch/x86/kvm/mmu/mmu.c | 35

Re: [PATCH rfc v2 01/10] mm: add a generic VMA lock-based page fault handler

2023-08-24 Thread Alexander Gordeev
On Mon, Aug 21, 2023 at 08:30:47PM +0800, Kefeng Wang wrote: Hi Kefeng, > The ARCH_SUPPORTS_PER_VMA_LOCK are enabled by more and more architectures, > eg, x86, arm64, powerpc and s390, and riscv, those implementation are very > similar which results in some duplicated codes, let's add a generic

[PATCH] powerpc: Hide empty pt_regs at base of the stack

2023-08-24 Thread Michael Ellerman
A thread started via eg. user_mode_thread() runs in the kernel to begin with and then may later return to userspace. While it's running in the kernel it has a pt_regs at the base of its kernel stack, but that pt_regs is all zeroes. If the thread oopses in that state, it leads to an ugly stack

Re: [PATCH RFC 2/2] powerpc/selftests: add test for papr-vpd

2023-08-24 Thread Russell Currey
On Tue, 2023-08-22 at 16:33 -0500, Nathan Lynch via B4 Relay wrote: > From: Nathan Lynch Hi Nathan, snowpatch has found a compiler error with this patch. Error: papr_vpd.c:346:33: error: passing argument 2 of 'test_harness' discards 'const' qualifier from pointer target type

Re: [PATCH v3 2/4] arch/loongarch/configs/*_defconfig cleanup

2023-08-24 Thread WANG Xuerui
On 8/17/23 19:50, Trevor Woerner wrote: Drop CONFIG_IP_NF_TARGET_CLUSTERIP as it was removed in commit 9db5d918e2c0 ("netfilter: ip_tables: remove clusterip target"). Drop CONFIG_NFT_OBJREF as it was removed in commit d037abc2414b ("netfilter: nft_objref: make it builtin"). Signed-off-by: