Skip to content

Commit 2a80786

Browse files
Harald FreudenbergerMartin Schwidefsky
authored andcommitted
s390/zcrypt: Remove deprecated ioctls.
This patch removes the old status calls which have been marked as deprecated since at least 2 years now. There is no known application or library relying on these ioctls any more. Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent efda7ad commit 2a80786

File tree

3 files changed

+2
-125
lines changed

3 files changed

+2
-125
lines changed

arch/s390/include/uapi/asm/zcrypt.h

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -303,38 +303,6 @@ struct zcrypt_device_matrix {
303303
*
304304
* Z90STAT_DOMAIN_INDEX
305305
* Return the integer value of the Cryptographic Domain.
306-
*
307-
* The following ioctls are deprecated and should be no longer used:
308-
*
309-
* Z90STAT_TOTALCOUNT
310-
* Return an integer count of all device types together.
311-
*
312-
* Z90STAT_PCICACOUNT
313-
* Return an integer count of all PCICAs.
314-
*
315-
* Z90STAT_PCICCCOUNT
316-
* Return an integer count of all PCICCs.
317-
*
318-
* Z90STAT_PCIXCCMCL2COUNT
319-
* Return an integer count of all MCL2 PCIXCCs.
320-
*
321-
* Z90STAT_PCIXCCMCL3COUNT
322-
* Return an integer count of all MCL3 PCIXCCs.
323-
*
324-
* Z90STAT_CEX2CCOUNT
325-
* Return an integer count of all CEX2Cs.
326-
*
327-
* Z90STAT_CEX2ACOUNT
328-
* Return an integer count of all CEX2As.
329-
*
330-
* ICAZ90STATUS
331-
* Return some device driver status in a ica_z90_status struct
332-
* This takes an ica_z90_status struct as its arg.
333-
*
334-
* Z90STAT_PCIXCCCOUNT
335-
* Return an integer count of all PCIXCCs (MCL2 + MCL3).
336-
* This is DEPRECATED now that MCL3 PCIXCCs are treated differently from
337-
* MCL2 PCIXCCs.
338306
*/
339307

340308
/**
@@ -346,14 +314,7 @@ struct zcrypt_device_matrix {
346314
#define ZSENDEP11CPRB _IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x04, 0)
347315
#define ZDEVICESTATUS _IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x4f, 0)
348316

349-
/* New status calls */
350-
#define Z90STAT_TOTALCOUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x40, int)
351-
#define Z90STAT_PCICACOUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x41, int)
352-
#define Z90STAT_PCICCCOUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x42, int)
353-
#define Z90STAT_PCIXCCMCL2COUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x4b, int)
354-
#define Z90STAT_PCIXCCMCL3COUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x4c, int)
355-
#define Z90STAT_CEX2CCOUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x4d, int)
356-
#define Z90STAT_CEX2ACOUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x4e, int)
317+
/* Status ioctl calls */
357318
#define Z90STAT_REQUESTQ_COUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x44, int)
358319
#define Z90STAT_PENDINGQ_COUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x45, int)
359320
#define Z90STAT_TOTALOPEN_COUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x46, int)

drivers/s390/crypto/zcrypt_api.c

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -760,35 +760,6 @@ static int zcrypt_count_type(int type)
760760
return device_count;
761761
}
762762

