From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 383D7C43603 for ; Wed, 11 Dec 2019 18:24:53 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ECEEB2077B for ; Wed, 11 Dec 2019 18:24:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ECEEB2077B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47Y51s3wHwzDqsy for ; Thu, 12 Dec 2019 05:24:49 +1100 (AEDT) Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47Y21m5WznzDqYY for ; Thu, 12 Dec 2019 03:09:32 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) by bilbo.ozlabs.org (Postfix) with ESMTP id 47Y21k3QvYz8wHf for ; Thu, 12 Dec 2019 03:09:30 +1100 (AEDT) Received: by ozlabs.org (Postfix) id 47Y21k17f6zB3xy; Thu, 12 Dec 2019 03:09:30 +1100 (AEDT) Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=sourabhjain@linux.ibm.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Y21j38MGzB3y2 for ; Thu, 12 Dec 2019 03:09:29 +1100 (AEDT) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBBG8KnY141316 for ; Wed, 11 Dec 2019 11:09:25 -0500 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2wtf8j50rf-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 11 Dec 2019 11:09:24 -0500 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 11 Dec 2019 16:09:22 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 11 Dec 2019 16:09:18 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xBBG9GQ735389666 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Dec 2019 16:09:16 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 69801A405F; Wed, 11 Dec 2019 16:09:16 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5C95FA4054; Wed, 11 Dec 2019 16:09:14 +0000 (GMT) Received: from localhost.localdomain.com (unknown [9.85.74.172]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 11 Dec 2019 16:09:14 +0000 (GMT) From: Sourabh Jain To: mpe@ellerman.id.au Subject: [PATCH v6 0/6] reorganize and add FADump sysfs files Date: Wed, 11 Dec 2019 21:39:04 +0530 X-Mailer: git-send-email 2.17.2 X-TM-AS-GCONF: 00 x-cbid: 19121116-4275-0000-0000-0000038E019B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19121116-4276-0000-0000-000038A1B827 Message-Id: <20191211160910.21656-1-sourabhjain@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-11_04:2019-12-11,2019-12-11 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 phishscore=0 mlxlogscore=999 impostorscore=0 mlxscore=0 spamscore=0 lowpriorityscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912110136 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: corbet@lwn.net, mahesh@linux.vnet.ibm.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Sourabh Jain , linuxppc-dev@ozlabs.org, gregkh@linuxfoundation.org, hbathini@linux.ibm.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Currently, FADump sysfs files are present inside /sys/kernel directory. But as the number of FADump sysfs file increases it is not a good idea to push all of them in /sys/kernel directory. It is better to have separate directory to keep all the FADump sysfs files. Patch series reorganizes the FADump sysfs files and avail all the existing FADump sysfs files present inside /sys/kernel into a new directory /sys/kernel/fadump. The backward compatibility is maintained by adding a symlink for every sysfs file that has moved to new location. Also a new FADump sys interface is added to get the amount of memory reserved by FADump for saving the crash dump. Changelog: v1 -> v5: - https://lists.ozlabs.org/pipermail/linuxppc-dev/2019-December/201642.html v5 -> v6 - Unregister FADump if fadump group creation fails. - Remove fadump_enabled symlink if fadump_registered symlink creation fails. - Removed CREATE_SYMLINK macro. Sourabh Jain (6): Documentation/ABI: add ABI documentation for /sys/kernel/fadump_* sysfs: wrap __compat_only_sysfs_link_entry_to_kobj function to change the symlink name powerpc/fadump: reorganize /sys/kernel/fadump_* sysfs files powerpc/powernv: move core and fadump_release_opalcore under new kobject Documentation/ABI: mark /sys/kernel/fadump_* sysfs files deprecated powerpc/fadump: sysfs for fadump memory reservation .../ABI/obsolete/sysfs-kernel-fadump_enabled | 9 ++ .../obsolete/sysfs-kernel-fadump_registered | 10 ++ .../obsolete/sysfs-kernel-fadump_release_mem | 10 ++ .../sysfs-kernel-fadump_release_opalcore | 9 ++ Documentation/ABI/testing/sysfs-kernel-fadump | 40 ++++++ .../powerpc/firmware-assisted-dump.rst | 28 +++- arch/powerpc/kernel/fadump.c | 127 +++++++++++++----- arch/powerpc/platforms/powernv/opal-core.c | 55 +++++--- fs/sysfs/group.c | 28 +++- include/linux/sysfs.h | 12 ++ 10 files changed, 270 insertions(+), 58 deletions(-) create mode 100644 Documentation/ABI/obsolete/sysfs-kernel-fadump_enabled create mode 100644 Documentation/ABI/obsolete/sysfs-kernel-fadump_registered create mode 100644 Documentation/ABI/obsolete/sysfs-kernel-fadump_release_mem create mode 100644 Documentation/ABI/removed/sysfs-kernel-fadump_release_opalcore create mode 100644 Documentation/ABI/testing/sysfs-kernel-fadump -- 2.17.2