* [PATCH] x86/uv: Fix uv_gpa_to_soc_phys_ram shift
@ 2012-01-19 2:07 Russ Anderson
2012-01-26 13:37 ` [tip:x86/urgent] x86/uv: Fix uv_gpa_to_soc_phys_ram() shift tip-bot for Russ Anderson
0 siblings, 1 reply; 2+ messages in thread
From: Russ Anderson @ 2012-01-19 2:07 UTC (permalink / raw)
To: H. Peter Anvin, Thomas Gleixner, Ingo Molnar
Cc: linux-kernel, stable, Russ Anderson
uv_gpa_to_soc_phys_ram() was inadvertently ignoring the
shift values. This fix takes the shift into account.
Signed-off-by: Russ Anderson <rja@sgi.com>
---
arch/x86/include/asm/uv/uv_hub.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux/arch/x86/include/asm/uv/uv_hub.h
===================================================================
--- linux.orig/arch/x86/include/asm/uv/uv_hub.h 2012-01-18 19:49:53.134409748 -0600
+++ linux/arch/x86/include/asm/uv/uv_hub.h 2012-01-18 19:49:56.978409600 -0600
@@ -318,13 +318,13 @@ uv_gpa_in_mmr_space(unsigned long gpa)
/* UV global physical address --> socket phys RAM */
static inline unsigned long uv_gpa_to_soc_phys_ram(unsigned long gpa)
{
- unsigned long paddr = gpa & uv_hub_info->gpa_mask;
+ unsigned long paddr;
unsigned long remap_base = uv_hub_info->lowmem_remap_base;
unsigned long remap_top = uv_hub_info->lowmem_remap_top;
gpa = ((gpa << uv_hub_info->m_shift) >> uv_hub_info->m_shift) |
((gpa >> uv_hub_info->n_lshift) << uv_hub_info->m_val);
- gpa = gpa & uv_hub_info->gpa_mask;
+ paddr = gpa & uv_hub_info->gpa_mask;
if (paddr >= remap_base && paddr < remap_base + remap_top)
paddr -= remap_base;
return paddr;
--
Russ Anderson, OS RAS/Partitioning Project Lead
SGI - Silicon Graphics Inc rja@sgi.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:x86/urgent] x86/uv: Fix uv_gpa_to_soc_phys_ram() shift
2012-01-19 2:07 [PATCH] x86/uv: Fix uv_gpa_to_soc_phys_ram shift Russ Anderson
@ 2012-01-26 13:37 ` tip-bot for Russ Anderson
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Russ Anderson @ 2012-01-26 13:37 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, rja, hpa, mingo, stable, tglx, mingo
Commit-ID: 5a51467b146ab7948d2f6812892eac120a30529c
Gitweb: http://git.kernel.org/tip/5a51467b146ab7948d2f6812892eac120a30529c
Author: Russ Anderson <rja@sgi.com>
AuthorDate: Wed, 18 Jan 2012 20:07:54 -0600
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 26 Jan 2012 10:58:27 +0100
x86/uv: Fix uv_gpa_to_soc_phys_ram() shift
uv_gpa_to_soc_phys_ram() was inadvertently ignoring the
shift values. This fix takes the shift into account.
Signed-off-by: Russ Anderson <rja@sgi.com>
Cc: <stable@kernel.org>
Link: http://lkml.kernel.org/r/20120119020753.GA7228@sgi.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/include/asm/uv/uv_hub.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index 54a13aa..21f7385 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -318,13 +318,13 @@ uv_gpa_in_mmr_space(unsigned long gpa)
/* UV global physical address --> socket phys RAM */
static inline unsigned long uv_gpa_to_soc_phys_ram(unsigned long gpa)
{
- unsigned long paddr = gpa & uv_hub_info->gpa_mask;
+ unsigned long paddr;
unsigned long remap_base = uv_hub_info->lowmem_remap_base;
unsigned long remap_top = uv_hub_info->lowmem_remap_top;
gpa = ((gpa << uv_hub_info->m_shift) >> uv_hub_info->m_shift) |
((gpa >> uv_hub_info->n_lshift) << uv_hub_info->m_val);
- gpa = gpa & uv_hub_info->gpa_mask;
+ paddr = gpa & uv_hub_info->gpa_mask;
if (paddr >= remap_base && paddr < remap_base + remap_top)
paddr -= remap_base;
return paddr;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-26 13:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-19 2:07 [PATCH] x86/uv: Fix uv_gpa_to_soc_phys_ram shift Russ Anderson
2012-01-26 13:37 ` [tip:x86/urgent] x86/uv: Fix uv_gpa_to_soc_phys_ram() shift tip-bot for Russ Anderson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.