linux-sg2042/arch/csky/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
..
probes csky: Fixup perf probe -x hungup 2020-05-13 17:55:05 +08:00
Makefile csky: Fixup calltrace panic 2020-05-13 17:55:06 +08:00
asm-offsets.c csky: Fixup gdbmacros.txt with name sp in thread_struct 2020-05-15 00:16:18 +08:00
atomic.S csky: Set regs->usp to kernel sp, when the exception is from kernel 2020-02-21 15:43:24 +08:00
cpu-probe.c csky: Exception handling and mm-fault 2018-10-25 23:36:19 +08:00
entry.S csky: Fixup CONFIG_DEBUG_RSEQ 2020-05-28 00:18:36 +00:00
ftrace.c csky/ftrace: Fixup error when disable CONFIG_DYNAMIC_FTRACE 2020-05-13 17:55:05 +08:00
head.S csky: Fixup cpu speculative execution to IO area 2020-04-03 12:40:07 +08:00
irq.c csky: IRQ handling 2018-10-26 00:54:22 +08:00
module.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
perf_callchain.c csky: Fixup perf callchain unwind 2020-05-13 17:55:05 +08:00
perf_event.c csky: Move static keyword to the front of declaration 2019-09-30 11:50:49 +08:00
perf_regs.c csky: Add support for perf registers sampling 2019-04-22 13:44:57 +08:00
power.c csky: Library functions 2018-10-26 00:54:24 +08:00
process.c csky: Fixup gdbmacros.txt with name sp in thread_struct 2020-05-15 00:16:18 +08:00
ptrace.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
setup.c csky: simplify detection of memory zone boundaries 2020-06-03 20:09:43 -07:00
signal.c csky: Add uprobes support 2020-04-03 11:37:51 +08:00
smp.c csky: Fixup cpu speculative execution to IO area 2020-04-03 12:40:07 +08:00
stacktrace.c kernel: rename show_stack_loglvl() => show_stack() 2020-06-09 09:39:13 -07:00
syscall.c csky: System Call 2018-10-25 23:36:19 +08:00
syscall_table.c csky: System Call 2018-10-25 23:36:19 +08:00
time.c csky: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-02-23 12:48:55 +08:00
traps.c csky: Add uprobes support 2020-04-03 11:37:51 +08:00
vdso.c mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
vmlinux.lds.S csky: Tightly-Coupled Memory or Sram support 2020-02-21 15:43:24 +08:00