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=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 73814C4361B for ; Sat, 12 Dec 2020 02:19:41 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 1AD2B23359 for ; Sat, 12 Dec 2020 02:19:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1AD2B23359 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:In-reply-to:Subject:To: From:References:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=REKvMsQtJMtIZg/7wg+mbyvr++NBSFv9ZPAjbzqsNMc=; b=ns2U7fXeI7Gqn875vii4Y1QbS /i+vKNc/aU17zk6MPak0OOax9yAwG45MkdilM0IFaBHlrUitWSM8D2FnljIJnJsPwgYcrLYL99pIc oMQ2Owdqak+/hBQPKOLPa3xiO7QDrn2S0exCoxh6f3kSeZpuEleC7lmllCfyCme4Ju8Z6KukKRhnV k6mfSaBKh+N17mYglPfz1lX1lBd6TJh4XFAVLe+wyUwmiIisM/oZyXCuACTbf+ydHaOqTXOJTvVno RgvS42PgaXbf8PK/S1lUweWzQiDu94etgCGOa0IybbYsnSNZ5BpqjKQcMfU0bRIP9mSHwA91w55/R R5ves4Dbw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1knuTd-0005ME-Dg; Sat, 12 Dec 2020 02:17:41 +0000 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1knuTa-0005Ls-E5 for linux-arm-kernel@lists.infradead.org; Sat, 12 Dec 2020 02:17:40 +0000 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0BC22YVE136599; Fri, 11 Dec 2020 21:17:17 -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=CHlR03O/slhkZb7UI8AeVZ+E4TnENN5FXY5RSgCtZI0=; b=Gv4+YDoZtt/dFZRvxOvWmDqddZ3JCIr4RXy6pEzwX/uKfUj57SRzGhVOAYbiJDMnr8hQ BpH79INNJApoHGdv1hGbtwf5WVvWN0n46KLB+XHAmKU3TtNkme3xgtWL0U815GXRlgr1 VVk1mbDoz8zdIs7H23Anjcpm4YO/ERuG7wtl2QqE6E+1B2/jQKwfa5lZ8E8s9I87opfv l9pkBTpp7tMWOg/oQmBUXBu0nWiL2v64a3yMeebPB52tlBMP0hjUTtSJJLKJk6o0BvfT sxlb7KgRVi/Ce/OecLHJVLQxOlaRQelZPu8xLG1RKvnQS6BpxyaUT7yTl0U+z/mh85iH kg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 35chm63y4a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Dec 2020 21:17:17 -0500 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0BC22jaG137406; Fri, 11 Dec 2020 21:17:17 -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 35chm63y3v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Dec 2020 21:17:16 -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 0BC2CjZb030545; Sat, 12 Dec 2020 02:17:16 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma03dal.us.ibm.com with ESMTP id 3581ua90v3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 12 Dec 2020 02:17:16 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0BC2HESB23527900 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 12 Dec 2020 02:17:14 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B3CF8BE053; Sat, 12 Dec 2020 02:17:14 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 96A49BE04F; Sat, 12 Dec 2020 02:17:05 +0000 (GMT) Received: from manicouagan.localdomain (unknown [9.160.59.9]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTPS; Sat, 12 Dec 2020 02:17:05 +0000 (GMT) References: <20201211221006.1052453-1-robh@kernel.org> <20201211221006.1052453-3-robh@kernel.org> <6934c005-d848-314d-cfee-23f2273c119d@linux.microsoft.com> User-agent: mu4e 1.4.10; emacs 27.1 From: Thiago Jung Bauermann To: Lakshmi Ramasubramanian Subject: Re: [RFC PATCH 2/4] of: Add a common kexec FDT setup function In-reply-to: <6934c005-d848-314d-cfee-23f2273c119d@linux.microsoft.com> Date: Fri, 11 Dec 2020 23:17:02 -0300 Message-ID: <87360bahup.fsf@manicouagan.localdomain> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2020-12-11_10:2020-12-11, 2020-12-11 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 malwarescore=0 adultscore=0 spamscore=0 phishscore=0 suspectscore=0 bulkscore=0 clxscore=1011 mlxscore=0 mlxlogscore=999 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012120010 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201211_211738_816469_82E31AC3 X-CRM114-Status: GOOD ( 23.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, benh@kernel.crashing.org, bhsharma@redhat.com, tao.li@vivo.com, zohar@linux.ibm.com, paulus@samba.org, vincenzo.frascino@arm.com, frowand.list@gmail.com, sashal@kernel.org, Rob Herring , mpe@ellerman.id.au, masahiroy@kernel.org, jmorris@namei.org, takahiro.akashi@linaro.org, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, serge@hallyn.com, devicetree@vger.kernel.org, pasha.tatashin@soleen.com, will@kernel.org, prsriva@linux.microsoft.com, hsinyi@chromium.org, allison@lohutok.net, christophe.leroy@c-s.fr, mbrugger@suse.com, balajib@linux.microsoft.com, dmitry.kasatkin@gmail.com, linux-kernel@vger.kernel.org, james.morse@arm.com, linux-integrity@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Lakshmi Ramasubramanian writes: > On 12/11/20 2:10 PM, Rob Herring wrote: > > Hi Rob, > >> Both arm64 and powerpc do essentially the same FDT /chosen setup for >> kexec. We can simply combine everything each arch does. The differences >> are either omissions that arm64 should have or additional properties >> that will be ignored. >> 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. >> Signed-off-by: Rob Herring >> --- >> This could be taken a step further and do the allocation of the new >> FDT. The difference is arm64 uses vmalloc and powerpc uses kmalloc. The >> arm64 version also retries with a bigger allocation. That seems >> unnecessary. >> --- >> drivers/of/Makefile | 1 + >> drivers/of/kexec.c | 228 ++++++++++++++++++++++++++++++++++++++++++++ >> include/linux/of.h | 5 + >> 3 files changed, 234 insertions(+) >> create mode 100644 drivers/of/kexec.c >> diff --git a/drivers/of/Makefile b/drivers/of/Makefile >> index 6e1e5212f058..8ce11955afde 100644 >> --- a/drivers/of/Makefile >> +++ b/drivers/of/Makefile >> @@ -13,5 +13,6 @@ obj-$(CONFIG_OF_RESERVED_MEM) += of_reserved_mem.o >> obj-$(CONFIG_OF_RESOLVE) += resolver.o >> obj-$(CONFIG_OF_OVERLAY) += overlay.o >> obj-$(CONFIG_OF_NUMA) += of_numa.o >> +obj-$(CONFIG_KEXEC_FILE) += kexec.o > > For the functions moved from powerpc & arm64 to "drivers/of/kexec.c" in this > patch, compiling kexec.c when CONFIG_KEXEC_FILE is enabled is fine. But when > more functions (such as remove_ima_buffer()) are moved to this file, Makefile > needs to be updated for other ima kexec related CONFIGs. IMA kexec is only available if CONFIG_KEXEC_FILE is enabled, so I don't understand what problem you are seeing. -- Thiago Jung Bauermann IBM Linux Technology Center _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel