[PATCH v2 1/2] powerpc/pseries/dlpar: Remove device tree node for DLPAR IO remove

2024-08-16 Thread Haren Myneni
In the powerpc-pseries specific implementation, the IO hotplug event is handled in the user space (drmgr tool). But update the device tree and /dev/mem access to allocate buffers for some RTAS calls are restricted when the kernel lockdown feature is enabled. For the DLPAR IO REMOVE, the correspondi

[PATCH v2 2/2] powerpc/pseries/dlpar: Add device tree nodes for DLPAR IO add

2024-08-16 Thread Haren Myneni
In the powerpc-pseries specific implementation, the IO hotplug event is handled in the user space (drmgr tool). For the DLPAR IO ADD, the corresponding device tree nodes and properties will be added to the device tree after the device enable. The user space (drmgr tool) uses configure_connector RTA

Re: [PATCH 0/9] Wire up getrandom() vDSO implementation on powerpc

2024-08-16 Thread Jason A. Donenfeld
On Fri, Aug 16, 2024 at 09:57:37PM +, Jason A. Donenfeld wrote: > On first glance, patch number 7 isn't okay. If you want this to work on Sorry, I meant 6.

Re: [PATCH 0/9] Wire up getrandom() vDSO implementation on powerpc

2024-08-16 Thread Jason A. Donenfeld
Hi Christophe, Thanks for this series. I'm looking forward to taking a close look at it. I'm currently traveling until the 26th without a laptop and no email except for lore+lei+mutt on my phone. So I'll review this in about 1 week. But I'm very happy to see it here. On first glance, patch number

RE: [PATCH v2 09/13] csky, hexagon: fix broken sys_sync_file_range

2024-08-16 Thread Brian Cain
> -Original Message- > From: Arnd Bergmann > Sent: Monday, June 24, 2024 11:37 AM > To: linux-a...@vger.kernel.org; linux-ker...@vger.kernel.org > Cc: Arnd Bergmann ; Thomas Bogendoerfer > ; linux-m...@vger.kernel.org; Helge Deller > ; linux-par...@vger.kernel.org; David S. Miller > ; A

Re: Since 6.10 - kernel oops/panics on G4 macmini due to change in drivers/ata/pata_macio.c

2024-08-16 Thread Michael Ellerman
Niklas Cassel writes: > On Wed, Aug 14, 2024 at 10:20:55PM +1000, Michael Ellerman wrote: >> Niklas Cassel writes: >> > On Tue, Aug 13, 2024 at 10:32:36PM +1000, Michael Ellerman wrote: >> >> Niklas Cassel writes: >> >> > On Tue, Aug 13, 2024 at 07:49:34AM +0200, Jonáš Vidra wrote: >> ... >> >>

Re: [PATCH v2 2/2] powerpc/pseries: Add failure related checks for h_get_mpp and h_get_ppp

2024-08-16 Thread Shrikanth Hegde
On 8/16/24 01:23, Michal Suchánek wrote: On Fri, Apr 12, 2024 at 02:50:47PM +0530, Shrikanth Hegde wrote: Couple of Minor fixes: - hcall return values are long. Fix that for h_get_mpp, h_get_ppp and parse_ppp_data - If hcall fails, values set should be at-least zero. It shouldn't be uniniti

Re: [PATCH v5 3/4] arm64: topology: Support SMT control on ACPI based system

2024-08-16 Thread Dietmar Eggemann
On 06/08/2024 10:53, Yicong Yang wrote: > From: Yicong Yang > > For ACPI we'll build the topology from PPTT and we cannot directly > get the SMT number of each core. Instead using a temporary xarray > to record the SMT number of each core when building the topology > and we can know the largest S

Re: [PATCH v5 2/4] arch_topology: Support SMT control for OF based system

2024-08-16 Thread Dietmar Eggemann
On 06/08/2024 10:53, Yicong Yang wrote: > From: Yicong Yang > > On building the topology from the devicetree, we've already > gotten the SMT thread number of each core. Update the largest > SMT thread number to enable the SMT control. Do we have SMT Device Tree (DT) systems out there? But you ri

Re: [PATCH v5 1/4] cpu/SMT: Provide a default topology_is_primary_thread()

