Received: by 10.192.165.156 with SMTP id m28csp711179imm; Thu, 19 Apr 2018 06:23:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/2wj9/2dq8Ev1fWxD+4vSk4vVEh4B6Owwj8cz+PMqqC7pqB2SWHuKjplC00mOsYCXp6gpx X-Received: by 10.99.181.30 with SMTP id y30mr3492329pge.279.1524144205553; Thu, 19 Apr 2018 06:23:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524144205; cv=none; d=google.com; s=arc-20160816; b=AJ01AfObPcilrSHd4HCThZWk21TYsIuoL9VdP6WzZ7uz0WcEYCEbpziXzrcaNltI2X Tql57DiFZlZALkRGGjWNhpFhSjBf+OcasCPmSzLBbF3tFwVptkBs7Gql5m5kCUUcIjMy +qtX/6aMEKeUGZyjmUyXSaVx5koxIMHaKW7dUCb5k18X5uFReM6EbfVuudLJfyIOVHwW ra7BkGO7i+ZdkszB3SrkKFc4t1YfVNhr4B6+cvkZTcHnuJa5PD/tEEWnfkISMQhfihaC RgH9o8CJzc2rid3AcGH+ecz4RKwYb0tC+QR0TmztqEnQL/rK+8UBMkrSsKLlWNX2P+bS oV+g== 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=p0vZ7wVdtmyTb8Lbgs3t1h9xPaKrSv57nJEiFGmDwTg=; b=wGeh94j0mut7cfxn+riqRT8eZQUhLYSz0RyL9xrb0Q5TdsVeTbYunRZGVsK0y8q5r7 gR1q6swCl+02LZ/XjTxTBVTaWWsyonF6iX7J3W8S33yTFvP3FOgZKh1W1r5RaJz3Vk39 7NFBvhX4QDZ3n0J+oCLj3dw+Gso43osf+SAhaBm9AiJ8V8axWNsIeC/QlKHZViAQUpFc fVQlAyzddr0ZeHnm5OaOXE7jRVnWxinw7o9HjV6+CA8PDtzDLw0632An+fmN/pQUDtTv JycnZIP8HlVJLgWXMz5HgEOtg2L+Ysqn3rRA45+PopREbMNQT0omr+BnkEOe79IY73Gf MksA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W/ZFpwJI; 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 o12si3079642pgc.381.2018.04.19.06.23.11; Thu, 19 Apr 2018 06:23:25 -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=W/ZFpwJI; 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 S1753087AbeDSNVD (ORCPT + 99 others); Thu, 19 Apr 2018 09:21:03 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:40116 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752743AbeDSNUL (ORCPT ); Thu, 19 Apr 2018 09:20:11 -0400 Received: by mail-pf0-f196.google.com with SMTP id y66so2632620pfi.7 for ; Thu, 19 Apr 2018 06:20: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=p0vZ7wVdtmyTb8Lbgs3t1h9xPaKrSv57nJEiFGmDwTg=; b=W/ZFpwJICLT+Iv5C2aRt3skEMxeSN6/dX+q98xzOg/xcg4EhRoqu6/0IhDQ2JszAVu lftmjIpxlShuWLNS1jbcXL6To190WJ4jIOex0xzIJIvOiQ9cx0SntIHuJEbV63/7Sjz0 mFOpde2Tj5PuzGlnoAxWcRJFZXgX647JaJxZ+W72DqfUjk4uD+aHI8JBYyYAxrjMsmjt 6JWQsr6Xq3uB+DIIe/2cUFIQeNojAjE5PXhq6slBdVYdDJ8goPPE7dmFMt24p5fkyPo2 cETkY/4+LPP5aASfudDwr4du9610v79M85iuZ70R6UfCZ7NZJ/ohW+GUKcctMZ/31FdO bCgg== 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=p0vZ7wVdtmyTb8Lbgs3t1h9xPaKrSv57nJEiFGmDwTg=; b=PcyhISifIiHK8ZMvAnYnQK5dgvktvUXj2vfQDA8uylaOvdGn25Lr/dsi6roH4zZihO pe1KCUulXTEbRrXTK4u0qlDDJrll6wTFO9ZI8mJOzJKoINeaFlz/saXaWwuglzRNyYfH JqmVYu81YLChcnBHR0Jybdeb+yTKgRsmLyzPOqHeGtuuXBqoPGc4hQcYwPlsW8KOCRUQ nxL4xHr8aGPjj0QK+Kh4RDIRHuorjLiW0ViwN/zhjs/wFukPRTE1IHrpDKbXuhEM9Cnb CQj4SJgpHH3Aq0uXK5zWiKOjbBpS7s+9KzWi5zWCFztseUi2w2dvq1sb7wtLHEzd59MD PqRw== X-Gm-Message-State: ALQs6tD+sXJ4Pi4c/KcN8dMRgXoqk3fUqMi4WCzyhmGQD8u6G17COrqQ K+KJI50jZhXdxNiCOlzwao/4OA== X-Received: by 10.99.143.22 with SMTP id n22mr4993120pgd.394.1524144011000; Thu, 19 Apr 2018 06:20:11 -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.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 06:20:10 -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 6/9] nds32: Fix the symbols undefined issue by exporting them. Date: Thu, 19 Apr 2018 21:18:12 +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. LD vmlinux SYSMAP System.map Building modules, stage 2. MODPOST 5028 modules ERROR: "flush_dcache_page" [net/sunrpc/xprtrdma/rpcrdma.ko] undefined! ERROR: "empty_zero_page" [net/ceph/libceph.ko] undefined! ERROR: "save_stack_trace" [kernel/backtracetest.ko] undefined! ERROR: "clear_page" [fs/ocfs2/dlm/ocfs2_dlm.ko] undefined! ERROR: "copy_page" [fs/nilfs2/nilfs2.ko] undefined! ... Signed-off-by: Greentime Hu --- arch/nds32/include/asm/Kbuild | 1 + arch/nds32/include/asm/page.h | 3 +++ arch/nds32/kernel/stacktrace.c | 1 + arch/nds32/lib/copy_page.S | 3 +++ arch/nds32/mm/cacheflush.c | 22 ++++++++++++++++++++++ arch/nds32/mm/init.c | 1 + 6 files changed, 31 insertions(+) diff --git a/arch/nds32/include/asm/Kbuild b/arch/nds32/include/asm/Kbuild index a64e87cc8b49..142e612aa639 100644 --- a/arch/nds32/include/asm/Kbuild +++ b/arch/nds32/include/asm/Kbuild @@ -16,6 +16,7 @@ generic-y += dma.h generic-y += emergency-restart.h generic-y += errno.h generic-y += exec.h +generic-y += export.h generic-y += fb.h generic-y += fcntl.h generic-y += ftrace.h diff --git a/arch/nds32/include/asm/page.h b/arch/nds32/include/asm/page.h index e27365c097b6..947f0491c9a7 100644 --- a/arch/nds32/include/asm/page.h +++ b/arch/nds32/include/asm/page.h @@ -27,6 +27,9 @@ extern void copy_user_highpage(struct page *to, struct page *from, unsigned long vaddr, struct vm_area_struct *vma); extern void clear_user_highpage(struct page *page, unsigned long vaddr); +void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, + struct page *to); +void clear_user_page(void *addr, unsigned long vaddr, struct page *page); #define __HAVE_ARCH_COPY_USER_HIGHPAGE #define clear_user_highpage clear_user_highpage #else diff --git a/arch/nds32/kernel/stacktrace.c b/arch/nds32/kernel/stacktrace.c index bc70113c0e84..168562eb3ad2 100644 --- a/arch/nds32/kernel/stacktrace.c +++ b/arch/nds32/kernel/stacktrace.c @@ -9,6 +9,7 @@ void save_stack_trace(struct stack_trace *trace) { save_stack_trace_tsk(current, trace); } +EXPORT_SYMBOL(save_stack_trace); void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) { diff --git a/arch/nds32/lib/copy_page.S b/arch/nds32/lib/copy_page.S index 4a2ff85f17ee..f8701ed161a8 100644 --- a/arch/nds32/lib/copy_page.S +++ b/arch/nds32/lib/copy_page.S @@ -2,6 +2,7 @@ // Copyright (C) 2005-2017 Andes Technology Corporation #include +#include #include .text @@ -16,6 +17,7 @@ ENTRY(copy_page) popm $r2, $r10 ret ENDPROC(copy_page) +EXPORT_SYMBOL(copy_page) ENTRY(clear_page) pushm $r1, $r9 @@ -35,3 +37,4 @@ ENTRY(clear_page) popm $r1, $r9 ret ENDPROC(clear_page) +EXPORT_SYMBOL(clear_page) diff --git a/arch/nds32/mm/cacheflush.c b/arch/nds32/mm/cacheflush.c index bd52918d5923..ee44ad96b6ed 100644 --- a/arch/nds32/mm/cacheflush.c +++ b/arch/nds32/mm/cacheflush.c @@ -147,6 +147,25 @@ void flush_cache_vunmap(unsigned long start, unsigned long end) cpu_icache_inval_all(); } +void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, + struct page *to) +{ + cpu_dcache_wbinval_page((unsigned long)vaddr); + cpu_icache_inval_page((unsigned long)vaddr); + copy_page(vto, vfrom); + cpu_dcache_wbinval_page((unsigned long)vto); + cpu_icache_inval_page((unsigned long)vto); +} + +void clear_user_page(void *addr, unsigned long vaddr, struct page *page) +{ + cpu_dcache_wbinval_page((unsigned long)vaddr); + cpu_icache_inval_page((unsigned long)vaddr); + clear_page(addr); + cpu_dcache_wbinval_page((unsigned long)addr); + cpu_icache_inval_page((unsigned long)addr); +} + void copy_user_highpage(struct page *to, struct page *from, unsigned long vaddr, struct vm_area_struct *vma) { @@ -213,6 +232,7 @@ void flush_dcache_page(struct page *page) local_irq_restore(flags); } } +EXPORT_SYMBOL(flush_dcache_page); void copy_to_user_page(struct vm_area_struct *vma, struct page *page, unsigned long vaddr, void *dst, void *src, int len) @@ -272,6 +292,7 @@ void flush_kernel_dcache_page(struct page *page) cpu_dcache_wbinval_page((unsigned long)page_address(page)); local_irq_restore(flags); } +EXPORT_SYMBOL(flush_kernel_dcache_page); void flush_kernel_vmap_range(void *addr, int size) { @@ -301,6 +322,7 @@ void flush_icache_range(unsigned long start, unsigned long end) cpu_cache_wbinval_range(start, end, 1); local_irq_restore(flags); } +EXPORT_SYMBOL(flush_icache_range); void flush_icache_page(struct vm_area_struct *vma, struct page *page) { diff --git a/arch/nds32/mm/init.c b/arch/nds32/mm/init.c index 93ee0160720b..c713d2ad55dc 100644 --- a/arch/nds32/mm/init.c +++ b/arch/nds32/mm/init.c @@ -30,6 +30,7 @@ * zero-initialized data and COW. */ struct page *empty_zero_page; +EXPORT_SYMBOL(empty_zero_page); static void __init zone_sizes_init(void) { -- 1.9.5