aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2013-05-06 15:44:36 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-05-07 08:11:55 -0400
commit617e164c35c94c936e3632b387d6dbb3d80c2c02 (patch)
tree920158eee8c4a8026f1c9f8e0b9261d828c03833 /arch/s390/include
parent7678dcfb310a190aea9bee8cdeb1e14987600737 (diff)
s390: disable pfmf for clear page instruction
Wit the introduction of large pages Linux also used pfmf for page clearing. The current implementation is not ideal, though: - currently we set usage intent=0, but cleared pages are often used directly after the clearing - z/VM does not yet provide EDAT - KVM does have to intercept PFMF even for resident pages Lets just the mvcl loop in all cases until we have a well defined pattern were pfmf is besser. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/page.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h
index 75ce9b065f9f..5d64fb7619cc 100644
--- a/arch/s390/include/asm/page.h
+++ b/arch/s390/include/asm/page.h
@@ -32,7 +32,7 @@
32 32
33void storage_key_init_range(unsigned long start, unsigned long end); 33void storage_key_init_range(unsigned long start, unsigned long end);
34 34
35static unsigned long pfmf(unsigned long function, unsigned long address) 35static inline unsigned long pfmf(unsigned long function, unsigned long address)
36{ 36{
37 asm volatile( 37 asm volatile(
38 " .insn rre,0xb9af0000,%[function],%[address]" 38 " .insn rre,0xb9af0000,%[function],%[address]"
@@ -44,17 +44,13 @@ static unsigned long pfmf(unsigned long function, unsigned long address)
44 44
45static inline void clear_page(void *page) 45static inline void clear_page(void *page)
46{ 46{
47 if (MACHINE_HAS_PFMF) { 47 register unsigned long reg1 asm ("1") = 0;
48 pfmf(0x10000, (unsigned long)page); 48 register void *reg2 asm ("2") = page;
49 } else { 49 register unsigned long reg3 asm ("3") = 4096;
50 register unsigned long reg1 asm ("1") = 0; 50 asm volatile(
51 register void *reg2 asm ("2") = page; 51 " mvcl 2,0"
52 register unsigned long reg3 asm ("3") = 4096; 52 : "+d" (reg2), "+d" (reg3) : "d" (reg1)
53 asm volatile( 53 : "memory", "cc");
54 " mvcl 2,0"
55 : "+d" (reg2), "+d" (reg3) : "d" (reg1)
56 : "memory", "cc");
57 }
58} 54}
59 55
60static inline void copy_page(void *to, void *from) 56static inline void copy_page(void *to, void *from)