linux/arch/sh/kernel
Michel Lespinasse d8ed45c5dc mmap locking API: use coccinelle to convert mmap_sem rwsem call sites
This change converts the existing mmap_sem rwsem calls to use the new mmap
locking API instead.

The change is generated using coccinelle with the following rule:

// spatch --sp-file mmap_lock_api.cocci --in-place --include-headers --dir .

@@
expression mm;
@@
(
-init_rwsem
+mmap_init_lock
|
-down_write
+mmap_write_lock
|
-down_write_killable
+mmap_write_lock_killable
|
-down_write_trylock
+mmap_write_trylock
|
-up_write
+mmap_write_unlock
|
-downgrade_write
+mmap_write_downgrade
|
-down_read
+mmap_read_lock
|
-down_read_killable
+mmap_read_lock_killable
|
-down_read_trylock
+mmap_read_trylock
|
-up_read
+mmap_read_unlock
)
-(&mm->mmap_sem)
+(mm)

Signed-off-by: Michel Lespinasse <walken@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Reviewed-by: Laurent Dufour <ldufour@linux.ibm.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Liam Howlett <Liam.Howlett@oracle.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ying Han <yinghan@google.com>
Link: http://lkml.kernel.org/r/20200520052908.204642-5-walken@google.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-09 09:39:14 -07:00
..
cpu Fix for arch/sh build regression with newer binutils, removal of SH5, 2020-06-06 15:22:01 -07:00
syscalls vfs: add faccessat2 syscall 2020-05-14 16:44:25 +02:00
vsyscall mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
asm-offsets.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
crash_dump.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debugtraps.S sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
disassemble.c sh: kernel: disassemble: Mark expected switch fall-throughs 2019-08-11 16:15:16 -05:00
dma-coherent.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
dumpstack.c kernel: rename show_stack_loglvl() => show_stack() 2020-06-09 09:39:13 -07:00
dwarf.c It appears that the zero-day bot did find a bug in my sh build. 2019-01-05 14:08:00 -08:00
entry-common.S sched/rt, sh: Use CONFIG_PREEMPTION 2019-12-08 14:37:35 +01:00
ftrace.c sh/function_graph: Simplify with function_graph_enter() 2018-11-27 20:31:39 -05:00
head_32.S sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
hw_breakpoint.c sh: kernel: hw_breakpoint: Fix missing break in switch statement 2019-08-11 16:15:16 -05:00
idle.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
io_trapped.c sh: add support for folded p4d page tables 2020-06-04 19:06:21 -07:00
io.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
iomap.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
ioport.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
irq_32.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
irq.c softirq/sh: Use nmi_count() on /proc/interrupts print out 2018-05-14 11:25:27 +02:00
kdebugfs.c sh: no need to check return value of debugfs_create functions 2019-06-03 15:39:40 +02:00
kgdb.c sh: kgdb: Mark expected switch fall-throughs 2019-12-10 16:11:42 -06:00
kprobes.c arch/sh: Check for kprobe trap number before trying to handle a kprobe trap 2019-06-26 19:11:13 +09:00
machine_kexec.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
machvec.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
Makefile sh: remove sh5 support 2020-06-01 14:48:52 -04:00
module.c sh: remove sh5 support 2020-06-01 14:48:52 -04:00
nmi_debug.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
perf_callchain.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
perf_event.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
process_32.c sh: add loglvl to show_trace() 2020-06-09 09:39:12 -07:00
process.c sh: remove sh5 support 2020-06-01 14:48:52 -04:00
ptrace_32.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
ptrace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
reboot.c sh: remove sh5 support 2020-06-01 14:48:52 -04:00
relocate_kernel.S sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
return_address.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
setup.c arch/sh/setup: Drop dummy_con initialization 2020-01-14 15:29:18 +01:00
sh_bios.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
sh_ksyms_32.c sh: Add missing DECLARE_EXPORT() for __ashiftrt_r4_xx 2020-06-01 14:48:49 -04:00
signal_32.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
smp.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
stacktrace.c sh/stacktrace: Remove the pointless ULONG_MAX marker 2019-04-14 19:58:28 +02:00
swsusp.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
sys_sh32.c mm: add ksys_fadvise64_64() helper; remove in-kernel call to sys_fadvise64_64() 2018-04-02 20:16:10 +02:00
sys_sh.c mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
syscalls_32.S sh: remove nargs from __SYSCALL 2019-03-05 21:07:13 -08:00
time.c sh: add the sh_ prefix to early platform symbols 2019-10-07 13:50:48 +02:00
topology.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
traps_32.c signal: Remove the task parameter from force_sig_fault 2019-05-29 09:31:43 -05:00
traps.c sh: add loglvl to dump_mem() 2020-06-09 09:39:12 -07:00
unwinder.c sh: kernel: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
vmlinux.lds.S sh: remove sh5 support 2020-06-01 14:48:52 -04:00