linux_dsm_epyc7002/arch/arm64/include/asm
Joel Fernandes (Google) 4cf5892495 mm: treewide: remove unused address argument from pte_alloc functions
Patch series "Add support for fast mremap".

This series speeds up the mremap(2) syscall by copying page tables at
the PMD level even for non-THP systems.  There is concern that the extra
'address' argument that mremap passes to pte_alloc may do something
subtle architecture related in the future that may make the scheme not
work.  Also we find that there is no point in passing the 'address' to
pte_alloc since its unused.  This patch therefore removes this argument
tree-wide resulting in a nice negative diff as well.  Also ensuring
along the way that the enabled architectures do not do anything funky
with the 'address' argument that goes unnoticed by the optimization.

Build and boot tested on x86-64.  Build tested on arm64.  The config
enablement patch for arm64 will be posted in the future after more
testing.

The changes were obtained by applying the following Coccinelle script.
(thanks Julia for answering all Coccinelle questions!).
Following fix ups were done manually:
* Removal of address argument from  pte_fragment_alloc
* Removal of pte_alloc_one_fast definitions from m68k and microblaze.

// Options: --include-headers --no-includes
// Note: I split the 'identifier fn' line, so if you are manually
// running it, please unsplit it so it runs for you.

virtual patch

@pte_alloc_func_def depends on patch exists@
identifier E2;
identifier fn =~
"^(__pte_alloc|pte_alloc_one|pte_alloc|__pte_alloc_kernel|pte_alloc_one_kernel)$";
type T2;
@@

 fn(...
- , T2 E2
 )
 { ... }

@pte_alloc_func_proto_noarg depends on patch exists@
type T1, T2, T3, T4;
identifier fn =~ "^(__pte_alloc|pte_alloc_one|pte_alloc|__pte_alloc_kernel|pte_alloc_one_kernel)$";
@@

(
- T3 fn(T1, T2);
+ T3 fn(T1);
|
- T3 fn(T1, T2, T4);
+ T3 fn(T1, T2);
)

@pte_alloc_func_proto depends on patch exists@
identifier E1, E2, E4;
type T1, T2, T3, T4;
identifier fn =~
"^(__pte_alloc|pte_alloc_one|pte_alloc|__pte_alloc_kernel|pte_alloc_one_kernel)$";
@@

(
- T3 fn(T1 E1, T2 E2);
+ T3 fn(T1 E1);
|
- T3 fn(T1 E1, T2 E2, T4 E4);
+ T3 fn(T1 E1, T2 E2);
)

@pte_alloc_func_call depends on patch exists@
expression E2;
identifier fn =~
"^(__pte_alloc|pte_alloc_one|pte_alloc|__pte_alloc_kernel|pte_alloc_one_kernel)$";
@@

 fn(...
-,  E2
 )

@pte_alloc_macro depends on patch exists@
identifier fn =~
"^(__pte_alloc|pte_alloc_one|pte_alloc|__pte_alloc_kernel|pte_alloc_one_kernel)$";
identifier a, b, c;
expression e;
position p;
@@

(
- #define fn(a, b, c) e
+ #define fn(a, b) e
|
- #define fn(a, b) e
+ #define fn(a) e
)

