From patchwork Tue Oct 17 13:59:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13425209 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 smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2C54FCDB482 for ; Tue, 17 Oct 2023 13:59:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id E1BB2C433C7; Tue, 17 Oct 2023 13:59:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 smtp.kernel.org (Postfix) with ESMTPS id 0D60EC433C8; Tue, 17 Oct 2023 13:59:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org 0D60EC433C8 Authentication-Results: smtp.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=x5ptCfsg9O1HYYf76yB/HYRE+aWyZspmFlULsvzlzxs=; b=2w5gpe5BO9cLN6B8p3isGaNWF/ R9bi7dmVKwtjaCOkdm2kFbBfgkO/mAl8paLWvRody1aWp5G8nKrHzFcCvfijPNpuKfhxYpmI87r6c 2NBwP/8+GbjWIiOjZHzmfz8V5fKPhivc8pDK8OFrtLpgIvn2WWOvjRgyljBnr4h7H8s4GHMwcvh8m gZSGOT1pAOW6tfoVql0EQH0skqi7MXpqpNmr+AK7UFuEOjO1rNLzlRc0xoCz2beeKfm+T4W8okYe+ XbIttyUisvxvUUvhqk3vHMdqGIqapkdF9BoWbAheZu7nj1tIVHV4crbWCt5/sBIOoOZGGQM0G91zU QNklU71w==; Received: from 213-147-166-120.nat.highway.webapn.at ([213.147.166.120] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qskbg-00CTWU-08; Tue, 17 Oct 2023 13:59:36 +0000 From: Christoph Hellwig To: Paul Walmsley , Palmer Dabbelt , Conor Dooley , Geert Uytterhoeven , Magnus Damm List-Id: Cc: linux-riscv@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Arnd Bergmann , Olof Johansson , soc@kernel.org, Conor Dooley Subject: [PATCH 1/3] riscv: RISCV_NONSTANDARD_CACHE_OPS shouldn't depend on RISCV_DMA_NONCOHERENT Date: Tue, 17 Oct 2023 15:59:24 +0200 Message-Id: <20231017135926.1240101-2-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231017135926.1240101-1-hch@lst.de> References: <20231017135926.1240101-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html RISCV_NONSTANDARD_CACHE_OPS is also used for the pmem cache maintenance helpers, which are built into the kernel unconditionally. Signed-off-by: Christoph Hellwig Acked-by: Conor Dooley --- arch/riscv/Kconfig | 1 - drivers/cache/Kconfig | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index d607ab0f7c6daf..0ac0b538379718 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -277,7 +277,6 @@ config RISCV_DMA_NONCOHERENT config RISCV_NONSTANDARD_CACHE_OPS bool - depends on RISCV_DMA_NONCOHERENT help This enables function pointer support for non-standard noncoherent systems to handle cache management. diff --git a/drivers/cache/Kconfig b/drivers/cache/Kconfig index a57677f908f3ba..d6e5e3abaad8af 100644 --- a/drivers/cache/Kconfig +++ b/drivers/cache/Kconfig @@ -3,7 +3,7 @@ menu "Cache Drivers" config AX45MP_L2_CACHE bool "Andes Technology AX45MP L2 Cache controller" - depends on RISCV_DMA_NONCOHERENT + depends on RISCV select RISCV_NONSTANDARD_CACHE_OPS help Support for the L2 cache controller on Andes Technology AX45MP platforms. From patchwork Tue Oct 17 13:59:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13425210 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 smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 04C38CDB474 for ; Tue, 17 Oct 2023 13:59:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id DEE2CC433C9; Tue, 17 Oct 2023 13:59:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 smtp.kernel.org (Postfix) with ESMTPS id 60125C433C7; Tue, 17 Oct 2023 13:59:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org 60125C433C7 Authentication-Results: smtp.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=OZYqVKF2BnfC7TrwYhJeul4vHW53Mw0roQsbMF/QnKo=; b=4a9tjl7JZvDPzI2TUKKicaYfR/ YW5AstZwxhfD3O6siujR9Dn6BWZVkDIBurWy6FAtwMih5aE2ou0E8U3vnkg7xpAPAcJ2HXeZo2WUe zikBEAjIh6KpEbuSNw9xPJ50pcOkKVRxrK4w3Ig+JETmWwj5tRLb4Govl1Mmltb2YwNQ1U1hFqHIK x9PcZRvrz+hcFSYvExrg3VW+D0jxYIJfV+2R54ey1ylqLTwVwjYXc+uZQaENKt1JpvZI/vYExdW86 /fmOK8wT3CEf8b5ElxEgNdxpgX6m/E8cuM5jImKYGgz96IAlBbogoPW/ilP/ek4b3qhFciuMrZszk 50G2p/OA==; Received: from 213-147-166-120.nat.highway.webapn.at ([213.147.166.120] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qskbk-00CTXE-18; Tue, 17 Oct 2023 13:59:41 +0000 From: Christoph Hellwig To: Paul Walmsley , Palmer Dabbelt , Conor Dooley , Geert Uytterhoeven , Magnus Damm List-Id: Cc: linux-riscv@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Arnd Bergmann , Olof Johansson , soc@kernel.org, Conor Dooley , Robin Murphy , Lad Prabhakar Subject: [PATCH 2/3] riscv: only select DMA_DIRECT_REMAP from RISCV_ISA_ZICBOM Date: Tue, 17 Oct 2023 15:59:25 +0200 Message-Id: <20231017135926.1240101-3-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231017135926.1240101-1-hch@lst.de> References: <20231017135926.1240101-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html RISCV_DMA_NONCOHERENT is also used for whacky non-standard non-coherent ops that use different hooks in dma-direct. Signed-off-by: Christoph Hellwig Reviewed-by: Conor Dooley Reviewed-by: Robin Murphy Reviewed-by: Lad Prabhakar --- arch/riscv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 0ac0b538379718..9c48fecc671918 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -273,7 +273,6 @@ config RISCV_DMA_NONCOHERENT select ARCH_HAS_SYNC_DMA_FOR_CPU select ARCH_HAS_SYNC_DMA_FOR_DEVICE select DMA_BOUNCE_UNALIGNED_KMALLOC if SWIOTLB - select DMA_DIRECT_REMAP if MMU config RISCV_NONSTANDARD_CACHE_OPS bool @@ -549,6 +548,7 @@ config RISCV_ISA_ZICBOM depends on RISCV_ALTERNATIVE default y select RISCV_DMA_NONCOHERENT + select DMA_DIRECT_REMAP help Adds support to dynamically detect the presence of the ZICBOM extension (Cache Block Management Operations) and enable its From patchwork Tue Oct 17 13:59:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13425211 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 smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C1ABECDB483 for ; Tue, 17 Oct 2023 13:59:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id A9D5DC433C9; Tue, 17 Oct 2023 13:59:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 smtp.kernel.org (Postfix) with ESMTPS id 33B20C433C7; Tue, 17 Oct 2023 13:59:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org 33B20C433C7 Authentication-Results: smtp.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=G1q5kjKCly+YP8ujUn6bFejuAy7IU52U7erNsqEL50A=; b=RdXPTp8QlvzsIHMvBsEegnjbje SjwI8eK9b18H+2U2vgz8+EMYa9d/O/KKSBDN5c+NfeX71E9A/H7SPgmFRns/8WLpQDVmVKQRjsJlP D3eF+DPL/q+5Dt9qlCA/vd1J22jfBCFbfUEYP5ezCyc4BBH0cthrO1chD/SMV/zQ2IeLZDkx3CMAR SyL8v97rYjP41t4ceXA8BgvbhIv0l7GIsGJgC46qbnvAfui8P08CJqyImMQCo0t3D15wa6VxqQD2u 0VAUrEg1dh28CFZNsJLWJPoBY/tBoGvSQ/6NlU95phw8pRCRJo4uToFKjQluVr+jNgx41Ly8Az4a6 cA6CLDqg==; Received: from 213-147-166-120.nat.highway.webapn.at ([213.147.166.120] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qskbo-00CTXx-0o; Tue, 17 Oct 2023 13:59:44 +0000 From: Christoph Hellwig To: Paul Walmsley , Palmer Dabbelt , Conor Dooley , Geert Uytterhoeven , Magnus Damm List-Id: Cc: linux-riscv@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Arnd Bergmann , Olof Johansson , soc@kernel.org, Lad Prabhakar , Conor Dooley Subject: [PATCH 3/3] soc: renesas: ARCH_R9A07G043 depends on !RISCV_ISA_ZICBOM Date: Tue, 17 Oct 2023 15:59:26 +0200 Message-Id: <20231017135926.1240101-4-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231017135926.1240101-1-hch@lst.de> References: <20231017135926.1240101-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html ARCH_R9A07G043 has its own non-standard global pool based DMA coherent allocator, which conflicts with the remap based RISCV_ISA_ZICBOM version. Add a proper dependency. Signed-off-by: Christoph Hellwig Reviewed-by: Lad Prabhakar Acked-by: Conor Dooley Acked-by: Geert Uytterhoeven --- drivers/soc/renesas/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/renesas/Kconfig b/drivers/soc/renesas/Kconfig index 335251ff6e8214..624185e09c967b 100644 --- a/drivers/soc/renesas/Kconfig +++ b/drivers/soc/renesas/Kconfig @@ -341,6 +341,7 @@ config ARCH_R9A07G043 bool "RISC-V Platform support for RZ/Five" depends on NONPORTABLE depends on RISCV_ALTERNATIVE + depends on !RISCV_ISA_ZICBOM depends on RISCV_SBI select ARCH_RZG2L select AX45MP_L2_CACHE