From nobody Mon Dec 29 02:58:21 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07EE8C10DC1 for ; Fri, 1 Dec 2023 06:25:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377630AbjLAGZp (ORCPT ); Fri, 1 Dec 2023 01:25:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377615AbjLAGZn (ORCPT ); Fri, 1 Dec 2023 01:25:43 -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 C1C491729 for ; Thu, 30 Nov 2023 22:25:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701411948; 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: content-transfer-encoding:content-transfer-encoding; bh=+Zt79wZvYhz4gi4hOOtVo1AQdfO7nRSajk5T4VGHojQ=; b=RUiLUZENr5QGR9V3SkFpLuR3FTBvaHwG+btecFM0V2laJY7c2gVHDeRf+7eKLzjWoyLeqS nEjr1L8d2Iyib0y73Tsfyj+omN4HqGM4FqVQbjuIRshiOaZ97jmY1yxDSKogTFIb+vFMDp Hv3Nmc6gnybfzkO23H5wld8MMD25QdE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-554-VG3zhdtUPFCBKXDt90IU9w-1; Fri, 01 Dec 2023 01:25:46 -0500 X-MC-Unique: VG3zhdtUPFCBKXDt90IU9w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 22309185A780; Fri, 1 Dec 2023 06:25:46 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (unknown [10.72.113.121]) by smtp.corp.redhat.com (Postfix) with ESMTP id 813FE1C060AE; Fri, 1 Dec 2023 06:25:42 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-riscv@lists.infradead.org, kexec@lists.infradead.org, mick@ics.forth.gr, changbin.du@intel.com, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, Baoquan He Subject: [PATCH] riscv, kexec: fix the ifdeffery for AFLAGS_kexec_relocate.o Date: Fri, 1 Dec 2023 14:25:38 +0800 Message-ID: <20231201062538.27240-1-bhe@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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=3Dy and CONFIG_KEXEC=3DN, or only set CONFIG_CRASH_DUMP=3Dy 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(-) 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 +=3D $(call cc-option,-Wno-override-init,) CFLAGS_compat_syscall_table.o +=3D $(call cc-option,-Wno-override-init,) =20 -ifdef CONFIG_KEXEC +ifdef CONFIG_KEXEC_CORE AFLAGS_kexec_relocate.o :=3D -mcmodel=3Dmedany $(call cc-option,-mno-relax) endif =20 --=20 2.41.0