OpenCloudOS-Kernel/arch/powerpc/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
..
ptrace
syscalls
trace
vdso32
vdso64
.gitignore
Makefile
align.c
asm-offsets.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
audit.c
btext.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
cacheinfo.c
cacheinfo.h
compat_audit.c
cpu_setup_6xx.S
cpu_setup_44x.S
cpu_setup_fsl_booke.S
cpu_setup_pa6t.S
cpu_setup_power.S
cpu_setup_ppc970.S
cputable.c
crash_dump.c
dawr.c
dbell.c
dma-iommu.c
dma-mask.c
dma-swiotlb.c
dt_cpu_ftrs.c
early_32.c
eeh.c
eeh_cache.c
eeh_dev.c
eeh_driver.c
eeh_event.c
eeh_pe.c
eeh_sysfs.c
entry_32.S
entry_64.S
epapr_hcalls.S
epapr_paravirt.c
exceptions-64e.S
exceptions-64s.S
fadump.c
firmware.c
fpu.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
fsl_booke_entry_mapping.S
head_8xx.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
head_32.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
head_32.h
head_40x.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
head_44x.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
head_64.S
head_booke.h
head_fsl_booke.S mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
hw_breakpoint.c
idle.c
idle_6xx.S
idle_book3e.S
idle_book3s.S
idle_e500.S
ima_arch.c
io-workarounds.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
io.c
iomap.c
iommu.c
irq.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
isa-bridge.c
jump_label.c
kgdb.c
kprobes-ftrace.c
kprobes.c
kvm.c
kvm_emul.S
l2cr_6xx.S
legacy_serial.c
mce.c
mce_power.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
misc.S
misc_32.S
misc_64.S
module.c
module.lds
module_32.c
module_64.c
msi.c
note.S
nvram_64.c
of_platform.c
optprobes.c
optprobes_head.S
paca.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
pci-common.c
pci-hotplug.c
pci_32.c
pci_64.c
pci_dn.c
pci_of_scan.c
pmc.c
ppc32.h
ppc_save_regs.S
proc_powerpc.c
process.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
prom.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
prom_init.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
prom_init_check.sh
prom_parse.c
reloc_32.S
reloc_64.S
rtas-proc.c
rtas-rtc.c
rtas.c
rtas_flash.c
rtas_pci.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
rtasd.c
secure_boot.c
security.c
secvar-ops.c
secvar-sysfs.c
setup-common.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
setup.h
setup_32.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
setup_64.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
signal.c
signal.h
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
signal_64.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
smp-tbsync.c
smp.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
stacktrace.c
suspend.c
swsusp.c
swsusp_32.S
swsusp_64.c
swsusp_asm64.S
swsusp_booke.S
sys_ppc32.c
syscall_64.c
syscalls.c
sysfs.c
systbl.S
systbl_chk.sh
tau_6xx.c
time.c
tm.S
traps.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
ucall.S
udbg.c
udbg_16550.c
uprobes.c
vdso.c mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
vecemu.c
vector.S
vmlinux.lds.S
watchdog.c