On 02/06/2015 12:14, Peter Crosthwaite wrote:
> The #define-always change does make for a cleaner end result but I
> stayed away from it purely because I was thinking typedefs are better
> for type-definitions. But if we are open to the change of the #define
> based implementation I am all for it as the target-foo/cpu.h change
> pattern in minimised.
> 
> We still have a similar problems with cpu-defs.h/CPUTLBEntry though. I
> have to think harder about how that can be done, but one solution is
> to conditionally change the tlb_table defs in CPU_COMMON to be just a
> dummy uint8_t[] in MULTI_ARCH case. This is ok, as the struct fields
> are only accessible by arch-obj-y which will get the full-service
> definition via non TARGET_MULTI_ARCH arch-obj-y compile. The work is
> half done for us, as CPUTLBTable already has a uint8_t padding system
> in place.
I guess you would hardcode CPUTLBEntry to 32 bytes in this case.

> CPUIOTLBEntry can be moved to another header as it has no arch specific deps.
> 
> All in all, we can do this with 0 #define foo arm_foo in arch cpu.h's,
> with these edits.

That would be nice to see for v3.

Paolo

Reply via email to