> And yes, there is some merit to explicitly naming them but you can also put > that in a comment once above those functions too. > I understand your point but, for this specific case, to me, each register as a separate "switch case" looks clearer and self-describing than keeping a range of different registers and putting comment about which registers it covers. In addition, while each APIC register is at 16-byte alignment, they are accessed using dword size reads/writes. So, as mentioned in previous reply, using ranges requires alignment checks. One hypothetical example where using range checks could become klugy is when the unused 12 bytes of 16 byte of a register is repurposed for implementation- specific features and the read/write permissions are different for the architecture register and the implementation-defined one. Secure AVIC uses (IRRn + 4) address for ALLOWED_IRRn. However, the r/w permissions are same for IRRn and ALLOWED_IRRn. So, using ranges for IRR register space works fine. However, it may not work if similar register-space-repurposing happens for other features in future. I understand this could be considered as speculative and hand-wavy reasoning. So, I would ask, does above reasoning convince you with the current switch-case layout or you want it to be range-based? - Neeraj