Link: http://lkml.kernel.org/r/20181108181201.88826-2-joelaf@google.com
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Suggested-by: Kirill A. Shutemov <kirill@shutemov.name>
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Kirill A. Shutemov <kirill@shutemov.name>
Cc: William Kucharski <william.kucharski@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-01-04 13:13:47 -08:00
..
xen arm64: xen: Use existing helper to check interrupt status 2018-10-03 16:14:11 +01:00
acenv.h
acpi.h arm64: acpi: Prepare for longer MADTs 2018-11-27 18:00:14 +00:00
alternative.h arm64: Avoid flush_icache_range() in alternatives patching code 2018-06-27 18:21:53 +01:00
arch_gicv3.h irqchip/gic-v3: Probe for SCR_EL3 being clear before resetting AP0Rn 2018-03-22 13:46:18 +00:00
arch_timer.h First batch of KVM changes for 4.15 2017-11-16 13:00:24 -08:00
arm_dsu_pmu.h perf: ARM DynamIQ Shared Unit PMU support 2018-01-02 16:43:12 +00:00
arm-cci.h
asm-bug.h arm64: asm-bug: Renumber macro local labels to avoid clashes 2017-10-25 15:57:15 +01:00
asm-offsets.h
asm-prototypes.h arm64: add <asm/asm-prototypes.h> 2018-12-12 14:10:18 +00:00
asm-uaccess.h arm64: mm: Add additional parameter to uaccess_ttbr0_disable 2018-01-17 13:57:49 +01:00
assembler.h arm64: preempt: Fix big-endian when checking preempt count in assembly 2018-12-11 20:07:03 +00:00
atomic_ll_sc.h arm64: cmpxchg: Use "K" instead of "L" for ll/sc immediate constraint 2018-12-07 17:28:13 +00:00
atomic_lse.h arm64: Avoid masking "old" for LSE cmpxchg() implementation 2018-12-07 17:28:01 +00:00
atomic.h atomics/treewide: Make conditional inc/dec ops optional 2018-06-21 14:25:24 +02:00
barrier.h arm64: Add support for SB barrier and patch in over DSB; ISB sequences 2018-12-06 16:47:04 +00:00
bitops.h locking/atomics/arm64, arm64/bitops: Include <asm-generic/bitops/ext2-atomic-setbit.h> 2018-06-21 12:52:12 +02:00
bitrev.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
boot.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
brk-imm.h kasan, arm64: add brk handler for inline instrumentation 2018-12-28 12:11:44 -08:00
bug.h arm64: Add ASM_BUG() 2017-08-08 16:28:13 +01:00
cache.h arm64: cpufeature: Fix handling of CTR_EL0.IDC field 2018-10-16 11:53:31 +01:00
cacheflush.h arm64: IPI each CPU after invalidating the I-cache for kernel mappings 2018-07-05 17:24:36 +01:00
checksum.h arm64: add missing conversion to __wsum in ip_fast_csum() 2017-06-29 16:32:43 +01:00
clocksource.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cmpxchg.h arm64: Avoid masking "old" for LSE cmpxchg() implementation 2018-12-07 17:28:01 +00:00
compat.h Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-10-25 11:14:36 -07:00
cpu_ops.h
cpu.h arm64/sve: Probe SVE capabilities and usable vector lengths 2017-11-03 15:24:17 +00:00
cpucaps.h arm64: cpufeature: Reduce number of pointer auth CPU caps from 6 to 4 2018-12-13 16:42:47 +00:00
cpufeature.h arm64: cpufeature: Rework ptr auth hwcaps using multi_entry_cap_matches 2018-12-13 16:42:47 +00:00
cpuidle.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cputype.h arm64: capabilities: Merge duplicate Cavium erratum entries 2018-12-06 11:47:44 +00:00
current.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
daifflags.h arm64: daifflags: Use irqflags functions for daifflags 2018-10-03 16:08:52 +01:00
dcc.h arm64: dcc: simplify accessors 2016-09-09 11:41:13 +01:00
debug-monitors.h arm64: Add uprobe support 2016-11-07 18:15:21 +00:00
device.h arm64: use the generic swiotlb_dma_ops 2018-10-19 08:53:24 +02:00
dma-mapping.h arm64: default to the direct mapping in get_arch_dma_ops 2018-12-19 18:00:12 +01:00
dmi.h
efi.h efi: Deduplicate efi_open_volume() 2018-07-22 14:13:43 +02:00
elf.h arm64: mm: Allow forcing all userspace addresses to 52-bit 2018-12-10 18:42:18 +00:00
esr.h arm64: add pointer authentication register bits 2018-12-13 16:42:45 +00:00
exception.h arm64: kernel: Prepare for a DISR user 2018-01-16 15:07:12 +00:00
exec.h arm64: suspend: Reconfigure PSTATE after resume from idle 2016-10-20 09:50:54 +01:00
extable.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fb.h
fixmap.h arm64: kaslr: Put kernel vectors address in separate data page 2017-12-11 13:41:20 +00:00
fpsimd.h arm64: move sve_user_{enable,disable} to <asm/fpsimd.h> 2018-07-12 14:40:39 +01:00
fpsimdmacros.h arm64/sve: Write ZCR_EL1 on context switch only if changed 2018-05-17 18:19:53 +01:00
ftrace.h arm64 festive updates for 4.21 2018-12-25 17:41:56 -08:00
futex.h arm64: futex: Mask __user pointers prior to dereference 2018-02-06 22:53:42 +00:00
hardirq.h arm64: kdump: implement machine_crash_shutdown() 2017-04-05 18:29:15 +01:00
hugetlb.h hugetlb: introduce generic version of huge_ptep_get 2018-10-26 16:26:34 -07:00
hw_breakpoint.h perf/hw_breakpoint: Remove default hw_breakpoint_arch_parse() 2018-06-26 09:07:58 +02:00
hwcap.h
hypervisor.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
image.h arm64: add image head flag definitions 2018-12-06 14:38:51 +00:00
insn.h arm64/insn: add support for emitting ADR/ADRP instructions 2018-11-27 18:47:33 +00:00
io.h arm64: io: Ensure value passed to __iormb() is held in a 64-bit register 2018-11-29 16:36:18 +00:00
irq_work.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq.h arm64: Use the new GENERIC_IRQ_MULTI_HANDLER 2018-08-03 12:14:09 +02:00
irqflags.h arm64: Move the async/fiq helpers to explicitly set process context flags 2017-11-02 15:55:41 +00:00
jump_label.h arm64/kernel: jump_label: Switch to relative references 2018-09-27 17:56:47 +02:00
kasan.h kasan: add tag related helper functions 2018-12-28 12:11:43 -08:00
Kbuild arm64: preempt: Provide our own implementation of asm/preempt.h 2018-12-07 12:35:53 +00:00
kernel-pgtable.h arm64/mm: Separate boot-time page tables from swapper_pg_dir 2018-09-25 15:10:54 +01:00
kexec.h arm64: kexec_file: allow for loading Image-format kernel 2018-12-06 14:38:52 +00:00
kgdb.h
kprobes.h arm64/kprobes: Remove jprobe implementation 2018-06-21 12:33:07 +02:00
kvm_arm.h * ARM: selftests improvements, large PUD support for HugeTLB, 2018-12-26 11:46:28 -08:00
kvm_asm.h arm/arm64: KVM: Add ARM_EXCEPTION_IS_TRAP macro 2018-12-19 17:47:53 +00:00
kvm_coproc.h
kvm_emulate.h arm64: KVM: Consistently advance singlestep when emulating instructions 2018-12-18 14:11:37 +00:00
kvm_host.h * ARM: selftests improvements, large PUD support for HugeTLB, 2018-12-26 11:46:28 -08:00
kvm_hyp.h arm64: KVM: Add synchronization on translation regime change for erratum 1165522 2018-12-10 11:59:07 +00:00
kvm_mmio.h
kvm_mmu.h KVM: arm64: Add support for creating PUD hugepages at stage 2 2018-12-18 15:14:49 +00:00
linkage.h arm64: relax assembly code alignment from 16 byte to 4 byte 2017-09-18 11:20:19 +01:00
lse.h arm64: lse: Include compiler_types.h and export.h for out-of-line LL/SC 2018-03-27 13:14:49 +01:00
memblock.h
memory.h Merge tag 'devicetree-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux 2018-12-28 20:08:34 -08:00
mmu_context.h arm64: Kconfig: Re-jig CONFIG options for 52-bit VA 2018-12-10 18:42:18 +00:00
mmu.h arm64/mm: Separate boot-time page tables from swapper_pg_dir 2018-09-25 15:10:54 +01:00
mmzone.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
module.h arm64/module: switch to ADRP/ADD sequences for PLT entries 2018-11-27 19:00:45 +00:00
neon-intrinsics.h arm64/neon: add workaround for ambiguous C99 stdint.h types 2018-12-06 16:47:05 +00:00
neon.h arm64: drop unused kernel_neon_begin_partial() macro 2018-07-31 10:13:50 +01:00
numa.h arm64: numa: separate out updates to percpu nodeid and NUMA node cpumap 2018-07-06 13:18:18 +01:00
page-def.h arm64: factor out PAGE_* and CONT_* definitions 2017-08-15 18:35:00 +01:00
page.h arm64: Kconfig: Remove ARCH_HAS_HOLES_MEMORYMODEL 2018-09-21 12:02:45 +01:00
paravirt.h x86/paravirt: Use a single ops structure 2018-09-03 16:50:35 +02:00
pci.h PCI: remove PCI_DMA_BUS_IS_PHYS 2018-05-07 07:15:41 +02:00
percpu.h arm64: percpu: Fix LSE implementation of value-returning pcpu atomics 2018-12-12 14:43:35 +00:00
perf_event.h arm64: perf: Treat EXCLUDE_EL* bit definitions as unsigned 2018-12-13 15:34:44 +00:00
pgalloc.h mm: treewide: remove unused address argument from pte_alloc functions 2019-01-04 13:13:47 -08:00
pgtable-hwdef.h kasan, arm64: enable top byte ignore for the kernel 2018-12-28 12:11:43 -08:00
pgtable-prot.h arm64: KVM: Avoid marking pages as XN in Stage-2 if CTR_EL0.DIC is set 2018-07-09 11:37:42 +01:00
pgtable-types.h arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
pgtable.h * ARM: selftests improvements, large PUD support for HugeTLB, 2018-12-26 11:46:28 -08:00
pointer_auth.h arm64: ptr auth: Move per-thread keys from thread_info to thread_struct 2018-12-13 16:42:47 +00:00
preempt.h arm64: preempt: Provide our own implementation of asm/preempt.h 2018-12-07 12:35:53 +00:00
probes.h arm64: Remove reference to asm/opcodes.h 2016-12-05 10:42:34 +00:00
proc-fns.h arm64: mm: Move ASID from TTBR0 to TTBR1 2017-12-11 13:40:25 +00:00
processor.h arm64: ptr auth: Move per-thread keys from thread_info to thread_struct 2018-12-13 16:42:47 +00:00
ptdump.h arm64: dump: Add checking for writable and exectuable pages 2016-11-07 18:15:04 +00:00
ptrace.h KVM updates for v4.20 2018-10-25 17:57:35 -07:00
sdei.h arm64: Add stack information to on_accessible_stack 2018-07-26 11:36:07 +01:00
seccomp.h
sections.h arm64: mmu: add the entry trampolines start/end section markers into sections.h 2018-01-14 18:49:50 +00:00
shmparam.h
signal32.h arm64: compat: Remove leftover variable declaration 2017-08-10 18:17:32 +01:00
simd.h arm64: neon: Fix function may_use_simd() return error status 2018-07-11 17:02:02 +01:00
smp_plat.h
smp.h arm64: smp: Rework early feature mismatched detection 2018-12-10 18:42:18 +00:00
sparsemem.h arm64: add kconfig symbol to configure physical address size 2017-12-22 17:30:33 +00:00
spinlock_types.h arm64: locking: Replace ticket lock implementation with qspinlock 2018-07-05 10:05:06 +01:00
spinlock.h arm64: locking: Replace ticket lock implementation with qspinlock 2018-07-05 10:05:06 +01:00
stack_pointer.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stackprotector.h arm64: enable per-task stack canaries 2018-12-12 18:45:31 +00:00
stacktrace.h arm64: Add stack information to on_accessible_stack 2018-07-26 11:36:07 +01:00
stage2_pgtable.h KVM: arm64: Clarify explanation of STAGE2_PGTABLE_LEVELS 2018-12-18 15:14:50 +00:00
stat.h y2038: globally rename compat_time to old_time32 2018-08-27 14:48:48 +02:00
string.h arm64: lib: use C string functions with KASAN enabled 2018-10-26 16:25:18 -07:00
suspend.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sync_bitops.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
syscall_wrapper.h arm64: implement syscall wrappers 2018-07-12 14:49:48 +01:00
syscall.h arm64: implement syscall wrappers 2018-07-12 14:49:48 +01:00
sysreg.h arm64 festive updates for 4.21 2018-12-25 17:41:56 -08:00
system_misc.h signal/arm64: Push siginfo generation into arm64_notify_die 2018-09-27 21:52:54 +02:00
thread_info.h arm64: ptr auth: Move per-thread keys from thread_info to thread_struct 2018-12-13 16:42:47 +00:00
timex.h arm64: Use physical counter for in-kernel reads when booted in EL2 2017-11-06 16:23:09 +01:00
tlb.h arm64: tlb: Avoid synchronous TLBIs when freeing page tables 2018-09-11 16:49:12 +01:00
tlbflush.h arm64 festive updates for 4.21 2018-12-25 17:41:56 -08:00
topology.h sched/topology, arch/arm64: Rebuild the sched_domain hierarchy when the CPU capacity changes 2018-09-10 11:05:47 +02:00
traps.h signal/arm64: Add and use arm64_force_sig_ptrace_errno_trap 2018-09-27 21:55:15 +02:00
uaccess.h arm64: move untagged_addr macro from uaccess.h to memory.h 2018-12-28 12:11:43 -08:00
unistd32.h arm64: convert compat wrappers to C 2018-07-12 14:49:48 +01:00
unistd.h y2038: utimes: Rework #ifdef guards for compat syscalls 2018-08-29 15:42:23 +02:00
uprobes.h arm64: Add uprobe support 2016-11-07 18:15:21 +00:00
vdso_datapage.h arm64: Add support for CLOCK_MONOTONIC_RAW in clock_gettime() vDSO 2016-07-12 16:06:32 +01:00
vdso.h
virt.h arm64: capabilities: Change scope of VHE to Boot CPU feature 2018-03-26 18:01:41 +01:00
vmap_stack.h arm64: Add vmap_stack header file 2018-01-13 10:45:03 +00:00
word-at-a-time.h Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
xor.h arm64: crypto: add NEON accelerated XOR implementation 2018-12-06 16:47:06 +00:00