2 * include/asm-s390/sigp.h
5 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 * Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com),
7 * Martin Schwidefsky (schwidefsky@de.ibm.com)
8 * Heiko Carstens (heiko.carstens@de.ibm.com)
10 * sigp.h by D.J. Barrow (c) IBM 1999
11 * contains routines / structures for signalling other S/390 processors in an
18 #include <asm/ptrace.h>
19 #include <asm/atomic.h>
21 /* get real cpu address from logical cpu number */
22 extern volatile int __cpu_logical_map
[];
29 sigp_emergency_signal
,
35 sigp_stop_and_store_status
,
37 sigp_initial_cpu_reset
,
40 sigp_store_status_at_address
,
41 sigp_store_extended_status_at_address
44 typedef __u32 sigp_status_word
;
48 sigp_order_code_accepted
=0,
56 * Definitions for the external call
59 /* 'Bit' signals, asynchronous */
70 static inline sigp_ccode
71 signal_processor(__u16 cpu_addr
, sigp_order_code order_code
)
76 " sr 1,1\n" /* parameter=0 in gpr 1 */
81 : "d" (__cpu_logical_map
[cpu_addr
]), "a" (order_code
)
82 : "cc" , "memory", "1" );
87 * Signal processor with parameter
89 static inline sigp_ccode
90 signal_processor_p(__u32 parameter
, __u16 cpu_addr
,
91 sigp_order_code order_code
)
96 " lr 1,%1\n" /* parameter in gpr 1 */
101 : "d" (parameter
), "d" (__cpu_logical_map
[cpu_addr
]),
103 : "cc" , "memory", "1" );
108 * Signal processor with parameter and return status
110 static inline sigp_ccode
111 signal_processor_ps(__u32
*statusptr
, __u32 parameter
,
112 __u16 cpu_addr
, sigp_order_code order_code
)
116 __asm__
__volatile__(
117 " sr 2,2\n" /* clear status */
118 " lr 3,%2\n" /* parameter in gpr 3 */
123 : "=d" (ccode
), "=m" (*statusptr
)
124 : "d" (parameter
), "d" (__cpu_logical_map
[cpu_addr
]),
126 : "cc" , "memory", "2" , "3"
131 #endif /* __SIGP__ */