Re: [PATCH V3 09/30] arm/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-03-01 Thread Christophe Leroy
Le 02/03/2022 à 04:22, Anshuman Khandual a écrit : > > > On 3/1/22 1:46 PM, Christophe Leroy wrote: >> >> >> Le 01/03/2022 à 01:31, Russell King (Oracle) a écrit : >>> On Tue, Mar 01, 2022 at 05:30:41AM +0530, Anshuman Khandual wrote: On 2/28/22 4:27 PM, Russell King (Oracle) wrote: >

Re: [PATCH V3 04/30] powerpc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-03-01 Thread Michael Ellerman
Anshuman Khandual writes: > This defines and exports a platform specific custom vm_get_page_prot() via > subscribing ARCH_HAS_VM_GET_PAGE_PROT. Subsequently all __SXXX and __PXXX > macros can be dropped which are no longer needed. While here, this also > localizes arch_vm_get_page_prot() as

[PATCH 12/12] powerpc: wiiu: Add minimal default config

2022-03-01 Thread Ash Logan
Add a bare-minimum config to get a kernel compiled. Will need some more interesting options once a storage device to boot from is added. Signed-off-by: Ash Logan --- arch/powerpc/configs/wiiu_defconfig | 7 +++ 1 file changed, 7 insertions(+) create mode 100644

[PATCH 11/12] powerpc: wiiu: don't enforce flat memory

2022-03-01 Thread Ash Logan
pgtable_32.c:mapin_ram loops over each valid memory range, which means non-contiguous memory just works. Signed-off-by: Ash Logan --- arch/powerpc/mm/init_32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c index

[PATCH 10/12] powerpc: wiiu: platform support

2022-03-01 Thread Ash Logan
Add platform support for the Nintendo Wii U console. Signed-off-by: Ash Logan Co-developed-by: Roberto Van Eeden Signed-off-by: Roberto Van Eeden Co-developed-by: Emmanuel Gil Peyrot Signed-off-by: Emmanuel Gil Peyrot --- arch/powerpc/platforms/wiiu/Makefile | 2 +-

[PATCH 09/12] powerpc: espresso processor support

2022-03-01 Thread Ash Logan
From: Roberto Van Eeden Adds a cputable entry for the "Espresso" processor found on the Nintendo Wii U, which has a PVR unrelated to other 750CL-like chips. Only this revision has been seen in the wild. Signed-off-by: Roberto Van Eeden Signed-off-by: Ash Logan ---

[PATCH 08/12] powerpc: wiiu: latte interrupt controller support

2022-03-01 Thread Ash Logan
Add support for the "Latte" interrupt controller in the Nintendo Wii U. This controller is used for the entire SoC and is wired to a cascade interrupt on the Espresso controller. Signed-off-by: Ash Logan Co-developed-by: Roberto Van Eeden Signed-off-by: Roberto Van Eeden ---

[PATCH 07/12] powerpc: wiiu: espresso interrupt controller support

2022-03-01 Thread Ash Logan
Add support for the "Espresso" interrupt controller in the Nintendo Wii U. Signed-off-by: Ash Logan Co-developed-by: Roberto Van Eeden Signed-off-by: Roberto Van Eeden --- arch/powerpc/platforms/wiiu/Makefile | 1 + arch/powerpc/platforms/wiiu/espresso-pic.c | 183

[PATCH 06/12] powerpc: wiiu: udbg support for latteipc

2022-03-01 Thread Ash Logan
Add support for using the Latte chipset IPC for udbg on the Nintendo Wii U console. These messages can then be received by a special firmware running on the "Starbuck" coprocessor. Signed-off-by: Ash Logan --- arch/powerpc/Kconfig.debug | 9 ++ arch/powerpc/include/asm/udbg.h

[PATCH 05/12] powerpc: wiiu: declare as non-coherent

2022-03-01 Thread Ash Logan
The Nintendo Wii U requires explicit cache handling when interfacing with DMA devices. Signed-off-by: Ash Logan --- arch/powerpc/platforms/Kconfig.cputype | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/Kconfig.cputype

[PATCH 04/12] powerpc: wiiu: introduce wiiu platform

2022-03-01 Thread Ash Logan
Add empty platforms/wiiu for Nintendo Wii U console. Signed-off-by: Ash Logan --- arch/powerpc/platforms/Kconfig | 1 + arch/powerpc/platforms/Makefile | 1 + arch/powerpc/platforms/wiiu/Kconfig | 5 + arch/powerpc/platforms/wiiu/Makefile | 1 + 4 files changed, 8 insertions(+)

[PATCH 03/12] powerpc: wiiu: bootwrapper support

2022-03-01 Thread Ash Logan
Add support for the Nintendo Wii U game console to the powerpc bootwrapper. Signed-off-by: Ash Logan Co-developed-by: Emmanuel Gil Peyrot Signed-off-by: Emmanuel Gil Peyrot --- arch/powerpc/boot/Makefile| 4 ++ arch/powerpc/boot/wiiu-head.S | 103 ++

[PATCH 02/12] powerpc: wiiu: device tree

2022-03-01 Thread Ash Logan
Add a device tree source file for the Nintendo Wii U video game console. Signed-off-by: Ash Logan Co-developed-by: Roberto Van Eeden Signed-off-by: Roberto Van Eeden Co-developed-by: Emmanuel Gil Peyrot Signed-off-by: Emmanuel Gil Peyrot --- arch/powerpc/boot/dts/wiiu.dts | 327

[PATCH 01/12] dt-bindings: wiiu: Document the Nintendo Wii U devicetree

2022-03-01 Thread Ash Logan
Adds schema for the various Wii U devicetree nodes used. Signed-off-by: Ash Logan --- .../bindings/powerpc/nintendo/wiiu.yaml | 28 +++ .../powerpc/nintendo/wiiu/espresso-pic.yaml | 42 + .../bindings/powerpc/nintendo/wiiu/gpu7.yaml | 41 +

[PATCH 00/12] powerpc: Nintendo Wii U support

2022-03-01 Thread Ash Logan
The following patches add basic support for the Nintendo Wii U video game console, a PowerPC system somewhat similar to the GameCube and Wii. This includes: - devicetree source - bootwrapper support - udbg console to bootloader - early udbg console - interrupt controllers - platform support -

Re: [PATCH V3 09/30] arm/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-03-01 Thread Anshuman Khandual
On 3/1/22 1:46 PM, Christophe Leroy wrote: > > > Le 01/03/2022 à 01:31, Russell King (Oracle) a écrit : >> On Tue, Mar 01, 2022 at 05:30:41AM +0530, Anshuman Khandual wrote: >>> On 2/28/22 4:27 PM, Russell King (Oracle) wrote: On Mon, Feb 28, 2022 at 04:17:32PM +0530, Anshuman Khandual

Re: [PATCH V3 09/30] arm/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-03-01 Thread Anshuman Khandual
On 3/1/22 6:01 AM, Russell King (Oracle) wrote: > On Tue, Mar 01, 2022 at 05:30:41AM +0530, Anshuman Khandual wrote: >> On 2/28/22 4:27 PM, Russell King (Oracle) wrote: >>> On Mon, Feb 28, 2022 at 04:17:32PM +0530, Anshuman Khandual wrote: This defines and exports a platform specific

Re: [PATCH 11/12] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-01 Thread Stefano Stabellini
On Tue, 1 Mar 2022, Christoph Hellwig wrote: > Allow to pass a remap argument to the swiotlb initialization functions > to handle the Xen/x86 remap case. ARM/ARM64 never did any remapping > from xen_swiotlb_fixup, so we don't even need that quirk. > > Signed-off-by: Christoph Hellwig > --- >

[powerpc:next] BUILD SUCCESS 8219d31effa7be5dbc7ff915d7970672e028c701

2022-03-01 Thread kernel test robot
ps3_defconfig arm axm55xx_defconfig powerpcwarp_defconfig sh ecovec24_defconfig sh se7780_defconfig arm randconfig-c002-20220301 ia64

