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

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

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: Unify "numa=" command line option handling
Revert "x86: Make relocatable kernel work with new binutils"

+32 -29
+2
arch/x86/include/asm/numa_32.h
··· 1 1 #ifndef _ASM_X86_NUMA_32_H 2 2 #define _ASM_X86_NUMA_32_H 3 3 4 + extern int numa_off; 5 + 4 6 extern int pxm_to_nid(int pxm); 5 7 extern void numa_remove_cpu(int cpu); 6 8
+1
arch/x86/include/asm/numa_64.h
··· 40 40 #ifdef CONFIG_NUMA_EMU 41 41 #define FAKE_NODE_MIN_SIZE ((u64)32 << 20) 42 42 #define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL)) 43 + void numa_emu_cmdline(char *); 43 44 #endif /* CONFIG_NUMA_EMU */ 44 45 #else 45 46 static inline void init_cpu_to_node(void) { }
+2 -9
arch/x86/kernel/vmlinux.lds.S
··· 34 34 #ifdef CONFIG_X86_32 35 35 OUTPUT_ARCH(i386) 36 36 ENTRY(phys_startup_32) 37 + jiffies = jiffies_64; 37 38 #else 38 39 OUTPUT_ARCH(i386:x86-64) 39 40 ENTRY(phys_startup_64) 41 + jiffies_64 = jiffies; 40 42 #endif 41 43 42 44 #if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA) ··· 142 140 CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES) 143 141 144 142 DATA_DATA 145 - /* 146 - * Workaround a binutils (2.20.51.0.12 to 2.21.51.0.3) bug. 147 - * This makes jiffies relocatable in such binutils 148 - */ 149 - #ifdef CONFIG_X86_32 150 - jiffies = jiffies_64; 151 - #else 152 - jiffies_64 = jiffies; 153 - #endif 154 143 CONSTRUCTORS 155 144 156 145 /* rarely changed data like cpu maps */
+22
arch/x86/mm/numa.c
··· 2 2 #include <linux/topology.h> 3 3 #include <linux/module.h> 4 4 #include <linux/bootmem.h> 5 + #include <asm/numa.h> 6 + #include <asm/acpi.h> 7 + 8 + int __initdata numa_off; 9 + 10 + static __init int numa_setup(char *opt) 11 + { 12 + if (!opt) 13 + return -EINVAL; 14 + if (!strncmp(opt, "off", 3)) 15 + numa_off = 1; 16 + #ifdef CONFIG_NUMA_EMU 17 + if (!strncmp(opt, "fake=", 5)) 18 + numa_emu_cmdline(opt + 5); 19 + #endif 20 + #ifdef CONFIG_ACPI_NUMA 21 + if (!strncmp(opt, "noacpi", 6)) 22 + acpi_numa = -1; 23 + #endif 24 + return 0; 25 + } 26 + early_param("numa", numa_setup); 5 27 6 28 /* 7 29 * Which logical CPUs are on which nodes
+5 -19
arch/x86/mm/numa_64.c
··· 30 30 [0 ... MAX_LOCAL_APIC-1] = NUMA_NO_NODE 31 31 }; 32 32 33 - int numa_off __initdata; 34 33 static unsigned long __initdata nodemap_addr; 35 34 static unsigned long __initdata nodemap_size; 36 35 ··· 261 262 static struct bootnode nodes[MAX_NUMNODES] __initdata; 262 263 static struct bootnode physnodes[MAX_NUMNODES] __cpuinitdata; 263 264 static char *cmdline __initdata; 265 + 266 + void __init numa_emu_cmdline(char *str) 267 + { 268 + cmdline = str; 269 + } 264 270 265 271 static int __init setup_physnodes(unsigned long start, unsigned long end, 266 272 int acpi, int amd) ··· 673 669 674 670 return pages; 675 671 } 676 - 677 - static __init int numa_setup(char *opt) 678 - { 679 - if (!opt) 680 - return -EINVAL; 681 - if (!strncmp(opt, "off", 3)) 682 - numa_off = 1; 683 - #ifdef CONFIG_NUMA_EMU 684 - if (!strncmp(opt, "fake=", 5)) 685 - cmdline = opt + 5; 686 - #endif 687 - #ifdef CONFIG_ACPI_NUMA 688 - if (!strncmp(opt, "noacpi", 6)) 689 - acpi_numa = -1; 690 - #endif 691 - return 0; 692 - } 693 - early_param("numa", numa_setup); 694 672 695 673 #ifdef CONFIG_NUMA 696 674
-1
arch/x86/mm/srat_32.c
··· 59 59 static int __initdata num_memory_chunks; /* total number of memory chunks */ 60 60 static u8 __initdata apicid_to_pxm[MAX_APICID]; 61 61 62 - int numa_off __initdata; 63 62 int acpi_numa __initdata; 64 63 65 64 static __init void bad_srat(void)