[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141008171650.GA7110@us.ibm.com>
Date: Wed, 8 Oct 2014 10:16:50 -0700
From: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
To: Anshuman Khandual <khandual@...ux.vnet.ibm.com>
Cc: linux-kernel@...r.kernel.org, linuxppc-dev@...abs.org,
peterz@...radead.org, akpm@...ux-foundation.org,
tglx@...utronix.de, mikey@...ling.org, james.hogan@...tec.com,
avagin@...nvz.org, Paul.Clothier@...tec.com, palves@...hat.com,
oleg@...hat.com, dhowells@...hat.com, davej@...hat.com,
davem@...emloft.net
Subject: Re: [PATCH V3 3/3] powerpc, ptrace: Enable support for miscellaneous
registers
Anshuman Khandual [khandual@...ux.vnet.ibm.com] wrote:
| On 08/28/2014 03:05 AM, Sukadev Bhattiprolu wrote:
| >
| > I see these in arch/powerpc/include/asm/processor.h
| >
| > #ifdef CONFIG_PPC64
| > unsigned long dscr;
| > int dscr_inherit;
| > unsigned long ppr; /* used to save/restore SMT priority */
| > #endif
| >
| > where there is an 'int' between ppr and dscr. So, should one of
| > the above sizeof(unsigned long) be changed to sizeof(int) ?
|
| Right, I understand that but strangely I get this compile time error
| when it is changed to sizeof(int).
|
| error: call to ‘__compiletime_assert_1350’ declared with attribute error:
| BUILD_BUG_ON failed: TSO(dscr) + sizeof(unsigned long) + sizeof(int) != TSO(ppr)
| BUILD_BUG_ON(TSO(dscr) + sizeof(unsigned long) + sizeof(int) != TSO(ppr));
|
| 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists