OSDN Git Service

powerpc/fadump: Return error when fadump registration fails
authorMichal Suchanek <msuchanek@suse.de>
Sat, 27 May 2017 15:46:15 +0000 (17:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Oct 2018 07:11:33 +0000 (09:11 +0200)
commit0cbf366a69887b623108f0a20f8850331a7ffac8
treee2281eb54b2e70209ab874e7b07301a0ce173b2d
parent023fdb64ee8d171f691a97bffa1d168bef750c7f
powerpc/fadump: Return error when fadump registration fails

commit 98b8cd7f75643e0a442d7a4c1cef2c9d53b7e92b upstream.

 - log an error message when registration fails and no error code listed
   in the switch is returned
 - translate the hv error code to posix error code and return it from
   fw_register
 - return the posix error code from fw_register to the process writing
   to sysfs
 - return EEXIST on re-registration
 - return success on deregistration when fadump is not registered
 - return ENODEV when no memory is reserved for fadump

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Tested-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
[mpe: Use pr_err() to shrink the error print]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/fadump.c