diff options
Diffstat (limited to 'arch/powerpc/platforms/powernv/opal-async.c')
-rw-r--r-- | arch/powerpc/platforms/powernv/opal-async.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/powernv/opal-async.c b/arch/powerpc/platforms/powernv/opal-async.c index cd0c1354d404..32e2adfa5320 100644 --- a/arch/powerpc/platforms/powernv/opal-async.c +++ b/arch/powerpc/platforms/powernv/opal-async.c | |||
@@ -125,14 +125,15 @@ static int opal_async_comp_event(struct notifier_block *nb, | |||
125 | { | 125 | { |
126 | struct opal_msg *comp_msg = msg; | 126 | struct opal_msg *comp_msg = msg; |
127 | unsigned long flags; | 127 | unsigned long flags; |
128 | uint64_t token; | ||
128 | 129 | ||
129 | if (msg_type != OPAL_MSG_ASYNC_COMP) | 130 | if (msg_type != OPAL_MSG_ASYNC_COMP) |
130 | return 0; | 131 | return 0; |
131 | 132 | ||
132 | memcpy(&opal_async_responses[comp_msg->params[0]], comp_msg, | 133 | token = be64_to_cpu(comp_msg->params[0]); |
133 | sizeof(*comp_msg)); | 134 | memcpy(&opal_async_responses[token], comp_msg, sizeof(*comp_msg)); |
134 | spin_lock_irqsave(&opal_async_comp_lock, flags); | 135 | spin_lock_irqsave(&opal_async_comp_lock, flags); |
135 | __set_bit(comp_msg->params[0], opal_async_complete_map); | 136 | __set_bit(token, opal_async_complete_map); |
136 | spin_unlock_irqrestore(&opal_async_comp_lock, flags); | 137 | spin_unlock_irqrestore(&opal_async_comp_lock, flags); |
137 | 138 | ||
138 | wake_up(&opal_async_wait); | 139 | wake_up(&opal_async_wait); |