Re: [PATCHv10 3/4] genirq: Avoid summation loops for /proc/interrupts

2024-02-26 Thread Liu Song
在 2024/2/26 10:09, Bitao Hu 写道: We could use the irq_desc::tot_count member to avoid the summation loop for interrupts which are not marked as 'PER_CPU' interrupts in 'show_interrupts'. This could reduce the time overhead of reading /proc/interrupts. Originally-by: Thomas Gleixner

Re: [PATCH v2 5/9] mm: Initialize struct vm_unmapped_area_info

2024-02-26 Thread Christophe Leroy
Le 26/02/2024 à 20:09, Rick Edgecombe a écrit : > Future changes will need to add a field to struct vm_unmapped_area_info. > This would cause trouble for any archs that don't initialize the > struct. Currently every user sets each field, so if new fields are > added, the core code parsing the

Re: [PATCH] powerpc/mm: Code cleanup for __hash_page_thp

2024-02-26 Thread Michael Ellerman
Kunwu Chan writes: > Thanks for the reply. > > On 2024/2/26 18:49, Michael Ellerman wrote: >> Kunwu Chan writes: >>> This part was commented from commit 6d492ecc6489 >>> ("powerpc/THP: Add code to handle HPTE faults for hugepages") >>> in about 11 years before. >>> >>> If there are no plans to

Re: [PATCHv10 2/4] genirq: Provide a snapshot mechanism for interrupt statistics

2024-02-26 Thread Liu Song
在 2024/2/26 10:09, Bitao Hu 写道: The soft lockup detector lacks a mechanism to identify interrupt storms as root cause of a lockup. To enable this the detector needs a mechanism to snapshot the interrupt count statistics on a CPU when the detector observes a potential lockup scenario and

Re: [PATCH v13 09/16] media: uapi: Define audio sample format fourcc type

2024-02-26 Thread Shengjiu Wang
On Mon, Feb 26, 2024 at 9:55 PM Nicolas Dufresne wrote: > > Le lundi 26 février 2024 à 16:28 +0800, Shengjiu Wang a écrit : > > The audio sample format definition is from alsa, > > the header file is include/uapi/sound/asound.h, but > > don't include this header file directly, because in > > user

Re: [PATCH v13 09/16] media: uapi: Define audio sample format fourcc type

2024-02-26 Thread Shengjiu Wang
On Mon, Feb 26, 2024 at 9:55 PM Nicolas Dufresne wrote: > > Le lundi 26 février 2024 à 16:28 +0800, Shengjiu Wang a écrit : > > The audio sample format definition is from alsa, > > the header file is include/uapi/sound/asound.h, but > > don't include this header file directly, because in > > user

Re: [PATCH] powerpc/mm: Code cleanup for __hash_page_thp

2024-02-26 Thread Kunwu Chan
Thanks for the reply. On 2024/2/26 18:49, Michael Ellerman wrote: Kunwu Chan writes: This part was commented from commit 6d492ecc6489 ("powerpc/THP: Add code to handle HPTE faults for hugepages") in about 11 years before. If there are no plans to enable this part code in the future, we can

Re: linux-next: Tree for Feb 26 (drivers/mtd/ubi/nvmem.c)

2024-02-26 Thread Randy Dunlap
On 2/25/24 22:55, Stephen Rothwell wrote: > Hi all, > > Changes since 20240223: > on powerpc32: In file included from ./arch/powerpc/include/generated/asm/div64.h:1, from ../include/linux/math.h:6, from ../include/linux/kernel.h:27, from

Re: [PATCH 3/4] arch: define CONFIG_PAGE_SIZE_*KB on all architectures

2024-02-26 Thread Guo Ren
On Tue, Feb 27, 2024 at 12:15 AM Arnd Bergmann wrote: > > From: Arnd Bergmann > > Most architectures only support a single hardcoded page size. In order > to ensure that each one of these sets the corresponding Kconfig symbols, > change over the PAGE_SHIFT definition to the common one and allow

[Bug 207129] PowerMac G4 DP (5.6.2 debug kernel + inline KASAN) freezes shortly after booting with "do_IRQ: stack overflow: 1760"

2024-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=207129 --- Comment #9 from Erhard F. (erhar...@mailbox.org) --- Created attachment 305910 --> https://bugzilla.kernel.org/attachment.cgi?id=305910=edit kernel .config (6.8-rc6, KASAN_INLINE=y, PowerMac G4 DP) -- You may reply to this email to add a

[Bug 207129] PowerMac G4 DP (5.6.2 debug kernel + inline KASAN) freezes shortly after booting with "do_IRQ: stack overflow: 1760"

2024-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=207129 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Status|CLOSED |REOPENED

[PATCH v2 5/9] mm: Initialize struct vm_unmapped_area_info

2024-02-26 Thread Rick Edgecombe
Future changes will need to add a field to struct vm_unmapped_area_info. This would cause trouble for any archs that don't initialize the struct. Currently every user sets each field, so if new fields are added, the core code parsing the struct will see garbage in the new field. It could be

Re: [PATCH 2/4] arch: simplify architecture specific page size configuration

2024-02-26 Thread Christophe Leroy
Le 26/02/2024 à 17:14, Arnd Bergmann a écrit : > From: Arnd Bergmann > > arc, arm64, parisc and powerpc all have their own Kconfig symbols > in place of the common CONFIG_PAGE_SIZE_4KB symbols. Change these > so the common symbols are the ones that are actually used, while > leaving the

Re: [PATCH 1/4] arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions

2024-02-26 Thread Christophe Leroy
Le 26/02/2024 à 17:14, Arnd Bergmann a écrit : > From: Arnd Bergmann > > These four architectures define the same Kconfig symbols for configuring > the page size. Move the logic into a common place where it can be shared > with all other architectures. > > Signed-off-by: Arnd Bergmann > ---

Re: [PATCH 4/4] vdso: avoid including asm/page.h

2024-02-26 Thread Christophe Leroy
Le 26/02/2024 à 17:14, Arnd Bergmann a écrit : > From: Arnd Bergmann > > The recent change to the vdso_data_store broke building compat VDSO > on at least arm64 because it includes headers outside of the include/vdso/ > namespace: I understand that powerpc64 also has an issue, see

Re: [PATCH v8 10/10] PCI: dwc: ep: Add Kernel-doc comments for APIs

2024-02-26 Thread Frank Li
On Sat, Feb 24, 2024 at 12:24:16PM +0530, Manivannan Sadhasivam wrote: > All of the APIs are missing the Kernel-doc comments. Hence, add them. > > Signed-off-by: Manivannan Sadhasivam Reviewed-by: Frank Li > --- > drivers/pci/controller/dwc/pcie-designware-ep.c | 92 >

Re: [PATCH v8 09/10] PCI: qcom-ep: Use the generic dw_pcie_ep_linkdown() API to handle LINK_DOWN event

2024-02-26 Thread Frank Li
On Sat, Feb 24, 2024 at 12:24:15PM +0530, Manivannan Sadhasivam wrote: > Now that the API is available, let's make use of it. It also handles the > reinitialization of DWC non-sticky registers in addition to sending the > notification to EPF drivers. > > Signed-off-by: Manivannan Sadhasivam >

Re: Kernel WARNING at lib/vsprintf.c:2721 while running ftrace kernel selftests

2024-02-26 Thread Steven Rostedt
On Sun, 25 Feb 2024 22:01:50 +0530 Sachin Sant wrote: > While running ftrace specific kernel selftests following warning > is seen on a Power10 logical partition (LPAR) booted with > latest mainline kernel. > > [ cut here ] > precision 63492 too large > WARNING: CPU: 15

Re: [PATCH v8 08/10] PCI: dwc: ep: Add a generic dw_pcie_ep_linkdown() API to handle LINK_DOWN event

