aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVipin K Parashar <vipin@linux.vnet.ibm.com>2015-08-31 19:22:43 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2016-04-11 06:30:45 -0400
commitb3d79eaa6c97b04965fa479652dd0317253f81d1 (patch)
tree1d4a9929751dabbb2ead6051b7ec9038b916428f
parentef69b03dfd321ffa1bcb4248e9b8744f653e3859 (diff)
powerpc/opal: Assign numbers to OPAL_MSG macros of enum opal_msg_type
This patch assigns numbers to OPAL_MSG macros of enum opal_msg_type to prevent accidental insertion of any new value in between and thus break OPAL API. This is also helpful while backporting mainline kernel changes to distros which run downlevel kernel and thus don't have all OPAL messages defined, avoiding unnecessary bugs due to enum values order mismatch. Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/include/asm/opal-api.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/powerpc/include/asm/opal-api.h b/arch/powerpc/include/asm/opal-api.h
index f8faaaeeca1e..9bb8ddf0be37 100644
--- a/arch/powerpc/include/asm/opal-api.h
+++ b/arch/powerpc/include/asm/opal-api.h
@@ -368,16 +368,16 @@ enum OpalLPCAddressType {
368}; 368};
369 369
370enum opal_msg_type { 370enum opal_msg_type {
371 OPAL_MSG_ASYNC_COMP = 0, /* params[0] = token, params[1] = rc, 371 OPAL_MSG_ASYNC_COMP = 0, /* params[0] = token, params[1] = rc,
372 * additional params function-specific 372 * additional params function-specific
373 */ 373 */
374 OPAL_MSG_MEM_ERR, 374 OPAL_MSG_MEM_ERR = 1,
375 OPAL_MSG_EPOW, 375 OPAL_MSG_EPOW = 2,
376 OPAL_MSG_SHUTDOWN, /* params[0] = 1 reboot, 0 shutdown */ 376 OPAL_MSG_SHUTDOWN = 3, /* params[0] = 1 reboot, 0 shutdown */
377 OPAL_MSG_HMI_EVT, 377 OPAL_MSG_HMI_EVT = 4,
378 OPAL_MSG_DPO, 378 OPAL_MSG_DPO = 5,
379 OPAL_MSG_PRD, 379 OPAL_MSG_PRD = 6,
380 OPAL_MSG_OCC, 380 OPAL_MSG_OCC = 7,
381 OPAL_MSG_TYPE_MAX, 381 OPAL_MSG_TYPE_MAX,
382}; 382};
383 383