Re: [PATCH 07/15] parisc: use generic sys_fanotify_mark implementation

2024-06-20 Thread Arnd Bergmann
On Fri, Jun 21, 2024, at 07:26, LEROY Christophe wrote: > Le 20/06/2024 à 23:21, Helge Deller a écrit : >> [Vous ne recevez pas souvent de courriers de del...@gmx.de. Découvrez >> pourquoi ceci est important à >> https://aka.ms/LearnAboutSenderIdentification ] >> >> On 6/20/24 18:23, Arnd Bergmann

Re: [Patch v4 07/10] ARM: lpc32xx: Remove pl08x platform data in favor for device tree

2024-06-20 Thread Krzysztof Kozlowski
On 21/06/2024 07:56, Markus Elfring wrote: >> With the driver for nxp,lpc3220-dmamux we can remove the pl08x platform >> data and let pl08x driver to create peripheral channels from the DT >> properties. > > Do you see opportunities to improve such a change description? > https://git.kernel.org/pu

Re: [Patch v4 06/10] dmaengine: Add dma router for pl08x in LPC32XX SoC

2024-06-20 Thread Krzysztof Kozlowski
On 20/06/2024 19:56, Piotr Wojtaszczyk wrote: > LPC32XX connects few of its peripherals to pl08x DMA thru a multiplexer, > this driver allows to route a signal request line thru the multiplexer for > given peripheral. > > Signed-off-by: Piotr Wojtaszczyk > --- > Changes for v4: > - This patch is

Re: [Patch v4 05/10] clk: lpc32xx: initialize regmap using parent syscon

2024-06-20 Thread Krzysztof Kozlowski
On 20/06/2024 19:56, Piotr Wojtaszczyk wrote: > > - base = of_iomap(np, 0); > - if (!base) { > - pr_err("failed to map system control block registers\n"); > - return; > - } > - > - clk_regmap = regmap_init_mmio(NULL, base, &lpc32xx_scb_regmap_config); > +

Re: [Patch v4 04/10] ARM: dts: lpc32xx: Add missing dma and i2s properties

2024-06-20 Thread Krzysztof Kozlowski
On 20/06/2024 19:56, Piotr Wojtaszczyk wrote: > Adds properties declared in the new DT bindings: > - nxp,lpc3220-i2s.yaml > - nxp,lpc3220-dmamux.yaml > for dma router/mux and I2S interface. > > Signed-off-by: Piotr Wojtaszczyk You are doing here multiple things at once. This should be One pat

Re: [Patch v4 03/10] ASoC: dt-bindings: lpc32xx: Add lpc32xx i2s DT binding

2024-06-20 Thread Krzysztof Kozlowski
On 20/06/2024 19:56, Piotr Wojtaszczyk wrote: > Add nxp,lpc3220-i2s DT binding documentation. > > Signed-off-by: Piotr Wojtaszczyk Thanks for doing this. Appreciated. > > +FREESCALE SOC LPC32XX SOUND DRIVERS > +M: J.M.B. Downing > +M: Piotr Wojtaszczyk > +R: Vladimir Zapolskiy > +L:

Re: [Patch v4 02/10] dt-bindings: dma: Add lpc32xx DMA mux binding

2024-06-20 Thread Krzysztof Kozlowski
On 20/06/2024 19:56, Piotr Wojtaszczyk wrote: > LPC32XX SoCs use pl080 dma controller which have few request signals > multiplexed between peripherals. This binding describes how devices can > use the multiplexed request signals. > > Signed-off-by: Piotr Wojtaszczyk > + > +properties: > + "#dma

Re: [Patch v4 01/10] dt-bindings: dma: pl08x: Add dma-cells description

2024-06-20 Thread Krzysztof Kozlowski
On 20/06/2024 19:56, Piotr Wojtaszczyk wrote: > Recover dma-cells description from the legacy DT binding. Fixes: 6f64aa5746d2 ("dt-bindings: dma: convert arm-pl08x to yaml") Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof

Re: [PATCH v4 00/40] lib/find: add atomic find_bit() primitives

2024-06-20 Thread Linus Torvalds
On Thu, 20 Jun 2024 at 13:20, Yury Norov wrote: > > FORCE_NR_CPUS helped to generate a better code for me back then. I'll > check again against the current kernel. Of _course_ it generates better code. But when "better code" is a source of bugs, and isn't actually useful in general, it's not bet

Re: [PATCH v4 00/40] lib/find: add atomic find_bit() primitives

2024-06-20 Thread Yury Norov
On Thu, Jun 20, 2024 at 12:26:18PM -0700, Linus Torvalds wrote: > On Thu, 20 Jun 2024 at 11:32, Yury Norov wrote: > > > > Is that in master already? I didn't get any email, and I can't find > > anything related in the master branch. > > It's 5d272dd1b343 ("cpumask: limit FORCE_NR_CPUS to just the

Re: [PATCH v4 00/40] lib/find: add atomic find_bit() primitives

2024-06-20 Thread Linus Torvalds
On Thu, 20 Jun 2024 at 11:32, Yury Norov wrote: > > Is that in master already? I didn't get any email, and I can't find > anything related in the master branch. It's 5d272dd1b343 ("cpumask: limit FORCE_NR_CPUS to just the UP case"). > > New rule: before you send some optimization, you need to ha

Re: [PATCH v4 00/40] lib/find: add atomic find_bit() primitives

2024-06-20 Thread Yury Norov
On Thu, Jun 20, 2024 at 11:00:38AM -0700, Linus Torvalds wrote: > On Thu, 20 Jun 2024 at 10:57, Yury Norov wrote: > > > > > > The typical lock-protected bit allocation may look like this: > > If it looks like this, then nobody cares. Clearly the user in question > never actually cared about perfo

Re: [PATCH v4 00/40] lib/find: add atomic find_bit() primitives

2024-06-20 Thread Linus Torvalds
On Thu, 20 Jun 2024 at 10:57, Yury Norov wrote: > > > The typical lock-protected bit allocation may look like this: If it looks like this, then nobody cares. Clearly the user in question never actually cared about performance, and you SHOULD NOT then say "let's optimize this that nobody cares abo

[PATCH v4 01/40] lib/find: add atomic find_bit() primitives

2024-06-20 Thread Yury Norov
Add helpers around test_and_{set,clear}_bit() to allow searching for clear or set bits and flipping them atomically. Using atomic search primitives allows to implement lockless bitmap handling where only individual bits are touched by concurrent processes, and where people have to protect their bi

[PATCH v4 02/40] lib/find: add test for atomic find_bit() ops

2024-06-20 Thread Yury Norov
Add basic functionality test for new API. Signed-off-by: Yury Norov --- lib/test_bitmap.c | 62 +++ 1 file changed, 62 insertions(+) diff --git a/lib/test_bitmap.c b/lib/test_bitmap.c index 65a75d58ed9e..405f79dd2266 100644 --- a/lib/test_bitmap.c +++

[PATCH v4 00/40] lib/find: add atomic find_bit() primitives

2024-06-20 Thread Yury Norov
--- This v4 moves new API to separate headers, as adding stuff to find.h concerns people, particularly Linus. It also adds few more conversions alongside other cosmetic changes. See full changelog below. --- Add helpers around test_and_{set,clear}_bit() to allow searching for clear or set bits

RE: [PATCH 00/26] KVM: vfio: Hide KVM internals from others

2024-06-20 Thread Shameerali Kolothum Thodi
> -Original Message- > From: Sean Christopherson > Sent: Saturday, September 16, 2023 1:31 AM > To: Catalin Marinas ; Will Deacon > ; Marc Zyngier ; Oliver Upton > ; Huacai Chen ; Michael > Ellerman ; Anup Patel ; Paul > Walmsley ; Palmer Dabbelt > ; Albert Ou ; Heiko > Carstens ; Vasily

[PATCH v1 2/2] powerpc/mmiotrace: bind ioremap and page fault to active mmiotrace

2024-06-20 Thread Jialong Yang
Hacking the code in ioremap entry and page fault handler entry to integrate mmiotrace. Signed-off-by: Jialong Yang --- arch/powerpc/mm/fault.c | 17 + arch/powerpc/mm/ioremap_64.c | 11 +-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/

[PATCH v1 1/2] powerpc/mmiotrace: Add MMIO Tracing tool for PowerPC

2024-06-20 Thread Jialong Yang
mmiotrace is a useful tool to trace MMIO accesses. Nowadays, it only supported on x86 and x86_64 platforms. Here is a support for powerpc. The manual is located at Documentation/trace/mmiotrace.rst which means I have not changed user API. People will be easy to use it. Almost all files are copied f

Re: [Patch v4 07/10] ARM: lpc32xx: Remove pl08x platform data in favor for device tree

2024-06-20 Thread Markus Elfring
> With the driver for nxp,lpc3220-dmamux we can remove the pl08x platform > data and let pl08x driver to create peripheral channels from the DT > properties. Do you see opportunities to improve such a change description? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Docum

Re: [Patch v4 06/10] dmaengine: Add dma router for pl08x in LPC32XX SoC

2024-06-20 Thread Markus Elfring
… > this driver allows to route a signal request line thru the multiplexer for > given peripheral. Would you like to choose an imperative wording for an improved change description? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rs

Re: [Patch v4 05/10] clk: lpc32xx: initialize regmap using parent syscon

2024-06-20 Thread Markus Elfring
> This allows to share the regmap with other simple-mfd devices like > nxp,lpc32xx-dmamux Please choose an imperative wording for an improved change description. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc4#n94 Re

Re: [Patch v4 04/10] ARM: dts: lpc32xx: Add missing dma and i2s properties

2024-06-20 Thread Markus Elfring
> Adds properties declared in the new DT bindings: Add?How do you think about to replace such an abbreviation? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc4#n94 Regards, Marku

Re: [PATCH 07/15] parisc: use generic sys_fanotify_mark implementation

2024-06-20 Thread LEROY Christophe
Le 20/06/2024 à 23:21, Helge Deller a écrit : > [Vous ne recevez pas souvent de courriers de del...@gmx.de. Découvrez > pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > On 6/20/24 18:23, Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> The sys_fanotify_mark()

[PATCH 12/15] net: ibmvnic: Convert tasklet API to new bottom half workqueue mechanism

2024-06-20 Thread Allen Pais
Migrate tasklet APIs to the new bottom half workqueue mechanism. It replaces all occurrences of tasklet usage with the appropriate workqueue APIs throughout the ibmvnic driver. This transition ensures compatibility with the latest design and enhances performance. Signed-off-by: Allen Pais --- dr

[powerpc:merge] BUILD SUCCESS e2b06d707dd067509cdc9ceba783c06fa6a551c2

2024-06-20 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git merge branch HEAD: e2b06d707dd067509cdc9ceba783c06fa6a551c2 Automatic merge of 'next' into merge (2024-06-17 15:38) elapsed time: 5231m configs tested: 121 configs skipped: 2 The following configs have been built s

Re: (subset) [PATCHv5 0/9] ASoC: fsl-asoc-card: add S/PDIF controller

2024-06-20 Thread Mark Brown
On Thu, 20 Jun 2024 15:25:02 +0200, Elinor Montmasson wrote: > This is the v5 of the series of patches aiming to make the machine > driver `fsl-asoc-card` compatible with S/PDIF controllers on imx boards. > The main goal is to allow the use of S/PDIF controllers with ASRC > modules. > > The `imx-s

Re: [Patch v4 10/10] i2x: pnx: Use threaded irq to fix warning from del_timer_sync()

2024-06-20 Thread Andi Shyti
Hi Piotr, On Thu, Jun 20, 2024 at 07:56:41PM GMT, Piotr Wojtaszczyk wrote: > When del_timer_sync() is called in an interrupt context it throws a warning > because of potential deadlock. Threaded irq handler fixes the potential > problem. > > Signed-off-by: Piotr Wojtaszczyk did you run into a l

Re: [PATCH 07/15] parisc: use generic sys_fanotify_mark implementation

2024-06-20 Thread Helge Deller
On 6/20/24 18:23, Arnd Bergmann wrote: From: Arnd Bergmann The sys_fanotify_mark() syscall on parisc uses the reverse word order for the two halves of the 64-bit argument compared to all syscalls on all 32-bit architectures. As far as I can tell, the problem is that the function arguments on pa

Re: [Patch v4 02/10] dt-bindings: dma: Add lpc32xx DMA mux binding

2024-06-20 Thread Rob Herring (Arm)
On Thu, 20 Jun 2024 19:56:33 +0200, Piotr Wojtaszczyk wrote: > LPC32XX SoCs use pl080 dma controller which have few request signals > multiplexed between peripherals. This binding describes how devices can > use the multiplexed request signals. > > Signed-off-by: Piotr Wojtaszczyk > --- > Chang

[RFC PATCH v3 11/11] powerpc64/bpf: Add support for bpf trampolines

2024-06-20 Thread Naveen N Rao
Add support for bpf_arch_text_poke() and arch_prepare_bpf_trampoline() for 64-bit powerpc. BPF prog JIT is extended to mimic 64-bit powerpc approach for ftrace having a single nop at function entry, followed by the function profiling sequence out-of-line and a separate long branch stub for calls t

[RFC PATCH v3 10/11] powerpc64/bpf: Fold bpf_jit_emit_func_call_hlp() into bpf_jit_emit_func_call_rel()

2024-06-20 Thread Naveen N Rao
Commit 61688a82e047 ("powerpc/bpf: enable kfunc call") enhanced bpf_jit_emit_func_call_hlp() to handle calls out to module region, where bpf progs are generated. The only difference now between bpf_jit_emit_func_call_hlp() and bpf_jit_emit_func_call_rel() is in handling of the initial pass where ta

Re: [PATCH] powerpc/pseries: Whitelist dtl slub object for copying to userspace

2024-06-20 Thread Kees Cook
On Thu, Jun 20, 2024 at 10:58:49PM +0530, Anjali K wrote: > However given that:     > (i) The dtl buffer is read-only. The dtl trace is a set of metrics which    > are collected to be read by privileged users.   > (ii)

[RFC PATCH v3 09/11] samples/ftrace: Add support for ftrace direct samples on powerpc

2024-06-20 Thread Naveen N Rao
Add powerpc 32-bit and 64-bit samples for ftrace direct. This serves to show the sample instruction sequence to be used by ftrace direct calls to adhere to the ftrace ABI. On 64-bit powerpc, TOC setup requires some additional work. Signed-off-by: Naveen N Rao --- arch/powerpc/Kconfig

[RFC PATCH v3 08/11] powerpc/ftrace: Add support for DYNAMIC_FTRACE_WITH_DIRECT_CALLS

2024-06-20 Thread Naveen N Rao
Add support for DYNAMIC_FTRACE_WITH_DIRECT_CALLS similar to the arm64 implementation. ftrace direct calls allow custom trampolines to be called into directly from function ftrace call sites, bypassing the ftrace trampoline completely. This functionality is currently utilized by BPF trampolines to

[RFC PATCH v3 01/11] powerpc/kprobes: Use ftrace to determine if a probe is at function entry

2024-06-20 Thread Naveen N Rao
Rather than hard-coding the offset into a function to be used to determine if a kprobe is at function entry, use ftrace_location() to determine the ftrace location within the function and categorize all instructions till that offset to be function entry. For functions that cannot be traced, we fal

[RFC PATCH v3 07/11] powerpc/ftrace: Add support for DYNAMIC_FTRACE_WITH_CALL_OPS

2024-06-20 Thread Naveen N Rao
Implement support for DYNAMIC_FTRACE_WITH_CALL_OPS similar to the arm64 implementation. This works by patching-in a pointer to an associated ftrace_ops structure before each traceable function. If multiple ftrace_ops are associated with a call site, then a special ftrace_list_ops is used to enable

[RFC PATCH v3 06/11] powerpc64/ftrace: Move ftrace sequence out of line

2024-06-20 Thread Naveen N Rao
Function profile sequence on powerpc includes two instructions at the beginning of each function: mflrr0 bl ftrace_caller The call to ftrace_caller() gets nop'ed out during kernel boot and is patched in when ftrace is enabled. Given the sequence, we cannot return from ftr

[RFC PATCH v3 05/11] kbuild: Add generic hook for architectures to use before the final vmlinux link

2024-06-20 Thread Naveen N Rao
On powerpc, we would like to be able to make a pass on vmlinux.o and generate a new object file to be linked into vmlinux. Add a generic pass in Makefile.vmlinux that architectures can use for this purpose. Architectures need to select CONFIG_ARCH_WANTS_PRE_LINK_VMLINUX and must provide arch//tool

[RFC PATCH v3 04/11] powerpc/ftrace: Remove pointer to struct module from dyn_arch_ftrace

2024-06-20 Thread Naveen N Rao
Pointer to struct module is only relevant for ftrace records belonging to kernel modules. Having this field in dyn_arch_ftrace wastes memory for all ftrace records belonging to the kernel. Remove the same in favour of looking up the module from the ftrace record address, similar to other architectu

[RFC PATCH v3 03/11] powerpc/module_64: Convert #ifdef to IS_ENABLED()

2024-06-20 Thread Naveen N Rao
Minor refactor for converting #ifdef to IS_ENABLED(). Signed-off-by: Naveen N Rao --- arch/powerpc/kernel/module_64.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c index e9bab599d0c2..c202be11683b

[RFC PATCH v3 02/11] powerpc/ftrace: Unify 32-bit and 64-bit ftrace entry code

2024-06-20 Thread Naveen N Rao
On 32-bit powerpc, gcc generates a three instruction sequence for function profiling: mflrr0 stw r0, 4(r1) bl _mcount On kernel boot, the call to _mcount() is nop-ed out, to be patched back in when ftrace is actually enabled. The 'stw' instruction therefore is

[RFC PATCH v3 00/11] powerpc: Add support for ftrace direct and BPF trampolines

2024-06-20 Thread Naveen N Rao
This is v3 of the patches posted here: http://lkml.kernel.org/r/cover.1718008093.git.nav...@kernel.org Since v2, I have addressed review comments from Steven and Masahiro along with a few fixes. Patches 7-11 are new in this series and add support for ftrace direct and bpf trampolines. This ser

[Patch v4 10/10] i2x: pnx: Use threaded irq to fix warning from del_timer_sync()

2024-06-20 Thread Piotr Wojtaszczyk
When del_timer_sync() is called in an interrupt context it throws a warning because of potential deadlock. Threaded irq handler fixes the potential problem. Signed-off-by: Piotr Wojtaszczyk --- drivers/i2c/busses/i2c-pnx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d

[Patch v4 09/10] ASoC: fsl: Add i2s and pcm drivers for LPC32xx CPUs

2024-06-20 Thread Piotr Wojtaszczyk
This driver was ported from an old version in linux 2.6.27 and adjusted for the new ASoC framework and DMA API. Signed-off-by: Piotr Wojtaszczyk --- Changes for v4: - Add to MAINTAINERS - Use guard(mutex)(&i2s_info_p->lock) when possible - Request dma chennels using DT entries in devm_snd_dmaengi

[Patch v4 08/10] mtd: rawnand: lpx32xx: Request DMA channels using DT entries

2024-06-20 Thread Piotr Wojtaszczyk
Move away from pl08x platform data towards device tree. Signed-off-by: Piotr Wojtaszczyk --- Changes for v4: - This patch is new in v4 drivers/mtd/nand/raw/lpc32xx_mlc.c | 10 +- drivers/mtd/nand/raw/lpc32xx_slc.c | 10 +- 2 files changed, 2 insertions(+), 18 deletions(-) diff

[Patch v4 07/10] ARM: lpc32xx: Remove pl08x platform data in favor for device tree

2024-06-20 Thread Piotr Wojtaszczyk
With the driver for nxp,lpc3220-dmamux we can remove the pl08x platform data and let pl08x driver to create peripheral channels from the DT properties. Signed-off-by: Piotr Wojtaszczyk --- Changes for v4: - This patch is new in v4 arch/arm/mach-lpc32xx/phy3250.c | 54 ---

[Patch v4 06/10] dmaengine: Add dma router for pl08x in LPC32XX SoC

2024-06-20 Thread Piotr Wojtaszczyk
LPC32XX connects few of its peripherals to pl08x DMA thru a multiplexer, this driver allows to route a signal request line thru the multiplexer for given peripheral. Signed-off-by: Piotr Wojtaszczyk --- Changes for v4: - This patch is new in v4 MAINTAINERS | 1 + drivers/dma/

[Patch v4 05/10] clk: lpc32xx: initialize regmap using parent syscon

2024-06-20 Thread Piotr Wojtaszczyk
This allows to share the regmap with other simple-mfd devices like nxp,lpc32xx-dmamux Signed-off-by: Piotr Wojtaszczyk --- Changes for v4: - This patch is new in v4 drivers/clk/Kconfig | 1 + drivers/clk/nxp/clk-lpc32xx.c | 10 ++ 2 files changed, 3 insertions(+), 8 deletions

[Patch v4 04/10] ARM: dts: lpc32xx: Add missing dma and i2s properties

2024-06-20 Thread Piotr Wojtaszczyk
Adds properties declared in the new DT bindings: - nxp,lpc3220-i2s.yaml - nxp,lpc3220-dmamux.yaml for dma router/mux and I2S interface. Signed-off-by: Piotr Wojtaszczyk --- Changes for v4: - This patch is renamed from "ARM: dts: lpc32xx: Add missing properties for the i2s interfaces" to des

[PATCH v4 40/40] powerpc/xive: drop locking around IRQ map

2024-06-20 Thread Yury Norov
The code operates on individual bits of the bitmap, and leveraging atomic find ops we can drop locking scheme around the map. Signed-off-by: Yury Norov --- arch/powerpc/sysdev/xive/spapr.c | 34 ++-- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/arch/

[PATCH v4 37/40] KVM: PPC: Book3s HV: drop locking around kvmppc_uvmem_bitmap

2024-06-20 Thread Yury Norov
The driver operates on individual bits of the kvmppc_uvmem_bitmap. Now that we have an atomic search API for bitmaps, we can rely on it and drop locking around the bitmap entirely. Signed-off-by: Yury Norov --- arch/powerpc/kvm/book3s_hv_uvmem.c | 33 ++ 1 file change

[Patch v4 03/10] ASoC: dt-bindings: lpc32xx: Add lpc32xx i2s DT binding

2024-06-20 Thread Piotr Wojtaszczyk
Add nxp,lpc3220-i2s DT binding documentation. Signed-off-by: Piotr Wojtaszczyk --- Changes for v4: - Custom dma-vc-names property with standard dmas and dma-names - Added to MAINTAINERS Changes for v3: - Added '$ref: dai-common.yaml#' and '#sound-dai-cells' - Dropped all clock-names, references

[Patch v4 02/10] dt-bindings: dma: Add lpc32xx DMA mux binding

2024-06-20 Thread Piotr Wojtaszczyk
LPC32XX SoCs use pl080 dma controller which have few request signals multiplexed between peripherals. This binding describes how devices can use the multiplexed request signals. Signed-off-by: Piotr Wojtaszczyk --- Changes for v4: - This patch is new in v4 .../bindings/dma/nxp,lpc3220-dmamux.ya

[Patch v4 01/10] dt-bindings: dma: pl08x: Add dma-cells description

2024-06-20 Thread Piotr Wojtaszczyk
Recover dma-cells description from the legacy DT binding. Signed-off-by: Piotr Wojtaszczyk --- Changes for v4: - This patch is new in v4 Documentation/devicetree/bindings/dma/arm-pl08x.yaml | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/dma/arm-pl08

[PATCH v4 18/40] powerpc: optimize arch code by using atomic find_bit() API

2024-06-20 Thread Yury Norov
Use find_and_{set,clear}_bit() where appropriate and simplify the logic. Signed-off-by: Yury Norov --- arch/powerpc/mm/book3s32/mmu_context.c | 11 +++--- arch/powerpc/platforms/pasemi/dma_lib.c| 46 ++ arch/powerpc/platforms/powernv/pci-sriov.c | 13 ++ 3 files c

[Patch v4 00/10] Add audio support for LPC32XX CPUs

2024-06-20 Thread Piotr Wojtaszczyk
This pach set is to bring back audio to machines with a LPC32XX CPU. The legacy LPC32XX SoC used to have audio spport in linux 2.6.27. The support was dropped due to lack of interest from mainaeners. Piotr Wojtaszczyk (10): dt-bindings: dma: pl08x: Add dma-cells description dt-bindings: dma: A

[PATCH 3/3] powerpc: Document details on H_HTM hcall

2024-06-20 Thread Madhavan Srinivasan
Add documentation to 'papr_hcalls.rst' describing the input, output and return values of the H_HTM hcall as per the internal specification. Signed-off-by: Madhavan Srinivasan --- Documentation/arch/powerpc/papr_hcalls.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documenta

[PATCH 2/3] powerpc/pseries: Export hardware trace macro dump via debugfs

2024-06-20 Thread Madhavan Srinivasan
This patch adds debugfs interface to export Hardware Trace Macro (HTM) function data in a LPAR. New hypervisor call "H_HTM" has been defined to setup, configure, control and dump the HTM data. This patch supports only dumping of HTM data in a LPAR. New debugfs folder called "htmdump" has been added

[PATCH 1/3] powerpc/pseries: Macros and wrapper functions for H_HTM call

2024-06-20 Thread Madhavan Srinivasan
Define macros and wrapper functions to handle H_HTM (Hardware Trace Macro) hypervisor call. H_HTM is new HCALL added to export data from Hardware Trace Macro (HTM) function. Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/hvcall.h | 34 +++ arch/powerp

Re: [PATCH] powerpc/pseries: Whitelist dtl slub object for copying to userspace

2024-06-20 Thread Anjali K
Hi Kees Thank you for your review. On 17/06/24 23:29, Kees Cook wrote: > On Fri, Jun 14, 2024 at 11:08:44PM +0530, Anjali K wrote: >> Reading the dispatch trace log from /sys/kernel/debug/powerpc/dtl/cpu-* >> results in a BUG() when the config CONFIG_HARDENED_USERCOPY is enabled as >> shown below.

[PATCH 15/15] linux/syscalls.h: add missing __user annotations

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann A couple of declarations in linux/syscalls.h are missing __user annotations on their pointers, which can lead to warnings from sparse because these don't match the implementation that have the correct address space annotations. Signed-off-by: Arnd Bergmann --- include/linux

[PATCH 14/15] asm-generic: unistd: fix time32 compat syscall handling

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann arch/riscv/ appears to have accidentally enabled the compat time32 syscalls in 64-bit kernels even though the native 32-bit ABI does not expose those. Address this by adding another level of indirection, checking for both the target ABI (32 or 64) and the __ARCH_WANT_TIME32_S

[PATCH 13/15] syscalls: mmap(): use unsigned offset type consistently

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann Most architectures that implement the old-style mmap() with byte offset use 'unsigned long' as the type for that offset, but microblaze and riscv have the off_t type that is shared with userspace, matching the prototype in include/asm-generic/syscalls.h. Make this consistent

[PATCH 12/15] s390: remove native mmap2() syscall

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann The mmap2() syscall has never been used on 64-bit s390x and should have been removed as part of 5a79859ae0f3 ("s390: remove 31 bit support"). Remove it now. Signed-off-by: Arnd Bergmann --- arch/s390/kernel/syscall.c | 27 --- 1 file changed, 27 del

[PATCH 11/15] hexagon: fix fadvise64_64 calling conventions

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann fadvise64_64() has two 64-bit arguments at the wrong alignment for hexagon, which turns them into a 7-argument syscall that is not supported by Linux. The downstream musl port for hexagon actually asks for a 6-argument version the same way we do it on arm, csky, powerpc, so m

[PATCH 10/15] csky, hexagon: fix broken sys_sync_file_range

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann Both of these architectures require u64 function arguments to be passed in even/odd pairs of registers or stack slots, which in case of sync_file_range would result in a seven-argument system call that is not currently possible. The system call is therefore incompatible with a

[PATCH 09/15] sh: rework sync_file_range ABI

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann The unusual function calling conventions on superh ended up causing sync_file_range to have the wrong argument order, with the 'flags' argument getting sorted before 'nbytes' by the compiler. In userspace, I found that musl, glibc, uclibc and strace all expect the normal call

[PATCH 08/15] powerpc: restore some missing spu syscalls

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann A couple of system calls were inadventently removed from the table during a bugfix for 32-bit powerpc entry. Restore the original behavior. Fixes: e23750623835 ("powerpc/32: fix syscall wrappers with 64-bit arguments of unaligned register-pairs") Signed-off-by: Arnd Bergmann

[PATCH 07/15] parisc: use generic sys_fanotify_mark implementation

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann The sys_fanotify_mark() syscall on parisc uses the reverse word order for the two halves of the 64-bit argument compared to all syscalls on all 32-bit architectures. As far as I can tell, the problem is that the function arguments on parisc are sorted backwards (26, 25, 24, 23

[PATCH 06/15] parisc: use correct compat recv/recvfrom syscalls

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann Johannes missed parisc back when he introduced the compat version of these syscalls, so receiving cmsg messages that require a compat conversion is still broken. Use the correct calls like the other architectures do. Fixes: 1dacc76d0014 ("net/compat/wext: send different mess

[PATCH 05/15] sparc: fix compat recv/recvfrom syscalls

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann sparc has the wrong compat version of recv() and recvfrom() for both the direct syscalls and socketcall(). The direct syscalls just need to use the compat version. For socketcall, the same thing could be done, but it seems better to completely remove the custom assembler code

[PATCH 04/15] sparc: fix old compat_sys_select()

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann sparc has two identical select syscalls at numbers 93 and 230, respectively. During the conversion to the modern syscall.tbl format, the older one of the two broke in compat mode, and now refers to the native 64-bit syscall. Restore the correct behavior. This has very little

[PATCH 03/15] mips: fix compat_sys_lseek syscall

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann This is almost compatible, but passing a negative offset should result in a EINVAL error, but on mips o32 compat mode would seek to a large 32-bit byte offset. Use compat_sys_lseek() to correctly sign-extend the argument. Signed-off-by: Arnd Bergmann --- arch/mips/kernel/s

[PATCH 02/15] syscalls: fix compat_sys_io_pgetevents_time64 usage

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann Using sys_io_pgetevents() as the entry point for compat mode tasks works almost correctly, but misses the sign extension for the min_nr and nr arguments. This was addressed on parisc by switching to compat_sys_io_pgetevents_time64() in commit 6431e92fc827 ("parisc: io_pgeteve

[PATCH 01/15] ftruncate: pass a signed offset

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann The old ftruncate() syscall, using the 32-bit off_t misses a sign extension when called in compat mode on 64-bit architectures. As a result, passing a negative length accidentally succeeds in truncating to file size between 2GiB and 4GiB. Changing the type of the compat sysc

[PATCH 00/15] linux system call fixes

2024-06-20 Thread Arnd Bergmann
From: Arnd Bergmann I'm working on cleanup series for Linux system call handling, trying to unify some of the architecture specific code there among other things. In the process, I came across a number of bugs that are ABI relevant, so I'm trying to merge these first. I found all of these by ins

Re: [V4 00/16] Add data type profiling support for powerpc

2024-06-20 Thread Athira Rajeev
> On 14 Jun 2024, at 10:56 PM, Athira Rajeev > wrote: > > The patchset from Namhyung added support for data type profiling > in perf tool. This enabled support to associate PMU samples to data > types they refer using DWARF debug information. With the upstream > perf, currently it possible to

Re: [PATCH] tools/perf: Handle perftool-testsuite_probe testcases fail when kernel debuginfo is not present

2024-06-20 Thread Athira Rajeev
> On 20 Jun 2024, at 2:03 PM, James Clark wrote: > > > > On 18/06/2024 11:44, James Clark wrote: >> >> >> On 17/06/2024 17:47, Athira Rajeev wrote: >>> >>> On 17 Jun 2024, at 8:30 PM, James Clark wrote: On 17/06/2024 13:21, Athira Rajeev wrote: > Running

Re: [PATCH v2 0/8] KVM: PPC: Book3S HV: Nested guest migration fixes

2024-06-20 Thread Michael Ellerman
On Wed, 05 Jun 2024 13:06:00 +, Shivaprasad G Bhat wrote: > The series fixes the issues exposed by the kvm-unit-tests[1] > sprs-migration test. > > The SDAR, MMCR3 were seen to have some typo/refactoring bugs. > The first two patches fix them. > > The remaining patches take care of save-resto

Re: [PATCH v9] arch/powerpc/kvm: Add support for reading VPA counters for pseries guests

2024-06-20 Thread Michael Ellerman
On Mon, 20 May 2024 23:27:40 +0530, Gautam Menghani wrote: > PAPR hypervisor has introduced three new counters in the VPA area of > LPAR CPUs for KVM L2 guest (see [1] for terminology) observability - 2 > for context switches from host to guest and vice versa, and 1 counter > for getting the total

Re: [PATCH v2 0/2] Fix doorbell emulation for v2 API on PPC

2024-06-20 Thread Michael Ellerman
On Wed, 05 Jun 2024 17:09:08 +0530, Gautam Menghani wrote: > Doorbell emulation for KVM on PAPR guests is broken as support for DPDES > was not added in initial patch series [1]. > Add DPDES support and doorbell handling support for V2 API. > > [1] lore.kernel.org/linuxppc-dev/20230914030600.16993

Re: [PATCH v2 0/2] powerpc: kexec fixes

2024-06-20 Thread Michael Ellerman
On Fri, 10 May 2024 15:52:33 +0530, Sourabh Jain wrote: > Patch series fixes two kexec issues. > > 01/02: Update extra size calculation for kexec FDT to avoid kexec load > failure due to FDT_ERR_NOSPACE while including CPU nodes added post > boot and reserved memory ranges. > > 02/02: Fix update_

[PATCHv5 9/9] ARM: dts: imx6: update spdif sound card node properties

2024-06-20 Thread Elinor Montmasson
Following merge of imx-spdif driver into fsl-asoc-card: * update properties to match those used by fsl-asoc-card. * S/PDIF in/out dummy codecs must now be declared explicitly, add and use them. These modifications were tested only on an imx8mn-evk board. Signed-off-by: Elinor Montmasson --- a

[PATCHv5 8/9] arm64: dts: imx8m: update spdif sound card node properties

2024-06-20 Thread Elinor Montmasson
Following merge of imx-spdif driver into fsl-asoc-card: * update properties to match those used by fsl-asoc-card. * S/PDIF in/out dummy codecs must now be declared explicitly, add and use them. These modifications were tested only on an imx8mn-evk board. Signed-off-by: Elinor Montmasson --- a

[PATCHv5 7/9] ASoC: dt-bindings: imx-audio-spdif: remove binding

2024-06-20 Thread Elinor Montmasson
imx-audio-spdif was merged into the fsl-asoc-card driver, and therefore removed. Signed-off-by: Elinor Montmasson --- .../bindings/sound/fsl,imx-audio-spdif.yaml | 66 --- 1 file changed, 66 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/fsl,imx-audio

[PATCHv5 6/9] ASoC: dt-bindings: fsl-asoc-card: add compatible string for spdif

2024-06-20 Thread Elinor Montmasson
The S/PDIF audio card support was merged from imx-spdif into the fsl-asoc-card driver, making it possible to use an S/PDIF with an ASRC. Add the new compatible and update properties. Signed-off-by: Elinor Montmasson --- .../bindings/sound/fsl-asoc-card.yaml | 30 --- 1 fi

[PATCHv5 5/9] ASoC: fsl-asoc-card: merge spdif support from imx-spdif.c

2024-06-20 Thread Elinor Montmasson
The imx-spdif machine driver creates audio card to directly use an S/PDIF device. However, it doesn't support interacting with an ASRC. fsl-asoc-card already has the support to create audio card which can use the ASRC. Merge the S/PDIF support from imx-spdif into fsl-asoc-card to extend the suppor

[PATCHv5 4/9] ASoC: fsl-asoc-card: add compatibility to use 2 codecs in dai-links

2024-06-20 Thread Elinor Montmasson
Adapt the driver to work with configurations using two codecs or more. Modify fsl_asoc_card_probe() to handle use cases where 2 codecs are given in the device tree. This will be needed to add support for the SPDIF. Use cases using one codec will ignore any given codecs other than the first. Co-de

[PATCHv5 3/9] ASoC: fsl-asoc-card: add second dai link component for codecs

2024-06-20 Thread Elinor Montmasson
Add a second dai link component for codecs that will be used for use cases with 2 codecs. It is needed for future integration of the SPDIF support, which will use spdif_receiver and spdif_transmitter drivers. To prevent deferring in use cases using only one codec, also set by default the number of

[PATCHv5 2/9] ASoC: fsl-asoc-card: add support for dai links with multiple codecs

2024-06-20 Thread Elinor Montmasson
Add support for dai links using multiple codecs for multi-codec use cases. Co-developed-by: Philip-Dylan Gleonec Signed-off-by: Philip-Dylan Gleonec Signed-off-by: Elinor Montmasson --- sound/soc/fsl/fsl-asoc-card.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) d

[PATCHv5 1/9] ASoC: fsl-asoc-card: set priv->pdev before using it

2024-06-20 Thread Elinor Montmasson
priv->pdev pointer was set after being used in fsl_asoc_card_audmux_init(). Move this assignment at the start of the probe function, so sub-functions can correctly use pdev through priv. fsl_asoc_card_audmux_init() dereferences priv->pdev to get access to the dev struct, used with dev_err macros.

[PATCHv5 0/9] ASoC: fsl-asoc-card: add S/PDIF controller

2024-06-20 Thread Elinor Montmasson
Hello, This is the v5 of the series of patches aiming to make the machine driver `fsl-asoc-card` compatible with S/PDIF controllers on imx boards. The main goal is to allow the use of S/PDIF controllers with ASRC modules. The `imx-spdif` machine driver already has specific support for S/PDIF cont

Re: [PATCH v2 0/1] powerpc/numa: Make cpu/memory less numa-node online

2024-06-20 Thread Michael Ellerman
On Fri, 17 May 2024 19:55:21 +0530, Nilay Shroff wrote: > On NUMA aware system, we make a numa-node online only if that node is > attached to cpu/memory. However it's possible that we have some PCI/IO > device affinitized to a numa-node which is not currently online. In such > case we set the numa-

Re: [PATCH] powerpc/mm/drmem: Silence drmem_init() early return

2024-06-20 Thread Michael Ellerman
On Mon, 03 Jun 2024 14:31:32 -0500, Nathan Lynch wrote: > It's not an error or noteworthy condition if the > "ibm,dynamic-reconfiguration-memory" node isn't present. > > Drop the needless message. > > Applied to powerpc/next. [1/1] powerpc/mm/drmem: Silence drmem_init() early return http

Re: [PATCH v6] powerpc/pseries/vas: Use usleep_range() to support HCALL delay

2024-06-20 Thread Michael Ellerman
On Mon, 15 Jan 2024 21:59:10 -0800, Haren Myneni wrote: > VAS allocate, modify and deallocate HCALLs returns > H_LONG_BUSY_ORDER_1_MSEC or H_LONG_BUSY_ORDER_10_MSEC for busy > delay and expects OS to reissue HCALL after that delay. But using > msleep() will often sleep at least 20 msecs even though

Re: [PATCH] powerpc/pseries/iommu: Split Dynamic DMA Window to be used in Hybrid mode

2024-06-20 Thread Michael Ellerman
On Mon, 13 May 2024 20:46:08 -0500, Gaurav Batra wrote: > Dynamic DMA Window (DDW) supports TCEs that are backed by 2MB page size. > In most configurations, DDW is big enough to pre-map all of LPAR memory > for IO. Pre-mapping of memory for DMA results in improvements in IO > performance. > > Pers

Re: [PATCH v2] arch/powerpc: Remove unused cede related functions

2024-06-20 Thread Michael Ellerman
On Tue, 14 May 2024 18:54:55 +0530, Gautam Menghani wrote: > Remove extended_cede_processor() and its helpers as > extended_cede_processor() has no callers since > commit 48f6e7f6d948("powerpc/pseries: remove cede offline state for CPUs") > > Applied to powerpc/next. [1/1] arch/powerpc: Remove

Re: (subset) [PATCH 0/6] defconfig: drop RT_GROUP_SCHED=y

2024-06-20 Thread Michael Ellerman
On Thu, 30 May 2024 19:19:48 +0800, Celeste Liu wrote: > For cgroup v1, if turned on, and there's any cgroup in the "cpu" hierarchy it > needs an RT budget assigned, otherwise the processes in it will not be able to > get RT at all. The problem with RT group scheduling is that it requires the > bud

Re: [PATCH] powerpc/crypto: Add generated P8 asm to .gitignore

2024-06-20 Thread Michael Ellerman
On Mon, 03 Jun 2024 08:01:03 -0500, Nathan Lynch wrote: > Looks like drivers/crypto/vmx/.gitignore should have been merged into > arch/powerpc/crypto/.gitignore as part of commit > 109303336a0c ("crypto: vmx - Move to arch/powerpc/crypto") so that all > generated asm files are ignored. > > Appli

  1   2   >