[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    nds32: Fix xfs_buf built failed by export invalidate_kernel_vmap_range and flush_kernel_vmap_range
From:       "Linux Kernel Mailing List" <linux-kernel () vger ! kernel ! org>
Date:       2018-05-28 12:29:32
Message-ID: 20180528122932.2379621B3C () pdx-korg-gitolite-1 ! ci ! codeaurora ! org
[Download RAW message or body]

Web:        https://git.kernel.org/torvalds/c/03969d0b3a3f6a7cd2c731eed1c4ccf76da88586
                
Commit:     03969d0b3a3f6a7cd2c731eed1c4ccf76da88586
Parent:     8cedb78fdf82468020a2f3b24ef63ccd397662a2
Refname:    refs/heads/master
Author:     Greentime Hu <greentime@andestech.com>
AuthorDate: Thu Apr 19 15:38:58 2018 +0800
Committer:  Greentime Hu <greentime@andestech.com>
CommitDate: Wed May 23 13:26:20 2018 +0800

    nds32: Fix xfs_buf built failed by export invalidate_kernel_vmap_range and \
flush_kernel_vmap_range  
    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>
    Acked-by: Arnd Bergmann <arnd@arndb.de>
---
 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;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic