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/system.h>
20 /* get real cpu address from logical cpu number */
21 extern int __cpu_logical_map
[];
23 static inline int cpu_logical_map(int cpu
)
26 return __cpu_logical_map
[cpu
];
37 sigp_emergency_signal
,
43 sigp_stop_and_store_status
,
45 sigp_initial_cpu_reset
,
48 sigp_store_status_at_address
,
49 sigp_store_extended_status_at_address
52 typedef __u32 sigp_status_word
;
56 sigp_order_code_accepted
=0,
64 * Definitions for the external call
67 /* 'Bit' signals, asynchronous */
72 ec_call_function_single
,
79 static inline sigp_ccode
80 signal_processor(__u16 cpu_addr
, sigp_order_code order_code
)
82 register unsigned long reg1
asm ("1") = 0;
90 : "d" (reg1
), "d" (cpu_logical_map(cpu_addr
)),
91 "a" (order_code
) : "cc" , "memory");
96 * Signal processor with parameter
98 static inline sigp_ccode
99 signal_processor_p(__u32 parameter
, __u16 cpu_addr
, sigp_order_code order_code
)
101 register unsigned int reg1
asm ("1") = parameter
;
105 " sigp %1,%2,0(%3)\n"
109 : "d" (reg1
), "d" (cpu_logical_map(cpu_addr
)),
110 "a" (order_code
) : "cc" , "memory");
115 * Signal processor with parameter and return status
117 static inline sigp_ccode
118 signal_processor_ps(__u32
*statusptr
, __u32 parameter
, __u16 cpu_addr
,
119 sigp_order_code order_code
)
121 register unsigned int reg1
asm ("1") = parameter
;
125 " sigp %1,%2,0(%3)\n"
128 : "=d" (ccode
), "+d" (reg1
)
129 : "d" (cpu_logical_map(cpu_addr
)), "a" (order_code
)
135 #endif /* __SIGP__ */