Re: [PATCH v7 5/6] iommu/arm-smmu-v3: Add in-kernel support for NVIDIA Tegra241 (Grace) CMDQV
From: Nicolin Chen <hidden>
Date: 2024-05-12 21:01:23
Also in:
linux-iommu, linux-tegra, lkml
From: Nicolin Chen <hidden>
Date: 2024-05-12 21:01:23
Also in:
linux-iommu, linux-tegra, lkml
On Sun, May 12, 2024 at 12:54:49PM -0300, Jason Gunthorpe wrote:
On Tue, May 07, 2024 at 10:56:53PM -0700, Nicolin Chen wrote:quoted
+#define vcmdq_page1_readl(_vcmdq, reg) \ + readl((_vcmdq)->page1 + TEGRA241_VCMDQ_##reg) +#define vcmdq_page1_readl_relaxed(_vcmdq, reg) \ + readl_relaxed((_vcmdq)->page1 + TEGRA241_VCMDQ_##reg) +#define vcmdq_page1_readq_relaxed(_vcmdq, reg) \ + readq_relaxed((_vcmdq)->page1 + TEGRA241_VCMDQ_##reg) +#define vcmdq_page1_writel(_vcmdq, val, reg) \ + writel((val), (_vcmdq)->page1 + TEGRA241_VCMDQ_##reg) +#define vcmdq_page1_writel_relaxed(_vcmdq, val, reg) \ + writel_relaxed((val), (_vcmdq)->page1 + TEGRA241_VCMDQ_##reg) +#define vcmdq_page1_writeq(_vcmdq, val, reg) \ + writeq((val), (_vcmdq)->page1 + TEGRA241_VCMDQ_##reg) +#define vcmdq_page1_writeq_relaxed(_vcmdq, val, reg) \ + writeq_relaxed((val), (_vcmdq)->page1 + TEGRA241_VCMDQ_##reg)These still need to be trimmed to only the ones being used. I still think it is a bad idea, maybe a middle ground is to wrapper the regsiter coding writeq_relaxed(val, REG_CMDQ_PAGE1(vcmdq, XXX)); Is still short enough and safe enough without creating so much obfuscation..
I think that is a much better practice! Let me try with it. Thanks! Nicolin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel