On 16/11/16 12:49, Jan Beulich wrote:
>>>> On 16.11.16 at 13:31, <andrew.coop...@citrix.com> wrote:
>> --- a/xen/arch/x86/cpu/common.c
>> +++ b/xen/arch/x86/cpu/common.c
>> @@ -183,6 +183,25 @@ int get_cpu_vendor(const char v[], enum get_cpu_vendor 
>> mode)
>>      return X86_VENDOR_UNKNOWN;
>>  }
>>  
>> +u8 get_cpu_family(uint32_t raw, u8 *model, u8 *stepping)
>> +{
>> +    u8 fam, mod;
>> +
>> +    fam = (raw >> 8) & 0xf;
>> +    if (fam == 0xf)
>> +            fam += (raw >> 20) & 0xff;
>> +
>> +    mod = (raw >> 4) & 0xf;
>> +    if (fam >= 0x6)
>> +            mod |= (raw >> 12) & 0xf0;
>> +
>> +    if ( model )
>> +            *model = mod;
>> +    if ( stepping )
>> +            *stepping = raw & 0xf;
> With these converted to Linux style
> Reviewed-by: Jan Beulich <jbeul...@suse.com>
>
> But then I think it would be nice if we could slowly get rid of u8 and
> alike, in favor of the standard uint8_t and friends, so I would
> appreciate if you could avoid introducing new instances.

Ok - will do.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to