Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245698
b: refs/heads/master
c: 6bd2627
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo committed May 2, 2011
1 parent 2edbf10 commit 1aa1fdb
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c4b90c11992e61123071977c0e5556e59a70852c
refs/heads/master: 6bd262731bf7559bab8c749786e8652e2df1fb4e
10 changes: 10 additions & 0 deletions trunk/arch/x86/include/asm/numa.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef _ASM_X86_NUMA_H
#define _ASM_X86_NUMA_H

#include <linux/nodemask.h>

#include <asm/topology.h>
#include <asm/apicdef.h>

Expand All @@ -22,10 +24,18 @@ static inline void set_apicid_to_node(int apicid, s16 node)
{
__apicid_to_node[apicid] = node;
}

extern int __cpuinit numa_cpu_node(int cpu);

#else /* CONFIG_NUMA */
static inline void set_apicid_to_node(int apicid, s16 node)
{
}

static inline int numa_cpu_node(int cpu)
{
return NUMA_NO_NODE;
}
#endif /* CONFIG_NUMA */

#ifdef CONFIG_X86_32
Expand Down
6 changes: 0 additions & 6 deletions trunk/arch/x86/include/asm/numa_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ extern int numa_off;

extern int pxm_to_nid(int pxm);

#ifdef CONFIG_NUMA
extern int __cpuinit numa_cpu_node(int cpu);
#else /* CONFIG_NUMA */
static inline int numa_cpu_node(int cpu) { return NUMA_NO_NODE; }
#endif /* CONFIG_NUMA */

#ifdef CONFIG_HIGHMEM
extern void set_highmem_pages_init(void);
#else
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/x86/include/asm/numa_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ extern void setup_node_bootmem(int nodeid, unsigned long start,

extern nodemask_t numa_nodes_parsed __initdata;

extern int __cpuinit numa_cpu_node(int cpu);
extern int __init numa_add_memblk(int nodeid, u64 start, u64 end);
extern void __init numa_set_distance(int from, int to, int distance);

Expand All @@ -35,8 +34,6 @@ extern void __init numa_set_distance(int from, int to, int distance);
#define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL))
void numa_emu_cmdline(char *);
#endif /* CONFIG_NUMA_EMU */
#else
static inline int numa_cpu_node(int cpu) { return NUMA_NO_NODE; }
#endif

#endif /* _ASM_X86_NUMA_64_H */
9 changes: 9 additions & 0 deletions trunk/arch/x86/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ s16 __apicid_to_node[MAX_LOCAL_APIC] __cpuinitdata = {
[0 ... MAX_LOCAL_APIC-1] = NUMA_NO_NODE
};

int __cpuinit numa_cpu_node(int cpu)
{
int apicid = early_per_cpu(x86_cpu_to_apicid, cpu);

if (apicid != BAD_APICID)
return __apicid_to_node[apicid];
return NUMA_NO_NODE;
}

cpumask_var_t node_to_cpumask_map[MAX_NUMNODES];
EXPORT_SYMBOL(node_to_cpumask_map);

Expand Down
5 changes: 0 additions & 5 deletions trunk/arch/x86/mm/numa_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,6 @@ extern unsigned long highend_pfn, highstart_pfn;
static void *node_remap_start_vaddr[MAX_NUMNODES];
void set_pmd_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags);

int __cpuinit numa_cpu_node(int cpu)
{
return apic->x86_32_numa_cpu_node(cpu);
}

/*
* FLAT - support for basic PC memory model with discontig enabled, essentially
* a single node with all available processors in it with a flat
Expand Down
9 changes: 0 additions & 9 deletions trunk/arch/x86/mm/numa_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,15 +512,6 @@ unsigned long __init numa_free_all_bootmem(void)
return pages;
}

int __cpuinit numa_cpu_node(int cpu)
{
int apicid = early_per_cpu(x86_cpu_to_apicid, cpu);

if (apicid != BAD_APICID)
return __apicid_to_node[apicid];
return NUMA_NO_NODE;
}

#ifdef CONFIG_MEMORY_HOTPLUG
int memory_add_physaddr_to_nid(u64 start)
{
Expand Down

0 comments on commit 1aa1fdb

Please sign in to comment.