Skip to content

Commit

Permalink
powerpc/pseries: Fix the H_CALL error code in PLPKS driver
Browse files Browse the repository at this point in the history
[ Upstream commit af223e1 ]

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: 2454a7a ("powerpc/pseries: define driver for Platform KeyStore")
Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221106205839.600442-3-nayna@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
naynajain authored and gregkh committed Dec 31, 2022
1 parent b38e5a3 commit 1a7657a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions arch/powerpc/include/asm/hvcall.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/pseries/plpks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1a7657a

Please sign in to comment.