]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
iommu/arm-smmu-v3: Clean up register definitions
authorRobin Murphy <robin.murphy@arm.com>
Mon, 26 Mar 2018 12:35:10 +0000 (13:35 +0100)
committerWill Deacon <will.deacon@arm.com>
Tue, 27 Mar 2018 13:12:04 +0000 (14:12 +0100)
commitcbcee19ac4a2c960d73b8951476f0fe5e5628319
tree3246add944192377c35ec3f4fd5f3c8dc11b85d2
parent1cf9e54e91aac61e1a6c2bbacd0b571c6ca09131
iommu/arm-smmu-v3: Clean up register definitions

The FIELD_{GET,PREP} accessors provided by linux/bitfield.h allow us to
define multi-bit register fields solely in terms of their bit positions
via GENMASK(), without needing explicit *_SHIFT and *_MASK definitions.
As well as the immediate reduction in lines of code, this avoids the
awkwardness of values sometimes being pre-shifted and sometimes not,
which means we can factor out some common values like memory attributes.
Furthermore, it also makes it trivial to verify the definitions against
the architecture spec, on which note let's also fix up a few field names
to properly match the current release (IHI0070B).

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu-v3.c