提交 fae419f2 编写于 作者: R Robin Holt 提交者: Linus Torvalds

x86: uv: introduce uv_gpa_is_mmr

Provide a mechanism for determining if a global physical address is
pointing to a UV hub MMR.
Signed-off-by: NRobin Holt <holt@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 68212893
...@@ -232,6 +232,13 @@ static inline unsigned long uv_gpa(void *v) ...@@ -232,6 +232,13 @@ static inline unsigned long uv_gpa(void *v)
return uv_soc_phys_ram_to_gpa(__pa(v)); return uv_soc_phys_ram_to_gpa(__pa(v));
} }
/* Top two bits indicate the requested address is in MMR space. */
static inline int
uv_gpa_in_mmr_space(unsigned long gpa)
{
return (gpa >> 62) == 0x3UL;
}
/* UV global physical address --> socket phys RAM */ /* UV global physical address --> socket phys RAM */
static inline unsigned long uv_gpa_to_soc_phys_ram(unsigned long gpa) static inline unsigned long uv_gpa_to_soc_phys_ram(unsigned long gpa)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册