powerpc/powernv: Add OPAL check token call
authorMichael Neuling <mikey@neuling.org>
Tue, 19 Aug 2014 04:47:59 +0000 (14:47 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 25 Sep 2014 13:14:35 +0000 (23:14 +1000)
Currently there is no way to generically check if an OPAL call exists or not
from the host kernel.

This adds an OPAL call opal_check_token() which tells you if the given token is
present in OPAL or not.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/opal.h
arch/powerpc/platforms/powernv/opal-wrappers.S

index 86055e598269ebc9c4ba2c52ea3b6f59a27599e2..7127b87a548dc9b35a17fbc8e6587d35de4c84e6 100644 (file)
@@ -135,6 +135,7 @@ struct opal_sg_list {
 #define OPAL_FLASH_MANAGE                      77
 #define OPAL_FLASH_UPDATE                      78
 #define OPAL_RESYNC_TIMEBASE                   79
+#define OPAL_CHECK_TOKEN                       80
 #define OPAL_DUMP_INIT                         81
 #define OPAL_DUMP_INFO                         82
 #define OPAL_DUMP_READ                         83
@@ -887,6 +888,7 @@ int64_t opal_pci_next_error(uint64_t phb_id, __be64 *first_frozen_pe,
                            __be16 *pci_error_type, __be16 *severity);
 int64_t opal_pci_poll(uint64_t phb_id);
 int64_t opal_return_cpu(void);
+int64_t opal_check_token(uint64_t token);
 int64_t opal_reinit_cpus(uint64_t flags);
 
 int64_t opal_xscom_read(uint32_t gcid, uint64_t pcb_addr, __be64 *val);
index 2e6ce1b8dc8ffcdd0d21cd86034c9e86e745880b..571885556dfcddf06480ece645f84dcebb4f599d 100644 (file)
@@ -232,6 +232,7 @@ OPAL_CALL(opal_validate_flash,                      OPAL_FLASH_VALIDATE);
 OPAL_CALL(opal_manage_flash,                   OPAL_FLASH_MANAGE);
 OPAL_CALL(opal_update_flash,                   OPAL_FLASH_UPDATE);
 OPAL_CALL(opal_resync_timebase,                        OPAL_RESYNC_TIMEBASE);
+OPAL_CALL(opal_check_token,                    OPAL_CHECK_TOKEN);
 OPAL_CALL(opal_dump_init,                      OPAL_DUMP_INIT);
 OPAL_CALL(opal_dump_info,                      OPAL_DUMP_INFO);
 OPAL_CALL(opal_dump_info2,                     OPAL_DUMP_INFO2);
This page took 0.025993 seconds and 5 git commands to generate.