diff mbox series

[2/6] powerpc/pseries: Fix the H_CALL error code in PLPKS driver

Message ID 20221106205839.600442-3-nayna@linux.ibm.com (mailing list archive)
State Accepted
Commit af223e1728c448073d1e12fe464bf344310edeba
Headers show
Series powerpc/pseries - bugfixes/cleanups for PLPKS driver | expand

Commit Message

Nayna Jain Nov. 6, 2022, 8:58 p.m. UTC
PAPR Spec defines H_P1 actually as H_PARAMETER and maps H_ABORTED to
a different numerical value.

Fix the error codes as per PAPR Specification.

Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore")
Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
---
 arch/powerpc/include/asm/hvcall.h      | 3 +--
 arch/powerpc/platforms/pseries/plpks.c | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

Comments

Andrew Donnellan Nov. 25, 2022, 5:17 a.m. UTC | #1
On Sun, 2022-11-06 at 15:58 -0500, Nayna Jain wrote:
> PAPR Spec defines H_P1 actually as H_PARAMETER and maps H_ABORTED to
> a different numerical value.
> 
> Fix the error codes as per PAPR Specification.
> 
> Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform
> KeyStore")
> Signed-off-by: Nayna Jain <nayna@linux.ibm.com>

This does indeed match my understanding of the PAPR spec.

Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>

> ---
>  arch/powerpc/include/asm/hvcall.h      | 3 +--
>  arch/powerpc/platforms/pseries/plpks.c | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/hvcall.h
> b/arch/powerpc/include/asm/hvcall.h
> index 8abae463f6c1..95fd7f9485d5 100644
> --- a/arch/powerpc/include/asm/hvcall.h
> +++ b/arch/powerpc/include/asm/hvcall.h
> @@ -79,7 +79,7 @@
>  #define H_NOT_ENOUGH_RESOURCES -44
>  #define H_R_STATE       -45
>  #define H_RESCINDED     -46
> -#define H_P1           -54
> +#define H_ABORTED      -54
>  #define H_P2           -55
>  #define H_P3           -56
>  #define H_P4           -57
> @@ -100,7 +100,6 @@
>  #define H_COP_HW       -74
>  #define H_STATE                -75
>  #define H_IN_USE       -77
> -#define H_ABORTED      -78
>  #define H_UNSUPPORTED_FLAG_START       -256
>  #define H_UNSUPPORTED_FLAG_END         -511
>  #define H_MULTI_THREADS_ACTIVE -9005
> diff --git a/arch/powerpc/platforms/pseries/plpks.c
> b/arch/powerpc/platforms/pseries/plpks.c
> index f4b5b5a64db3..32ce4d780d8f 100644
> --- a/arch/powerpc/platforms/pseries/plpks.c
> +++ b/arch/powerpc/platforms/pseries/plpks.c
> @@ -75,7 +75,7 @@ static int pseries_status_to_err(int rc)
>         case H_FUNCTION:
>                 err = -ENXIO;
>                 break;
> -       case H_P1:
> +       case H_PARAMETER:
>         case H_P2:
>         case H_P3:
>         case H_P4:
diff mbox series

Patch

diff --git a/arch/powerpc/include/asm/hvcall.h b/arch/powerpc/include/asm/hvcall.h
index 8abae463f6c1..95fd7f9485d5 100644
--- a/arch/powerpc/include/asm/hvcall.h
+++ b/arch/powerpc/include/asm/hvcall.h
@@ -79,7 +79,7 @@ 
 #define H_NOT_ENOUGH_RESOURCES -44
 #define H_R_STATE       -45
 #define H_RESCINDED     -46
-#define H_P1		-54
+#define H_ABORTED	-54
 #define H_P2		-55
 #define H_P3		-56
 #define H_P4		-57
@@ -100,7 +100,6 @@ 
 #define H_COP_HW	-74
 #define H_STATE		-75
 #define H_IN_USE	-77
-#define H_ABORTED	-78
 #define H_UNSUPPORTED_FLAG_START	-256
 #define H_UNSUPPORTED_FLAG_END		-511
 #define H_MULTI_THREADS_ACTIVE	-9005
diff --git a/arch/powerpc/platforms/pseries/plpks.c b/arch/powerpc/platforms/pseries/plpks.c
index f4b5b5a64db3..32ce4d780d8f 100644
--- a/arch/powerpc/platforms/pseries/plpks.c
+++ b/arch/powerpc/platforms/pseries/plpks.c
@@ -75,7 +75,7 @@  static int pseries_status_to_err(int rc)
 	case H_FUNCTION:
 		err = -ENXIO;
 		break;
-	case H_P1:
+	case H_PARAMETER:
 	case H_P2:
 	case H_P3:
 	case H_P4: