From: Jan Kiszka <[email protected]> Use GET_FIELD where possible.
Signed-off-by: Jan Kiszka <[email protected]> --- hypervisor/arch/arm64/smmu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hypervisor/arch/arm64/smmu.c b/hypervisor/arch/arm64/smmu.c index ba278784..3b45cc5e 100644 --- a/hypervisor/arch/arm64/smmu.c +++ b/hypervisor/arch/arm64/smmu.c @@ -65,8 +65,7 @@ #define ID2_IAS(id) GET_FIELD(id, 3, 0) #define ARM_SMMU_GR0_ID7 0x3c -#define ID7_MAJOR_SHIFT 4 -#define ID7_MAJOR_MASK 0xf +#define ID7_MAJOR(id) GET_FIELD(id, 7, 4) /* Global Fault Status Register */ #define ARM_SMMU_GR0_sGFSR 0x48 @@ -311,7 +310,7 @@ static int arm_smmu_device_reset(struct arm_smmu_device *smmu) * bit is only present in MMU-500r2 onwards. */ reg = mmio_read32(gr0_base + ARM_SMMU_GR0_ID7); - major = (reg >> ID7_MAJOR_SHIFT) & ID7_MAJOR_MASK; + major = ID7_MAJOR(reg); reg = mmio_read32(gr0_base + ARM_SMMU_GR0_sACR); if (major >= 2) reg &= ~ARM_MMU500_ACR_CACHE_LOCK; -- 2.26.2 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/226a11e8c18afb4acd7d3aff9b08fc0dcd4ff2c0.1601838005.git.jan.kiszka%40siemens.com.
