Re: [PATCH v2 00/17] Solve iommu probe races around iommu_fwspec

2023-11-21 Thread Jason Gunthorpe
On Tue, Nov 21, 2023 at 04:06:15PM +, Robin Murphy wrote: > > Obviously. I rejected that right away because of how incredibly > > wrongly layered and hacky it is to do something like that. > > What, and dressing up the fundamental layering violation by baking it even > further into the API

Re: [PATCH v2 00/17] Solve iommu probe races around iommu_fwspec

2023-11-21 Thread Robin Murphy
On 2023-11-16 4:17 am, Jason Gunthorpe wrote: On Wed, Nov 15, 2023 at 08:23:54PM +, Robin Murphy wrote: On 2023-11-15 3:36 pm, Jason Gunthorpe wrote: On Wed, Nov 15, 2023 at 03:22:09PM +, Robin Murphy wrote: On 2023-11-15 2:05 pm, Jason Gunthorpe wrote: [Several people have tested

Re: [PATCH v2 06/17] iommu: Add iommu_fwspec_alloc/dealloc()

2023-11-21 Thread Jason Gunthorpe
On Tue, Nov 21, 2023 at 03:47:48PM +0900, Hector Martin wrote: > > Which is sensitive only to !NULL fwspec, and if EPROBE_DEFER is > > returned fwspec will be freed and dev->iommu->fwspec will be NULL > > here. > > > > In the NULL case it does a 'bus probe' with a NULL fwspec and all the > >

Re: [PATCH 20/22] usb: fsl-mph-dr-of: mark fsl_usb2_mpc5121_init() static

2023-11-21 Thread Greg Kroah-Hartman
On Wed, Nov 08, 2023 at 01:58:41PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > This function is only called locally and should always have been static: > > drivers/usb/host/fsl-mph-dr-of.c:291:5: error: no previous prototype for > 'fsl_usb2_mpc5121_init' [-Werror=missing-prototypes]

[PATCH v3 5/5] arch,locking/atomic: xtensa: define arch_cmpxchg_local as __cmpxchg_local

2023-11-21 Thread wuqiang.matt
The xtensa architecture already has __cmpxchg_local defined but not used. The purpose of __cmpxchg_local() is solely for arch_cmpxchg_local(), just as the definition of arch_cmpxchg_local() for other architectures like x86, arm and powerpc. Signed-off-by: wuqiang.matt ---

[PATCH v3 4/5] arch,locking/atomic: hexagon: add arch_cmpxchg[64]_local

2023-11-21 Thread wuqiang.matt
hexagonc hasn't arch_cmpxhg_local implemented, which causes building failures for any references of try_cmpxchg_local, reported by the kernel test robot. This patch implements arch_cmpxchg[64]_local with the native cmpxchg variant if the corresponding data size is supported, otherwise

[PATCH v3 3/5] arch,locking/atomic: openrisc: add arch_cmpxchg[64]_local

2023-11-21 Thread wuqiang.matt
openrisc hasn't arch_cmpxhg_local implemented, which causes building failures for any references of try_cmpxchg_local, reported by the kernel test robot. This patch implements arch_cmpxchg[64]_local with the native cmpxchg variant if the corresponding data size is supported, otherwise

[PATCH v3 2/5] arch,locking/atomic: arc: add arch_cmpxchg[64]_local

2023-11-21 Thread wuqiang.matt
arc doesn't have arch_cmpxhg_local implemented, which causes building failures for any references of try_cmpxchg_local, reported by the kernel test robot. This patch implements arch_cmpxchg[64]_local with the native cmpxchg variant if the corresponding data size is supported, otherwise

[PATCH v3 1/5] arch,locking/atomic: arc: arch_cmpxchg should check data size

2023-11-21 Thread wuqiang.matt
arch_cmpxchg() should check data size rather than pointer size in case CONFIG_ARC_HAS_LLSC is defined. So rename __cmpxchg to __cmpxchg_32 to emphasize it's explicit support of 32bit data size with BUILD_BUG_ON() added to avoid any possible misuses with unsupported data types. In case

[PATCH v3 0/5] arch,locking/atomic: add arch_cmpxchg[64]_local

2023-11-21 Thread wuqiang.matt
Archtectures arc, openrisc and hexagon haven't arch_cmpxchg_local() defined, so the usecase of try_cmpxchg_local() in lib/objpool.c can not pass kernel building by the kernel test robot. Patch 1 improves the data size checking logic for arc; Patches 2/3/4 implement arch_cmpxchg[64]_local for