Re: [RFC PATCH v3 2/6] swiotlb: Add restricted DMA pool

2021-01-24 Thread Jon Masters
On 1/7/21 1:09 PM, Florian Fainelli wrote: On 1/7/21 9:57 AM, Konrad Rzeszutek Wilk wrote: On Fri, Jan 08, 2021 at 01:39:18AM +0800, Claire Chang wrote: Hi Greg and Konrad, This change is intended to be non-arch specific. Any arch that lacks DMA access control and has devices not behind an IOM

Re: [PATCH] lib/sstep: Fix incorrect return from analyze_instr()

2021-01-24 Thread Ananth N Mavinakayanahalli
On 1/23/21 6:03 AM, Michael Ellerman wrote: Ananth N Mavinakayanahalli writes: We currently just percolate the return value from analyze_instr() to the caller of emulate_step(), especially if it is a -1. For one particular case (opcode = 4) for instructions that aren't currently emulated, we a

[powerpc:merge] BUILD SUCCESS 44158b256b30415079588d0fcb1bccbdc2ccd009

2021-01-24 Thread kernel test robot
ig powerpc allnoconfig i386 randconfig-a001-20210124 i386 randconfig-a002-20210124 i386 randconfig-a003-20210124 i386 randconfig-a001-20210125 i386 randconfig-a002-20210125 i386 randconfig-a00

[powerpc:fixes-test] BUILD SUCCESS 4025c784c573cab7e3f84746cc82b8033923ec62

2021-01-24 Thread kernel test robot
allmodconfig powerpc allnoconfig i386 randconfig-a001-20210124 i386 randconfig-a002-20210124 i386 randconfig-a003-20210124 i386 randconfig-a004-20210124 i386 randconfig-a006

Re: [PATCH v10 11/12] mm/vmalloc: Hugepage vmalloc mappings

2021-01-24 Thread Nicholas Piggin
Excerpts from Christoph Hellwig's message of January 25, 2021 1:07 am: > On Sun, Jan 24, 2021 at 06:22:29PM +1000, Nicholas Piggin wrote: >> diff --git a/arch/Kconfig b/arch/Kconfig >> index 24862d15f3a3..f87feb616184 100644 >> --- a/arch/Kconfig >> +++ b/arch/Kconfig >> @@ -724,6 +724,16 @@ config

Re: [PATCH v4 2/2] powerpc/mce: Remove per cpu variables from MCE handlers

2021-01-24 Thread kernel test robot
umented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Ganesh-Goudar/powerpc-mce-Reduce-the-size-of-event-arrays/20210124-191230 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-randconfig-r005-20210124 (a

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.11-5 tag

2021-01-24 Thread pr-tracker-bot
The pull request you sent on Sun, 24 Jan 2021 23:15:52 +1100: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-5.11-5 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/14c50a66183856672d822f25dbb73ad26d1e8f11 Thank you! -- Deet-doot-d

Re: [PATCH v10 11/12] mm/vmalloc: Hugepage vmalloc mappings

2021-01-24 Thread Randy Dunlap
On 1/24/21 7:07 AM, Christoph Hellwig wrote: >> +config HAVE_ARCH_HUGE_VMALLOC >> +depends on HAVE_ARCH_HUGE_VMAP >> +bool >> +help >> + Archs that select this would be capable of PMD-sized vmaps (i.e., >> + arch_vmap_pmd_supported() returns true), and they must make no >> +

Re: [PATCH v10 11/12] mm/vmalloc: Hugepage vmalloc mappings

2021-01-24 Thread Christoph Hellwig
On Sun, Jan 24, 2021 at 06:22:29PM +1000, Nicholas Piggin wrote: > diff --git a/arch/Kconfig b/arch/Kconfig > index 24862d15f3a3..f87feb616184 100644 > --- a/arch/Kconfig > +++ b/arch/Kconfig > @@ -724,6 +724,16 @@ config HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD > config HAVE_ARCH_HUGE_VMAP > bool

Re: [PATCH v10 10/12] mm/vmalloc: add vmap_range_noflush variant

2021-01-24 Thread Christoph Hellwig
On Sun, Jan 24, 2021 at 06:22:28PM +1000, Nicholas Piggin wrote: > As a side-effect, the order of flush_cache_vmap() and > arch_sync_kernel_mappings() calls are switched, but that now matches > the other callers in this file. > > Signed-off-by: Nicholas Piggin Looks good, Reviewed-by: Christoph

Re: [PATCH v10 09/12] mm: Move vmap_range from mm/ioremap.c to mm/vmalloc.c

2021-01-24 Thread Christoph Hellwig
On Sun, Jan 24, 2021 at 06:22:27PM +1000, Nicholas Piggin wrote: > This is a generic kernel virtual memory mapper, not specific to ioremap. Looks good: Reviewed-by: Christoph Hellwig Although it would be nice if you could fix up the > 80 lines while you're at it.

Re: [PATCH v10 05/12] mm: HUGE_VMAP arch support cleanup

2021-01-24 Thread Nicholas Piggin
Excerpts from Christoph Hellwig's message of January 24, 2021 9:40 pm: >> diff --git a/arch/arm64/include/asm/vmalloc.h >> b/arch/arm64/include/asm/vmalloc.h >> index 2ca708ab9b20..597b40405319 100644 >> --- a/arch/arm64/include/asm/vmalloc.h >> +++ b/arch/arm64/include/asm/vmalloc.h >> @@ -1,4 +1

[GIT PULL] Please pull powerpc/linux.git powerpc-5.11-5 tag

2021-01-24 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 5.11: The following changes since commit 41131a5e54ae7ba5a2bb8d7b30d1818b3f5b13d2: powerpc/vdso: Fix clock_gettime_fallback for vdso32 (2021-01-14 15:56:44 +1100) are available in the git repos

Re: [PATCH v10 04/12] mm/ioremap: rename ioremap_*_range to vmap_*_range

2021-01-24 Thread Nicholas Piggin
Excerpts from Christoph Hellwig's message of January 24, 2021 9:36 pm: > On Sun, Jan 24, 2021 at 06:22:22PM +1000, Nicholas Piggin wrote: >> This will be used as a generic kernel virtual mapping function, so >> re-name it in preparation. > > The new name looks ok, but shouldn't it also move to vma

Re: [PATCH] powerpc/64s: fix scv entry fallback flush vs interrupt

2021-01-24 Thread Michael Ellerman
On Mon, 11 Jan 2021 16:24:08 +1000, Nicholas Piggin wrote: > The L1D flush fallback functions are not recoverable vs interrupts, > yet the scv entry flush runs with MSR[EE]=1. This can result in a > timer (soft-NMI) or MCE or SRESET interrupt hitting here and overwriting > the EXRFI save area, whic

Re: [PATCH v10 05/12] mm: HUGE_VMAP arch support cleanup

2021-01-24 Thread Christoph Hellwig
> diff --git a/arch/arm64/include/asm/vmalloc.h > b/arch/arm64/include/asm/vmalloc.h > index 2ca708ab9b20..597b40405319 100644 > --- a/arch/arm64/include/asm/vmalloc.h > +++ b/arch/arm64/include/asm/vmalloc.h > @@ -1,4 +1,12 @@ > #ifndef _ASM_ARM64_VMALLOC_H > #define _ASM_ARM64_VMALLOC_H > >

Re: [PATCH v10 04/12] mm/ioremap: rename ioremap_*_range to vmap_*_range

2021-01-24 Thread Christoph Hellwig
On Sun, Jan 24, 2021 at 06:22:22PM +1000, Nicholas Piggin wrote: > This will be used as a generic kernel virtual mapping function, so > re-name it in preparation. The new name looks ok, but shouldn't it also move to vmalloc.c with the more generic name and purpose?

Re: [PATCH v10 03/12] mm/vmalloc: rename vmap_*_range vmap_pages_*_range

2021-01-24 Thread Christoph Hellwig
On Sun, Jan 24, 2021 at 06:22:21PM +1000, Nicholas Piggin wrote: > The vmalloc mapper operates on a struct page * array rather than a > linear physical address, re-name it to make this distinction clear. > > Signed-off-by: Nicholas Piggin Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v10 02/12] mm: apply_to_pte_range warn and fail if a large pte is encountered

2021-01-24 Thread Christoph Hellwig
On Sun, Jan 24, 2021 at 06:22:20PM +1000, Nicholas Piggin wrote: > apply_to_pte_range might mistake a large pte for bad, or treat it as a > page table, resulting in a crash or corruption. Add a test to warn and > return error if large entries are found. Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v10 01/12] mm/vmalloc: fix vmalloc_to_page for huge vmap mappings

2021-01-24 Thread Christoph Hellwig
On Sun, Jan 24, 2021 at 06:22:19PM +1000, Nicholas Piggin wrote: > vmalloc_to_page returns NULL for addresses mapped by larger pages[*]. > Whether or not a vmap is huge depends on the architecture details, > alignments, boot options, etc., which the caller can not be expected > to know. Therefore H

[PATCH v10 12/12] powerpc/64s/radix: Enable huge vmalloc mappings

