From 73c64f584cdfa895fb6c6435ab842e97281573e3 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Tue, 21 Jun 2005 17:15:55 -0700 Subject: [PATCH] --- yaml --- r: 2514 b: refs/heads/master c: 9b843cda193c56f5e12fedeaf95e0126b706d57b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/ppc64/kernel/prom.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4d8693346903..121c1c2b2051 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 515bae9cdc6a78eda0879e1f158056d73ec808b7 +refs/heads/master: 9b843cda193c56f5e12fedeaf95e0126b706d57b diff --git a/trunk/arch/ppc64/kernel/prom.c b/trunk/arch/ppc64/kernel/prom.c index eb6538b58008..47727a6f7346 100644 --- a/trunk/arch/ppc64/kernel/prom.c +++ b/trunk/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; }