Re: [PATCH] powerpc/64: Fix unannotated intra-function call warning

2023-02-16 Thread Josh Poimboeuf
On Fri, Feb 17, 2023 at 10:02:26AM +0530, Sathvika Vasireddy wrote: > objtool throws the following warning: > arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x6128: > unannotated intra-function call > > Fix the warning by annotating start_initialization_book3s symbol with the >

Re: linux-next: build warning after merge of the powerpc tree

2023-02-16 Thread Josh Poimboeuf
On Fri, Feb 17, 2023 at 12:35:17PM +1100, Michael Ellerman wrote: > Josh Poimboeuf writes: > > On Thu, Feb 16, 2023 at 02:40:31PM +1100, Stephen Rothwell wrote: > >> Hi all, > >> > >> After merging the powerpc tree, today's linux-next build (powerpc > >> pseries_le_defconfig) produced this

Re: [PATCH 2/2] powerpc/{32,book3e}: kcsan: Extend KCSAN Support

2023-02-16 Thread Christophe Leroy
Le 17/02/2023 à 00:23, Rohan McLure a écrit : >> On 16 Feb 2023, at 6:14 pm, Christophe Leroy >> wrote: >> >> >> >> Le 16/02/2023 à 06:09, Rohan McLure a écrit : >>> Enable HAVE_ARCH_KCSAN on all powerpc platforms, permitting use of the >>> kernel concurrency sanitiser through the

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

2023-02-16 Thread Christophe Leroy
Le 17/02/2023 à 00:52, Michael Ellerman a écrit : > Herve Codina writes: >> Hi, >> >> This series adds support for audio using the QMC controller available in >> some Freescale PowerQUICC SoCs. > > Who's going to take this series? > > By lines of code it's mostly in drivers/soc/fsl, so I was

Re: [PATCH] powerpc/64: Fix unannotated intra-function call warning

2023-02-16 Thread Stephen Rothwell
Hi all, On Fri, 17 Feb 2023 10:02:26 +0530 Sathvika Vasireddy wrote: > > objtool throws the following warning: > arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x6128: > unannotated intra-function call > > Fix the warning by annotating start_initialization_book3s symbol with the >

[PATCH] powerpc/64: Fix unannotated intra-function call warning

2023-02-16 Thread Sathvika Vasireddy
objtool throws the following warning: arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x6128: unannotated intra-function call Fix the warning by annotating start_initialization_book3s symbol with the SYM_FUNC_START_LOCAL and SYM_FUNC_END macros. Reported-by: Stephen Rothwell

Re: [PATCH mm-unstable v1 4/5] kvm/powerpc: add kvm_arch_test_clear_young()

2023-02-16 Thread Yu Zhao
On Thu, Feb 16, 2023 at 9:12 PM Yu Zhao wrote: > > This patch adds kvm_arch_test_clear_young() for the vast majority of > VMs that are not nested and run on hardware with Radix MMU enabled. > > It relies on two techniques, RCU and cmpxchg, to safely test and clear > the accessed bit without

Re: [PATCH mm-unstable v1 3/5] kvm/arm64: add kvm_arch_test_clear_young()

2023-02-16 Thread Yu Zhao
On Thu, Feb 16, 2023 at 9:12 PM Yu Zhao wrote: > > This patch adds kvm_arch_test_clear_young() for the vast majority of > VMs that are not pKVM and run on hardware that sets the accessed bit > in KVM page tables. > > It relies on two techniques, RCU and cmpxchg, to safely test and clear > the

Re: [PATCH mm-unstable v1 2/5] kvm/x86: add kvm_arch_test_clear_young()

2023-02-16 Thread Yu Zhao
On Thu, Feb 16, 2023 at 9:12 PM Yu Zhao wrote: > > This patch adds kvm_arch_test_clear_young() for the vast majority of > VMs that are not nested and run on hardware that sets the accessed bit > in TDP MMU page tables. > > It relies on two techniques, RCU and cmpxchg, to safely test and clear >

