[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH v2 6/8] arm/mem_access: Add long-descriptor based gpt
Hi Sergej, On 09/06/17 12:50, Sergej Proskurin wrote: + + /* Normalize granule size. */I think 0, 1, 2 is more confusing to read. It would be better to use directly TCR_TG0_*.I agree, however the ARM architecture uses different granularity encodigs for TG0 and TG1. That is the values for (tcr & TCR_TG0_MASK) >> TCR_TG0_SHIFT are different for the same granularity (e.g. shifted TCR_TG0_4K == 0x0 vs. TCR_EL1_TG1_4K == 0x2). Because of this, we won't be able to use TCR_TG0_* and TCR_TG1_* directly. It would be probably easier to read/review the code if a part of this functionality would be in a separate function (e.g. get_granularity()), though. I will see what I can do at this point. You are right sorry. However, I still think open-code 0,1,2 is not intuitive. You should introduce proper define for that. Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |