mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
ARM: 6671/1: LPAE: use phys_addr_t instead of unsigned long in outercache functions
The unsigned long datatype is not sufficient for mapping physical addresses >= 4GB. This patch ensures that the phys_addr_t datatype is used to represent physical addresses when passed to the outer cache functions. Note that the definitions in struct outer_cache_fns remain as unsigned long because there are currently no outer cache implementations supporting physical addresses wider than 32-bits. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
29a38193c1
commit
ad6b9c9d78
1 changed files with 8 additions and 6 deletions
|
@ -21,6 +21,8 @@
|
||||||
#ifndef __ASM_OUTERCACHE_H
|
#ifndef __ASM_OUTERCACHE_H
|
||||||
#define __ASM_OUTERCACHE_H
|
#define __ASM_OUTERCACHE_H
|
||||||
|
|
||||||
|
#include <linux/types.h>
|
||||||
|
|
||||||
struct outer_cache_fns {
|
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);
|
||||||
|
@ -37,17 +39,17 @@ struct outer_cache_fns {
|
||||||
|
|
||||||
extern struct outer_cache_fns outer_cache;
|
extern struct outer_cache_fns outer_cache;
|
||||||
|
|
||||||
static inline void outer_inv_range(unsigned long start, unsigned long end)
|
static inline void outer_inv_range(phys_addr_t start, phys_addr_t end)
|
||||||
{
|
{
|
||||||
if (outer_cache.inv_range)
|
if (outer_cache.inv_range)
|
||||||
outer_cache.inv_range(start, end);
|
outer_cache.inv_range(start, end);
|
||||||
}
|
}
|
||||||
static inline void outer_clean_range(unsigned long start, unsigned long end)
|
static inline void outer_clean_range(phys_addr_t start, phys_addr_t end)
|
||||||
{
|
{
|
||||||
if (outer_cache.clean_range)
|
if (outer_cache.clean_range)
|
||||||
outer_cache.clean_range(start, end);
|
outer_cache.clean_range(start, end);
|
||||||
}
|
}
|
||||||
static inline void outer_flush_range(unsigned long start, unsigned long end)
|
static inline void outer_flush_range(phys_addr_t start, phys_addr_t end)
|
||||||
{
|
{
|
||||||
if (outer_cache.flush_range)
|
if (outer_cache.flush_range)
|
||||||
outer_cache.flush_range(start, end);
|
outer_cache.flush_range(start, end);
|
||||||
|
@ -73,11 +75,11 @@ static inline void outer_disable(void)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static inline void outer_inv_range(unsigned long start, unsigned long end)
|
static inline void outer_inv_range(phys_addr_t start, phys_addr_t end)
|
||||||
{ }
|
{ }
|
||||||
static inline void outer_clean_range(unsigned long start, unsigned long end)
|
static inline void outer_clean_range(phys_addr_t start, phys_addr_t end)
|
||||||
{ }
|
{ }
|
||||||
static inline void outer_flush_range(unsigned long start, unsigned long end)
|
static inline void outer_flush_range(phys_addr_t start, phys_addr_t end)
|
||||||
{ }
|
{ }
|
||||||
static inline void outer_flush_all(void) { }
|
static inline void outer_flush_all(void) { }
|
||||||
static inline void outer_inv_all(void) { }
|
static inline void outer_inv_all(void) { }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue