+ riscv-fix-build-break-after-macro-to-function-conversion-in-generic-cacheflushh.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: riscv: fix build break after macro-to-function conversion in generic cacheflush.h
has been added to the -mm tree.  Its filename is
     riscv-fix-build-break-after-macro-to-function-conversion-in-generic-cacheflushh.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/riscv-fix-build-break-after-macro-to-function-conversion-in-generic-cacheflushh.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/riscv-fix-build-break-after-macro-to-function-conversion-in-generic-cacheflushh.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Paul Walmsley <paul.walmsley@xxxxxxxxxx>
Subject: riscv: fix build break after macro-to-function conversion in generic cacheflush.h

c296d4dc13ae ("asm-generic: fix a compilation warning") converted the
various flush_*cache_* macros in asm-generic/cacheflush.h to static inline
functions.  This breaks RISC-V builds, since RISC-V's cacheflush.h
includes the generic cacheflush.h and then undefines the macros to be
overridden.

Fix by copying the subset of the no-op functions that are reused from the
generic cacheflush.h into the RISC-V cacheflush.h, and dropping the
include of the generic cacheflush.h.

Link: http://lkml.kernel.org/r/alpine.DEB.2.21.9999.1907180800440.18568@xxxxxxxxxxxxxxxx
Fixes: c296d4dc13ae ("asm-generic: fix a compilation warning")
Signed-off-by: Paul Walmsley <paul.walmsley@xxxxxxxxxx>
Cc: Qian Cai <cai@xxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/riscv/include/asm/cacheflush.h |   63 ++++++++++++++++++++++++--
 1 file changed, 59 insertions(+), 4 deletions(-)

--- a/arch/riscv/include/asm/cacheflush.h~riscv-fix-build-break-after-macro-to-function-conversion-in-generic-cacheflushh
+++ a/arch/riscv/include/asm/cacheflush.h
@@ -6,11 +6,66 @@
 #ifndef _ASM_RISCV_CACHEFLUSH_H
 #define _ASM_RISCV_CACHEFLUSH_H
 
-#include <asm-generic/cacheflush.h>
+#include <linux/mm.h>
 
-#undef flush_icache_range
-#undef flush_icache_user_range
-#undef flush_dcache_page
+#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
+
+/*
+ * The cache doesn't need to be flushed when TLB entries change when
+ * the cache is mapped to physical memory, not virtual memory
+ */
+static inline void flush_cache_all(void)
+{
+}
+
+static inline void flush_cache_mm(struct mm_struct *mm)
+{
+}
+
+static inline void flush_cache_dup_mm(struct mm_struct *mm)
+{
+}
+
+static inline void flush_cache_range(struct vm_area_struct *vma,
+				     unsigned long start,
+				     unsigned long end)
+{
+}
+
+static inline void flush_cache_page(struct vm_area_struct *vma,
+				    unsigned long vmaddr,
+				    unsigned long pfn)
+{
+}
+
+static inline void flush_dcache_mmap_lock(struct address_space *mapping)
+{
+}
+
+static inline void flush_dcache_mmap_unlock(struct address_space *mapping)
+{
+}
+
+static inline void flush_icache_page(struct vm_area_struct *vma,
+				     struct page *page)
+{
+}
+
+static inline void flush_cache_vmap(unsigned long start, unsigned long end)
+{
+}
+
+static inline void flush_cache_vunmap(unsigned long start, unsigned long end)
+{
+}
+
+#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
+	do { \
+		memcpy(dst, src, len); \
+		flush_icache_user_range(vma, page, vaddr, len); \
+	} while (0)
+#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
+	memcpy(dst, src, len)
 
 static inline void local_flush_icache_all(void)
 {
_

Patches currently in -mm which might be from paul.walmsley@xxxxxxxxxx are

riscv-fix-build-break-after-macro-to-function-conversion-in-generic-cacheflushh.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux