lkml.org 
[lkml]   [2002]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] How to get number of physical CPU in linux from user space?
>  > +#ifdef CONFIG_SMP
> > + seq_printf(m, "physical processor ID\t: %d\n", phys_proc_id[n]);
> > + seq_printf(m, "number of siblings\t: %d\n", smp_num_siblings);
> > +#endif
>
> Should this be wrapped in a if (cpu_has_ht(c)) { } ?
> Seems silly to be displaying HT information on non-HT CPUs.

Well, without if () you can tell the difference
between 'no hyperthreading' and 'too old
kernel to tell me about hyperthreading so I'd
suggest kill the if ().
Pavel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.139 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site