Skip to content

Commit 4d1608d

Browse files
jic23ConchuOD
authored andcommitted
cache: Make top level Kconfig menu a boolean dependent on RISCV
The next patch will add a new type of cache maintenance driver responsible for flushing deeper than is necessary for non coherent DMA (current use case of drivers/cache drivers), as needed when performing operations such as memory hotplug and security unlocking of persistent memory. The two types of operation are similar enough to share a drivers/cache directory and MAINTAINERS but are otherwise currently unrelated. To avoid confusion have two separate menus. Each has dependencies that are implemented by making them boolean symbols, here CACHEMAINT_FOR_DMA which is dependent on RISCV as all driver are currently for platforms of that architecture. Set new symbol default to y to avoid breaking existing configs. This has no affect on actual code built, just visibility of the menu. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
1 parent 9b9de5a commit 4d1608d

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

drivers/cache/Kconfig

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
menu "Cache Drivers"
2+
3+
menuconfig CACHEMAINT_FOR_DMA
4+
bool "Cache management for noncoherent DMA"
5+
depends on RISCV
6+
default y
7+
help
8+
These drivers implement support for noncoherent DMA master devices
9+
on platforms that lack the standard CPU interfaces for this.
10+
11+
if CACHEMAINT_FOR_DMA
312

413
config AX45MP_L2_CACHE
514
bool "Andes Technology AX45MP L2 Cache controller"
6-
depends on RISCV
715
select RISCV_NONSTANDARD_CACHE_OPS
816
help
917
Support for the L2 cache controller on Andes Technology AX45MP platforms.
@@ -16,12 +24,11 @@ config SIFIVE_CCACHE
1624

1725
config STARFIVE_STARLINK_CACHE
1826
bool "StarFive StarLink Cache controller"
19-
depends on RISCV
2027
depends on ARCH_STARFIVE
2128
depends on 64BIT
2229
select RISCV_DMA_NONCOHERENT
2330
select RISCV_NONSTANDARD_CACHE_OPS
2431
help
2532
Support for the StarLink cache controller IP from StarFive.
2633

27-
endmenu
34+
endif #CACHEMAINT_FOR_DMA

0 commit comments

Comments
 (0)