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' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin:
"This series fixes a couple of build failures, and fixes MTRR cleanup
and memory setup on very specific memory maps.

Finally, it fixes triggering backtraces on all CPUs, which was
inadvertently disabled on x86."

* 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/efi: Fix dummy variable buffer allocation
x86: Fix trigger_all_cpu_backtrace() implementation
x86: Fix section mismatch on load_ucode_ap
x86: fix build error and kconfig for ia32_emulation and binfmt
range: Do not add new blank slot with add_range_with_merge
x86, mtrr: Fix original mtrr range get for mtrr_cleanup

+31 -20
+1
arch/x86/Kconfig
··· 2265 2265 config IA32_EMULATION 2266 2266 bool "IA32 Emulation" 2267 2267 depends on X86_64 2268 + select BINFMT_ELF 2268 2269 select COMPAT_BINFMT_ELF 2269 2270 select HAVE_UID16 2270 2271 ---help---
+5
arch/x86/include/asm/irq.h
··· 41 41 42 42 extern void init_ISA_irqs(void); 43 43 44 + #ifdef CONFIG_X86_LOCAL_APIC 45 + void arch_trigger_all_cpu_backtrace(void); 46 + #define arch_trigger_all_cpu_backtrace arch_trigger_all_cpu_backtrace 47 + #endif 48 + 44 49 #endif /* _ASM_X86_IRQ_H */
+2 -2
arch/x86/include/asm/microcode.h
··· 60 60 #ifdef CONFIG_MICROCODE_EARLY 61 61 #define MAX_UCODE_COUNT 128 62 62 extern void __init load_ucode_bsp(void); 63 - extern __init void load_ucode_ap(void); 63 + extern void __cpuinit load_ucode_ap(void); 64 64 extern int __init save_microcode_in_initrd(void); 65 65 #else 66 66 static inline void __init load_ucode_bsp(void) {} 67 - static inline __init void load_ucode_ap(void) {} 67 + static inline void __cpuinit load_ucode_ap(void) {} 68 68 static inline int __init save_microcode_in_initrd(void) 69 69 { 70 70 return 0;
+1 -3
arch/x86/include/asm/nmi.h
··· 18 18 void __user *, size_t *, loff_t *); 19 19 extern int unknown_nmi_panic; 20 20 21 - void arch_trigger_all_cpu_backtrace(void); 22 - #define arch_trigger_all_cpu_backtrace arch_trigger_all_cpu_backtrace 23 - #endif 21 + #endif /* CONFIG_X86_LOCAL_APIC */ 24 22 25 23 #define NMI_FLAG_FIRST 1 26 24
+1
arch/x86/kernel/apic/hw_nmi.c
··· 9 9 * 10 10 */ 11 11 #include <asm/apic.h> 12 + #include <asm/nmi.h> 12 13 13 14 #include <linux/cpumask.h> 14 15 #include <linux/kdebug.h>
+4 -4
arch/x86/kernel/cpu/mtrr/cleanup.c
··· 714 714 if (mtrr_tom2) 715 715 x_remove_size = (mtrr_tom2 >> PAGE_SHIFT) - x_remove_base; 716 716 717 - nr_range = x86_get_mtrr_mem_range(range, 0, x_remove_base, x_remove_size); 718 717 /* 719 718 * [0, 1M) should always be covered by var mtrr with WB 720 719 * and fixed mtrrs should take effect before var mtrr for it: 721 720 */ 722 - nr_range = add_range_with_merge(range, RANGE_NUM, nr_range, 0, 721 + nr_range = add_range_with_merge(range, RANGE_NUM, 0, 0, 723 722 1ULL<<(20 - PAGE_SHIFT)); 724 - /* Sort the ranges: */ 725 - sort_range(range, nr_range); 723 + /* add from var mtrr at last */ 724 + nr_range = x86_get_mtrr_mem_range(range, nr_range, 725 + x_remove_base, x_remove_size); 726 726 727 727 range_sums = sum_ranges(range, nr_range); 728 728 printk(KERN_INFO "total RAM covered: %ldM\n",
+6 -1
arch/x86/platform/efi/efi.c
··· 1069 1069 * that by attempting to use more space than is available. 1070 1070 */ 1071 1071 unsigned long dummy_size = remaining_size + 1024; 1072 - void *dummy = kmalloc(dummy_size, GFP_ATOMIC); 1072 + void *dummy = kzalloc(dummy_size, GFP_ATOMIC); 1073 + 1074 + if (!dummy) 1075 + return EFI_OUT_OF_RESOURCES; 1073 1076 1074 1077 status = efi.set_variable(efi_dummy_name, &EFI_DUMMY_GUID, 1075 1078 EFI_VARIABLE_NON_VOLATILE | ··· 1091 1088 EFI_VARIABLE_RUNTIME_ACCESS, 1092 1089 0, dummy); 1093 1090 } 1091 + 1092 + kfree(dummy); 1094 1093 1095 1094 /* 1096 1095 * The runtime code may now have triggered a garbage collection
+11 -10
kernel/range.c
··· 4 4 #include <linux/kernel.h> 5 5 #include <linux/init.h> 6 6 #include <linux/sort.h> 7 - 7 + #include <linux/string.h> 8 8 #include <linux/range.h> 9 9 10 10 int add_range(struct range *range, int az, int nr_range, u64 start, u64 end) ··· 32 32 if (start >= end) 33 33 return nr_range; 34 34 35 - /* Try to merge it with old one: */ 35 + /* get new start/end: */ 36 36 for (i = 0; i < nr_range; i++) { 37 - u64 final_start, final_end; 38 37 u64 common_start, common_end; 39 38 40 39 if (!range[i].end) ··· 44 45 if (common_start > common_end) 45 46 continue; 46 47 47 - final_start = min(range[i].start, start); 48 - final_end = max(range[i].end, end); 48 + /* new start/end, will add it back at last */ 49 + start = min(range[i].start, start); 50 + end = max(range[i].end, end); 49 51 50 - /* clear it and add it back for further merge */ 51 - range[i].start = 0; 52 - range[i].end = 0; 53 - return add_range_with_merge(range, az, nr_range, 54 - final_start, final_end); 52 + memmove(&range[i], &range[i + 1], 53 + (nr_range - (i + 1)) * sizeof(range[i])); 54 + range[nr_range - 1].start = 0; 55 + range[nr_range - 1].end = 0; 56 + nr_range--; 57 + i--; 55 58 } 56 59 57 60 /* Need to add it: */