android_kernel_google_msm/arch/mips/include/asm
David Daney 73619eaf2e MIPS: Make set_pte() SMP safe.
commit 46011e6ea39235e4aca656673c500eac81a07a17 upstream.

On MIPS the GLOBAL bit of the PTE must have the same value in any
aligned pair of PTEs.  These pairs of PTEs are referred to as
"buddies".  In a SMP system is is possible for two CPUs to be calling
set_pte() on adjacent PTEs at the same time.  There is a race between
setting the PTE and a different CPU setting the GLOBAL bit in its
buddy PTE.

This race can be observed when multiple CPUs are executing
vmap()/vfree() at the same time.

Make setting the buddy PTE's GLOBAL bit an atomic operation to close
the race condition.

The case of CONFIG_64BIT_PHYS_ADDR && CONFIG_CPU_MIPS32 is *not*
handled.

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10835/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Zefan Li <lizefan@huawei.com>
2016-03-21 09:17:51 +08:00
..
dec
emma
fw
ip32 net: meth: Add set_rx_mode hook to fix ICMPv6 neighbor discovery 2011-12-27 13:17:34 -05:00
lasat
mach-ar7
mach-ath79 MIPS: ath79: Add AR933x specific WMAC setup code 2011-12-07 22:02:48 +00:00
mach-au1x00 Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
mach-bcm47xx MIPS: BCM47XX: move and extend sprom parsing 2012-03-05 15:20:51 -05:00
mach-bcm63xx MIPS: BCM63XX: Add missing include for bcm63xx_gpio.h 2012-06-10 00:36:08 +09:00
mach-cavium-octeon
mach-cobalt
mach-db1x00 MIPS: Alchemy: remove unused board headers 2011-12-08 10:42:15 +00:00
mach-dec
mach-emma2rh
mach-generic MIPS: irq: Remove IRQF_DISABLED 2011-12-07 22:03:45 +00:00
mach-ip22
mach-ip27
mach-ip28
mach-ip32
mach-jazz MIPS: irq: Remove IRQF_DISABLED 2011-12-07 22:03:45 +00:00
mach-jz4740 MIPS: JZ4740: Fix the JZ4740_IRQ_DMA macro 2012-04-27 00:12:48 +01:00
mach-lantiq
mach-lasat
mach-loongson
mach-malta
mach-mipssim
mach-netlogic MIPS: Netlogic: XLP CPU support. 2011-12-07 22:04:55 +00:00
mach-pnx833x
mach-pnx8550
mach-powertv
mach-rc32434
mach-rm
mach-sibyte
mach-tx39xx
mach-tx49xx
mach-vr41xx
mach-wrppmc
mach-yosemite
mips-boards
netlogic MIPS: Netlogic: Merge some of XLR/XLP wakup code 2011-12-07 22:04:56 +00:00
octeon MIPS: Octeon: Update DMA mapping operations for OCTEON II processors. 2011-12-07 22:03:29 +00:00
pci
pmc-sierra/msp71xx
sgi
sibyte
sn
txx9 Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
vr41xx
xtalk
abi.h
addrspace.h
amon.h
arch_hweight.h
asm-offsets.h
asm.h
asmmacro-32.h
asmmacro-64.h
asmmacro.h
atomic.h Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
auxvec.h
barrier.h Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
bcache.h
bitops.h
bitsperlong.h
bmips.h MIPS: BMIPS: Introduce bmips.h 2011-12-07 22:03:18 +00:00
bootinfo.h MIPS: Handle initmem in systems with kernel not in add_memory_region() mem 2011-12-07 22:03:45 +00:00
branch.h MIPS Kprobes: Refactor branch emulation 2011-12-07 22:04:03 +00:00
break.h
bug.h
bugs.h
byteorder.h
cache.h
cachectl.h
cacheflush.h
cacheops.h
cevt-r4k.h
checksum.h
clock.h
cmp.h
cmpxchg.h Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
compat-signal.h
compat.h
compiler.h
cop2.h
cpu-features.h
cpu-info.h
cpu.h Merge branches 'next/ar7', 'next/ath79', 'next/bcm63xx', 'next/bmips', 'next/cavium', 'next/generic', 'next/kprobes', 'next/lantiq', 'next/perf' and 'next/raza' into mips-for-linux-next 2012-01-11 15:42:31 +01:00
cputime.h
current.h
debug.h
delay.h
device.h
div64.h
dma-mapping.h MIPS: adapt for dma_map_ops changes 2012-03-28 16:36:32 +02:00
dma.h Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
ds1287.h
dsp.h
edac.h
elf.h
emergency-restart.h
errno.h
exec.h Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
fb.h
fcntl.h
fixmap.h
floppy.h
fpregdef.h
fpu.h
fpu_emulator.h
ftrace.h
futex.h
gcmpregs.h
gic.h
gio_device.h MIPS: GIO bus support for SGI IP22/28 2011-12-07 22:03:44 +00:00
gpio.h
gt64120.h
hardirq.h
hazards.h MIPS: BMIPS: Add CFLAGS, Makefile entries for BMIPS 2011-12-07 22:03:17 +00:00
highmem.h highmem: kill all __kmap_atomic() 2012-03-20 21:48:30 +08:00
hugetlb.h MIPS: Hugetlb: Keep TLB cache hot while flushing 2011-12-07 22:03:45 +00:00
hw_irq.h
i8259.h
ide.h
inst.h
io.h MIPS: Expose missing pci_io{map,unmap} declarations 2013-08-20 08:26:27 -07:00
ioctl.h
ioctls.h
ipcbuf.h consolidate a bunch of ipcbuf.h instances 2012-01-03 22:55:18 -05:00
irq.h irq_domain/mips: Allow irq_domain on MIPS 2012-02-24 09:47:23 -07:00
irq_cpu.h
irq_gt641xx.h
irq_regs.h
irqflags.h
isadep.h
jazz.h
jazzdma.h
jump_label.h compiler/gcc4: Add quirk for 'asm goto' miscompilation bug 2014-04-14 06:44:16 -07:00
Kbuild UAPI: Fix arch/mips/include/asm/Kbuild to have separate header-y lines 2011-12-12 13:52:27 +00:00
kdebug.h
kexec.h
kgdb.h
kmap_types.h
kprobes.h MIPS Kprobes: Support branch instructions probing 2011-12-07 22:04:03 +00:00
kspd.h
linkage.h
local.h
local64.h
m48t37.h
mc146818-time.h
mc146818rtc.h
mips_machine.h
mips_mt.h
mipsmtregs.h
mipsprom.h
mipsregs.h MIPS: BMIPS: Add set/clear CP0 macros for BMIPS operations 2011-12-07 22:03:18 +00:00
mman.h coredump: add VM_NODUMP, MADV_NODUMP, MADV_CLEAR_NODUMP 2012-03-23 16:58:42 -07:00
mmu.h
mmu_context.h MIPS: Remove get_current_pgd(). 2012-04-27 17:16:29 +01:00
mmzone.h
module.h Merge branches 'next/ar7', 'next/ath79', 'next/bcm63xx', 'next/bmips', 'next/cavium', 'next/generic', 'next/kprobes', 'next/lantiq', 'next/perf' and 'next/raza' into mips-for-linux-next 2012-01-11 15:42:31 +01:00
msc01_ic.h
msgbuf.h
mutex.h
nile4.h
paccess.h
page.h MIPS: Rewrite pfn_valid to work in modules, too. 2013-08-20 08:26:28 -07:00
param.h
parport.h
pci.h PCI: collapse pcibios_resource_to_bus 2012-02-23 20:19:04 -07:00
percpu.h
perf_event.h
pgalloc.h
pgtable-32.h Merge branch 'next/generic' into mips-for-linux-next 2012-01-11 15:41:47 +01:00
pgtable-64.h
pgtable-bits.h
pgtable.h MIPS: Make set_pte() SMP safe. 2016-03-21 09:17:51 +08:00
pmon.h
poll.h
posix_types.h mips: Use generic posix_types.h 2012-02-14 12:01:29 -08:00
prefetch.h
processor.h Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
prom.h
ptrace.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit 2012-01-17 16:41:31 -08:00
r4k-timer.h
r4kcache.h
reboot.h
reg.h
regdef.h
resource.h
rm9k-ocd.h
rtlx.h
scatterlist.h
seccomp.h
sections.h
segment.h
sembuf.h
serial.h
setup.h Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
sgialib.h
sgiarcs.h
sgidefs.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h
signal.h
sim.h
smp-ops.h
smp.h
smtc.h
smtc_ipi.h
smtc_proc.h
smvp.h
sni.h
socket.h net: Add framework to allow sending packets with customized CRC. 2012-02-24 01:37:35 -08:00
sockios.h
sparsemem.h
spinlock.h
spinlock_types.h
spram.h
stackframe.h
stacktrace.h
stat.h
statfs.h
string.h
suspend.h
swab.h
switch_to.h Disintegrate asm/system.h for MIPS 2012-03-28 18:30:02 +01:00
sysmips.h
termbits.h
termios.h
thread_info.h MIPS: Properly align the .data..init_task section. 2012-07-29 08:04:20 -07:00
time.h
timex.h
titan_dep.h
tlb.h
tlbdebug.h
tlbflush.h
tlbmisc.h
topology.h
traps.h MIPS: Add board_ebase_setup() 2011-12-07 22:03:18 +00:00
txx9irq.h
txx9pio.h
txx9tmr.h
types.h Merge branch 'for-next' of git://git.infradead.org/users/dhowells/linux-headers 2012-01-14 18:03:30 -08:00
uaccess.h
uasm.h
ucontext.h
unaligned.h
unistd.h
user.h
vdso.h
vga.h
vpe.h
war.h
watch.h
wbflush.h
xor.h