2024-02-26 Thread Frank Li
On Sat, Feb 24, 2024 at 12:24:14PM +0530, Manivannan Sadhasivam wrote: > The PCIe link can go to LINK_DOWN state in one of the following scenarios: > > 1. Fundamental (PERST#)/hot/warm reset > 2. Link transition from L2/L3 to L0 >From L0 to L2/l3 > > In those cases, LINK_DOWN causes some

Re: [PATCH v8 07/10] PCI: dwc: ep: Remove "core_init_notifier" flag

2024-02-26 Thread Frank Li
On Sat, Feb 24, 2024 at 12:24:13PM +0530, Manivannan Sadhasivam wrote: > "core_init_notifier" flag is set by the glue drivers requiring refclk from > the host to complete the DWC core initialization. Also, those drivers will > send a notification to the EPF drivers once the initialization is fully

Re: [PATCH v8 06/10] PCI: dwc: ep: Call dw_pcie_ep_init_registers() API directly from all glue drivers

2024-02-26 Thread Frank Li
On Sat, Feb 24, 2024 at 12:24:12PM +0530, Manivannan Sadhasivam wrote: > Currently, dw_pcie_ep_init_registers() API is directly called by the glue > drivers requiring active refclk from host. But for the other drivers, it is > getting called implicitly by dw_pcie_ep_init(). This is due to the fact

Re: [PATCH v8 05/10] PCI: dwc: ep: Rename dw_pcie_ep_init_complete() to dw_pcie_ep_init_registers()

2024-02-26 Thread Frank Li
On Sat, Feb 24, 2024 at 12:24:11PM +0530, Manivannan Sadhasivam wrote: > The goal of the dw_pcie_ep_init_complete() API is to initialize the DWC > specific registers post registering the controller with the EP framework. > > But the naming doesn't reflect its functionality and causes confusion.

Re: [PATCH v8 04/10] PCI: dwc: ep: Fix DBI access failure for drivers requiring refclk from host

2024-02-26 Thread Frank Li
On Sat, Feb 24, 2024 at 12:24:10PM +0530, Manivannan Sadhasivam wrote: > The DWC glue drivers requiring an active reference clock from the PCIe host > for initializing their PCIe EP core, set a flag called 'core_init_notifier' > to let DWC driver know that these drivers need a special attention

Re: [PATCH 1/4] arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions

2024-02-26 Thread Samuel Holland
On 2024-02-26 10:14 AM, Arnd Bergmann wrote: > From: Arnd Bergmann > > These four architectures define the same Kconfig symbols for configuring > the page size. Move the logic into a common place where it can be shared > with all other architectures. > > Signed-off-by: Arnd Bergmann > --- >

Re: [PATCH v8 03/10] PCI: dwc: ep: Introduce dw_pcie_ep_cleanup() API for drivers supporting PERST#

2024-02-26 Thread Frank Li
On Sat, Feb 24, 2024 at 12:24:09PM +0530, Manivannan Sadhasivam wrote: > For DWC glue drivers supporting PERST# (currently Qcom and Tegra194), some > of the DWC resources like eDMA should be cleaned up during the PERST# > assert time. > > So let's introduce a dw_pcie_ep_cleanup() API that could

Re: [PATCH v8 02/10] PCI: dwc: ep: Rename dw_pcie_ep_exit() to dw_pcie_ep_deinit()

2024-02-26 Thread Frank Li
On Sat, Feb 24, 2024 at 12:24:08PM +0530, Manivannan Sadhasivam wrote: > dw_pcie_ep_exit() API is undoing what the dw_pcie_ep_init() API has done > already (at least partly). But the API name dw_pcie_ep_exit() is not quite > reflecting that. So let's rename it to dw_pcie_ep_deinit() to make the >

Re: [PATCH v8 01/10] PCI: dwc: ep: Remove deinit() callback from struct dw_pcie_ep_ops

2024-02-26 Thread Frank Li
On Sat, Feb 24, 2024 at 12:24:07PM +0530, Manivannan Sadhasivam wrote: > deinit() callback was solely introduced for the pcie-rcar-gen4 driver where > it is used to do platform specific resource deallocation. And this callback > is called right at the end of the dw_pcie_ep_exit() API. So it

[PATCH 4/4] vdso: avoid including asm/page.h

2024-02-26 Thread Arnd Bergmann
From: Arnd Bergmann The recent change to the vdso_data_store broke building compat VDSO on at least arm64 because it includes headers outside of the include/vdso/ namespace: In file included from arch/arm64/include/asm/lse.h:5, from arch/arm64/include/asm/cmpxchg.h:14,

[PATCH 3/4] arch: define CONFIG_PAGE_SIZE_*KB on all architectures

2024-02-26 Thread Arnd Bergmann
From: Arnd Bergmann Most architectures only support a single hardcoded page size. In order to ensure that each one of these sets the corresponding Kconfig symbols, change over the PAGE_SHIFT definition to the common one and allow only the hardware page size to be selected. Signed-off-by: Arnd

[PATCH 2/4] arch: simplify architecture specific page size configuration

2024-02-26 Thread Arnd Bergmann
From: Arnd Bergmann arc, arm64, parisc and powerpc all have their own Kconfig symbols in place of the common CONFIG_PAGE_SIZE_4KB symbols. Change these so the common symbols are the ones that are actually used, while leaving the arhcitecture specific ones as the user visible place for

[PATCH 1/4] arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions

2024-02-26 Thread Arnd Bergmann
From: Arnd Bergmann These four architectures define the same Kconfig symbols for configuring the page size. Move the logic into a common place where it can be shared with all other architectures. Signed-off-by: Arnd Bergmann --- arch/Kconfig | 58

[PATCH 0/4] arch: mm, vdso: consolidate PAGE_SIZE definition

2024-02-26 Thread Arnd Bergmann
From: Arnd Bergmann Naresh noticed that the newly added usage of the PAGE_SIZE macro in include/vdso/datapage.h introduced a build regression. I had an older patch that I revived to have this defined through Kconfig rather than through including asm/page.h, which is not allowed in vdso code. I

Re: [PATCH v13 09/16] media: uapi: Define audio sample format fourcc type

2024-02-26 Thread Nicolas Dufresne
Le lundi 26 février 2024 à 16:28 +0800, Shengjiu Wang a écrit : > The audio sample format definition is from alsa, > the header file is include/uapi/sound/asound.h, but > don't include this header file directly, because in > user space, there is another copy in alsa-lib. > There will be conflict

Re: [kvm-unit-tests PATCH 02/32] powerpc: Fix pseries getchar return value

2024-02-26 Thread Thomas Huth
On 26/02/2024 11.11, Nicholas Piggin wrote: getchar() didn't get the shift value correct and never returned the first character. This never really mattered since it was only ever used for press-a-key-to-continue prompts. but it tripped me up when debugging a QEMU console output problem.

Re: [kvm-unit-tests PATCH 01/32] powerpc: Fix KVM caps on POWER9 hosts

2024-02-26 Thread Thomas Huth
On 26/02/2024 11.11, Nicholas Piggin wrote: KVM does not like to run on POWER9 hosts without cap-ccf-assist=off. Signed-off-by: Nicholas Piggin --- powerpc/run | 2 ++ 1 file changed, 2 insertions(+) diff --git a/powerpc/run b/powerpc/run index e469f1eb3..5cdb94194 100755 --- a/powerpc/run

[Bug 207129] PowerMac G4 DP (5.6.2 debug kernel + inline KASAN) freezes shortly after booting with "do_IRQ: stack overflow: 1760"

2024-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=207129 Michael Ellerman (mich...@ellerman.id.au) changed: What|Removed |Added Status|RESOLVED|CLOSED --

[Bug 207129] PowerMac G4 DP (5.6.2 debug kernel + inline KASAN) freezes shortly after booting with "do_IRQ: stack overflow: 1760"

2024-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=207129 Michael Ellerman (mich...@ellerman.id.au) changed: What|Removed |Added Status|NEW |RESOLVED

[Bug 155231] powerpc : native aslr vdso randomization is not working in powerpc platform

2024-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=155231 Michael Ellerman (mich...@ellerman.id.au) changed: What|Removed |Added Status|RESOLVED|CLOSED --

[Bug 155231] powerpc : native aslr vdso randomization is not working in powerpc platform

2024-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=155231 Michael Ellerman (mich...@ellerman.id.au) changed: What|Removed |Added Status|NEEDINFO|RESOLVED

Re: [PATCH] powerpc/mm: Code cleanup for __hash_page_thp

2024-02-26 Thread Michael Ellerman
Kunwu Chan writes: > This part was commented from commit 6d492ecc6489 > ("powerpc/THP: Add code to handle HPTE faults for hugepages") > in about 11 years before. > > If there are no plans to enable this part code in the future, > we can remove this dead code. I agree the code can go. But I'd

[PATCH linux-next v2 2/3] powerpc/kexec: split CONFIG_KEXEC_FILE and CONFIG_CRASH_DUMP

2024-02-26 Thread Hari Bathini
CONFIG_KEXEC_FILE does not have to select CONFIG_CRASH_DUMP. Move some code under CONFIG_CRASH_DUMP to support CONFIG_KEXEC_FILE and !CONFIG_CRASH_DUMP case. Signed-off-by: Hari Bathini --- * No changes in v2. arch/powerpc/kexec/elf_64.c | 4 +- arch/powerpc/kexec/file_load_64.c | 269

[PATCH linux-next v2 3/3] powerpc/kdump: Split KEXEC_CORE and CRASH_DUMP dependency

2024-02-26 Thread Hari Bathini
Remove CONFIG_CRASH_DUMP dependency on CONFIG_KEXEC. CONFIG_KEXEC_CORE was used at places where CONFIG_CRASH_DUMP or CONFIG_CRASH_RESERVE was appropriate. Replace with appropriate #ifdefs to support CONFIG_KEXEC and !CONFIG_CRASH_DUMP configuration option. Also, make CONFIG_FA_DUMP dependent on

[PATCH linux-next v2 0/3] powerpc/kexec: split CONFIG_CRASH_DUMP out from CONFIG_KEXEC_CORE

2024-02-26 Thread Hari Bathini
This patch series is a follow-up to [1] based on discussions at [2] about additional work needed to get it working on powerpc. The first patch in the series makes struct crash_mem available with or without CONFIG_CRASH_DUMP enabled. The next patch moves kdump specific code for kexec_file_load

[PATCH linux-next v2 1/3] kexec/kdump: make struct crash_mem available without CONFIG_CRASH_DUMP

2024-02-26 Thread Hari Bathini
struct crash_mem defined under include/linux/crash_core.h represents a list of memory ranges. While it is used to represent memory ranges for kdump kernel, it can also be used for other kind of memory ranges. In fact, KEXEC_FILE_LOAD syscall in powerpc uses this structure to represent reserved

[kvm-unit-tests PATCH 32/32] powerpc: gitlab CI update

2024-02-26 Thread Nicholas Piggin
This adds testing for the powernv machine, and adds a gitlab-ci test group instead of specifying all tests in .gitlab-ci.yml. Signed-off-by: Nicholas Piggin --- .gitlab-ci.yml| 16 ++-- powerpc/unittests.cfg | 15 --- 2 files changed, 14 insertions(+), 17

[kvm-unit-tests PATCH 31/32] powerpc: Remove remnants of ppc64 directory and build structure

2024-02-26 Thread Nicholas Piggin
This moves merges ppc64 directories and files into powerpc, and merges the 3 makefiles into one. The configure --arch=powerpc option is aliased to ppc64 for good measure. Signed-off-by: Nicholas Piggin --- MAINTAINERS| 1 - configure

[kvm-unit-tests PATCH 30/32] configure: Make arch_libdir a first-class entity

2024-02-26 Thread Nicholas Piggin
arch_libdir was brought in to improve the heuristic determination of the lib/ directory based on arch and testdir names, but it did not entirely clean that mess up. Remove the arch_libdir->arch->testdir heuristic and just require everybody sets arch_libdir correctly. Fail if the lib/arch or

[kvm-unit-tests PATCH 29/32] configure: Fail on unknown arch

2024-02-26 Thread Nicholas Piggin
configure will accept an unknown arch, and if it is the name of a directory in the source tree the command will silently succeed. Make it only accept supported arch names. Also print the full path of a missing test directory to disambiguate the error in out of tree builds. Cc: Alexandru Elisei

[kvm-unit-tests PATCH 28/32] powerpc: add pmu tests

2024-02-26 Thread Nicholas Piggin
Add some initial PMU testing. - PMC5/6 tests - PMAE / PMI test - BHRB basic tests Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/processor.h | 2 + lib/powerpc/asm/reg.h | 9 + lib/powerpc/asm/setup.h | 1 + lib/powerpc/setup.c | 23 +++ powerpc/Makefile.common

[kvm-unit-tests PATCH 27/32] powerpc: add usermode support

2024-02-26 Thread Nicholas Piggin
The biggest difficulty for user mode is MMU support. Otherwise it is a simple matter of setting and clearing MSR[PR] with rfid and sc respectively. Some common harness operations will fail in usermode, so some workarounds are reqiured (e.g., puts() can't be used directly). A usermode privileged

[kvm-unit-tests PATCH 26/32] powerpc: Add sieve.c common test

2024-02-26 Thread Nicholas Piggin
Now that sieve copes with lack of MMU support, it can be run by powerpc. Signed-off-by: Nicholas Piggin --- powerpc/Makefile.common | 1 + powerpc/sieve.c | 1 + powerpc/unittests.cfg | 3 +++ 3 files changed, 5 insertions(+) create mode 12 powerpc/sieve.c diff --git

[kvm-unit-tests PATCH 25/32] common/sieve: Support machines without MMU

2024-02-26 Thread Nicholas Piggin
Not all powerpc CPUs provide MMU support. Define vm_available() that is true by default but archs can override it. Use this to run VM tests. Cc: Paolo Bonzini Cc: Thomas Huth Cc: Andrew Jones Cc: k...@vger.kernel.org Signed-off-by: Nicholas Piggin --- common/sieve.c | 14 --

[kvm-unit-tests PATCH 24/32] common/sieve: Use vmalloc.h for setup_mmu definition

2024-02-26 Thread Nicholas Piggin
There is no good reason to put setup_vm in libcflat.h when it's defined in vmalloc.h. Cc: Paolo Bonzini Cc: Thomas Huth Cc: Andrew Jones Cc: Janosch Frank Cc: Claudio Imbrenda Cc: Nico Böhr Cc: David Hildenbrand Cc: k...@vger.kernel.org Cc: linux-s...@vger.kernel.org Signed-off-by:

[kvm-unit-tests PATCH 23/32] powerpc: Add MMU support

2024-02-26 Thread Nicholas Piggin
Add support for radix MMU, 4kB and 64kB pages. This also adds MMU interrupt test cases, and runs the interrupts test entirely with MMU enabled if it is available (aside from machine check tests). Signed-off-by: Nicholas Piggin --- configure | 39 +++--

[kvm-unit-tests PATCH 22/32] powerpc: Add timebase tests

2024-02-26 Thread Nicholas Piggin
This has a known failure on QEMU TCG machines where the decrementer interrupt is not lowered when the DEC wraps from -ve to +ve. Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/reg.h | 1 + powerpc/Makefile.common | 1 + powerpc/timebase.c | 330

[kvm-unit-tests PATCH 21/32] powerpc: Add atomics tests

2024-02-26 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- powerpc/Makefile.common | 1 + powerpc/atomics.c | 373 powerpc/unittests.cfg | 9 + 3 files changed, 383 insertions(+) create mode 100644 powerpc/atomics.c diff --git a/powerpc/Makefile.common

[kvm-unit-tests PATCH 20/32] powerpc: Avoid using larx/stcx. in spinlocks when only one CPU is running

2024-02-26 Thread Nicholas Piggin
The test harness uses spinlocks if they are implemented with larx/stcx. it can prevent some test scenarios such as testing migration of a reservation. Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/smp.h| 1 + lib/powerpc/smp.c| 5 + lib/powerpc/spinlock.c | 28

[kvm-unit-tests PATCH 19/32] powerpc: Permit ACCEL=tcg,thread=single

2024-02-26 Thread Nicholas Piggin
Modify run script to permit single vs mttcg threading, add a thread=single smp case to unittests.cfg. Signed-off-by: Nicholas Piggin --- powerpc/run | 4 ++-- powerpc/unittests.cfg | 6 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/powerpc/run b/powerpc/run

[kvm-unit-tests PATCH 18/32] powerpc: add SMP and IPI support

2024-02-26 Thread Nicholas Piggin
powerpc SMP support is very primitive and does not set up a first-class runtime environment for secondary CPUs. This reworks SMP support, and provides a complete C and harness environment for the secondaries, including interrupt handling, as well as IPI support. Signed-off-by: Nicholas Piggin

[kvm-unit-tests PATCH 17/32] arch-run: Fix handling multiple exit status messages

2024-02-26 Thread Nicholas Piggin
In SMP tests, it's possible for multiple CPUs to print an exit message if they abort concurrently, confusing the harness: EXIT: STATUS=127 EXIT: STATUS=127 scripts/arch-run.bash: line 85: [: too many arguments scripts/arch-run.bash: line 93: return: too many arguments lib/arch code

[kvm-unit-tests PATCH 16/32] powerpc: Remove broken SMP exception stack setup

2024-02-26 Thread Nicholas Piggin
The exception stack setup does not work correctly for SMP, because it is the boot processor that calls cpu_set() which sets SPRG2 to the exception stack, not the target CPU itself. So secondaries never got their SPRG2 set to a valid exception stack. Remove the SMP code and just set an exception

[kvm-unit-tests PATCH 15/32] powerpc: Add rtas stop-self support

2024-02-26 Thread Nicholas Piggin
In preparation for improved SMP support, add stop-self support to the harness. This is non-trivial because it requires an unlocked rtas call: a CPU can't be holding a spin lock when it goes offline or it will deadlock other CPUs. rtas permits stop-self to be called without serialising all other

[kvm-unit-tests PATCH 14/32] powerpc: general interrupt tests

2024-02-26 Thread Nicholas Piggin
Add basic testing of various kinds of interrupts, machine check, page fault, illegal, decrementer, trace, syscall, etc. This has a known failure on QEMU TCG pseries machines where MSR[ME] can be incorrectly set to 0. Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/processor.h | 4 +

[kvm-unit-tests PATCH 13/32] powerpc/sprs: Test hypervisor registers on powernv machine

2024-02-26 Thread Nicholas Piggin
This enables HV privilege registers to be tested with the powernv machine. Acked-by: Thomas Huth Signed-off-by: Nicholas Piggin --- powerpc/sprs.c | 33 + 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/powerpc/sprs.c b/powerpc/sprs.c index

[kvm-unit-tests PATCH 12/32] powerpc: Fix emulator illegal instruction test for powernv

2024-02-26 Thread Nicholas Piggin
Illegal instructions cause 0xe40 (HEAI) interrupts rather than program interrupts. Acked-by: Thomas Huth Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/processor.h | 1 + lib/powerpc/setup.c | 13 + powerpc/emulator.c | 21 - 3 files

[kvm-unit-tests PATCH 11/32] powerpc: Support powernv machine with QEMU TCG

2024-02-26 Thread Nicholas Piggin
Add support for QEMU's powernv machine. This uses standard firmware (skiboot) rather than a minimal firmware shim. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/processor.h | 23 +++ lib/powerpc/asm/reg.h | 4 ++ lib/powerpc/hcall.c |

[kvm-unit-tests PATCH 10/32] scripts: Accommodate powerpc powernv machine differences

2024-02-26 Thread Nicholas Piggin
The QEMU powerpc powernv machine has minor differences that must be accommodated for in output parsing: - Summary parsing must search more lines of output for the summary line, to accommodate OPAL message on shutdown. - Premature failure testing must tolerate case differences in kernel load

[kvm-unit-tests PATCH 09/32] scripts: allow machine option to be specified in unittests.cfg

2024-02-26 Thread Nicholas Piggin
This allows different machines with different requirements to be supported by run_tests.sh, similarly to how different accelerators are handled. Acked-by: Thomas Huth Signed-off-by: Nicholas Piggin --- scripts/common.bash | 8 ++-- scripts/runtime.bash | 16 2 files

[kvm-unit-tests PATCH 08/32] powerpc/sprs: Avoid taking PMU interrupts caused by register fuzzing

2024-02-26 Thread Nicholas Piggin
Storing certain values in MMCR0 can cause PMU interrupts when msleep enables MSR[EE], and this crashes the test. Freeze the PMU counters and clear any PMU exception before calling msleep. Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/reg.h | 4 powerpc/sprs.c| 17

[kvm-unit-tests PATCH 07/32] powerpc/sprs: Don't fail changed SPRs that are used by the test harness

2024-02-26 Thread Nicholas Piggin
SPRs annotated with SPR_HARNESS can change between consecutive reads because the test harness code has changed them. Avoid failing the test in this case. Signed-off-by: Nicholas Piggin --- powerpc/sprs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powerpc/sprs.c

[kvm-unit-tests PATCH 06/32] powerpc/sprs: Specify SPRs with data rather than code

2024-02-26 Thread Nicholas Piggin
A significant rework that builds an array of 'struct spr', where each element describes an SPR. This makes various metadata about the SPR like name and access type easier to carry and use. Hypervisor privileged registers are described despite not being used at the moment for completeness, but

[kvm-unit-tests PATCH 05/32] powerpc: Cleanup SPR and MSR definitions

2024-02-26 Thread Nicholas Piggin
Move SPR and MSR defines out of ppc_asm.h and processor.h and into a new include, asm/reg.h. Add a define for the PVR SPR and various processor versions, and replace the open coded numbers in the sprs.c test case. Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/ppc_asm.h | 8 +---

[kvm-unit-tests PATCH 04/32] powerpc: interrupt stack backtracing

2024-02-26 Thread Nicholas Piggin
Add support for backtracing across interrupt stacks, and add interrupt frame backtrace for unhandled interrupts. Signed-off-by: Nicholas Piggin --- lib/powerpc/processor.c | 4 ++- lib/ppc64/asm/stack.h | 3 +++ lib/ppc64/stack.c | 55 +

[kvm-unit-tests PATCH 03/32] powerpc: Fix stack backtrace termination

2024-02-26 Thread Nicholas Piggin
The backtrace handler terminates when it sees a NULL caller address, but the powerpc stack setup does not keep such a NULL caller frame at the start of the stack. This happens to work on pseries because the memory at 0 is mapped and it contains 0 at the location of the return address pointer if

[kvm-unit-tests PATCH 02/32] powerpc: Fix pseries getchar return value

2024-02-26 Thread Nicholas Piggin
getchar() didn't get the shift value correct and never returned the first character. This never really mattered since it was only ever used for press-a-key-to-continue prompts. but it tripped me up when debugging a QEMU console output problem. Signed-off-by: Nicholas Piggin ---

[kvm-unit-tests PATCH 01/32] powerpc: Fix KVM caps on POWER9 hosts

2024-02-26 Thread Nicholas Piggin
KVM does not like to run on POWER9 hosts without cap-ccf-assist=off. Signed-off-by: Nicholas Piggin --- powerpc/run | 2 ++ 1 file changed, 2 insertions(+) diff --git a/powerpc/run b/powerpc/run index e469f1eb3..5cdb94194 100755 --- a/powerpc/run +++ b/powerpc/run @@ -24,6 +24,8 @@

[kvm-unit-tests PATCH 00/32] powerpc improvements

2024-02-26 Thread Nicholas Piggin
This is the same familiar set of powerpc patches, it's taken a while to get them merged. And unfortunately they keep growing with fixes and new tests. This goes on top of the previous migration and other core patches. Full tree can be found here.

[kvm-unit-tests PATCH 7/7] common: add memory dirtying vs migration test

2024-02-26 Thread Nicholas Piggin
This test stores to a bunch of pages and verifies previous stores, while being continually migrated. This can fail due to a QEMU TCG physical memory dirty bitmap bug. Signed-off-by: Nicholas Piggin --- common/memory-verify.c | 48 +

[kvm-unit-tests PATCH 6/7] gitlab-ci: Run migration selftest on s390x and powerpc

2024-02-26 Thread Nicholas Piggin
The migration harness is complicated and easy to break so CI will be helpful. Signed-off-by: Nicholas Piggin --- .gitlab-ci.yml | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 71d986e98..61f196d5d 100644 ---

[kvm-unit-tests PATCH 5/7] arch-run: Add a "continuous" migration option for tests

2024-02-26 Thread Nicholas Piggin
The cooperative migration protocol is very good to control precise pre and post conditions for a migration event. However in some cases its intrusiveness to the test program, can mask problems and make analysis more difficult. For example to stress test migration vs concurrent complicated memory

[kvm-unit-tests PATCH 4/7] powerpc: add asm/time.h header with delay and get_clock_us/ms

2024-02-26 Thread Nicholas Piggin
This matches s390x clock and delay APIs, so common test code can start using time facilities. Signed-off-by: Nicholas Piggin --- lib/powerpc/asm/processor.h | 21 - lib/powerpc/asm/time.h | 30 ++ lib/powerpc/processor.c | 11 +++

[kvm-unit-tests PATCH 3/7] (arm|s390): Use migrate_skip in test cases

2024-02-26 Thread Nicholas Piggin
Have tests use the new migrate_skip command in skip paths, rather than calling migrate_once to prevent harness reporting an error. s390x/migration.c adds a new command that looks like it was missing previously. Signed-off-by: Nicholas Piggin --- arm/gic.c | 21

[kvm-unit-tests PATCH 2/7] migration: Add a migrate_skip command

2024-02-26 Thread Nicholas Piggin
Tests that are run with MIGRATION=yes but skip due to some requirement not being met will show as a failure due to the harness requirement to see one successful migration. The workaround for this is to migrate in test's skip path. Add a new command that just tells the harness to not expect a

[kvm-unit-tests PATCH 1/7] arch-run: Keep infifo open

2024-02-26 Thread Nicholas Piggin
The infifo fifo that is used to send characters to QEMU console is only able to receive one character before the cat process exits. Supporting interactions between test and harness involving multiple characters requires the fifo to remain open. This also allows us to let the cat out of the bag,

[kvm-unit-tests PATCH 0/7] more migration enhancements and tests

2024-02-26 Thread Nicholas Piggin
This series applies on top of the multi-migration patches and just has assorted things I've been collecting. - New migrate_skip() command that tidies up the wart of using migrate_once() to skip migration. - New "continuous migration" mode where the harness just migrates the test contually

Re: [PATCH v5 0/6] DCP as trusted keys backend

2024-02-26 Thread Jarkko Sakkinen
On Mon Feb 26, 2024 at 12:20 AM EET, Richard Weinberger wrote: > Mimi, James, Jarkko, David, > > you remained silent for a whole release cycle. > Is there anything we can do to get this forward? > > Thanks, > //richard Thanks for reminding. >From my side, I've had pretty busy month as I've

Re: [kvm-unit-tests PATCH v5 0/8] Multi-migration support

2024-02-26 Thread Thomas Huth
On 26/02/2024 09.10, Nicholas Piggin wrote: On Fri Feb 23, 2024 at 5:06 PM AEST, Thomas Huth wrote: On 21/02/2024 04.27, Nicholas Piggin wrote: Now that strange arm64 hang is found to be QEMU bug, I'll repost. Since arm64 requires Thomas's uart patch and it is worse affected by the QEMU bug, I

[PATCH v13 14/16] media: vivid: add fixed point test controls

2024-02-26 Thread Shengjiu Wang
Add fixed point test controls, one is for Q4.16 format another one is for Q63 format. Signed-off-by: Shengjiu Wang --- drivers/media/test-drivers/vivid/vivid-core.h | 2 ++ .../media/test-drivers/vivid/vivid-ctrls.c| 26 +++ include/media/v4l2-ctrls.h|

[PATCH v13 09/16] media: uapi: Define audio sample format fourcc type

2024-02-26 Thread Shengjiu Wang
The audio sample format definition is from alsa, the header file is include/uapi/sound/asound.h, but don't include this header file directly, because in user space, there is another copy in alsa-lib. There will be conflict in userspace for include videodev2.h & asound.h and asoundlib.h Here still

[PATCH v13 16/16] media: vim2m-audio: add virtual driver for audio memory to memory

2024-02-26 Thread Shengjiu Wang
Audio memory to memory virtual driver use video memory to memory virtual driver vim2m.c as example. The main difference is device type is VFL_TYPE_AUDIO and device cap type is V4L2_CAP_AUDIO_M2M. The device_run function is a dummy function, which is simply copy the data from input buffer to

[PATCH v13 15/16] media: imx-asrc: Add memory to memory driver

2024-02-26 Thread Shengjiu Wang
Implement the ASRC memory to memory function using the v4l2 framework, user can use this function with v4l2 ioctl interface. User send the output and capture buffer to driver and driver store the converted data to the capture buffer. This feature can be shared by ASRC and EASRC drivers

[PATCH v13 00/16] Add audio support in v4l2 framework

2024-02-26 Thread Shengjiu Wang
Audio signal processing also has the requirement for memory to memory similar as Video. This asrc memory to memory (memory ->asrc->memory) case is a non real time use case. User fills the input buffer to the asrc module, after conversion, then asrc sends back the output buffer to user. So it is

[PATCH v13 04/16] ASoC: fsl_asrc: move fsl_asrc_common.h to include/sound

2024-02-26 Thread Shengjiu Wang
Move fsl_asrc_common.h to include/sound that it can be included from other drivers. Signed-off-by: Shengjiu Wang Acked-by: Mark Brown --- {sound/soc/fsl => include/sound}/fsl_asrc_common.h | 0 sound/soc/fsl/fsl_asrc.h | 2 +- sound/soc/fsl/fsl_asrc_dma.c

[PATCH v13 13/16] media: uapi: Add an entity type for audio resampler

2024-02-26 Thread Shengjiu Wang
Add and document a media entity type for an audio resampler. It is MEDIA_ENT_F_PROC_AUDIO_RESAMPLER. Signed-off-by: Shengjiu Wang --- Documentation/userspace-api/media/mediactl/media-types.rst | 6 ++ include/uapi/linux/media.h | 1 + 2 files changed, 7

[PATCH v13 08/16] media: v4l2: Add audio capture and output support

2024-02-26 Thread Shengjiu Wang
Audio signal processing has the requirement for memory to memory similar as Video. This patch is to add this support in v4l2 framework, defined new buffer type V4L2_BUF_TYPE_AUDIO_CAPTURE and V4L2_BUF_TYPE_AUDIO_OUTPUT, defined new format v4l2_audio_format for audio case usage. The created audio

[PATCH v13 10/16] media: uapi: Add V4L2_CTRL_CLASS_M2M_AUDIO

2024-02-26 Thread Shengjiu Wang
The Audio M2M class includes controls for audio memory-to-memory use cases. The controls can be used for audio codecs, audio preprocessing, audio postprocessing. Signed-off-by: Shengjiu Wang --- .../userspace-api/media/v4l/common.rst| 1 + .../media/v4l/ext-ctrls-audio-m2m.rst

[PATCH v13 11/16] media: uapi: Add audio rate controls support

2024-02-26 Thread Shengjiu Wang
Add V4L2_CID_M2M_AUDIO_SOURCE_RATE and V4L2_CID_M2M_AUDIO_DEST_RATE new IDs for rate control. Add V4L2_CID_M2M_AUDIO_SOURCE_RATE_OFFSET and V4L2_CID_M2M_AUDIO_DEST_RATE_OFFSET for clock drift. Signed-off-by: Shengjiu Wang --- .../media/v4l/ext-ctrls-audio-m2m.rst | 38

[PATCH v13 05/16] ASoC: fsl_asrc: register m2m platform device

2024-02-26 Thread Shengjiu Wang
Register m2m platform device, that user can use M2M feature. Defined platform data structure and platform driver name. Signed-off-by: Shengjiu Wang Acked-by: Mark Brown --- include/sound/fsl_asrc_common.h | 23 +++ sound/soc/fsl/fsl_asrc.c| 18 ++ 2

[PATCH v13 06/16] ASoC: fsl_easrc: register m2m platform device

2024-02-26 Thread Shengjiu Wang
Register m2m platform device,that user can use M2M feature. Signed-off-by: Shengjiu Wang Acked-by: Mark Brown --- sound/soc/fsl/fsl_easrc.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index

[PATCH v13 01/16] media: v4l2-ctrls: add support for fraction_bits

2024-02-26 Thread Shengjiu Wang
From: Hans Verkuil This adds support for the fraction_bits field, used with integer controls. This allows fixed point formats to be described. The fraction_bits field is only exposed through VIDIOC_QUERY_EXT_CTRL. For a given signed two's complement Qf fixed point value 'f' equals

  1   2   >