Re: [PATCH] powerpc/ps3: Use str_write_read() in ps3stor_read_write_sectors()

2025-08-19 Thread Geert Uytterhoeven
On Wed, 20 Aug 2025 at 07:26, Thorsten Blum wrote: > Remove hard-coded strings by using the str_write_read() helper function > and silence the following Coccinelle/coccicheck warning reported by > string_choices.cocci: > > opportunity for str_write_read(write) > > Signed-off-by: Thorsten Blum

[PATCH v3 07/12] arch/powerpc: don't initialize kasan if it's disabled

2025-08-19 Thread Baoquan He
This includes 32bit, book3s/64 and book3e/64. And also add code to enable kasan_flag_enabled, this is for later usage. Signed-off-by: Baoquan He Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/mm/kasan/init_32.c| 8 +++- arch/powerpc/mm/kasan/init_book3e_64.c | 6 ++ arch/pow

[PATCH] ASoC: imx-hdmi: remove cpu_pdev related code

2025-08-19 Thread Shengjiu Wang
If a defer probe happens for the cpu device, the return value for cpu_pdev "ret = -EINVAL" breaks defer probe. As the cpus->dai_name can be replaced by cpus->of_node, to simplify the code, remove related code for cpu_pdev. Fixes: 6a5f850aa83a ("ASoC: fsl: Add imx-hdmi machine driver") Signed-off-b

[PATCH] selftests/powerpc: fix spelling errors across test sources

2025-08-19 Thread Nikil Paul S
Fix a number of minor spelling mistakes in selftests/powerpc sources, including ptrace, tm, pmu, math, alignment, and gzip tests. These changes improve readability of test messages and comments without affecting functionality as only comments were edited. Signed-off-by: Nikil Paul S --- .../self

[PATCH] macintosh/mac_hid: fix race condition in mac_hid_toggle_emumouse

2025-08-19 Thread leo . lilong
From: Long Li The following warning appears when running syzkaller, and this issue also exists in the mainline code. [ cut here ] list_add double add: new=a57eee28, prev=a57eee28, next=a5e63100. WARNING: CPU: 0 PID: 1491 at lib/list_debug.c:35

[PATCH] selftests/powerpc: fix typos in tm

2025-08-19 Thread Rakuram Eswaran
Fixed multiple typos in powerpc/tm reported by Codespell Signed-off-by: Rakuram Eswaran --- tools/testing/selftests/powerpc/tm/tm-signal-msr-resv.c | 2 +- tools/testing/selftests/powerpc/tm/tm-signal-stack.c| 4 ++-- tools/testing/selftests/powerpc/tm/tm-sigreturn.c | 2 +- tools/test

Re: [PATCH v3 1/1] dt-bindings: soc: add vf610 reboot syscon controller

