[MIPS] Put cast inside macro instead of all the callers
authorAndrew Sharp <andy.sharp@onstor.com>
Wed, 31 Oct 2007 21:11:24 +0000 (14:11 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 29 Jan 2008 10:14:55 +0000 (10:14 +0000)
Since all the callers of the PHYS_TO_XKPHYS macro call with a constant,
put the cast to LL inside the macro where it really should be rather
than in all the callers.  This makes macros like PHYS_TO_XKSEG_UNCACHED
work without gcc whining.

Signed-off-by: Andrew Sharp <andy.sharp@onstor.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/lib/uncached.c
include/asm-mips/addrspace.h

index 58d14f4d9349c3f8b9890c56551c02f8f35737d4..27b012d4341c2ad6f259ac33b4557b7360bc0a9b 100644 (file)
@@ -46,9 +46,9 @@ unsigned long __init run_uncached(void *func)
        if (sp >= (long)CKSEG0 && sp < (long)CKSEG2)
                usp = CKSEG1ADDR(sp);
 #ifdef CONFIG_64BIT
-       else if ((long long)sp >= (long long)PHYS_TO_XKPHYS(0LL, 0) &&
-                (long long)sp < (long long)PHYS_TO_XKPHYS(8LL, 0))
-               usp = PHYS_TO_XKPHYS((long long)K_CALG_UNCACHED,
+       else if ((long long)sp >= (long long)PHYS_TO_XKPHYS(0, 0) &&
+                (long long)sp < (long long)PHYS_TO_XKPHYS(8, 0))
+               usp = PHYS_TO_XKPHYS(K_CALG_UNCACHED,
                                     XKPHYS_TO_PHYS((long long)sp));
 #endif
        else {
@@ -58,9 +58,9 @@ unsigned long __init run_uncached(void *func)
        if (lfunc >= (long)CKSEG0 && lfunc < (long)CKSEG2)
                ufunc = CKSEG1ADDR(lfunc);
 #ifdef CONFIG_64BIT
-       else if ((long long)lfunc >= (long long)PHYS_TO_XKPHYS(0LL, 0) &&
-                (long long)lfunc < (long long)PHYS_TO_XKPHYS(8LL, 0))
-               ufunc = PHYS_TO_XKPHYS((long long)K_CALG_UNCACHED,
+       else if ((long long)lfunc >= (long long)PHYS_TO_XKPHYS(0, 0) &&
+                (long long)lfunc < (long long)PHYS_TO_XKPHYS(8, 0))
+               ufunc = PHYS_TO_XKPHYS(K_CALG_UNCACHED,
                                       XKPHYS_TO_PHYS((long long)lfunc));
 #endif
        else {
index 0bb7a93b7a5ed70f08709edcb7d14d70280f7f9a..569f80aacbd2f0479bfb9f2cea2239afb7985dc8 100644 (file)
 #define PHYS_TO_XKSEG_CACHED(p)                PHYS_TO_XKPHYS(K_CALG_COH_SHAREABLE, (p))
 #define XKPHYS_TO_PHYS(p)              ((p) & TO_PHYS_MASK)
 #define PHYS_TO_XKPHYS(cm, a)          (_CONST64_(0x8000000000000000) | \
-                                        ((cm)<<59) | (a))
+                                        (_CONST64_(cm) << 59) | (a))
 
 /*
  * The ultimate limited of the 64-bit MIPS architecture:  2 bits for selecting