This commit splits psci.h in two parts: register definitions and
hypervisor specific interface exports.

psci_defs.h might be included by inmates as well, which is the reason
for the split up.  This prevents that function might be referenced from
inmates, while their actual definition is mission.

Signed-off-by: Ralf Ramsauer <[email protected]>
---
 hypervisor/arch/arm-common/include/asm/psci.h      | 28 +---------------
 hypervisor/arch/arm-common/include/asm/psci_defs.h | 39 ++++++++++++++++++++++
 2 files changed, 40 insertions(+), 27 deletions(-)
 create mode 100644 hypervisor/arch/arm-common/include/asm/psci_defs.h

diff --git a/hypervisor/arch/arm-common/include/asm/psci.h 
b/hypervisor/arch/arm-common/include/asm/psci.h
index e635aec0..abfed9b9 100644
--- a/hypervisor/arch/arm-common/include/asm/psci.h
+++ b/hypervisor/arch/arm-common/include/asm/psci.h
@@ -10,33 +10,7 @@
  * the COPYING file in the top-level directory.
  */
 
-#define PSCI_VERSION                   0x84000000
-#define PSCI_CPU_SUSPEND_32            0x84000001
-#define PSCI_CPU_SUSPEND_64            0xc4000001
-#define PSCI_CPU_OFF                   0x84000002
-#define PSCI_CPU_ON_32                 0x84000003
-#define PSCI_CPU_ON_64                 0xc4000003
-#define PSCI_AFFINITY_INFO_32          0x84000004
-#define PSCI_AFFINITY_INFO_64          0xc4000004
-
-/* v0.1 function IDs as used by U-Boot */
-#define PSCI_CPU_OFF_V0_1_UBOOT                0x95c1ba5f
-#define PSCI_CPU_ON_V0_1_UBOOT         0x95c1ba60
-
-#define PSCI_SUCCESS                   0
-#define PSCI_NOT_SUPPORTED             (-1)
-#define PSCI_INVALID_PARAMETERS                (-2)
-#define PSCI_DENIED                    (-3)
-#define PSCI_ALREADY_ON                        (-4)
-
-#define PSCI_CPU_IS_ON                 0
-#define PSCI_CPU_IS_OFF                        1
-
-#define IS_PSCI_32(hvc)                        (((hvc) >> 24) == 0x84)
-#define IS_PSCI_64(hvc)                        (((hvc) >> 24) == 0xc4)
-#define IS_PSCI_UBOOT(hvc)             (((hvc) >> 8) == 0x95c1ba)
-
-#define PSCI_INVALID_ADDRESS           (-1L)
+#include <asm/psci_defs.h>
 
 struct trap_context;
 
diff --git a/hypervisor/arch/arm-common/include/asm/psci_defs.h 
b/hypervisor/arch/arm-common/include/asm/psci_defs.h
new file mode 100644
index 00000000..0d4cb3e6
--- /dev/null
+++ b/hypervisor/arch/arm-common/include/asm/psci_defs.h
@@ -0,0 +1,39 @@
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Copyright (c) ARM Limited, 2014
+ *
+ * Authors:
+ *  Jean-Philippe Brucker <[email protected]>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2.  See
+ * the COPYING file in the top-level directory.
+ */
+
+#define PSCI_VERSION                   0x84000000
+#define PSCI_CPU_SUSPEND_32            0x84000001
+#define PSCI_CPU_SUSPEND_64            0xc4000001
+#define PSCI_CPU_OFF                   0x84000002
+#define PSCI_CPU_ON_32                 0x84000003
+#define PSCI_CPU_ON_64                 0xc4000003
+#define PSCI_AFFINITY_INFO_32          0x84000004
+#define PSCI_AFFINITY_INFO_64          0xc4000004
+
+/* v0.1 function IDs as used by U-Boot */
+#define PSCI_CPU_OFF_V0_1_UBOOT                0x95c1ba5f
+#define PSCI_CPU_ON_V0_1_UBOOT         0x95c1ba60
+
+#define PSCI_SUCCESS                   0
+#define PSCI_NOT_SUPPORTED             (-1)
+#define PSCI_INVALID_PARAMETERS                (-2)
+#define PSCI_DENIED                    (-3)
+#define PSCI_ALREADY_ON                        (-4)
+
+#define PSCI_CPU_IS_ON                 0
+#define PSCI_CPU_IS_OFF                        1
+
+#define IS_PSCI_32(hvc)                        (((hvc) >> 24) == 0x84)
+#define IS_PSCI_64(hvc)                        (((hvc) >> 24) == 0xc4)
+#define IS_PSCI_UBOOT(hvc)             (((hvc) >> 8) == 0x95c1ba)
+
+#define PSCI_INVALID_ADDRESS           (-1L)
-- 
2.14.1

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to