|
@@ -209,15 +209,20 @@ static struct kobj_type dump_ktype = {
|
|
|
.default_attrs = dump_default_attrs,
|
|
|
};
|
|
|
|
|
|
-static int64_t dump_read_info(uint32_t *id, uint32_t *size, uint32_t *type)
|
|
|
+static int64_t dump_read_info(uint32_t *dump_id, uint32_t *dump_size, uint32_t *dump_type)
|
|
|
{
|
|
|
+ __be32 id, size, type;
|
|
|
int rc;
|
|
|
- *type = 0xffffffff;
|
|
|
|
|
|
- rc = opal_dump_info2(id, size, type);
|
|
|
+ type = cpu_to_be32(0xffffffff);
|
|
|
|
|
|
+ rc = opal_dump_info2(&id, &size, &type);
|
|
|
if (rc == OPAL_PARAMETER)
|
|
|
- rc = opal_dump_info(id, size);
|
|
|
+ rc = opal_dump_info(&id, &size);
|
|
|
+
|
|
|
+ *dump_id = be32_to_cpu(id);
|
|
|
+ *dump_size = be32_to_cpu(size);
|
|
|
+ *dump_type = be32_to_cpu(type);
|
|
|
|
|
|
if (rc)
|
|
|
pr_warn("%s: Failed to get dump info (%d)\n",
|