2024-08-16 Thread Dietmar Eggemann
On 06/08/2024 10:53, Yicong Yang wrote: > From: Yicong Yang > > Currently if architectures want to support HOTPLUG_SMT they need to > provide a topology_is_primary_thread() telling the framework which > thread in the SMT cannot offline. However arm64 doesn't have a > restriction on which thread i

Re: [PATCH v4 07/29] KVM: arm64: Save/restore POE registers

2024-08-16 Thread Marc Zyngier
On Fri, 16 Aug 2024 16:13:01 +0100, Joey Gouly wrote: > > On Fri, Aug 16, 2024 at 03:55:11PM +0100, Marc Zyngier wrote: > > On Fri, 03 May 2024 14:01:25 +0100, > > Joey Gouly wrote: > > > > > > + if (!kvm_has_feat(kvm, ID_AA64MMFR3_EL1, S1POE, IMP)) > > > + kvm->arch.fgu[HFGxTR_GROUP] |

Re: [PATCH v4 07/29] KVM: arm64: Save/restore POE registers

2024-08-16 Thread Marc Zyngier
On Fri, 03 May 2024 14:01:25 +0100, Joey Gouly wrote: > > Define the new system registers that POE introduces and context switch them. > > Signed-off-by: Joey Gouly > Cc: Marc Zyngier > Cc: Oliver Upton > Cc: Catalin Marinas > Cc: Will Deacon > --- > arch/arm64/include/asm/kvm_host.h

Re: [PATCH v6 RESED 1/2] dma: replace zone_dma_bits by zone_dma_limit

2024-08-16 Thread Petr Tesařík
On Fri, 16 Aug 2024 12:52:47 +0100 Will Deacon wrote: > On Sun, Aug 11, 2024 at 10:09:35AM +0300, Baruch Siach wrote: > > From: Catalin Marinas > > > > Hardware DMA limit might not be power of 2. When RAM range starts above > > 0, say 4GB, DMA limit of 30 bits should end at 5GB. A single high b

Re: PCI: Work around PCIe link training failures

2024-08-16 Thread Maciej W. Rozycki
On Thu, 15 Aug 2024, Matthew W Carlis wrote: > > Well, in principle in a setup with reliable links the LBMS bit may never > > be set, e.g. this system of mine has been in 24/7 operation since the last > > reboot 410 days ago and for the devices that support Link Active reporting > > it shows: >

Re: [PATCH v6 RESED 1/2] dma: replace zone_dma_bits by zone_dma_limit

2024-08-16 Thread Will Deacon
On Sun, Aug 11, 2024 at 10:09:35AM +0300, Baruch Siach wrote: > From: Catalin Marinas > > Hardware DMA limit might not be power of 2. When RAM range starts above > 0, say 4GB, DMA limit of 30 bits should end at 5GB. A single high bit > can not encode this limit. > > Use plain address for DMA zon

Re: [PATCH v3 14/16] modules: Support extended MODVERSIONS info

2024-08-16 Thread Michael Ellerman
Matthew Maurer writes: > Adds a new format for MODVERSIONS which stores each field in a separate > ELF section. This initially adds support for variable length names, but > could later be used to add additional fields to MODVERSIONS in a > backwards compatible way if needed. Any new fields will be

Re: [PATCH v3] PCI: Fix crash during pci_dev hot-unplug on pseries KVM guest

2024-08-16 Thread Michael Ellerman
Amit Machhiwal writes: > On 2024/08/15 01:20 PM, Michael Ellerman wrote: >> Bjorn Helgaas writes: >> > On Sat, Aug 03, 2024 at 12:03:25AM +0530, Amit Machhiwal wrote: >> >> With CONFIG_PCI_DYNAMIC_OF_NODES [1], a hot-plug and hot-unplug sequence >> >> of a PCI device attached to a PCI-bridge caus

Re: [PATCH v4 07/29] KVM: arm64: Save/restore POE registers

2024-08-16 Thread Joey Gouly
On Fri, Aug 16, 2024 at 03:55:11PM +0100, Marc Zyngier wrote: > On Fri, 03 May 2024 14:01:25 +0100, > Joey Gouly wrote: > > > > Define the new system registers that POE introduces and context switch them. > > > > Signed-off-by: Joey Gouly > > Cc: Marc Zyngier > > Cc: Oliver Upton > > Cc: Cata

[PATCH 9/9] selftests: [NOT TO BE MERGED] Modifications for testing VDSO getrandom implementation on PPC32

2024-08-16 Thread Christophe Leroy
arch/.../entry/vdso/ is specific to x86. Every architecture has a different path. On powerpc it is in arch/.../kernel/vdso/ vdso_test_getrandom is a bit too long with 2500. Something is wrong with macros INT_MAX ... : In file included from /home/chleroy/linux-powerpc/include/linux/limits.h:7

[PATCH 7/9] powerpc: Add little endian variants of LHZX_BE and friends

2024-08-16 Thread Christophe Leroy
To support getrandom in VDSO which is based on little endian storage, add macros equivalent to LHZX_BE for little endian accesses. And move it outside of __powerpc64__ #ifdef so that it can also be used for PPC32. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/asm-compat.h | 40 ++

[PATCH 8/9] powerpc/vdso: Wire up getrandom() vDSO implementation

2024-08-16 Thread Christophe Leroy
To be consistent with other VDSO functions, the function is called __kernel_getrandom() __arch_chacha20_blocks_nostack() fonction is implemented basically with 32 bits operations. It performs 4 QUARTERROUND operations in parallele. There are enough registers to avoid using the stack: On input:

[PATCH 6/9] vdso: Only use MAP_DROPPABLE when VM_DROPPABLE exists

2024-08-16 Thread Christophe Leroy
Commit 9651fcedf7b9 ("mm: add MAP_DROPPABLE for designating always lazily freeable mappings") only adds MAP_DROPPABLE for 64 bits architectures, so don't use it on 32 bits as it leads to ENOTSUPP on mmap(). Signed-off-by: Christophe Leroy --- lib/vdso/getrandom.c | 6 +- 1 file changed, 5 in

[PATCH 5/9] vdso: Avoid call to memset() by getrandom

2024-08-16 Thread Christophe Leroy
With the current implementation, __cvdso_getrandom_data() calls memset(), which is unexpected in the VDSO. Rewrite opaque data initialisation to avoid memset(). Signed-off-by: Christophe Leroy --- lib/vdso/getrandom.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --

[PATCH 4/9] vdso: Add missing c-getrandom-y in Makefile

2024-08-16 Thread Christophe Leroy
Same as for gettimeofday CVDSO implementation, add c-getrandom-y to ease the including of lib/vdso/getrandom.c in architectures VDSO builds. Signed-off-by: Christophe Leroy --- lib/vdso/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/vdso/Makefile b/lib/vdso/Makefile index 9f031

[PATCH 3/9] vdso: Add __arch_get_k_vdso_rng_data()

2024-08-16 Thread Christophe Leroy
_vdso_data is specific to x86 and __arch_get_k_vdso_data() is provided so that all architectures can provide the requested pointer. Do the same with _vdso_rng_data, provide __arch_get_k_vdso_rng_data() and don't use x86 _vdso_rng_data directly. Signed-off-by: Christophe Leroy --- arch/x86/inclu

[PATCH 2/9] powerpc/vdso32: Add crtsavres

2024-08-16 Thread Christophe Leroy
Commit 08c18b63d965 ("powerpc/vdso32: Add missing _restgpr_31_x to fix build failure") added _restgpr_31_x to the vdso for gettimeofday, but the work on getrandom shows that we will need more of those functions. Remove _restgpr_31_x and link in crtsavres.o so that we get all save/restore functions

[PATCH 1/9] powerpc/vdso: Don't discard rela sections

2024-08-16 Thread Christophe Leroy
After building the VDSO, there is a verification that it contains no dynamic relocation, see commit aff69273af61 ("vdso: Improve cmd_vdso_check to check all dynamic relocations"). This verification uses readelf -r and doesn't work if rela sections are discarded. Fixes: 8ad57add77d3 ("powerpc/buil

[PATCH 0/9] Wire up getrandom() vDSO implementation on powerpc

2024-08-16 Thread Christophe Leroy
This series wires up getrandom() vDSO implementation on powerpc. Tested on PPC32. Performance on powerpc 885 (using kernel selftest): ~# ./vdso_test_getrandom bench-single vdso: 250 times in 7.897495392 seconds libc: 250 times in 56.091632232 seconds

Re: [PATCH v3] PCI: Fix crash during pci_dev hot-unplug on pseries KVM guest

