16 #include <linux/device.h>
17 #include <asm/uv/uv_hub.h>
18 #if defined CONFIG_X86_64
20 #elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
23 #include "../sgi-gru/grukservices.h"
39 xp_socket_pa_uv(
unsigned long gpa)
41 return uv_gpa_to_soc_phys_ram(gpa);
45 xp_remote_mmr_read(
unsigned long dst_gpa,
const unsigned long src_gpa,
49 unsigned long *dst_va =
__va(uv_gpa_to_soc_phys_ram(dst_gpa));
51 BUG_ON(!uv_gpa_in_mmr_space(src_gpa));
58 dev_err(
xp,
"gru_read_gpa() failed, dst_gpa=0x%016lx src_gpa=0x%016lx "
59 "len=%ld\n", dst_gpa, src_gpa, len);
65 xp_remote_memcpy_uv(
unsigned long dst_gpa,
const unsigned long src_gpa,
70 if (uv_gpa_in_mmr_space(src_gpa))
71 return xp_remote_mmr_read(dst_gpa, src_gpa, len);
77 dev_err(
xp,
"gru_copy_gpa() failed, dst_gpa=0x%016lx src_gpa=0x%016lx "
78 "len=%ld\n", dst_gpa, src_gpa, len);
83 xp_cpu_to_nasid_uv(
int cpuid)
90 xp_expand_memprotect_uv(
unsigned long phys_addr,
unsigned long size)
94 #if defined CONFIG_X86_64
97 dev_err(
xp,
"uv_bios_change_memprotect(,, "
98 "UV_MEMPROT_ALLOW_RW) failed, ret=%d\n", ret);
102 #elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
109 "SN_MEMPROT_ACCESS_CLASS_1,) failed ret=%d\n", ret);
113 #error not a supported configuration
119 xp_restrict_memprotect_uv(
unsigned long phys_addr,
unsigned long size)
123 #if defined CONFIG_X86_64
127 dev_err(
xp,
"uv_bios_change_memprotect(,, "
128 "UV_MEMPROT_RESTRICT_ACCESS) failed, ret=%d\n", ret);
132 #elif defined CONFIG_IA64_GENERIC || defined CONFIG_IA64_SGI_UV
139 "SN_MEMPROT_ACCESS_CLASS_0,) failed ret=%d\n", ret);
143 #error not a supported configuration