x86/asm changes for v3.9
Linus,
Please pull the latest x86-asm-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-asm-for-linus
HEAD: 5e2a044daf0c6f897eb69de931e3b29020e874a9 x86, head_32: Give the 6 label a real name
The biggest change (by line count) is the unification of the XOR code and then the introduction of an additional SSE based XOR assembly method.
The other bigger change is the head_32.S rework/cleanup by Borislav Petkov.
Last but not least there's the usual laundry list of small but dangerous (and hopefully perfectly tested) changes to subtle low level x86 code, plus cleanups.
Thanks,
Ingo
------------------>
Borislav Petkov (4):
x86, head_32: Remove i386 pieces
x86: Detect CPUID support early at boot
x86, head_32: Remove second CPUID detection from default_entry x86, head_32: Give the 6 label a real name
David Woodhouse (2):
x86: Enable ARCH_USE_BUILTIN_BSWAP
x86: Require MOVBE feature in cpuid when we use it
Jan Beulich (3):
ix86: Tighten asmlinkage_protect() constraints
x86/xor: Unify SSE-base xor-block routines
x86/xor: Add alternative SSE implementation only prefetching once per 64-byte line
Kirill A. Shutemov (1):
x86/mm: Convert update_mmu_cache() and update_mmu_cache_pmd() to functions
Wen Congyang (1):
x86/mm: Fix the argument passed to sync_global_pgds()
Yuanhan Liu (1):
x86: Fix a typo
arch/x86/Kconfig | 1 + arch/x86/include/asm/linkage.h | 18 +- arch/x86/include/asm/pgtable.h | 12 + arch/x86/include/asm/pgtable_32.h | 7 - arch/x86/include/asm/pgtable_64.h | 3 - arch/x86/include/asm/required-features.h | 8 +- arch/x86/include/asm/xor.h | 491 ++++++++++++++++++++++++++++++- arch/x86/include/asm/xor_32.h | 309 +------------------ arch/x86/include/asm/xor_64.h | 305 +------------------ arch/x86/kernel/head_32.S | 93 +++--- arch/x86/kernel/sys_x86_64.c | 2 +- arch/x86/mm/init_64.c | 4 +- 12 files changed, 574 insertions(+), 679 deletions(-)
arch/x86/Kconfig +1 -0
@@ -114,6 +114,7 @@ config X86 select MODULES_USE_ELF_RELA if X86_64 select CLONE_BACKWARDS if X86_32 select GENERIC_SIGALTSTACK + select ARCH_USE_BUILTIN_BSWAP config INSTRUCTION_DECODER def_bool y
arch/x86/include/asm/linkage.h +9 -9
@@ -27,20 +27,20 @@#define __asmlinkage_protect0 (ret) \ __asmlinkage_protect_n(ret)#define __asmlinkage_protect1 (ret, arg1) \ - __asmlinkage_protect_n(ret, "g" (arg1)) + __asmlinkage_protect_n(ret, "m" (arg1))#define __asmlinkage_protect2 (ret, arg1, arg2) \ - __asmlinkage_protect_n(ret, "g" (arg1), "g" (arg2)) + __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2))#define __asmlinkage_protect3 (ret, arg1, arg2, arg3) \ - __asmlinkage_protect_n(ret, "g" (arg1), "g" (arg2), "g" (arg3)) + __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3))#define __asmlinkage_protect4 (ret, arg1, arg2, arg3, arg4) \ - __asmlinkage_protect_n(ret, "g" (arg1), "g" (arg2), "g" (arg3), \ - "g" (arg4)) + __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3), \ + "m" (arg4))#define __asmlinkage_protect5 (ret, arg1, arg2, arg3, arg4, arg5) \ - __asmlinkage_protect_n(ret, "g" (arg1), "g" (arg2), "g" (arg3), \ - "g" (arg4), "g" (arg5)) + __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3), \ + "m" (arg4), "m" (arg5))#define __asmlinkage_protect6 (ret, arg1, arg2, arg3, arg4, arg5, arg6) \ - __asmlinkage_protect_n(ret, "g" (arg1), "g" (arg2), "g" (arg3), \ - "g" (arg4), "g" (arg5), "g" (arg6)) + __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3), \ + "m" (arg4), "m" (arg5), "m" (arg6))#endif /* CONFIG_X86_32 */
arch/x86/include/asm/pgtable.h +12 -0
@@ -781,6 +781,18 @@ static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count) memcpy(dst, src, count * sizeof(pgd_t)); } +/* +* The x86 doesn't have any external MMU info: the kernel page +* tables contain all the necessary information. +*/ +static inline void update_mmu_cache (struct vm_area_struct *vma, +unsigned long addr,pte_t *ptep) +{ +} +static inline void update_mmu_cache_pmd (struct vm_area_struct *vma, +unsigned long addr,pmd_t *pmd) +{ +}#include <asm-generic/pgtable.h> #endif /* __ASSEMBLY__ */
arch/x86/include/asm/pgtable_32.h +0 -7
@@ -66,13 +66,6 @@ do { \__flush_tlb_one ((vaddr)); \ } while (0) -/* -* The i386 doesn't have any external MMU info: the kernel page -* tables contain all the necessary information. - */ -#define update_mmu_cache (vma, address, ptep) do { } while (0) -#define update_mmu_cache_pmd (vma, address, pmd) do { } while (0) -#endif /* !__ASSEMBLY__ */ /*
arch/x86/include/asm/pgtable_64.h +0 -3
@@ -142,9 +142,6 @@ static inline int pgd_large(pgd_t pgd) { return 0; }#define pte_offset_map (dir, address) pte_offset_kernel((dir), (address))#define pte_unmap (pte) ((void)(pte))/* NOP */ -#define update_mmu_cache (vma, address, ptep) do { } while (0) -#define update_mmu_cache_pmd (vma, address, pmd) do { } while (0) -/* Encode and de-code a swap entry */ #if _PAGE_BIT_FILE < _PAGE_BIT_PROTNONE#define SWP_TYPE_BITS (_PAGE_BIT_FILE - _PAGE_BIT_PRESENT - 1)
arch/x86/include/asm/required-features.h +7 -1
@@ -47,6 +47,12 @@# define NEED_NOPL 0#endif +#ifdef CONFIG_MATOM +# define NEED_MOVBE (1<<(X86_FEATURE_MOVBE & 31)) +#else +# define NEED_MOVBE 0 +#endif +#ifdef CONFIG_X86_64 #ifdef CONFIG_PARAVIRT /* Paravirtualized systems may not have PSE or PGE available */
@@ -80,7 +86,7 @@#define REQUIRED_MASK2 0#define REQUIRED_MASK3 (NEED_NOPL) -#define REQUIRED_MASK4 0 +#define REQUIRED_MASK4 (NEED_MOVBE)#define REQUIRED_MASK5 0#define REQUIRED_MASK6 0#define REQUIRED_MASK7 0
arch/x86/include/asm/xor.h +490 -1
500 lines not on this page · raw message
arch/x86/include/asm/xor_32.h +12 -297
335 lines not on this page · raw message
arch/x86/include/asm/xor_64.h +4 -301
322 lines not on this page · raw message
arch/x86/kernel/head_32.S +36 -57
156 lines not on this page · raw message
arch/x86/kernel/sys_x86_64.c +1 -1
@@ -157,7 +157,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,if (flags &MAP_FIXED )return addr; -/* for MAP_32BIT mappings we force the legact mmap base */ +/* for MAP_32BIT mappings we force the legacy mmap base */ if (!test_thread_flag (TIF_ADDR32 ) && (flags &MAP_32BIT )) goto bottomup;
arch/x86/mm/init_64.c +2 -2
@@ -605,7 +605,7 @@ kernel_physical_mapping_init(unsigned long start, }if (pgd_changed) -sync_global_pgds (addr, end); +sync_global_pgds (addr, end -1 );__flush_tlb_all ();
@@ -981,7 +981,7 @@ vmemmap_populate(struct page *start_page, unsigned long size, int node) } } -sync_global_pgds ((unsigned long )start_page, end); +sync_global_pgds ((unsigned long )start_page, end -1 );return 0 ; }