arm: tegra: optimize L2 enable/disable paths for secureos
authorVarun Wadekar <vwadekar@nvidia.com>
Tue, 28 Aug 2012 05:59:06 +0000 (10:59 +0530)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 19:34:49 +0000 (12:34 -0700)
commit0d03c73ebed940ee638a6f16d3f69af270f2d47d
treefa11237e348ee6a0f1df577285d8d9c65d6e7bd7
parent25a3acb0fd4741b831354f9b07c7994c20c09e40
arm: tegra: optimize L2 enable/disable paths for secureos

For the CONFIG_TRUSTED_FOUNDATION code paths, differentiate L2
enable vs. reenable, which are different SMCs (won't trigger an
invalidate in the case of a reenable).

On an L2 disable SMC, optionally pass a 0 for the L2 ways arg,
which skips the full clean/invalidate (and simply just disabled
the L2).

In order to safely skip flushing the L2 on the disable, we have
to be careful what we dirty from the type we flush the L1 and
disable the L2.

Reviewed-on: http://git-master/r/119786
Original-author: Chris Johnson <cwj@nvidia.com>

Change-Id: Iebcf1042ce2b58513e40e9d49f87ecec9dfdd301
Signed-off-by: Chris Johnson <cwj@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/130061
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

Rebase-Id: R4dde3b2e285d5917bdba15a318ac18702eb59c90
arch/arm/mach-tegra/common.c
arch/arm/mach-tegra/headsmp.S
arch/arm/mach-tegra/pm.c
arch/arm/mach-tegra/pm.h
arch/arm/mach-tegra/sleep.S