Lines Matching +full:cpu +full:- +full:offset

23  *	M       - The low M bits of a physical address represent the offset
28 * N - Number of bits in the node portion of a socket physical
31 * NASID - network ID of a router, Mbrick or Cbrick. Nasid values of
34 * right shift the NASID by 1 to exclude the always-zero bit.
37 * GNODE - NASID right shifted by 1 bit. Most mmrs contain gnodes instead
40 * PNODE - the low N bits of the GNODE. The PNODE is the most useful variant
45 * +--------------------------------+---------------------+
47 * +--------------------------------+---------------------+
48 * |<-------53 - M bits --->|<--------M bits ----->
50 * M - number of node offset bits (35 .. 40)
53 * Memory/UV-HUB Processor Socket Address Format:
54 * +----------------+---------------+---------------------+
56 * +----------------+---------------+---------------------+
57 * <--- N bits --->|<--------M bits ----->
59 * M - number of node offset bits (35 .. 40)
60 * N - number of PNODE bits (0 .. 10)
73 * This value is also the value of the maximum number of non-router NASIDs
93 * frequently referenced and are kept in the per-cpu data areas of each cpu.
112 #define uv_cpu_hub_info(cpu) (&per_cpu(__uv_hub_info, cpu)) argument
117 * in this file - not by other kernel code.
118 * n - NASID (full 15-bit global nasid)
119 * g - GNODE (full 15-bit global nasid, right shifted 1)
120 * p - PNODE (local part of nsids, right shifted 1)
122 #define UV_NASID_TO_PNODE(n) (((n) >> 1) & uv_hub_info->pnode_mask)
123 #define UV_PNODE_TO_NASID(p) (((p) << 1) | uv_hub_info->gnode_upper)
127 #define UV_GLOBAL_MMR64_BASE (uv_hub_info->global_mmr_base)
144 /* socket phys RAM --> UV global physical address */
147 if (paddr < uv_hub_info->lowmem_remap_top) in uv_soc_phys_ram_to_gpa()
148 paddr += uv_hub_info->lowmem_remap_base; in uv_soc_phys_ram_to_gpa()
149 return paddr | uv_hub_info->gnode_upper; in uv_soc_phys_ram_to_gpa()
153 /* socket virtual --> UV global physical address */
156 return __pa(v) | uv_hub_info->gnode_upper; in uv_gpa()
159 /* socket virtual --> UV global physical address */
165 /* UV global physical address --> socket virtual */
168 return __va(gpa & uv_hub_info->gpa_mask); in uv_va()
171 /* pnode, offset --> socket virtual */
172 static inline void *uv_pnode_offset_to_vaddr(int pnode, unsigned long offset) in uv_pnode_offset_to_vaddr() argument
174 return __va(((unsigned long)pnode << uv_hub_info->m_val) | offset); in uv_pnode_offset_to_vaddr()
183 unsigned long offset) in uv_global_mmr32_address() argument
186 UV_GLOBAL_MMR32_PNODE_BITS(pnode) | offset); in uv_global_mmr32_address()
189 static inline void uv_write_global_mmr32(int pnode, unsigned long offset, in uv_write_global_mmr32() argument
192 *uv_global_mmr32_address(pnode, offset) = val; in uv_write_global_mmr32()
196 unsigned long offset) in uv_read_global_mmr32() argument
198 return *uv_global_mmr32_address(pnode, offset); in uv_read_global_mmr32()
206 unsigned long offset) in uv_global_mmr64_address() argument
209 UV_GLOBAL_MMR64_PNODE_BITS(pnode) | offset); in uv_global_mmr64_address()
212 static inline void uv_write_global_mmr64(int pnode, unsigned long offset, in uv_write_global_mmr64() argument
215 *uv_global_mmr64_address(pnode, offset) = val; in uv_write_global_mmr64()
219 unsigned long offset) in uv_read_global_mmr64() argument
221 return *uv_global_mmr64_address(pnode, offset); in uv_read_global_mmr64()
228 static inline unsigned long *uv_local_mmr_address(unsigned long offset) in uv_local_mmr_address() argument
230 return __va(UV_LOCAL_MMR_BASE | offset); in uv_local_mmr_address()
233 static inline unsigned long uv_read_local_mmr(unsigned long offset) in uv_read_local_mmr() argument
235 return *uv_local_mmr_address(offset); in uv_read_local_mmr()
238 static inline void uv_write_local_mmr(unsigned long offset, unsigned long val) in uv_write_local_mmr() argument
240 *uv_local_mmr_address(offset) = val; in uv_write_local_mmr()
244 * Structures and definitions for converting between cpu, node, pnode, and blade
248 /* Blade-local cpu number of current cpu. Numbered 0 .. <# cpus on the blade> */
254 /* Blade number of current cpu. Numnbered 0 .. <#blades -1> */
260 /* Convert a cpu number to the the UV blade number */
261 static inline int uv_cpu_to_blade_id(int cpu) in uv_cpu_to_blade_id() argument
290 /* Convert a cpu id to the PNODE of the blade containing the cpu */
291 static inline int uv_cpu_to_pnode(int cpu) in uv_cpu_to_pnode() argument