|
@@ -281,6 +281,7 @@ static void opal_handle_message(void)
|
|
|
* value in /proc/device-tree.
|
|
|
*/
|
|
|
static struct opal_msg msg;
|
|
|
+ u32 type;
|
|
|
|
|
|
ret = opal_get_msg(__pa(&msg), sizeof(msg));
|
|
|
/* No opal message pending. */
|
|
@@ -294,13 +295,14 @@ static void opal_handle_message(void)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ type = be32_to_cpu(msg.msg_type);
|
|
|
+
|
|
|
/* Sanity check */
|
|
|
- if (msg.msg_type > OPAL_MSG_TYPE_MAX) {
|
|
|
- pr_warning("%s: Unknown message type: %u\n",
|
|
|
- __func__, msg.msg_type);
|
|
|
+ if (type > OPAL_MSG_TYPE_MAX) {
|
|
|
+ pr_warning("%s: Unknown message type: %u\n", __func__, type);
|
|
|
return;
|
|
|
}
|
|
|
- opal_message_do_notify(msg.msg_type, (void *)&msg);
|
|
|
+ opal_message_do_notify(type, (void *)&msg);
|
|
|
}
|
|
|
|
|
|
static int opal_message_notify(struct notifier_block *nb,
|