From 6ea42c84f33368eb3fe1ec1bff8d7cb1a5c7b07a Mon Sep 17 00:00:00 2001 From: Guo Ren Date: Tue, 4 May 2021 14:08:44 +0800 Subject: csky: syscache: Fixup duplicate cache flush The current csky logic of sys_cacheflush is wrong, it'll cause icache flush call dcache flush again. Now fixup it with a conditional "break & fallthrough". Fixes: 997153b9a75c ("csky: Add flush_icache_mm to defer flush icache all") Fixes: 0679d29d3e23 ("csky: fix syscache.c fallthrough warning") Acked-by: Randy Dunlap Co-Developed-by: Randy Dunlap Signed-off-by: Guo Ren Cc: Arnd Bergmann --- arch/csky/mm/syscache.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'arch') diff --git a/arch/csky/mm/syscache.c b/arch/csky/mm/syscache.c index 4e51d63850c4..cd847ad62c7e 100644 --- a/arch/csky/mm/syscache.c +++ b/arch/csky/mm/syscache.c @@ -12,15 +12,17 @@ SYSCALL_DEFINE3(cacheflush, int, cache) { switch (cache) { - case ICACHE: case BCACHE: - flush_icache_mm_range(current->mm, - (unsigned long)addr, - (unsigned long)addr + bytes); - fallthrough; case DCACHE: dcache_wb_range((unsigned long)addr, (unsigned long)addr + bytes); + if (cache != BCACHE) + break; + fallthrough; + case ICACHE: + flush_icache_mm_range(current->mm, + (unsigned long)addr, + (unsigned long)addr + bytes); break; default: return -EINVAL; -- cgit v1.2.3 From 90dc8c0e664efcb14e2f133309d84bfdcb0b3d24 Mon Sep 17 00:00:00 2001 From: Guo Ren Date: Wed, 12 May 2021 15:58:41 +0800 Subject: csky: Kconfig: Remove unused selects - GENERIC_ALLOCATOR is duplicated - Remove USB_ARCH_HAS_OHCI & USB_ARCH_HAS_EHCI, because they have been removed from linux. Signed-off-by: Guo Ren Cc: Arnd Bergmann --- arch/csky/Kconfig | 3 --- 1 file changed, 3 deletions(-) (limited to 'arch') diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig index 8de5b987edb9..2716f6395ba7 100644 --- a/arch/csky/Kconfig +++ b/arch/csky/Kconfig @@ -76,8 +76,6 @@ config CSKY select PERF_USE_VMALLOC if CPU_CK610 select RTC_LIB select TIMER_OF - select USB_ARCH_HAS_EHCI - select USB_ARCH_HAS_OHCI select GENERIC_PCI_IOMAP select HAVE_PCI select PCI_DOMAINS_GENERIC if PCI @@ -245,7 +243,6 @@ endchoice menuconfig HAVE_TCM bool "Tightly-Coupled/Sram Memory" - select GENERIC_ALLOCATOR help The implementation are not only used by TCM (Tightly-Coupled Meory) but also used by sram on SOC bus. It follow existed linux tcm -- cgit v1.2.3