LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Greentime Hu <green.hu@gmail.com>
To: linux-kernel@vger.kernel.org, arnd@arndb.de,
	greentime@andestech.com, green.hu@gmail.com,
	private@roeck-us.net
Subject: [PATCH 5/9] nds32: Fix xfs_buf built failed by export invalidate_kernel_vmap_range and flush_kernel_vmap_range
Date: Thu, 19 Apr 2018 21:18:11 +0800	[thread overview]
Message-ID: <d92ae87097f83ed90196accd4b03ed6993919f0a.1524143428.git.greentime@andestech.com> (raw)
In-Reply-To: <347705ade75b5901537034561fd67311b1260358.1524143428.git.greentime@andestech.com>
In-Reply-To: <347705ade75b5901537034561fd67311b1260358.1524143428.git.greentime@andestech.com>

It broke the 'allmodconfig' build.
fs/xfs/xfs_buf.c: In function 'xfs_buf_bio_end_io':
fs/xfs/xfs_buf.c:1242:3: error: implicit declaration of function 'invalidate_kernel_vmap_range' [-Werror=implicit-function-declaration]
   invalidate_kernel_vmap_range(bp->b_addr, xfs_buf_vmap_len(bp));
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/xfs/xfs_buf.c: In function 'xfs_buf_ioapply_map':
fs/xfs/xfs_buf.c:1312:4: error: implicit declaration of function 'flush_kernel_vmap_range' [-Werror=implicit-function-declaration]
    flush_kernel_vmap_range(bp->b_addr,
    ^~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Greentime Hu <greentime@andestech.com>
---
 arch/nds32/include/asm/cacheflush.h |  2 ++
 arch/nds32/mm/cacheflush.c          | 18 ++++++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/arch/nds32/include/asm/cacheflush.h b/arch/nds32/include/asm/cacheflush.h
index 1240f148ec0f..10b48f0d8e85 100644
--- a/arch/nds32/include/asm/cacheflush.h
+++ b/arch/nds32/include/asm/cacheflush.h
@@ -32,6 +32,8 @@ void flush_anon_page(struct vm_area_struct *vma,
 
 #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
 void flush_kernel_dcache_page(struct page *page);
+void flush_kernel_vmap_range(void *addr, int size);
+void invalidate_kernel_vmap_range(void *addr, int size);
 void flush_icache_range(unsigned long start, unsigned long end);
 void flush_icache_page(struct vm_area_struct *vma, struct page *page);
 #define flush_dcache_mmap_lock(mapping)   xa_lock_irq(&(mapping)->i_pages)
diff --git a/arch/nds32/mm/cacheflush.c b/arch/nds32/mm/cacheflush.c
index 6eb786a399a2..bd52918d5923 100644
--- a/arch/nds32/mm/cacheflush.c
+++ b/arch/nds32/mm/cacheflush.c
@@ -273,6 +273,24 @@ void flush_kernel_dcache_page(struct page *page)
 	local_irq_restore(flags);
 }
 
+void flush_kernel_vmap_range(void *addr, int size)
+{
+	unsigned long flags;
+	local_irq_save(flags);
+	cpu_dcache_wb_range((unsigned long)addr, (unsigned long)addr +  size);
+	local_irq_restore(flags);
+}
+EXPORT_SYMBOL(flush_kernel_vmap_range);
+
+void invalidate_kernel_vmap_range(void *addr, int size)
+{
+	unsigned long flags;
+	local_irq_save(flags);
+	cpu_dcache_inval_range((unsigned long)addr, (unsigned long)addr + size);
+	local_irq_restore(flags);
+}
+EXPORT_SYMBOL(invalidate_kernel_vmap_range);
+
 void flush_icache_range(unsigned long start, unsigned long end)
 {
 	unsigned long line_size, flags;
-- 
1.9.5

  parent reply	other threads:[~2018-04-19 13:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19 13:18 [PATCH 1/9] nds32: lib: To use generic lib instead of libgcc to prevent the symbol undefined issue Greentime Hu
2018-04-19 13:18 ` [PATCH 2/9] nds32: Fix building error when CONFIG_FREEZE is enabled Greentime Hu
2018-04-19 13:18 ` [PATCH 3/9] nds32: Fix building error of crypto/xor.c by adding xor.h Greentime Hu
2018-04-19 13:18 ` [PATCH 4/9] nds32: Fix drivers/gpu/drm/udl/udl_fb.c building error by defining PAGE_SHARED Greentime Hu
2018-04-19 13:18 ` Greentime Hu [this message]
2018-04-19 13:18 ` [PATCH 6/9] nds32: Fix the symbols undefined issue by exporting them Greentime Hu
2018-04-20 10:41   ` Christoph Hellwig
2018-04-20 12:01     ` Greentime Hu
2018-04-19 13:18 ` [PATCH 7/9] nds32: Fix the unknown type u8 issue Greentime Hu
2018-04-19 13:18 ` [PATCH 8/9] nds32: Fix build failed because arch_trace_hardirqs_off is changed to trace_hardirqs_off Greentime Hu
2018-04-19 13:18 ` [PATCH 9/9] nds32: Fix the allmodconfig build. To make sure CONFIG_CPU_LITTLE_ENDIAN is default y Greentime Hu
2018-04-19 13:35   ` Arnd Bergmann
2018-04-19 18:38   ` [9/9] " Guenter Roeck
2018-04-20 11:54     ` Greentime Hu
2018-04-19 13:36 ` [PATCH 1/9] nds32: lib: To use generic lib instead of libgcc to prevent the symbol undefined issue Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d92ae87097f83ed90196accd4b03ed6993919f0a.1524143428.git.greentime@andestech.com \
    --to=green.hu@gmail.com \
    --cc=arnd@arndb.de \
    --cc=greentime@andestech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=private@roeck-us.net \
    --subject='Re: [PATCH 5/9] nds32: Fix xfs_buf built failed by export invalidate_kernel_vmap_range and flush_kernel_vmap_range' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).