diff options
author | Mostafa Saleh <smostafa@google.com> | 2024-07-15 08:45:04 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2024-07-18 13:49:29 +0100 |
commit | f6cc198050faf055b17105fdf4da63cf4d295765 (patch) | |
tree | bb0a3eb576d5dd55cf369c1634d66234d99712ba /cpu-common.c | |
parent | 2731ea049d13dfed57f4b0b8bf38725321f752f9 (diff) |
hw/arm/smmu: Use enum for SMMU stage
Currently, translation stage is represented as an int, where 1 is stage-1 and
2 is stage-2, when nested is added, 3 would be confusing to represent nesting,
so we use an enum instead.
While keeping the same values, this is useful for:
- Doing tricks with bit masks, where BIT(0) is stage-1 and BIT(1) is
stage-2 and both is nested.
- Tracing, as stage is printed as int.
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Mostafa Saleh <smostafa@google.com>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Message-id: 20240715084519.1189624-5-smostafa@google.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'cpu-common.c')
0 files changed, 0 insertions, 0 deletions