mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
ARM: 5994/1: ARM: Add outer_cache_fns.sync function pointer (2/4)
This patch introduces the outer_cache_fns.sync function pointer together with the OUTER_CACHE_SYNC config option that can be used to drain the write buffer of the outer cache. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
33f663ff91
commit
319f551a0a
2 changed files with 20 additions and 0 deletions
|
@ -25,6 +25,9 @@ struct outer_cache_fns {
|
||||||
void (*inv_range)(unsigned long, unsigned long);
|
void (*inv_range)(unsigned long, unsigned long);
|
||||||
void (*clean_range)(unsigned long, unsigned long);
|
void (*clean_range)(unsigned long, unsigned long);
|
||||||
void (*flush_range)(unsigned long, unsigned long);
|
void (*flush_range)(unsigned long, unsigned long);
|
||||||
|
#ifdef CONFIG_OUTER_CACHE_SYNC
|
||||||
|
void (*sync)(void);
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_OUTER_CACHE
|
#ifdef CONFIG_OUTER_CACHE
|
||||||
|
@ -58,4 +61,15 @@ static inline void outer_flush_range(unsigned long start, unsigned long end)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_OUTER_CACHE_SYNC
|
||||||
|
static inline void outer_sync(void)
|
||||||
|
{
|
||||||
|
if (outer_cache.sync)
|
||||||
|
outer_cache.sync();
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline void outer_sync(void)
|
||||||
|
{ }
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __ASM_OUTERCACHE_H */
|
#endif /* __ASM_OUTERCACHE_H */
|
||||||
|
|
|
@ -736,6 +736,12 @@ config NEEDS_SYSCALL_FOR_CMPXCHG
|
||||||
config OUTER_CACHE
|
config OUTER_CACHE
|
||||||
bool
|
bool
|
||||||
|
|
||||||
|
config OUTER_CACHE_SYNC
|
||||||
|
bool
|
||||||
|
help
|
||||||
|
The outer cache has a outer_cache_fns.sync function pointer
|
||||||
|
that can be used to drain the write buffer of the outer cache.
|
||||||
|
|
||||||
config CACHE_FEROCEON_L2
|
config CACHE_FEROCEON_L2
|
||||||
bool "Enable the Feroceon L2 cache controller"
|
bool "Enable the Feroceon L2 cache controller"
|
||||||
depends on ARCH_KIRKWOOD || ARCH_MV78XX0
|
depends on ARCH_KIRKWOOD || ARCH_MV78XX0
|
||||||
|
|
Loading…
Reference in a new issue