mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
powerpc/32: define helpers to get L1 cache sizes.
This patch defines C helpers to retrieve the size of cache blocks and uses them in the cacheflush functions. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
1cfb725fb1
commit
d98fc70fc1
2 changed files with 29 additions and 11 deletions
|
@ -33,7 +33,8 @@
|
|||
|
||||
#define IFETCH_ALIGN_BYTES (1 << IFETCH_ALIGN_SHIFT)
|
||||
|
||||
#if defined(__powerpc64__) && !defined(__ASSEMBLY__)
|
||||
#if !defined(__ASSEMBLY__)
|
||||
#ifdef CONFIG_PPC64
|
||||
|
||||
struct ppc_cache_info {
|
||||
u32 size;
|
||||
|
@ -53,7 +54,18 @@ struct ppc64_caches {
|
|||
};
|
||||
|
||||
extern struct ppc64_caches ppc64_caches;
|
||||
#endif /* __powerpc64__ && ! __ASSEMBLY__ */
|
||||
#else
|
||||
static inline u32 l1_cache_shift(void)
|
||||
{
|
||||
return L1_CACHE_SHIFT;
|
||||
}
|
||||
|
||||
static inline u32 l1_cache_bytes(void)
|
||||
{
|
||||
return L1_CACHE_BYTES;
|
||||
}
|
||||
#endif
|
||||
#endif /* ! __ASSEMBLY__ */
|
||||
|
||||
#if defined(__ASSEMBLY__)
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue