[PATCH v4 06/25] pseries/fadump: define register/un-register callback functions
Hari Bathini
hbathini at linux.ibm.com
Wed Aug 14 16:41:33 AEST 2019
On 12/08/19 9:31 PM, Mahesh J Salgaonkar wrote:
> On 2019-07-16 17:02:38 Tue, Hari Bathini wrote:
>> Make RTAS calls to register and un-register for FADump. Also, update
>> how fadump_region contents are diplayed to provide more information.
>>
>> Signed-off-by: Hari Bathini <hbathini at linux.ibm.com>
>> ---
>> arch/powerpc/kernel/fadump-common.h | 2
>> arch/powerpc/kernel/fadump.c | 164 ++------------------------
>> arch/powerpc/platforms/pseries/rtas-fadump.c | 163 +++++++++++++++++++++++++-
>> 3 files changed, 176 insertions(+), 153 deletions(-)
>>
> [...]
>> static int rtas_fadump_register_fadump(struct fw_dump *fadump_conf)
>> {
>> - return -EIO;
>> + int rc, err = -EIO;
>> + unsigned int wait_time;
>> +
>> + /* TODO: Add upper time limit for the delay */
>> + do {
>> + rc = rtas_call(fadump_conf->ibm_configure_kernel_dump, 3, 1,
>> + NULL, FADUMP_REGISTER, &fdm,
>> + sizeof(struct rtas_fadump_mem_struct));
>> +
>> + wait_time = rtas_busy_delay_time(rc);
>> + if (wait_time)
>> + mdelay(wait_time);
>> +
>> + } while (wait_time);
>> +
>> + switch (rc) {
>> + case 0:
>> + pr_info("Registration is successful!\n");
>> + fadump_conf->dump_registered = 1;
>> + err = 0;
>> + break;
>> + case -1:
>> + pr_err("Failed to register. Hardware Error(%d).\n", rc);
>> + break;
>> + case -3:
>> + if (!is_fadump_boot_mem_contiguous(fadump_conf))
>> + pr_err("Can't hot-remove boot memory area.\n");
>> + else if (!is_fadump_reserved_mem_contiguous(fadump_conf))
>> + pr_err("Can't hot-remove reserved memory area.\n");
>
> Any reason why we changed the error messages here ? it gives an impression as
> if fadump reservation tried to hot remove memory and failed.
Yeah, the message is indeed a bit confusing. Will stick with old message..
Thanks
Hari
More information about the Linuxppc-dev
mailing list