Peter Maydell <peter.mayd...@linaro.org> writes:
> On Fri, 6 Dec 2019 at 12:22, Alex Bennée <alex.ben...@linaro.org> wrote: >> >> For system emulation we need to check the state of the GIC before we >> report the value. However this isn't relevant to exporting of the >> value to linux-user and indeed breaks the exported value as set by >> modify_arm_cp_regs. >> >> [AJB: the other option would be just to set reset value anyway and not >> ifdef out the readfn as the register will become const anyway] > > If you want it to be const it would be clearer to define it > with ARM_CP_CONST... I'm not sure what an ARM_CP_NO_RAW without > a readfn or a fieldoffset will do on reads. Well the modify_arm_cp_regs ensures it is ARM_CP_CONST when it changes the definition. It's just ensuring the reset value is set so it can be masked/fixed. However the ifdef approach does reduce the amount of unused stuff in the linux-user build. > > thanks > -- PMM -- Alex Bennée