Re: [PATCH] arm64: Generate cpucaps.h
From: Mark Brown <broonie@kernel.org>
Date: 2021-05-13 13:06:23
From: Mark Brown <broonie@kernel.org>
Date: 2021-05-13 13:06:23
On Thu, May 13, 2021 at 01:30:53PM +0200, Geert Uytterhoeven wrote:
I guess the reason you're doing it like this, and not using a simple C enum, is that some of these definitions are used from asm files?
Yes, there's references in asm files.
Do we use similar mechanisms in other places?
I'd be surprised if we weren't, though off the top of my head the other examples in arm64 are the sysregs and the hwcaps which are both ABI and don't really benefit in the same way.
Would introducing a generic way to generate headers with definitions from a C enum be worthwhile?
There must be some other arch which could use one at least.