[PATCH, i386]: Add support for CPUID 4 in driver-i386.c

Uros Bizjak ubizjak@gmail.com
Mon Oct 13 11:05:00 GMT 2008


On Mon, Oct 13, 2008 at 7:07 AM, Andi Kleen <andi@firstfloor.org> wrote:

>> Sparse 256-slot table that deals with two (and perhaps someday three)
>> different cache descriptors, indexed by a char selector? I don't think
>> so, but the patch that further cleans this messy stuff is always welcome.
>
> Not sparse, a search table.

4.5 material, we are already changing too much for stage3.

>> >>+   case CACHE_END:
>> >>+     return;
>> >>+   case CACHE_DATA:
>> >>+   case CACHE_UNIFIED:
>> >>+     {
>> >>+       switch ((eax >> 5) & 0x07)
>> >>+         {
>> >>+         case 1:
>> >>+           cache = level1;
>> >>+           break;
>> >>+         case 2:
>> >>+           cache = level2;
>> >>+           break;
>> >>+         default:
>> >>+           cache = NULL;
>> >>
>> >
>> >That seems like a weird value for a enum

> I meant NULL is a pointer, not a integer.
>
> At least sparse tends to complain loudly about that.

Look again, as we have

+  struct cache_desc *cache;

Uros.



More information about the Gcc-patches mailing list