Skip to content

Commit 12fcdba

Browse files
committed
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"
2 parents 1268afe + 9032160 commit 12fcdba

File tree

6 files changed

+32
-29
lines changed

6 files changed

+32
-29
lines changed

arch/x86/include/asm/numa_32.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef _ASM_X86_NUMA_32_H
22
#define _ASM_X86_NUMA_32_H
33

4+
extern int numa_off;
5+
46
extern int pxm_to_nid(int pxm);
57
extern void numa_remove_cpu(int cpu);
68

arch/x86/include/asm/numa_64.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ extern void __cpuinit numa_remove_cpu(int cpu);
4040
#ifdef CONFIG_NUMA_EMU
4141
#define FAKE_NODE_MIN_SIZE ((u64)32 << 20)
4242
#define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL))
43+
void numa_emu_cmdline(char *);
4344
#endif /* CONFIG_NUMA_EMU */
4445
#else
4546
static inline void init_cpu_to_node(void) { }

arch/x86/kernel/vmlinux.lds.S

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@ OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT)
3434
#ifdef CONFIG_X86_32
3535
OUTPUT_ARCH(i386)
3636
ENTRY(phys_startup_32)
37+
jiffies = jiffies_64;
3738
#else
3839
OUTPUT_ARCH(i386:x86-64)
3940
ENTRY(phys_startup_64)
41+
jiffies_64 = jiffies;
4042
#endif
4143

4244
#if defined(CONFIG_X86_64) && defined(CONFIG_DEBUG_RODATA)
@@ -140,15 +142,6 @@ SECTIONS
140142
CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
141143

142144
DATA_DATA
143-
/*
144-
* Workaround a binutils (2.20.51.0.12 to 2.21.51.0.3) bug.
145-
* This makes jiffies relocatable in such binutils
146-
*/
147-
#ifdef CONFIG_X86_32
148-
jiffies = jiffies_64;
149-
#else
150-
jiffies_64 = jiffies;
151-
#endif
152145
CONSTRUCTORS
153146

154147
/* rarely changed data like cpu maps */

arch/x86/mm/numa.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@
22
#include <linux/topology.h>
33
#include <linux/module.h>
44
#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);
527

628
/*
729
* Which logical CPUs are on which nodes

arch/x86/mm/numa_64.c

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ s16 apicid_to_node[MAX_LOCAL_APIC] __cpuinitdata = {
3030
[0 ... MAX_LOCAL_APIC-1] = NUMA_NO_NODE
3131
};
3232

33-
int numa_off __initdata;
3433
static unsigned long __initdata nodemap_addr;
3534
static unsigned long __initdata nodemap_size;
3635

@@ -263,6 +262,11 @@ static struct bootnode nodes[MAX_NUMNODES] __initdata;
263262
static struct bootnode physnodes[MAX_NUMNODES] __cpuinitdata;
264263
static char *cmdline __initdata;
265264

265+
void __init numa_emu_cmdline(char *str)
266+
{
267+
cmdline = str;
268+
}
269+
266270
static int __init setup_physnodes(unsigned long start, unsigned long end,
267271
int acpi, int amd)
268272
{
@@ -670,24 +674,6 @@ unsigned long __init numa_free_all_bootmem(void)
670674
return pages;
671675
}
672676

673-
static __init int numa_setup(char *opt)
674-
{
675-
if (!opt)
676-
return -EINVAL;
677-
if (!strncmp(opt, "off", 3))
678-
numa_off = 1;
679-
#ifdef CONFIG_NUMA_EMU
680-
if (!strncmp(opt, "fake=", 5))
681-
cmdline = opt + 5;
682-
#endif
683-
#ifdef CONFIG_ACPI_NUMA
684-
if (!strncmp(opt, "noacpi", 6))
685-
acpi_numa = -1;
686-
#endif
687-
return 0;
688-
}
689-
early_param("numa", numa_setup);
690-
691677
#ifdef CONFIG_NUMA
692678

693679
static __init int find_near_online_node(int node)

arch/x86/mm/srat_32.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ static struct node_memory_chunk_s __initdata node_memory_chunk[MAXCHUNKS];
5959
static int __initdata num_memory_chunks; /* total number of memory chunks */
6060
static u8 __initdata apicid_to_pxm[MAX_APICID];
6161

62-
int numa_off __initdata;
6362
int acpi_numa __initdata;
6463

6564
static __init void bad_srat(void)

0 commit comments

Comments
 (0)