On 20/10/16 17:37, George Dunlap wrote:
> On 14/10/16 17:02, Andrew Cooper wrote:
>> Drop repeated identical BUILD_BUG_ON()'s
>>
>> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
>> ---
>> CC: Jan Beulich <jbeul...@suse.com>
>> CC: George Dunlap <george.dun...@eu.citrix.com>
>> ---
>>  xen/arch/x86/x86_64/mm.c | 12 +++++-------
>>  1 file changed, 5 insertions(+), 7 deletions(-)
>>
>> diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
>> index b8b6b70..0083beb 100644
>> --- a/xen/arch/x86/x86_64/mm.c
>> +++ b/xen/arch/x86/x86_64/mm.c
>> @@ -540,7 +540,7 @@ void __init paging_init(void)
>>                   sizeof(*machine_to_phys_mapping));
>>      for ( i = 0; i < (mpt_size >> L2_PAGETABLE_SHIFT); i++ )
>>      {
>> -        BUILD_BUG_ON(RO_MPT_VIRT_START & ((1UL << L3_PAGETABLE_SHIFT) - 1));
>> +        BUILD_BUG_ON(!IS_ALIGNED(RO_MPT_VIRT_START, L3_PAGETABLE_SHIFT));
> This doesn't look right.  This is what I have for IS_ALIGNED (in
> xen/include/xen/config.h):
>
> #define IS_ALIGNED(val, align) (((val) & ((align) - 1)) == 0)
>
> There's no shift in the #define, but you've taken it out of the calling
> code.
>
> Did I miss something?

No.  I did.  Sorry for the noise.

This was originally part of a larger series, which I thought I had
cherrypicked out correctly but clearly haven't.

I will drop it for now.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to