powerpc/powernv: fix construction of opal PRD messages
authorJeremy Kerr <jk@ozlabs.org>
Mon, 15 Jun 2015 09:25:34 +0000 (17:25 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 17 Jun 2015 21:16:01 +0000 (07:16 +1000)
commit7185795a62589292015484985635b4a38029a2b9
tree1cd29f85bcd557626219d2c400c8d97fc67ac5aa
parent02b6505c8f84cbb4be459c9bf8ebbb7b0754e764
powerpc/powernv: fix construction of opal PRD messages

We currently have a bug in the PRD code, where the contents of an
incoming message (beyond the header) will be overwritten by the list
item manipulations when adding to to the prd_msg_queue.

This change reorders struct opal_prd_msg_queue_item, so that the
message body doesn't overlap the list_head.

We also clarify the memcpy of the message, as we're copying unnecessary
bytes at the end of the message data.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/opal-prd.c