Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1724414pxb; Wed, 10 Feb 2021 15:29:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiZWNdZk7WgWf8szS6vraOvJOv4cD1JEKFkU2JjOH2N/ROUsomxJ9VoewtL1+e1Sj/pzn0 X-Received: by 2002:a05:6402:d05:: with SMTP id eb5mr5411431edb.143.1612999768439; Wed, 10 Feb 2021 15:29:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612999768; cv=none; d=google.com; s=arc-20160816; b=ImjoBO8c1aA6zv/9Vdy0LhndOPI3PFZjntEHBGr90mXfHEcnresawmrfZ45QJaWV8u JZvNbH+WRcqZ2ezJqdCRM87f1+Cypnb8gz7pf5tA/0x/KHNP8Xt2peEWyPST5Mrp0QUL iax81lR6jcuQXXi4XWiyJCyZepThnHRgPTfMevSrAg8bAbD3iahiPBk0XIkmRo+OnYf9 Ij2K+snLSdhVmqaZvqkZ2MsWDKJPyow+PxTIRMjZxgxsPQwJi8kgJCiEKude7pYd9gVk I7U92wEd+LO2hYSKnal3KlgidMSTmPBcz1QvCQbQx1oEv29SXvjBoJYYixhLtH2FyLiP IyRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:in-reply-to:subject :cc:to:from:user-agent:references:dkim-signature; bh=lya6aWx3adNpubBuqfgnGh2PFxWHF1T1ZwnR7eu0Zk4=; b=y2uSuv69WMjM1kRqLeJto7kTfmIJnNyhOtFueVrRGPrQ3wjC7iHZS+ZmSdnMUsTEQH TdlXY3hp4cSXzyCMA4tvBgMRzJ2nRr4x1gdZdbkmgRjr3rQlaI7z2gllwldRci81i+1h jueqcAMEoTx7Y7VpI5Zcjc2kYuSW8LYgqrbhiEFwsWApzBEa8Z+aOfyiBbtDdPJbJft5 uLBm1pj3DlMFaJHW4chb3kDMM0guAdyjFt+bNl7HcXVarZQoGbtT/eyBtQ/InEYVi53M rR16N5XoU28SPmkFMg+BRJ9spDIo5V7a4IhD5Yi36kIX0Tv1ucqguocDKRFWvp8T2Br1 akxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=J9rrM279; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ds6si2287686ejc.350.2021.02.10.15.29.04; Wed, 10 Feb 2021 15:29:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=J9rrM279; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233983AbhBJX16 (ORCPT + 99 others); Wed, 10 Feb 2021 18:27:58 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:19036 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234155AbhBJX05 (ORCPT ); Wed, 10 Feb 2021 18:26:57 -0500 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 11AN3HZl100879; Wed, 10 Feb 2021 18:25:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=references : from : to : cc : subject : in-reply-to : date : message-id : mime-version : content-type; s=pp1; bh=lya6aWx3adNpubBuqfgnGh2PFxWHF1T1ZwnR7eu0Zk4=; b=J9rrM279ujDjvj/fUkJzd6OK3OioO03i8GspWCb7gRQ1Bz9r5n1MIYjzJfeeEcb9oUok RL+mDDutQwGn6UXo2B/UY1RfNmw7z7VZW6jCV3PZ8G0MyzYRViZERgG2wu4594UBjnGY hga5HoV+sDejMNvioGMyMbpIiw0o13sYehXc1p9T9qUwhJ1oTB2CZgv/aeHELGbEJsCM ffq0WbxFRn4S0qN+dMGISMAmiVF9ffCxzaBLXmmItZPMoi4lHGn2fQdD4L0GtOXTFLmt EylkaYvDeupZdzGgshnoC8ZFN81JhM8Tgm29VNiZiKvSSGg55mX2rSHCmJEFgh3zaLpx Mw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 36mqngjb0a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Feb 2021 18:25:01 -0500 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 11AN4BW0105431; Wed, 10 Feb 2021 18:25:01 -0500 Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com with ESMTP id 36mqngjayx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Feb 2021 18:25:01 -0500 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 11ANNW50012293; Wed, 10 Feb 2021 23:24:59 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma04wdc.us.ibm.com with ESMTP id 36hjr9hgy7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Feb 2021 23:24:59 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 11ANOxZD31129994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Feb 2021 23:24:59 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 30EAAAC05B; Wed, 10 Feb 2021 23:24:59 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E9FC2AC059; Wed, 10 Feb 2021 23:24:51 +0000 (GMT) Received: from manicouagan.localdomain (unknown [9.160.95.194]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTPS; Wed, 10 Feb 2021 23:24:51 +0000 (GMT) References: <20210209182200.30606-1-nramas@linux.microsoft.com> <20210209182200.30606-3-nramas@linux.microsoft.com> User-agent: mu4e 1.4.10; emacs 27.1 From: Thiago Jung Bauermann To: Lakshmi Ramasubramanian Cc: zohar@linux.ibm.com, robh@kernel.org, takahiro.akashi@linaro.org, gregkh@linuxfoundation.org, will@kernel.org, joe@perches.com, catalin.marinas@arm.com, mpe@ellerman.id.au, james.morse@arm.com, sashal@kernel.org, benh@kernel.crashing.org, paulus@samba.org, frowand.list@gmail.com, vincenzo.frascino@arm.com, mark.rutland@arm.com, dmitry.kasatkin@gmail.com, jmorris@namei.org, serge@hallyn.com, pasha.tatashin@soleen.com, allison@lohutok.net, masahiroy@kernel.org, mbrugger@suse.com, hsinyi@chromium.org, tao.li@vivo.com, christophe.leroy@c-s.fr, prsriva@linux.microsoft.com, balajib@linux.microsoft.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v17 02/10] of: Add a common kexec FDT setup function In-reply-to: <20210209182200.30606-3-nramas@linux.microsoft.com> Date: Wed, 10 Feb 2021 20:24:49 -0300 Message-ID: <87y2fvo69q.fsf@manicouagan.localdomain> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369,18.0.737 definitions=2021-02-10_11:2021-02-10,2021-02-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 lowpriorityscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102100200 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Lakshmi Ramasubramanian writes: > From: Rob Herring > > Both arm64 and powerpc do essentially the same FDT /chosen setup for > kexec. The differences are either omissions that arm64 should have > or additional properties that will be ignored. The setup code can be > combined and shared by both powerpc and arm64. > > The differences relative to the arm64 version: > - If /chosen doesn't exist, it will be created (should never happen). > - Any old dtb and initrd reserved memory will be released. > - The new initrd and elfcorehdr are marked reserved. > - "linux,booted-from-kexec" is set. > > The differences relative to the powerpc version: > - "kaslr-seed" and "rng-seed" may be set. > - "linux,elfcorehdr" is set. > - Any existing "linux,usable-memory-range" is removed. > > Combine the code for setting up the /chosen node in the FDT and updating > the memory reservation for kexec, for powerpc and arm64, in > of_kexec_alloc_and_setup_fdt() and move it to "drivers/of/kexec.c". > > Signed-off-by: Rob Herring > Signed-off-by: Lakshmi Ramasubramanian > --- > drivers/of/Makefile | 6 ++ > drivers/of/kexec.c | 258 ++++++++++++++++++++++++++++++++++++++++++++ > include/linux/of.h | 13 +++ > 3 files changed, 277 insertions(+) > create mode 100644 drivers/of/kexec.c Reviewed-by: Thiago Jung Bauermann -- Thiago Jung Bauermann IBM Linux Technology Center