target/arm: Move ID register field defs to cpu-features.h

Currently we define constants for the ID register fields in cpu.h.
This means they're defined for a lot more code in QEMU than actually
needs them.  Move them to cpu-features.h, which is where we define
the feature functions that test fields in these registers.

There's only one place where we need to use some of these macro
definitions that we weren't already including cpu-features.h:
linux-user/arm/target_proc.h.  Otherwise this patch is a pure
movement of code from one file to the other.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Peter Maydell 2025-09-23 18:57:50 +01:00
parent ded97005b2
commit ff197ae9a4
3 changed files with 412 additions and 410 deletions

View file

@ -6,6 +6,8 @@
#ifndef ARM_TARGET_PROC_H
#define ARM_TARGET_PROC_H
#include "target/arm/cpu-features.h" /* for MIDR_EL1 field definitions */
static int open_cpuinfo(CPUArchState *cpu_env, int fd)
{
ARMCPU *cpu = env_archcpu(cpu_env);