From patchwork Thu Oct 24 22:58:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 11211037 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D5E614ED for ; Thu, 24 Oct 2019 22:58:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1A52421D7F for ; Thu, 24 Oct 2019 22:58:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Li9k8EWk"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="fZefwvEr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A52421D7F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=i4nKfNQPaOkwSBO4LeRMFwnbBtplaXl6si1mA8Af68E=; b=Li9k8EWkAX7OHK I+oKn1ZAk1dvGYvvR+Lx110dxgRoFG1dWbwcRIBlySKuoatAger1qq3osZUuAeUq5BkW3abpgDJac U1LtkrfvcG+DzrUglTDlTSAyWZ34IEeyR4IdlVrxcW/TVcT8NnugqSkivzAJ+6BPup9PgVDf31cf1 iiOhNw8LIGFASddcZGvmFEWeXt7kkIENT7XbFKNWypvYEdYmN8cFS4yK3z13bHaq+eY2PRyXn39Nl CpDa6FebRUv7wiilApT1haVAmGklfJzVcRKBszydKUQ1wMPG1bAam2vYGo/l8jdyVNoSpYFwicvTQ 0BFBYZaur2CQduXaGSVw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNm4E-0008UJ-3O; Thu, 24 Oct 2019 22:58:54 +0000 Received: from mail-il1-x143.google.com ([2607:f8b0:4864:20::143]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNm4B-0008SG-K7 for linux-riscv@lists.infradead.org; Thu, 24 Oct 2019 22:58:53 +0000 Received: by mail-il1-x143.google.com with SMTP id s75so167551ilc.3 for ; Thu, 24 Oct 2019 15:58:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rwH1mCGuvyxfVt9hlJQA+v8zyCDiYgn0w8nqDJAf9i4=; b=fZefwvErY4t9Jpfnf2hyDKW+Y0djwlbRtsBhJfB/dV0LPdg82nb+PRwxYjM37s+HE9 rWs5Ywno/n6CA7smnv7I9mkFG/UOpK6QxOEI4zA5agrtI/cGE13Vmlg3bjZf75p15S/B evq3/jmyvd3g4CxJeCT7m/zqvktqrmo/ZHJkmBvHSqODGX48zr8C7iotoetMkUEZBsRd a4oJxk8WBW9i3D38oRr1E0nGhnom8FEmPRvEPfaWm8g9fjNjv2U0ePOQE3MeNnmUW2DY OEg9I/MF3LYDZ9OFg32MTSHe8jZ+gm3btLnSJ13GxXOH3wRPkOaa08TmoEFlcP2mUvV2 Zk2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rwH1mCGuvyxfVt9hlJQA+v8zyCDiYgn0w8nqDJAf9i4=; b=ezC+vEyOQFyO5DjEGMbtjccLJVu2KOadCgUy0p/w4Vpb3WB/9wkN53xBOKZ1mYwUDw iu6vgwZEtrpopjh+NG3yLkE8lGgROrUNzZtrMgMI70HicpG8iaZmR24FAzA0/31ryW3W vyj9CwEPhpl20hZsjdb6kSCMnsYv95gvvPj0INGyqG+4QauOwXgVI2jDu5mauq071RP7 T2CuXQACZy4A3ul9gWbF4IFNCM+Exads7xWY3sb3djrYtDQdhEVNj/Szx0AhepkiAo1X eRg9HnHLjD3euM8BOFeREH8yUjUNMFBDNOBjRnPxcW3lK7aBOFy0j+dJUi2+Mcns7ppn oTGA== X-Gm-Message-State: APjAAAWXJNbsXKyeC7tXTsT+zRV/oM6HrrXPtSlRm3ckkHDNPuXrSNwo jaLzGAKVpX3uwOF/Q77SFJlviknlwb0= X-Google-Smtp-Source: APXvYqyX1pj9ooirtApU6iyZIfmqCYcc3hhVXfLXVP6OoNSUN4O0SXQCBbmkXFBvnMpXooATjcMy1Q== X-Received: by 2002:a92:79d2:: with SMTP id u201mr598873ilc.103.1571957930485; Thu, 24 Oct 2019 15:58:50 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id b18sm58112ilo.70.2019.10.24.15.58.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 15:58:50 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Subject: [PATCH v4 1/6] riscv: add prototypes for assembly language functions from head.S Date: Thu, 24 Oct 2019 15:58:33 -0700 Message-Id: <20191024225838.27743-2-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.24.0.rc0 In-Reply-To: <20191024225838.27743-1-paul.walmsley@sifive.com> References: <20191024225838.27743-1-paul.walmsley@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191024_155851_657522_3E19A525 X-CRM114-Status: GOOD ( 12.93 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:143 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hch@lst.dev, greentime.hu@sifive.com, linux-kernel@vger.kernel.org, luc.vanoostenryck@gmail.com Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org Add prototypes for assembly language functions defined in head.S, and include these prototypes into C source files that call those functions. This patch resolves the following warnings from sparse: arch/riscv/kernel/setup.c:39:10: warning: symbol 'hart_lottery' was not declared. Should it be static? arch/riscv/kernel/setup.c:42:13: warning: symbol 'parse_dtb' was not declared. Should it be static? arch/riscv/kernel/smpboot.c:33:6: warning: symbol '__cpu_up_stack_pointer' was not declared. Should it be static? arch/riscv/kernel/smpboot.c:34:6: warning: symbol '__cpu_up_task_pointer' was not declared. Should it be static? arch/riscv/mm/fault.c:25:17: warning: symbol 'do_page_fault' was not declared. Should it be static? This change should have no functional impact. Signed-off-by: Paul Walmsley --- arch/riscv/kernel/head.h | 21 +++++++++++++++++++++ arch/riscv/kernel/setup.c | 2 ++ arch/riscv/kernel/smpboot.c | 2 ++ arch/riscv/mm/fault.c | 2 ++ arch/riscv/mm/init.c | 2 ++ 5 files changed, 29 insertions(+) create mode 100644 arch/riscv/kernel/head.h diff --git a/arch/riscv/kernel/head.h b/arch/riscv/kernel/head.h new file mode 100644 index 000000000000..105fb0496b24 --- /dev/null +++ b/arch/riscv/kernel/head.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2019 SiFive, Inc. + */ +#ifndef __ASM_HEAD_H +#define __ASM_HEAD_H + +#include +#include + +extern atomic_t hart_lottery; + +asmlinkage void do_page_fault(struct pt_regs *regs); +asmlinkage void __init setup_vm(uintptr_t dtb_pa); + +extern void *__cpu_up_stack_pointer[]; +extern void *__cpu_up_task_pointer[]; + +void __init parse_dtb(void); + +#endif /* __ASM_HEAD_H */ diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c index a990a6cb184f..845ae0e12115 100644 --- a/arch/riscv/kernel/setup.c +++ b/arch/riscv/kernel/setup.c @@ -24,6 +24,8 @@ #include #include +#include "head.h" + #ifdef CONFIG_DUMMY_CONSOLE struct screen_info screen_info = { .orig_video_lines = 30, diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index 18ae6da5115e..59fa59e013d4 100644 --- a/arch/riscv/kernel/smpboot.c +++ b/arch/riscv/kernel/smpboot.c @@ -30,6 +30,8 @@ #include #include +#include "head.h" + void *__cpu_up_stack_pointer[NR_CPUS]; void *__cpu_up_task_pointer[NR_CPUS]; static DECLARE_COMPLETION(cpu_running); diff --git a/arch/riscv/mm/fault.c b/arch/riscv/mm/fault.c index 96add1427a75..247b8c859c44 100644 --- a/arch/riscv/mm/fault.c +++ b/arch/riscv/mm/fault.c @@ -18,6 +18,8 @@ #include #include +#include "../kernel/head.h" + /* * This routine handles page faults. It determines the address and the * problem, and then passes it off to one of the appropriate routines. diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index a1ca6200c31f..07af7b1e4069 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -19,6 +19,8 @@ #include #include +#include "../kernel/head.h" + unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)] __page_aligned_bss; EXPORT_SYMBOL(empty_zero_page); From patchwork Thu Oct 24 22:58:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 11211039 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D6E1614ED for ; Thu, 24 Oct 2019 22:58:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A3EB021928 for ; Thu, 24 Oct 2019 22:58:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="m56AX6Nn"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="b3/XSJ+O" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A3EB021928 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uUa/fa2HzsuJN6TEbjgFeKiNG/JpvnBX+5lWSJ3z5Ro=; b=m56AX6Nndm8I7p khFM/pxoyXRLZmijOBxgeN9EJctHXVjxCE/Nt9QbiQzUvuderLMrPc+Aw3J+WdjP83CfQ95gsSWH/ cWGLRGwp+Qdjq5q/WzSfjXtn3pD4O9STd6rIW60eHSkn3ypZePUBXqVJaR02BiJdWgmOshLwnRu7d Yagr318prWZBrYrgv/U/zuokaMvn/YGKdloHZhzeG818Niz+Q8pD3/71loChl/kPf5Q/AMezvpkYc lWI+txYaKrfpMmHHE9vxhaBb4UORCyl0usJNPK9jdH3xDVVyUVfKIw2Y72AWIzmQWMVSq8Prp56nX 9/tELALfB17CPgT21xiA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNm4H-00007J-I6; Thu, 24 Oct 2019 22:58:57 +0000 Received: from mail-io1-xd43.google.com ([2607:f8b0:4864:20::d43]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNm4E-0008U2-AI for linux-riscv@lists.infradead.org; Thu, 24 Oct 2019 22:58:56 +0000 Received: by mail-io1-xd43.google.com with SMTP id w12so182626iol.11 for ; Thu, 24 Oct 2019 15:58:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zeQmt6u0IaAwxJA3Xr74ItciPuMbvDn1BaL/hvbUKXg=; b=b3/XSJ+O5O2Gq9FzuNn0Uu/akEHr9eQLEYece+tdjHUli0bi76e6mlu+ecEXZFxiAp Ljc0byqB0MIV/CHTl9B2bAoogNrlyv2uDqSL0iZo0tmNiB5NVzbVzYpyvUIptUanpWlc z1q1gdmzwiadf0IqBYOkY9mgq1ei4hrlGza2QhKB4ND1IJVbO5jku2EL1Up8rgjGxcg+ 8foDFH3Q4l2Zhp0C2CcIxj3XuApoxpJtHgcZNet0LrTPt+Km0qS1edVy81+DMeUEfJrL +Fpok6BHiKFbB7czCXWxGcVrYI+4rXcyY83WEIM2h6jAdYBrJILWmr4qJZHPovdQUJad WFfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zeQmt6u0IaAwxJA3Xr74ItciPuMbvDn1BaL/hvbUKXg=; b=rymXPeWDj0Ptk78UskXXqAtOMn0P/PDEiTwDE0NGI+UHwZ8vmQxRq9EGezXUVZ2mgW SJxyTxp/a+OmX9YOOxZN7/bv+fCl4xNE2XyWpMKjIEUFOAY23LB99tD1vsDvHD9/e8K4 dloMMLd7MQ2elNyxXz9PFm/xrwrQDhTRy2i8AwK1c/ReVRbeJoPFhSoN922JtsR50yDp h4TrjA7pF6Mab931hFWf7n1mJ/NVpIbaRIch1EPNX88vHrhjBsDtS5zZPBU+I8sbf7kx qe9yZxA37IxtJwJi5hVU+OKjcmYdAAKafs/UuJ+DKXU8dIzTABrFkrou17jXzvXWKBn8 8iMA== X-Gm-Message-State: APjAAAXY3IvPRLuaVhCgaKApCJPAAWH/OY9THMSvqePuFT9Rb1ug/tsi XNA6sWa4c5mNQjj2Hs87n2zWYr1zCD8= X-Google-Smtp-Source: APXvYqyFQvQ7ooZCu9FvinAHLoiUHRgF4BxNJh1ys5uNZfuLn4uFT7NwtQG/gV4UiS3gGJsl5Rb5ZQ== X-Received: by 2002:a5e:9e07:: with SMTP id i7mr649587ioq.42.1571957932920; Thu, 24 Oct 2019 15:58:52 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id b18sm58112ilo.70.2019.10.24.15.58.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 15:58:52 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Subject: [PATCH v4 2/6] riscv: init: merge split string literals in preprocessor directive Date: Thu, 24 Oct 2019 15:58:34 -0700 Message-Id: <20191024225838.27743-3-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.24.0.rc0 In-Reply-To: <20191024225838.27743-1-paul.walmsley@sifive.com> References: <20191024225838.27743-1-paul.walmsley@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191024_155854_363627_FDA1B4E3 X-CRM114-Status: GOOD ( 11.19 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:d43 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anup Patel , linux-kernel@vger.kernel.org, hch@lst.dev, greentime.hu@sifive.com, Christoph Hellwig , luc.vanoostenryck@gmail.com Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org sparse complains loudly when string literals associated with preprocessor directives are split into multiple, separately quoted strings across different lines: arch/riscv/mm/init.c:341:9: error: Expected ; at the end of type declaration arch/riscv/mm/init.c:341:9: error: got "not use absolute addressing." arch/riscv/mm/init.c:358:9: error: Trying to use reserved word 'do' as identifier arch/riscv/mm/init.c:358:9: error: Expected ; at end of declaration [ ... ] It turns out this doesn't compile. The existing Linux practice for this situation is simply to use a single long line. So, fix by concatenating the strings. This patch should have no functional impact. This version incorporates changes based on feedback from Luc Van Oostenryck . Signed-off-by: Paul Walmsley Reviewed-by: Luc Van Oostenryck Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/linux-riscv/CAAhSdy2nX2LwEEAZuMtW_ByGTkHO6KaUEvVxRnba_ENEjmFayQ@mail.gmail.com/T/#mc1a58bc864f71278123d19a7abc083a9c8e37033 Fixes: 387181dcdb6c1 ("RISC-V: Always compile mm/init.c with cmodel=medany and notrace") Cc: Anup Patel --- arch/riscv/mm/init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 07af7b1e4069..573463d1c799 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -339,8 +339,7 @@ static uintptr_t __init best_map_size(phys_addr_t base, phys_addr_t size) */ #ifndef __riscv_cmodel_medany -#error "setup_vm() is called from head.S before relocate so it should " - "not use absolute addressing." +#error "setup_vm() is called from head.S before relocate so it should not use absolute addressing." #endif asmlinkage void __init setup_vm(uintptr_t dtb_pa) From patchwork Thu Oct 24 22:58:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 11211041 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2985613B1 for ; Thu, 24 Oct 2019 22:59:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0622221928 for ; Thu, 24 Oct 2019 22:59:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="o+wQmSrJ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="ajFk24nn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0622221928 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eTZtWOR+FzktXq/yrQXi1+IAJvNHfbMbmaTR8N4p2AQ=; b=o+wQmSrJiriVZc O54SJZM01N+/syXSEC08tzukJfiAyoZQMNyl+nsnsIpKW594JrQYInVZogUf7USYJRqCAKgZWD0pk FH/aey/F6i6DTbDc7lwBjc4V9pVUSkpBb97qVqcMoxyXNq+wfskvYQX199X158nqMZeL9XKqgF9In nt7JnKw2HE9Qr0y8WSW2Gwz2/s5Xfw1U3w92OEYsB8zU++d+X70rGX1OnZDd51SPNHPfLzYHhlS9h ox+Uj7kM/B9Sj9LiI61yppCYSgi8PSrC4ve3cmBRuqSIBOQ4ux83rnZqZiPY/PH0206pyUoALhUBV 7TtG2ATKG7B4GEgJqAZQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNm4J-0000Ac-Pa; Thu, 24 Oct 2019 22:58:59 +0000 Received: from mail-io1-xd44.google.com ([2607:f8b0:4864:20::d44]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNm4F-0008WL-Oh for linux-riscv@lists.infradead.org; Thu, 24 Oct 2019 22:58:57 +0000 Received: by mail-io1-xd44.google.com with SMTP id r144so201504iod.8 for ; Thu, 24 Oct 2019 15:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hIAFt5NPNEcTJjheJJ7IFoP1QwOV2b47sLZxfo5ML0c=; b=ajFk24nn7MaVF1UXN3SYe+082t8H3p1T+unPsMnYo5MLGiysAPhdHHBqSNcAs9Dj7g M74uQnxp9Al/Ibh40zpDUgicdCCRj9a14WULDZzfwbbuBlhLHpalRhh86On02pJR1Lno 5laMI1GF6hgzE0EjAI5jdvSZPUvCIkt/U3/7CM6WgfCyE2PDQahhk4VyD31Bakaa/xiJ z1KQ8VW73KY/7dvy6e166XjtiJvw0kaclFDfIhovqEoceOBWZjMTm5bVYD4i6NY0UTFL IcHxyadIJOonendiqIAZd+vdeOwJNGA1jGCKzQFPCnFlel4TVKykHJTZxRFWJABXMup1 884A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hIAFt5NPNEcTJjheJJ7IFoP1QwOV2b47sLZxfo5ML0c=; b=B8XjHqYWHKzTwlHPqJOYq/YPSBt5ouVngjVOH4rrcMv9LWc+z8vrufnQ/Th0pyOPD9 LH0ZoPGAv2L8Dy3MOyH1hfzUQba1GJIedssNOgcwZNGX/yLq4rBLLTeUWRXCK2jK+5kp Hzl6eFVnSJWGxKzkaRonqW5XV/65VwMoPRtWfQ4XjiTybKmhGr+4aGjkn5yTbecrZGwI Xo/MPHcGCYJCUx0M6nShrfVF8Vr0rmFMYd4jT52K9HZ34u32wKw9O36pLtf5xZCZ1zgy bThBFkT7KW7jEv8WUQKeUyLD2LyPHhOE42FyECL+Him3KjaG7BFx+rH2LISYF71+RfVs B1eQ== X-Gm-Message-State: APjAAAWBre9U2nNJKv5CPP6TAJ3CtoPXBdA/nMXeBTVj7JkV5eBj75p9 ClrOVmw/JSnHnVklZNjS1Mt5L6pepvc= X-Google-Smtp-Source: APXvYqxgOjI7iUMDkwHlJSHTab/FO1wxtN8dxivhZMVQwZy1W9sGjYGqLFcYhLtt3n3B+f8RWCC0bA== X-Received: by 2002:a02:950b:: with SMTP id y11mr808962jah.100.1571957934933; Thu, 24 Oct 2019 15:58:54 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id b18sm58112ilo.70.2019.10.24.15.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 15:58:54 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Subject: [PATCH v4 3/6] riscv: mark some code and data as file-static Date: Thu, 24 Oct 2019 15:58:35 -0700 Message-Id: <20191024225838.27743-4-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.24.0.rc0 In-Reply-To: <20191024225838.27743-1-paul.walmsley@sifive.com> References: <20191024225838.27743-1-paul.walmsley@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191024_155855_830098_3AB0E868 X-CRM114-Status: GOOD ( 11.77 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:d44 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hch@lst.dev, greentime.hu@sifive.com, linux-kernel@vger.kernel.org, luc.vanoostenryck@gmail.com, Christoph Hellwig Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org Several functions and arrays which are only used in the files in which they are declared are missing "static" qualifiers. Warnings for these symbols are reported by sparse: arch/riscv/kernel/vdso.c:28:18: warning: symbol 'vdso_data' was not declared. Should it be static? arch/riscv/mm/sifive_l2_cache.c:145:12: warning: symbol 'sifive_l2_init' was not declared. Should it be static? Resolve these warnings by marking them as static. This version incorporates feedback from Greentime Hu . Signed-off-by: Paul Walmsley Reviewed-by: Christoph Hellwig Cc: Greentime Hu --- arch/riscv/kernel/vdso.c | 2 +- arch/riscv/mm/sifive_l2_cache.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv/kernel/vdso.c index c9c21e0d5641..e24fccab8185 100644 --- a/arch/riscv/kernel/vdso.c +++ b/arch/riscv/kernel/vdso.c @@ -25,7 +25,7 @@ static union { struct vdso_data data; u8 page[PAGE_SIZE]; } vdso_data_store __page_aligned_data; -struct vdso_data *vdso_data = &vdso_data_store.data; +static struct vdso_data *vdso_data = &vdso_data_store.data; static int __init vdso_init(void) { diff --git a/arch/riscv/mm/sifive_l2_cache.c b/arch/riscv/mm/sifive_l2_cache.c index 2e637ad71c05..a9ffff3277c7 100644 --- a/arch/riscv/mm/sifive_l2_cache.c +++ b/arch/riscv/mm/sifive_l2_cache.c @@ -142,7 +142,7 @@ static irqreturn_t l2_int_handler(int irq, void *device) return IRQ_HANDLED; } -int __init sifive_l2_init(void) +static int __init sifive_l2_init(void) { struct device_node *np; struct resource res; From patchwork Thu Oct 24 22:58:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 11211043 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E228014ED for ; Thu, 24 Oct 2019 22:59:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BDD8721BE5 for ; Thu, 24 Oct 2019 22:59:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="L2zoQpqN"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="LgeCmyzq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDD8721BE5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DI4PQz7LjGL0eugHtaqswlRcmR4NEu1ILr/NDrW3Bwo=; b=L2zoQpqN3X+mCm EMF7dwgfVJ/ejGwCdCLRzMTmdGsA9FPdt3mtW+DGrTaJYpVNZnShMk6DS5f5ldWsfsL201OtSNfbv h+iFfkYhX8uairLY1Ef1fGgjryswrJPZmt2lvU+lfSkEA6re8p5n5uANJ0ycSjTWgI7YPq7am/Tbp Abvi3SJZvD4GxDwZFALeMcS3s0xnWmFaw68hgdXeVzZUgby/e1h7qBMdDHiYCR3Kam9m7mom/UK5H Siu3Kx8HowX8ZDPgEF7kRiZoZN0BeRYhW7m9fgAk/u7FXu3LLQNh2pMr0YmDrV1hJfXH9hJU9ebZH y5HglHhhDHHeFTP2uZkg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNm4N-0000F0-4I; Thu, 24 Oct 2019 22:59:03 +0000 Received: from mail-io1-xd42.google.com ([2607:f8b0:4864:20::d42]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNm4I-00007P-9n for linux-riscv@lists.infradead.org; Thu, 24 Oct 2019 22:59:00 +0000 Received: by mail-io1-xd42.google.com with SMTP id c11so189641iom.10 for ; Thu, 24 Oct 2019 15:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eZGI60drGLEmEdUk33cvNefM4FOv+8ekneB/xoyZ64U=; b=LgeCmyzq23k8BWVjg2WviMFw8asiFBOvnZg7deJhibXBj1HLTBlXz2vtpnQ6nuIYvO XXFnlxRKjcHWQYLFLJ+PGlibLnPi0qPFQNOVjpAyB0F8gpz94/hhIxkGiWm4o5dWHQQl yISQyG07EPAmoCquUbFwPbvGFTVGQ8qMKj4ySY3TV57lmIwbPq0Gt/WyYmSyKm1fZ2dw hZ7UPF4bB4ilAvTlLhFkqZvI215lMskH8EDR1PBt7SXnJytJcImFTwn2usKcGyDl0/Za pg7eitZrlVfgwryr4t/I0S5U+AIqcX1Bduxn7xAQhroR7MsiV4wFRIRI9aK5aO0d6Rtt yAAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eZGI60drGLEmEdUk33cvNefM4FOv+8ekneB/xoyZ64U=; b=bjMiwBKx83Pyk81AwWPg10syN63BcYVAyetWPhDMFXlgfTvXJ7K/vBrPY8YrTbomtC jXJsz5bZFsoAxxF/qXC/YOZmWfslSJ8AMC201MtzADHh1LSxA94XBD0QUIZ6w6bWCpZW M8BhYzVAq7b8jrum5qkQluuwX0ra5xkmMKus1MPiP1S55P25csEE3ZwmcDwzxI/DRdBx TITPH64ttOkNa2NQWr3AvvyknYTmzJ515skjOGwiRtBsOiReVvZ6eq1X3LtQgJdlz6GX H/ejTdjCMXOxTSwnGha+aHxO0fdnOBuphS9TzW55JaepvhqdGvGHdJXFTfgKZBzNnETd xOhQ== X-Gm-Message-State: APjAAAUdcCNlIgbR7O4+7QMbb2T9bPZPGwjJteUDkUFm+JRjySNT8h0x OmWmtadzYUgCHxzHrRLnVgfNlls7Gng= X-Google-Smtp-Source: APXvYqy5a3tMIoeboC3+CjPmvSWpA4ri/LdZPhn89cOMCvNtxEs3nSMucfncykRCBi1B9Sfu9WS8dA== X-Received: by 2002:a6b:7942:: with SMTP id j2mr591492iop.161.1571957937016; Thu, 24 Oct 2019 15:58:57 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id b18sm58112ilo.70.2019.10.24.15.58.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 15:58:56 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Subject: [PATCH v4 4/6] riscv: add missing header file includes Date: Thu, 24 Oct 2019 15:58:36 -0700 Message-Id: <20191024225838.27743-5-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.24.0.rc0 In-Reply-To: <20191024225838.27743-1-paul.walmsley@sifive.com> References: <20191024225838.27743-1-paul.walmsley@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191024_155858_362302_71A42FFF X-CRM114-Status: GOOD ( 10.41 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:d42 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hch@lst.dev, greentime.hu@sifive.com, linux-kernel@vger.kernel.org, luc.vanoostenryck@gmail.com, Christoph Hellwig Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org sparse identifies several missing prototypes caused by missing preprocessor include directives: arch/riscv/kernel/cpufeature.c:16:6: warning: symbol 'has_fpu' was not declared. Should it be static? arch/riscv/kernel/process.c:26:6: warning: symbol 'arch_cpu_idle' was not declared. Should it be static? arch/riscv/kernel/reset.c:15:6: warning: symbol 'pm_power_off' was not declared. Should it be static? arch/riscv/kernel/syscall_table.c:15:6: warning: symbol 'sys_call_table' was not declared. Should it be static? arch/riscv/kernel/traps.c:149:13: warning: symbol 'trap_init' was not declared. Should it be static? arch/riscv/kernel/vdso.c:54:5: warning: symbol 'arch_setup_additional_pages' was not declared. Should it be static? arch/riscv/kernel/smp.c:64:6: warning: symbol 'arch_match_cpu_phys_id' was not declared. Should it be static? arch/riscv/kernel/module-sections.c:89:5: warning: symbol 'module_frob_arch_sections' was not declared. Should it be static? arch/riscv/mm/context.c:42:6: warning: symbol 'switch_mm' was not declared. Should it be static? Fix by including the appropriate header files in the appropriate source files. This patch should have no functional impact. Signed-off-by: Paul Walmsley Reviewed-by: Christoph Hellwig --- arch/riscv/include/asm/irq.h | 3 +++ arch/riscv/include/asm/switch_to.h | 1 + arch/riscv/kernel/cpufeature.c | 1 + arch/riscv/kernel/module-sections.c | 1 + arch/riscv/kernel/process.c | 2 ++ arch/riscv/kernel/reset.c | 1 + arch/riscv/kernel/smp.c | 2 ++ arch/riscv/kernel/smpboot.c | 1 + arch/riscv/kernel/syscall_table.c | 1 + arch/riscv/kernel/time.c | 1 + arch/riscv/kernel/traps.c | 1 + arch/riscv/kernel/vdso.c | 1 + arch/riscv/mm/context.c | 1 + 13 files changed, 17 insertions(+) diff --git a/arch/riscv/include/asm/irq.h b/arch/riscv/include/asm/irq.h index 75576424c0f7..6e1b0e0325eb 100644 --- a/arch/riscv/include/asm/irq.h +++ b/arch/riscv/include/asm/irq.h @@ -7,6 +7,9 @@ #ifndef _ASM_RISCV_IRQ_H #define _ASM_RISCV_IRQ_H +#include +#include + #define NR_IRQS 0 void riscv_timer_interrupt(void); diff --git a/arch/riscv/include/asm/switch_to.h b/arch/riscv/include/asm/switch_to.h index f0227bdce0f0..ee4f0ac62c9d 100644 --- a/arch/riscv/include/asm/switch_to.h +++ b/arch/riscv/include/asm/switch_to.h @@ -6,6 +6,7 @@ #ifndef _ASM_RISCV_SWITCH_TO_H #define _ASM_RISCV_SWITCH_TO_H +#include #include #include #include diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index b1ade9a49347..a5ad00043104 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -10,6 +10,7 @@ #include #include #include +#include unsigned long elf_hwcap __read_mostly; #ifdef CONFIG_FPU diff --git a/arch/riscv/kernel/module-sections.c b/arch/riscv/kernel/module-sections.c index c9ae48333114..e264e59e596e 100644 --- a/arch/riscv/kernel/module-sections.c +++ b/arch/riscv/kernel/module-sections.c @@ -8,6 +8,7 @@ #include #include #include +#include unsigned long module_emit_got_entry(struct module *mod, unsigned long val) { diff --git a/arch/riscv/kernel/process.c b/arch/riscv/kernel/process.c index fb3a082362eb..85e3c39bb60b 100644 --- a/arch/riscv/kernel/process.c +++ b/arch/riscv/kernel/process.c @@ -7,6 +7,7 @@ * Copyright (C) 2017 SiFive */ +#include #include #include #include @@ -19,6 +20,7 @@ #include #include #include +#include extern asmlinkage void ret_from_fork(void); extern asmlinkage void ret_from_kernel_thread(void); diff --git a/arch/riscv/kernel/reset.c b/arch/riscv/kernel/reset.c index d0fe623bfb8f..aa56bb135ec4 100644 --- a/arch/riscv/kernel/reset.c +++ b/arch/riscv/kernel/reset.c @@ -4,6 +4,7 @@ */ #include +#include #include static void default_power_off(void) diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c index b18cd6c8e8fb..5c9ec78422c2 100644 --- a/arch/riscv/kernel/smp.c +++ b/arch/riscv/kernel/smp.c @@ -8,7 +8,9 @@ * Copyright (C) 2017 SiFive */ +#include #include +#include #include #include #include diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index 59fa59e013d4..ec0be2f6a2e8 100644 --- a/arch/riscv/kernel/smpboot.c +++ b/arch/riscv/kernel/smpboot.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "head.h" diff --git a/arch/riscv/kernel/syscall_table.c b/arch/riscv/kernel/syscall_table.c index e5dd52d8f633..f1ead9df96ca 100644 --- a/arch/riscv/kernel/syscall_table.c +++ b/arch/riscv/kernel/syscall_table.c @@ -8,6 +8,7 @@ #include #include #include +#include #undef __SYSCALL #define __SYSCALL(nr, call) [nr] = (call), diff --git a/arch/riscv/kernel/time.c b/arch/riscv/kernel/time.c index 9dd1f2e64db1..6a53c02e9c73 100644 --- a/arch/riscv/kernel/time.c +++ b/arch/riscv/kernel/time.c @@ -7,6 +7,7 @@ #include #include #include +#include unsigned long riscv_timebase; EXPORT_SYMBOL_GPL(riscv_timebase); diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c index 10a17e545f43..0b6e271efc43 100644 --- a/arch/riscv/kernel/traps.c +++ b/arch/riscv/kernel/traps.c @@ -3,6 +3,7 @@ * Copyright (C) 2012 Regents of the University of California */ +#include #include #include #include diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv/kernel/vdso.c index e24fccab8185..484d95a70907 100644 --- a/arch/riscv/kernel/vdso.c +++ b/arch/riscv/kernel/vdso.c @@ -6,6 +6,7 @@ * Copyright (C) 2015 Regents of the University of California */ +#include #include #include #include diff --git a/arch/riscv/mm/context.c b/arch/riscv/mm/context.c index beeb5d7f92ea..ca66d44156b6 100644 --- a/arch/riscv/mm/context.c +++ b/arch/riscv/mm/context.c @@ -7,6 +7,7 @@ #include #include #include +#include /* * When necessary, performs a deferred icache flush for the given MM context, From patchwork Thu Oct 24 22:58:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 11211045 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2345D14ED for ; Thu, 24 Oct 2019 22:59:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F066521928 for ; Thu, 24 Oct 2019 22:59:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CoSDiMDR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="AwQ/GBlV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F066521928 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qwFfCiluGC5EHoPd6BiP1cmXu+xyBMNDgYijOKsrlPI=; b=CoSDiMDRVHlVcT /hPAIeto3c84VRYHNajDApYKvN+c/f8WKXB7suCFdvUAii5aNqR/xychgrJo7uZ1CnzvC0Uwfvo/f 3ZwZWkowlTJNlvPLZfs1iBKuKP8xsMJ/P68ZIT8BIrfa5KP3GPMpr49thPAqQ4Bmoj8qJ6lidDnES YMKAUuRqugzjZyjPULk2kNqLk1EcRfJ3IHFSernXL07xf531wAtrlEzr4SBPPN+m0rNgFmj2hQVmq WTrgt+ml0JHOc4WbpbdndFisSm+nR5x5WR8/GMvwfnLjh4CXWVXWh2XiCY3wJSB/0CPlDvt9Gg904 yKfhhwX6gwcInIC0us9w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNm4Q-0000Ir-Ga; Thu, 24 Oct 2019 22:59:06 +0000 Received: from mail-il1-x144.google.com ([2607:f8b0:4864:20::144]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNm4K-0000BH-P6 for linux-riscv@lists.infradead.org; Thu, 24 Oct 2019 22:59:02 +0000 Received: by mail-il1-x144.google.com with SMTP id i12so155935ils.6 for ; Thu, 24 Oct 2019 15:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J5KV2n29ZA7BXjN3Y21njjBxjV2pNglFMNBgoB7YcYc=; b=AwQ/GBlVPgcIlLC4Sz/TLy68Iu5WlrEziKexLo20EOOhnOJCLLC7tK4d9senB7m7Yx F31VlYhaKSRm2QeYIefbveHAgiZa9TrM+k2RltL5z/xyL+5UX+yISBZBRL//ng104mXv A6R2+QiwlBQjOWYXI5eaeoAvNhtkY4L88va7tSPfPh8J/M7zOo02GvWCE4YigmSylWpI 8qs3so4altTKneB1SGpHUUP7n8QMWNYB3ZXZQ/0aD78eLG6Rvar9OiGpul2o6DQzi+pi Lr4ll73jrjmh6lyLkOvhUbzLyUx4iqxXF3U3RvPuIIrKReqWIQ3TriyvXIxE9EGZ7yeu j8OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J5KV2n29ZA7BXjN3Y21njjBxjV2pNglFMNBgoB7YcYc=; b=o8jYLwTWd2TMSZocxqKmZ1KuUxa61BkqVcJWehFva2KEe1dR9r7A1hTnb8FYg8ia9s 2AXk26zqWAivjj5gF36k2Z8CsA/Xz9WQxb57m1gGNE1/Kaf9b5N6vDVoW3kcHJggY0ZS iIQoY3dzaZZeLhgO77tAYVj7Yzmh+ZccEQCVcf6ChkH6hXrIvXZoWufPYFd0jv7gCi3L VOIi8URdxPAs7iza2jIsqKzwa7rEFIJF8BTWaYPRq2kCZ6w9E2PBmS7soPAEtG/PMF1Z qeyAc/6MCse5XWgiSaf8uVww9Gvx7RX0JODIyhGjTtSKRjev4s9OGyttcdr8Z0sp337c pjAg== X-Gm-Message-State: APjAAAVsB2fwSkeKd0p9PfIfLuWLPm+AMMeSKiCuey4ns1cEUeNzhLgB QrhhwlsQl7tlvNlmPuvpLN6ExRsZhZI= X-Google-Smtp-Source: APXvYqyuaLpurKP3sYFT1l56Mh0m3g+O8f4mbnU9sC69yPy8H58pn6tcUvY8iUsSnGMwiU617okvKQ== X-Received: by 2002:a92:d601:: with SMTP id w1mr522719ilm.281.1571957939415; Thu, 24 Oct 2019 15:58:59 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id b18sm58112ilo.70.2019.10.24.15.58.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 15:58:59 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Subject: [PATCH v4 5/6] riscv: fp: add missing __user pointer annotations Date: Thu, 24 Oct 2019 15:58:37 -0700 Message-Id: <20191024225838.27743-6-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.24.0.rc0 In-Reply-To: <20191024225838.27743-1-paul.walmsley@sifive.com> References: <20191024225838.27743-1-paul.walmsley@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191024_155900_831702_976DD9CE X-CRM114-Status: GOOD ( 10.07 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:144 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alan Kao , linux-kernel@vger.kernel.org, hch@lst.dev, greentime.hu@sifive.com, Christoph Hellwig , luc.vanoostenryck@gmail.com Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org The __user annotations were removed from the {save,restore}_fp_state() function signatures by commit 007f5c358957 ("Refactor FPU code in signal setup/return procedures"), but should be present, and sparse warns when they are not applied. Add them back in. This change should have no functional impact. Signed-off-by: Paul Walmsley Fixes: 007f5c358957 ("Refactor FPU code in signal setup/return procedures") Cc: Alan Kao Reviewed-by: Christoph Hellwig --- arch/riscv/kernel/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/kernel/signal.c b/arch/riscv/kernel/signal.c index b14d7647d800..64bc914ce9ff 100644 --- a/arch/riscv/kernel/signal.c +++ b/arch/riscv/kernel/signal.c @@ -26,7 +26,7 @@ struct rt_sigframe { #ifdef CONFIG_FPU static long restore_fp_state(struct pt_regs *regs, - union __riscv_fp_state *sc_fpregs) + union __riscv_fp_state __user *sc_fpregs) { long err; struct __riscv_d_ext_state __user *state = &sc_fpregs->d; @@ -53,7 +53,7 @@ static long restore_fp_state(struct pt_regs *regs, } static long save_fp_state(struct pt_regs *regs, - union __riscv_fp_state *sc_fpregs) + union __riscv_fp_state __user *sc_fpregs) { long err; struct __riscv_d_ext_state __user *state = &sc_fpregs->d; From patchwork Thu Oct 24 22:58:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 11211047 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D6EF313B1 for ; Thu, 24 Oct 2019 22:59:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A7B5F21929 for ; Thu, 24 Oct 2019 22:59:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aLcaLWoD"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="mQgVZqoR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7B5F21929 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gPrx7yFlUzdxFUbJTVHthNPE3MaWhWszffTtD0Be67I=; b=aLcaLWoDTPOSJz 9A2aqVc9GnK4nUO7LvZfjYF4LUoKSRiiVU6o86bYBgP58EkTWCD7LNwIJ57nlIJZPkJlQxT6rCBQb H60U5bEwpoOWKrgrchFLlZ4an8t4aQgncZ8d0wV2067OWItguamJfDM+rYSUqDBONoo6OLVN++6/3 vq6Ae2G3buM/IPdYigE4E5jOxilrCQDgiSiWwMz7Wy4B4CfDG6fVvsXB4P3xL6TKGwiN95jodddw4 PEZHnyN9MVbKSgMtmUahcIqfO3gOv2wnxCoEzm3CiY+lC+gNZyqVCWeR0QAsCuifCUSVDj7LaT0Gb AKKxz9jbGojfPLeCWYSQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNm4T-0000NA-PP; Thu, 24 Oct 2019 22:59:09 +0000 Received: from mail-il1-x141.google.com ([2607:f8b0:4864:20::141]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNm4M-0000ES-V7 for linux-riscv@lists.infradead.org; Thu, 24 Oct 2019 22:59:04 +0000 Received: by mail-il1-x141.google.com with SMTP id a13so176598ilp.1 for ; Thu, 24 Oct 2019 15:59:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6ewd1rVkhq4LpaE/RWcspGCRKM0wa097bcHOPlCsLiI=; b=mQgVZqoRA4C+jywJUfgezpEMpK4tDsxVj3MUVMhVw/V9KcdTEUnsDGiizEdRxNe0bb ELefZpeh5KMWKi4lWruJDQ1QC90tpmN8TVijGarn6mOv9PaWnFbEE0XJXBbh4hO+7lBA FpbKaB41bdmIsd+CpF7LR63qOH935RjV9rLd1yJ2oY61BFupVypeGI25J9q2RtDWUQIC 5ON3WMxbPtMeEjsiOeIkqRf9s6M6n0vj52bbh2pV32Aet4/ciZ4liSoH8flRfWTzhJ8i kvZCYSijtjo2lWxjVxcOl6cVpTV8MG7bOXT5NFkZtM4uYql59ionZXhmaOv70wcgiZU0 hBZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6ewd1rVkhq4LpaE/RWcspGCRKM0wa097bcHOPlCsLiI=; b=FDuAj2ISjOKaDIl2ez4nm3dCUPbQSIzDf86dp283WiihOrcR2YRD6yZJYZbEE0s38T u+e6P7D878KPd/D0XRluRQv6OgaP7kYAAqJ9Ug89SzJB/HY6N2QQQeNCyToY/N+dqUiG NagCb4TAUjNdQjrT9cz/w6kjgp99Q6xCpCX+O0q6Ju04Qu1k/sjcOSCOd1KfhLkZxQVJ sJmRICID29WVMpELNnU07Duuqr+pUJ4hY+uVhBEjl1unGYoBzX/pbEuLyLmXmC80Zz5O dSU/uRkd6mqKgV7LQL467T6In1XpjrsEd3xGiSp2prFk3cIXORBTBb4LwVGmCFD78jGs y/3g== X-Gm-Message-State: APjAAAW69N6rbU7Rwc1bbIww0rRLoC420gtNK3li3l0QvdfI+/R0W64S /EmWwFEq2SiUlHHL9d80gN0iUJ4jL8M= X-Google-Smtp-Source: APXvYqz43O6FDAWcYOVrF1HCpzRXwF5m1tk03ArHzCfCtyXH/mGlZwggHZNmnwLL7SV3KQivEs92Mw== X-Received: by 2002:a92:dd88:: with SMTP id g8mr569648iln.199.1571957941595; Thu, 24 Oct 2019 15:59:01 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id b18sm58112ilo.70.2019.10.24.15.58.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 15:59:01 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Subject: [PATCH v4 6/6] riscv: for C functions called only from assembly, mark with __visible Date: Thu, 24 Oct 2019 15:58:38 -0700 Message-Id: <20191024225838.27743-7-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.24.0.rc0 In-Reply-To: <20191024225838.27743-1-paul.walmsley@sifive.com> References: <20191024225838.27743-1-paul.walmsley@sifive.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191024_155903_038496_33770C89 X-CRM114-Status: GOOD ( 12.57 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:141 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hch@lst.dev, greentime.hu@sifive.com, linux-kernel@vger.kernel.org, luc.vanoostenryck@gmail.com, Christoph Hellwig Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org Rather than adding prototypes for C functions called only by assembly code, mark them as __visible. This avoids adding prototypes that will never be used by the callers. Resolves the following sparse warnings: arch/riscv/kernel/irq.c:27:29: warning: symbol 'do_IRQ' was not declared. Should it be static? arch/riscv/kernel/ptrace.c:151:6: warning: symbol 'do_syscall_trace_enter' was not declared. Should it be static? arch/riscv/kernel/ptrace.c:165:6: warning: symbol 'do_syscall_trace_exit' was not declared. Should it be static? arch/riscv/kernel/signal.c:295:17: warning: symbol 'do_notify_resume' was not declared. Should it be static? arch/riscv/kernel/traps.c:92:1: warning: symbol 'do_trap_unknown' was not declared. Should it be static? arch/riscv/kernel/traps.c:94:1: warning: symbol 'do_trap_insn_misaligned' was not declared. Should it be static? arch/riscv/kernel/traps.c:96:1: warning: symbol 'do_trap_insn_fault' was not declared. Should it be static? arch/riscv/kernel/traps.c:98:1: warning: symbol 'do_trap_insn_illegal' was not declared. Should it be static? arch/riscv/kernel/traps.c:100:1: warning: symbol 'do_trap_load_misaligned' was not declared. Should it be static? arch/riscv/kernel/traps.c:102:1: warning: symbol 'do_trap_load_fault' was not declared. Should it be static? arch/riscv/kernel/traps.c:104:1: warning: symbol 'do_trap_store_misaligned' was not declared. Should it be static? arch/riscv/kernel/traps.c:106:1: warning: symbol 'do_trap_store_fault' was not declared. Should it be static? arch/riscv/kernel/traps.c:108:1: warning: symbol 'do_trap_ecall_u' was not declared. Should it be static? arch/riscv/kernel/traps.c:110:1: warning: symbol 'do_trap_ecall_s' was not declared. Should it be static? arch/riscv/kernel/traps.c:112:1: warning: symbol 'do_trap_ecall_m' was not declared. Should it be static? arch/riscv/kernel/traps.c:124:17: warning: symbol 'do_trap_break' was not declared. Should it be static? arch/riscv/kernel/smpboot.c:136:24: warning: symbol 'smp_callin' was not declared. Should it be static? Based on a suggestion from Luc Van Oostenryck. This version includes changes based on feedback from Christoph Hellwig . Signed-off-by: Paul Walmsley Cc: Luc Van Oostenryck Reviewed-by: Christoph Hellwig # for do_syscall_trace_* --- arch/riscv/kernel/irq.c | 2 +- arch/riscv/kernel/ptrace.c | 4 ++-- arch/riscv/kernel/signal.c | 4 ++-- arch/riscv/kernel/smpboot.c | 2 +- arch/riscv/kernel/traps.c | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/riscv/kernel/irq.c b/arch/riscv/kernel/irq.c index 6d8659388c49..fffac6ddb0e0 100644 --- a/arch/riscv/kernel/irq.c +++ b/arch/riscv/kernel/irq.c @@ -24,7 +24,7 @@ int arch_show_interrupts(struct seq_file *p, int prec) return 0; } -asmlinkage void __irq_entry do_IRQ(struct pt_regs *regs) +asmlinkage __visible void __irq_entry do_IRQ(struct pt_regs *regs) { struct pt_regs *old_regs = set_irq_regs(regs); diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c index 368751438366..1252113ef8b2 100644 --- a/arch/riscv/kernel/ptrace.c +++ b/arch/riscv/kernel/ptrace.c @@ -148,7 +148,7 @@ long arch_ptrace(struct task_struct *child, long request, * Allows PTRACE_SYSCALL to work. These are called from entry.S in * {handle,ret_from}_syscall. */ -void do_syscall_trace_enter(struct pt_regs *regs) +__visible void do_syscall_trace_enter(struct pt_regs *regs) { if (test_thread_flag(TIF_SYSCALL_TRACE)) if (tracehook_report_syscall_entry(regs)) @@ -162,7 +162,7 @@ void do_syscall_trace_enter(struct pt_regs *regs) audit_syscall_entry(regs->a7, regs->a0, regs->a1, regs->a2, regs->a3); } -void do_syscall_trace_exit(struct pt_regs *regs) +__visible void do_syscall_trace_exit(struct pt_regs *regs) { audit_syscall_exit(regs); diff --git a/arch/riscv/kernel/signal.c b/arch/riscv/kernel/signal.c index 64bc914ce9ff..d0f6f212f5df 100644 --- a/arch/riscv/kernel/signal.c +++ b/arch/riscv/kernel/signal.c @@ -292,8 +292,8 @@ static void do_signal(struct pt_regs *regs) * notification of userspace execution resumption * - triggered by the _TIF_WORK_MASK flags */ -asmlinkage void do_notify_resume(struct pt_regs *regs, - unsigned long thread_info_flags) +asmlinkage __visible void do_notify_resume(struct pt_regs *regs, + unsigned long thread_info_flags) { /* Handle pending signal delivery */ if (thread_info_flags & _TIF_SIGPENDING) diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index ec0be2f6a2e8..261f4087cc39 100644 --- a/arch/riscv/kernel/smpboot.c +++ b/arch/riscv/kernel/smpboot.c @@ -133,7 +133,7 @@ void __init smp_cpus_done(unsigned int max_cpus) /* * C entry point for a secondary processor. */ -asmlinkage void __init smp_callin(void) +asmlinkage __visible void __init smp_callin(void) { struct mm_struct *mm = &init_mm; diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c index 0b6e271efc43..473de3ae8bb7 100644 --- a/arch/riscv/kernel/traps.c +++ b/arch/riscv/kernel/traps.c @@ -84,7 +84,7 @@ static void do_trap_error(struct pt_regs *regs, int signo, int code, } #define DO_ERROR_INFO(name, signo, code, str) \ -asmlinkage void name(struct pt_regs *regs) \ +asmlinkage __visible void name(struct pt_regs *regs) \ { \ do_trap_error(regs, signo, code, regs->sepc, "Oops - " str); \ } @@ -121,7 +121,7 @@ static inline unsigned long get_break_insn_length(unsigned long pc) return (((insn & __INSN_LENGTH_MASK) == __INSN_LENGTH_32) ? 4UL : 2UL); } -asmlinkage void do_trap_break(struct pt_regs *regs) +asmlinkage __visible void do_trap_break(struct pt_regs *regs) { if (user_mode(regs)) force_sig_fault(SIGTRAP, TRAP_BRKPT, (void __user *)regs->sepc);