or: non-void function does not return a
value [-Werror,-Wreturn-type]
Error/Warning ids grouped by kconfigs:
clang_recent_errors
|-- powerpc-randconfig-r003-20210202
| |--
arch-powerpc-kernel-tau_6xx.c:error:non-void-function-does-not-return-a-value-Werror-Wreturn-type
| |--
arch-powerpc-k
allnoconfig
i386 randconfig-a001-20210202
i386 randconfig-a005-20210202
i386 randconfig-a003-20210202
i386 randconfig-a006-20210202
i386 randconfig-a002-20210202
i386 randconfig-a004-20210202
x86_64
To enable presenting of Performance Monitor Counter Registers
(PMC1 to PMC6) as part of extended regsiters, patch adds these
to sample_reg_mask in the tool side (to use with -I? option).
Simplified the PERF_REG_PMU_MASK_300/31 definition. Excluded the
unsupported SPRs (MMCR3, SIER2, SIER3) from ex
Currently Monitor Mode Control Registers and Sampling registers are
part of extended regs. Patch adds support to include Performance Monitor
Counter Registers (PMC1 to PMC6 ) as part of extended registers.
PMCs are saved in the perf interrupt handler as part of
per-cpu array 'pmcs' in struct cpu_h
To support capturing of PMC's as part of extended registers, the
value of SPR's PMC1 to PMC6 has to be saved in the starting of PMI
interrupt handler. This is needed since we are resetting the
overflown PMC before creating sample and hence directly reading
SPRN_PMCx in 'perf_reg_value' will be capt
Patch set to add Performance Monitor Counter SPR's as
part of extended regs in powerpc.
Patch 1/3 saves the PMC values in the perf interrupt
handler as part of per-cpu array.
Patch 2/3 adds PMC1 to PMC6 as part of the extended
regs mask.
Patch 3/3 includes perf tools side changes to add
PMC1 to PM
Fix the following coccicheck warning:
./drivers/scsi/ibmvscsi/ibmvfc.c: WARNING: use scnprintf or
sprintf.
Reported-by: Abaci Robot
Signed-off-by: Jiapeng Chong
---
drivers/scsi/ibmvscsi/ibmvfc.c | 18 +++---
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/drivers/scs
Commit 8813ff49607e ("powerpc/sstep: Check instruction
validity against ISA version before emulation") introduced
a proper way to skip unknown instructions. This makes sure
that the same is used for the darn instruction when the
range selection bits have a reserved value.
Fixes: a23987ef267a ("pow
The Power ISA says that the fixed-point store and update
instructions must not use R0 for the base address (RA).
In this case, the instruction is invalid. This applies
to the following instructions.
* Store Byte with Update (stbu)
* Store Byte with Update Indexed (stbux)
* Store Halfword with
The Power ISA says that the fixed-point load and update
instructions must neither use R0 for the base address (RA)
nor have the destination (RT) and the base address (RA) as
the same register. In these cases, the instruction is
invalid. This applies to the following instructions.
* Load Byte and
This reverts commit 8659a0e0efdd975c73355dbc033f79ba3b31e82c.
Signed-off-by: Jordan Niethe
---
arch/powerpc/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 294108e0e5c6..a7113ee85994 100644
--- a/arch/powerpc/Kconfig
+
The recommended sequence for updating a PTE from ISA Book III 6.10
Translation Update Synchronization Requirements is:
*ptep = pte
eieio
tlbsync
ptesync
This needs to be done to order the update of the pte with subsequent
accesses otherwise a spurious fault may be raised.
radix__set_pte_at() doe
We added dcache flush on memory add/remove in
commit fb5924fddf9e ("powerpc/mm: Flush cache on memory hot(un)plug")
to handle crashes on GPU hotplug. Instead of adding dcache flush in
generic memory add/remove routine which is used even for regular
memory, we should handle these devices specific fl
This just add a better name for PG_arch_1. No functional change in this patch.
Signed-off-by: Aneesh Kumar K.V
---
arch/powerpc/include/asm/cacheflush.h | 6 ++
arch/powerpc/include/asm/kvm_ppc.h| 4 ++--
arch/powerpc/mm/book3s64/hash_utils.c | 4 ++--
arch/powerpc/mm/mem.c
THP config results in compound pages. Make sure the kernel enables
the PageCompound() check with CONFIG_HUGETLB_PAGE disabled and
CONFIG_TRANSPARENT_HUGEPAGE enabled.
This makes sure we correctly flush the icache with THP pages.
flush_dcache_icache_page only matter for platforms that don't support
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
next-test
head: a4d002e384ba1909c1c03799603f00c5909d6097
commit: f779391282ff7a95222000321b41823d86cf9aa1 [102/117] powerpc: convert
interrupt handlers to use wrappers
config: powerpc64-randconfig-r035-20210202 (attached
s/mismach/mismatch/
Signed-off-by: Bhaskar Chowdhury
---
arch/powerpc/kernel/head_44x.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index 8e36718f3167..813fa305c33b 100644
--- a/arch/powerpc/kernel/head
what is the overall purpose of this patch set? maybe need a cover
letter?
On 2/2/21 5:11 PM, Aneesh Kumar K.V wrote:
Instead of hardcoding 4K page size fetch it using sysconf(). For the performance
measurements test still assume 2M and 1G are hugepage sizes.
Signed-off-by: Aneesh Kumar K.V
---
On 18-Jan-2021, at 3:51 PM, kajoljain wrote:On 1/12/21 3:08 PM, Jiri Olsa wrote:On Mon, Dec 28, 2020 at 09:14:14PM -0500, Athira Rajeev wrote:SNIPc2799370 b backtrace_flagc2799378 B radix_tree_node_cachepc2799380 B __bss_stopc27a B _endc0080389 t icmp_ch
Excerpts from Russell King - ARM Linux admin's message of February 2, 2021 9:13
pm:
> On Tue, Feb 02, 2021 at 09:05:02PM +1000, Nicholas Piggin wrote:
>> diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
>> index c02f24400369..d63a5bb6bd0c 100644
>> --- a/arch/arm/includ
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
next-test
head: a4d002e384ba1909c1c03799603f00c5909d6097
commit: 1f4165b859f7a32b147fe4cac2d558001ed7e1ee [59/117] powerpc/pci: Add
ppc_md.discover_phbs()
config: powerpc64-randconfig-r035-20210202 (attached as .config
The amount of code executed with enabled user space access (unlocked KUAP)
should be minimal. However with CONFIG_PROVE_LOCKING or
CONFIG_DEBUG_ATOMIC_SLEEP enabled, might_fault() may end up replaying
interrupts which in turn may access the user space and forget to restore
the KUAP state.
The prob
Excerpts from Nicholas Piggin's message of January 30, 2021 11:08 pm:
> Signed-off-by: Nicholas Piggin
powerpc: fix tau6xxx compile error in convert interrupt handlers to use wrappers
This should fix the missing declaration compile error although it
doesn't show up with my toolchain.
---
arch
Eliminate the following coccicheck warning:
./drivers/soc/fsl/guts.c:120:2-3: Unneeded semicolon
Reported-by: Abaci Robot
Signed-off-by: Yang Li
---
drivers/soc/fsl/guts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c
index 3
On 02/02/2021 20:14, Alexey Kardashevskiy wrote:
The amount of code executed with enabled user space access (unlocked KUAP)
should be minimal. However with CONFIG_PROVE_LOCKING or
CONFIG_DEBUG_ATOMIC_SLEEP enabled, might_fault() may end up replaying
interrupts which in turn may access the user
Excerpts from Michael Ellerman's message of February 2, 2021 8:31 pm:
> Nicholas Piggin writes:
>> There is no need for this to be in asm, use the new intrrupt entry wrapper.
>>
>> Signed-off-by: Nicholas Piggin
>> ---
>> arch/powerpc/include/asm/interrupt.h | 15 +
>> arch/powerpc/inc
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
next-test
head: a4d002e384ba1909c1c03799603f00c5909d6097
commit: f779391282ff7a95222000321b41823d86cf9aa1 [102/117] powerpc: convert
interrupt handlers to use wrappers
config: powerpc-randconfig-r003-20210202 (attached
submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Nicholas-Piggin/huge-vmalloc-mappings/20210202-190833
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
con
On Tue, Feb 02, 2021 at 04:38:31PM +1000, Nicholas Piggin wrote:
> > So to avoid confusion, I'll rename it. But I think "interrupt" is maybe not
> > the right name. An
> > interrupt most of the time refers to IRQ.
>
> That depends what you mean by interrupt and IRQ.
In the PowerPC architecture,
submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Nicholas-Piggin/huge-vmalloc-mappings/20210202-190833
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
conf
On 2/2/21 1:37 AM, Bhaskar Chowdhury wrote:
>
> s/mismach/mismatch/
>
> Signed-off-by: Bhaskar Chowdhury
> ---
> arch/powerpc/kernel/head_44x.S | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Acked-by: Randy Dunlap
thanks.
--
~Randy
Hi Jessica,
On Tue, 2 Feb 2021 at 14:37, Jessica Yu wrote:
>
> +++ Christoph Hellwig [02/02/21 13:13 +0100]:
> >Hi all,
> >
> >this series removes support for long term unused export types and
> >cleans up various loose ends in the module loader.
> >
> >Changes since v2:
> > - clean up klp_find_o
On Thu, 28 Jan 2021 19:27:14 +0800, Tang Bin wrote:
> Utilize the defined parameter 'dev' to make the code cleaner.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: fsl_spdif: Utilize the defined parameter to clear code
commit: 6
On Tue, Feb 02, 2021 at 03:07:51PM +0100, Miroslav Benes wrote:
> > preempt_disable();
> > - sym = find_symbol(symbol, &owner, NULL, NULL, true, true);
> > - if (sym && strong_try_module_get(owner))
> > - sym = NULL;
> > + if (!find_symbol(&fsa) || !strong_try_module_get(fsa.own
On Tue, Feb 02, 2021 at 03:37:04PM +0100, Jessica Yu wrote:
> The patchset looks good so far. After Miroslav's comments are
> addressed, I'll wait an extra day or two in case there are more
> comments before queueing them onto modules-next. I can take the first
> two patches as well provided the ac
This removes arch_supports_pkeys(), arch_usable_pkeys() and
thread_pkey_regs_*() which are remnants from the following:
commit 06bb53b33804 ("powerpc: store and restore the pkey state across context
switches")
commit 2cd4bd192ee9 ("powerpc/pkeys: Fix handling of pkey state across fork()")
commit
On 2/2/21 6:59 PM, Li Xinhai wrote:
what is the overall purpose of this patch set? maybe need a cover
letter?
The goal of the patch series was to enable MOVE_PMD/PUD on ppc64. But
the series itself achieves that by fixing the existing code rather than
adding changes to arch/ppc64. With that
> void *__symbol_get(const char *symbol)
> {
> - struct module *owner;
> - const struct kernel_symbol *sym;
> + struct find_symbol_arg fsa = {
> + .name = symbol,
> + .gplok = true,
> + .warn = true,
> + };
>
> preempt_disable();
>
On 2/2/21 4:17 PM, Peter Zijlstra wrote:
On Tue, Feb 02, 2021 at 02:41:13PM +0530, Aneesh Kumar K.V wrote:
pmd/pud_populate is the right interface to be used to set the respective
page table entries. Some architectures do assume that set_pmd/pud_at
can only be used to set a hugepage PTE. Since w
+++ Christoph Hellwig [02/02/21 13:13 +0100]:
Hi all,
this series removes support for long term unused export types and
cleans up various loose ends in the module loader.
Changes since v2:
- clean up klp_find_object_symbol a bit
- remove the now unused module_assert_mutex helper
Changes since
On Tue, Feb 02, 2021 at 05:41:35PM +1000, Nicholas Piggin wrote:
> Are you planning to update glibc to cope with this as well? Any idea
> about musl? If so, including version numbers would be good (not that
> it's really a problem to carry this patch around).
For glibc from the beginning I planne
On Tue, 2 Feb 2021, Christoph Hellwig wrote:
> EXPORT_UNUSED_SYMBOL* is not actually used anywhere. Remove the
> unused functionality as we generally just remove unused code anyway.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Miroslav Benes
M
On Tue, 2 Feb 2021, Christoph Hellwig wrote:
> As far as I can tell this has never been used at all, and certainly
> not any time recently.
Right, I've always wondered about this one.
> Signed-off-by: Christoph Hellwig
Reviewed-by: Miroslav Benes
M
On Tue, 2 Feb 2021, Christoph Hellwig wrote:
> struct symsearch is only used inside of module.h, so move the definition
> out of module.h.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Miroslav Benes
M
On Tue, 2 Feb 2021, Christoph Hellwig wrote:
> each_symbol_section is only called by find_symbol, so merge the two
> functions.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Miroslav Benes
M
On Tue, 2 Feb 2021, Christoph Hellwig wrote:
> each_symbol_in_section just contains a trivial loop over its arguments.
> Just open code the loop in the two callers.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Miroslav Benes
M
On Tue, 2 Feb 2021, Christoph Hellwig wrote:
> Except for two lockdep asserts module_mutex is only used in module.c.
> Remove the two asserts given that the functions they are in are not
> exported and just called from the module code, and mark module_mutex
> static.
>
> Signed-off-by: Christoph
On Tue, 2 Feb 2021, Christoph Hellwig wrote:
> kallsyms_on_each_symbol and module_kallsyms_on_each_symbol are only used
> by the livepatching code, so don't build them if livepatching is not
> enabled.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Miroslav Benes
M
submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Nicholas-Piggin/huge-vmalloc-mappings/20210202-190833
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
confi
There's a short window during boot where although the kernel is
running little endian, any exceptions will cause the CPU to switch
back to big endian. This situation persists until we call
configure_exceptions(), which calls either the hypervisor or OPAL to
configure the CPU so that exceptions will
If we try to stack trace very early during boot, either due to a
WARN/BUG or manual dump_stack(), we will oops in
valid_emergency_stack() when we try to dereference the paca_ptrs
array.
The fix is simple, we just return false if paca_ptrs isn't allocated
yet. The stack pointer definitely isn't par
EXPORT_UNUSED_SYMBOL* is not actually used anywhere. Remove the
unused functionality as we generally just remove unused code anyway.
Signed-off-by: Christoph Hellwig
---
arch/arm/configs/bcm2835_defconfig | 1 -
arch/arm/configs/mxs_defconfig | 1 -
arch/mips/configs/nlm
As far as I can tell this has never been used at all, and certainly
not any time recently.
Signed-off-by: Christoph Hellwig
---
arch/x86/tools/relocs.c | 4 ++--
include/asm-generic/vmlinux.lds.h | 14 --
include/linux/export.h| 1 -
include/linux/module.h
Simplify the calling convention by passing the find_symbol_args structure
to find_symbol instead of initializing it inside the function.
Signed-off-by: Christoph Hellwig
---
kernel/module.c | 113 ++--
1 file changed, 52 insertions(+), 61 deletions(-)
struct symsearch is only used inside of module.h, so move the definition
out of module.h.
Signed-off-by: Christoph Hellwig
---
include/linux/module.h | 11 ---
kernel/module.c| 11 +++
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/linux/module.h
each_symbol_section is only called by find_symbol, so merge the two
functions.
Signed-off-by: Christoph Hellwig
---
kernel/module.c | 148 ++--
1 file changed, 69 insertions(+), 79 deletions(-)
diff --git a/kernel/module.c b/kernel/module.c
index b050
each_symbol_in_section just contains a trivial loop over its arguments.
Just open code the loop in the two callers.
Signed-off-by: Christoph Hellwig
---
kernel/module.c | 29 +++--
1 file changed, 7 insertions(+), 22 deletions(-)
diff --git a/kernel/module.c b/kernel/mod
Except for two lockdep asserts module_mutex is only used in module.c.
Remove the two asserts given that the functions they are in are not
exported and just called from the module code, and mark module_mutex
static.
Signed-off-by: Christoph Hellwig
---
include/linux/module.h | 2 --
kernel/module
kallsyms_on_each_symbol and module_kallsyms_on_each_symbol are only used
by the livepatching code, so don't build them if livepatching is not
enabled.
Signed-off-by: Christoph Hellwig
---
include/linux/kallsyms.h | 17 -
include/linux/module.h | 16
kernel/kall
Require an explicit call to module_kallsyms_on_each_symbol to look
for symbols in modules instead of the call from kallsyms_on_each_symbol,
and acquire module_mutex inside of module_kallsyms_on_each_symbol instead
of leaving that up to the caller. Note that this slightly changes the
behavior for t
Allow for a RCU-sched critical section around find_module, following
the lower level find_module_all helper, and switch the two callers
outside of module.c to use such a RCU-sched critical section instead
of module_mutex.
Signed-off-by: Christoph Hellwig
Reviewed-by: Petr Mladek
Acked-by: Mirosl
The static inline get_cxl_module function is entirely unused since commit
8bf6b91a5125a ("Revert "powerpc/powernv: Add support for the cxl kernel
api on the real phb"), so remove it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Andrew Donnellan
---
arch/powerpc/platforms/powernv/pci-cxl.c | 22
drm_fb_helper_modinit has a lot of boilerplate for what is not very
simple functionality. Just open code it in the only caller using
IS_ENABLED and IS_MODULE, and skip the find_module check as a
request_module is harmless if the module is already loaded (and not
other caller has this find_module c
Hi all,
this series removes support for long term unused export types and
cleans up various loose ends in the module loader.
Changes since v2:
- clean up klp_find_object_symbol a bit
- remove the now unused module_assert_mutex helper
Changes since v1:
- move struct symsearch to module.c
- r
find_module is not used by modular code any more, and random driver code
has no business calling it to start with.
Signed-off-by: Christoph Hellwig
Reviewed-by: Miroslav Benes
---
kernel/module.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/kernel/module.c b/kernel/module.c
index 4bf30e
On Tue, Feb 02, 2021 at 07:47:04PM +0800, Ding Tianhong wrote:
> On 2021/2/2 19:13, Russell King - ARM Linux admin wrote:
> > On Tue, Feb 02, 2021 at 09:05:02PM +1000, Nicholas Piggin wrote:
> >> diff --git a/arch/arm/include/asm/pgtable.h
> >> b/arch/arm/include/asm/pgtable.h
> >> index c02f24400
On 2021/2/2 19:47, Ding Tianhong wrote:
> On 2021/2/2 19:13, Russell King - ARM Linux admin wrote:
>> On Tue, Feb 02, 2021 at 09:05:02PM +1000, Nicholas Piggin wrote:
>>> diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
>>> index c02f24400369..d63a5bb6bd0c 100644
>>> ---
On 2021/2/2 19:13, Russell King - ARM Linux admin wrote:
> On Tue, Feb 02, 2021 at 09:05:02PM +1000, Nicholas Piggin wrote:
>> diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
>> index c02f24400369..d63a5bb6bd0c 100644
>> --- a/arch/arm/include/asm/pgtable.h
>> +++ b/arc
On Tue, Feb 02, 2021 at 09:05:02PM +1000, Nicholas Piggin wrote:
> diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
> index c02f24400369..d63a5bb6bd0c 100644
> --- a/arch/arm/include/asm/pgtable.h
> +++ b/arch/arm/include/asm/pgtable.h
> @@ -166,6 +166,9 @@ extern struct
Nicholas Piggin writes:
> Excerpts from Raoni Fassina Firmino's message of February 2, 2021 6:05 am:
>> Tested on powerpc64 and powerpc64le, with a glibc build and running the
>> affected glibc's testcase[2], inspected that glibc's backtrace() now gives
>> the correct result and gdb backtrace also
This reduces TLB misses by nearly 30x on a `git diff` workload on a
2-node POWER9 (59,800 -> 2,100) and reduces CPU cycles by 0.54%, due
to vfs hashes being allocated with 2MB pages.
Cc: linuxppc-dev@lists.ozlabs.org
Acked-by: Michael Ellerman
Signed-off-by: Nicholas Piggin
---
.../admin-guide/
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
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.
Reviewed-by: Christoph Hellwig
Signed-off-by: Nicholas Piggin
---
mm/vmalloc.c | 16 +---
1 file changed, 13 insertions(+), 3 de
This is a generic kernel virtual memory mapper, not specific to ioremap.
Code is unchanged other than making vmap_range non-static.
Reviewed-by: Christoph Hellwig
Signed-off-by: Nicholas Piggin
---
include/linux/vmalloc.h | 3 +
mm/ioremap.c| 203 -
If an architecture doesn't support a particular page table level as
a huge vmap page size then allow it to skip defining the support
query function.
Suggested-by: Christoph Hellwig
Signed-off-by: Nicholas Piggin
---
arch/arm64/include/asm/vmalloc.h | 7 +++
arch/powerpc/include/asm/vmall
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
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
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 ---
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
This will be used as a generic kernel virtual mapping function, so
re-name it in preparation.
Reviewed-by: Miaohe Lin
Reviewed-by: Christoph Hellwig
Signed-off-by: Nicholas Piggin
---
mm/ioremap.c | 64 +++-
1 file changed, 33 insertions(+), 31 d
The vmalloc mapper operates on a struct page * array rather than a
linear physical address, re-name it to make this distinction clear.
Reviewed-by: Miaohe Lin
Reviewed-by: Christoph Hellwig
Signed-off-by: Nicholas Piggin
---
mm/vmalloc.c | 16
1 file changed, 8 insertions(+),
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.
Reviewed-by: Miaohe Lin
Reviewed-by: Christoph Hellwig
Signed-off-by: Nicholas Piggin
---
mm/memory.c | 66
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
ARM uses its own PMD folding scheme which is missing pud_page which
should just pass through to pmd_page. Move this from the 3-level
page table to common header.
Cc: Russell King
Cc: Ding Tianhong
Cc: linux-arm-ker...@lists.infradead.org
Signed-off-by: Nicholas Piggin
---
arch/arm/include/asm/
Should be getting close now. No doubt there will be a few more
things but I can do incremental fixes for small things if this gets
into -mm.
Thanks,
Nick
Since v11:
- ARM compile fix (patch 1)
- debug_vm_pgtable compile fix
Since v10:
- Fixed code style, most > 80 colums, tweak patch titles, etc
On Tue, Feb 02, 2021 at 09:54:36AM +, Nadav Amit wrote:
> > On Feb 2, 2021, at 1:31 AM, Peter Zijlstra wrote:
> >
> > On Tue, Feb 02, 2021 at 07:20:55AM +, Nadav Amit wrote:
> >> Arm does not define tlb_end_vma, and consequently it flushes the TLB after
> >> each VMA. I suspect it is not
On Tue, Feb 02, 2021 at 02:41:13PM +0530, Aneesh Kumar K.V wrote:
> pmd/pud_populate is the right interface to be used to set the respective
> page table entries. Some architectures do assume that set_pmd/pud_at
> can only be used to set a hugepage PTE. Since we are not setting up a hugepage
> PTE
On Mon, 1 Feb 2021, Christoph Hellwig wrote:
> On Mon, Feb 01, 2021 at 02:37:12PM +0100, Miroslav Benes wrote:
> > > > This change is not needed. (objname == NULL) means that we are
> > > > interested only in symbols in "vmlinux".
> > > >
> > > > module_kallsyms_on_each_symbol(klp_find_callback,
Nicholas Piggin writes:
> There is no need for this to be in asm, use the new intrrupt entry wrapper.
>
> Signed-off-by: Nicholas Piggin
> ---
> arch/powerpc/include/asm/interrupt.h | 15 +
> arch/powerpc/include/asm/processor.h | 1 +
> arch/powerpc/include/asm/thread_info.h | 6 +
Excerpts from Ding Tianhong's message of January 28, 2021 1:13 pm:
> On 2021/1/26 12:44, 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
> On Feb 2, 2021, at 1:31 AM, Peter Zijlstra wrote:
>
> On Tue, Feb 02, 2021 at 07:20:55AM +, Nadav Amit wrote:
>> Arm does not define tlb_end_vma, and consequently it flushes the TLB after
>> each VMA. I suspect it is not intentional.
>
> ARM is one of those that look at the VM_EXEC bit to
Excerpts from Aneesh Kumar K.V's message of February 2, 2021 4:30 pm:
> On 2/2/21 11:50 AM, Christophe Leroy wrote:
>>
>>
>> Le 02/02/2021 à 07:16, Aneesh Kumar K.V a écrit :
>>> On 2/2/21 11:32 AM, Christophe Leroy wrote:
Le 02/02/2021 à 06:55, Aneesh Kumar K.V a écrit :
> Ane
On Tue, Feb 02, 2021 at 07:20:55AM +, Nadav Amit wrote:
> Arm does not define tlb_end_vma, and consequently it flushes the TLB after
> each VMA. I suspect it is not intentional.
ARM is one of those that look at the VM_EXEC bit to explicitly flush
ITLB IIRC, so it has to.
Since de78a9c "powerpc: Add a framework for Kernel Userspace Access
Protection", user access helpers call user_{read|write}_access_{begin|end}
when user space access is allowed.
890274c "powerpc/64s: Implement KUAP for Radix MMU" made the mentioned
helpers program a AMR special register to allow s
The amount of code executed with enabled user space access (unlocked KUAP)
should be minimal. However with CONFIG_PROVE_LOCKING or
CONFIG_DEBUG_ATOMIC_SLEEP enabled, might_fault() may end up replaying
interrupts which in turn may access the user space and forget to restore
the KUAP state.
The prob
mremap HAVE_MOVE_PMD/PUD optimization time comparison for 1GB region:
1GB mremap - Source PTE-aligned, Destination PTE-aligned
mremap time: 1114318ns
1GB mremap - Source PMD-aligned, Destination PMD-aligned
mremap time: 1097715ns
1GB mremap - Source PUD-aligned, Destinatio
Architectures like ppc64 can only support faster mremap only with radix
translation. Hence allow a runtime check w.r.t support for fast mremap.
Signed-off-by: Aneesh Kumar K.V
---
arch/arm64/include/asm/tlb.h | 6 ++
arch/powerpc/include/asm/tlb.h | 6 ++
arch/x86/include/asm/tlb.h
With a large mmap map size, we can overlap with the text area and using
MAP_FIXED results in unmapping that area. Switch to MAP_FIXED_NOREPLACE
and handle the EEXIST error.
Signed-off-by: Aneesh Kumar K.V
---
tools/testing/selftests/vm/mremap_test.c | 5 +++--
1 file changed, 3 insertions(+), 2
Some architectures do have the concept of page walk cache and only mmu gather
interface supports flushing them. A fast mremap that involves moving page
table pages instead of copying pte entries should flush page walk cache since
the old translation cache is no more valid. Hence switch to mm gather
Instead of hardcoding 4K page size fetch it using sysconf(). For the performance
measurements test still assume 2M and 1G are hugepage sizes.
Signed-off-by: Aneesh Kumar K.V
---
tools/testing/selftests/vm/mremap_test.c | 113 ---
1 file changed, 61 insertions(+), 52 deletions
1 - 100 of 108 matches
Mail list logo