2025-08-19 Thread Rob Herring (Arm)
On Tue, 19 Aug 2025 12:53:16 -0400, Frank Li wrote: > Add vf610 reboot controller, which used to reboot whole system. Fix below > CHECK_DTB warnings: > > arch/arm/boot/dts/nxp/vf/vf610-bk4.dtb: /soc/bus@4000/src@4006e000: > failed to match any schema with compatible: ['fsl,vf610-src', 's

Re: [PATCH v4 16/16] nvme-pci: unmap MMIO pages with appropriate interface

2025-08-19 Thread Keith Busch
On Tue, Aug 19, 2025 at 08:37:00PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Block layer maps MMIO memory through dma_map_phys() interface > with help of DMA_ATTR_MMIO attribute. There is a need to unmap > that memory with the appropriate unmap function, something which > wasn't p

Re: [PATCH v2 1/4] soc: fsl: qmc: Only set completion interrupt when needed

2025-08-19 Thread Christophe Leroy
Hi Hervé, Le 14/08/2025 à 09:34, Herve Codina a écrit : Hi Christophe, On Wed, 13 Aug 2025 12:06:51 +0200 Herve Codina wrote: Hi Christophe, On Tue, 12 Aug 2025 12:50:55 +0200 Christophe Leroy wrote: When no post-completion processing is expected, don't waste time handling useless interr

Re: [PATCH v4 14/16] block-dma: migrate to dma_map_phys instead of map_page

2025-08-19 Thread Leon Romanovsky
On Tue, Aug 19, 2025, at 20:20, Keith Busch wrote: > On Tue, Aug 19, 2025 at 08:36:58PM +0300, Leon Romanovsky wrote: >> static bool blk_dma_map_direct(struct request *req, struct device *dma_dev, >> struct blk_dma_iter *iter, struct phys_vec *vec) >> { >> -iter->addr = dma_ma

Re: [PATCH v4 15/16] block-dma: properly take MMIO path

2025-08-19 Thread Keith Busch
On Tue, Aug 19, 2025 at 08:36:59PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Make sure that CPU is not synced and IOMMU is configured to take > MMIO path by providing newly introduced DMA_ATTR_MMIO attribute. We may have a minor patch conflict here with my unmerged dma metadata s

Re: [PATCH v4 11/16] dma-mapping: export new dma_*map_phys() interface

2025-08-19 Thread Keith Busch
On Tue, Aug 19, 2025 at 08:36:55PM +0300, Leon Romanovsky wrote: > From: Leon Romanovsky > > Introduce new DMA mapping functions dma_map_phys() and dma_unmap_phys() > that operate directly on physical addresses instead of page+offset > parameters. This provides a more efficient interface for driv

Re: [PATCH v4 14/16] block-dma: migrate to dma_map_phys instead of map_page

2025-08-19 Thread Keith Busch
On Tue, Aug 19, 2025 at 08:36:58PM +0300, Leon Romanovsky wrote: > static bool blk_dma_map_direct(struct request *req, struct device *dma_dev, > struct blk_dma_iter *iter, struct phys_vec *vec) > { > - iter->addr = dma_map_page(dma_dev, phys_to_page(vec->paddr), > -

[PATCH v4 01/16] dma-mapping: introduce new DMA attribute to indicate MMIO memory

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky This patch introduces the DMA_ATTR_MMIO attribute to mark DMA buffers that reside in memory-mapped I/O (MMIO) regions, such as device BARs exposed through the host bridge, which are accessible for peer-to-peer (P2P) DMA. This attribute is especially useful for exporting dev

Re: [PATCH 19/19] perf: Garbage-collect event_init checks

2025-08-19 Thread Robin Murphy
On 19/08/2025 3:44 am, kernel test robot wrote: Hello, kernel test robot noticed "BUG:unable_to_handle_page_fault_for_address" on: commit: 1ba20479196e5af3ebbedf9321de6b26f2a0cdd3 ("[PATCH 19/19] perf: Garbage-collect event_init checks") url: https://github.com/intel-lab-lkp/linux/commits/R

[PATCH v4 00/16] dma-mapping: migrate to physical address-based API

2025-08-19 Thread Leon Romanovsky
Changelog: v4: * Fixed kbuild error with mismatch in kmsan function declaration due to rebase error. v3: https://lore.kernel.org/all/cover.1755193625.git.l...@kernel.org * Fixed typo in "cacheable" word * Simplified kmsan patch a lot to be simple argument refactoring v2: https://lore.kernel.o

[PATCH v4 10/16] xen: swiotlb: Open code map_resource callback

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky General dma_direct_map_resource() is going to be removed in next patch, so simply open-code it in xen driver. Reviewed-by: Juergen Gross Signed-off-by: Leon Romanovsky --- drivers/xen/swiotlb-xen.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(

[PATCH v4 06/16] iommu/dma: extend iommu_dma_*map_phys API to handle MMIO memory

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky Combine iommu_dma_*map_phys with iommu_dma_*map_resource interfaces in order to allow single phys_addr_t flow. In the following patches, the iommu_dma_map_resource() will be removed in favour of iommu_dma_map_phys(..., attrs | DMA_ATTR_MMIO) flow. Signed-off-by: Leon Roman

[PATCH v4 16/16] nvme-pci: unmap MMIO pages with appropriate interface

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky Block layer maps MMIO memory through dma_map_phys() interface with help of DMA_ATTR_MMIO attribute. There is a need to unmap that memory with the appropriate unmap function, something which wasn't possible before adding new REQ attribute to block layer in previous patch. Si

[PATCH v4 12/16] mm/hmm: migrate to physical address-based DMA mapping API

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky Convert HMM DMA operations from the legacy page-based API to the new physical address-based dma_map_phys() and dma_unmap_phys() functions. This demonstrates the preferred approach for new code that should use physical addresses directly rather than page+offset parameters. T

[PATCH v4 15/16] block-dma: properly take MMIO path

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky Make sure that CPU is not synced and IOMMU is configured to take MMIO path by providing newly introduced DMA_ATTR_MMIO attribute. Signed-off-by: Leon Romanovsky --- block/blk-mq-dma.c | 13 +++-- include/linux/blk-mq-dma.h | 6 +- include/linux/blk_ty

[PATCH v4 13/16] mm/hmm: properly take MMIO path

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky In case peer-to-peer transaction traverses through host bridge, the IOMMU needs to have IOMMU_MMIO flag, together with skip of CPU sync. The latter was handled by provided DMA_ATTR_SKIP_CPU_SYNC flag, but IOMMU flag was missed, due to assumption that such memory can be trea

[PATCH v4 14/16] block-dma: migrate to dma_map_phys instead of map_page

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky After introduction of dma_map_phys(), there is no need to convert from physical address to struct page in order to map page. So let's use it directly. Signed-off-by: Leon Romanovsky --- block/blk-mq-dma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

[PATCH v4 07/16] dma-mapping: convert dma_direct_*map_page to be phys_addr_t based

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky Convert the DMA direct mapping functions to accept physical addresses directly instead of page+offset parameters. The functions were already operating on physical addresses internally, so this change eliminates the redundant page-to-physical conversion at the API boundary.

[PATCH v4 09/16] dma-mapping: handle MMIO flow in dma_map|unmap_page

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky Extend base DMA page API to handle MMIO flow and follow existing dma_map_resource() implementation to rely on dma_map_direct() only to take DMA direct path. Signed-off-by: Leon Romanovsky --- kernel/dma/mapping.c | 26 +- 1 file changed, 21 inserti

[PATCH v4 08/16] kmsan: convert kmsan_handle_dma to use physical addresses

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky Convert the KMSAN DMA handling function from page-based to physical address-based interface. The refactoring renames kmsan_handle_dma() parameters from accepting (struct page *page, size_t offset, size_t size) to (phys_addr_t phys, size_t size). The existing semantics where

[PATCH v4 11/16] dma-mapping: export new dma_*map_phys() interface

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky Introduce new DMA mapping functions dma_map_phys() and dma_unmap_phys() that operate directly on physical addresses instead of page+offset parameters. This provides a more efficient interface for drivers that already have physical addresses available. The new functions are

[PATCH v4 05/16] iommu/dma: rename iommu_dma_*map_page to iommu_dma_*map_phys

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky Rename the IOMMU DMA mapping functions to better reflect their actual calling convention. The functions iommu_dma_map_page() and iommu_dma_unmap_page() are renamed to iommu_dma_map_phys() and iommu_dma_unmap_phys() respectively, as they already operate on physical addresses

[PATCH v4 04/16] dma-mapping: rename trace_dma_*map_page to trace_dma_*map_phys

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky As a preparation for following map_page -> map_phys API conversion, let's rename trace_dma_*map_page() to be trace_dma_*map_phys(). Signed-off-by: Leon Romanovsky --- include/trace/events/dma.h | 4 ++-- kernel/dma/mapping.c | 4 ++-- 2 files changed, 4 insertions(+

[PATCH v4 02/16] iommu/dma: implement DMA_ATTR_MMIO for dma_iova_link().

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky This will replace the hacky use of DMA_ATTR_SKIP_CPU_SYNC to avoid touching the possibly non-KVA MMIO memory. Also correct the incorrect caching attribute for the IOMMU, MMIO memory should not be cachable inside the IOMMU mapping or it can possibly create system problems. S

[PATCH v4 03/16] dma-debug: refactor to use physical addresses for page mapping

2025-08-19 Thread Leon Romanovsky
From: Leon Romanovsky Convert the DMA debug infrastructure from page-based to physical address-based mapping as a preparation to rely on physical address for DMA mapping routines. The refactoring renames debug_dma_map_page() to debug_dma_map_phys() and changes its signature to accept a phys_addr

[PATCH] powerpc/ps3: Use str_write_read() in ps3stor_read_write_sectors()

2025-08-19 Thread Thorsten Blum
Remove hard-coded strings by using the str_write_read() helper function and silence the following Coccinelle/coccicheck warning reported by string_choices.cocci: opportunity for str_write_read(write) Signed-off-by: Thorsten Blum --- drivers/ps3/ps3stor_lib.c | 3 ++- 1 file changed, 2 inserti

[PATCH v3 1/1] dt-bindings: soc: add vf610 reboot syscon controller

2025-08-19 Thread Frank Li
Add vf610 reboot controller, which used to reboot whole system. Fix below CHECK_DTB warnings: arch/arm/boot/dts/nxp/vf/vf610-bk4.dtb: /soc/bus@4000/src@4006e000: failed to match any schema with compatible: ['fsl,vf610-src', 'syscon'] IC reference manual calls it as system reset controller

[PATCH v3 4/4] ASoc: fsl: fsl_qmc_audio: Drop struct qmc_dai_chan

2025-08-19 Thread Christophe Leroy
prtd_tx and prtd_rx members are not used anymore and only qmc_chan member remains so struct qmc_dai_chan has become pointless. Use qmc_chan directly and drop struct qmc_dai_chan. Signed-off-by: Christophe Leroy Acked-by: Herve Codina --- sound/soc/fsl/fsl_qmc_audio.c | 52 ++---

[PATCH v2 2/5] soc: fsl: qe: Change GPIO driver to a proper platform driver

2025-08-19 Thread Christophe Leroy
In order to be able to add interrupts to the GPIOs, first change the QE GPIO driver to the proper platform driver in order to allow initialisation to be done in the right order, otherwise the GPIOs get added before the interrupts are registered. Signed-off-by: Christophe Leroy Reviewed-by: Bartos

Re: [PATCH 19/19] perf: Garbage-collect event_init checks

2025-08-19 Thread Robin Murphy
On 13/08/2025 6:01 pm, Robin Murphy wrote: [...] diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c index 297ff5adb667..98ffab403bb4 100644 --- a/arch/x86/events/intel/uncore.c +++ b/arch/x86/events/intel/uncore.c @@ -731,24 +731,11 @@ static int uncore_pmu_event_init(st

Re: [RESEND v2 1/1] dt-bindings: soc: add vf610 reboot syscon controller

2025-08-19 Thread Rob Herring
On Mon, Aug 18, 2025 at 02:34:26PM -0400, Frank Li wrote: > Add vf610 reboot controller, which used to reboot whole system. Fix below > CHECK_DTB warnings: > > arch/arm/boot/dts/nxp/vf/vf610-bk4.dtb: /soc/bus@4000/src@4006e000: > failed to match any schema with compatible: ['fsl,vf610-src'

Re: [PATCH 18/19] perf: Introduce positive capability for raw events

2025-08-19 Thread Robin Murphy
On 13/08/2025 6:01 pm, Robin Murphy wrote: Only a handful of CPU PMUs accept PERF_TYPE_{RAW,HARDWARE,HW_CACHE} events without registering themselves as PERF_TYPE_RAW in the first place. Add an explicit opt-in for these special cases, so that we can make life easier for every other driver (and pro

Re: [PATCH] gpio: mpc5200: Drop legacy-of-mm-gpiochip.h header

2025-08-19 Thread Linus Walleij
On Mon, Aug 18, 2025 at 2:42 PM Christophe Leroy wrote: > Remove legacy-of-mm-gpiochip.h header file. The above mentioned > file provides an OF API that's deprecated. There is no agnostic > alternatives to it and we have to open code the logic which was > hidden behind of_mm_gpiochip_add_data().

Re: [PATCH 1/2] powerpc/44x: Change GPIO driver to a proper platform driver

2025-08-19 Thread Linus Walleij
On Mon, Aug 18, 2025 at 2:17 PM Christophe Leroy wrote: > In order to drop legacy-of-mm-gpiochip dependency, first change the > 44x GPIO driver to a proper platform driver. > > Signed-off-by: Christophe Leroy Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [PATCH v2 2/4] ASoc: fsl: fsl_qmc_audio: Ensure audio channels are ordered in TDM bus

2025-08-19 Thread Christophe Leroy
Le 13/08/2025 à 12:06, Herve Codina a écrit : Hi Christophe, On Tue, 12 Aug 2025 12:50:56 +0200 Christophe Leroy wrote: ... @@ -879,6 +884,30 @@ static int qmc_audio_dai_parse(struct qmc_audio *qmc_audio, struct device_node * return -EINVAL;

[PATCH v2 4/5] soc: fsl: qe: Add support of IRQ in QE GPIO

2025-08-19 Thread Christophe Leroy
In the QE, a few GPIOs are IRQ capable. Similarly to commit 726bd223105c ("powerpc/8xx: Adding support of IRQ in MPC8xx GPIO"), add IRQ support to QE GPIO. Add property 'fsl,qe-gpio-irq-mask' similar to 'fsl,cpm1-gpio-irq-mask' that define which of the GPIOs have IRQs. Here is an exemple for port