aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/prom.c
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2005-06-21 17:15:55 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 18:46:31 -0700
commit9b843cda193c56f5e12fedeaf95e0126b706d57b (patch)
treed7dfd9a300d96a1bcbe2f3eda7f978fbd41b9231 /arch/ppc64/kernel/prom.c
parent[PATCH] ppc64: Mark kernel hptes dirty (diff)
downloadlinux-dev-9b843cda193c56f5e12fedeaf95e0126b706d57b.tar.xz
linux-dev-9b843cda193c56f5e12fedeaf95e0126b706d57b.zip
[PATCH] ppc64: set/clear SMT capable bit at boot
Allow the SMT bit to be set/reset at boot, like the ALTIVEC bit. This means we will enable SMT on unknown cpus that support it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc64/kernel/prom.c')
-rw-r--r--arch/ppc64/kernel/prom.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c
index eb6538b58008..47727a6f7346 100644
--- a/arch/ppc64/kernel/prom.c
+++ b/arch/ppc64/kernel/prom.c
@@ -884,6 +884,7 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
{
char *type = get_flat_dt_prop(node, "device_type", NULL);
u32 *prop;
+ unsigned long size;
/* We are scanning "cpu" nodes only */
if (type == NULL || strcmp(type, "cpu") != 0)
@@ -929,6 +930,17 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
cur_cpu_spec->cpu_user_features |= PPC_FEATURE_HAS_ALTIVEC;
}
+ /*
+ * Check for an SMT capable CPU and set the CPU feature. We do
+ * this by looking at the size of the ibm,ppc-interrupt-server#s
+ * property
+ */
+ prop = (u32 *)get_flat_dt_prop(node, "ibm,ppc-interrupt-server#s",
+ &size);
+ cur_cpu_spec->cpu_features &= ~CPU_FTR_SMT;
+ if (prop && ((size / sizeof(u32)) > 1))
+ cur_cpu_spec->cpu_features |= CPU_FTR_SMT;
+
return 0;
}