[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 01/12 v3] xen/arm: vpl011: Move vgic register access functions to vreg.h



Hi Julien,

>
>> -static inline void vgic_reg##sz##_clearbits(uint##sz##_t *reg,          \
>> -                                            register_t bits,            \
>> -                                            const mmio_info_t *info)    \
>> -{                                                                       \
>> -    unsigned long tmp = *reg;                                           \
>> -                                                                        \
>> -    vgic_reg_clearbits(&tmp, bits, info->gpa & offmask,                 \
>> -                       info->dabt.size);                                \
>> -                                                                        \
>> -    *reg = tmp;                                                         \
>> -}
>> -
>>  /*
>>   * 64 bits registers are only supported on platform with 64-bit long.
>>   * This is also allow us to optimize the 32 bit case by using
>
>
> Can you explain why you didn't move the definition of the helpers below? E.g
>
Earlier I was thinking of providing a macro which different modules
could call to define macros such as
vgic_*, vpl011_*. But later it was to be used as vreg_* irrespective
of which module is using these macros.
So now, the macro calls can be moved to vreg.h as they need not be
defined differently for each module.

> /*
>  * 64 bits registers are only supported on platform with 64-bit long.
>  * This is also allow us to optimize the 32 bit case by using
>  * unsigned long rather than uint64_t
>  */
> #if BITS_PER_LONG == 64
> VGIC_REG_HELPERS(64, 0x7);
> #endif
> VGIC_REG_HELPERS(32, 0x3);
>
> #undef VGIC_REG_HELPERS
>

Regards,
Bhupinder

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.