summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2014-04-22 15:01:25 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-04-28 13:11:23 +1000
commit14ad0c58d5df6e5911a5413abdc2a9be6a8acb51 (patch)
tree323f23b7192a5468c0c7957e49deafa27e24a502 /arch/powerpc/platforms/powernv
parent56b4c993124d15f3b198cc757ba49a0022b5d695 (diff)
downloadop-kernel-dev-14ad0c58d5df6e5911a5413abdc2a9be6a8acb51.zip
op-kernel-dev-14ad0c58d5df6e5911a5413abdc2a9be6a8acb51.tar.gz
powerpc/powernv: Fix little endian issues in OPAL error log code
Fix little endian issues with the OPAL error log code. Signed-off-by: Anton Blanchard <anton@samba.org> Reviewed-by: Stewart Smith <stewart@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/powernv')
-rw-r--r--arch/powerpc/platforms/powernv/opal-elog.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/opal-elog.c b/arch/powerpc/platforms/powernv/opal-elog.c
index 7e3821e..10268c4 100644
--- a/arch/powerpc/platforms/powernv/opal-elog.c
+++ b/arch/powerpc/platforms/powernv/opal-elog.c
@@ -238,18 +238,25 @@ static struct elog_obj *create_elog_obj(uint64_t id, size_t size, uint64_t type)
static void elog_work_fn(struct work_struct *work)
{
+ __be64 size;
+ __be64 id;
+ __be64 type;
uint64_t elog_size;
uint64_t log_id;
uint64_t elog_type;
int rc;
char name[2+16+1];
- rc = opal_get_elog_size(&log_id, &elog_size, &elog_type);
+ rc = opal_get_elog_size(&id, &size, &type);
if (rc != OPAL_SUCCESS) {
pr_err("ELOG: Opal log read failed\n");
return;
}
+ elog_size = be64_to_cpu(size);
+ log_id = be64_to_cpu(id);
+ elog_type = be64_to_cpu(type);
+
BUG_ON(elog_size > OPAL_MAX_ERRLOG_SIZE);
if (elog_size >= OPAL_MAX_ERRLOG_SIZE)
OpenPOWER on IntegriCloud