lkml.org 
[lkml]   [2011]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 8/9] x86, RAS: Add attributes needed for HW injection
On Wed, Oct 19, 2011 at 05:19:06PM -0400, David Rientjes wrote:
> On Wed, 19 Oct 2011, Borislav Petkov wrote:
>
> > > That wouldn't catch an offline cpuid, you probably want cpu_online(val)?
> >
> > Good catch, thanks.
> >
> > So I'm looking at <arch/x86/kernel/cpuid.c> which is how the validity of
> > a cpu value should be tested properly, IMHO:
> >
> > static int cpuid_open(struct inode *inode, struct file *file)
> > {
> > ...
> >
> > if (cpu >= nr_cpu_ids || !cpu_online(cpu))
> > return -ENXIO; /* No such CPU */
> > ...
>
> Right, the comment for cpumask_test_cpu(), which cpu_online() really is,
> wants a cpu < nr_cpu_ids.

Fixed, thanks.

--
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551


\
 
 \ /
  Last update: 2011-10-20 17:09    [W:0.041 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site