memory: tegra: Fix integer overflow on tick value calculation
authorDmitry Osipenko <digetx@gmail.com>
Thu, 11 Apr 2019 22:12:48 +0000 (01:12 +0300)
committerThierry Reding <treding@nvidia.com>
Thu, 18 Apr 2019 09:35:55 +0000 (11:35 +0200)
commitb906c056b6023c390f18347169071193fda57dde
tree78c7872a2cabbb2c76478c66cd012d5ecfb759b0
parent76b959a44c0b9c60cd41627cecb022c78042ad74
memory: tegra: Fix integer overflow on tick value calculation

Multiplying the Memory Controller clock rate by the tick count results
in an integer overflow and in result the truncated tick value is being
programmed into hardware, such that the GR3D memory client performance is
reduced by two times.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/memory/tegra/mc.c