2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.
10 * Cross Partition (XP) uv-based functions.
12 * Architecture specific implementation of common functions.
16 #include <linux/device.h>
17 #include <asm/uv/uv_hub.h>
18 #include "../sgi-gru/grukservices.h"
22 * Convert a virtual memory address to a physical memory address.
31 xp_remote_memcpy_uv(unsigned long dst_gpa, const unsigned long src_gpa,
36 ret = gru_copy_gpa(dst_gpa, src_gpa, len);
40 dev_err(xp, "gru_copy_gpa() failed, dst_gpa=0x%016lx src_gpa=0x%016lx "
41 "len=%ld\n", dst_gpa, src_gpa, len);
42 return xpGruCopyError;
46 xp_cpu_to_nasid_uv(int cpuid)
48 /* ??? Is this same as sn2 nasid in mach/part bitmaps set up by SAL? */
49 return UV_PNODE_TO_NASID(uv_cpu_to_pnode(cpuid));
57 xp_max_npartitions = XP_MAX_NPARTITIONS_UV;
58 xp_partition_id = 0; /* !!! not correct value */
59 xp_region_size = 0; /* !!! not correct value */
62 xp_remote_memcpy = xp_remote_memcpy_uv;
63 xp_cpu_to_nasid = xp_cpu_to_nasid_uv;