Re: [PATCH] serial: Use of_property_read_bool() for boolean properties

2023-03-31 Thread Timur Tabi
On Fri, Mar 10, 2023 at 8:48 AM Rob Herring wrote: > > It is preferred to use typed property access functions (i.e. > of_property_read_ functions) rather than low-level > of_get_property/of_find_property functions for reading properties. > Convert reading boolean properties to to

Re: [PATCH 00/21] dma-mapping: unify support for cache flushes

2023-03-31 Thread Arnd Bergmann
On Fri, Mar 31, 2023, at 18:53, Catalin Marinas wrote: > On Mon, Mar 27, 2023 at 02:12:56PM +0200, Arnd Bergmann wrote: >> Another difference that I do not address here is what cache invalidation >> does for partical cache lines. On arm32, arm64 and powerpc, a partial >> cache line always gets

Re: [PATCH 20/21] ARM: dma-mapping: split out arch_dma_mark_clean() helper

2023-03-31 Thread Arnd Bergmann
On Fri, Mar 31, 2023, at 17:12, Robin Murphy wrote: > On 31/03/2023 3:00 pm, Arnd Bergmann wrote: >> On Mon, Mar 27, 2023, at 14:48, Robin Murphy wrote: >> >> To be on the safe side, I'd have to pass a flag into >> arch_dma_mark_clean() about coherency, to let the arm >> implementation still

Re: [PATCH 18/21] ARM: drop SMP support for ARM11MPCore

2023-03-31 Thread Catalin Marinas
On Mon, Mar 27, 2023 at 02:13:14PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > The cache management operations for noncoherent DMA on ARMv6 work > in two different ways: > > * When CONFIG_DMA_CACHE_RWFO is set, speculative prefetches on in-flight >DMA buffers lead to data

Re: [PATCH 00/21] dma-mapping: unify support for cache flushes

2023-03-31 Thread Catalin Marinas
On Mon, Mar 27, 2023 at 02:12:56PM +0200, Arnd Bergmann wrote: > Another difference that I do not address here is what cache invalidation > does for partical cache lines. On arm32, arm64 and powerpc, a partial > cache line always gets written back before invalidation in order to > ensure that data

Re: [PATCH 1/2] pseries/smp: export the smt level in the SYS FS.

2023-03-31 Thread Michal Suchánek
Hello, On Fri, Mar 31, 2023 at 05:39:04PM +0200, Laurent Dufour wrote: > There is no SMT level recorded in the kernel neither in user space. > Indeed there is no real constraint about that and mixed SMT levels are > allowed and system is working fine this way. > > However when new CPU are added,

Re: [PATCH 20/21] ARM: dma-mapping: split out arch_dma_mark_clean() helper

2023-03-31 Thread Russell King (Oracle)
On Fri, Mar 31, 2023 at 04:06:37PM +0200, Arnd Bergmann wrote: > On Mon, Mar 27, 2023, at 17:01, Russell King (Oracle) wrote: > > On Mon, Mar 27, 2023 at 02:13:16PM +0200, Arnd Bergmann wrote: > >> From: Arnd Bergmann > >> > >> The arm version of the arch_sync_dma_for_cpu() function annotates

[PATCH 0/2] Online new threads according to the current SMT level

