| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: xcall.9,v 1.12 2018/02/01 03:15:28 ozaki-r Exp $ | | 1 | .\" $NetBSD: xcall.9,v 1.13 2019/10/06 17:01:15 uwe Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 2010 The NetBSD Foundation, Inc. | | 3 | .\" Copyright (c) 2010 The NetBSD Foundation, Inc. |
4 | .\" All rights reserved. | | 4 | .\" All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" This code is derived from software contributed to The NetBSD Foundation | | 6 | .\" This code is derived from software contributed to The NetBSD Foundation |
7 | .\" by Andrew Doran. | | 7 | .\" by Andrew Doran. |
8 | .\" | | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | | 9 | .\" Redistribution and use in source and binary forms, with or without |
10 | .\" modification, are permitted provided that the following conditions | | 10 | .\" modification, are permitted provided that the following conditions |
11 | .\" are met: | | 11 | .\" are met: |
12 | .\" 1. Redistributions of source code must retain the above copyright | | 12 | .\" 1. Redistributions of source code must retain the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer. | | 13 | .\" notice, this list of conditions and the following disclaimer. |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| @@ -87,27 +87,27 @@ also provides a mechanism for making | | | @@ -87,27 +87,27 @@ also provides a mechanism for making |
87 | .Dq "high priority" | | 87 | .Dq "high priority" |
88 | cross calls. | | 88 | cross calls. |
89 | The function to be executed runs on the remote CPU within a | | 89 | The function to be executed runs on the remote CPU within a |
90 | software interrupt context, possibly interrupting other lower-priority | | 90 | software interrupt context, possibly interrupting other lower-priority |
91 | code running on the CPU. | | 91 | code running on the CPU. |
92 | .Sh NOTES | | 92 | .Sh NOTES |
93 | Functions being called should be relatively lightweight. | | 93 | Functions being called should be relatively lightweight. |
94 | They may block on locks, but carefully and minimally, to not interfere | | 94 | They may block on locks, but carefully and minimally, to not interfere |
95 | with other cross calls in the system. | | 95 | with other cross calls in the system. |
96 | .Sh FUNCTIONS | | 96 | .Sh FUNCTIONS |
97 | .Bl -tag -width compact | | 97 | .Bl -tag -width compact |
98 | .It Fn xc_broadcast "flags" "func" "arg1" "arg2" | | 98 | .It Fn xc_broadcast "flags" "func" "arg1" "arg2" |
99 | Call | | 99 | Call |
100 | .Fo "(*func)" | | 100 | .Pf (* Fa func\| ) Ns Fo "" |
101 | .Fa "arg1" | | 101 | .Fa "arg1" |
102 | .Fa "arg2" | | 102 | .Fa "arg2" |
103 | .Fc | | 103 | .Fc |
104 | on all CPUs in the system. | | 104 | on all CPUs in the system. |
105 | Return a | | 105 | Return a |
106 | .Vt uint64_t | | 106 | .Vt uint64_t |
107 | .Dq ticket | | 107 | .Dq ticket |
108 | to | | 108 | to |
109 | .Fn xc_wait | | 109 | .Fn xc_wait |
110 | on for the cross-call to complete. | | 110 | on for the cross-call to complete. |
111 | .Fa flags | | 111 | .Fa flags |
112 | should be | | 112 | should be |
113 | .Dv XC_HIGHPRI | | 113 | .Dv XC_HIGHPRI |
| @@ -119,27 +119,27 @@ for a "high priority" call, and 0 for a | | | @@ -119,27 +119,27 @@ for a "high priority" call, and 0 for a |
119 | .Dv XC_HIGHPRI | | 119 | .Dv XC_HIGHPRI |
120 | uses an | | 120 | uses an |
121 | .Dv IPL_SOFTSERIAL | | 121 | .Dv IPL_SOFTSERIAL |
122 | software interrupt while | | 122 | software interrupt while |
123 | .Fn XC_HIGHPRI_IPL | | 123 | .Fn XC_HIGHPRI_IPL |
124 | uses a software interrupt with an IPL specified by | | 124 | uses a software interrupt with an IPL specified by |
125 | .Fa ipl . | | 125 | .Fa ipl . |
126 | .Fn xc_broadcast | | 126 | .Fn xc_broadcast |
127 | should not be called from interrupt context. | | 127 | should not be called from interrupt context. |
128 | .It Fn xc_unicast "flags" "func" "arg1" "arg2" "ci" | | 128 | .It Fn xc_unicast "flags" "func" "arg1" "arg2" "ci" |
129 | Like | | 129 | Like |
130 | .Fn xc_broadcast , | | 130 | .Fn xc_broadcast , |
131 | but call | | 131 | but call |
132 | .Fn "(*func)" | | 132 | .Fa func |
133 | on only the CPU indicated by | | 133 | on only the CPU indicated by |
134 | .Fa ci . | | 134 | .Fa ci . |
135 | .Fn xc_unicast | | 135 | .Fn xc_unicast |
136 | also returns a | | 136 | also returns a |
137 | .Dq ticket . | | 137 | .Dq ticket . |
138 | .It Fn xc_wait "where" | | 138 | .It Fn xc_wait "where" |
139 | Wait on the | | 139 | Wait on the |
140 | .Dq ticket | | 140 | .Dq ticket |
141 | returned by a prior | | 141 | returned by a prior |
142 | .Fn xc_broadcast | | 142 | .Fn xc_broadcast |
143 | or | | 143 | or |
144 | .Fn xc_unicast | | 144 | .Fn xc_unicast |
145 | for the corresponding cross-call to complete. | | 145 | for the corresponding cross-call to complete. |