[powerpc:next-test] BUILD REGRESSION cb848c24e3dc532269b70f907ad6d51848039cf0

2022-03-01 Thread kernel test robot
with exit code 1 (use -v to see invocation) Error/Warning ids grouped by kconfigs: gcc_recent_errors `-- powerpc64-randconfig-c024-20220301 |-- mobility.c:(.text):undefined-reference-to-vas_migration_handler `-- powerpc64-linux-ld:mobility.c:(.text):undefined-reference

[PATCH v2] powerpc: kernel: fix refcount leak in format_show()

2022-03-01 Thread Hangyu Hua
Refcount leak will happen when format_show returns failure in multiple cases. Unified management of of_node_put can fix this problem. Signed-off-by: Hangyu Hua --- v2: 1. change the title and description information. 2. fix all possible refcount leak. arch/powerpc/kernel/secvar-sysfs.c | 9

Re: [PATCH] powerpc: kernel: fix a refcount leak in format_show()

2022-03-01 Thread Hangyu Hua
Thanks. I will resubmit my patch latter. On 2022/3/2 03:50, Tyrel Datwyler wrote: On 3/1/22 04:55, Michael Ellerman wrote: Hangyu Hua writes: node needs to be dropped when of_property_read_string fails. So an earlier call to of_node_put is required here. That's true but ... diff --git

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread Linus Torvalds
On Tue, Mar 1, 2022 at 3:19 PM David Laight wrote: > > Having said that there are so few users of list_entry_is_head() > it is reasonable to generate two new names. Well, the problem is that the users of list_entry_is_head() may be few - but there are a number of _other_ ways to check "was that

RE: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread David Laight
From: Linus Torvalds > Sent: 01 March 2022 23:03 > > On Tue, Mar 1, 2022 at 2:58 PM David Laight wrote: > > > > Can it be resolved by making: > > #define list_entry_is_head(pos, head, member) ((pos) == NULL) > > and double-checking that it isn't used anywhere else (except in > > the list macros

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread Linus Torvalds
On Tue, Mar 1, 2022 at 2:58 PM David Laight wrote: > > Can it be resolved by making: > #define list_entry_is_head(pos, head, member) ((pos) == NULL) > and double-checking that it isn't used anywhere else (except in > the list macros themselves). Well, yes, except for the fact that then the name

RE: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread David Laight
From: Linus Torvalds > Sent: 01 March 2022 19:07 > On Mon, Feb 28, 2022 at 2:29 PM James Bottomley > wrote: > > > > However, if the desire is really to poison the loop variable then we > > can do > > > > #define list_for_each_entry(pos, head, member) \ > > for

[Bug 215567] build failure when PPC_64S_HASH_MMU=n is selected in kernel .config

2022-03-01 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215567 --- Comment #5 from Erhard F. (erhar...@mailbox.org) --- Your 2nd patch solved the issue. Thanks Murilo! Build completes and the Talos boots fine into the patched 5.17-rc5. -- You may reply to this email to add a comment. You are receiving

[PATCH] ASoC: imx-pcm-rpmsg: Directly return 0 instead of using local ret variable

2022-03-01 Thread Haowen Bai
fixes coccinelle warning: sound/soc/fsl/imx-pcm-rpmsg.c:285:5-8: Unneeded variable: "ret". Return "0" on line 308 Signed-off-by: Haowen Bai --- sound/soc/fsl/imx-pcm-rpmsg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/fsl/imx-pcm-rpmsg.c

[Bug 215567] build failure when PPC_64S_HASH_MMU=n is selected in kernel .config

2022-03-01 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215567 --- Comment #4 from Murilo Opsfelder Araújo (mopsfel...@gmail.com) --- Erhard, would you mind trying the v2? https://lists.ozlabs.org/pipermail/linuxppc-dev/2022-March/240715.html Christophe, thanks for the suggestion. That's exactly what I

[PATCH v2] powerpc/64s: Fix build failure when CONFIG_PPC_64S_HASH_MMU is not set

