1
0
Fork 0
alistair23-linux/arch/s390/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
..
fpu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kbuild The core framework has a handful of patches this time around, mostly due 2018-02-01 16:56:07 -08:00
airq.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
alternative-asm.h s390: add assembler macros for CPU alternatives 2018-03-28 08:38:27 +02:00
alternative.h s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00
ap.h s390/ap: rework assembler functions to use unions for in/out register variables 2018-11-30 07:22:05 +01:00
appldata.h s390/appldata: pass parameter list pointer to appldata_asm 2018-10-09 11:20:50 +02:00
archrandom.h s390/archrandom: Rework arch random implementation. 2018-05-30 11:18:04 +02:00
asm-prototypes.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atomic.h atomics/treewide: Make conditional inc/dec ops optional 2018-06-21 14:25:24 +02:00
atomic_ops.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
barrier.h s390: add optimized array_index_mask_nospec 2018-02-05 07:51:41 +01:00
bitops.h fls: change parameter to unsigned int 2019-01-04 13:13:46 -08:00
boot_data.h s390: move ipl block and cmd line handling to early boot phase 2018-10-09 11:21:14 +02:00
bug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bugs.h s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00
cache.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ccwdev.h s390/cio: add helper to query utility strings per given ccw device 2018-05-23 08:06:56 +02:00
ccwgroup.h s390/ccwgroup: add get_ccwgroupdev_by_busid() 2018-10-08 09:09:59 +02:00
checksum.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
chpid.h s390/cio: rename struct channel_path_desc 2018-03-26 16:13:11 +02:00
cio.h s390: assume diag308 set always works 2018-04-10 07:38:59 +02:00
clp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cmb.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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compat.h asm-generic: Move common compat types to asm-generic/compat.h 2018-08-29 15:42:20 +02:00
cpacf.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
cpcmd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cpu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cpu_mf.h s390/cpum_sf: save TOD clock base in SDBs for time conversion 2018-07-31 11:02:27 +02:00
cpufeature.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cputime.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
crw.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
css_chars.h s390/cio: sanitize css_general_characteristics definition 2018-06-12 15:14:05 +02:00
ctl_reg.h KVM: s390: introduce defines for control registers 2018-05-17 09:02:27 +02: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
debug.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
delay.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
diag.h s390/diag: add diag26c support for VNIC info 2018-01-02 13:52:23 -05:00
dis.h s390/tools: generate header files in arch/s390/include/generated/ 2018-01-23 07:36:53 +01:00
dma.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dwarf.h s390/vdso: revise CFI annotations of vDSO functions 2017-12-13 10:51:36 +01:00
eadm.h s390/eadm: fix CONFIG_BLOCK include dependency 2018-02-02 10:47:14 +01:00
ebcdic.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
elf.h compat: Move compat_timespec/ timeval to compat_time.h 2018-04-19 13:29:54 +02:00
exec.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +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
extmem.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
facility.h s390/kasan: support preemptible kernel build 2018-10-22 08:37:45 +02:00
fcx.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ftrace.h s390/ftrace: Add -mfentry and -mnop-mcount support 2018-08-15 22:39:53 -04:00
futex.h s390: remove all code using the access register mode 2017-11-14 11:01:47 +01:00
gmap.h s390/mm: Add huge page dirty sync support 2018-07-30 11:20:18 +01:00
hardirq.h softirq/s390: Move default mutators of overwritten softirq mask to s390 2018-05-14 11:25:28 +02:00
hugetlb.h s390/mm: Clear skeys for newly mapped huge guest pmds 2018-07-30 11:20:18 +01:00
hw_irq.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
idals.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
idle.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
io.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ipl.h s390: move ipl block and cmd line handling to early boot phase 2018-10-09 11:21:14 +02:00
irq.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irqflags.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
isc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
itcw.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
jump_label.h s390/jump_label: Switch to relative references 2018-09-27 17:56:49 +02:00
kasan.h s390/kasan: add option for 4-level paging support 2018-10-09 11:21:29 +02:00
kdebug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
kexec.h s390/kexec_file: Add ELF loader 2018-04-16 09:10:23 +02:00
kprobes.h s390/kprobes: Remove jprobe implementation 2018-06-21 12:33:10 +02:00
kvm_host.h Merge branch 'apv11' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kernelorgnext 2018-10-08 12:14:54 +02:00
kvm_para.h KVM: Introduce paravirtualization hints and KVM_HINTS_DEDICATED 2018-03-06 18:40:44 +01:00
linkage.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
livepatch.h s390: include: Remove redundant license text 2017-11-24 15:37:22 +01:00
lowcore.h s390: add support for virtually mapped kernel stacks 2018-10-09 11:20:57 +02:00
mem_detect.h s390/mem_detect: replace tprot loop with binary search 2018-10-09 11:21:12 +02:00
mmu.h s390/vdso: avoid 64-bit vdso mapping for compat tasks 2018-09-20 13:20:29 +02:00
mmu_context.h s390/mm: fix mis-accounting of pgtable_bytes 2018-11-02 08:31:55 +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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nmi.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
nospec-branch.h s390: correct nospec auto detection init order 2018-04-11 17:46:00 +02:00
nospec-insn.h s390: disable asm code expolines if cc does not support it 2018-06-25 10:14:37 +02:00
numa.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
os_info.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
page-states.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
page.h s390/mm: add missing pfn_to_kaddr helper 2018-10-09 11:21:15 +02:00
pci.h s390/pci: add fmt3 fmb 2018-07-04 08:35:58 +02:00
pci_clp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci_debug.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
pci_dma.h s390: move s390_pci_dma_ops to asm/pci_dma.h 2018-01-10 16:41:19 +01:00
pci_insn.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
pci_io.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
percpu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf_event.h s390/bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type 2017-12-05 15:02:41 +01:00
pgalloc.h mm: treewide: remove unused address argument from pte_alloc functions 2019-01-04 13:13:47 -08:00
pgtable.h s390/mm: fix mis-accounting of pgtable_bytes 2018-11-02 08:31:55 +01:00
pkey.h s390/pkey: Introduce new API for transforming key blobs 2018-10-10 07:37:19 +02:00
pnet.h s390/net: add pnetid support 2018-05-30 11:18:03 +02:00
preempt.h preempt: Move PREEMPT_NEED_RESCHED definition into arch code 2018-12-07 12:35:46 +00:00
processor.h compiler: remove __no_sanitize_address_or_inline again 2018-11-05 08:14:18 -08:00
ptrace.h s390/bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type 2017-12-05 15:02:41 +01:00
purgatory.h s390/purgatory: Remove duplicate variable definitions 2018-07-06 08:47:51 +02:00
qdio.h s390/qdio: clean up AOB handling 2018-09-20 13:20:29 +02:00
runtime_instr.h s390/runtime instrumentation: provide uapi header file 2018-02-02 10:47:15 +01:00
schid.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sclp.h s390/sclp: introduce sclp_early_get_hsa_size 2018-10-09 11:21:13 +02:00
scsw.h s390: fix comment for scsw_cmd_is_valid_sctl 2018-02-22 15:31:24 +01:00
seccomp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sections.h s390: introduce .boot.data section 2018-10-09 11:21:06 +02:00
segment.h s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00
serial.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
set_memory.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
setup.h s390/kasan: use noexec and large pages 2018-10-09 11:21:24 +02:00
shmparam.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
signal.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sigp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
smp.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
sparsemem.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
spinlock.h Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 12:38:26 -08:00
spinlock_types.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
stp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
string.h s390/kasan: replace some memory functions 2018-10-09 11:21:18 +02:00
switch_to.h s390: always save and restore all registers on context switch 2017-12-05 07:51:08 +01:00
syscall.h s390: include: Remove redundant license text 2017-11-24 15:37:22 +01:00
sysinfo.h s390/sysinfo: add and display licensed internal code identifier 2018-02-02 10:47:15 +01:00
termios.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
thread_info.h s390/kasan: increase instrumented stack size to 64k 2018-11-02 08:31:57 +01:00
timex.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tlb.h s390/mm: fix mis-accounting of pgtable_bytes 2018-11-02 08:31:55 +01:00
tlbflush.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
topology.h s390/topology: fix compile error in file arch/s390/kernel/smp.c 2017-11-20 08:51:01 +01:00
uaccess.h s390: remove all code using the access register mode 2017-11-14 11:01:47 +01:00
unistd.h y2038: utimes: Rework #ifdef guards for compat syscalls 2018-08-29 15:42:23 +02:00
uprobes.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
user.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vdso.h s390/vdso: add missing boot_vdso_data declaration 2017-11-14 22:07:49 +01:00
vga.h s390: add a few more SPDX identifiers 2017-12-05 07:51:09 +01:00
vmlinux.lds.h s390: introduce .boot.data section 2018-10-09 11:21:06 +02:00
vtime.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vtimer.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vx-insn.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xor.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00