ARM: l2c: provide generic hook to intercept writes to secure registers

When Linux is running in the non-secure world, any write to a secure
L2C register will generate an abort.  Platforms normally have to call
firmware to work around this.  Provide a hook for them to intercept
any L2C secure register write.

l2c_write_sec() avoids writes to secure registers which are already set
to the appropriate value, thus avoiding the overhead of needlessly
calling into the secure monitor.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Russell King 2014-03-16 17:38:08 +00:00
parent c0fe18ba30
commit 8abd259f65
2 changed files with 34 additions and 13 deletions

View file

@ -32,8 +32,11 @@ struct outer_cache_fns {
#ifdef CONFIG_OUTER_CACHE_SYNC
void (*sync)(void);
#endif
void (*set_debug)(unsigned long);
void (*resume)(void);
/* This is an ARM L2C thing */
void (*set_debug)(unsigned long);
void (*write_sec)(unsigned long, unsigned);
};
extern struct outer_cache_fns outer_cache;