hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/s390/include/asm/cpacf.h
....@@ -28,6 +28,7 @@
2828 #define CPACF_KMCTR 0xb92d /* MSA4 */
2929 #define CPACF_PRNO 0xb93c /* MSA5 */
3030 #define CPACF_KMA 0xb929 /* MSA8 */
31
+#define CPACF_KDSA 0xb93a /* MSA9 */
3132
3233 /*
3334 * En/decryption modifier bits
....@@ -92,6 +93,10 @@
9293 #define CPACF_KIMD_SHA_1 0x01
9394 #define CPACF_KIMD_SHA_256 0x02
9495 #define CPACF_KIMD_SHA_512 0x03
96
+#define CPACF_KIMD_SHA3_224 0x20
97
+#define CPACF_KIMD_SHA3_256 0x21
98
+#define CPACF_KIMD_SHA3_384 0x22
99
+#define CPACF_KIMD_SHA3_512 0x23
95100 #define CPACF_KIMD_GHASH 0x41
96101
97102 /*
....@@ -102,6 +107,10 @@
102107 #define CPACF_KLMD_SHA_1 0x01
103108 #define CPACF_KLMD_SHA_256 0x02
104109 #define CPACF_KLMD_SHA_512 0x03
110
+#define CPACF_KLMD_SHA3_224 0x20
111
+#define CPACF_KLMD_SHA3_256 0x21
112
+#define CPACF_KLMD_SHA3_384 0x22
113
+#define CPACF_KLMD_SHA3_512 0x23
105114
106115 /*
107116 * function codes for the KMAC (COMPUTE MESSAGE AUTHENTICATION CODE)
....@@ -162,7 +171,7 @@
162171 *
163172 * Returns 1 if @func is available for @opcode, 0 otherwise
164173 */
165
-static inline void __cpacf_query(unsigned int opcode, cpacf_mask_t *mask)
174
+static __always_inline void __cpacf_query(unsigned int opcode, cpacf_mask_t *mask)
166175 {
167176 register unsigned long r0 asm("0") = 0; /* query function */
168177 register unsigned long r1 asm("1") = (unsigned long) mask;
....@@ -177,7 +186,7 @@
177186 : "cc");
178187 }
179188
180
-static inline int __cpacf_check_opcode(unsigned int opcode)
189
+static __always_inline int __cpacf_check_opcode(unsigned int opcode)
181190 {
182191 switch (opcode) {
183192 case CPACF_KMAC:
....@@ -202,7 +211,7 @@
202211 }
203212 }
204213
205
-static inline int cpacf_query(unsigned int opcode, cpacf_mask_t *mask)
214
+static __always_inline int cpacf_query(unsigned int opcode, cpacf_mask_t *mask)
206215 {
207216 if (__cpacf_check_opcode(opcode)) {
208217 __cpacf_query(opcode, mask);
....@@ -217,7 +226,7 @@
217226 return (mask->bytes[func >> 3] & (0x80 >> (func & 7))) != 0;
218227 }
219228
220
-static inline int cpacf_query_func(unsigned int opcode, unsigned int func)
229
+static __always_inline int cpacf_query_func(unsigned int opcode, unsigned int func)
221230 {
222231 cpacf_mask_t mask;
223232