aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/qdio_setup.c
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.ibm.com>2021-10-25 11:56:52 +0200
committerDavid S. Miller <davem@davemloft.net>2021-10-25 13:58:19 +0100
commita18c28f0aeeb0f03c7176cd328c7b79e9f8e59e9 (patch)
tree3032aa474c915de5e5964eede3c9501be30de550 /drivers/s390/cio/qdio_setup.c
parents390/qeth: remove .do_ioctl() callback from driver discipline (diff)
downloadlinux-dev-a18c28f0aeeb0f03c7176cd328c7b79e9f8e59e9.tar.xz
linux-dev-a18c28f0aeeb0f03c7176cd328c7b79e9f8e59e9.zip
s390/qeth: move qdio's QAOB cache into qeth
qdio.ko no longer needs to care about how the QAOBs are allocated, from its perspective they are merely another parameter to do_QDIO(). So for a start, shift the cache into the only qdio driver that uses QAOBs (ie. qeth). Here there's further opportunity to optimize its usage in the future - eg. make it per-{device, TX queue}, or only compile it when the driver is built with CQ/QAOB support. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Reviewed-by: Benjamin Block <bblock@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/cio/qdio_setup.c')
-rw-r--r--drivers/s390/cio/qdio_setup.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/drivers/s390/cio/qdio_setup.c b/drivers/s390/cio/qdio_setup.c
index 20efafe47897..efbb5e5eca05 100644
--- a/drivers/s390/cio/qdio_setup.c
+++ b/drivers/s390/cio/qdio_setup.c
@@ -24,19 +24,6 @@
#define QBUFF_PER_PAGE (PAGE_SIZE / sizeof(struct qdio_buffer))
static struct kmem_cache *qdio_q_cache;
-static struct kmem_cache *qdio_aob_cache;
-
-struct qaob *qdio_allocate_aob(void)
-{
- return kmem_cache_zalloc(qdio_aob_cache, GFP_ATOMIC);
-}
-EXPORT_SYMBOL_GPL(qdio_allocate_aob);
-
-void qdio_release_aob(struct qaob *aob)
-{
- kmem_cache_free(qdio_aob_cache, aob);
-}
-EXPORT_SYMBOL_GPL(qdio_release_aob);
/**
* qdio_free_buffers() - free qdio buffers
@@ -447,39 +434,22 @@ void qdio_print_subchannel_info(struct qdio_irq *irq_ptr)
int __init qdio_setup_init(void)
{
- int rc;
-
qdio_q_cache = kmem_cache_create("qdio_q", sizeof(struct qdio_q),
256, 0, NULL);
if (!qdio_q_cache)
return -ENOMEM;
- qdio_aob_cache = kmem_cache_create("qdio_aob",
- sizeof(struct qaob),
- sizeof(struct qaob),
- 0,
- NULL);
- if (!qdio_aob_cache) {
- rc = -ENOMEM;
- goto free_qdio_q_cache;
- }
-
/* Check for OSA/FCP thin interrupts (bit 67). */
DBF_EVENT("thinint:%1d",
(css_general_characteristics.aif_osa) ? 1 : 0);
/* Check for QEBSM support in general (bit 58). */
DBF_EVENT("cssQEBSM:%1d", css_general_characteristics.qebsm);
- rc = 0;
-out:
- return rc;
-free_qdio_q_cache:
- kmem_cache_destroy(qdio_q_cache);
- goto out;
+
+ return 0;
}
void qdio_setup_exit(void)
{
- kmem_cache_destroy(qdio_aob_cache);
kmem_cache_destroy(qdio_q_cache);
}