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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 May 2019 16:26:49 +0000 (18:26 +0200)
commit6f0d9b0b5ec1076be6c70878500a316ddcdb0a14
tree5a2348f7cd525d480c4bc0bdb3a0fb6cef7134e2
parent17fe9003ffccd0f7b26f9935cc1d60d0bf2bdc12
memory: tegra: Fix integer overflow on tick value calculation

commit b906c056b6023c390f18347169071193fda57dde upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/memory/tegra/mc.c