mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 07:01:32 +00:00
d9d119f12f
A number of small changes to vmcp: - Change preferred email address. - Use PRINT_xxx machros from debug.h like most s390 drivers, define "vmcp:" as PRINTK_HEADER and wrap error message at column 80. - Add error number to error message. - Update copyright, as I touched this file. - Small whitespace diff. - Use mutex instead of semaphore (Thanks Heiko for the patch) - Don't register debug feature on failure. - Check debug feature registration on init to avoid a potential oops on unload if the debug feature could not be registered--> 2 more messages. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
31 lines
849 B
C
31 lines
849 B
C
/*
|
|
* Copyright (C) 2004, 2005 IBM Corporation
|
|
* Interface implementation for communication with the z/VM control program
|
|
* Version 1.0
|
|
* Author(s): Christian Borntraeger <cborntra@de.ibm.com>
|
|
*
|
|
*
|
|
* z/VMs CP offers the possibility to issue commands via the diagnose code 8
|
|
* this driver implements a character device that issues these commands and
|
|
* returns the answer of CP.
|
|
*
|
|
* The idea of this driver is based on cpint from Neale Ferguson
|
|
*/
|
|
|
|
#include <linux/ioctl.h>
|
|
#include <linux/mutex.h>
|
|
|
|
#define VMCP_GETCODE _IOR(0x10, 1, int)
|
|
#define VMCP_SETBUF _IOW(0x10, 2, int)
|
|
#define VMCP_GETSIZE _IOR(0x10, 3, int)
|
|
|
|
struct vmcp_session {
|
|
unsigned int bufsize;
|
|
char *response;
|
|
int resp_size;
|
|
int resp_code;
|
|
/* As we use copy_from/to_user, which might *
|
|
* sleep and cannot use a spinlock */
|
|
struct mutex mutex;
|
|
};
|