linux/arch/powerpc/include/asm
Aneesh Kumar K.V d19469e841 power/mm: update pte_write and pte_wrprotect to handle savedwrite
We use pte_write() to check whethwer the pte entry is writable.  This is
mostly used to later mark the pte read only if it is writable.  The other
use of pte_write() is to check whether the pte_entry is writable so that
hardware page table entry can be marked accordingly.  This is used in kvm
where we look at qemu page table entry and update hardware hash page table
for the guest with correct write enable bit.

With the above, for the first usage we should also check the savedwrite
bit so that we can correctly clear the savedwite bit.  For the later, we
add a new variant __pte_write().

With this we can revert write_protect_page part of 595cd8f256 ("mm/ksm:
handle protnone saved writes when making page write protect").  But I left
it as it is as an example code for savedwrite check.

Fixes: c137a2757b ("powerpc/mm/autonuma: switch ppc64 to its own implementation of saved write")
Link: http://lkml.kernel.org/r/1488203787-17849-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Rik van Riel <riel@surriel.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Paul Mackerras <paulus@ozlabs.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-03-09 17:01:09 -08:00
..
book3s power/mm: update pte_write and pte_wrprotect to handle savedwrite 2017-03-09 17:01:09 -08:00
nohash powerpc/booke: Fix boot crash due to null hugepd 2017-03-03 11:24:50 +11:00
8xx_immap.h
Kbuild
accounting.h sched/cputime, powerpc: Prepare accounting structure for cputime flush on tick 2017-01-14 09:54:12 +01:00
agp.h
archrandom.h
asm-compat.h
asm-offsets.h
asm-prototypes.h powerpc: Add a prototype for mcount() so it can be versioned 2017-02-10 13:28:06 +11:00
async_tx.h
atomic.h
backlight.h
barrier.h
bitops.h powerpc/64: Implement clear_bit_unlock_is_negative_byte() 2017-02-18 14:40:01 +11:00
bootx.h
btext.h
bug.h
bugs.h
cache.h powerpc: Add new cache geometry aux vectors 2017-02-06 19:46:04 +11:00
cacheflush.h
cell-pmu.h
cell-regs.h
checksum.h powerpc/64: Fix checksum folding in csum_add() 2017-03-04 23:07:17 +11:00
cmpxchg.h
code-patching.h powerpc/kprobes: Implement Optprobes 2017-02-10 13:28:04 +11:00
compat.h
context_tracking.h
copro.h
cpm.h
cpm1.h
cpm2.h
cpu_has_feature.h powerpc: Fix build failure with clang due to BUILD_BUG_ON() 2017-01-25 13:36:10 +11:00
cpufeature.h
cpuidle.h powerpc/powernv: Fix bug due to labeling ambiguity in power_enter_stop 2017-03-03 11:24:50 +11:00
cputable.h
cputhreads.h
cputime.h sched/cputime: Remove generic asm headers 2017-02-01 09:14:07 +01:00
current.h
dbdma.h
dbell.h
dcr-generic.h
dcr-mmio.h
dcr-native.h
dcr-regs.h
dcr.h
debug.h
delay.h
device.h treewide: Move dma_ops from struct dev_archdata into struct device 2017-01-24 12:23:35 -05:00
disassemble.h
dma-mapping.h treewide: Consolidate get_dma_ops() implementations 2017-01-24 12:23:35 -05:00
dma.h
edac.h
eeh.h
eeh_event.h
ehv_pic.h
elf.h powerpc/64: Fix L1D cache shape vector reporting L1I values 2017-03-06 21:51:32 +11:00
emergency-restart.h
emulated_ops.h
epapr_hcalls.h
exception-64e.h
exception-64s.h powerpc/64: CONFIG_RELOCATABLE support for hmi interrupts 2017-02-07 16:39:44 +11:00
exec.h
fadump.h
fb.h
feature-fixups.h
firmware.h powerpc/pseries: Add hypercall wrappers for hash page table resizing 2017-02-09 21:45:48 +11:00
fixmap.h
floppy.h
fs_pd.h
fsl_85xx_cache_sram.h
fsl_gtm.h
fsl_hcalls.h scripts/spelling.txt: add "partiton" pattern and fix typo instances 2017-02-27 18:43:46 -08:00
fsl_lbc.h
fsl_pamu_stash.h
fsl_pm.h
ftrace.h
futex.h
grackle.h
hardirq.h
head-64.h Merge branch 'topic/ppc-kvm' into next 2017-02-14 17:18:29 +11:00
heathrow.h
highmem.h
hmi.h
hugetlb.h powerpc/mm: Fix little-endian 4K hugetlb 2017-01-18 11:58:50 +11:00
hvcall.h Merge branch 'topic/ppc-kvm' into next 2017-02-14 17:18:29 +11:00
hvconsole.h
hvcserver.h
hvsi.h
hw_breakpoint.h
hw_irq.h
hydra.h
i8259.h
ibmebus.h
icswx.h
ide.h
ima.h powerpc: ima: send the kexec buffer to the next kernel 2016-12-20 09:48:44 -08:00
immap_cpm2.h
io-defs.h
io-workarounds.h
io.h
io_event_irq.h
iommu.h
ipic.h
irq.h
irq_work.h
irqflags.h
isa-bridge.h powerpc: Add support for non-PCI ISA bridges 2017-01-31 13:54:17 +11:00
jump_label.h
kdebug.h
kdump.h
kexec.h powerpc: ima: send the kexec buffer to the next kernel 2016-12-20 09:48:44 -08:00
keylargo.h
kgdb.h
kmap_types.h
kprobes.h kprobes: move kprobe declarations to asm-generic/kprobes.h 2017-02-27 18:43:45 -08:00
kvm_asm.h
kvm_book3s.h KVM: PPC: Book3S HV: Enable radix guest support 2017-01-31 19:11:52 +11:00
kvm_book3s_32.h
kvm_book3s_64.h KVM: PPC: Book3S HV: Split HPT allocation from activation 2017-01-31 21:59:39 +11:00
kvm_book3s_asm.h
kvm_booke.h
kvm_booke_hv_asm.h
kvm_fpu.h
kvm_host.h KVM: PPC: Book3S HV: Outline of KVM-HV HPT resizing implementation 2017-01-31 21:59:56 +11:00
kvm_para.h
kvm_ppc.h KVM: PPC: Book3S HV: Outline of KVM-HV HPT resizing implementation 2017-01-31 21:59:56 +11:00
libata-portmap.h
linkage.h
livepatch.h powerpc/livepatch: Remove klp_write_module_reloc() stub 2016-12-19 11:15:25 +01:00
local.h
lppaca.h
lv1call.h
machdep.h
macio.h
mc146818rtc.h
mce.h
mediabay.h
mm-arch-hooks.h
mman.h
mmu-8xx.h
mmu-40x.h
mmu-44x.h
mmu-book3e.h
mmu.h powerpc updates for 4.11 part 1. 2017-02-22 10:30:38 -08:00
mmu_context.h
mmzone.h
module.h modversions: treat symbol CRCs as 32 bit quantities 2017-02-03 08:28:25 -08:00
mpc5xxx.h
mpc6xx.h
mpc52xx.h
mpc52xx_psc.h
mpc85xx.h
mpc5121.h
mpc8260.h
mpic.h
mpic_msgr.h
mpic_timer.h
msi_bitmap.h
nmi.h
nvram.h
ohare.h
opal-api.h powerpc/powernv: Initialise nest mmu 2017-01-30 20:24:33 +11:00
opal.h Merge branch 'topic/ppc-kvm' into next 2017-02-14 17:18:29 +11:00
oprofile_impl.h
paca.h sched/cputime, powerpc: Migrate stolen_time field to the accounting structure 2017-01-14 09:54:12 +01:00
page.h powerpc: do not make the entire heap executable 2017-02-22 16:41:29 -08:00
page_32.h
page_64.h powerpc/64: Clean up ppc64_caches using a struct per cache 2017-02-06 19:46:04 +11:00
parport.h
pasemi_dma.h
pci-bridge.h powerpc: Move isa bridge definitions to separate include 2017-01-31 13:54:17 +11:00
pci.h treewide: Constify most dma_map_ops structures 2017-01-24 12:23:35 -05:00
percpu.h
perf_event.h
perf_event_fsl_emb.h
perf_event_server.h powerpc/perf: Use MSR to report privilege level on P9 DD1 2017-01-18 16:15:58 +11:00
pgalloc.h
pgtable-be-types.h powerpc/mm: Fix little-endian 4K hugetlb 2017-01-18 11:58:50 +11:00
pgtable-types.h powerpc/mm: Fix little-endian 4K hugetlb 2017-01-18 11:58:50 +11:00
pgtable.h
plpar_wrappers.h powerpc/pseries: Add hypercall wrappers for hash page table resizing 2017-02-09 21:45:48 +11:00
pmac_feature.h
pmac_low_i2c.h
pmac_pfunc.h
pmc.h
pmi.h
pnv-pci.h drivers/pci/hotplug: Mask PDC interrupt if required 2017-02-15 20:02:43 +11:00
powernv.h powerpc/powernv: Initialise nest mmu 2017-01-30 20:24:33 +11:00
ppc-opcode.h powerpc: emulate_step() tests for load/store instructions 2017-03-03 11:24:50 +11:00
ppc-pci.h
ppc4xx.h
ppc4xx_ocm.h
ppc_asm.h powerpc/32: Remove FIX_SRR1 2017-01-26 17:49:32 -06:00
probes.h
processor.h Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next 2017-02-18 21:37:14 +11:00
prom.h powerpc: Update to new option-vector-5 format for CAS 2017-03-06 21:44:09 +11:00
ps3.h treewide: Consolidate get_dma_ops() implementations 2017-01-24 12:23:35 -05:00
ps3av.h
ps3gpu.h
ps3stor.h
pte-common.h
ptrace.h
reg.h powerpc updates for 4.11 part 2 2017-03-01 10:10:16 -08:00
reg_8xx.h powerpc/8xx: Perf events on PPC 8xx 2017-01-26 17:49:34 -06:00
reg_a2.h
reg_booke.h
reg_fsl_emb.h
rheap.h
rio.h
rtas.h powerpc/pseries: Implement indexed-count hotplug memory add 2017-02-17 17:57:30 +11:00
runlatch.h
scom.h
seccomp.h
sections.h
serial.h
setjmp.h
setup.h
sfp-machine.h
shmparam.h
signal.h
smp.h
smu.h
sparsemem.h powerpc/mm: Fix build break with BOOK3S_64=n and MEMORY_HOTPLUG=y 2017-02-15 19:58:39 +11:00
spinlock.h
spinlock_types.h
spu.h
spu_csa.h
spu_info.h
spu_priv1.h
sstep.h
string.h
swab.h
swiotlb.h treewide: Constify most dma_map_ops structures 2017-01-24 12:23:35 -05:00
switch_to.h
synch.h
syscall.h
syscalls.h
systbl.h
tce.h
termios.h
thread_info.h
time.h
timex.h
tlb.h mm: add tlb_remove_check_page_size_change to track page size change 2016-12-12 18:55:07 -08:00
tlbflush.h
tm.h
topology.h
trace.h
trace_clock.h
tsi108.h
tsi108_irq.h
tsi108_pci.h
types.h
uaccess.h powerpc/sparse: Constify the address pointer in __get_user_nosleep() 2017-02-02 16:35:21 +11:00
udbg.h
uic.h
unaligned.h
uninorth.h
unistd.h
uprobes.h
user.h
vdso.h
vdso_datapage.h
vga.h
vio.h
word-at-a-time.h
xics.h powerpc/powernv: Fix CPU hotplug to handle waking on HVI 2017-02-09 15:19:57 +11:00
xilinx_intc.h
xilinx_pci.h
xmon.h
xor.h