ACK: [SRU][X][PATCH 1/1] UBUNTU: SAUCE: s390/zcrypt: CEX7 toleration support

Kleber Souza kleber.souza at canonical.com
Thu Oct 17 16:08:12 UTC 2019


On 16.10.19 13:33, frank.heimes at canonical.com wrote:
> From: Harald Freudenberger <freude at linux.ibm.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1848173
> 
> With the new z15 machine also came a new crypto card CEX7
> which is backward compatible to CEX6 and CEX5. The newer
> kernel code covers this with a QACT instruction which
> automatically enables 'unknown' new crypto cards when
> QACT tells that these are backward compatible.
> 
> However, the older kernels need at least some lines
> of code mapping the CEX7 crypto hardware type back
> to a known and compatible type ('toleration'). And
> this is done with the patch here.
> 
> Signed-off-by: Harald Freudenberger <freude at linux.ibm.com>
> Signed-off-by: Frank Heimes <frank.heimes at canonical.com>

Specific to s390x, good test results.

Acked-by: Kleber Sacilotto de Souza <kleber.souza at canonical.com>

> ---
>  drivers/s390/crypto/ap_bus.c | 5 +++--
>  drivers/s390/crypto/ap_bus.h | 1 +
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
> index 7c3b8d3..b2c8cfa 100644
> --- a/drivers/s390/crypto/ap_bus.c
> +++ b/drivers/s390/crypto/ap_bus.c
> @@ -1651,8 +1651,9 @@ static void ap_scan_bus(struct work_struct *unused)
>  		ap_dev->queue_depth = queue_depth;
>  		ap_dev->raw_hwtype = device_type;
>  		ap_dev->device_type = device_type;
> -		/* CEX6 toleration: map to CEX5 */
> -		if (device_type == AP_DEVICE_TYPE_CEX6)
> +		/* CEX6/CEX7 toleration: map to CEX5 */
> +		if (device_type == AP_DEVICE_TYPE_CEX6 ||
> +		    device_type == AP_DEVICE_TYPE_CEX7)
>  			ap_dev->device_type = AP_DEVICE_TYPE_CEX5;
>  		ap_dev->functions = device_functions;
>  		spin_lock_init(&ap_dev->lock);
> diff --git a/drivers/s390/crypto/ap_bus.h b/drivers/s390/crypto/ap_bus.h
> index cc741e9..ac1a3b1 100644
> --- a/drivers/s390/crypto/ap_bus.h
> +++ b/drivers/s390/crypto/ap_bus.h
> @@ -106,6 +106,7 @@ static inline int ap_test_bit(unsigned int *ptr, unsigned int nr)
>  #define AP_DEVICE_TYPE_CEX4	10
>  #define AP_DEVICE_TYPE_CEX5	11
>  #define AP_DEVICE_TYPE_CEX6	12
> +#define AP_DEVICE_TYPE_CEX7	13
>  
>  /*
>   * Known function facilities
> 




More information about the kernel-team mailing list