mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
[MIPS] Put cast inside macro instead of all the callers
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>
This commit is contained in:
parent
2206583dd5
commit
48ef2626ae
2 changed files with 7 additions and 7 deletions
|
@ -46,9 +46,9 @@ unsigned long __init run_uncached(void *func)
|
||||||
if (sp >= (long)CKSEG0 && sp < (long)CKSEG2)
|
if (sp >= (long)CKSEG0 && sp < (long)CKSEG2)
|
||||||
usp = CKSEG1ADDR(sp);
|
usp = CKSEG1ADDR(sp);
|
||||||
#ifdef CONFIG_64BIT
|
#ifdef CONFIG_64BIT
|
||||||
else if ((long long)sp >= (long long)PHYS_TO_XKPHYS(0LL, 0) &&
|
else if ((long long)sp >= (long long)PHYS_TO_XKPHYS(0, 0) &&
|
||||||
(long long)sp < (long long)PHYS_TO_XKPHYS(8LL, 0))
|
(long long)sp < (long long)PHYS_TO_XKPHYS(8, 0))
|
||||||
usp = PHYS_TO_XKPHYS((long long)K_CALG_UNCACHED,
|
usp = PHYS_TO_XKPHYS(K_CALG_UNCACHED,
|
||||||
XKPHYS_TO_PHYS((long long)sp));
|
XKPHYS_TO_PHYS((long long)sp));
|
||||||
#endif
|
#endif
|
||||||
else {
|
else {
|
||||||
|
@ -58,9 +58,9 @@ unsigned long __init run_uncached(void *func)
|
||||||
if (lfunc >= (long)CKSEG0 && lfunc < (long)CKSEG2)
|
if (lfunc >= (long)CKSEG0 && lfunc < (long)CKSEG2)
|
||||||
ufunc = CKSEG1ADDR(lfunc);
|
ufunc = CKSEG1ADDR(lfunc);
|
||||||
#ifdef CONFIG_64BIT
|
#ifdef CONFIG_64BIT
|
||||||
else if ((long long)lfunc >= (long long)PHYS_TO_XKPHYS(0LL, 0) &&
|
else if ((long long)lfunc >= (long long)PHYS_TO_XKPHYS(0, 0) &&
|
||||||
(long long)lfunc < (long long)PHYS_TO_XKPHYS(8LL, 0))
|
(long long)lfunc < (long long)PHYS_TO_XKPHYS(8, 0))
|
||||||
ufunc = PHYS_TO_XKPHYS((long long)K_CALG_UNCACHED,
|
ufunc = PHYS_TO_XKPHYS(K_CALG_UNCACHED,
|
||||||
XKPHYS_TO_PHYS((long long)lfunc));
|
XKPHYS_TO_PHYS((long long)lfunc));
|
||||||
#endif
|
#endif
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -127,7 +127,7 @@
|
||||||
#define PHYS_TO_XKSEG_CACHED(p) PHYS_TO_XKPHYS(K_CALG_COH_SHAREABLE, (p))
|
#define PHYS_TO_XKSEG_CACHED(p) PHYS_TO_XKPHYS(K_CALG_COH_SHAREABLE, (p))
|
||||||
#define XKPHYS_TO_PHYS(p) ((p) & TO_PHYS_MASK)
|
#define XKPHYS_TO_PHYS(p) ((p) & TO_PHYS_MASK)
|
||||||
#define PHYS_TO_XKPHYS(cm, a) (_CONST64_(0x8000000000000000) | \
|
#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
|
* The ultimate limited of the 64-bit MIPS architecture: 2 bits for selecting
|
||||||
|
|
Loading…
Reference in a new issue