Re: [PATCH V3 3/3] powerpc, ptrace: Enable support for miscellaneous registers
From: Sukadev Bhattiprolu <hidden>
Date: 2014-10-08 17:17:25
Also in:
lkml
From: Sukadev Bhattiprolu <hidden>
Date: 2014-10-08 17:17:25
Also in:
lkml
Anshuman Khandual [khandual@linux.vnet.ibm.com] wrote: | On 08/28/2014 03:05 AM, Sukadev Bhattiprolu wrote: | >=20 | > I see these in arch/powerpc/include/asm/processor.h | >=20 | > #ifdef CONFIG_PPC64 | > unsigned long dscr; | > int dscr_inherit; | > unsigned long ppr; /* used to save/restore SMT priority */ | > #endif | >=20 | > where there is an 'int' between ppr and dscr. So, should one of | > the above sizeof(unsigned long) be changed to sizeof(int) ? |=20 | Right, I understand that but strangely I get this compile time error | when it is changed to sizeof(int). |=20 | error: call to =E2=80=98__compiletime_assert_1350=E2=80=99 declared with= attribute error: | BUILD_BUG_ON failed: TSO(dscr) + sizeof(unsigned long) + sizeof(int) != =3D TSO(ppr) | BUILD_BUG_ON(TSO(dscr) + sizeof(unsigned long) + sizeof(int) !=3D TSO(p= pr)); |=20 | may be I am missing something here. I guess there is a 4-byte padding after dscr_inherit. We could make that explicit by adding a field or just go with the sizeof(unsigned long). Thanks, Sukadev