From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750905AbdE3Emr (ORCPT ); Tue, 30 May 2017 00:42:47 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43411 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750758AbdE3Emp (ORCPT ); Tue, 30 May 2017 00:42:45 -0400 Subject: Re: [PATCH v2] powerpc/fadump: return error when fadump registration fails To: Michal Suchanek , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Hari Bathini , Andrew Morton , Colin Ian King , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20170527154615.29684-1-msuchanek@suse.de> From: Mahesh Jagannath Salgaonkar Date: Tue, 30 May 2017 10:11:45 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170527154615.29684-1-msuchanek@suse.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 17053004-0008-0000-0000-00000133FB92 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17053004-0009-0000-0000-000009630B15 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-29_17:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1705300089 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/27/2017 09:16 PM, Michal Suchanek wrote: > - 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 Why do we need this ? Userspace can always read back the fadump registration status from /sys/kernel/fadump_registered (after echo 1 to it) to find out whether fadump registration succeeded or not. /sys/kernel/fadump_registered This is used to display the fadump registration status as well as to control (start/stop) the fadump registration. 0 = fadump is not registered. 1 = fadump is registered and ready to handle system crash. -Mahesh.