* [PATCH] fix warning when using PHYS_TO_XKSEG_xx()
@ 2007-11-25 10:28 Thomas Bogendoerfer
2007-11-26 23:06 ` Andrew Sharp
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Bogendoerfer @ 2007-11-25 10:28 UTC (permalink / raw)
To: linux-mips; +Cc: ralf
use CONST64 cast in PHYS_TO_XPHYS macro to avoid warning about shifts
longer than the target type.
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
---
arch/mips/lib/uncached.c | 8 ++++----
include/asm-mips/addrspace.h | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/mips/lib/uncached.c b/arch/mips/lib/uncached.c
index 58d14f4..b59b770 100644
--- a/arch/mips/lib/uncached.c
+++ b/arch/mips/lib/uncached.c
@@ -46,8 +46,8 @@ 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))
+ 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((long long)K_CALG_UNCACHED,
XKPHYS_TO_PHYS((long long)sp));
#endif
@@ -58,8 +58,8 @@ 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))
+ 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((long long)K_CALG_UNCACHED,
XKPHYS_TO_PHYS((long long)lfunc));
#endif
diff --git a/include/asm-mips/addrspace.h b/include/asm-mips/addrspace.h
index 0bb7a93..9002d66 100644
--- a/include/asm-mips/addrspace.h
+++ b/include/asm-mips/addrspace.h
@@ -127,7 +127,7 @@
#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
--
1.4.4.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] fix warning when using PHYS_TO_XKSEG_xx()
2007-11-25 10:28 [PATCH] fix warning when using PHYS_TO_XKSEG_xx() Thomas Bogendoerfer
@ 2007-11-26 23:06 ` Andrew Sharp
2007-11-27 8:59 ` Thomas Bogendoerfer
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Sharp @ 2007-11-26 23:06 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: linux-mips, ralf
This is the basically the patch I submitted 10/31 and I believe is
queued for 2.6.25 ...
On Sun, 25 Nov 2007 11:28:03 +0100 Thomas Bogendoerfer
<tsbogend@alpha.franken.de> wrote:
> use CONST64 cast in PHYS_TO_XPHYS macro to avoid warning about shifts
> longer than the target type.
>
> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> ---
> arch/mips/lib/uncached.c | 8 ++++----
> include/asm-mips/addrspace.h | 2 +-
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/mips/lib/uncached.c b/arch/mips/lib/uncached.c
> index 58d14f4..b59b770 100644
> --- a/arch/mips/lib/uncached.c
> +++ b/arch/mips/lib/uncached.c
> @@ -46,8 +46,8 @@ 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))
> + 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((long long)K_CALG_UNCACHED,
> XKPHYS_TO_PHYS((long long)sp));
> #endif
> @@ -58,8 +58,8 @@ 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))
> + 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((long long)K_CALG_UNCACHED,
> XKPHYS_TO_PHYS((long
> long)lfunc)); #endif
> diff --git a/include/asm-mips/addrspace.h
> b/include/asm-mips/addrspace.h index 0bb7a93..9002d66 100644
> --- a/include/asm-mips/addrspace.h
> +++ b/include/asm-mips/addrspace.h
> @@ -127,7 +127,7 @@
> #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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix warning when using PHYS_TO_XKSEG_xx()
2007-11-26 23:06 ` Andrew Sharp
@ 2007-11-27 8:59 ` Thomas Bogendoerfer
2007-11-27 17:31 ` Andrew Sharp
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Bogendoerfer @ 2007-11-27 8:59 UTC (permalink / raw)
To: Andrew Sharp; +Cc: linux-mips, ralf
On Mon, Nov 26, 2007 at 03:06:01PM -0800, Andrew Sharp wrote:
> This is the basically the patch I submitted 10/31 and I believe is
> queued for 2.6.25 ...
oops, I didn't notice that. If it's in, I could check off that patch
from my list.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix warning when using PHYS_TO_XKSEG_xx()
2007-11-27 8:59 ` Thomas Bogendoerfer
@ 2007-11-27 17:31 ` Andrew Sharp
2007-11-27 17:31 ` Andrew Sharp
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Sharp @ 2007-11-27 17:31 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: linux-mips, ralf
On Tue, 27 Nov 2007 09:59:00 +0100 tsbogend@alpha.franken.de (Thomas
Bogendoerfer) wrote:
> On Mon, Nov 26, 2007 at 03:06:01PM -0800, Andrew Sharp wrote:
> > This is the basically the patch I submitted 10/31 and I believe is
> > queued for 2.6.25 ...
>
> oops, I didn't notice that. If it's in, I could check off that patch
> from my list.
I tried to check, but apparently I don't pull the queue branch
anymore. I don't remember why.
Cheers,
a
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fix warning when using PHYS_TO_XKSEG_xx()
2007-11-27 17:31 ` Andrew Sharp
@ 2007-11-27 17:31 ` Andrew Sharp
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Sharp @ 2007-11-27 17:31 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: linux-mips, ralf
On Tue, 27 Nov 2007 09:59:00 +0100 tsbogend@alpha.franken.de (Thomas
Bogendoerfer) wrote:
> On Mon, Nov 26, 2007 at 03:06:01PM -0800, Andrew Sharp wrote:
> > This is the basically the patch I submitted 10/31 and I believe is
> > queued for 2.6.25 ...
>
> oops, I didn't notice that. If it's in, I could check off that patch
> from my list.
I tried to check, but apparently I don't pull the queue branch
anymore. I don't remember why.
Cheers,
a
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-11-27 17:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-25 10:28 [PATCH] fix warning when using PHYS_TO_XKSEG_xx() Thomas Bogendoerfer
2007-11-26 23:06 ` Andrew Sharp
2007-11-27 8:59 ` Thomas Bogendoerfer
2007-11-27 17:31 ` Andrew Sharp
2007-11-27 17:31 ` Andrew Sharp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox