s390: Add new machine generation
authorJuergen Christ <jchrist@linux.ibm.com>
Wed, 26 Jan 2022 10:48:44 +0000 (11:48 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 12 Apr 2022 11:04:57 +0000 (13:04 +0200)
Allow to specify "z16" as machine generation in environment variable
OPENSSL_s390xcap.  It is an alias for "z15".

Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18054)

crypto/s390xcap.c
doc/man3/OPENSSL_s390xcap.pod

index d433df98eb9602d185bd09d412ea33757fccc431..59f0f3ef452a3d9d9848194550988c86928fde1a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2018 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2010-2022 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the Apache License 2.0 (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -670,6 +670,12 @@ static int parse_env(struct OPENSSL_s390xcap_st *cap)
                        0ULL},
     };
 
+    /*-
+     * z16 (2022) - z/Architecture POP
+     * Implements MSA and MSA1-9 (same as z15).
+     */
+    static const struct OPENSSL_s390xcap_st z16 = z15;
+
     char *tok_begin, *tok_end, *buff, tok[S390X_STFLE_MAX][LEN + 1];
     int rc, off, i, n;
 
@@ -724,6 +730,7 @@ static int parse_env(struct OPENSSL_s390xcap_st *cap)
         else if TOK_CPU(z13)
         else if TOK_CPU(z14)
         else if TOK_CPU(z15)
+        else if TOK_CPU(z16)
 
         /* whitespace(ignored) or invalid tokens */
         else {
index f405241153247a1bdd3d270d5835530544bf9f27..2cddec5eafbdc81357bc47f1b0156154c247db5a 100644 (file)
@@ -34,8 +34,8 @@ There are three types of tokens:
 The name of a processor generation. A bit in the environment variable's
 mask is set to one if and only if the specified processor generation
 implements the corresponding instruction set extension. Possible values
-are B<z900>, B<z990>, B<z9>, B<z10>, B<z196>, B<zEC12>, B<z13>, B<z14>
-and B<z15>.
+are B<z900>, B<z990>, B<z9>, B<z10>, B<z196>, B<zEC12>, B<z13>, B<z14>,
+B<z15>, and B<z16>.
 
 =item <string>:<mask>:<mask>
 
@@ -189,7 +189,7 @@ Disables the KM-XTS-AES and the KIMD-SHAKE function codes:
 
 =head1 COPYRIGHT
 
-Copyright 2018-2020 The OpenSSL Project Authors. All Rights Reserved.
+Copyright 2018-2022 The OpenSSL Project Authors. All Rights Reserved.
 
 Licensed under the Apache License 2.0 (the "License").  You may not use
 this file except in compliance with the License.  You can obtain a copy