Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2564039rdb; Mon, 4 Dec 2023 00:34:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFljXITpB9kXWVNEa9oJogAfTOfxIgud7RNrbyoMcHmLDyrzQeB07akvdgRwn9csXhabbdt X-Received: by 2002:a17:90b:158:b0:286:bfa4:64aa with SMTP id em24-20020a17090b015800b00286bfa464aamr331184pjb.58.1701678896023; Mon, 04 Dec 2023 00:34:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701678896; cv=none; d=google.com; s=arc-20160816; b=xY6pK2CSbOwEAHDEp4DW9HnFQD6hux1Q3xl0pLXJt+MqpVV4MmgJq/RwKal4m7we4o DFRsZ/Tgt0Nk7RHNqaQh3QHpPkREDlV/Ap6yPRm1CL4KDohfGxZFQBp0iYlkum2z8EhY +Bzyj54JE7P8hlHcupnvTzuk9aHGWrH3mAl3pF3fHdolRmUyvjY1iM2xhTT4b+zezRjL TXChoigPTRhYO5AC/kqxD4XN9qLSdzdU3daIZsYW3qPI2YJz+IklXqUm1uOxeGvND2fV Elkzu9wqb0da/PM3SYTM7jHQnUafGOZc5FZlmpHjk/1OwsFVVVYGKkqiZYKoy7DO7cw3 6Fog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9tcnzIexPrb0OUsvkaLGTMaO9LwJfJejgNnOdDmMeTA=; fh=1XfX9XXO1ouKVYADFL/euXgSb8WtNsEfGxoE+QBbxlc=; b=COkqzwaJG+IwVpQ6kUIKXTZABXR7JO2H2Wha7SvLnhj+LVCJsxDDG5Fc0pvNy553Uv xr+WfwRUByEGAtQKuxxEBCV0p1N86GCcf10aZrBgzSBYNz6OWWDl5fao7zM5mPLgyhf6 E3QA4eLa+mWj6FL3zBhCi21OiMUbwgRjIAqGITAScP+CD/eZdE0axC2J/rrDSpSz3MzW vvrr1w4LyKJJDZU5q8KZ/fKTVfCf55NgM29PIfj11qrFy4EWGjuxmIe/LSHuuS4UhFFq 7HSf+VWeNFExXDw5Za4HIPAL0Ju6pUjUAs612k1DQdU8F/xEnKtlZU6Y200YyLrJlBVz M7fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OG47XKa1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id b3-20020a17090a990300b0028573fb25b9si7488921pjp.135.2023.12.04.00.34.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 00:34:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OG47XKa1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 9017E806155D; Mon, 4 Dec 2023 00:34:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229581AbjLDIek (ORCPT + 99 others); Mon, 4 Dec 2023 03:34:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbjLDIej (ORCPT ); Mon, 4 Dec 2023 03:34:39 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4051C1 for ; Mon, 4 Dec 2023 00:34:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701678885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9tcnzIexPrb0OUsvkaLGTMaO9LwJfJejgNnOdDmMeTA=; b=OG47XKa1BklctfdNYzS51Nxdrnl3EcPNK6ux3NuORWABTHGxsa66FBSNgBip5E3YaohOcO YEwM/ZFPZx7KlrjmwwoyIKjcn4CfkB2A2/Z5hlOpHMEr0PFyiH4E1BPwjTKfC9+9s32n03 pn0Yh7ehm6BfrDM7iA5fAEE3t4F9DjY= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-542-TP6E8WNAO9SqzRiAn5erpQ-1; Mon, 04 Dec 2023 03:34:40 -0500 X-MC-Unique: TP6E8WNAO9SqzRiAn5erpQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0B4DD38476C0; Mon, 4 Dec 2023 08:34:40 +0000 (UTC) Received: from localhost (unknown [10.72.113.121]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 09B38C1596F; Mon, 4 Dec 2023 08:34:38 +0000 (UTC) Date: Mon, 4 Dec 2023 16:34:36 +0800 From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-riscv@lists.infradead.org, kexec@lists.infradead.org, akpm@linux-foundation.org, mick@ics.forth.gr, changbin.du@intel.com, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu Subject: Re: [PATCH] riscv, kexec: fix the ifdeffery for AFLAGS_kexec_relocate.o Message-ID: References: <20231201062538.27240-1-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231201062538.27240-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 04 Dec 2023 00:34:53 -0800 (PST) CC Andrew. On 12/01/23 at 02:25pm, Baoquan He wrote: > This was introduced in commit fba8a8674f68 ("RISC-V: Add kexec > support"). > > It should work on CONFIG_KEXEC_CORE, but not CONFIG_KEXEC only, since > we could set CONFIG_KEXEC_FILE=y and CONFIG_KEXEC=N, or only set > CONFIG_CRASH_DUMP=y and disable both CONFIG_KEXEC and CONFIG_KEXEC_FILE. > In these cases, the AFLAGS won't take effect with the current ifdeffery > for AFLAGS_kexec_relocate.o. > > So fix it now. > > Signed-off-by: Baoquan He > --- > arch/riscv/kernel/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Hi RISC-V people, I didn't test this, while believe this need be fixed. Please help check if this is necessary. Thanks Baoquan > > diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile > index fee22a3d1b53..82940b6a79a2 100644 > --- a/arch/riscv/kernel/Makefile > +++ b/arch/riscv/kernel/Makefile > @@ -11,7 +11,7 @@ endif > CFLAGS_syscall_table.o += $(call cc-option,-Wno-override-init,) > CFLAGS_compat_syscall_table.o += $(call cc-option,-Wno-override-init,) > > -ifdef CONFIG_KEXEC > +ifdef CONFIG_KEXEC_CORE > AFLAGS_kexec_relocate.o := -mcmodel=medany $(call cc-option,-mno-relax) > endif > > -- > 2.41.0 >