diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-09 21:55:52 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-09 21:55:52 -0400 |
| commit | ec0e6bd3f11c0acf9cbcbe12da3ab45ac7cc7ead (patch) | |
| tree | 2411a0b7a05a6c6c0b43515806180033c8660ac0 /arch/s390/include/asm | |
| parent | e7901af14398bf0272e523936d0774b4469741a8 (diff) | |
| parent | 691d5264158e58004904f285417fefaf8650ffe6 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Martin Schwidefsky:
"One performance optimization for page_clear and a couple of bug fixes"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
s390/mm: fix incorrect ASCE after crst_table_downgrade
s390/ftrace: fix crashes when switching tracers / add notrace to cpu_relax()
s390/pci: unify pci_iomap symbol exports
s390/pci: fix [un]map_resources sequence
s390: let the compiler do page clearing
s390/pci: fix possible information leak in mmio syscall
s390/dcss: array index 'i' is used before limits check.
s390/scm_block: fix off by one during cluster reservation
s390/jump label: improve and fix sanity check
s390/jump label: add missing jump_label_apply_nops() call
Diffstat (limited to 'arch/s390/include/asm')
| -rw-r--r-- | arch/s390/include/asm/mmu_context.h | 2 | ||||
| -rw-r--r-- | arch/s390/include/asm/page.h | 11 |
2 files changed, 2 insertions, 11 deletions
diff --git a/arch/s390/include/asm/mmu_context.h b/arch/s390/include/asm/mmu_context.h index f49b71954654..8fb3802f8fad 100644 --- a/arch/s390/include/asm/mmu_context.h +++ b/arch/s390/include/asm/mmu_context.h | |||
| @@ -62,6 +62,7 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
| 62 | { | 62 | { |
| 63 | int cpu = smp_processor_id(); | 63 | int cpu = smp_processor_id(); |
| 64 | 64 | ||
| 65 | S390_lowcore.user_asce = next->context.asce_bits | __pa(next->pgd); | ||
| 65 | if (prev == next) | 66 | if (prev == next) |
| 66 | return; | 67 | return; |
| 67 | if (MACHINE_HAS_TLB_LC) | 68 | if (MACHINE_HAS_TLB_LC) |
| @@ -73,7 +74,6 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
| 73 | atomic_dec(&prev->context.attach_count); | 74 | atomic_dec(&prev->context.attach_count); |
| 74 | if (MACHINE_HAS_TLB_LC) | 75 | if (MACHINE_HAS_TLB_LC) |
| 75 | cpumask_clear_cpu(cpu, &prev->context.cpu_attach_mask); | 76 | cpumask_clear_cpu(cpu, &prev->context.cpu_attach_mask); |
| 76 | S390_lowcore.user_asce = next->context.asce_bits | __pa(next->pgd); | ||
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | #define finish_arch_post_lock_switch finish_arch_post_lock_switch | 79 | #define finish_arch_post_lock_switch finish_arch_post_lock_switch |
diff --git a/arch/s390/include/asm/page.h b/arch/s390/include/asm/page.h index 7b2ac6e44166..53eacbd4f09b 100644 --- a/arch/s390/include/asm/page.h +++ b/arch/s390/include/asm/page.h | |||
| @@ -37,16 +37,7 @@ static inline void storage_key_init_range(unsigned long start, unsigned long end | |||
| 37 | #endif | 37 | #endif |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | static inline void clear_page(void *page) | 40 | #define clear_page(page) memset((page), 0, PAGE_SIZE) |
| 41 | { | ||
| 42 | register unsigned long reg1 asm ("1") = 0; | ||
| 43 | register void *reg2 asm ("2") = page; | ||
| 44 | register unsigned long reg3 asm ("3") = 4096; | ||
| 45 | asm volatile( | ||
| 46 | " mvcl 2,0" | ||
| 47 | : "+d" (reg2), "+d" (reg3) : "d" (reg1) | ||
| 48 | : "memory", "cc"); | ||
| 49 | } | ||
| 50 | 41 | ||
| 51 | /* | 42 | /* |
| 52 | * copy_page uses the mvcl instruction with 0xb0 padding byte in order to | 43 | * copy_page uses the mvcl instruction with 0xb0 padding byte in order to |
