diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 3b737fafb9b50c279244fd7ff4ae198b3dace4bd..7bd8584fafb2ad0de18c7bdc45748af59a67d613 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -487,7 +487,7 @@ L_LA(_r3000_write_probe_fail)
 static __init int __attribute__((unused)) in_compat_space_p(long addr)
 {
 	/* Is this address in 32bit compat space? */
-	return (((addr) & 0xffffffff00000000) == 0xffffffff00000000);
+	return (((addr) & 0xffffffff00000000L) == 0xffffffff00000000L);
 }
 
 static __init int __attribute__((unused)) rel_highest(long val)