Commit 6c24b174 authored by Kumar Gala's avatar Kumar Gala

powerpc/fsl-booke: Fix mapping functions to use phys_addr_t

Fixed v_mapped_by_tlbcam() and p_mapped_by_tlbcam() to use phys_addr_t
instead of unsigned long.  In 36-bit physical mode we really need these
functions to deal with phys_addr_t when trying to match a physical
address or when returning one.
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent 08c6e3a5
...@@ -73,7 +73,7 @@ extern unsigned int tlbcam_index; ...@@ -73,7 +73,7 @@ extern unsigned int tlbcam_index;
/* /*
* Return PA for this VA if it is mapped by a CAM, or 0 * Return PA for this VA if it is mapped by a CAM, or 0
*/ */
unsigned long v_mapped_by_tlbcam(unsigned long va) phys_addr_t v_mapped_by_tlbcam(unsigned long va)
{ {
int b; int b;
for (b = 0; b < tlbcam_index; ++b) for (b = 0; b < tlbcam_index; ++b)
...@@ -85,7 +85,7 @@ unsigned long v_mapped_by_tlbcam(unsigned long va) ...@@ -85,7 +85,7 @@ unsigned long v_mapped_by_tlbcam(unsigned long va)
/* /*
* Return VA for a given PA or 0 if not mapped * Return VA for a given PA or 0 if not mapped
*/ */
unsigned long p_mapped_by_tlbcam(unsigned long pa) unsigned long p_mapped_by_tlbcam(phys_addr_t pa)
{ {
int b; int b;
for (b = 0; b < tlbcam_index; ++b) for (b = 0; b < tlbcam_index; ++b)
......
...@@ -61,8 +61,8 @@ void setbat(int index, unsigned long virt, phys_addr_t phys, ...@@ -61,8 +61,8 @@ void setbat(int index, unsigned long virt, phys_addr_t phys,
#ifdef HAVE_TLBCAM #ifdef HAVE_TLBCAM
extern unsigned int tlbcam_index; extern unsigned int tlbcam_index;
extern unsigned long v_mapped_by_tlbcam(unsigned long va); extern phys_addr_t v_mapped_by_tlbcam(unsigned long va);
extern unsigned long p_mapped_by_tlbcam(unsigned long pa); extern unsigned long p_mapped_by_tlbcam(phys_addr_t pa);
#else /* !HAVE_TLBCAM */ #else /* !HAVE_TLBCAM */
#define v_mapped_by_tlbcam(x) (0UL) #define v_mapped_by_tlbcam(x) (0UL)
#define p_mapped_by_tlbcam(x) (0UL) #define p_mapped_by_tlbcam(x) (0UL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment