aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/crypto/prng.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/s390/crypto/prng.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'arch/s390/crypto/prng.c')
-rw-r--r--arch/s390/crypto/prng.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/crypto/prng.c b/arch/s390/crypto/prng.c
index aa819dac2360..0808fbf0f7d3 100644
--- a/arch/s390/crypto/prng.c
+++ b/arch/s390/crypto/prng.c
@@ -76,7 +76,7 @@ static void prng_seed(int nbytes)
76 76
77 /* Add the entropy */ 77 /* Add the entropy */
78 while (nbytes >= 8) { 78 while (nbytes >= 8) {
79 *((__u64 *)parm_block) ^= *((__u64 *)buf+i*8); 79 *((__u64 *)parm_block) ^= *((__u64 *)(buf+i));
80 prng_add_entropy(); 80 prng_add_entropy();
81 i += 8; 81 i += 8;
82 nbytes -= 8; 82 nbytes -= 8;
@@ -152,6 +152,7 @@ static const struct file_operations prng_fops = {
152 .open = &prng_open, 152 .open = &prng_open,
153 .release = NULL, 153 .release = NULL,
154 .read = &prng_read, 154 .read = &prng_read,
155 .llseek = noop_llseek,
155}; 156};
156 157
157static struct miscdevice prng_dev = { 158static struct miscdevice prng_dev = {
@@ -165,7 +166,7 @@ static int __init prng_init(void)
165 int ret; 166 int ret;
166 167
167 /* check if the CPU has a PRNG */ 168 /* check if the CPU has a PRNG */
168 if (!crypt_s390_func_available(KMC_PRNG)) 169 if (!crypt_s390_func_available(KMC_PRNG, CRYPT_S390_MSA))
169 return -EOPNOTSUPP; 170 return -EOPNOTSUPP;
170 171
171 if (prng_chunk_size < 8) 172 if (prng_chunk_size < 8)