aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/uv/uv_hub.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index 04eb6c958b9d..94908a08020a 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -114,7 +114,7 @@
114/* 114/*
115 * The largest possible NASID of a C or M brick (+ 2) 115 * The largest possible NASID of a C or M brick (+ 2)
116 */ 116 */
117#define UV_MAX_NASID_VALUE (UV_MAX_NUMALINK_NODES * 2) 117#define UV_MAX_NASID_VALUE (UV_MAX_NUMALINK_BLADES * 2)
118 118
119struct uv_scir_s { 119struct uv_scir_s {
120 struct timer_list timer; 120 struct timer_list timer;
@@ -230,6 +230,20 @@ static inline unsigned long uv_gpa(void *v)
230 return uv_soc_phys_ram_to_gpa(__pa(v)); 230 return uv_soc_phys_ram_to_gpa(__pa(v));
231} 231}
232 232
233/* gnode -> pnode */
234static inline unsigned long uv_gpa_to_gnode(unsigned long gpa)
235{
236 return gpa >> uv_hub_info->m_val;
237}
238
239/* gpa -> pnode */
240static inline int uv_gpa_to_pnode(unsigned long gpa)
241{
242 unsigned long n_mask = (1UL << uv_hub_info->n_val) - 1;
243
244 return uv_gpa_to_gnode(gpa) & n_mask;
245}
246
233/* pnode, offset --> socket virtual */ 247/* pnode, offset --> socket virtual */
234static inline void *uv_pnode_offset_to_vaddr(int pnode, unsigned long offset) 248static inline void *uv_pnode_offset_to_vaddr(int pnode, unsigned long offset)
235{ 249{