[PATCH mm-unstable v1 4/5] kvm/powerpc: add kvm_arch_test_clear_young()

2023-02-16 Thread Yu Zhao
This patch adds kvm_arch_test_clear_young() for the vast majority of VMs that are not nested and run on hardware with Radix MMU enabled. It relies on two techniques, RCU and cmpxchg, to safely test and clear the accessed bit without taking the MMU lock. The former protects KVM page tables from

[PATCH mm-unstable v1 5/5] mm: multi-gen LRU: use mmu_notifier_test_clear_young()

2023-02-16 Thread Yu Zhao
An existing selftest can quickly demonstrate the effectiveness of this patch. On a generic workstation equipped with 128 CPUs and 256GB DRAM: $ sudo max_guest_memory_test -c 64 -m 250 -s 250 MGLRU run2 --- Before~600s After ~50s Off ~250s kswapd

[PATCH mm-unstable v1 3/5] kvm/arm64: add kvm_arch_test_clear_young()

2023-02-16 Thread Yu Zhao
This patch adds kvm_arch_test_clear_young() for the vast majority of VMs that are not pKVM and run on hardware that sets the accessed bit in KVM page tables. It relies on two techniques, RCU and cmpxchg, to safely test and clear the accessed bit without taking the MMU lock. The former protects

[PATCH mm-unstable v1 2/5] kvm/x86: add kvm_arch_test_clear_young()

2023-02-16 Thread Yu Zhao
This patch adds kvm_arch_test_clear_young() for the vast majority of VMs that are not nested and run on hardware that sets the accessed bit in TDP MMU page tables. It relies on two techniques, RCU and cmpxchg, to safely test and clear the accessed bit without taking the MMU lock. The former

[PATCH mm-unstable v1 1/5] mm/kvm: add mmu_notifier_test_clear_young()

2023-02-16 Thread Yu Zhao
mmu_notifier_test_clear_young() allows the caller to safely test and clear the accessed bit in KVM PTEs without taking the MMU lock. This patch adds the generic infrastructure to invoke the subsequent arch-specific patches. The arch-specific implementations generally rely on two techniques: RCU

[PATCH mm-unstable v1 0/5] mm/kvm: lockless accessed bit harvest

2023-02-16 Thread Yu Zhao
TLDR This patchset RCU-protects KVM page tables and compare-and-exchanges KVM PTEs with the accessed bit set by hardware. It significantly improves the performance of guests when the host is under heavy memory pressure. ChromeOS has been using a similar approach [1] since mid 2021 and it was

Re: [PATCH v3 26/35] mm: fall back to mmap_lock if vma->anon_vma is not yet set

2023-02-16 Thread Suren Baghdasaryan
On Thu, Feb 16, 2023 at 11:43 AM Suren Baghdasaryan wrote: > > On Thu, Feb 16, 2023 at 7:44 AM Matthew Wilcox wrote: > > > > On Wed, Feb 15, 2023 at 09:17:41PM -0800, Suren Baghdasaryan wrote: > > > When vma->anon_vma is not set, page fault handler will set it by either > > > reusing anon_vma of

[powerpc:next] BUILD SUCCESS b5ae1cde0f341c936e84e5a9c49f0cb81ba4df1c

2023-02-16 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next branch HEAD: b5ae1cde0f341c936e84e5a9c49f0cb81ba4df1c powerpc/epapr: Don't use wrteei on non booke elapsed time: 727m configs tested: 43 configs skipped: 3 The following configs have been built successfully.

Re: linux-next: build warning after merge of the powerpc tree

2023-02-16 Thread Michael Ellerman
Josh Poimboeuf writes: > On Thu, Feb 16, 2023 at 02:40:31PM +1100, Stephen Rothwell wrote: >> Hi all, >> >> After merging the powerpc tree, today's linux-next build (powerpc >> pseries_le_defconfig) produced this warning: >> >> arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x6128:

[PATCH] powerpc/64s: Prevent fallthrough to hash TLB flush when using radix

2023-02-16 Thread Benjamin Gray
In the fix reconnecting hash__tlb_flush() to tlb_flush() the void return on radix__tlb_flush() was not restored and subsequently falls through to the restored hash__tlb_flush(). Guard hash__tlb_flush() under an else to prevent this. Fixes: 1665c027afb2 ("powerpc/64s: Reconnect tlb_flush() to

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

2023-02-16 Thread Michael Ellerman
Herve Codina writes: > Hi, > > This series adds support for audio using the QMC controller available in > some Freescale PowerQUICC SoCs. Who's going to take this series? By lines of code it's mostly in drivers/soc/fsl, so I was expecting it would go via that tree. Or is it a sound series that

Re: [PATCH 1/2] kcsan: xtensa: Add atomic builtin stubs for 32-bit systems

2023-02-16 Thread Rohan McLure
> On 16 Feb 2023, at 7:09 pm, Marco Elver wrote: > > On Thu, Feb 16, 2023 at 07:12AM +, Christophe Leroy wrote: >> >> >> Le 16/02/2023 à 06:09, Rohan McLure a écrit : >>> KCSAN instruments calls to atomic builtins, and will in turn call these >>> builtins itself. As such, architectures

Re: [PATCH 2/2] powerpc/{32,book3e}: kcsan: Extend KCSAN Support

2023-02-16 Thread Rohan McLure
> On 16 Feb 2023, at 6:14 pm, Christophe Leroy > wrote: > > > > Le 16/02/2023 à 06:09, Rohan McLure a écrit : >> Enable HAVE_ARCH_KCSAN on all powerpc platforms, permitting use of the >> kernel concurrency sanitiser through the CONFIG_KCSAN_* kconfig options. >> >> Boots and passes selftests

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

2023-02-16 Thread Leo Li
> -Original Message- > From: Herve Codina > Sent: Thursday, February 16, 2023 7:42 AM > To: Herve Codina ; Leo Li > ; Rob Herring ; Krzysztof > Kozlowski ; Liam Girdwood > ; Mark Brown ; Christophe > Leroy ; Michael Ellerman > ; Nicholas Piggin ; Qiang Zhao > ; Jaroslav Kysela ;

Re: [PATCH v3 26/35] mm: fall back to mmap_lock if vma->anon_vma is not yet set

2023-02-16 Thread Suren Baghdasaryan
On Thu, Feb 16, 2023 at 7:44 AM Matthew Wilcox wrote: > > On Wed, Feb 15, 2023 at 09:17:41PM -0800, Suren Baghdasaryan wrote: > > When vma->anon_vma is not set, page fault handler will set it by either > > reusing anon_vma of an adjacent VMA if VMAs are compatible or by > > allocating a new one.

Re: [PATCH v3 21/35] mm/mmap: write-lock adjacent VMAs if they can grow into unmapped area

2023-02-16 Thread Suren Baghdasaryan
On Thu, Feb 16, 2023 at 7:34 AM Liam R. Howlett wrote: > > > First, sorry I didn't see this before v3.. Feedback at any time is highly appreciated! > > * Suren Baghdasaryan [230216 00:18]: > > While unmapping VMAs, adjacent VMAs might be able to grow into the area > > being unmapped. In such

[PATCH v2.1 09/24] mips/cpu: Expose play_dead()'s prototype definition

2023-02-16 Thread Josh Poimboeuf
Include to make sure play_dead() matches its prototype going forward. Acked-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Josh Poimboeuf --- arch/mips/cavium-octeon/smp.c | 1 + arch/mips/kernel/smp-bmips.c | 1 + arch/mips/kernel/smp-cps.c| 1 +

[PATCH v2.1 04/24] arm64/cpu: Mark cpu_die() __noreturn

2023-02-16 Thread Josh Poimboeuf
cpu_die() doesn't return. Annotate it as such. By extension this also makes arch_cpu_idle_dead() noreturn. Acked-by: Mark Rutland Signed-off-by: Josh Poimboeuf --- arch/arm64/include/asm/smp.h | 2 +- arch/arm64/kernel/smp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v2.1 03/24] arm/cpu: Add unreachable() to arch_cpu_idle_dead()

2023-02-16 Thread Josh Poimboeuf
arch_cpu_idle_dead() doesn't return. Make that visible to the compiler with an unreachable() code annotation. Signed-off-by: Josh Poimboeuf --- arch/arm/kernel/smp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index

Re: [PATCH] powerpc/perf: Add json metric events to present CPI stall cycles in powerpc

2023-02-16 Thread Ian Rogers
On Wed, Feb 15, 2023 at 10:12 PM Athira Rajeev wrote: > > Power10 Performance Monitoring Unit (PMU) provides events > to understand stall cycles of different pipeline stages. > These events along with completed instructions provides > useful metrics for application tuning. > > Patch implements

Re: linux-next: build warning after merge of the powerpc tree

2023-02-16 Thread Josh Poimboeuf
On Thu, Feb 16, 2023 at 02:40:31PM +1100, Stephen Rothwell wrote: > Hi all, > > After merging the powerpc tree, today's linux-next build (powerpc > pseries_le_defconfig) produced this warning: > > arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x6128: unannotated > intra-function call >

Re: [PATCH v3 26/35] mm: fall back to mmap_lock if vma->anon_vma is not yet set

2023-02-16 Thread Matthew Wilcox
On Wed, Feb 15, 2023 at 09:17:41PM -0800, Suren Baghdasaryan wrote: > When vma->anon_vma is not set, page fault handler will set it by either > reusing anon_vma of an adjacent VMA if VMAs are compatible or by > allocating a new one. find_mergeable_anon_vma() walks VMA tree to find > a compatible

Re: [PATCH v3 21/35] mm/mmap: write-lock adjacent VMAs if they can grow into unmapped area

2023-02-16 Thread Liam R. Howlett
First, sorry I didn't see this before v3.. * Suren Baghdasaryan [230216 00:18]: > While unmapping VMAs, adjacent VMAs might be able to grow into the area > being unmapped. In such cases write-lock adjacent VMAs to prevent this > growth. > > Signed-off-by: Suren Baghdasaryan > --- >

Re: Bug: Write fault blocked by KUAP! (kernel 6.2-rc6, Talos II)

2023-02-16 Thread Erhard F.
On Thu, 9 Feb 2023 07:21:55 + Christophe Leroy wrote: > An easy fix would probably be to also check the suffix as a prefixed > instruction with 0 as suffix is not valid : > > diff --git a/arch/powerpc/include/asm/inst.h > b/arch/powerpc/include/asm/inst.h > index

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

2023-02-16 Thread Herve Codina
After contributing the component, add myself as the maintainer for the Freescale QMC audio ASoC component. Signed-off-by: Herve Codina --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f8d0981a16ca..a677e2862878 100644 --- a/MAINTAINERS

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

2023-02-16 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 --- sound/soc/fsl/Kconfig | 9 +

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

2023-02-16 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 ---

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

2023-02-16 Thread Herve Codina
After contributing the driver, add myself as the maintainer for the Freescale QMC controller. Signed-off-by: Herve Codina --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0cfedb2f712c..f8d0981a16ca 100644 --- a/MAINTAINERS +++

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

2023-02-16 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

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

2023-02-16 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 --- .../soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml | 172 ++ 1 file changed, 172 insertions(+) create mode 100644

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

2023-02-16 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

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

2023-02-16 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

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

2023-02-16 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 --- .../bindings/soc/fsl/cpm_qe/fsl,cpm1-tsa.yaml | 234 ++ include/dt-bindings/soc/fsl,tsa.h | 13 + 2 files changed, 247

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

2023-02-16 Thread Herve Codina
After contributing the driver, add myself as the maintainer for the Freescale TSA controller. Signed-off-by: Herve Codina --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7f86d02cb427..0cfedb2f712c 100644 --- a/MAINTAINERS +++

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

2023-02-16 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

[PATCH v4 14/16] powerpc: mm: Convert to GENERIC_IOREMAP

2023-02-16 Thread Baoquan He
From: Christophe Leroy By taking GENERIC_IOREMAP method, the generic generic_ioremap_prot(), generic_iounmap(), and their generic wrapper ioremap_prot(), ioremap() and iounmap() are all visible and available to arch. Arch needs to provide wrapper functions to override the generic versions if

Re: [PATCH v2] usb: fix some spelling mistakes in comment of gadget

2023-02-16 Thread Greg KH
On Wed, Feb 15, 2023 at 05:35:35PM -0800, Zhou nan wrote: > usb: Fix spelling mistake in comments of gadget. > > Signed-off-by: Zhou nan > --- Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to

[PATCH] powerpc/nohash: Fix build with llvm-as

2023-02-16 Thread Michael Ellerman
When using the LLVM integrated assembler (llvm-as), the book3e build fails with: arch/powerpc/mm/nohash/tlb_low_64e.S:354:2: error: invalid instruction tlbilxva 0,%r15 ^ tlbilxva is an extended mnemonic for tlbilx, but llvm-as also doesn't support tlbilx, despite it being an e500mc

Re: 6.2-rc7 fails building on Talos II: memory.c:(.text+0x2e14): undefined reference to `hash__tlb_flush'

2023-02-16 Thread Erhard F.
On Thu, 16 Feb 2023 06:29:52 + Christophe Leroy wrote: > Can you try with : > > diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush.h > b/arch/powerpc/include/asm/book3s/64/tlbflush.h > index d5cd16270c5d..2bbc0fcce04a 100644 > --- a/arch/powerpc/include/asm/book3s/64/tlbflush.h > +++

Re: 6.2-rc7 fails building on Talos II: memory.c:(.text+0x2e14): undefined reference to `hash__tlb_flush'

2023-02-16 Thread Linux regression tracking (Thorsten Leemhuis)
[TLDR: I'm adding this report to the list of tracked Linux kernel regressions; the text you find below is based on a few templates paragraphs you might have encountered already in similar form. See link in footer if these mails annoy you.] [CCing the regression list, as it should be in the loop

Re: [PATCH 1/2] kcsan: xtensa: Add atomic builtin stubs for 32-bit systems

2023-02-16 Thread Marco Elver
On Thu, Feb 16, 2023 at 07:12AM +, Christophe Leroy wrote: > > > Le 16/02/2023 à 06:09, Rohan McLure a écrit : > > KCSAN instruments calls to atomic builtins, and will in turn call these > > builtins itself. As such, architectures supporting KCSAN must have > > compiler support for these

[PATCH V3 3/3] skiboot: Update IMC PMU node names for power10

2023-02-16 Thread Athira Rajeev
The nest IMC (In Memory Collection) Performance Monitoring Unit(PMU) node names are saved as "struct nest_pmus_struct" in the "hw/imc.c" IMC code. Not all the IMC PMUs listed in the device tree may be available. Nest IMC PMU names along with their bit values is represented in imc availability

[PATCH V3 2/3] skiboot: Update IMC code to use dt_find_by_name_substr for checking dt nodes

2023-02-16 Thread Athira Rajeev
The nest IMC (In Memory Collection) Performance Monitoring Unit(PMU) node names are saved in nest_pmus[] array in the "hw/imc.c" IMC code. Not all the IMC PMUs listed in the device tree may be available. Nest IMC PMU names along with their bit values is represented in imc availability vector. The

[PATCH V3 1/3] core/device: Add function to return child node using name at substring "@"

2023-02-16 Thread Athira Rajeev
Add a function dt_find_by_name_substr() that returns the child node if it matches till first occurence at "@" of a given name, otherwise NULL. This is helpful for cases with node name like: "name@addr". In scenarios where nodes are added with "name@addr" format and if the value of "addr" is not