Dean Nelson | 94bd270 | 2008-07-29 22:34:05 -0700 | [diff] [blame] | 1 | /* |
| 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 |
| 4 | * for more details. |
| 5 | * |
| 6 | * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved. |
| 7 | */ |
| 8 | |
| 9 | /* |
| 10 | * Cross Partition Communication (XPC) uv-based functions. |
| 11 | * |
| 12 | * Architecture specific implementation of common functions. |
| 13 | * |
| 14 | */ |
| 15 | |
| 16 | #include <linux/kernel.h> |
| 17 | |
| 18 | /* >>> #include <gru/grukservices.h> */ |
| 19 | /* >>> uv_gpa() is defined in <gru/grukservices.h> */ |
| 20 | #define uv_gpa(_a) ((unsigned long)_a) |
| 21 | |
| 22 | /* >>> temporarily define next three items for xpc.h */ |
| 23 | #define SGI_XPC_ACTIVATE 23 |
| 24 | #define SGI_XPC_NOTIFY 24 |
| 25 | #define sn_send_IPI_phys(_a, _b, _c, _d) |
| 26 | |
| 27 | #include "xpc.h" |
| 28 | |
| 29 | static void *xpc_activate_mq; |
| 30 | |
| 31 | static enum xp_retval |
| 32 | xpc_rsvd_page_init_uv(struct xpc_rsvd_page *rp) |
| 33 | { |
| 34 | /* >>> need to have established xpc_activate_mq earlier */ |
| 35 | rp->sn.activate_mq_gpa = uv_gpa(xpc_activate_mq); |
| 36 | return xpSuccess; |
| 37 | } |
| 38 | |
Dean Nelson | e17d416 | 2008-07-29 22:34:06 -0700 | [diff] [blame^] | 39 | /* |
| 40 | * Setup the infrastructure necessary to support XPartition Communication |
| 41 | * between the specified remote partition and the local one. |
| 42 | */ |
| 43 | static enum xp_retval |
| 44 | xpc_setup_infrastructure_uv(struct xpc_partition *part) |
| 45 | { |
| 46 | /* >>> this function needs fleshing out */ |
| 47 | return xpUnsupported; |
| 48 | } |
| 49 | |
| 50 | /* |
| 51 | * Teardown the infrastructure necessary to support XPartition Communication |
| 52 | * between the specified remote partition and the local one. |
| 53 | */ |
| 54 | static void |
| 55 | xpc_teardown_infrastructure_uv(struct xpc_partition *part) |
| 56 | { |
| 57 | /* >>> this function needs fleshing out */ |
| 58 | return; |
| 59 | } |
| 60 | |
| 61 | static enum xp_retval |
| 62 | xpc_make_first_contact_uv(struct xpc_partition *part) |
| 63 | { |
| 64 | /* >>> this function needs fleshing out */ |
| 65 | return xpUnsupported; |
| 66 | } |
| 67 | |
| 68 | static u64 |
| 69 | xpc_get_IPI_flags_uv(struct xpc_partition *part) |
| 70 | { |
| 71 | /* >>> this function needs fleshing out */ |
| 72 | return 0UL; |
| 73 | } |
| 74 | |
| 75 | static struct xpc_msg * |
| 76 | xpc_get_deliverable_msg_uv(struct xpc_channel *ch) |
| 77 | { |
| 78 | /* >>> this function needs fleshing out */ |
| 79 | return NULL; |
| 80 | } |
| 81 | |
Dean Nelson | 94bd270 | 2008-07-29 22:34:05 -0700 | [diff] [blame] | 82 | void |
| 83 | xpc_init_uv(void) |
| 84 | { |
| 85 | xpc_rsvd_page_init = xpc_rsvd_page_init_uv; |
Dean Nelson | e17d416 | 2008-07-29 22:34:06 -0700 | [diff] [blame^] | 86 | xpc_setup_infrastructure = xpc_setup_infrastructure_uv; |
| 87 | xpc_teardown_infrastructure = xpc_teardown_infrastructure_uv; |
| 88 | xpc_make_first_contact = xpc_make_first_contact_uv; |
| 89 | xpc_get_IPI_flags = xpc_get_IPI_flags_uv; |
| 90 | xpc_get_deliverable_msg = xpc_get_deliverable_msg_uv; |
Dean Nelson | 94bd270 | 2008-07-29 22:34:05 -0700 | [diff] [blame] | 91 | } |
| 92 | |
| 93 | void |
| 94 | xpc_exit_uv(void) |
| 95 | { |
| 96 | } |