File tree Expand file tree Collapse file tree 5 files changed +30
-20
lines changed Expand file tree Collapse file tree 5 files changed +30
-20
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ extern void __cpuinit numa_remove_cpu(int cpu);
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 ) { }
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ s16 apicid_to_node[MAX_LOCAL_APIC] __cpuinitdata = {
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
@@ -263,6 +262,11 @@ static struct bootnode nodes[MAX_NUMNODES] __initdata;
263
262
static struct bootnode physnodes [MAX_NUMNODES ] __cpuinitdata ;
264
263
static char * cmdline __initdata ;
265
264
265
+ void __init numa_emu_cmdline (char * str )
266
+ {
267
+ cmdline = str ;
268
+ }
269
+
266
270
static int __init setup_physnodes (unsigned long start , unsigned long end ,
267
271
int acpi , int amd )
268
272
{
@@ -670,24 +674,6 @@ unsigned long __init numa_free_all_bootmem(void)
670
674
return pages ;
671
675
}
672
676
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
-
691
677
#ifdef CONFIG_NUMA
692
678
693
679
static __init int find_near_online_node (int node )
Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ static struct node_memory_chunk_s __initdata node_memory_chunk[MAXCHUNKS];
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 )
You can’t perform that action at this time.
0 commit comments