s390/zcrypt: use kvmalloc instead of kmalloc for 256k alloc
authorHarald Freudenberger <freude@linux.ibm.com>
Mon, 23 Mar 2020 13:32:04 +0000 (14:32 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Fri, 27 Mar 2020 09:22:47 +0000 (10:22 +0100)
commit34515df25d7e5ae19f66eadfb1351a3178344f36
treec9067b71c26c2fba3343a2b4af6243dde251f130
parent712fa5f294f377ee3103c36c178e7d62c65dd108
s390/zcrypt: use kvmalloc instead of kmalloc for 256k alloc

Tests showed that it may happen that a 256k kmalloc may fail
due to a temporary shortage on 256k slab entries.

The find functions for cca and ep11 use a 256k array to fetch the
states of all possible crypto cards and their domains in one
piece. With the patch now kvmalloc is used to allocate this
temporary memory as there is no need to have this memory area
physical continuously.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/crypto/zcrypt_ccamisc.c
drivers/s390/crypto/zcrypt_ep11misc.c