Received: by 10.192.165.156 with SMTP id m28csp710524imm; Thu, 19 Apr 2018 06:22:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+u9H2WCbEDv5THXnEadlqwXKRre7FEultXUiLV11Ai3xgThk4CjTP5Ys8vDVck/YL4IVMd X-Received: by 2002:a17:902:227:: with SMTP id 36-v6mr6206771plc.134.1524144160711; Thu, 19 Apr 2018 06:22:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524144160; cv=none; d=google.com; s=arc-20160816; b=n4zEAITdaed/BKFFOg6hMStSz4fQ+M5Pl5gHi+8dY1jZ0vxvV/GOIhxxBtvI1gyZX+ i08zVWOHy5lXIJDuF3nLgduNEk1L7DMQjwixo+V8T+6MNRg9ozN4Yi5cybm5Z2KVRwDM cJQyjK8uSKX6gjP93jxeIaz+r4npplYL9VrdJbruZcXAJpWu/Oa4dnq5NPFccBDYquNh cE9xPklGFCQT/ldIbFHbJ2J4ITm3TJUVuC16/zfCj7vS/qOnsCDiyi7eWVN5T3MUW6CJ RNCiMGPBVWmmzTwR4N4M5Nxxg1N0/COfnTfkxjJKPV3NUsvARu8v1p+lMZmmnqwW+FBH ZmnA== 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=5TvqWa7EqsNwALWZY4huuK6coB5bL/HCXifmaAp8ou8=; b=07S69QojT5B6n1JgqkI5Geh4mvFX2p7NfVtdbJTGzO0yjERrK5GR+aVM3eT8TNiL7Q NkYtfBNUogLVL2mzR3mLVOvE5Ir7eBfMoITnZ4FMhdpcFWPA/xB91x+FzPxz10jUQ1Dg nDW1s6ceWk00PIy6suW5oGScpET7b5M/Z+QEYPZMTk40yNxuypCM/y4GaA0tUBcQx/Mw Ipk41/lRsTiGZL0mlHcL15AKiFLa4G9cNS4feP9PtTvsYdeTfVB3QBBpothnxLkoSXom /n9tU7ut82q+VFeE3cviOUDrngNzLda/9njxkHP1jmdsfv6mTVO+D1DR7jeCwEWA3Wtk xIiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nur+dSCb; 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 i27si2466135pfa.219.2018.04.19.06.22.27; Thu, 19 Apr 2018 06:22:40 -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=nur+dSCb; 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 S1752812AbeDSNUN (ORCPT + 99 others); Thu, 19 Apr 2018 09:20:13 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:37010 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752644AbeDSNUJ (ORCPT ); Thu, 19 Apr 2018 09:20:09 -0400 Received: by mail-pg0-f66.google.com with SMTP id r14so2500181pgq.4 for ; Thu, 19 Apr 2018 06:20:09 -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=5TvqWa7EqsNwALWZY4huuK6coB5bL/HCXifmaAp8ou8=; b=nur+dSCbhAYL+u+ysapPrsyP1TI+M8bWKBT4EXshIjAP9mZjHyco9YxtdLisRI0xaj fG3ysT4RFn2+vQXhDOVAj5isLFgobHy4YR6wnbz3UE8t6LOnHqeABowOIt/3gsIawa5W i+qY739f8Kn7VL07zZO7eDeH4iWN0MxVVBZwof0uJkzdAPYp/4q5evirQFa+zpRab8qd BgwgasINSpVbVu9wkFoyNH3yOTRqlevZZUTLqZGKbp91BPH0EhdhBXEQmZBl3q/UDPnh m+t8XYY/TZmaADB9QT0bIaiHEZ0XZg1GruWG6y9P98cl4Zf/Ny5nO0EcaJS8EuOOTGK0 rQOA== 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=5TvqWa7EqsNwALWZY4huuK6coB5bL/HCXifmaAp8ou8=; b=eZgPNlfVeloBzQ48eQt4h+Xq+SSxHp44t3404S/7Q4DH8lEhLpbh86j5jNmDyaWZC5 LkpP8MSWmO0lY54zz3n14zgvoQ4hqeizgkRCV3yauXwtHyjjxIK3/ne4CyJwMFrF5qvl ANHjXFwKbhzmhKXS87ZD8UUV60jMY1Xt55Pxbd+1K3y6z/Rt+SjWIsL5lHq5A8yJFCzw RGJw+e1OA7WS9A2MuehyEu4smGKVBfoaxlhfkhNt77asqpf5NJhMdOq9JcZmh+HQ0aGs 5vH263kE0iT9xNksfqLHKvKHX0f39HMbGYCzyCqhdc4v4+6BFVAmlEnDyY2TKCugYUTg ZJow== X-Gm-Message-State: ALQs6tC9vBeTpzCtRuAto+QvB0GmLyZ7dlK4upocIpiaTh3SN7ydU45Q qwR84anniI6iplQlHaV059pPBQ== X-Received: by 10.101.77.199 with SMTP id q7mr5250343pgt.305.1524144009089; Thu, 19 Apr 2018 06:20:09 -0700 (PDT) Received: from app09.andestech.com ([118.163.51.199]) by smtp.gmail.com with ESMTPSA id e87sm7863891pfd.136.2018.04.19.06.20.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:20:08 -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 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 Message-Id: X-Mailer: git-send-email 2.16.2 In-Reply-To: <347705ade75b5901537034561fd67311b1260358.1524143428.git.greentime@andestech.com> References: <347705ade75b5901537034561fd67311b1260358.1524143428.git.greentime@andestech.com> In-Reply-To: <347705ade75b5901537034561fd67311b1260358.1524143428.git.greentime@andestech.com> References: <347705ade75b5901537034561fd67311b1260358.1524143428.git.greentime@andestech.com> 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 --- 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