2024-08-16 Thread Amit Machhiwal
Hi Michael, On 2024/08/15 01:20 PM, Michael Ellerman wrote: > Bjorn Helgaas writes: > > On Sat, Aug 03, 2024 at 12:03:25AM +0530, Amit Machhiwal wrote: > >> With CONFIG_PCI_DYNAMIC_OF_NODES [1], a hot-plug and hot-unplug sequence > >> of a PCI device attached to a PCI-bridge causes following kern

Re: OVERFLOW_KUNIT_TEST fails with BUG: KASAN: stack-out-of-bounds in string_nocheck+0x168/0x1c8 (kernel 6.11-rc2, PowerMac G4 DP)

2024-08-16 Thread Michael Ellerman
Ivan Orlov writes: > On 8/15/24 00:26, Ivan Orlov wrote: >> >> As you can see, the device name is defined as a local variable, which >> means that it doesn't exist out of the 'overflow_allocation_test' >> function scope. This patch: >> >> diff --git a/lib/overflow_kunit.c b/lib/overflow_kunit.

Re: 'do_IRQ: stack overflow: 1072' at using bcachefs partition (ppc32, kernel 6.10.5)

2024-08-16 Thread Michael Ellerman
Erhard Furtner writes: > Greetings! > > Basically bcachefs works on ppc32 but I get stack overflows like this one > rather easy: > > [...] > do_IRQ: stack overflow: 1072 > CPU: 1 PID: 2114 Comm: bash Not tainted 6.10.5-gentoo-PMacG4 #1 > Hardware name: PowerMac3,6 7455 0x80010303 PowerMac > Call

[RFC PATCH v2 6/6] ASoC: fsl_easrc: register m2m platform device

2024-08-16 Thread Shengjiu Wang
Register m2m platform device,that user can use M2M feature. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 33 +++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index 959a8e2dd716..

[RFC PATCH v2 4/6] ASoC: fsl_asrc_m2m: Add memory to memory function

2024-08-16 Thread Shengjiu Wang
Implement the ASRC memory to memory function using the compress framework, user can use this function with compress ioctl interface. Define below private metadata key value for output format, output rate and ratio modifier configuration. ASRC_OUTPUT_FORMAT 0x8001 ASRC_OUTPUT_RATE 0x8002

[RFC PATCH v2 5/6] ASoC: fsl_asrc: register m2m platform device

2024-08-16 Thread Shengjiu Wang
Register m2m platform device, that user can use M2M feature. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c | 37 + 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index 01e3af5b1bea

[RFC PATCH v2 3/6] ASoC: fsl_easrc: define functions for memory to memory usage

2024-08-16 Thread Shengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage and export them as function pointer. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 226 ++ sound/soc/fsl/fsl_easrc.h | 4 + 2 files changed, 230 insertions(+) d

[RFC PATCH v2 2/6] ASoC: fsl_asrc: define functions for memory to memory usage

2024-08-16 Thread Shengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage. m2m_prepare: prepare for the start step m2m_start: the start step m2m_unprepare: unprepare for stop step, optional m2m_stop: stop step m2m_check_format: check format is supported or not m2m_calc_out_len: calculate o

[RFC PATCH v2 0/6] ASoC: fsl: add memory to memory function for ASRC

2024-08-16 Thread Shengjiu Wang
This function is base on the accelerator implementation for compress API: https://patchwork.kernel.org/project/alsa-devel/patch/20240731083843.59911-1-pe...@perex.cz/ Audio signal processing also has the requirement for memory to memory similar as Video. This asrc memory to memory (memory ->asrc-

[RFC PATCH v2 1/6] ALSA: compress: reserve space in snd_compr_metadata.key for private usage

2024-08-16 Thread Shengjiu Wang
Reserve the key value which is larger than 0x8000 for driver private usage. Driver may define its own key values which are not public in ALSA header Signed-off-by: Shengjiu Wang --- include/uapi/sound/compress_offload.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/incl

[PATCH] KVM: PPC: remove unused varible

2024-08-16 Thread alexs
From: Alex Shi During build testing, we found a error: /arch/powerpc/kvm/book3s_hv.c:4052:17: error: variable 'loops' set but not used [-Werror,-Wunused-but-set-variable] unsigned long loops = 0; 1 error generated. Remove the unused variable could fix this. Signed-off-by: Alex