Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
"Misc fixes:

- two boot crash fixes
- unwinder fixes
- kexec related kernel direct mappings enhancements/fixes
- more Clang support quirks
- minor cleanups
- Documentation fixes"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/intel_rdt: Fix a typo in Documentation
x86/build: Don't add -maccumulate-outgoing-args w/o compiler support
x86/boot/32: Fix UP boot on Quark and possibly other platforms
x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init()
x86/kexec/64: Use gbpages for identity mappings if available
x86/mm: Add support for gbpages to kernel_ident_mapping_init()
x86/boot: Declare error() as noreturn
x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility
x86/mm: Fix boot crash caused by incorrect loop count calculation in sync_global_pgds()
x86/asm: Don't use RBP as a temporary register in csum_partial_copy_generic()
x86/microcode/AMD: Remove redundant NULL check on mc

+64 -28
+1 -1
Documentation/x86/intel_rdt_ui.txt
··· 295 295 also get 50% of memory bandwidth assuming that the cores 4-7 are SMT 296 296 siblings and only the real time threads are scheduled on the cores 4-7. 297 297 298 - # echo C0 > p0/cpus 298 + # echo F0 > p0/cpus 299 299 300 300 4) Locking between applications 301 301
+2 -1
arch/x86/Makefile
··· 179 179 endif 180 180 181 181 ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1) 182 - KBUILD_CFLAGS += -maccumulate-outgoing-args 182 + # This compiler flag is not supported by Clang: 183 + KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,) 183 184 endif 184 185 185 186 # Stackpointer is addressed different for 32 bit and 64 bit x86
+3 -1
arch/x86/boot/compressed/error.h
··· 1 1 #ifndef BOOT_COMPRESSED_ERROR_H 2 2 #define BOOT_COMPRESSED_ERROR_H 3 3 4 + #include <linux/compiler.h> 5 + 4 6 void warn(char *m); 5 - void error(char *m); 7 + void error(char *m) __noreturn; 6 8 7 9 #endif /* BOOT_COMPRESSED_ERROR_H */
+1 -1
arch/x86/boot/compressed/pagetable.c
··· 70 70 * Due to relocation, pointers must be assigned at run time not build time. 71 71 */ 72 72 static struct x86_mapping_info mapping_info = { 73 - .pmd_flag = __PAGE_KERNEL_LARGE_EXEC, 73 + .page_flag = __PAGE_KERNEL_LARGE_EXEC, 74 74 }; 75 75 76 76 /* Locates and clears a region for a new top level page table. */
+1
arch/x86/include/asm/asm.h
··· 32 32 #define _ASM_ADD __ASM_SIZE(add) 33 33 #define _ASM_SUB __ASM_SIZE(sub) 34 34 #define _ASM_XADD __ASM_SIZE(xadd) 35 + #define _ASM_MUL __ASM_SIZE(mul) 35 36 36 37 #define _ASM_AX __ASM_REG(ax) 37 38 #define _ASM_BX __ASM_REG(bx)
+2 -1
arch/x86/include/asm/init.h
··· 4 4 struct x86_mapping_info { 5 5 void *(*alloc_pgt_page)(void *); /* allocate buf for page table */ 6 6 void *context; /* context for alloc_pgt_page */ 7 - unsigned long pmd_flag; /* page flag for PMD entry */ 7 + unsigned long page_flag; /* page flag for PMD or PUD entry */ 8 8 unsigned long offset; /* ident mapping offset */ 9 + bool direct_gbpages; /* PUD level 1GB page support */ 9 10 }; 10 11 11 12 int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page,
-2
arch/x86/kernel/cpu/microcode/amd.c
··· 352 352 u32 rev, dummy; 353 353 354 354 mc = (struct microcode_amd *)amd_ucode_patch; 355 - if (!mc) 356 - return; 357 355 358 356 rdmsr(MSR_AMD64_PATCH_LEVEL, rev, dummy); 359 357
+5 -1
arch/x86/kernel/machine_kexec_64.c
··· 114 114 struct x86_mapping_info info = { 115 115 .alloc_pgt_page = alloc_pgt_page, 116 116 .context = image, 117 - .pmd_flag = __PAGE_KERNEL_LARGE_EXEC, 117 + .page_flag = __PAGE_KERNEL_LARGE_EXEC, 118 118 }; 119 119 unsigned long mstart, mend; 120 120 pgd_t *level4p; ··· 123 123 124 124 level4p = (pgd_t *)__va(start_pgtable); 125 125 clear_page(level4p); 126 + 127 + if (direct_gbpages) 128 + info.direct_gbpages = true; 129 + 126 130 for (i = 0; i < nr_pfn_mapped; i++) { 127 131 mstart = pfn_mapped[i].start << PAGE_SHIFT; 128 132 mend = pfn_mapped[i].end << PAGE_SHIFT;
+15
arch/x86/kernel/setup.c
··· 1225 1225 1226 1226 kasan_init(); 1227 1227 1228 + #ifdef CONFIG_X86_32 1229 + /* sync back kernel address range */ 1230 + clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY, 1231 + swapper_pg_dir + KERNEL_PGD_BOUNDARY, 1232 + KERNEL_PGD_PTRS); 1233 + 1234 + /* 1235 + * sync back low identity map too. It is used for example 1236 + * in the 32-bit EFI stub. 1237 + */ 1238 + clone_pgd_range(initial_page_table, 1239 + swapper_pg_dir + KERNEL_PGD_BOUNDARY, 1240 + min(KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY)); 1241 + #endif 1242 + 1228 1243 tboot_probe(); 1229 1244 1230 1245 map_vsyscall();
+5 -5
arch/x86/kernel/setup_percpu.c
··· 291 291 292 292 #ifdef CONFIG_X86_32 293 293 /* 294 - * Sync back kernel address range. We want to make sure that 295 - * all kernel mappings, including percpu mappings, are available 296 - * in the smpboot asm. We can't reliably pick up percpu 297 - * mappings using vmalloc_fault(), because exception dispatch 298 - * needs percpu data. 294 + * Sync back kernel address range again. We already did this in 295 + * setup_arch(), but percpu data also needs to be available in 296 + * the smpboot asm. We can't reliably pick up percpu mappings 297 + * using vmalloc_fault(), because exception dispatch needs 298 + * percpu data. 299 299 */ 300 300 clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY, 301 301 swapper_pg_dir + KERNEL_PGD_BOUNDARY,
+6 -6
arch/x86/lib/csum-copy_64.S
··· 55 55 movq %r12, 3*8(%rsp) 56 56 movq %r14, 4*8(%rsp) 57 57 movq %r13, 5*8(%rsp) 58 - movq %rbp, 6*8(%rsp) 58 + movq %r15, 6*8(%rsp) 59 59 60 60 movq %r8, (%rsp) 61 61 movq %r9, 1*8(%rsp) ··· 74 74 /* main loop. clear in 64 byte blocks */ 75 75 /* r9: zero, r8: temp2, rbx: temp1, rax: sum, rcx: saved length */ 76 76 /* r11: temp3, rdx: temp4, r12 loopcnt */ 77 - /* r10: temp5, rbp: temp6, r14 temp7, r13 temp8 */ 77 + /* r10: temp5, r15: temp6, r14 temp7, r13 temp8 */ 78 78 .p2align 4 79 79 .Lloop: 80 80 source ··· 89 89 source 90 90 movq 32(%rdi), %r10 91 91 source 92 - movq 40(%rdi), %rbp 92 + movq 40(%rdi), %r15 93 93 source 94 94 movq 48(%rdi), %r14 95 95 source ··· 103 103 adcq %r11, %rax 104 104 adcq %rdx, %rax 105 105 adcq %r10, %rax 106 - adcq %rbp, %rax 106 + adcq %r15, %rax 107 107 adcq %r14, %rax 108 108 adcq %r13, %rax 109 109 ··· 121 121 dest 122 122 movq %r10, 32(%rsi) 123 123 dest 124 - movq %rbp, 40(%rsi) 124 + movq %r15, 40(%rsi) 125 125 dest 126 126 movq %r14, 48(%rsi) 127 127 dest ··· 203 203 movq 3*8(%rsp), %r12 204 204 movq 4*8(%rsp), %r14 205 205 movq 5*8(%rsp), %r13 206 - movq 6*8(%rsp), %rbp 206 + movq 6*8(%rsp), %r15 207 207 addq $7*8, %rsp 208 208 ret 209 209
+2 -1
arch/x86/lib/kaslr.c
··· 5 5 * kernel starts. This file is included in the compressed kernel and 6 6 * normally linked in the regular. 7 7 */ 8 + #include <asm/asm.h> 8 9 #include <asm/kaslr.h> 9 10 #include <asm/msr.h> 10 11 #include <asm/archrandom.h> ··· 80 79 } 81 80 82 81 /* Circular multiply for better bit diffusion */ 83 - asm("mul %3" 82 + asm(_ASM_MUL "%3" 84 83 : "=a" (random), "=d" (raw) 85 84 : "a" (random), "rm" (mix_const)); 86 85 random += raw;
+13 -1
arch/x86/mm/ident_map.c
··· 13 13 if (pmd_present(*pmd)) 14 14 continue; 15 15 16 - set_pmd(pmd, __pmd((addr - info->offset) | info->pmd_flag)); 16 + set_pmd(pmd, __pmd((addr - info->offset) | info->page_flag)); 17 17 } 18 18 } 19 19 ··· 29 29 next = (addr & PUD_MASK) + PUD_SIZE; 30 30 if (next > end) 31 31 next = end; 32 + 33 + if (info->direct_gbpages) { 34 + pud_t pudval; 35 + 36 + if (pud_present(*pud)) 37 + continue; 38 + 39 + addr &= PUD_MASK; 40 + pudval = __pud((addr - info->offset) | info->page_flag); 41 + set_pud(pud, pudval); 42 + continue; 43 + } 32 44 33 45 if (pud_present(*pud)) { 34 46 pmd = pmd_offset(pud, 0);
+6 -6
arch/x86/mm/init_64.c
··· 94 94 */ 95 95 void sync_global_pgds(unsigned long start, unsigned long end) 96 96 { 97 - unsigned long address; 97 + unsigned long addr; 98 98 99 - for (address = start; address <= end; address += PGDIR_SIZE) { 100 - pgd_t *pgd_ref = pgd_offset_k(address); 99 + for (addr = start; addr <= end; addr = ALIGN(addr + 1, PGDIR_SIZE)) { 100 + pgd_t *pgd_ref = pgd_offset_k(addr); 101 101 const p4d_t *p4d_ref; 102 102 struct page *page; 103 103 ··· 106 106 * handle synchonization on p4d level. 107 107 */ 108 108 BUILD_BUG_ON(pgd_none(*pgd_ref)); 109 - p4d_ref = p4d_offset(pgd_ref, address); 109 + p4d_ref = p4d_offset(pgd_ref, addr); 110 110 111 111 if (p4d_none(*p4d_ref)) 112 112 continue; ··· 117 117 p4d_t *p4d; 118 118 spinlock_t *pgt_lock; 119 119 120 - pgd = (pgd_t *)page_address(page) + pgd_index(address); 121 - p4d = p4d_offset(pgd, address); 120 + pgd = (pgd_t *)page_address(page) + pgd_index(addr); 121 + p4d = p4d_offset(pgd, addr); 122 122 /* the pgt_lock only for Xen */ 123 123 pgt_lock = &pgd_page_get_mm(page)->page_table_lock; 124 124 spin_lock(pgt_lock);
+1
arch/x86/mm/numa_32.c
··· 100 100 printk(KERN_DEBUG "High memory starts at vaddr %08lx\n", 101 101 (ulong) pfn_to_kaddr(highstart_pfn)); 102 102 103 + __vmalloc_start_set = true; 103 104 setup_bootmem_allocator(); 104 105 }
+1 -1
arch/x86/power/hibernate_64.c
··· 104 104 { 105 105 struct x86_mapping_info info = { 106 106 .alloc_pgt_page = alloc_pgt_page, 107 - .pmd_flag = __PAGE_KERNEL_LARGE_EXEC, 107 + .page_flag = __PAGE_KERNEL_LARGE_EXEC, 108 108 .offset = __PAGE_OFFSET, 109 109 }; 110 110 unsigned long mstart, mend;