Re: [PATCH] char: tpm: Prepare cleanup of powerpc's asm/prom.h

2022-04-03 Thread Jarkko Sakkinen
On Sat, Apr 02, 2022 at 12:29:19PM +0200, Christophe Leroy wrote: > powerpc's asm/prom.h brings some headers that it doesn't > need itself. > > In order to clean it up, first add missing headers in > users of asm/prom.h > > Signed-off-by: Christophe Leroy I don't understand this. It changes not

Re: [PATCH] [Rebased for 5.4] powerpc/kasan: Fix early region not updated correctly

2022-04-03 Thread Greg KH
On Sat, Apr 02, 2022 at 06:13:31PM +0200, Christophe Leroy wrote: > From: Chen Jingwen > > This is backport for 5.4 > > Upstream commit 5647a94a26e352beed61788b46e035d9d12664cd This is not a commit in Linus's tree :(

Re: [PATCH] [Rebased for 5.4] powerpc/kasan: Fix early region not updated correctly

2022-04-03 Thread Christophe Leroy
Le 03/04/2022 à 12:25, Greg KH a écrit : > On Sat, Apr 02, 2022 at 06:13:31PM +0200, Christophe Leroy wrote: >> From: Chen Jingwen >> >> This is backport for 5.4 >> >> Upstream commit 5647a94a26e352beed61788b46e035d9d12664cd > > This is not a commit in Linus's tree :( > Oops. Don't know what

[PATCH] soc: fsl: qe: Fix refcount leak in par_io_of_config

2022-04-03 Thread Miaoqian Lin
The device_node pointer is returned by of_parse_phandle() with refcount incremented. We should use of_node_put() on it when done. This function only calls of_node_put() in the regular path. And it will cause refcount leak in error path. Fixes: 986585385131 ("[POWERPC] Add QUICC Engine (QE) infrast

Re: [PATCH] [Rebased for 5.4] powerpc/kasan: Fix early region not updated correctly

2022-04-03 Thread Greg KH
On Sun, Apr 03, 2022 at 11:54:55AM +, Christophe Leroy wrote: > > > Le 03/04/2022 à 12:25, Greg KH a écrit : > > On Sat, Apr 02, 2022 at 06:13:31PM +0200, Christophe Leroy wrote: > >> From: Chen Jingwen > >> > >> This is backport for 5.4 > >> > >> Upstream commit 5647a94a26e352beed61788b46e0

[PATCH] [Rebased for 5.4] powerpc/kasan: Fix early region not updated correctly

2022-04-03 Thread Christophe Leroy
From: Chen Jingwen This is backport for 5.4 Upstream commit dd75080aa8409ce10d50fb58981c6b59bf8707d3 The shadow's page table is not updated when PTE_RPN_SHIFT is 24 and PAGE_SHIFT is 12. It not only causes false positives but also false negative as shown the following text. Fix it by bringing

Re: [PATCH] powerpc/85xx: Remove fsl,85... bindings

2022-04-03 Thread Michael Ellerman
Borislav Petkov writes: > On Thu, Mar 31, 2022 at 12:13:10PM +0200, Christophe Leroy wrote: >> Since commit 8a4ab218ef70 ("powerpc/85xx: Change deprecated binding >> for 85xx-based boards"), those bindings are not used anymore. >> >> A comment in drivers/edac/mpc85xx_edac.c say they are to be rem

[PATCH 03/15] swiotlb: simplify swiotlb_max_segment

2022-04-03 Thread Christoph Hellwig
Remove the bogus Xen override that was usually larger than the actual size and just calculate the value on demand. Note that swiotlb_max_segment still doesn't make sense as an interface and should eventually be removed. Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual --- driver

cleanup swiotlb initialization v8

2022-04-03 Thread Christoph Hellwig
Hi all, this series tries to clean up the swiotlb initialization, including that of swiotlb-xen. To get there is also removes the x86 iommu table infrastructure that massively obsfucates the initialization path. Git tree: git://git.infradead.org/users/hch/misc.git swiotlb-init-cleanup Gitw

[PATCH 01/15] dma-direct: use is_swiotlb_active in dma_direct_map_page

2022-04-03 Thread Christoph Hellwig
Use the more specific is_swiotlb_active check instead of checking the global swiotlb_force variable. Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual --- kernel/dma/direct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/direct.h b/kernel/dma/direc

[PATCH 02/15] swiotlb: make swiotlb_exit a no-op if SWIOTLB_FORCE is set

2022-04-03 Thread Christoph Hellwig
If force bouncing is enabled we can't release the buffers. Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual --- kernel/dma/swiotlb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index 73a41cec9e386..98bb0eb44a7bf 100644 --- a/

[PATCH 04/15] swiotlb: rename swiotlb_late_init_with_default_size

2022-04-03 Thread Christoph Hellwig
swiotlb_late_init_with_default_size is an overly verbose name that doesn't even catch what the function is doing, given that the size is not just a default but the actual requested size. Rename it to swiotlb_init_late. Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual --- arch/x8

[PATCH 05/15] arm/xen: don't check for xen_initial_domain() in xen_create_contiguous_region

2022-04-03 Thread Christoph Hellwig
From: Stefano Stabellini It used to be that Linux enabled swiotlb-xen when running a dom0 on ARM. Since f5079a9a2a31 "xen/arm: introduce XENFEAT_direct_mapped and XENFEAT_not_direct_mapped", Linux detects whether to enable or disable swiotlb-xen based on the new feature flags: XENFEAT_direct_mapp

[PATCH 06/15] MIPS/octeon: use swiotlb_init instead of open coding it

2022-04-03 Thread Christoph Hellwig
Use the generic swiotlb initialization helper instead of open coding it. Signed-off-by: Christoph Hellwig Acked-by: Thomas Bogendoerfer --- arch/mips/cavium-octeon/dma-octeon.c | 15 ++- arch/mips/pci/pci-octeon.c | 2 +- 2 files changed, 3 insertions(+), 14 deletions(-)

[PATCH 07/15] x86: remove the IOMMU table infrastructure

2022-04-03 Thread Christoph Hellwig
The IOMMU table tries to separate the different IOMMUs into different backends, but actually requires various cross calls. Rewrite the code to do the generic swiotlb/swiotlb-xen setup directly in pci-dma.c and then just call into the IOMMU drivers. Signed-off-by: Christoph Hellwig --- arch/ia64

[PATCH 08/15] x86: centralize setting SWIOTLB_FORCE when guest memory encryption is enabled

2022-04-03 Thread Christoph Hellwig
Move enabling SWIOTLB_FORCE for guest memory encryption into common code. Signed-off-by: Christoph Hellwig --- arch/x86/kernel/cpu/mshyperv.c | 8 arch/x86/kernel/pci-dma.c | 8 arch/x86/mm/mem_encrypt_amd.c | 3 --- 3 files changed, 8 insertions(+), 11 deletions(-) diff

[PATCH 10/15] swiotlb: add a SWIOTLB_ANY flag to lift the low memory restriction

2022-04-03 Thread Christoph Hellwig
Power SVM wants to allocate a swiotlb buffer that is not restricted to low memory for the trusted hypervisor scheme. Consolidate the support for this into the swiotlb_init interface by adding a new flag. Signed-off-by: Christoph Hellwig --- arch/powerpc/include/asm/svm.h | 4 arch/p

[PATCH 09/15] swiotlb: make the swiotlb_init interface more useful

2022-04-03 Thread Christoph Hellwig
Pass a bool to pass if swiotlb needs to be enabled based on the addressing needs and replace the verbose argument with a set of flags, including one to force enable bounce buffering. Note that this patch removes the possibility to force xen-swiotlb use using swiotlb=force on the command line on x8

[PATCH 11/15] swiotlb: pass a gfp_mask argument to swiotlb_init_late

2022-04-03 Thread Christoph Hellwig
Let the caller chose a zone to allocate from. This will be used later on by the xen-swiotlb initialization on arm. Signed-off-by: Christoph Hellwig Reviewed-by: Anshuman Khandual --- arch/x86/pci/sta2x11-fixup.c | 2 +- include/linux/swiotlb.h | 2 +- kernel/dma/swiotlb.c | 7 ++--

[PATCH 12/15] swiotlb: provide swiotlb_init variants that remap the buffer

2022-04-03 Thread Christoph Hellwig
To shared more code between swiotlb and xen-swiotlb, offer a swiotlb_init_remap interface and add a remap callback to swiotlb_init_late that will allow Xen to remap the buffer the buffer without duplicating much of the logic. Signed-off-by: Christoph Hellwig --- arch/x86/pci/sta2x11-fixup.c | 2

[PATCH 13/15] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-04-03 Thread Christoph Hellwig
Reuse the generic swiotlb initialization for xen-swiotlb. For ARM/ARM64 this works trivially, while for x86 xen_swiotlb_fixup needs to be passed as the remap argument to swiotlb_init_remap/swiotlb_init_late. Note that the lower bound of the swiotlb size is changed to the smaller IO_TLB_MIN_SLABS

[PATCH 14/15] swiotlb: remove swiotlb_init_with_tbl and swiotlb_init_late_with_tbl

2022-04-03 Thread Christoph Hellwig
No users left. Signed-off-by: Christoph Hellwig --- include/linux/swiotlb.h | 2 -- kernel/dma/swiotlb.c| 77 +++-- 2 files changed, 20 insertions(+), 59 deletions(-) diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 7b50c82f84ce9..7ed

[PATCH 15/15] x86: remove cruft from

2022-04-03 Thread Christoph Hellwig
gets pulled in by all drivers using the DMA API. Remove x86 internal variables and unnecessary includes from it. Signed-off-by: Christoph Hellwig --- arch/x86/include/asm/dma-mapping.h | 11 --- arch/x86/include/asm/iommu.h | 2 ++ 2 files changed, 2 insertions(+), 11 deletions(-

Re: [PATCH v8 00/14] Convert powerpc to default topdown mmap layout (v8)

2022-04-03 Thread Christophe Leroy
Hi Andrew, Le 11/03/2022 à 05:49, Andrew Morton a écrit : > On Fri, 11 Mar 2022 15:26:42 +1100 Michael Ellerman > wrote: > >>> What will be the merge strategy ? I guess it's a bit late to get it >>> through powerpc tree, so I was just wondering whether we could get >>> patches 2 to 5 in mm this

Re: [PATCH] cpufreq: Prepare cleanup of powerpc's asm/prom.h

2022-04-03 Thread Viresh Kumar
On 01-04-22, 19:24, Christophe Leroy wrote: > powerpc's asm/prom.h brings some headers that it doesn't > need itself. > > In order to clean it up, first add missing headers in > users of asm/prom.h > > Signed-off-by: Christophe Leroy > --- > drivers/cpufreq/pasemi-cpufreq.c | 1 - > driver

[powerpc:fixes-test] BUILD SUCCESS 7f921a2d6c93051b6002dbb7c1781f1fa5b88cce

2022-04-03 Thread kernel test robot
rsk7201_defconfig sh rts7751r2d1_defconfig arm pxa910_defconfig i386 randconfig-c001-20220404 x86_64 randconfig-c001-20220404 arm randconfig-c002-20220404 arm randconfig-c002-20220403 x86_64