2022-03-01 Thread Murilo Opsfelder Araujo
The following build failure occurs when CONFIG_PPC_64S_HASH_MMU is not set: arch/powerpc/kernel/setup_64.c: In function ‘setup_per_cpu_areas’: arch/powerpc/kernel/setup_64.c:811:21: error: ‘mmu_linear_psize’ undeclared (first use in this function); did you mean ‘mmu_virtual_psize’?

Re: [PATCH 6/6] treewide: remove check of list iterator against head past the loop body

2022-03-01 Thread Linus Torvalds
So looking at this patch, I really reacted to the fact that quite often the "use outside the loop" case is all kinds of just plain unnecessary, but _used_ to be a convenience feature. I'll just quote the first chunk in it's entirely as an example - not because I think this chunk is particularly

[Bug 215567] build failure when PPC_64S_HASH_MMU=n is selected in kernel .config

2022-03-01 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215567 Christophe Leroy (christophe.le...@csgroup.eu) changed: What|Removed |Added CC|

Re: [PATCH] powerpc: kernel: fix a refcount leak in format_show()

2022-03-01 Thread Tyrel Datwyler
On 3/1/22 04:55, Michael Ellerman wrote: > Hangyu Hua writes: >> node needs to be dropped when of_property_read_string fails. So an earlier >> call >> to of_node_put is required here. > > That's true but ... > >> diff --git a/arch/powerpc/kernel/secvar-sysfs.c >>

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread Linus Torvalds
On Tue, Mar 1, 2022 at 11:06 AM Linus Torvalds wrote: > > So instead of that simple "if (!entry)", we'd effectively have to > continue to use something that still works with the old world order > (ie that "if (list_entry_is_head())" model). Just to prove my point about how this is painful, that

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread Linus Torvalds
On Mon, Feb 28, 2022 at 2:29 PM James Bottomley wrote: > > However, if the desire is really to poison the loop variable then we > can do > > #define list_for_each_entry(pos, head, member) \ > for (pos = list_first_entry(head, typeof(*pos), member);\ >

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread Matthew Wilcox
On Tue, Mar 01, 2022 at 10:14:07AM -0800, Kees Cook wrote: > On Mon, Feb 28, 2022 at 04:45:11PM -0800, Linus Torvalds wrote: > > Really. The "-Wshadow doesn't work on the kernel" is not some new > > issue, because you have to do completely insane things to the source > > code to enable it. > >

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread Linus Torvalds
On Tue, Mar 1, 2022 at 10:14 AM Kees Cook wrote: > > The first big glitch with -Wshadow was with shadowed global variables. > GCC 4.8 fixed that, but it still yells about shadowed functions. What > _almost_ works is -Wshadow=local. Heh. Yeah, I just have long memories of "-Wshadow was a

[Bug 215567] build failure when PPC_64S_HASH_MMU=n is selected in kernel .config

2022-03-01 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215567 --- Comment #2 from Erhard F. (erhar...@mailbox.org) --- I just tested your patch top of 5.17-rc5. It applies and build continues but fails later with: [...] CC lib/asn1_decoder.o GEN lib/oid_registry_data.c CC

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread Kees Cook
On Tue, Mar 01, 2022 at 12:28:15PM +0100, Jakob Koschel wrote: > Based on the coccinelle script there are ~480 cases that need fixing > in total. I'll now finish all of them and then split them by > submodules as Greg suggested and repost a patch set per submodule. > Sounds good? To help with

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

