aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2015-02-17 04:01:54 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2015-03-16 03:50:16 -0400
commitd7cf83fcaf1b1668201eae4cdd6e6fe7a2448654 (patch)
treedbccede894d5824770c676ac1470a304d90e037b /arch/powerpc
parentd800ba1218799efb07b3d11a84f38bf05a94daf5 (diff)
powerpc/powernv: Move opal-api.h closer to the Skiboot version
This commit gets opal-api.h to mostly match the version in Skiboot as of commit ea7d806ab0ba. The exceptions are things which are not (currently) used in Linux. Most of this is just whitespace and a few things moving around. I think the diff is readable. Also OpalMessageType became opal_msg_type, requiring a change in the Linux code. Finally Skiboot and Linux disagree on CAPI vs CXL, because CAPI means something else in Linux. To handle that we just point the Linux wrapper, which is named "cxl" to the OPAL token OPAL_PCI_SET_PHB_CAPI_MODE. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Reviewed-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/include/asm/opal-api.h158
-rw-r--r--arch/powerpc/include/asm/opal.h2
-rw-r--r--arch/powerpc/platforms/powernv/opal-wrappers.S2
-rw-r--r--arch/powerpc/platforms/powernv/opal.c2
4 files changed, 90 insertions, 74 deletions
diff --git a/arch/powerpc/include/asm/opal-api.h b/arch/powerpc/include/asm/opal-api.h
index a90176a428ee..2984f486f3ba 100644
--- a/arch/powerpc/include/asm/opal-api.h
+++ b/arch/powerpc/include/asm/opal-api.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * PowerNV OPAL definitions. 2 * OPAL API definitions.
3 * 3 *
4 * Copyright 2011 IBM Corp. 4 * Copyright 2011-2015 IBM Corp.
5 * 5 *
6 * This program is free software; you can redistribute it and/or 6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License 7 * modify it under the terms of the GNU General Public License
@@ -15,7 +15,7 @@
15/****** OPAL APIs ******/ 15/****** OPAL APIs ******/
16 16
17/* Return codes */ 17/* Return codes */
18#define OPAL_SUCCESS 0 18#define OPAL_SUCCESS 0
19#define OPAL_PARAMETER -1 19#define OPAL_PARAMETER -1
20#define OPAL_BUSY -2 20#define OPAL_BUSY -2
21#define OPAL_PARTIAL -3 21#define OPAL_PARTIAL -3
@@ -31,6 +31,7 @@
31#define OPAL_HARDWARE_FROZEN -13 31#define OPAL_HARDWARE_FROZEN -13
32#define OPAL_WRONG_STATE -14 32#define OPAL_WRONG_STATE -14
33#define OPAL_ASYNC_COMPLETION -15 33#define OPAL_ASYNC_COMPLETION -15
34#define OPAL_EMPTY -16
34#define OPAL_I2C_TIMEOUT -17 35#define OPAL_I2C_TIMEOUT -17
35#define OPAL_I2C_INVALID_CMD -18 36#define OPAL_I2C_INVALID_CMD -18
36#define OPAL_I2C_LBUS_PARITY -19 37#define OPAL_I2C_LBUS_PARITY -19
@@ -41,7 +42,8 @@
41#define OPAL_I2C_STOP_ERR -24 42#define OPAL_I2C_STOP_ERR -24
42 43
43/* API Tokens (in r0) */ 44/* API Tokens (in r0) */
44#define OPAL_INVALID_CALL -1 45#define OPAL_INVALID_CALL -1
46#define OPAL_TEST 0
45#define OPAL_CONSOLE_WRITE 1 47#define OPAL_CONSOLE_WRITE 1
46#define OPAL_CONSOLE_READ 2 48#define OPAL_CONSOLE_READ 2
47#define OPAL_RTC_READ 3 49#define OPAL_RTC_READ 3
@@ -84,7 +86,7 @@
84#define OPAL_GET_MSI_64 40 86#define OPAL_GET_MSI_64 40
85#define OPAL_START_CPU 41 87#define OPAL_START_CPU 41
86#define OPAL_QUERY_CPU_STATUS 42 88#define OPAL_QUERY_CPU_STATUS 42
87#define OPAL_WRITE_OPPANEL 43 89#define OPAL_WRITE_OPPANEL 43 /* unimplemented */
88#define OPAL_PCI_MAP_PE_DMA_WINDOW 44 90#define OPAL_PCI_MAP_PE_DMA_WINDOW 44
89#define OPAL_PCI_MAP_PE_DMA_WINDOW_REAL 45 91#define OPAL_PCI_MAP_PE_DMA_WINDOW_REAL 45
90#define OPAL_PCI_RESET 49 92#define OPAL_PCI_RESET 49
@@ -130,8 +132,10 @@
130#define OPAL_GET_PARAM 89 132#define OPAL_GET_PARAM 89
131#define OPAL_SET_PARAM 90 133#define OPAL_SET_PARAM 90
132#define OPAL_DUMP_RESEND 91 134#define OPAL_DUMP_RESEND 91
133#define OPAL_PCI_SET_PHB_CXL_MODE 93 135#define OPAL_ELOG_SEND 92 /* Deprecated */
136#define OPAL_PCI_SET_PHB_CAPI_MODE 93
134#define OPAL_DUMP_INFO2 94 137#define OPAL_DUMP_INFO2 94
138#define OPAL_WRITE_OPPANEL_ASYNC 95
135#define OPAL_PCI_ERR_INJECT 96 139#define OPAL_PCI_ERR_INJECT 96
136#define OPAL_PCI_EEH_FREEZE_SET 97 140#define OPAL_PCI_EEH_FREEZE_SET 97
137#define OPAL_HANDLE_HMI 98 141#define OPAL_HANDLE_HMI 98
@@ -141,19 +145,22 @@
141#define OPAL_UNREGISTER_DUMP_REGION 102 145#define OPAL_UNREGISTER_DUMP_REGION 102
142#define OPAL_WRITE_TPO 103 146#define OPAL_WRITE_TPO 103
143#define OPAL_READ_TPO 104 147#define OPAL_READ_TPO 104
148#define OPAL_GET_DPO_STATUS 105
149#define OPAL_OLD_I2C_REQUEST 106 /* Deprecated */
144#define OPAL_IPMI_SEND 107 150#define OPAL_IPMI_SEND 107
145#define OPAL_IPMI_RECV 108 151#define OPAL_IPMI_RECV 108
146#define OPAL_I2C_REQUEST 109 152#define OPAL_I2C_REQUEST 109
153#define OPAL_LAST 109
147 154
148/* Device tree flags */ 155/* Device tree flags */
149 156
150/* Flags set in power-mgmt nodes in device tree if 157/* Flags set in power-mgmt nodes in device tree if
151 * respective idle states are supported in the platform. 158 * respective idle states are supported in the platform.
152 */ 159 */
153#define OPAL_PM_NAP_ENABLED 0x00010000 160#define OPAL_PM_NAP_ENABLED 0x00010000
154#define OPAL_PM_SLEEP_ENABLED 0x00020000 161#define OPAL_PM_SLEEP_ENABLED 0x00020000
155#define OPAL_PM_WINKLE_ENABLED 0x00040000 162#define OPAL_PM_WINKLE_ENABLED 0x00040000
156#define OPAL_PM_SLEEP_ENABLED_ER1 0x00080000 163#define OPAL_PM_SLEEP_ENABLED_ER1 0x00080000 /* with workaround */
157 164
158#ifndef __ASSEMBLY__ 165#ifndef __ASSEMBLY__
159 166
@@ -242,7 +249,7 @@ enum OpalShpcLinkState {
242enum OpalMmioWindowType { 249enum OpalMmioWindowType {
243 OPAL_M32_WINDOW_TYPE = 1, 250 OPAL_M32_WINDOW_TYPE = 1,
244 OPAL_M64_WINDOW_TYPE = 2, 251 OPAL_M64_WINDOW_TYPE = 2,
245 OPAL_IO_WINDOW_TYPE = 3 252 OPAL_IO_WINDOW_TYPE = 3
246}; 253};
247 254
248enum OpalShpcSlotState { 255enum OpalShpcSlotState {
@@ -251,35 +258,24 @@ enum OpalShpcSlotState {
251}; 258};
252 259
253enum OpalExceptionHandler { 260enum OpalExceptionHandler {
254 OPAL_MACHINE_CHECK_HANDLER = 1, 261 OPAL_MACHINE_CHECK_HANDLER = 1,
255 OPAL_HYPERVISOR_MAINTENANCE_HANDLER = 2, 262 OPAL_HYPERVISOR_MAINTENANCE_HANDLER = 2,
256 OPAL_SOFTPATCH_HANDLER = 3 263 OPAL_SOFTPATCH_HANDLER = 3
257}; 264};
258 265
259enum OpalPendingState { 266enum OpalPendingState {
260 OPAL_EVENT_OPAL_INTERNAL = 0x1, 267 OPAL_EVENT_OPAL_INTERNAL = 0x1,
261 OPAL_EVENT_NVRAM = 0x2, 268 OPAL_EVENT_NVRAM = 0x2,
262 OPAL_EVENT_RTC = 0x4, 269 OPAL_EVENT_RTC = 0x4,
263 OPAL_EVENT_CONSOLE_OUTPUT = 0x8, 270 OPAL_EVENT_CONSOLE_OUTPUT = 0x8,
264 OPAL_EVENT_CONSOLE_INPUT = 0x10, 271 OPAL_EVENT_CONSOLE_INPUT = 0x10,
265 OPAL_EVENT_ERROR_LOG_AVAIL = 0x20, 272 OPAL_EVENT_ERROR_LOG_AVAIL = 0x20,
266 OPAL_EVENT_ERROR_LOG = 0x40, 273 OPAL_EVENT_ERROR_LOG = 0x40,
267 OPAL_EVENT_EPOW = 0x80, 274 OPAL_EVENT_EPOW = 0x80,
268 OPAL_EVENT_LED_STATUS = 0x100, 275 OPAL_EVENT_LED_STATUS = 0x100,
269 OPAL_EVENT_PCI_ERROR = 0x200, 276 OPAL_EVENT_PCI_ERROR = 0x200,
270 OPAL_EVENT_DUMP_AVAIL = 0x400, 277 OPAL_EVENT_DUMP_AVAIL = 0x400,
271 OPAL_EVENT_MSG_PENDING = 0x800, 278 OPAL_EVENT_MSG_PENDING = 0x800,
272};
273
274enum OpalMessageType {
275 OPAL_MSG_ASYNC_COMP = 0, /* params[0] = token, params[1] = rc,
276 * additional params function-specific
277 */
278 OPAL_MSG_MEM_ERR,
279 OPAL_MSG_EPOW,
280 OPAL_MSG_SHUTDOWN, /* params[0] = 1 reboot, 0 shutdown */
281 OPAL_MSG_HMI_EVT,
282 OPAL_MSG_TYPE_MAX,
283}; 279};
284 280
285enum OpalThreadStatus { 281enum OpalThreadStatus {
@@ -323,7 +319,7 @@ enum OpalMveEnableAction {
323 OPAL_ENABLE_MVE = 1 319 OPAL_ENABLE_MVE = 1
324}; 320};
325 321
326enum OpalM64EnableAction { 322enum OpalM64Action {
327 OPAL_DISABLE_M64 = 0, 323 OPAL_DISABLE_M64 = 0,
328 OPAL_ENABLE_M64_SPLIT = 1, 324 OPAL_ENABLE_M64_SPLIT = 1,
329 OPAL_ENABLE_M64_NON_SPLIT = 2 325 OPAL_ENABLE_M64_NON_SPLIT = 2
@@ -339,12 +335,17 @@ enum OpalPciResetScope {
339}; 335};
340 336
341enum OpalPciReinitScope { 337enum OpalPciReinitScope {
338 /*
339 * Note: we chose values that do not overlap
340 * OpalPciResetScope as OPAL v2 used the same
341 * enum for both
342 */
342 OPAL_REINIT_PCI_DEV = 1000 343 OPAL_REINIT_PCI_DEV = 1000
343}; 344};
344 345
345enum OpalPciResetState { 346enum OpalPciResetState {
346 OPAL_DEASSERT_RESET = 0, 347 OPAL_DEASSERT_RESET = 0,
347 OPAL_ASSERT_RESET = 1 348 OPAL_ASSERT_RESET = 1
348}; 349};
349 350
350enum OpalPciMaskAction { 351enum OpalPciMaskAction {
@@ -381,11 +382,16 @@ enum OpalLPCAddressType {
381 OPAL_LPC_FW = 2, 382 OPAL_LPC_FW = 2,
382}; 383};
383 384
384/* System parameter permission */ 385enum opal_msg_type {
385enum OpalSysparamPerm { 386 OPAL_MSG_ASYNC_COMP = 0, /* params[0] = token, params[1] = rc,
386 OPAL_SYSPARAM_READ = 0x1, 387 * additional params function-specific
387 OPAL_SYSPARAM_WRITE = 0x2, 388 */
388 OPAL_SYSPARAM_RW = (OPAL_SYSPARAM_READ | OPAL_SYSPARAM_WRITE), 389 OPAL_MSG_MEM_ERR,
390 OPAL_MSG_EPOW,
391 OPAL_MSG_SHUTDOWN, /* params[0] = 1 reboot, 0 shutdown */
392 OPAL_MSG_HMI_EVT,
393 OPAL_MSG_DPO,
394 OPAL_MSG_TYPE_MAX,
389}; 395};
390 396
391struct opal_msg { 397struct opal_msg {
@@ -394,15 +400,22 @@ struct opal_msg {
394 __be64 params[8]; 400 __be64 params[8];
395}; 401};
396 402
403/* System parameter permission */
404enum OpalSysparamPerm {
405 OPAL_SYSPARAM_READ = 0x1,
406 OPAL_SYSPARAM_WRITE = 0x2,
407 OPAL_SYSPARAM_RW = (OPAL_SYSPARAM_READ | OPAL_SYSPARAM_WRITE),
408};
409
397enum { 410enum {
398 OPAL_IPMI_MSG_FORMAT_VERSION_1 = 1, 411 OPAL_IPMI_MSG_FORMAT_VERSION_1 = 1,
399}; 412};
400 413
401struct opal_ipmi_msg { 414struct opal_ipmi_msg {
402 uint8_t version; 415 uint8_t version;
403 uint8_t netfn; 416 uint8_t netfn;
404 uint8_t cmd; 417 uint8_t cmd;
405 uint8_t data[]; 418 uint8_t data[];
406}; 419};
407 420
408/* FSP memory errors handling */ 421/* FSP memory errors handling */
@@ -413,7 +426,6 @@ enum OpalMemErr_Version {
413enum OpalMemErrType { 426enum OpalMemErrType {
414 OPAL_MEM_ERR_TYPE_RESILIENCE = 0, 427 OPAL_MEM_ERR_TYPE_RESILIENCE = 0,
415 OPAL_MEM_ERR_TYPE_DYN_DALLOC, 428 OPAL_MEM_ERR_TYPE_DYN_DALLOC,
416 OPAL_MEM_ERR_TYPE_SCRUB,
417}; 429};
418 430
419/* Memory Reilience error type */ 431/* Memory Reilience error type */
@@ -442,17 +454,17 @@ struct OpalMemoryErrorData {
442 union { 454 union {
443 /* Memory Resilience corrected/uncorrected error info */ 455 /* Memory Resilience corrected/uncorrected error info */
444 struct { 456 struct {
445 enum OpalMemErr_ResilErrType resil_err_type:8; 457 enum OpalMemErr_ResilErrType resil_err_type:8;
446 uint8_t reserved_1[7]; 458 uint8_t reserved_1[7];
447 __be64 physical_address_start; 459 __be64 physical_address_start;
448 __be64 physical_address_end; 460 __be64 physical_address_end;
449 } resilience; 461 } resilience;
450 /* Dynamic memory deallocation error info */ 462 /* Dynamic memory deallocation error info */
451 struct { 463 struct {
452 enum OpalMemErr_DynErrType dyn_err_type:8; 464 enum OpalMemErr_DynErrType dyn_err_type:8;
453 uint8_t reserved_1[7]; 465 uint8_t reserved_1[7];
454 __be64 physical_address_start; 466 __be64 physical_address_start;
455 __be64 physical_address_end; 467 __be64 physical_address_end;
456 } dyn_dealloc; 468 } dyn_dealloc;
457 } u; 469 } u;
458}; 470};
@@ -487,6 +499,7 @@ enum OpalHMI_ErrType {
487 OpalHMI_ERROR_SCOM_FIR, 499 OpalHMI_ERROR_SCOM_FIR,
488 OpalHMI_ERROR_DEBUG_TRIG_FIR, 500 OpalHMI_ERROR_DEBUG_TRIG_FIR,
489 OpalHMI_ERROR_HYP_RESOURCE, 501 OpalHMI_ERROR_HYP_RESOURCE,
502 OpalHMI_ERROR_CAPP_RECOVERY,
490}; 503};
491 504
492struct OpalHMIEvent { 505struct OpalHMIEvent {
@@ -539,13 +552,13 @@ struct OpalIoP7IOCErrorData {
539 __be64 biLdcp2; /* 3C0110, 3C0128 */ 552 __be64 biLdcp2; /* 3C0110, 3C0128 */
540 __be64 biFenceStatus; /* 3C0130, 3C0130 */ 553 __be64 biFenceStatus; /* 3C0130, 3C0130 */
541 554
542 u8 biDownbound; /* BI Downbound or Upbound */ 555 uint8_t biDownbound; /* BI Downbound or Upbound */
543 }bi; 556 }bi;
544 struct OpalIoP7IOCCiErrorData { 557 struct OpalIoP7IOCCiErrorData {
545 __be64 ciPortStatus; /* 3Dn008 */ 558 __be64 ciPortStatus; /* 3Dn008 */
546 __be64 ciPortLdcp; /* 3Dn010 */ 559 __be64 ciPortLdcp; /* 3Dn010 */
547 560
548 u8 ciPort; /* Index of CI port: 0/1 */ 561 uint8_t ciPort; /* Index of CI port: 0/1 */
549 }ci; 562 }ci;
550 }; 563 };
551}; 564};
@@ -568,14 +581,6 @@ enum {
568 OPAL_PHB3_NUM_PEST_REGS = 256 581 OPAL_PHB3_NUM_PEST_REGS = 256
569}; 582};
570 583
571/* CAPI modes for PHB */
572enum {
573 OPAL_PHB_CAPI_MODE_PCIE = 0,
574 OPAL_PHB_CAPI_MODE_CAPI = 1,
575 OPAL_PHB_CAPI_MODE_SNOOP_OFF = 2,
576 OPAL_PHB_CAPI_MODE_SNOOP_ON = 3,
577};
578
579struct OpalIoPhbErrorCommon { 584struct OpalIoPhbErrorCommon {
580 __be32 version; 585 __be32 version;
581 __be32 ioType; 586 __be32 ioType;
@@ -674,11 +679,10 @@ struct OpalIoPhb3ErrorData {
674 __be64 errorClass; 679 __be64 errorClass;
675 __be64 correlator; 680 __be64 correlator;
676 681
682 /* PHB3 MMIO Error Regs */
677 __be64 nFir; /* 000 */ 683 __be64 nFir; /* 000 */
678 __be64 nFirMask; /* 003 */ 684 __be64 nFirMask; /* 003 */
679 __be64 nFirWOF; /* 008 */ 685 __be64 nFirWOF; /* 008 */
680
681 /* PHB3 MMIO Error Regs */
682 __be64 phbPlssr; /* 120 */ 686 __be64 phbPlssr; /* 120 */
683 __be64 phbCsr; /* 110 */ 687 __be64 phbCsr; /* 110 */
684 __be64 lemFir; /* C00 */ 688 __be64 lemFir; /* C00 */
@@ -710,8 +714,8 @@ enum {
710}; 714};
711 715
712typedef struct oppanel_line { 716typedef struct oppanel_line {
713 const char * line; 717 __be64 line;
714 uint64_t line_len; 718 __be64 line_len;
715} oppanel_line_t; 719} oppanel_line_t;
716 720
717/* 721/*
@@ -726,7 +730,11 @@ struct opal_sg_entry {
726 __be64 length; 730 __be64 length;
727}; 731};
728 732
729/* SG list */ 733/*
734 * Candiate image SG list.
735 *
736 * length = VER | length
737 */
730struct opal_sg_list { 738struct opal_sg_list {
731 __be64 length; 739 __be64 length;
732 __be64 next; 740 __be64 next;
@@ -740,6 +748,14 @@ struct opal_sg_list {
740#define OPAL_DUMP_REGION_LOG_BUF 0x80 748#define OPAL_DUMP_REGION_LOG_BUF 0x80
741#define OPAL_DUMP_REGION_HOST_END 0xFF 749#define OPAL_DUMP_REGION_HOST_END 0xFF
742 750
751/* CAPI modes for PHB */
752enum {
753 OPAL_PHB_CAPI_MODE_PCIE = 0,
754 OPAL_PHB_CAPI_MODE_CAPI = 1,
755 OPAL_PHB_CAPI_MODE_SNOOP_OFF = 2,
756 OPAL_PHB_CAPI_MODE_SNOOP_ON = 3,
757};
758
743/* OPAL I2C request */ 759/* OPAL I2C request */
744struct opal_i2c_request { 760struct opal_i2c_request {
745 uint8_t type; 761 uint8_t type;
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h
index 65c89dd2f604..0ef0fd660ac6 100644
--- a/arch/powerpc/include/asm/opal.h
+++ b/arch/powerpc/include/asm/opal.h
@@ -208,7 +208,7 @@ extern void hvc_opal_init_early(void);
208extern int opal_notifier_register(struct notifier_block *nb); 208extern int opal_notifier_register(struct notifier_block *nb);
209extern int opal_notifier_unregister(struct notifier_block *nb); 209extern int opal_notifier_unregister(struct notifier_block *nb);
210 210
211extern int opal_message_notifier_register(enum OpalMessageType msg_type, 211extern int opal_message_notifier_register(enum opal_msg_type msg_type,
212 struct notifier_block *nb); 212 struct notifier_block *nb);
213extern void opal_notifier_enable(void); 213extern void opal_notifier_enable(void);
214extern void opal_notifier_disable(void); 214extern void opal_notifier_disable(void);
diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms/powernv/opal-wrappers.S
index 0509bca5e830..b23fe7c4bf12 100644
--- a/arch/powerpc/platforms/powernv/opal-wrappers.S
+++ b/arch/powerpc/platforms/powernv/opal-wrappers.S
@@ -286,7 +286,7 @@ OPAL_CALL(opal_handle_hmi, OPAL_HANDLE_HMI);
286OPAL_CALL(opal_slw_set_reg, OPAL_SLW_SET_REG); 286OPAL_CALL(opal_slw_set_reg, OPAL_SLW_SET_REG);
287OPAL_CALL(opal_register_dump_region, OPAL_REGISTER_DUMP_REGION); 287OPAL_CALL(opal_register_dump_region, OPAL_REGISTER_DUMP_REGION);
288OPAL_CALL(opal_unregister_dump_region, OPAL_UNREGISTER_DUMP_REGION); 288OPAL_CALL(opal_unregister_dump_region, OPAL_UNREGISTER_DUMP_REGION);
289OPAL_CALL(opal_pci_set_phb_cxl_mode, OPAL_PCI_SET_PHB_CXL_MODE); 289OPAL_CALL(opal_pci_set_phb_cxl_mode, OPAL_PCI_SET_PHB_CAPI_MODE);
290OPAL_CALL(opal_tpo_write, OPAL_WRITE_TPO); 290OPAL_CALL(opal_tpo_write, OPAL_WRITE_TPO);
291OPAL_CALL(opal_tpo_read, OPAL_READ_TPO); 291OPAL_CALL(opal_tpo_read, OPAL_READ_TPO);
292OPAL_CALL(opal_ipmi_send, OPAL_IPMI_SEND); 292OPAL_CALL(opal_ipmi_send, OPAL_IPMI_SEND);
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index 45f0d9aa3733..142a08a61bd1 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -302,7 +302,7 @@ void opal_notifier_disable(void)
302 * Opal message notifier based on message type. Allow subscribers to get 302 * Opal message notifier based on message type. Allow subscribers to get
303 * notified for specific messgae type. 303 * notified for specific messgae type.
304 */ 304 */
305int opal_message_notifier_register(enum OpalMessageType msg_type, 305int opal_message_notifier_register(enum opal_msg_type msg_type,
306 struct notifier_block *nb) 306 struct notifier_block *nb)
307{ 307{
308 if (!nb) { 308 if (!nb) {