Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp829520rdb; Thu, 30 Nov 2023 22:26:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IEoYlCMrs3GrIYooPxDnxYx1CBoOD0/kXHMFF6C/NlnTjNV/ethQ7Pm6Zp6mEeO5fccP3IS X-Received: by 2002:a05:6a00:10d2:b0:6cb:4bd5:a4c5 with SMTP id d18-20020a056a0010d200b006cb4bd5a4c5mr28965792pfu.9.1701411994588; Thu, 30 Nov 2023 22:26:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701411994; cv=none; d=google.com; s=arc-20160816; b=TfZghvm1xIPxBmGLLa8HFz26Gd86EK4xUc5kdqIKRwTX7qccZfsvYdNVTsAmF4yKrd 9kXF+MvymKkU5ySKAVC/QIdg7jSDvB8zqpjrYzbb2RBlAinQbm4767MJY2XTa8c6Qblq ZjzbYn0Bybrul/sKEYdbXO2ArRl6ETJnq9dzrPGtK4jrT+P8kh5/XVN83EDJLwlvsRzR t1oOHE0bPRQn+YMcJz21GbUTlaf4jyD/UYmV3Ld/VZmYTuMEhzvBHT3wyKWXxJBm24Wr eKKYLvzJ0juoQN1+1cKJtrI4mv+47udhe23qMNB1oNnnZcLPmnO2XHh6gm2IXmKMJwui 0Pjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=+Zt79wZvYhz4gi4hOOtVo1AQdfO7nRSajk5T4VGHojQ=; fh=JQ5Hd62MEVcrg37xk3sbajUGgc7GlPuVQ8TTbyai2A8=; b=zBvYiirUtgR9Sl1/HqrX2xBm62VDpvqfGz3Qhq3Q/kIMok/mILillWjGHf9rQhI2pK tpjWyg2WD22dCQbBSailsFrcy2ZDkcJqZYVFKswRfJXTbHBDPipNWBsJxp+O4ILLUUk4 Cxh1HG+9tCQjnf1nj434As1C07+xF60RBvclR2fpnwdZSPzTSz1QAEqIx/xjBArFgpPO AppRSfG9axmO+YBooFzXn7hH5nnhNxf/4AJgOkDvKgu9Xlty3PxhHgd1wxNDu70Xh/9I L9mo0c3o9PlOOcXfeX/I4HDCzgqnJdGVKntJ/u2VlGuTom49yJ1K2tbIgi7lyXHfWlv7 Rhcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RUiLUZEN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id b16-20020a656690000000b005bd0f2f41ddsi2726746pgw.206.2023.11.30.22.26.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 22:26:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RUiLUZEN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id BE4778093F43; Thu, 30 Nov 2023 22:26:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377619AbjLAGZo (ORCPT + 99 others); Fri, 1 Dec 2023 01:25:44 -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-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 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 groat.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 (groat.vger.email [0.0.0.0]); Thu, 30 Nov 2023 22:26:12 -0800 (PST) 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(-) 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