2022-03-01 Thread Konrad Rzeszutek Wilk
> -#include > - > -/* > - * History lesson: > - * The execution chain of IOMMUs in 2.6.36 looks as so: > - * > - *[xen-swiotlb] > - * | > - * +[swiotlb *]--+ > - */ | \ > - * / | \ > - *[GART]

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread Kees Cook
On Mon, Feb 28, 2022 at 04:45:11PM -0800, Linus Torvalds wrote: > Really. The "-Wshadow doesn't work on the kernel" is not some new > issue, because you have to do completely insane things to the source > code to enable it. The first big glitch with -Wshadow was with shadowed global variables.

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread Greg KH
On Tue, Mar 01, 2022 at 06:40:04PM +0100, Jakob Koschel wrote: > > > > On 1. Mar 2022, at 18:36, Greg KH wrote: > > > > On Tue, Mar 01, 2022 at 12:28:15PM +0100, Jakob Koschel wrote: > >> > >> > >>> On 1. Mar 2022, at 01:41, Linus Torvalds > >>> wrote: > >>> > >>> On Mon, Feb 28, 2022 at

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread Greg KH
On Tue, Mar 01, 2022 at 12:28:15PM +0100, Jakob Koschel wrote: > > > > On 1. Mar 2022, at 01:41, Linus Torvalds > > wrote: > > > > On Mon, Feb 28, 2022 at 1:47 PM Jakob Koschel > > wrote: > >> > >> The goal of this is to get compiler warnings right? This would indeed be > >> great. > > >

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread Jakob Koschel
> On 1. Mar 2022, at 18:36, Greg KH wrote: > > On Tue, Mar 01, 2022 at 12:28:15PM +0100, Jakob Koschel wrote: >> >> >>> On 1. Mar 2022, at 01:41, Linus Torvalds >>> wrote: >>> >>> On Mon, Feb 28, 2022 at 1:47 PM Jakob Koschel >>> wrote: The goal of this is to get compiler

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread Greg KH
On Mon, Feb 28, 2022 at 01:06:57PM +0100, Jakob Koschel wrote: > > > > On 28. Feb 2022, at 12:20, Greg KH wrote: > > > > On Mon, Feb 28, 2022 at 12:08:18PM +0100, Jakob Koschel wrote: > >> If the list does not contain the expected element, the value of > >> list_for_each_entry() iterator will

[Bug 215567] build failure when PPC_64S_HASH_MMU=n is selected in kernel .config

2022-03-01 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215567 Murilo Opsfelder Araújo (mopsfel...@gmail.com) changed: What|Removed |Added CC|

[PATCH] powerpc/64s: Fix build failure when CONFIG_PPC_64S_HASH_MMU is not set

2022-03-01 Thread Murilo Opsfelder Araujo
The following build failure occurs when CONFIG_PPC_64S_HASH_MMU is not set: arch/powerpc/kernel/setup_64.c: In function ‘setup_per_cpu_areas’: arch/powerpc/kernel/setup_64.c:811:21: error: ‘mmu_linear_psize’ undeclared (first use in this function); did you mean ‘mmu_virtual_psize’?

Re: [PATCH V3 19/30] csky/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-03-01 Thread Guo Ren
Acked-by: Guo Ren On Mon, Feb 28, 2022 at 7:10 PM Anshuman Khandual wrote: > > This defines and exports a platform specific custom vm_get_page_prot() via > subscribing ARCH_HAS_VM_GET_PAGE_PROT. Subsequently all __SXXX and __PXXX > macros can be dropped which are no longer needed. > > Cc: Geert

Re: [PATCH] powerpc: kernel: fix a refcount leak in format_show()

2022-03-01 Thread Michael Ellerman
Hangyu Hua writes: > node needs to be dropped when of_property_read_string fails. So an earlier > call > to of_node_put is required here. That's true but ... > diff --git a/arch/powerpc/kernel/secvar-sysfs.c > b/arch/powerpc/kernel/secvar-sysfs.c > index a0a78aba2083..cd0fa7028d86 100644 >

Re: [PATCH] net: Remove branch in csum_shift()

2022-03-01 Thread Russell King (Oracle)
On Tue, Mar 01, 2022 at 11:41:06AM +, David Laight wrote: > From: Christophe Leroy > > Sent: 01 March 2022 11:15 > ... > > Looks like ARM also does better code with the generic implementation as > > it seems to have some looking like conditional instructions 'rorne' and > > 'strne'. > > In

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

2022-03-01 Thread Christoph Hellwig
On Tue, Mar 01, 2022 at 11:39:29AM +, Andrew Cooper wrote: > This isn't really "must".  The guest is perfectly capable of sharing > memory with the hypervisor. > > It's just that for now, bounce buffering is allegedly faster, and the > simple way of getting it working. Yeah, I guess you

RE: [PATCH] net: Remove branch in csum_shift()

2022-03-01 Thread David Laight
From: Christophe Leroy > Sent: 01 March 2022 11:15 ... > Looks like ARM also does better code with the generic implementation as > it seems to have some looking like conditional instructions 'rorne' and > 'strne'. In arm32 (and I think arm64) every instruction is conditional. > static

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-01 Thread Jakob Koschel
> On 1. Mar 2022, at 01:41, Linus Torvalds > wrote: > > On Mon, Feb 28, 2022 at 1:47 PM Jakob Koschel wrote: >> >> The goal of this is to get compiler warnings right? This would indeed be >> great. > > Yes, so I don't mind having a one-time patch that has been gathered > using some

Re: [PATCH] net: Remove branch in csum_shift()

2022-03-01 Thread Christophe Leroy
Le 01/03/2022 à 11:47, David Laight a écrit : > From: Christophe Leroy >> Sent: 01 March 2022 10:20 >> >> Le 13/02/2022 à 18:47, David Laight a écrit : >>> From: Segher Boessenkool Sent: 13 February 2022 09:16 >>> > What happens on x86-64? > > Trying to do the same in

[PATCH 11/12] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-01 Thread Christoph Hellwig
Allow to pass a remap argument to the swiotlb initialization functions to handle the Xen/x86 remap case. ARM/ARM64 never did any remapping from xen_swiotlb_fixup, so we don't even need that quirk. Signed-off-by: Christoph Hellwig --- arch/arm/xen/mm.c | 23 +++---

[PATCH 12/12] x86: remove cruft from

2022-03-01 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

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

2022-03-01 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

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

2022-03-01 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

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

2022-03-01 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 | 7 +++ arch/x86/mm/mem_encrypt_amd.c | 3 --- 3 files changed, 7 insertions(+), 11 deletions(-) diff

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

2022-03-01 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 ---

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

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

[PATCH 05/12] swiotlb: pass a gfp_mask argument to swiotlb_init_late

2022-03-01 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 | 4

[PATCH 04/12] swiotlb: rename swiotlb_late_init_with_default_size

2022-03-01 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 ---

[PATCH 03/12] swiotlb: simplify swiotlb_max_segment

2022-03-01 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 ---

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

2022-03-01 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 bfc56cb217059..64b390136f9ef 100644 ---

cleanup swiotlb initialization v4

2022-03-01 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

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

2022-03-01 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

RE: [PATCH] net: Remove branch in csum_shift()

2022-03-01 Thread David Laight
From: Christophe Leroy > Sent: 01 March 2022 10:20 > > Le 13/02/2022 à 18:47, David Laight a écrit : > > From: Segher Boessenkool > >> Sent: 13 February 2022 09:16 > > > >> > >>> What happens on x86-64? > >>> > >>> Trying to do the same in the x86 ipcsum code tended to make the code > >>>

Re: [PATCH] net: Remove branch in csum_shift()

2022-03-01 Thread Christophe Leroy
Le 13/02/2022 à 18:47, David Laight a écrit : > From: Segher Boessenkool >> Sent: 13 February 2022 09:16 > >> >>> What happens on x86-64? >>> >>> Trying to do the same in the x86 ipcsum code tended to make the code worse. >>> (Although that test is for an odd length fragment and can just be

Re: [PATCH V3 09/30] arm/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-03-01 Thread Christophe Leroy
Le 01/03/2022 à 01:31, Russell King (Oracle) a écrit : > On Tue, Mar 01, 2022 at 05:30:41AM +0530, Anshuman Khandual wrote: >> On 2/28/22 4:27 PM, Russell King (Oracle) wrote: >>> On Mon, Feb 28, 2022 at 04:17:32PM +0530, Anshuman Khandual wrote: This defines and exports a platform specific