763-
/**
764-
* zcrypt_ica_status(): Old, depracted combi status call.
765-
*
766-
* Old, deprecated combi status call.
767-
*/
768-
static long zcrypt_ica_status(struct file *filp, unsigned long arg)
769-
{
770-
struct ica_z90_status *pstat;
771-
int ret;
772-
773-
pstat = kzalloc(sizeof(*pstat), GFP_KERNEL);
774-
if (!pstat)
775-
return -ENOMEM;
776-
pstat->totalcount = zcrypt_device_count;
777-
pstat->leedslitecount = zcrypt_count_type(ZCRYPT_PCICA);
778-
pstat->leeds2count = zcrypt_count_type(ZCRYPT_PCICC);
779-
pstat->requestqWaitCount = zcrypt_requestq_count();
780-
pstat->pendingqWaitCount = zcrypt_pendingq_count();
781-
pstat->totalOpenCount = atomic_read(&zcrypt_open_count);
782-
pstat->cryptoDomain = ap_domain_index;
783-
zcrypt_status_mask(pstat->status);
784-
zcrypt_qdepth_mask(pstat->qdepth);
785-
ret = 0;
786-
if (copy_to_user((void __user *) arg, pstat, sizeof(*pstat)))
787-
ret = -EFAULT;
788-
kfree(pstat);
789-
return ret;
790-
}
791-
792763
static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd,
793764
unsigned long arg)
794765
{
@@ -923,39 +894,8 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd,
923894
(int __user *) arg);
924895
case Z90STAT_DOMAIN_INDEX:
925896
return put_user(ap_domain_index, (int __user *) arg);
926-
/*
927-
* Deprecated ioctls. Don't add another device count ioctl,
928-
* you can count them yourself in the user space with the
929-
* output of the Z90STAT_STATUS_MASK ioctl.
930-
*/
931-
case ICAZ90STATUS:
932-
return zcrypt_ica_status(filp, arg);
933-
case Z90STAT_TOTALCOUNT:
934-
return put_user(zcrypt_device_count, (int __user *) arg);
935-
case Z90STAT_PCICACOUNT:
936-
return put_user(zcrypt_count_type(ZCRYPT_PCICA),
937-
(int __user *) arg);
938-
case Z90STAT_PCICCCOUNT:
939-
return put_user(zcrypt_count_type(ZCRYPT_PCICC),
940-
(int __user *) arg);
941-
case Z90STAT_PCIXCCMCL2COUNT:
942-
return put_user(zcrypt_count_type(ZCRYPT_PCIXCC_MCL2),
943-
(int __user *) arg);
944-
case Z90STAT_PCIXCCMCL3COUNT:
945-
return put_user(zcrypt_count_type(ZCRYPT_PCIXCC_MCL3),
946-
(int __user *) arg);
947-
case Z90STAT_PCIXCCCOUNT:
948-
return put_user(zcrypt_count_type(ZCRYPT_PCIXCC_MCL2) +
949-
zcrypt_count_type(ZCRYPT_PCIXCC_MCL3),
950-
(int __user *) arg);
951-
case Z90STAT_CEX2CCOUNT:
952-
return put_user(zcrypt_count_type(ZCRYPT_CEX2C),
953-
(int __user *) arg);
954-
case Z90STAT_CEX2ACOUNT:
955-
return put_user(zcrypt_count_type(ZCRYPT_CEX2A),
956-
(int __user *) arg);
897+
/* unknown ioctl number */
957898
default:
958-
/* unknown ioctl number */
959899
return -ENOIOCTLCMD;
960900
}
961901
}

drivers/s390/crypto/zcrypt_api.h

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,6 @@
2121
#include <asm/zcrypt.h>
2222
#include "ap_bus.h"
2323

24-
/* deprecated status calls */
25-
#define ICAZ90STATUS _IOR(ZCRYPT_IOCTL_MAGIC, 0x10, struct ica_z90_status)
26-
#define Z90STAT_PCIXCCCOUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x43, int)
27-
28-
/**
29-
* This structure is deprecated and the corresponding ioctl() has been
30-
* replaced with individual ioctl()s for each piece of data!
31-
*/
32-
struct ica_z90_status {
33-
int totalcount;
34-
int leedslitecount; // PCICA
35-
int leeds2count; // PCICC
36-
// int PCIXCCCount; is not in struct for backward compatibility
37-
int requestqWaitCount;
38-
int pendingqWaitCount;
39-
int totalOpenCount;
40-
int cryptoDomain;
41-
// status: 0=not there, 1=PCICA, 2=PCICC, 3=PCIXCC_MCL2, 4=PCIXCC_MCL3,
42-
// 5=CEX2C
43-
unsigned char status[64];
44-
// qdepth: # work elements waiting for each device
45-
unsigned char qdepth[64];
46-
};
47-
4824
/**
4925
* device type for an actual device is either PCICA, PCICC, PCIXCC_MCL2,
5026
* PCIXCC_MCL3, CEX2C, or CEX2A

0 commit comments

Comments
 (0)