linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86, UV - uv_global_gru_mmr_address() macro fix
@ 2010-01-07 16:12 Jack Steiner
  2010-01-07 23:57 ` [tip:x86/uv] x86, uv: " tip-bot for Jack Steiner
  0 siblings, 1 reply; 2+ messages in thread
From: Jack Steiner @ 2010-01-07 16:12 UTC (permalink / raw)
  To: mingo, tglx; +Cc: linux-kernel

Fix bug in uv_global_gru_mmr_address macro.  Macro failed
to cast an int value to a long prior to a left shift > 32.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Cc: <stable@kernel.org>

---
 arch/x86/include/asm/uv/uv_hub.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux/arch/x86/include/asm/uv/uv_hub.h
===================================================================
--- linux.orig/arch/x86/include/asm/uv/uv_hub.h	2010-01-07 01:54:31.000000000 -0600
+++ linux/arch/x86/include/asm/uv/uv_hub.h	2010-01-07 09:43:02.000000000 -0600
@@ -329,7 +329,8 @@ static inline unsigned long uv_read_glob
  */
 static inline unsigned long uv_global_gru_mmr_address(int pnode, unsigned long offset)
 {
-	return UV_GLOBAL_GRU_MMR_BASE | offset | (pnode << uv_hub_info->m_val);
+	return UV_GLOBAL_GRU_MMR_BASE | offset |
+		((unsigned long)pnode << uv_hub_info->m_val);
 }
 
 static inline void uv_write_global_mmr8(int pnode, unsigned long offset, unsigned char val)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:x86/uv] x86, uv: uv_global_gru_mmr_address() macro fix
  2010-01-07 16:12 [PATCH] x86, UV - uv_global_gru_mmr_address() macro fix Jack Steiner
@ 2010-01-07 23:57 ` tip-bot for Jack Steiner
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Jack Steiner @ 2010-01-07 23:57 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, steiner, stable, tglx

Commit-ID:  e1e0138d7d10fd447c71cc70f367eac514bd3ce4
Gitweb:     http://git.kernel.org/tip/e1e0138d7d10fd447c71cc70f367eac514bd3ce4
Author:     Jack Steiner <steiner@sgi.com>
AuthorDate: Thu, 7 Jan 2010 10:12:40 -0600
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Thu, 7 Jan 2010 11:49:57 -0800

x86, uv: uv_global_gru_mmr_address() macro fix

Fix bug in uv_global_gru_mmr_address macro.  Macro failed
to cast an int value to a long prior to a left shift > 32.

Signed-off-by: Jack Steiner <steiner@sgi.com>
LKML-Reference: <20100107161240.GA2610@sgi.com>
Cc: <stable@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/include/asm/uv/uv_hub.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index 811bfab..7a81d9d 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -335,7 +335,8 @@ static inline unsigned long uv_read_global_mmr64(int pnode,
  */
 static inline unsigned long uv_global_gru_mmr_address(int pnode, unsigned long offset)
 {
-	return UV_GLOBAL_GRU_MMR_BASE | offset | (pnode << uv_hub_info->m_val);
+	return UV_GLOBAL_GRU_MMR_BASE | offset |
+		((unsigned long)pnode << uv_hub_info->m_val);
 }
 
 /*

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-09 22:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-07 16:12 [PATCH] x86, UV - uv_global_gru_mmr_address() macro fix Jack Steiner
2010-01-07 23:57 ` [tip:x86/uv] x86, uv: " tip-bot for Jack Steiner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).