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 EDAC driver fixes, a Xen crash fix, a HyperV log spam
fix and a documentation fix"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86 EDAC, sb_edac.c: Take account of channel hashing when needed
x86 EDAC, sb_edac.c: Repair damage introduced when "fixing" channel address
x86/mm/xen: Suppress hugetlbfs in PV guests
x86/doc: Correct limits in Documentation/x86/x86_64/mm.txt
x86/hyperv: Avoid reporting bogus NMI status for Gen2 instances

+42 -7
+3 -3
Documentation/x86/x86_64/mm.txt
··· 19 19 ffffffef00000000 - ffffffff00000000 (=64 GB) EFI region mapping space 20 20 ... unused hole ... 21 21 ffffffff80000000 - ffffffffa0000000 (=512 MB) kernel text mapping, from phys 0 22 - ffffffffa0000000 - ffffffffff5fffff (=1525 MB) module mapping space 22 + ffffffffa0000000 - ffffffffff5fffff (=1526 MB) module mapping space 23 23 ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls 24 24 ffffffffffe00000 - ffffffffffffffff (=2 MB) unused hole 25 25 ··· 31 31 the processes using the page fault handler, with init_level4_pgt as 32 32 reference. 33 33 34 - Current X86-64 implementations only support 40 bits of address space, 35 - but we support up to 46 bits. This expands into MBZ space in the page tables. 34 + Current X86-64 implementations support up to 46 bits of address space (64 TB), 35 + which is our current limit. This expands into MBZ space in the page tables. 36 36 37 37 We map EFI runtime services in the 'efi_pgd' PGD in a 64Gb large virtual 38 38 memory window (this size is arbitrary, it can be raised later if needed).
+1
arch/x86/include/asm/hugetlb.h
··· 4 4 #include <asm/page.h> 5 5 #include <asm-generic/hugetlb.h> 6 6 7 + #define hugepages_supported() cpu_has_pse 7 8 8 9 static inline int is_hugepage_only_range(struct mm_struct *mm, 9 10 unsigned long addr,
+12
arch/x86/kernel/cpu/mshyperv.c
··· 152 152 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 153 153 }; 154 154 155 + static unsigned char hv_get_nmi_reason(void) 156 + { 157 + return 0; 158 + } 159 + 155 160 static void __init ms_hyperv_init_platform(void) 156 161 { 157 162 /* ··· 196 191 machine_ops.crash_shutdown = hv_machine_crash_shutdown; 197 192 #endif 198 193 mark_tsc_unstable("running on Hyper-V"); 194 + 195 + /* 196 + * Generation 2 instances don't support reading the NMI status from 197 + * 0x61 port. 198 + */ 199 + if (efi_enabled(EFI_BOOT)) 200 + x86_platform.get_nmi_reason = hv_get_nmi_reason; 199 201 } 200 202 201 203 const __refconst struct hypervisor_x86 x86_hyper_ms_hyperv = {
+26 -4
drivers/edac/sb_edac.c
··· 362 362 363 363 /* Memory type detection */ 364 364 bool is_mirrored, is_lockstep, is_close_pg; 365 + bool is_chan_hash; 365 366 366 367 /* Fifo double buffers */ 367 368 struct mce mce_entry[MCE_LOG_LEN]; ··· 1061 1060 return (pkg >> 2) & 0x1; 1062 1061 } 1063 1062 1063 + static int haswell_chan_hash(int idx, u64 addr) 1064 + { 1065 + int i; 1066 + 1067 + /* 1068 + * XOR even bits from 12:26 to bit0 of idx, 1069 + * odd bits from 13:27 to bit1 1070 + */ 1071 + for (i = 12; i < 28; i += 2) 1072 + idx ^= (addr >> i) & 3; 1073 + 1074 + return idx; 1075 + } 1076 + 1064 1077 /**************************************************************************** 1065 1078 Memory check routines 1066 1079 ****************************************************************************/ ··· 1631 1616 KNL_MAX_CHANNELS : NUM_CHANNELS; 1632 1617 u64 knl_mc_sizes[KNL_MAX_CHANNELS]; 1633 1618 1619 + if (pvt->info.type == HASWELL || pvt->info.type == BROADWELL) { 1620 + pci_read_config_dword(pvt->pci_ha0, HASWELL_HASYSDEFEATURE2, &reg); 1621 + pvt->is_chan_hash = GET_BITFIELD(reg, 21, 21); 1622 + } 1634 1623 if (pvt->info.type == HASWELL || pvt->info.type == BROADWELL || 1635 1624 pvt->info.type == KNIGHTS_LANDING) 1636 1625 pci_read_config_dword(pvt->pci_sad1, SAD_TARGET, &reg); ··· 2137 2118 } 2138 2119 2139 2120 ch_way = TAD_CH(reg) + 1; 2140 - sck_way = 1 << TAD_SOCK(reg); 2121 + sck_way = TAD_SOCK(reg); 2141 2122 2142 2123 if (ch_way == 3) 2143 2124 idx = addr >> 6; 2144 - else 2125 + else { 2145 2126 idx = (addr >> (6 + sck_way + shiftup)) & 0x3; 2127 + if (pvt->is_chan_hash) 2128 + idx = haswell_chan_hash(idx, addr); 2129 + } 2146 2130 idx = idx % ch_way; 2147 2131 2148 2132 /* ··· 2179 2157 switch(ch_way) { 2180 2158 case 2: 2181 2159 case 4: 2182 - sck_xch = 1 << sck_way * (ch_way >> 1); 2160 + sck_xch = (1 << sck_way) * (ch_way >> 1); 2183 2161 break; 2184 2162 default: 2185 2163 sprintf(msg, "Invalid mirror set. Can't decode addr"); ··· 2215 2193 2216 2194 ch_addr = addr - offset; 2217 2195 ch_addr >>= (6 + shiftup); 2218 - ch_addr /= ch_way * sck_way; 2196 + ch_addr /= sck_xch; 2219 2197 ch_addr <<= (6 + shiftup); 2220 2198 ch_addr |= addr & ((1 << (6 + shiftup)) - 1); 2221 2199