s390/zcrypt: Remove deprecated ioctls.
authorHarald Freudenberger <freude@linux.vnet.ibm.com>
Wed, 4 Apr 2018 11:25:40 +0000 (13:25 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 10 Apr 2018 05:39:01 +0000 (07:39 +0200)
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>
arch/s390/include/uapi/asm/zcrypt.h
drivers/s390/crypto/zcrypt_api.c
drivers/s390/crypto/zcrypt_api.h

index d568307..2e061b6 100644 (file)
@@ -303,38 +303,6 @@ struct zcrypt_device_matrix {
  *
  *   Z90STAT_DOMAIN_INDEX
  *     Return the integer value of the Cryptographic Domain.
- *
- *   The following ioctls are deprecated and should be no longer used:
- *
- *   Z90STAT_TOTALCOUNT
- *     Return an integer count of all device types together.
- *
- *   Z90STAT_PCICACOUNT
- *     Return an integer count of all PCICAs.
- *
- *   Z90STAT_PCICCCOUNT
- *     Return an integer count of all PCICCs.
- *
- *   Z90STAT_PCIXCCMCL2COUNT
- *     Return an integer count of all MCL2 PCIXCCs.
- *
- *   Z90STAT_PCIXCCMCL3COUNT
- *     Return an integer count of all MCL3 PCIXCCs.
- *
- *   Z90STAT_CEX2CCOUNT
- *     Return an integer count of all CEX2Cs.
- *
- *   Z90STAT_CEX2ACOUNT
- *     Return an integer count of all CEX2As.
- *
- *   ICAZ90STATUS
- *     Return some device driver status in a ica_z90_status struct
- *     This takes an ica_z90_status struct as its arg.
- *
- *   Z90STAT_PCIXCCCOUNT
- *     Return an integer count of all PCIXCCs (MCL2 + MCL3).
- *     This is DEPRECATED now that MCL3 PCIXCCs are treated differently from
- *     MCL2 PCIXCCs.
  */
 
 /**
@@ -346,14 +314,7 @@ struct zcrypt_device_matrix {
 #define ZSENDEP11CPRB  _IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x04, 0)
 #define ZDEVICESTATUS  _IOC(_IOC_READ|_IOC_WRITE, ZCRYPT_IOCTL_MAGIC, 0x4f, 0)
 
-/* New status calls */
-#define Z90STAT_TOTALCOUNT     _IOR(ZCRYPT_IOCTL_MAGIC, 0x40, int)
-#define Z90STAT_PCICACOUNT     _IOR(ZCRYPT_IOCTL_MAGIC, 0x41, int)
-#define Z90STAT_PCICCCOUNT     _IOR(ZCRYPT_IOCTL_MAGIC, 0x42, int)
-#define Z90STAT_PCIXCCMCL2COUNT        _IOR(ZCRYPT_IOCTL_MAGIC, 0x4b, int)
-#define Z90STAT_PCIXCCMCL3COUNT        _IOR(ZCRYPT_IOCTL_MAGIC, 0x4c, int)
-#define Z90STAT_CEX2CCOUNT     _IOR(ZCRYPT_IOCTL_MAGIC, 0x4d, int)
-#define Z90STAT_CEX2ACOUNT     _IOR(ZCRYPT_IOCTL_MAGIC, 0x4e, int)
+/* Status ioctl calls */
 #define Z90STAT_REQUESTQ_COUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x44, int)
 #define Z90STAT_PENDINGQ_COUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x45, int)
 #define Z90STAT_TOTALOPEN_COUNT _IOR(ZCRYPT_IOCTL_MAGIC, 0x46, int)
index ce15f10..5df90cd 100644 (file)
@@ -760,35 +760,6 @@ static int zcrypt_count_type(int type)
        return device_count;
 }
 
-/**
- * zcrypt_ica_status(): Old, depracted combi status call.
- *
- * Old, deprecated combi status call.
- */
-static long zcrypt_ica_status(struct file *filp, unsigned long arg)
-{
-       struct ica_z90_status *pstat;
-       int ret;
-
-       pstat = kzalloc(sizeof(*pstat), GFP_KERNEL);
-       if (!pstat)
-               return -ENOMEM;
-       pstat->totalcount = zcrypt_device_count;
-       pstat->leedslitecount = zcrypt_count_type(ZCRYPT_PCICA);
-       pstat->leeds2count = zcrypt_count_type(ZCRYPT_PCICC);
-       pstat->requestqWaitCount = zcrypt_requestq_count();
-       pstat->pendingqWaitCount = zcrypt_pendingq_count();
-       pstat->totalOpenCount = atomic_read(&zcrypt_open_count);
-       pstat->cryptoDomain = ap_domain_index;
-       zcrypt_status_mask(pstat->status);
-       zcrypt_qdepth_mask(pstat->qdepth);
-       ret = 0;
-       if (copy_to_user((void __user *) arg, pstat, sizeof(*pstat)))
-               ret = -EFAULT;
-       kfree(pstat);
-       return ret;
-}
-
 static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd,
                                  unsigned long arg)
 {
@@ -923,39 +894,8 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd,
                                (int __user *) arg);
        case Z90STAT_DOMAIN_INDEX:
                return put_user(ap_domain_index, (int __user *) arg);
-       /*
-        * Deprecated ioctls. Don't add another device count ioctl,
-        * you can count them yourself in the user space with the
-        * output of the Z90STAT_STATUS_MASK ioctl.
-        */
-       case ICAZ90STATUS:
-               return zcrypt_ica_status(filp, arg);
-       case Z90STAT_TOTALCOUNT:
-               return put_user(zcrypt_device_count, (int __user *) arg);
-       case Z90STAT_PCICACOUNT:
-               return put_user(zcrypt_count_type(ZCRYPT_PCICA),
-                               (int __user *) arg);
-       case Z90STAT_PCICCCOUNT:
-               return put_user(zcrypt_count_type(ZCRYPT_PCICC),
-                               (int __user *) arg);
-       case Z90STAT_PCIXCCMCL2COUNT:
-               return put_user(zcrypt_count_type(ZCRYPT_PCIXCC_MCL2),
-                               (int __user *) arg);
-       case Z90STAT_PCIXCCMCL3COUNT:
-               return put_user(zcrypt_count_type(ZCRYPT_PCIXCC_MCL3),
-                               (int __user *) arg);
-       case Z90STAT_PCIXCCCOUNT:
-               return put_user(zcrypt_count_type(ZCRYPT_PCIXCC_MCL2) +
-                               zcrypt_count_type(ZCRYPT_PCIXCC_MCL3),
-                               (int __user *) arg);
-       case Z90STAT_CEX2CCOUNT:
-               return put_user(zcrypt_count_type(ZCRYPT_CEX2C),
-                               (int __user *) arg);
-       case Z90STAT_CEX2ACOUNT:
-               return put_user(zcrypt_count_type(ZCRYPT_CEX2A),
-                               (int __user *) arg);
+       /* unknown ioctl number */
        default:
-               /* unknown ioctl number */
                return -ENOIOCTLCMD;
        }
 }
index 9fff891..8cc5f80 100644 (file)
 #include <asm/zcrypt.h>
 #include "ap_bus.h"
 
-/* deprecated status calls */
-#define ICAZ90STATUS           _IOR(ZCRYPT_IOCTL_MAGIC, 0x10, struct ica_z90_status)
-#define Z90STAT_PCIXCCCOUNT    _IOR(ZCRYPT_IOCTL_MAGIC, 0x43, int)
-
-/**
- * This structure is deprecated and the corresponding ioctl() has been
- * replaced with individual ioctl()s for each piece of data!
- */
-struct ica_z90_status {
-       int totalcount;
-       int leedslitecount; // PCICA
-       int leeds2count;    // PCICC
-       // int PCIXCCCount; is not in struct for backward compatibility
-       int requestqWaitCount;
-       int pendingqWaitCount;
-       int totalOpenCount;
-       int cryptoDomain;
-       // status: 0=not there, 1=PCICA, 2=PCICC, 3=PCIXCC_MCL2, 4=PCIXCC_MCL3,
-       //         5=CEX2C
-       unsigned char status[64];
-       // qdepth: # work elements waiting for each device
-       unsigned char qdepth[64];
-};
-
 /**
  * device type for an actual device is either PCICA, PCICC, PCIXCC_MCL2,
  * PCIXCC_MCL3, CEX2C, or CEX2A