Received: by 10.192.165.148 with SMTP id m20csp270797imm; Fri, 20 Apr 2018 06:34:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/r1QeNuGFmUbwZpBnc/AYtjWoR/0RJForhLwq3uZMJxXTSIfHsSRdHfT0cx92OI/5yrfmm X-Received: by 10.98.18.212 with SMTP id 81mr797000pfs.243.1524231282695; Fri, 20 Apr 2018 06:34:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524231282; cv=none; d=google.com; s=arc-20160816; b=OvQxjJRIMSDTctQis2CfiNz6kLSDLdJsBJw7DCSzCfNKSg3nH/eF8BLpCGGzu3FwTG I8pPQeXVXHZBrgTDFCS/G4B0jc3Xx1qMcqELz3AGE2osNBce5lVjHYB2xJld8ZBXiP17 RlKJ8OCAjPNskWm7PRMYj8GFky5LpHb18PHC/rKhIUtmNx1yAAzfGjPQ9HyKGLHLp83i 0/tK5vskS9cx7MoX27gCnEUsiksCzvRBGhRPeh4wNGiB4KCmz4ZAK5q68Sr+3fgdimvf f7xLwKAgBaegyQIZ2Kmjc7zG/TlXTRvmxi1gQNbHWuhgEEQbU9fREkJqI68yCY5VmM6E LUig== 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=DVGmgR8IA6TmftvWbrxh27M7HPXo6o2WUcVYGQuGPAU=; b=PhP1Xe2BIj/ElaM1PHFcjqpnveDdUKN4zGPCXMAklEB9L3BErWCf6c7eCqSUyEo0IQ EevqGx5eg29Ju6pbSP/uIyXVKf24DNDiMlmRzfVyFjr3d1Ift6zgMNQaFhkIjsadBDDo Dw9MX3I9xsNbvyqjPjRVffNs1cbZ9jZYJNJxCCDHTW5TmSqYJpJTFhOChn6IJR6E08Pg p7K9jrPcIOyMD8xEXpucZZEVXSS8DStIDLG8YDH80xitfh/rYAGmKE7T2BttnjzKWvlV hdPaOoMH0IVIuoMWbue4o2IVXWqMFuDCPaLDABb8gXNpF9bB4CJuXqEXN+8mC5c7HQVs z83w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=r/4bKTFo; 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 q22si2503304pfi.282.2018.04.20.06.34.28; Fri, 20 Apr 2018 06:34:42 -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=r/4bKTFo; 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 S1755237AbeDTNdR (ORCPT + 99 others); Fri, 20 Apr 2018 09:33:17 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:33909 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754762AbeDTNdO (ORCPT ); Fri, 20 Apr 2018 09:33:14 -0400 Received: by mail-pl0-f65.google.com with SMTP id z12-v6so5290996plo.1 for ; Fri, 20 Apr 2018 06:33:13 -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=DVGmgR8IA6TmftvWbrxh27M7HPXo6o2WUcVYGQuGPAU=; b=r/4bKTFoE206OLI1d1+D7RyrJdhoYGQ4+oKZIh55DypitxRwJDcEH9YqTmP3iyX3Qp s8e9kqiacWY33GeLL8ADeNLdcPrjXifhbNxEtB3PkDggLua4ooLa179zuRWrX47k2u08 JvmF8GpFbCvRLuYpt5l+fP5Jyp8fSqQVThKN/UoCiDKGIlwRvr+93a+QC7ThRsoPhAao y4gjIFNvt38+Vf5QKNX6WqrmjnbEEZfHfRUGFRc5RBCGxuWjPnfApekTu3XwSlytm145 u9dV6odh1kqaLwbhMZUdGXphM40n2FtY3bIWMTK2ZpFH1hgHSdypriSmUFAEQPeQNYxg Y4hg== 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=DVGmgR8IA6TmftvWbrxh27M7HPXo6o2WUcVYGQuGPAU=; b=QrWKluHnbdZz+V+VYOZxXrmTSE4P5FXD6Bz6/ZzjEZjWUWG0wdt0oXXqzXpsatSTOM EuzasPxL8KOp61uudq9uA0rSO1bqt2zv4eBVHB73xZFiehfC5EaeM4i5tAebrKFjSXIp mNQPOrtkZ2b26bvIWxxXzxsFWKyo8VytyglL1BFNRfnJ39jZ09GyE+ccdJxVVXd10g01 6eSCvDNza045WgaDpk+l71gPLDlBld8MtTt9BxhqRVI0dTGAlBfD0DmCDjerYn+gDtCM 9UpotxJ1hG0yPEuzFvDy7xrTwkBk1K/IfPiUNuvBG75Hj+worWtiJGF4mlH6At8wRWBd go6A== X-Gm-Message-State: ALQs6tC/hoURhysdxMuQY08VqV8JiIIz3L8PMXBYNTcbpeNlaQ4DTUOy EzrnJMoG3s9J1WOgDhyTTPAKLA== X-Received: by 2002:a17:902:a506:: with SMTP id s6-v6mr10335707plq.191.1524231193095; Fri, 20 Apr 2018 06:33:13 -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.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Apr 2018 06:33:12 -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 6/9] nds32: Fix the symbols undefined issue by exporting them. Date: Fri, 20 Apr 2018 21:31:12 +0800 Message-Id: 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. 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 Acked-by: Arnd Bergmann --- arch/nds32/include/asm/Kbuild | 1 + arch/nds32/include/asm/page.h | 3 +++ arch/nds32/kernel/stacktrace.c | 2 ++ arch/nds32/lib/copy_page.S | 3 +++ arch/nds32/mm/cacheflush.c | 22 ++++++++++++++++++++++ arch/nds32/mm/init.c | 1 + 6 files changed, 32 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..8b231e910ea6 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_GPL(save_stack_trace); void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) { @@ -45,3 +46,4 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) fpn = (unsigned long *)fpp; } } +EXPORT_SYMBOL_GPL(save_stack_trace_tsk); 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