Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5240764pxb; Mon, 15 Feb 2021 13:45:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJxp4ERSl0WNJJXQQqMrdp7ND4D8LNv9Nyh8pQcHVmutbnI5xs1J+nNtqar9Ge38r2npuULG X-Received: by 2002:a05:6402:c91:: with SMTP id cm17mr18071344edb.219.1613425522503; Mon, 15 Feb 2021 13:45:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613425522; cv=none; d=google.com; s=arc-20160816; b=jXdcqcMGW9MsnXnNUoKhTTwUOSVVSQyQaNlNjYKOO8GaAX8EbP0IzLgv4IWzS7UftO TPbHgQexpZ0s0HVW/uBNGSBcruPsT3H1K/gfhff8oEqHRAMLPkoHKQmx6DCNjzs5IAUA CGfYUEEMLg3k9JQtNn85uUCXyB8C+eA062D87ts1ecZsZG6wj18WT/Xrvsh9UGgkSZYu fqjUuM0CdS5BH4tfT/3fwC/h1ij0t5y2uxreOfFHgGodRxW6Mvlytm8D4/tBxzSHAe57 PtDD2dBRiG/vAogboPKadmaE+w90G7lbWCqWv9FPTiIjXrUwT+JjR8bqn+OF2jkFZMXT 6MKQ== 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=59lofuoVLRIne8XRKPx+13VhxuCn+3MZNIhQIjVs3Qk=; b=s0AD4rOGbNPAXE6SU6GQFo2ERSURmXj/lZ7KJYKctjfsyxxsC5Cp7N+PgTE/uAbNxt ED9taRKayaNBhZzbhL97PMp0vgrIaePLjc1kzTqbLJ9eNpYvxvg5hyEeYb9GwoPR+nsy hQsOSK30JH0fVTXrQHGIM9/SlnYFQXzMBurlWa/iY2TkNaJH14/1IcuhKHkSkmtcFzza JN96NWmtSxVUkxLAXN0BO7ZOfiiGups4SaQwDkc5oLVZoqk8w9p21gwqk70E7MHv8JDJ OHZth3a+7LDWWKd5CzMaOsNM1jXtXb8+bWg2gtZY99k8sSiJVgWCRrzwc+NUPO1zmAiG Qs/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=VXV7Foe1; 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 r11si18205564edc.353.2021.02.15.13.44.59; Mon, 15 Feb 2021 13:45:22 -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=VXV7Foe1; 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 S229767AbhBOVnj (ORCPT + 99 others); Mon, 15 Feb 2021 16:43:39 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:4792 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229675AbhBOVnd (ORCPT ); Mon, 15 Feb 2021 16:43:33 -0500 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 11FLXGuU138358; Mon, 15 Feb 2021 16:42:04 -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=59lofuoVLRIne8XRKPx+13VhxuCn+3MZNIhQIjVs3Qk=; b=VXV7Foe1yfKyVpFwPekph3sUR+r/7T4set3G729OVaNr4j6yr5l9k+zgcuURXkvulie6 uAU6NfZqH8itrm8D77yY+7II+g5ckEr+D0OBRw85jQU6Fn8aXzqohW5wwalTsev0YzZ6 W5WXN21L8JaT8waIclR0C5m174Jke7UUJCN8ppmoAiobv3O3jj+OPANOIbo2eAcET289 KP0vPPj6/Ags3xz0a2biup69mKanPY4fHoGjoAF5K8FRKp8ijPmR6T0cQ9wgQ9QbVoP5 wKcUiP3le98g4wkWeiNBTaX0cDqkmq5UO0ZFfFC0vuP+r6Qv27QTlGdPcZs4d7q38toe 4g== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 36r0wvgb85-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Feb 2021 16:42:04 -0500 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 11FLXWx5142032; Mon, 15 Feb 2021 16:42:03 -0500 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 36r0wvgb5m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Feb 2021 16:42:03 -0500 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 11FLbYxF013039; Mon, 15 Feb 2021 21:41:58 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma03dal.us.ibm.com with ESMTP id 36p6d8xa7t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Feb 2021 21:41:58 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 11FLfvjP21627282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 Feb 2021 21:41:57 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 59EF0C6059; Mon, 15 Feb 2021 21:41:57 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 644C1C605B; Mon, 15 Feb 2021 21:41:49 +0000 (GMT) Received: from manicouagan.localdomain (unknown [9.85.173.121]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTPS; Mon, 15 Feb 2021 21:41:49 +0000 (GMT) References: <20210213161049.6190-1-nramas@linux.microsoft.com> <20210213161049.6190-4-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 v18 03/11] of: Add a common kexec FDT setup function In-reply-to: <20210213161049.6190-4-nramas@linux.microsoft.com> Date: Mon, 15 Feb 2021 18:41:47 -0300 Message-ID: <87zh05qa90.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.761 definitions=2021-02-15_16:2021-02-12,2021-02-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 adultscore=0 mlxlogscore=999 spamscore=0 clxscore=1015 malwarescore=0 bulkscore=0 mlxscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102150164 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 | 265 ++++++++++++++++++++++++++++++++++++++++++++ > include/linux/of.h | 5 + > 3 files changed, 276 insertions(+) > create mode 100644 drivers/of/kexec.c Reviewed-by: Thiago Jung Bauermann -- Thiago Jung Bauermann IBM Linux Technology Center