[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 Bhupinder, On 10/05/17 15:24, Bhupinder Thakur wrote: These functions are generic in nature and can be reused by other emulation code in Xen. One recent example is pl011 emulation, which needs similar funictions to read/write the registers. s/funictions/functions/ [...] -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 /* * 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 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 |