xref: /linux/arch/s390/include/asm/cpcmd.h (revision 498495dba268b20e8eadd7fe93c140c68b6cc9d2)
1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
21da177e4SLinus Torvalds /*
31da177e4SLinus Torvalds  *  S390 version
4a53c8fabSHeiko Carstens  *    Copyright IBM Corp. 1999
51da177e4SLinus Torvalds  *    Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
61da177e4SLinus Torvalds  *               Christian Borntraeger (cborntra@de.ibm.com),
71da177e4SLinus Torvalds  */
81da177e4SLinus Torvalds 
9740b5706SHeiko Carstens #ifndef _ASM_S390_CPCMD_H
10740b5706SHeiko Carstens #define _ASM_S390_CPCMD_H
111da177e4SLinus Torvalds 
121da177e4SLinus Torvalds /*
136b979de3SChristian Borntraeger  * the lowlevel function for cpcmd
141da177e4SLinus Torvalds  */
15cd4386a9SHeiko Carstens int __cpcmd(const char *cmd, char *response, int rlen, int *response_code);
161da177e4SLinus Torvalds 
176b979de3SChristian Borntraeger /*
186b979de3SChristian Borntraeger  * cpcmd is the in-kernel interface for issuing CP commands
196b979de3SChristian Borntraeger  *
206b979de3SChristian Borntraeger  * cmd:		null-terminated command string, max 240 characters
216b979de3SChristian Borntraeger  * response:	response buffer for VM's textual response
226b979de3SChristian Borntraeger  * rlen:	size of the response buffer, cpcmd will not exceed this size
236b979de3SChristian Borntraeger  *		but will cap the output, if its too large. Everything that
246b979de3SChristian Borntraeger  *		did not fit into the buffer will be silently dropped
256b979de3SChristian Borntraeger  * response_code: return pointer for VM's error code
266b979de3SChristian Borntraeger  * return value: the size of the response. The caller can check if the buffer
276b979de3SChristian Borntraeger  *		was large enough by comparing the return value and rlen
28cd4386a9SHeiko Carstens  * NOTE: If the response buffer is not in real storage, cpcmd can sleep
296b979de3SChristian Borntraeger  */
30cd4386a9SHeiko Carstens int cpcmd(const char *cmd, char *response, int rlen, int *response_code);
311da177e4SLinus Torvalds 
32740b5706SHeiko Carstens #endif /* _ASM_S390_CPCMD_H */
33