summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/smp.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2006-06-20 06:56:23 +0200
committerNathan Scott <nathans@sgi.com>2006-06-20 06:56:23 +0200
commit98174e46974323e4941c72e46345f7277755e146 (patch)
treec4644c8f38a519cfb3929d1175fc7107eefe48b9 /arch/sparc/kernel/smp.c
parent[XFS] Remove files from the build that are now unused. (diff)
parentMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus (diff)
downloadlinux-98174e46974323e4941c72e46345f7277755e146.tar.xz
linux-98174e46974323e4941c72e46345f7277755e146.zip
Merge HEAD from ../linux-2.6
Diffstat (limited to 'arch/sparc/kernel/smp.c')
-rw-r--r--arch/sparc/kernel/smp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c
index a93f5da6855d..40b42c88e6a7 100644
--- a/arch/sparc/kernel/smp.c
+++ b/arch/sparc/kernel/smp.c
@@ -69,6 +69,17 @@ void __init smp_store_cpu_info(int id)
"clock-frequency", 0);
cpu_data(id).prom_node = cpu_node;
cpu_data(id).mid = cpu_get_hwmid(cpu_node);
+
+ /* this is required to tune the scheduler correctly */
+ /* is it possible to have CPUs with different cache sizes? */
+ if (id == boot_cpu_id) {
+ int cache_line,cache_nlines;
+ cache_line = 0x20;
+ cache_line = prom_getintdefault(cpu_node, "ecache-line-size", cache_line);
+ cache_nlines = 0x8000;
+ cache_nlines = prom_getintdefault(cpu_node, "ecache-nlines", cache_nlines);
+ max_cache_size = cache_line * cache_nlines;
+ }
if (cpu_data(id).mid < 0)
panic("No MID found for CPU%d at node 0x%08d", id, cpu_node);
}