lkml.org 
[lkml]   [2017]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/6] x86: drop unneded members of struct cpuinfo_x86
On 14 February 2017 at 17:17, Borislav Petkov <bp@alien8.de> wrote:
> On Sun, Feb 12, 2017 at 10:12:07PM +0100, Mathias Krause wrote:
>> Those member serve no purpose -- not even fill padding for alignment or
>> such. So just get rid of them.
>
> Well, almost. You need the wp_works_ok removal patch too, otherwise you
> have the 3 bytes hole below.

Heh, indeed! But only since commit 79a8b9aa388b ("x86/CPU/AMD: Bring
back Compute Unit ID") ;)

> But the wp_works_ok goes away too so I guess that's fine.
>
> $ pahole -C cpuinfo_x86 vmlinux
> struct cpuinfo_x86 {
> __u8 x86; /* 0 1 */
> __u8 x86_vendor; /* 1 1 */
> __u8 x86_model; /* 2 1 */
> __u8 x86_mask; /* 3 1 */
> char wp_works_ok; /* 4 1 */
> __u8 x86_virt_bits; /* 5 1 */
> __u8 x86_phys_bits; /* 6 1 */
> __u8 x86_coreid_bits; /* 7 1 */
> __u8 cu_id; /* 8 1 */
>
> /* XXX 3 bytes hole, try to pack */

The cu_id member is "new". Without it there would be no hole. But,
yeah, without wp_works_ok everything's fine again.

Cheers,
Mathias

\
 
 \ /
  Last update: 2017-02-14 19:08    [W:0.993 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site