ARM: psci: convert psci '-EALREADYON' error code to linux '-EAGAIN'
authorAchin Gupta <achin.gupta@arm.com>
Sun, 10 Mar 2013 21:31:29 +0000 (21:31 +0000)
committerJon Medhurst <tixy@linaro.org>
Mon, 1 Jul 2013 10:05:02 +0000 (11:05 +0100)
This patch adds a possible error code of the cpu_on psci api. It
indicates that the cpu specified in the cpu_on call is up and running
(e.g. the firmware still has not seen the preceding cpu_off call).

Signed-off-by: Achin Gupta <achin.gupta@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
arch/arm/kernel/psci.c

index 36531643cc2c01e3d8e997e32e2ffaa9a8b9ce12..5211f18cd2b4c95695cb9b1270f26e7e6b4f4833 100644 (file)
@@ -42,6 +42,7 @@ static u32 psci_function_id[PSCI_FN_MAX];
 #define PSCI_RET_EOPNOTSUPP            -1
 #define PSCI_RET_EINVAL                        -2
 #define PSCI_RET_EPERM                 -3
+#define PSCI_RET_EALREADYON            -4
 
 static int psci_to_linux_errno(int errno)
 {
@@ -54,6 +55,8 @@ static int psci_to_linux_errno(int errno)
                return -EINVAL;
        case PSCI_RET_EPERM:
                return -EPERM;
+       case PSCI_RET_EALREADYON:
+               return -EAGAIN;
        };
 
        return -EINVAL;