Received: by 10.192.165.148 with SMTP id m20csp271967imm; Fri, 20 Apr 2018 06:35:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/MpMs4joHTy52qhLq6WP8sxKq/AsifvD8jokqZ6zH8PIkwgIZ9g158hv7uwCYwUeFI67tZ X-Received: by 2002:a17:902:d20b:: with SMTP id t11-v6mr10174737ply.381.1524231347854; Fri, 20 Apr 2018 06:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524231347; cv=none; d=google.com; s=arc-20160816; b=WGg6haeCowtG+MH2fVpABlJEgYEIg0WE05JZ3TePSOEy0gFJc06HAA2aD6+++uuW2l jIibm7Pp0NoW3SY8M5OiEGFn8rLr6zz4wT6VvCgG+OIlBuZE0/a1qkYOLntxdc57b6mI ifkYzETZ0NtmgIoqQUPPXFr7hAx3jkDLFD06o3R7PoPmgEebobb+XUFD89tKbYrUtY2y eq0F5Khu2aRdPOWnxHQfqVMhWFOo08DDhB2nrJi3VYa3FOUVKXsuJXffs9pJHvMajFk7 LETgYGbWoe4Vy+MfZgD3rhINPy2KAX+0qdb3x+zV9t9s/5l3EcGegb7aaEZaflS+bMhx vW9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:to:from:dkim-signature :arc-authentication-results; bh=iX4XjeeQNOGCsWccSxSPXb1ruIHDWqynMEzLszc3dtI=; b=QPiTMKgLP6bVl5OuBN3D/XOHcFhNJt04BLN++TQWvCAc3FMuHOZviIZJIpdlLk78vA us8hJKRU8GTvytk2d1UWSi5JkJkH9JL4mmMB+fqM5FiU3/uXo01xKH18gDxuR6sHhMgE l3wceJj/dj+2cK8j0N96rJTj/Dfg3kfHHmHQgw2vh4XoYsMAAKemlUU6M56x4M2Dsnpo DSVYHVaRXTSmrbBJxlus0nFXWftC8QWUCcj/T2co0JjWDMShgo+JhsUhdkSGuECrPLIF ++RlH/JAi62QSW1UGlw+pOVhutlB357G7HFYuW6SmYzX39496GqxfzYDK//7P6XKfWQd 6Z/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jkIxOpmj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 37-v6si5698415plq.288.2018.04.20.06.35.33; Fri, 20 Apr 2018 06:35:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jkIxOpmj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755066AbeDTNeS (ORCPT + 99 others); Fri, 20 Apr 2018 09:34:18 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:36934 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755187AbeDTNdL (ORCPT ); Fri, 20 Apr 2018 09:33:11 -0400 Received: by mail-pl0-f68.google.com with SMTP id f7-v6so5293352plr.4 for ; Fri, 20 Apr 2018 06:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:in-reply-to :references; bh=iX4XjeeQNOGCsWccSxSPXb1ruIHDWqynMEzLszc3dtI=; b=jkIxOpmjR2u6J2XjeNa5iP0tAnc8plcC4ANPIzPZbZIKcaX1QuMkRrpc1mbk3qCg6c TSORhu5J+zifzW0ngOF85qjBZZPIQNdaC46pPs+hSm8nQd7GG/INIg4d40Wa3PSzhe0g cvPLJmPHqLmwPZ84PBF161S53130e07uVDp/Ry3FgcGDCZz0sYBSLL/jU4bPRtcbrWBx Y0U5B5PsO8lwTHjU+2u73LK6NH7N9KBd/LZNBjqhJiCbHLffsh8+srVa+kmhvuo3LB3Z gXbSJ4SGCY4dNA32VZOAa5UMkBiYpaJ/M29n4sLfUwnIBT4TaO+DVgru49Vd6bfvg4Qb s7mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=iX4XjeeQNOGCsWccSxSPXb1ruIHDWqynMEzLszc3dtI=; b=f5o1Q/K94ZvlmTfyH9uj0qzqS3uOr5A9rCuzSqIblIOV+t8VTML7jNCqBZUnHK5MWh 2yFVLiwpsnORV9h3fSUlzLb6FHkY5j+eaS+yAOgMsfP7kk7OprBULZzX95eX9nhqCyGs IAVlsghhn6OwYuo7hIzhdNtc39WMvHoAEaVnLpUTTd7QvbdGnGArFiLjX9001yBFuqjS 7vGhTJOM4M3O6YOiLntKWlRNZ4hKdlsxyCWnI+UOkkTZp55LRX3LCw4yGpUX31TNTkWC blJhaZKKKMHf5emNpZZlPhYHgjk4Apkhyu0g7VBV9IkPj7hUdSeFWbuX96mM6LSO9S18 5Uhw== X-Gm-Message-State: ALQs6tBu+v5yK1rn9ColSKzhJMlNvrptemU5WbMsLY10kr7ztLOOOyAg uNTRF0T3+Szv/VaUNtloj6YQIQ== X-Received: by 2002:a17:902:7601:: with SMTP id k1-v6mr10169036pll.1.1524231190648; Fri, 20 Apr 2018 06:33:10 -0700 (PDT) Received: from app09.andestech.com ([118.163.51.199]) by smtp.gmail.com with ESMTPSA id g11sm9621319pgu.56.2018.04.20.06.33.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Apr 2018 06:33:09 -0700 (PDT) From: Greentime Hu X-Google-Original-From: Greentime Hu To: linux-kernel@vger.kernel.org, arnd@arndb.de, greentime@andestech.com, green.hu@gmail.com, private@roeck-us.net, hch@infradead.org, vincentc@andestech.com, nickhu@andestech.com Subject: [PATCH v2 5/9] nds32: Fix xfs_buf built failed by export invalidate_kernel_vmap_range and flush_kernel_vmap_range Date: Fri, 20 Apr 2018 21:31:11 +0800 Message-Id: <536bfa225eeb4d3ea9b1e866e900d657045a0b84.1524229039.git.greentime@andestech.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Arnd Bergmann --- 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