memory: tegra20-emc: Poll EMC-CaR handshake instead of waiting for interrupt
authorDmitry Osipenko <digetx@gmail.com>
Thu, 19 Mar 2020 19:36:47 +0000 (22:36 +0300)
committerThierry Reding <treding@nvidia.com>
Mon, 22 Jun 2020 11:54:57 +0000 (13:54 +0200)
commitadbcec8862cd7e3737e1488a98239f95dc45688f
tree3cae99b2b610c36093c94495033952a9ca41d3f0
parent0553d7b204ef48091e76753175d21d0c30b7ae2a
memory: tegra20-emc: Poll EMC-CaR handshake instead of waiting for interrupt

The memory clock-rate change could be running on a non-boot CPU, while the
boot CPU handles the EMC interrupt. This introduces an unnecessary latency
since boot CPU should handle the interrupt and then notify the sibling CPU
about clock-rate change completion. In some rare cases boot CPU could be
in uninterruptible state for a significant time (like in a case of KASAN +
NFS root), it could get to the point that completion timeouts before boot
CPU gets a chance to handle interrupt. The solution is to get rid of the
completion and replace it with interrupt-status polling.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/memory/tegra/tegra20-emc.c