2021-01-24 Thread Nicholas Piggin
Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Nicholas Piggin --- Documentation/admin-guide/kernel-parameters.txt | 2 ++ arch/powerpc/Kconfig| 1 + arch/powerpc/kernel/module.c| 13 +++-- 3 files changed, 14 insertions(+), 2 deletions(

[PATCH v10 11/12] mm/vmalloc: Hugepage vmalloc mappings

2021-01-24 Thread Nicholas Piggin
Support huge page vmalloc mappings. Config option HAVE_ARCH_HUGE_VMALLOC enables support on architectures that define HAVE_ARCH_HUGE_VMAP and supports PMD sized vmap mappings. vmalloc will attempt to allocate PMD-sized pages if allocating PMD size or larger, and fall back to small pages if that wa

[PATCH v10 10/12] mm/vmalloc: add vmap_range_noflush variant

2021-01-24 Thread Nicholas Piggin
As a side-effect, the order of flush_cache_vmap() and arch_sync_kernel_mappings() calls are switched, but that now matches the other callers in this file. Signed-off-by: Nicholas Piggin --- mm/vmalloc.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/mm/vmal

[PATCH v10 09/12] mm: Move vmap_range from mm/ioremap.c to mm/vmalloc.c

2021-01-24 Thread Nicholas Piggin
This is a generic kernel virtual memory mapper, not specific to ioremap. Signed-off-by: Nicholas Piggin --- include/linux/vmalloc.h | 3 + mm/ioremap.c| 197 mm/vmalloc.c| 196 +++ 3 files chan

[PATCH v10 08/12] x86: inline huge vmap supported functions

2021-01-24 Thread Nicholas Piggin
This allows unsupported levels to be constant folded away, and so p4d_free_pud_page can be removed because it's no longer linked to. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x...@kernel.org Cc: "H. Peter Anvin" Signed-off-by: Nicholas Piggin --- arch/x86/include/asm/vmallo

[PATCH v10 07/12] arm64: inline huge vmap supported functions

2021-01-24 Thread Nicholas Piggin
This allows unsupported levels to be constant folded away, and so p4d_free_pud_page can be removed because it's no longer linked to. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-ker...@lists.infradead.org Acked-by: Catalin Marinas Signed-off-by: Nicholas Piggin --- arch/arm64/include/asm

[PATCH v10 06/12] powerpc: inline huge vmap supported functions

2021-01-24 Thread Nicholas Piggin
This allows unsupported levels to be constant folded away, and so p4d_free_pud_page can be removed because it's no longer linked to. Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Michael Ellerman Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/vmalloc.h | 19 ---

[PATCH v10 05/12] mm: HUGE_VMAP arch support cleanup

2021-01-24 Thread Nicholas Piggin
This changes the awkward approach where architectures provide init functions to determine which levels they can provide large mappings for, to one where the arch is queried for each call. This removes code and indirection, and allows constant-folding of dead code for unsupported levels. This also

[PATCH v10 04/12] mm/ioremap: rename ioremap_*_range to vmap_*_range

2021-01-24 Thread Nicholas Piggin
This will be used as a generic kernel virtual mapping function, so re-name it in preparation. Signed-off-by: Nicholas Piggin --- mm/ioremap.c | 64 +++- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/mm/ioremap.c b/mm/ioremap.c ind

[PATCH v10 03/12] mm/vmalloc: rename vmap_*_range vmap_pages_*_range

2021-01-24 Thread Nicholas Piggin
The vmalloc mapper operates on a struct page * array rather than a linear physical address, re-name it to make this distinction clear. Signed-off-by: Nicholas Piggin --- mm/vmalloc.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c

[PATCH v10 02/12] mm: apply_to_pte_range warn and fail if a large pte is encountered

2021-01-24 Thread Nicholas Piggin
apply_to_pte_range might mistake a large pte for bad, or treat it as a page table, resulting in a crash or corruption. Add a test to warn and return error if large entries are found. Signed-off-by: Nicholas Piggin --- mm/memory.c | 66 +++-- 1 file

[PATCH v10 01/12] mm/vmalloc: fix vmalloc_to_page for huge vmap mappings

2021-01-24 Thread Nicholas Piggin
vmalloc_to_page returns NULL for addresses mapped by larger pages[*]. Whether or not a vmap is huge depends on the architecture details, alignments, boot options, etc., which the caller can not be expected to know. Therefore HUGE_VMAP is a regression for vmalloc_to_page. This change teaches vmallo

[PATCH v10 00/12] huge vmalloc mappings

2021-01-24 Thread Nicholas Piggin
Fixed a couple of bugs that Ding noticed in review and testing. Thanks, Nick Since v9: - Fixed intermediate build breakage on x86-32 !PAE [thanks Ding] - Fixed small page fallback case vm_struct double-free [thanks Ding] Since v8: - Fixed nommu compile. - Added Kconfig option help text - Added V