2023-03-31 Thread Laurent Dufour
When a new CPU is added, the kernel is activating all its threads. This leads to weird, but functional, result when adding CPU on a SMT 4 system for instance. Here the newly added CPU 1 has 8 threads while the other one has 4 threads active (system has been booted with the 'smt-enabled=4' kernel

[PATCH 2/2] powerpc/pseries/cpuhp: respect current SMT when adding new CPU

2023-03-31 Thread Laurent Dufour
When a new CPU is added, the kernel is activating all its threads. This leads to weird, but functional, result when adding CPU on a SMT 4 system for instance. Here the newly added CPU 1 has 8 threads while the other one has 4 threads active (system has been booted with the 'smt-enabled=4' kernel

[PATCH 1/2] pseries/smp: export the smt level in the SYS FS.

2023-03-31 Thread Laurent Dufour
There is no SMT level recorded in the kernel neither in user space. Indeed there is no real constraint about that and mixed SMT levels are allowed and system is working fine this way. However when new CPU are added, the kernel is onlining all the threads which is leading to mixed SMT levels and

Re: [PATCH kernel] KVM: PPC: Make KVM_CAP_IRQFD_RESAMPLE platform dependent

2023-03-31 Thread Paolo Bonzini
Queued, thanks. Paolo

[PATCH v2 1/2] soc: fsl: qbman: Always disable interrupts when taking cgr_lock

2023-03-31 Thread Sean Anderson
smp_call_function_single disables IRQs when executing the callback. To prevent deadlocks, we must disable IRQs when taking cgr_lock elsewhere. This is already done by qman_update_cgr and qman_delete_cgr; fix the other lockers. Fixes: c535e923bb97 ("soc/fsl: Introduce DPAA 1.x QMan device driver")

[PATCH v2 2/2] soc: fsl: qbman: Use raw spinlock for cgr_lock

2023-03-31 Thread Sean Anderson
cgr_lock may be locked with interrupts already disabled by smp_call_function_single. As such, we must use a raw spinlock to avoid problems on PREEMPT_RT kernels. Although this bug has existed for a while, it was not apparent until commit ef2a8d5478b9 ("net: dpaa: Adjust queue depth on rate

Re: [PATCH 20/21] ARM: dma-mapping: split out arch_dma_mark_clean() helper

2023-03-31 Thread Robin Murphy
On 31/03/2023 3:00 pm, Arnd Bergmann wrote: On Mon, Mar 27, 2023, at 14:48, Robin Murphy wrote: On 2023-03-27 13:13, Arnd Bergmann wrote: [ HELP NEEDED: can anyone confirm that it is a correct assumption on arm that a cache-coherent device writing to a page always results in it being

Re: [PATCH] powerpc/pseries/cpuhp: respect current SMT when adding new CPU

2023-03-31 Thread Laurent Dufour
On 30/03/2023 18:19:38, Michal Suchánek wrote: > On Thu, Mar 30, 2023 at 05:51:57PM +0200, Laurent Dufour wrote: >> On 13/02/2023 16:40:50, Nathan Lynch wrote: >>> Michal Suchánek writes: On Mon, Feb 13, 2023 at 08:46:50AM -0600, Nathan Lynch wrote: > Laurent Dufour writes: >> When

Re: [PATCH 1/2] soc: fsl: qbman: Always disable interrupts when taking cgr_lock

2023-03-31 Thread Sean Anderson
On 3/31/23 06:58, Camelia Alexandra Groza wrote: >> -Original Message- >> From: Sean Anderson >> Sent: Monday, March 27, 2023 22:29 >> To: Leo Li ; linuxppc-dev@lists.ozlabs.org; linux-arm- >> ker...@lists.infradead.org >> Cc: Scott Wood ; linux-ker...@vger.kernel.org; David S . >> Miller

Re: [PATCH] ASoC: fsl_sai: Use physical format width

2023-03-31 Thread Mark Brown
On Fri, Mar 31, 2023 at 02:26:33PM +, Emil Abildgaard Svendsen wrote: > On 3/31/23 04:55, Shengjiu Wang wrote: > > There are different requirements for this slot width. Some need physical > > width, > > Some need format width. We need to be careful about change here. > I might be wrong but

Re: [PATCH] ASoC: fsl_sai: Use physical format width

2023-03-31 Thread Emil Abildgaard Svendsen
On 3/31/23 04:55, Shengjiu Wang wrote: > On Thu, Mar 30, 2023 at 4:30 PM Emil Abildgaard Svendsen < > e...@bang-olufsen.dk> wrote: > >> Slot width should follow the physical width of the format instead of the >> data width. >> >> This is needed for formats like SNDRV_PCM_FMTBIT_S24_LE where

Re: [PATCH 20/21] ARM: dma-mapping: split out arch_dma_mark_clean() helper

2023-03-31 Thread Arnd Bergmann
On Mon, Mar 27, 2023, at 17:01, Russell King (Oracle) wrote: > On Mon, Mar 27, 2023 at 02:13:16PM +0200, Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> The arm version of the arch_sync_dma_for_cpu() function annotates pages as >> PG_dcache_clean after a DMA, but no other architecture does

Re: [PATCH 20/21] ARM: dma-mapping: split out arch_dma_mark_clean() helper

2023-03-31 Thread Arnd Bergmann
On Mon, Mar 27, 2023, at 14:48, Robin Murphy wrote: > On 2023-03-27 13:13, Arnd Bergmann wrote: >> >> [ HELP NEEDED: can anyone confirm that it is a correct assumption >>on arm that a cache-coherent device writing to a page always results >>in it being in a PG_dcache_clean state like on

Re: [PATCH 21/21] dma-mapping: replace custom code with generic implementation

2023-03-31 Thread Arnd Bergmann
On Tue, Mar 28, 2023, at 00:25, Christoph Hellwig wrote: >> +static inline void arch_dma_cache_wback(phys_addr_t paddr, size_t size) >> { >> +dma_cache_wback(paddr, size); >> +} >> >> +static inline void arch_dma_cache_inv(phys_addr_t paddr, size_t size) >> +{ >> +dma_cache_inv(paddr,

Re: [PATCH 17/21] ARM: dma-mapping: use arch_sync_dma_for_{device,cpu}() internally

2023-03-31 Thread Arnd Bergmann
On Fri, Mar 31, 2023, at 11:10, Linus Walleij wrote: > On Mon, Mar 27, 2023 at 2:16 PM Arnd Bergmann wrote: > >> From: Arnd Bergmann >> >> The arm specific iommu code in dma-mapping.c uses the page+offset based >> __dma_page_cpu_to_dev()/__dma_page_dev_to_cpu() helpers in place of the >>

Re: [PATCH 15/21] ARM: dma-mapping: always invalidate WT caches before DMA

2023-03-31 Thread Arnd Bergmann
On Fri, Mar 31, 2023, at 13:08, Russell King (Oracle) wrote: > On Fri, Mar 31, 2023 at 12:38:45PM +0200, Arnd Bergmann wrote: >> On Fri, Mar 31, 2023, at 11:35, Russell King (Oracle) wrote: >> > On Fri, Mar 31, 2023 at 10:07:28AM +0100, Russell King (Oracle) wrote: >> >> On Mon, Mar 27, 2023 at

Re: [PATCH 15/21] ARM: dma-mapping: always invalidate WT caches before DMA

2023-03-31 Thread Russell King (Oracle)
On Fri, Mar 31, 2023 at 12:38:45PM +0200, Arnd Bergmann wrote: > On Fri, Mar 31, 2023, at 11:35, Russell King (Oracle) wrote: > > On Fri, Mar 31, 2023 at 10:07:28AM +0100, Russell King (Oracle) wrote: > >> On Mon, Mar 27, 2023 at 02:13:11PM +0200, Arnd Bergmann wrote: > >> > From: Arnd Bergmann >

RE: [PATCH 15/21] ARM: dma-mapping: always invalidate WT caches before DMA

2023-03-31 Thread David Laight
From: Arnd Bergmann > Sent: 31 March 2023 11:39 ... > Most architectures that have write-through caches (m68k, > microblaze) or write-back caches but no speculation (all other > armv4/armv5, hexagon, openrisc, sh, most mips, later xtensa) > only invalidate before DMA but not after. > > OTOH, most

RE: [PATCH 1/2] soc: fsl: qbman: Always disable interrupts when taking cgr_lock

2023-03-31 Thread Camelia Alexandra Groza
> -Original Message- > From: Sean Anderson > Sent: Monday, March 27, 2023 22:29 > To: Leo Li ; linuxppc-dev@lists.ozlabs.org; linux-arm- > ker...@lists.infradead.org > Cc: Scott Wood ; linux-ker...@vger.kernel.org; David S . > Miller ; Claudiu Manoil ; > Roy Pledge ; Vladimir Oltean > ;

Re: [PATCH] drm/amdgpu: drop the long-double-128 powerpc check/hack

2023-03-31 Thread Michael Ellerman
"Daniel Kolesa" writes: > Commit c653c591789b ("drm/amdgpu: Re-enable DCN for 64-bit powerpc") > introduced this check as a workaround for the driver not building > with toolchains that default to 64-bit long double. ... > In mainline, this work is now fully done, so this check is fully >

Re: [PATCH 15/21] ARM: dma-mapping: always invalidate WT caches before DMA

2023-03-31 Thread Arnd Bergmann
On Fri, Mar 31, 2023, at 11:35, Russell King (Oracle) wrote: > On Fri, Mar 31, 2023 at 10:07:28AM +0100, Russell King (Oracle) wrote: >> On Mon, Mar 27, 2023 at 02:13:11PM +0200, Arnd Bergmann wrote: >> > From: Arnd Bergmann >> > >> > Most ARM CPUs can have write-back caches and that require >>

Re: [PATCH 15/21] ARM: dma-mapping: always invalidate WT caches before DMA

2023-03-31 Thread Russell King (Oracle)
On Fri, Mar 31, 2023 at 10:07:28AM +0100, Russell King (Oracle) wrote: > On Mon, Mar 27, 2023 at 02:13:11PM +0200, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > Most ARM CPUs can have write-back caches and that require > > cache management to be done in the dma_sync_*_for_device() > >

Re: [PATCH 17/21] ARM: dma-mapping: use arch_sync_dma_for_{device,cpu}() internally

2023-03-31 Thread Linus Walleij
On Mon, Mar 27, 2023 at 2:16 PM Arnd Bergmann wrote: > From: Arnd Bergmann > > The arm specific iommu code in dma-mapping.c uses the page+offset based > __dma_page_cpu_to_dev()/__dma_page_dev_to_cpu() helpers in place of the > phys_addr_t based arch_sync_dma_for_device()/arch_sync_dma_for_cpu()

Re: [PATCH 15/21] ARM: dma-mapping: always invalidate WT caches before DMA

2023-03-31 Thread Russell King (Oracle)
On Mon, Mar 27, 2023 at 02:13:11PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > Most ARM CPUs can have write-back caches and that require > cache management to be done in the dma_sync_*_for_device() > operation. This is typically done in both writeback and > writethrough mode. > > The

Re: [PATCH 15/21] ARM: dma-mapping: always invalidate WT caches before DMA

2023-03-31 Thread Linus Walleij
On Mon, Mar 27, 2023 at 2:16 PM Arnd Bergmann wrote: > From: Arnd Bergmann > > Most ARM CPUs can have write-back caches and that require > cache management to be done in the dma_sync_*_for_device() > operation. This is typically done in both writeback and > writethrough mode. > > The cache-v4.S