|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v6 10/12] xen/arm: vgic-v3: add emulation of GICv3.1 eSPI registers
On 04.09.25 00:37, Volodymyr Babchuk wrote: Hi Oleksandr, Hello Volodymyr Oleksandr Tyshchenko <olekstysh@xxxxxxxxx> writes: [...] I got it But I saw clever trick by Mykola Kvach, something like this: #define vgic_get_reg_offset(addr, reg_name) ( addr < reg_name##nE ? \ addr - reg_name : addr - reg_name##nE ) And then you can just use this as offset = vgic_get_reg_offset(reg, GICD_IPRIORITYR) From my PoV, the idea looks good I don't know what maintainers think about this type of preprocessor trickery, but in my opinion it is justified in this case, because it leaves less room for a mistake.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |