[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC 08/22] xen/arm: gic-v2: Use SZ_4K rather than PAGE_SIZE
On 05/06/15 13:23, Ian Campbell wrote: > On Fri, 2015-05-08 at 14:29 +0100, Julien Grall wrote: >> Make clear that the GIC interface is 4K and not rely on PAGE_SIZE == 4K. > > I'm not really sure about this, it seems like splitting hairs a bit too > finely. It's very confusing when you read the code and find PAGE_SIZE in place where you expect to have a clearly defined size (here 4KB). I may have spend too much time working about 64KB support too :). > > You forgot your S-o-b. > >> --- >> xen/arch/arm/gic-v2.c | 27 +++++++++++++++------------ >> 1 file changed, 15 insertions(+), 12 deletions(-) >> >> diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c >> index 6c2be33..99d1dfd 100644 >> --- a/xen/arch/arm/gic-v2.c >> +++ b/xen/arch/arm/gic-v2.c >> @@ -85,6 +85,9 @@ static DEFINE_PER_CPU(u8, gic_cpu_id); >> /* Maximum cpu interface per GIC */ >> #define NR_GIC_CPU_IF 8 >> >> +#define SHIFT_4K 12 >> +#define MASK_4K (~(SZ_4K - 1)) > > Should go in the same header as SZ_4K IMHO, and should exist for the > other sizes too (at least the most common ones). I wasn't sure if it was the right things to do as sizes.h as been imported from Linux. Anyway, I will move them to sizes.h Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |