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=-4.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 D1320C433DB for ; Fri, 12 Feb 2021 02:13:07 +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 8EA9E64E35 for ; Fri, 12 Feb 2021 02:13:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8EA9E64E35 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=6F+UUJiw9GWRo7Ca5rZz6emerbLCiKJXuRzgWiaMzf0=; b=EDG1rvlpmfrDxXpD/IGxF829M NZ9gl271GpAGYoH45aOlmlaB01FXHov7l+8mPxrLkiJwLQQI8+K0IQq956mnIRMCiRB2UXI73Sjo5 CkWxVPz9d7Qbyd4rRxepfZvdvymyZiU0LA3ohTldYin9mvtlhWC/JCMqJEWr170mdl3p8Z4tK8cD5 xeXiWxmeY+eGFhcFYntvbQLz7+GEWehXRLMYDq5BrbMEAo9Kr82nxnVHNysA7EhuyWgWshqSnvjGS iSmtmN3nCuza0Hen0n4P8c0YiruoKpUXfGvd5FqWXz+JDVUjlBnWcZQBFF8Mkuu5g+cp4IsbG7tgq TQye5spEg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lANw9-0001G8-Qo; Fri, 12 Feb 2021 02:12:01 +0000 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5] helo=mx0a-001b2d01.pphosted.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lANw8-0001Fk-2l for linux-arm-kernel@lists.infradead.org; Fri, 12 Feb 2021 02:12:00 +0000 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 11C273W7005732; Thu, 11 Feb 2021 21:11:56 -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=I7Bevbp6dN6ajpOSIm2gBrXXewG69+AwhsynkQIrTKU=; b=j32QtqsVElKK/pgZ5bDDoOnm7D372QJgudZgxkkdCaKcB/s7wmPfeBoTbf8Xp8pg2H7E FCiqzi0WInFpzt1+7DzMvQUNoSfMcw2xm0l1TXhYc1kgFRc05/kg6GpbxCXC8Ylst0sk dbFsGfGXqZQ4zt45Ot1Nr6gOmim2d+RMe1JCTV9h591brDuxwKzhb1WGWpBVaB4uyfJ8 CggstFqZ8Gjbu40rv4QzqzfidtmS0o5ob9DXkW1PmGSP40JjaW1VeTJAQxTIH6ilOC2W XERgFOI73wf9xmfBZUB3Mg7VmCVD6BWsz81oqQ1U1aaOih7JbDs2jY+k3d5AXV7eWgx0 pg== Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0b-001b2d01.pphosted.com with ESMTP id 36ng8prhu2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Feb 2021 21:11:56 -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 11C2BYrL017675; Fri, 12 Feb 2021 02:11:55 GMT Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by ppma04wdc.us.ibm.com with ESMTP id 36hjr9t1wv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 Feb 2021 02:11:55 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 11C2BtC029032708 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 12 Feb 2021 02:11:55 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2B4AA112066; Fri, 12 Feb 2021 02:11:55 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 71A5A112063; Fri, 12 Feb 2021 02:11:53 +0000 (GMT) Received: from manicouagan.localdomain (unknown [9.85.204.73]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTPS; Fri, 12 Feb 2021 02:11:53 +0000 (GMT) References: <202102120032.Bv0MoYv7-lkp@intel.com> <40fd1869-dcb4-36ae-e997-b8486dd4846c@linux.microsoft.com> <87mtwap35f.fsf@manicouagan.localdomain> User-agent: mu4e 1.4.10; emacs 27.1 From: Thiago Jung Bauermann To: Lakshmi Ramasubramanian Subject: Re: Fwd: Re: [PATCH v17 02/10] of: Add a common kexec FDT setup function In-reply-to: Date: Thu, 11 Feb 2021 23:11:51 -0300 Message-ID: <87eehmox08.fsf@manicouagan.localdomain> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.737 definitions=2021-02-11_07:2021-02-11, 2021-02-11 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 adultscore=0 spamscore=0 priorityscore=1501 phishscore=0 clxscore=1015 mlxscore=0 suspectscore=0 impostorscore=0 bulkscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102120007 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210211_211200_191879_899FD045 X-CRM114-Status: GOOD ( 22.07 ) 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: Rob Herring , linux-integrity@vger.kernel.org, linuxppc-dev , linux-arm-kernel , Mimi Zohar 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 2/11/21 3:59 PM, Thiago Jung Bauermann wrote: >> Lakshmi Ramasubramanian writes: >> >>> On 2/11/21 9:42 AM, Lakshmi Ramasubramanian wrote: >>>> Hi Rob, >>>> [PATCH] powerpc: Rename kexec elfcorehdr_addr to elf_headers_mem >>>> This change causes build problem for x86_64 architecture (please see the >>>> mail from kernel test bot below) since arch/x86/include/asm/kexec.h uses >>>> "elf_load_addr" for the ELF header buffer address and not >>>> "elf_headers_mem". >>>> struct kimage_arch { >>>> ... >>>> /* Core ELF header buffer */ >>>> void *elf_headers; >>>> unsigned long elf_headers_sz; >>>> unsigned long elf_load_addr; >>>> }; >>>> I am thinking of limiting of_kexec_alloc_and_setup_fdt() to ARM64 and >>>> PPC64 since they are the only ones using this function now. >>>> #if defined(CONFIG_ARM64) && defined(CONFIG_PPC64) >>> Sorry - I meant to say >>> #if defined(CONFIG_ARM64) || defined(CONFIG_PPC64) >>> >> Does it build correctly if you rename elf_headers_mem to elf_load_addr? >> Or the other way around, renaming x86's elf_load_addr to >> elf_headers_mem. I don't really have a preference. > > Yes - changing arm64 and ppc from "elf_headers_mem" to "elf_load_addr" builds > fine. > > But I am concerned about a few other architectures that also define "struct > kimage_arch" such as "parisc", "arm" which do not have any ELF related fields. > They would not build if the config defines CONFIG_KEXEC_FILE and > CONFIG_OF_FLATTREE. > > Do you think that could be an issue? That's a good point. But in practice, arm doesn't support CONFIG_KEXEC_FILE. And while parisc does support CONFIG_KEXEC_FILE, as far as I could determine it doesn't support CONFIG_OF. So IMHO we don't need to worry about them. We'll cross that bridge if we get there. If they ever implement KEXEC_FILE or OF_FLATTREE support, then (again, IMHO) the natural solution would be for them to name the ELF header member the same way the other arches do. And since no other architecture defines struct kimage_arch, those are the only ones we need to consider. -- 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