From patchwork Sun May 21 11:47:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Heiko_St=C3=BCbner?= X-Patchwork-Id: 13249395 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4D3A9C7EE23 for ; Sun, 21 May 2023 11:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=e6BDDR1sEpGcF2iET8KydFMpcLsT7QdiUMpcgB7aAfc=; b=M51MMlnEDxBbZS hz/TdjoPKybR89l5096nRS8zDUY8Qvgp5p9oi32jiATaV23ZIBDkZQK7u3UIN/Ldm+3U+8tdu6t2L BaGRe+afGF0Fx8t5Q13bnrXITZdJVbUsJ9R16eGPgz8S8vOEZoh8X8+NqsA2A2br1Pp2tC+txyub6 2BarIza2DgLCJOw8NVshQ4GeStGCE87AlGprFjEoT/KpG4Fim7z647EvOSi3xjY6bgUgmledm7lrT pkoJJ1Qj1AiKt+7AGDYGeLn7mOSd40h4N1ZqD1ePDsrYJ97MCKmh7KhVHWsV+DvbgioWSXFK+ucqZ sVrDswnNrFwJGmev3xZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q0hX5-003nND-2v; Sun, 21 May 2023 11:47:27 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q0hX3-003nLQ-1Y for linux-riscv@lists.infradead.org; Sun, 21 May 2023 11:47:26 +0000 Received: from ip5b412278.dynamic.kabel-deutschland.de ([91.65.34.120] helo=phil.lan) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q0hWv-0008T6-1T; Sun, 21 May 2023 13:47:17 +0200 From: Heiko Stuebner To: linux-riscv@lists.infradead.org, palmer@dabbelt.com, paul.walmsley@sifive.com Cc: linux-kernel@vger.kernel.org, christoph.muellner@vrull.eu, David.Laight@ACULAB.COM, Heiko Stuebner Subject: [PATCH v3 1/2] riscv: don't include kernel.h into alternative.h Date: Sun, 21 May 2023 13:47:14 +0200 Message-Id: <20230521114715.955823-2-heiko.stuebner@vrull.eu> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230521114715.955823-1-heiko.stuebner@vrull.eu> References: <20230521114715.955823-1-heiko.stuebner@vrull.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230521_044725_525077_07BD0057 X-CRM114-Status: GOOD ( 10.23 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Heiko Stuebner This include is not currently needed for alternatives and creates possible issues when we want to add alternatives to deeper kernel infrastructure. The issue in question came from trying to introduce Zawrs alternatives, which resulted in a somewhat circular dependency like: In file included from ../include/linux/bitops.h:34, from ../include/linux/kernel.h:22, from ../arch/riscv/include/asm/alternative.h:16, from ../arch/riscv/include/asm/errata_list.h:8, from ../arch/riscv/include/asm/barrier.h:15, from ../include/linux/list.h:11, from ../include/linux/preempt.h:11, from ../include/linux/spinlock.h:56, from ../include/linux/mmzone.h:8, from ../include/linux/gfp.h:7, from ../include/linux/mm.h:7, from ../arch/riscv/kernel/asm-offsets.c:10: ../include/asm-generic/bitops/generic-non-atomic.h: In function ‘generic_test_bit_acquire’: ../include/asm-generic/bitops/generic-non-atomic.h:140:23: error: implicit declaration of function ‘smp_load_acquire’ [-Werror=implicit-function-declaration] 140 | return 1UL & (smp_load_acquire(p) >> (nr & (BITS_PER_LONG-1))); | ^~~~~~~~~~~~~~~~ Signed-off-by: Heiko Stuebner --- arch/riscv/include/asm/alternative.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/riscv/include/asm/alternative.h b/arch/riscv/include/asm/alternative.h index 6a41537826a7..05885de6048c 100644 --- a/arch/riscv/include/asm/alternative.h +++ b/arch/riscv/include/asm/alternative.h @@ -13,7 +13,6 @@ #ifdef CONFIG_RISCV_ALTERNATIVE #include -#include #include #include #include