summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-04-29 12:58:03 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-08-14 09:38:25 +0800
commit97f73178c946059fc540bbf839ffbd63eeeb7b20 (patch)
tree7be04b5af8ab0bb1e8050992ff8ff397b377527f
parentb97e18681f5881ca566221501fd6d7de44dd0724 (diff)
sparc64: Fix range check in kern_addr_valid().
[ Upstream commit ee73887e92a69ae0a5cda21c68ea75a27804c944 ] In commit b2d438348024b75a1ee8b66b85d77f569a5dfed8 ("sparc64: Make PAGE_OFFSET variable."), the MAX_PHYS_ADDRESS_BITS value was increased (to 47). This constant reference to '41UL' was missed. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/sparc/include/asm/pgtable_64.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h
index ac5f7087a50d..ff97960b6242 100644
--- a/arch/sparc/include/asm/pgtable_64.h
+++ b/arch/sparc/include/asm/pgtable_64.h
@@ -916,7 +916,7 @@ static inline bool kern_addr_valid(unsigned long addr)
{
unsigned long paddr = __pa(addr);
- if ((paddr >> 41UL) != 0UL)
+ if ((paddr >> MAX_PHYS_ADDRESS_BITS) != 0UL)
return false;
return test_bit(paddr >> 22, sparc64_valid_addr_bitmap);
}