Re: [PATCH 4/5] x86, cacheinfo: Make L3 cache info per node

From: Borislav Petkov
Date: Wed Apr 21 2010 - 17:05:44 EST


From: "H. Peter Anvin" <hpa@xxxxxxxxx>
Date: Wed, Apr 21, 2010 at 01:46:29PM -0700

> On 04/15/2010 09:41 AM, Borislav Petkov wrote:
> > +
> > +/* max 8 nodes on a system */
> > +static struct amd_l3_cache * __cpuinitdata l3_caches[8];
> > +
>
> This makes me very nervous. Where does this limit come from? It
> appears completely arbitrary and seems like begging for problems in the
> future.

Right. So, we currently have a 3-bit field for the node id of each node,
in conjunction with the L3 cache this means one L3 cache per node. It is
located in F0x60[2:0]. This field is setup to the proper value by the
BIOS.

But yeah, I see your point. I could try initializing it dynamically
per system so that there are no out of bounds accesses. Let me cook up
something tomorrow.

--
Regards/Gruss,
Boris.

--
Advanced Micro Devices, Inc.
Operating Systems Research Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/