Skip to content

Commit

Permalink
powerpc/powernv: Improve error messages in dump code
Browse files Browse the repository at this point in the history
Presently we only support initiating Service Processor dump from host.
Hence update sysfs message. Also update couple of other error/info
messages.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Vasant Hegde authored and Michael Ellerman committed Sep 25, 2014
1 parent 2172d66 commit cdd91b8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions arch/powerpc/platforms/powernv/opal-dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static ssize_t init_dump_show(struct dump_obj *dump_obj,
struct dump_attribute *attr,
char *buf)
{
return sprintf(buf, "1 - initiate dump\n");
return sprintf(buf, "1 - initiate Service Processor(FSP) dump\n");
}

static int64_t dump_fips_init(uint8_t type)
Expand All @@ -121,7 +121,7 @@ static int64_t dump_fips_init(uint8_t type)

rc = opal_dump_init(type);
if (rc)
pr_warn("%s: Failed to initiate FipS dump (%d)\n",
pr_warn("%s: Failed to initiate FSP dump (%d)\n",
__func__, rc);
return rc;
}
Expand All @@ -131,8 +131,12 @@ static ssize_t init_dump_store(struct dump_obj *dump_obj,
const char *buf,
size_t count)
{
dump_fips_init(DUMP_TYPE_FSP);
pr_info("%s: Initiated FSP dump\n", __func__);
int rc;

rc = dump_fips_init(DUMP_TYPE_FSP);
if (rc == OPAL_SUCCESS)
pr_info("%s: Initiated FSP dump\n", __func__);

return count;
}

Expand Down Expand Up @@ -297,7 +301,7 @@ static ssize_t dump_attr_read(struct file *filep, struct kobject *kobj,
* and rely on userspace to ask us to try
* again.
*/
pr_info("%s: Platform dump partially read.ID = 0x%x\n",
pr_info("%s: Platform dump partially read. ID = 0x%x\n",
__func__, dump->id);
return -EIO;
}
Expand Down

0 comments on commit cdd91b8

Please sign in to comment.