Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 245699
b: refs/heads/master
c: 84914ed
h: refs/heads/master
i:
  245697: 2edbf10
  245695: 118f4d6
v: v3
  • Loading branch information
Tejun Heo committed May 2, 2011
1 parent 1aa1fdb commit 7074cdf
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 40 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: 6bd262731bf7559bab8c749786e8652e2df1fb4e
refs/heads/master: 84914ed0ec6787d38e84b510f92ad4ca3a572fd8
9 changes: 6 additions & 3 deletions trunk/arch/x86/include/asm/apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,12 @@ struct apic {
*/
int (*x86_32_early_logical_apicid)(int cpu);

/* determine CPU -> NUMA node mapping */
/*
* Optional method called from setup_local_APIC() after logical
* apicid is guaranteed to be known to initialize apicid -> node
* mapping if NUMA initialization hasn't done so already. Don't
* add new users.
*/
int (*x86_32_numa_cpu_node)(int cpu);
#endif
};
Expand Down Expand Up @@ -537,8 +542,6 @@ static inline int default_phys_pkg_id(int cpuid_apic, int index_msb)
return cpuid_apic >> index_msb;
}

extern int default_x86_32_numa_cpu_node(int cpu);

#endif

static inline unsigned int
Expand Down
20 changes: 3 additions & 17 deletions trunk/arch/x86/kernel/apic/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1245,8 +1245,9 @@ void __cpuinit setup_local_APIC(void)
* a bit too late - percpu allocation has already happened without
* proper NUMA affinity.
*/
set_apicid_to_node(early_per_cpu(x86_cpu_to_apicid, cpu),
apic->x86_32_numa_cpu_node(cpu));
if (apic->x86_32_numa_cpu_node)
set_apicid_to_node(early_per_cpu(x86_cpu_to_apicid, cpu),
apic->x86_32_numa_cpu_node(cpu));
#endif

/*
Expand Down Expand Up @@ -2013,21 +2014,6 @@ void default_init_apic_ldr(void)
apic_write(APIC_LDR, val);
}

#ifdef CONFIG_X86_32
int default_x86_32_numa_cpu_node(int cpu)
{
#ifdef CONFIG_NUMA
int apicid = early_per_cpu(x86_cpu_to_apicid, cpu);

if (apicid != BAD_APICID)
return __apicid_to_node[apicid];
return NUMA_NO_NODE;
#else
return 0;
#endif
}
#endif

/*
* Power management
*/
Expand Down
9 changes: 0 additions & 9 deletions trunk/arch/x86/kernel/apic/apic_noop.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,6 @@ static void noop_apic_write(u32 reg, u32 v)
WARN_ON_ONCE(cpu_has_apic && !disable_apic);
}

#ifdef CONFIG_X86_32
static int noop_x86_32_numa_cpu_node(int cpu)
{
/* we're always on node 0 */
return 0;
}
#endif

struct apic apic_noop = {
.name = "noop",
.probe = noop_probe,
Expand Down Expand Up @@ -195,6 +187,5 @@ struct apic apic_noop = {

#ifdef CONFIG_X86_32
.x86_32_early_logical_apicid = noop_x86_32_early_logical_apicid,
.x86_32_numa_cpu_node = noop_x86_32_numa_cpu_node,
#endif
};
1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/apic/bigsmp_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,5 +253,4 @@ struct apic apic_bigsmp = {
.safe_wait_icr_idle = native_safe_apic_wait_icr_idle,

.x86_32_early_logical_apicid = bigsmp_early_logical_apicid,
.x86_32_numa_cpu_node = default_x86_32_numa_cpu_node,
};
7 changes: 0 additions & 7 deletions trunk/arch/x86/kernel/apic/es7000_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,11 +510,6 @@ static void es7000_setup_apic_routing(void)
nr_ioapics, cpumask_bits(es7000_target_cpus())[0]);
}

static int es7000_numa_cpu_node(int cpu)
{
return 0;
}

static int es7000_cpu_present_to_apicid(int mps_cpu)
{
if (!mps_cpu)
Expand Down Expand Up @@ -688,7 +683,6 @@ struct apic __refdata apic_es7000_cluster = {
.safe_wait_icr_idle = native_safe_apic_wait_icr_idle,

.x86_32_early_logical_apicid = es7000_early_logical_apicid,
.x86_32_numa_cpu_node = es7000_numa_cpu_node,
};

struct apic __refdata apic_es7000 = {
Expand Down Expand Up @@ -752,5 +746,4 @@ struct apic __refdata apic_es7000 = {
.safe_wait_icr_idle = native_safe_apic_wait_icr_idle,

.x86_32_early_logical_apicid = es7000_early_logical_apicid,
.x86_32_numa_cpu_node = es7000_numa_cpu_node,
};
1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/apic/probe_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ struct apic apic_default = {
.safe_wait_icr_idle = native_safe_apic_wait_icr_idle,

.x86_32_early_logical_apicid = default_x86_32_early_logical_apicid,
.x86_32_numa_cpu_node = default_x86_32_numa_cpu_node,
};

extern struct apic apic_numaq;
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/x86/kernel/apic/summit_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,5 +551,4 @@ struct apic apic_summit = {
.safe_wait_icr_idle = native_safe_apic_wait_icr_idle,

.x86_32_early_logical_apicid = summit_early_logical_apicid,
.x86_32_numa_cpu_node = default_x86_32_numa_cpu_node,
};

0 comments on commit 7074cdf

Please sign in to comment.