summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Travis <travis@sgi.com>2008-01-30 13:33:14 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:33:14 +0100
commit693e3c560317577a29c625d89f6745d5c7cfd918 (patch)
tree2f8420f929e8cdb8167a57104b7938658cdd3a8f
parent4dbf7af6442a9a882855bed0d999659ac413e3ac (diff)
downloadop-kernel-dev-693e3c560317577a29c625d89f6745d5c7cfd918.zip
op-kernel-dev-693e3c560317577a29c625d89f6745d5c7cfd918.tar.gz
x86: reduce memory and intra-node effects
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--arch/x86/kernel/apic_64.c5
-rw-r--r--arch/x86/kernel/mpparse_64.c6
-rw-r--r--arch/x86/mm/numa_64.c2
-rw-r--r--arch/x86/mm/srat_64.c8
-rw-r--r--include/asm-x86/topology.h2
5 files changed, 14 insertions, 9 deletions
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index f9919c4..85bd3d4 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -1175,14 +1175,15 @@ __cpuinit int apic_is_clustered_box(void)
{
int i, clusters, zeros;
unsigned id;
+ u16 *bios_cpu_apicid = x86_bios_cpu_apicid_early_ptr;
DECLARE_BITMAP(clustermap, NUM_APIC_CLUSTERS);
bitmap_zero(clustermap, NUM_APIC_CLUSTERS);
for (i = 0; i < NR_CPUS; i++) {
/* are we being called early in kernel startup? */
- if (x86_bios_cpu_apicid_early_ptr) {
- id = ((u16 *)x86_bios_cpu_apicid_early_ptr)[i];
+ if (bios_cpu_apicid) {
+ id = bios_cpu_apicid[i];
}
else if (i < nr_cpu_ids) {
if (cpu_present(i))
diff --git a/arch/x86/kernel/mpparse_64.c b/arch/x86/kernel/mpparse_64.c
index fd67175..d3260f8 100644
--- a/arch/x86/kernel/mpparse_64.c
+++ b/arch/x86/kernel/mpparse_64.c
@@ -122,7 +122,7 @@ static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
physid_set(m->mpc_apicid, phys_cpu_present_map);
if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
/*
- * x86_bios_cpu_apicid is required to have processors listed
+ * x86_bios_cpu_apicid is required to have processors listed
* in same order as logical cpu numbers. Hence the first
* entry is BSP, and so on.
*/
@@ -130,8 +130,8 @@ static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
}
/* are we being called early in kernel startup? */
if (x86_cpu_to_apicid_early_ptr) {
- u16 *cpu_to_apicid = (u16 *)x86_cpu_to_apicid_early_ptr;
- u16 *bios_cpu_apicid = (u16 *)x86_bios_cpu_apicid_early_ptr;
+ u16 *cpu_to_apicid = x86_cpu_to_apicid_early_ptr;
+ u16 *bios_cpu_apicid = x86_bios_cpu_apicid_early_ptr;
cpu_to_apicid[cpu] = m->mpc_apicid;
bios_cpu_apicid[cpu] = m->mpc_apicid;
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c
index 382377d..dca58fb 100644
--- a/arch/x86/mm/numa_64.c
+++ b/arch/x86/mm/numa_64.c
@@ -562,7 +562,7 @@ __cpuinit void numa_add_cpu(int cpu)
void __cpuinit numa_set_node(int cpu, int node)
{
- u16 *cpu_to_node_map = (u16 *)x86_cpu_to_node_map_early_ptr;
+ u16 *cpu_to_node_map = x86_cpu_to_node_map_early_ptr;
cpu_pda(cpu)->nodenumber = node;
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c
index bccbdc7..e5a1ec8 100644
--- a/arch/x86/mm/srat_64.c
+++ b/arch/x86/mm/srat_64.c
@@ -346,8 +346,12 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
/* First clean up the node list */
for (i = 0; i < MAX_NUMNODES; i++) {
cutoff_node(i, start, end);
- /* ZZZ why was this needed. At least add a comment */
- if (nodes[i].end && (nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) {
+ /*
+ * don't confuse VM with a node that doesn't have the
+ * minimum memory.
+ */
+ if (nodes[i].end &&
+ (nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) {
unparse_node(i);
node_set_offline(i);
}
diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h
index e612ed8..a89b46e 100644
--- a/include/asm-x86/topology.h
+++ b/include/asm-x86/topology.h
@@ -40,7 +40,7 @@ extern cpumask_t node_to_cpumask_map[];
/* Returns the number of the node containing CPU 'cpu' */
static inline int cpu_to_node(int cpu)
{
- u16 *cpu_to_node_map = (u16 *)x86_cpu_to_node_map_early_ptr;
+ u16 *cpu_to_node_map = x86_cpu_to_node_map_early_ptr;
if (cpu_to_node_map)
return cpu_to_node_map[cpu];
OpenPOWER on IntegriCloud