sparc64: Fix range check in kern_addr_valid().
authorDavid S. Miller <davem@davemloft.net>
Tue, 29 Apr 2014 19:58:03 +0000 (12:58 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 May 2014 05:41:57 +0000 (22:41 -0700)
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>
arch/sparc/include/asm/pgtable_64.h

index ac5f7087a50d4c9d8a7663ddfeebb3a6d0e8923f..ff97960b624287ff95c91f09ec82a22e095b2d47 100644 (file)
@@ -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);
 }