Skip to content

Commit 4a23d0f

Browse files
ashishmhetre8krzk
authored andcommitted
memory: tegra: Protect SID override call under CONFIG_IOMMU_API
tegra186_mc_client_sid_override() is protected under CONFIG_IOMMU_API. Call to this function is being made from tegra186_mc_resume() without any protection which is leading to build failure when CONFIG_IOMMU_API is not set. Fix this by protecting SID override function call from tegra186_mc_resume() under CONFIG_IOMMU_API. Fixes: fe3b082 ("memory: tegra: Add SID override programming for MC clients") Signed-off-by: Ashish Mhetre <amhetre@nvidia.com> Reported-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested Link: https://lore.kernel.org/r/20231205060045.7985-1-amhetre@nvidia.com Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1 parent 0d6c918 commit 4a23d0f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/memory/tegra/tegra186.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,15 @@ static int tegra186_mc_probe_device(struct tegra_mc *mc, struct device *dev)
141141

142142
static int tegra186_mc_resume(struct tegra_mc *mc)
143143
{
144+
#if IS_ENABLED(CONFIG_IOMMU_API)
144145
unsigned int i;
145146

146147
for (i = 0; i < mc->soc->num_clients; i++) {
147148
const struct tegra_mc_client *client = &mc->soc->clients[i];
148149

149150
tegra186_mc_client_sid_override(mc, client, client->sid);
150151
}
152+
#endif
151153

152154
return 0;
153155
}

0 commit comments

Comments
 (0)