From patchwork Fri Oct 18 08:08: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: 11197701 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 441F419A1 for ; Fri, 18 Oct 2019 08:08:56 +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 21E522089C for ; Fri, 18 Oct 2019 08:08:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="auvSLhA4"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="VdiO5twV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 21E522089C 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=ZeO8iX2CbvHVN8nanfd3UNPttHA8wIXLciWp5yrGDGg=; b=auvSLhA4+ffzeh umeHlNjVpF8GQeEK4v5imEQ5MiPkj0+m/ozzlos9tFf/SNsUMC0yZ4vqw3U+fFc9RLJfAsL9hIWL0 ck1SQthgcrFQ1SwrbhnrYIH7WaYI01g8+A1dH3HK99P6tU1OHTejkoWVq6BQ4LbgNIrIQgCMkl3Bu vvbciNcySEN3+9JTQv44f9iXjnQ0hB9MOX73M7uM8BN1sjbO/HFN2eg0Kr9d0+tJ8OUhZezIc+0/F 9NB0gTe7OyyUBJSURmySavS+20B2JX9Gz122ojHD2qYYWi7IxfVB9XCaJAyVhlYpL5zerRBfFNeyz CrPsX95TUQqGmUX0NnNw==; 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 1iLNJf-0007im-FA; Fri, 18 Oct 2019 08:08:55 +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 1iLNJc-0007fz-Ql for linux-riscv@lists.infradead.org; Fri, 18 Oct 2019 08:08:54 +0000 Received: by mail-io1-xd43.google.com with SMTP id c25so6340749iot.12 for ; Fri, 18 Oct 2019 01:08:52 -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=gALXE7phMSnF5XNrDSEyjkXd1DZJtTY9PSTVrsQZe00=; b=VdiO5twVtCF9UsEJN/g/Ibi63daAcXzXNmZwrtCD1RybuXu7p4ff+DqxMMhOvSexJ9 O+h+RCzoMAYVvqRmSYWRgQ0cKZ4kGPOd2mYMuTQE8CbqgQ4NrCDOD1MNtlJsLs/QBVck yDEzptuIrt49pyuPEslqXvV0+EtOBXjCLscuS8Zztqra4SVC/n4wl43V2OBapnsBnS7l ScmBx8PLNNCUyWrl5FE0itd8L+nCgKDR9xwi/In98CmvYPv4qoYlpdl2id6DvE5MWOC3 m16329oHHSaXla9lmZ93+A/+QggzKyLBRL24MePHKpxlby7tgnemMvIAYIDjBc5HF3Bu 4fOA== 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=gALXE7phMSnF5XNrDSEyjkXd1DZJtTY9PSTVrsQZe00=; b=UASLosKERgNSr8jW39XceYDVw0Cy0eCHbiFSFAE5XxioYDRHKyLnm4IHp/x9uLvGz9 FfpFqZanBz1gXSGbBacQa1g4tD6Ge+3tl7oynirNf6POq+23lTLsIEFKjQMwcWOvYbUU oWF2C+JMpvsM3pzddNAOLY2mK5PfZs7rcu0cgiEJDKCIAtkHoLwFAmrdOiE70jyGjFEl bIi1QQW4S+FiH7OCvqGNBABd1r/CC7EbMKosGwNT9IU/UKDdKgkO2nPZ2gpHFIpyxBLt vuTDdE1Uw737GoLWs3u+iabNLptI5pZCPXFvmY4oG5OqLb3zLMMZBI4RBpFPdDQBs+RD cg5g== X-Gm-Message-State: APjAAAWUMXuYYjEttODRO+oiL4//D75qOvg2QtwLkCuXe1Hx8w1CYIBR bsYaDOqwsXRv18YFhbfhd6VnA3A4oqw= X-Google-Smtp-Source: APXvYqzfJ8zKMPYKiC0SIxFmIQKB8w+RgetlcbhzplyFFJO/YWgSaIBZm0V0UHqa+RzxKZ3ivY9Rew== X-Received: by 2002:a02:1d44:: with SMTP id 65mr7665917jaj.129.1571386131665; Fri, 18 Oct 2019 01:08:51 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id z86sm2121026ilf.73.2019.10.18.01.08.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 01:08:51 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Subject: [PATCH v3 1/8] riscv: add prototypes for assembly language functions from entry.S Date: Fri, 18 Oct 2019 01:08:34 -0700 Message-Id: <20191018080841.26712-2-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191018080841.26712-1-paul.walmsley@sifive.com> References: <20191018080841.26712-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-20191018_010852_868380_766321AB X-CRM114-Status: GOOD ( 12.53 ) 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_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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: linux-kernel@vger.kernel.org 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 entry.S, and include these prototypes into C source files that call those functions. This patch resolves the following warnings from sparse: arch/riscv/kernel/signal.c:32:53: warning: incorrect type in initializer (different address spaces) arch/riscv/kernel/signal.c:45:23: warning: incorrect type in initializer (different address spaces) arch/riscv/kernel/signal.c:59:53: warning: incorrect type in initializer (different address spaces) arch/riscv/kernel/signal.c:69:23: warning: incorrect type in initializer (different address spaces) arch/riscv/kernel/signal.c:89:48: warning: incorrect type in argument 2 (different address spaces) arch/riscv/kernel/signal.c:142:45: warning: incorrect type in argument 2 (different address spaces) arch/riscv/kernel/signal.c:295:17: warning: symbol 'do_notify_resume' was not declared. Should it be static? arch/riscv/kernel/traps.c:91:1: warning: symbol 'do_trap_unknown' was not declared. Should it be static? arch/riscv/kernel/traps.c:93:1: warning: symbol 'do_trap_insn_misaligned' was not declared. Should it be static? arch/riscv/kernel/traps.c:95:1: warning: symbol 'do_trap_insn_fault' was not declared. Should it be static? arch/riscv/kernel/traps.c:97:1: warning: symbol 'do_trap_insn_illegal' was not declared. Should it be static? arch/riscv/kernel/traps.c:99:1: warning: symbol 'do_trap_load_misaligned' was not declared. Should it be static? arch/riscv/kernel/traps.c:101:1: warning: symbol 'do_trap_load_fault' was not declared. Should it be static? arch/riscv/kernel/traps.c:103:1: warning: symbol 'do_trap_store_misaligned' was not declared. Should it be static? arch/riscv/kernel/traps.c:105:1: warning: symbol 'do_trap_store_fault' was not declared. Should it be static? arch/riscv/kernel/traps.c:107:1: warning: symbol 'do_trap_ecall_u' was not declared. Should it be static? arch/riscv/kernel/traps.c:109:1: warning: symbol 'do_trap_ecall_s' was not declared. Should it be static? arch/riscv/kernel/traps.c:111:1: warning: symbol 'do_trap_ecall_m' was not declared. Should it be static? arch/riscv/kernel/traps.c:125:17: warning: symbol 'do_trap_break' was not declared. Should it be static? arch/riscv/kernel/traps.c:163:13: warning: symbol 'trap_init' was not declared. Should it be static? This change should have no functional impact. Signed-off-by: Paul Walmsley --- arch/riscv/kernel/entry.h | 29 +++++++++++++++++++++++++++++ arch/riscv/kernel/signal.c | 2 ++ arch/riscv/kernel/traps.c | 2 ++ 3 files changed, 33 insertions(+) create mode 100644 arch/riscv/kernel/entry.h diff --git a/arch/riscv/kernel/entry.h b/arch/riscv/kernel/entry.h new file mode 100644 index 000000000000..73bfcda993d0 --- /dev/null +++ b/arch/riscv/kernel/entry.h @@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2019 SiFive, Inc. + */ +#ifndef __ASM_ENTRY_H +#define __ASM_ENTRY_H + +#include +#include + +asmlinkage void do_trap_unknown(struct pt_regs *regs); +asmlinkage void do_trap_insn_misaligned(struct pt_regs *regs); +asmlinkage void do_trap_insn_fault(struct pt_regs *regs); +asmlinkage void do_trap_insn_illegal(struct pt_regs *regs); +asmlinkage void do_trap_load_misaligned(struct pt_regs *regs); +asmlinkage void do_trap_load_fault(struct pt_regs *regs); +asmlinkage void do_trap_store_misaligned(struct pt_regs *regs); +asmlinkage void do_trap_store_fault(struct pt_regs *regs); +asmlinkage void do_trap_ecall_u(struct pt_regs *regs); +asmlinkage void do_trap_ecall_s(struct pt_regs *regs); +asmlinkage void do_trap_ecall_m(struct pt_regs *regs); +asmlinkage void do_trap_break(struct pt_regs *regs); + +asmlinkage void do_notify_resume(struct pt_regs *regs, + unsigned long thread_info_flags); + +void __init trap_init(void); + +#endif /* __ASM__H */ diff --git a/arch/riscv/kernel/signal.c b/arch/riscv/kernel/signal.c index b14d7647d800..85c700ad47e9 100644 --- a/arch/riscv/kernel/signal.c +++ b/arch/riscv/kernel/signal.c @@ -17,6 +17,8 @@ #include #include +#include "entry.h" + #define DEBUG_SIG 0 struct rt_sigframe { diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c index 1ac75f7d0bff..eff679c3b618 100644 --- a/arch/riscv/kernel/traps.c +++ b/arch/riscv/kernel/traps.c @@ -19,6 +19,8 @@ #include #include +#include "entry.h" + int show_unhandled_signals = 1; extern asmlinkage void handle_exception(void); From patchwork Fri Oct 18 08:08: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: 11197703 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 BE69819A1 for ; Fri, 18 Oct 2019 08:08: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 9C34D2089C for ; Fri, 18 Oct 2019 08:08: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="CFVAHNAv"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="i2EVw/kS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C34D2089C 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=CIh+sxwZ52JB2UMp/5BEPAc4CHdoPz0NYba5JAT0JWQ=; b=CFVAHNAvQqyvDd oStCJfd4BoVyc+3qx72kJOInX+hkNhLYUJ93L7milCBk0ha5lnQyuJ2/O1yyXa1NovjBps2xeF+c8 HNVEaIN86vyK8XI20WLrV3GV0hnTx4vYJdmGxtjQXyV8NeJXM5EVNhU0OHE6PgFWps6xHSUwdcoTM j1DzrM+QCIMH95GHtzc5bHRHMs/xSBX0Bn25SiEde7zVJ9VRFfVf8amei5fz80n8vEGu6K4oF63kF r7eNZbneXyiAee+3tvm5KLMOmy05Zti+JjYfA7Qnj/6AVYk16KMNPt5X2JpKZchadEcvNjBpiL7gx AI7bhcYOhmXBfL++1sGg==; 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 1iLNJh-0007lt-SA; Fri, 18 Oct 2019 08:08:57 +0000 Received: from mail-io1-xd41.google.com ([2607:f8b0:4864:20::d41]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iLNJd-0007gN-RB for linux-riscv@lists.infradead.org; Fri, 18 Oct 2019 08:08:55 +0000 Received: by mail-io1-xd41.google.com with SMTP id b19so6403924iob.4 for ; Fri, 18 Oct 2019 01:08:53 -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=XAlS+g/VLgE4rEuH3+BZzhhhkoWoqTznFAgiPaBBdkM=; b=i2EVw/kSrpt8aNbRp/WKPt2JviofZ7qDWXFw6l5+4dIZg0e3LUo8JQALzz+FpAgjId lPtkJ43DwSMl/E1obPH8aRp0BWMn0+V8T7d79ZUEknf9W2A7n00WBr+NiolV/P4/b5Nz Sw8g494vIO+E+58FuadPQg0OveqzWHEuRoloIs73NQZC0Y75VN4lPxhlmS+GQL+G6Tjs JDOaWnSuQuVqCYgvR6xiSYVuUNznmja+Miastj30Z63krqq6+3ufxhBiWMNXNc/QcVQg wcgiMxt37rvCegVXhPlKftfQRrhPeEDEUb0xXNI7rUvhKOTfzD/j1UClilQtf7+llVDa ZglQ== 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=XAlS+g/VLgE4rEuH3+BZzhhhkoWoqTznFAgiPaBBdkM=; b=KzyQXbSI5q7UUKLuOpZidA99dSvWRjpTX/0ePzTwQVyQSVdvXNKEw58ATQ8Bq6cmSr B0VR26jyb7bmBBd1h/xpr+NciFYiOAOIOwXFKxZatYnw4y65jq8240a2CY09h7QLix24 /5KoXFVTIpx1kAPW7rWihQIpdTYUCrc4YW7Suln/4oPJ55yA+vEwyx/7Xkr6AECc0Jx/ /qpUffdk14oSKxSBnQfgxwKaMV9CBwyDUG1y+I/RU7kaGympqWpDi0OUi9kGZ9kNBIwQ sNhN+C3WH+0AyTR3+sZs302Ps3vZyj0oN1g81s4mKSxfrlLVUYBRQF4AWSSMlZvd4Uuz 7Q5Q== X-Gm-Message-State: APjAAAWkftrpuMLkrmbS6qsStM/dt60F1PryQovtCbVxQS0q2XZ+cJc1 lmGKUj28PYU6wzGJmOKs8TQJAmijZ58= X-Google-Smtp-Source: APXvYqz6fz9s80QCJELY/AmGNWmewV1gzmQr+Gh+lGc6atfv7x8xe/sXok18fOSlODh7AVPBpR+iew== X-Received: by 2002:a6b:5814:: with SMTP id m20mr7405315iob.242.1571386132798; Fri, 18 Oct 2019 01:08:52 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id z86sm2121026ilf.73.2019.10.18.01.08.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 01:08:52 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Subject: [PATCH v3 2/8] riscv: add prototypes for assembly language functions from head.S Date: Fri, 18 Oct 2019 01:08:35 -0700 Message-Id: <20191018080841.26712-3-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191018080841.26712-1-paul.walmsley@sifive.com> References: <20191018080841.26712-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-20191018_010853_888853_75477F34 X-CRM114-Status: GOOD ( 13.31 ) 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:d41 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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: linux-kernel@vger.kernel.org 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/kernel/smpboot.c:133:24: warning: symbol 'smp_callin' 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 83f7d12042fb..fa8748a74414 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 Fri Oct 18 08:08: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: 11197705 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 429AF112B for ; Fri, 18 Oct 2019 08:09:03 +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 1F21321D80 for ; Fri, 18 Oct 2019 08:09:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tsvXSAy1"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="UJ9qXKVQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F21321D80 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=n0eutDRWKfUuPtgVgFizq/xkj5kacWEt668d5wT6gZ8=; b=tsvXSAy11dBZ/1 rmMXMPJN/+DBR0LGypcJVr70YpbH9QMYFoIOPsj0mHFwtSfoXqOmztL8Tyww7GgjivfFVCMz5ZoCt 6VHIntwhbPiVhXeadwzQybsIOYhBTiKUrxU7k8tIp0Fd/XwJUQWlVW4WNE/Xdr2fho4oEYTuy1J+N J4vRpnsVjcUG1yy1/3gSFamPExoGnJj1oJgQGlQ+Md/9N6cq0/iU4wVBgpfTZ+WQ7Jrjx6rrUIFSj AU/aF21fS0PAdmU9HRr4/3GGDjIZGlcBrXQmkGnBUoaRycF0QWHV882aki4kkaiOvzZu2auMWKkuC DzdilLzljwCIde8UA1MA==; 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 1iLNJm-0007sM-LZ; Fri, 18 Oct 2019 08:09:02 +0000 Received: from mail-il1-x142.google.com ([2607:f8b0:4864:20::142]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iLNJi-0007lm-9J for linux-riscv@lists.infradead.org; Fri, 18 Oct 2019 08:09:00 +0000 Received: by mail-il1-x142.google.com with SMTP id u1so4700697ilq.12 for ; Fri, 18 Oct 2019 01:08: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=JHZwkf7dJQb2ueiE6rWLqpiW0jn7hN3I7C8kvdgIRA4=; b=UJ9qXKVQp7oql8AsQGguKjXwT+hTgLgDIaxyocAICcWHqufSo5Rl6505mDxQF976/s JKA/0J3m3ItmfvNsvc4uMXi+eAYwwnCc7zOHv9Rr6YTiH62/vznrFmuwEbsJo5uV2vIn 0dDo/aPaJ/LXpDH9AfPOZrlHCbFOhEwP3NO2XGxuTaI0D+rz4zlV9iEEb1frmiUqzPCH iBysNeitcop6mNpjpejximJj50shmGyWN24oSn20H9EwULK0nC3f7IxB89hS9ffBMjpS jwZi01tMUlo+Uo50Ly0E2Xyo2MJsgKbdPearbArqq55ymINO2jCJGEO6VZ9PDDNK3LvK 8YYw== 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=JHZwkf7dJQb2ueiE6rWLqpiW0jn7hN3I7C8kvdgIRA4=; b=YmYfQYfJOcizTbVEYvQtt0b6Ep99Y78qeewyfgzQKoLVLEdvAO3rgtHuslzU+UyGHQ UB65uZZlmpOhFTzc6Y+Q2jRWeCXzQgdXp7ZfM4TPAoqaB7wwT2AYBqIEm+hCFf3+NhqQ 9jhMz/Q4Y5sw5iBjU+uZBxmzzbuM4eIHplqCI2HF7J6+G8BzJg6Sola1xkCYqW7qBllB Rb8DDUgHzWQ9rT+k501lFjF2gAufZMq6qLnY/Ocj54hjPHwKku+S0tG2M1EbDjUsFLnn sGke9pUwv3wPwDQtqfrvpIMMJEKZ0k/i9Yjikd/JcOhNEJh82EXb11h3awcXQ19Nz5P6 ALAw== X-Gm-Message-State: APjAAAUcukklw7/dH3ekyJodHpcO8AGJQV58swyS1H2yQ+IDCtyt+dPx NThhZ/WIXQGbtZnIa8MQGE/jXOVZps0= X-Google-Smtp-Source: APXvYqypnTHKh+VT4ykjNOiCGrkCEsaEqLiYx6kyKUi/C2fkT1SJiPurMENiBjDLOPtFVR6QBRrW7A== X-Received: by 2002:a92:1507:: with SMTP id v7mr8013435ilk.37.1571386134093; Fri, 18 Oct 2019 01:08:54 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id z86sm2121026ilf.73.2019.10.18.01.08.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 01:08:53 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Subject: [PATCH v3 3/8] riscv: init: merge split string literals in preprocessor directive Date: Fri, 18 Oct 2019 01:08:36 -0700 Message-Id: <20191018080841.26712-4-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191018080841.26712-1-paul.walmsley@sifive.com> References: <20191018080841.26712-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-20191018_010858_350274_76FD1615 X-CRM114-Status: GOOD ( 10.86 ) 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:142 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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: linux-kernel@vger.kernel.org, Luc Van Oostenryck 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 [ ... ] Existing Linux practice is simply to use a single long line. So, fix by concatenating the strings. This patch should have no functional impact. Signed-off-by: Paul Walmsley Reviewed-by: Luc Van Oostenryck Link: https://lore.kernel.org/linux-riscv/CAAhSdy2nX2LwEEAZuMtW_ByGTkHO6KaUEvVxRnba_ENEjmFayQ@mail.gmail.com/T/#mc1a58bc864f71278123d19a7abc083a9c8e37033 Reviewed-by: Christoph Hellwig --- 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 fa8748a74414..fe68e94ea946 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 Fri Oct 18 08:08: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: 11197709 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 8B66C19A1 for ; Fri, 18 Oct 2019 08:09: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 694E221D80 for ; Fri, 18 Oct 2019 08:09:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RGNkgxGV"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="UYH865nc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 694E221D80 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=CEgCw8VNqyAGRvPyqGmRwcwEsMIDgn2/t+fTS6fWJs0=; b=RGNkgxGVOeV+yX tRIDMvRejDF5oqmFX+ghFubVA5XiNvwNiQPD5iCWNifReptBIxCwFYmAA5o8GHeP/iuSPsY6xyWeK 7FLiwHwRtcBMIo5BK1jxsGWtQsMMcmVHyEHLuflM2trVJgLVK8JlM/NHKn4KH5wPRCU/sxncFcApu qxH5a9t7FjpQuKBzsoRP0LGmOAVJERuxgoGN2AAlM2qkQRwazdUkXM+oaKh9u+T+jMgLYmIdXqTQ4 Qcj2fRA4U63oifPde4TcKDyEDI/f73wLzjGL+PH0Hhc6RP00Xj+0+pxZNahUPdbNz/cIlqW+wR8+m MqjITxrB/PxgAsrs6QNg==; 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 1iLNJr-0007yH-37; Fri, 18 Oct 2019 08:09:07 +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 1iLNJi-0007ll-B3 for linux-riscv@lists.infradead.org; Fri, 18 Oct 2019 08:09:02 +0000 Received: by mail-il1-x143.google.com with SMTP id u1so4700749ilq.12 for ; Fri, 18 Oct 2019 01:08: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=dSBcDIKx5nYgnvY0E6Lcwtwu4qqsxuq/VRdIo5y+2Cg=; b=UYH865ncXlKhaR/ruHoaa2j5syS/lseyRuqhuEhLj5/69PK7JaW0oh8UpKzb/YJo53 MteWuPrAiD6AhSp7Aax50FcMDGjpjzl/NDMbni9cBk6cdG7vronHFfvQcI8SWhGHCtt4 4N8UDH6QdyWc0ciGW1+12iM+2BvwEeHXHXvhzSmCiXQY0mJMOIF4gNQEMf8XjgVQgxrH D5aK+hOzRVfDTbusI617sI+EeQZG4m2KuCcjeuG8uayegjuDC3phM47GxQGhZuVL3bZX w8Z6vZ9+VIRBn9Erp572wwfEkS3C5ikie31Ll8tw1iFbAmJJbDLb5hm7Fre/Wdd1oVqG erYQ== 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=dSBcDIKx5nYgnvY0E6Lcwtwu4qqsxuq/VRdIo5y+2Cg=; b=Bi9Fnim/ETCKOgy9b7B+b5mfp8uXxRLmDtDgZiI5fOZRCfW6ppccwmLqbUH3Iwyomu VdRW+MvzwwWT4pHM6tLayH27YXqGQwdtNaYy7K4RVmsyr2irZzGUQVfdF3OYpzxCA+4N itcxsYQdNyTSnXz5JRr4z6slhdAL5+oC0LIQ/R586D0koASPZCVuLWth4LOdrmzZklh3 T83Xhp8xgqxbxCtte0AuYVh+055cucUcyCBmPVe1Y/w+TFHb3PoMRag/hVrr0/tRVzah anX0wSvDqtpRuMT87/O6lrB94l3xX7de3dmlRCJSWEEqA7p3FZBZNCYPhf9KRXxbLQSi X1Hw== X-Gm-Message-State: APjAAAVrNGDd7gs1eCFL7BzsybwOLifLJDUM49kHnDgBRihm7cRqcUZv 1Br3MxFhhKLSH0lMLpPfN4I4R4yVJRk= X-Google-Smtp-Source: APXvYqzKI2kk5lHMs0yEtKm+xbMxG2eju3cK4Gef8i8iQDD25JUnHl+bMAFlMgwk9ylcXNg+trIVzQ== X-Received: by 2002:a92:5a9b:: with SMTP id b27mr8731380ilg.180.1571386135351; Fri, 18 Oct 2019 01:08:55 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id z86sm2121026ilf.73.2019.10.18.01.08.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 01:08:54 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Subject: [PATCH v3 4/8] riscv: add missing prototypes Date: Fri, 18 Oct 2019 01:08:37 -0700 Message-Id: <20191018080841.26712-5-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191018080841.26712-1-paul.walmsley@sifive.com> References: <20191018080841.26712-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-20191018_010858_433570_DC837AB6 X-CRM114-Status: GOOD ( 10.03 ) 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_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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: linux-kernel@vger.kernel.org Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org sparse identifies these missing prototypes when building arch/riscv: arch/riscv/kernel/cpu.c:149:29: warning: symbol 'cpuinfo_op' was not declared. Should it be static? arch/riscv/kernel/irq.c:27:29: warning: symbol 'do_IRQ' was not declared. Should it be static? arch/riscv/kernel/irq.c:57:13: warning: symbol 'init_IRQ' 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/time.c:15:13: warning: symbol 'time_init' was not declared. Should it be static? arch/riscv/kernel/smpboot.c:135:24: warning: symbol 'smp_callin' was not declared. Should it be static? arch/riscv/kernel/smp.c:72:5: warning: symbol 'setup_profiling_timer' was not declared. Should it be static? arch/riscv/mm/init.c:151:7: warning: symbol 'trampoline_pg_dir' was not declared. Should it be static? arch/riscv/mm/init.c:157:7: warning: symbol 'early_pg_dir' was not declared. Should it be static? arch/riscv/kernel/process.c:32:6: warning: symbol 'show_regs' was not declared. Should it be static? Fix by adding the missing prototypes to the appropriate header files. This change should have no functional impact. Signed-off-by: Paul Walmsley --- arch/riscv/include/asm/irq.h | 3 +++ arch/riscv/include/asm/pgtable.h | 2 ++ arch/riscv/include/asm/processor.h | 4 ++++ arch/riscv/include/asm/ptrace.h | 2 ++ arch/riscv/include/asm/smp.h | 2 ++ 5 files changed, 13 insertions(+) diff --git a/arch/riscv/include/asm/irq.h b/arch/riscv/include/asm/irq.h index 75576424c0f7..589e2d9fb2a6 100644 --- a/arch/riscv/include/asm/irq.h +++ b/arch/riscv/include/asm/irq.h @@ -12,6 +12,9 @@ void riscv_timer_interrupt(void); void riscv_software_interrupt(void); +asmlinkage void do_IRQ(struct pt_regs *regs); +void __init init_IRQ(void); + #include #endif /* _ASM_RISCV_IRQ_H */ diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 42292d99cc74..7fc5e4a56715 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -61,6 +61,8 @@ #define PAGE_TABLE __pgprot(_PAGE_TABLE) +extern pgd_t trampoline_pg_dir[]; +extern pgd_t early_pg_dir[]; extern pgd_t swapper_pg_dir[]; /* MAP_PRIVATE permissions: xwr (copy-on-write) */ diff --git a/arch/riscv/include/asm/processor.h b/arch/riscv/include/asm/processor.h index f539149d04c2..ab56435de629 100644 --- a/arch/riscv/include/asm/processor.h +++ b/arch/riscv/include/asm/processor.h @@ -78,6 +78,10 @@ int riscv_of_processor_hartid(struct device_node *node); extern void riscv_fill_hwcap(void); +extern const struct seq_operations cpuinfo_op; + +void time_init(void); + #endif /* __ASSEMBLY__ */ #endif /* _ASM_RISCV_PROCESSOR_H */ diff --git a/arch/riscv/include/asm/ptrace.h b/arch/riscv/include/asm/ptrace.h index d48d1e13973c..c851c095b674 100644 --- a/arch/riscv/include/asm/ptrace.h +++ b/arch/riscv/include/asm/ptrace.h @@ -101,6 +101,8 @@ static inline unsigned long regs_return_value(struct pt_regs *regs) return regs->a0; } +void show_regs(struct pt_regs *regs); + #endif /* __ASSEMBLY__ */ #endif /* _ASM_RISCV_PTRACE_H */ diff --git a/arch/riscv/include/asm/smp.h b/arch/riscv/include/asm/smp.h index a83451d73a4e..d19dd2e2e1da 100644 --- a/arch/riscv/include/asm/smp.h +++ b/arch/riscv/include/asm/smp.h @@ -15,6 +15,8 @@ struct seq_file; extern unsigned long boot_cpu_hartid; +asmlinkage void __init smp_callin(void); + #ifdef CONFIG_SMP /* * Mapping between linux logical cpu index and hartid. From patchwork Fri Oct 18 08:08: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: 11197707 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 4DE7F19A1 for ; Fri, 18 Oct 2019 08:09:05 +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 2C2EF222C3 for ; Fri, 18 Oct 2019 08:09:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="E7NcQ+ef"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="BEa8jHfR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C2EF222C3 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=zv7eCgXWZ919Su3XQht3TZi6Ofu8dPC9nemp7skSEQA=; b=E7NcQ+efqPIPSb PE+q/XIKzyhHzkHvNEMChugcoQKrEBxoTjfPT2mAvlCLVYq8aSxZmMGBs3zVAdGBdY+xbYm50fnCr P9KZA20HlIX7FVdO6HP/OjT5WuBFYRYP42cfgDrH3C3BMkScW9bn1e9/KZF2RPZ07oSV1RxDG/40M sqlbXVuHkr6fzQfak6VPCNCEJ6SfwosBC1/cPwlxwNMAu3nkX5rlHLudbqrkinqRmpmII4kxj9jew 2o830u4bbil4Kp9VmRNi/r+PLOCovMHPkiUn+V3Gq+pQSrgou5YRchaRVXf+bCvaEBvzVwP8mKsIk +htoNSlQy0wKDiJ7N+pw==; 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 1iLNJo-0007uh-ND; Fri, 18 Oct 2019 08:09:04 +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 1iLNJi-0007lk-6T for linux-riscv@lists.infradead.org; Fri, 18 Oct 2019 08:09:00 +0000 Received: by mail-il1-x141.google.com with SMTP id v2so4742827ilm.0 for ; Fri, 18 Oct 2019 01:08: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=JYeo0xAdWe0VE7AGn4vUOp9/RKxdCHKwx1Hu2VD3ZFI=; b=BEa8jHfR8SLog4bfpTOtrnQrMMUZBlhhUaquTKSNM7bfhJ7AOHEXm7j9Zne8jWG/ng AnjL8tJG5d1U9kBCJUZxb+aV9smKps16+5fuh+d9GHuWTvfu2FZfyGXWqKFjqa26pG9X jaSOi3e62owzJIefigq1rNPMcgEnyafB1+39k8jaXeyuzNrQ6UtSiUFfBczA7kCzhmEe dAN9Js/v1W8g0Y0d5bP4Uov1eJQv5kBb6zcUVWaWY7o5SQs459EncVLFAea6MKZYMkV4 v2tW7buAa3LTtYKfwtkL8z4YFdtNIKHRi9ji6IhD2XzfgUvn6SoRwoNuqnHLEFjI/zwn 0HCA== 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=JYeo0xAdWe0VE7AGn4vUOp9/RKxdCHKwx1Hu2VD3ZFI=; b=C7HEkYrTW1y+R9ws35o4J06JTBCLBSi8DTblg66ownxl5PMMkC7hp1MV04Iw1fVeVs iVhdT99TyGRkq0PNAHuI5vjclbKMaNp8YxiwD+ig9LIuifjL8GYeguqBL0W+3hXBaOi9 p2VIHbu1y1iSRBlCsLT3NHgZFq5WehksWGh9ieFf+TvGJI3QpU8dGYyFWf1rgb7GF9GQ Exs+c/Hso6rjWziuS8Mf1cl+bCz+LyTi9oz+CDcY1do6t3Gxp4kPCTvmm/bEn99Kadq3 mSph4xvhKS5YGz6/wIdeQvPBsgEBQ662nPOm3FU4lAqARUxsXWZWJ0xLIT163fFOruW+ +d2g== X-Gm-Message-State: APjAAAWI05hxlnrOKbmutSO8UxWSEKRBjycY/v3RlLbmTtmAgW83aS61 ilpiTyZaS6sAQ0ceCCoCdZpX0YAl094= X-Google-Smtp-Source: APXvYqyuLyK6QOrpyjN95pmAmKgcGMj9sSZrO/kmSBeQ12P0BdNjQwxsuihuLXs59+Es22lnPyDCjw== X-Received: by 2002:a92:4a05:: with SMTP id m5mr3584987ilf.91.1571386136597; Fri, 18 Oct 2019 01:08:56 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id z86sm2121026ilf.73.2019.10.18.01.08.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 01:08:56 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Subject: [PATCH v3 5/8] riscv: mark some code and data as file-static Date: Fri, 18 Oct 2019 01:08:38 -0700 Message-Id: <20191018080841.26712-6-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191018080841.26712-1-paul.walmsley@sifive.com> References: <20191018080841.26712-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-20191018_010858_260700_80291753 X-CRM114-Status: GOOD ( 12.38 ) 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_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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: linux-kernel@vger.kernel.org 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/stacktrace.c:22:14: warning: symbol 'walk_stackframe' was not declared. Should it be static? arch/riscv/kernel/vdso.c:28:18: warning: symbol 'vdso_data' was not declared. Should it be static? arch/riscv/mm/init.c:42:6: warning: symbol 'setup_zero_page' was not declared. Should it be static? arch/riscv/mm/init.c:152:7: warning: symbol 'fixmap_pte' was not declared. Should it be static? arch/riscv/mm/init.c:211:7: warning: symbol 'trampoline_pmd' was not declared. Should it be static? arch/riscv/mm/init.c:212:7: warning: symbol 'fixmap_pmd' was not declared. Should it be static? arch/riscv/mm/init.c:219:7: warning: symbol 'early_pmd' 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. Signed-off-by: Paul Walmsley Reviewed-by: Christoph Hellwig --- arch/riscv/kernel/stacktrace.c | 6 ++++-- arch/riscv/kernel/vdso.c | 2 +- arch/riscv/mm/init.c | 12 +++++++----- arch/riscv/mm/sifive_l2_cache.c | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c index 0940681d2f68..fd908baed51c 100644 --- a/arch/riscv/kernel/stacktrace.c +++ b/arch/riscv/kernel/stacktrace.c @@ -19,8 +19,10 @@ struct stackframe { unsigned long ra; }; -void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs, - bool (*fn)(unsigned long, void *), void *arg) +static void notrace walk_stackframe(struct task_struct *task, + struct pt_regs *regs, + bool (*fn)(unsigned long, void *), + void *arg) { unsigned long fp, sp, pc; 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/init.c b/arch/riscv/mm/init.c index fe68e94ea946..79cfb35f1e0e 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -40,7 +40,7 @@ static void __init zone_sizes_init(void) free_area_init_nodes(max_zone_pfns); } -void setup_zero_page(void) +static void setup_zero_page(void) { memset((void *)empty_zero_page, 0, PAGE_SIZE); } @@ -150,7 +150,7 @@ EXPORT_SYMBOL(pfn_base); void *dtb_early_va; pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned_bss; pgd_t trampoline_pg_dir[PTRS_PER_PGD] __page_aligned_bss; -pte_t fixmap_pte[PTRS_PER_PTE] __page_aligned_bss; +static pte_t fixmap_pte[PTRS_PER_PTE] __page_aligned_bss; static bool mmu_enabled; #define MAX_EARLY_MAPPING_SIZE SZ_128M @@ -209,15 +209,17 @@ static void __init create_pte_mapping(pte_t *ptep, #ifndef __PAGETABLE_PMD_FOLDED -pmd_t trampoline_pmd[PTRS_PER_PMD] __page_aligned_bss; -pmd_t fixmap_pmd[PTRS_PER_PMD] __page_aligned_bss; +static pmd_t trampoline_pmd[PTRS_PER_PMD] __page_aligned_bss; +static pmd_t fixmap_pmd[PTRS_PER_PMD] __page_aligned_bss; #if MAX_EARLY_MAPPING_SIZE < PGDIR_SIZE #define NUM_EARLY_PMDS 1UL #else #define NUM_EARLY_PMDS (1UL + MAX_EARLY_MAPPING_SIZE / PGDIR_SIZE) #endif -pmd_t early_pmd[PTRS_PER_PMD * NUM_EARLY_PMDS] __initdata __aligned(PAGE_SIZE); + +#define NUM_EARLY_PMDS_PTRS (PTRS_PER_PMD * NUM_EARLY_PMDS) +static pmd_t early_pmd[NUM_EARLY_PMDS_PTRS] __initdata __aligned(PAGE_SIZE); static pmd_t *__init get_pmd_virt(phys_addr_t pa) { 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 Fri Oct 18 08:08:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 11197711 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 E7B4D112B for ; Fri, 18 Oct 2019 08:09:09 +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 C572F21D80 for ; Fri, 18 Oct 2019 08:09:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OBxLfv9a"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="lqJfzdKN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C572F21D80 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=aXlEhrNnCJvVAC01X8UXKVIiLDwDa9dPTnoYlQ7ygX8=; b=OBxLfv9a+NdDqY q+t2HTQIJrNo/Q4/RTP+Bw+I7Ku4ayaZZ+pxINoLqX5J6gQbCYQe/+n0I8YbDi9QL9KIuqEkZsWh2 slBv0jDmjflNWPwYbHdwBcHkpg3QAIGNmlWUgvJFXjo4PQOS6SinC1pQR7XRpQTNaLT7XLUu3qDF7 fZxqp3xoOcAchKuYMDcs3mCQ4fg9JXnGmYbxUjLHSFkfhnzBA+lNIWbb5CViSltTomLcy5LzS9pYP Y+2A98Xv8fbUHywJOzGh+4SzipMBFz2+6LKIBXMg53mVGq83H5aEBBCSm3vsO80rtpOz9z+sQSvyZ oCttMnfvV3dtYm/3ZmMA==; 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 1iLNJt-00081E-35; Fri, 18 Oct 2019 08:09:09 +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 1iLNJi-0007nQ-UD for linux-riscv@lists.infradead.org; Fri, 18 Oct 2019 08:09:02 +0000 Received: by mail-io1-xd43.google.com with SMTP id z19so6431297ior.0 for ; Fri, 18 Oct 2019 01:08:58 -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=D3NziRvdn2+kK8Uw4QbU0HMH6O8cLDFVZEbh6XeL1sY=; b=lqJfzdKNaEFx0hT2tODMNbgiwNHA6Kmcm4Um5j3ElqOCn5j6rHDzIcmXOKjkGD2lC+ 4fYlfzTL5uhT/541KfGDdAjiiXge9m4vvFi4gHNrLINVBIyBmNC4ZoqNhVsXc4rLhUTo 9O385Y2HDSywuXsV0C/QQOltOcVMuNrpQJ6pDU9fXw/ZfjxBpJaLKgSOwkqMem0ZNAqi +YaL1CmmnrGqMMBQiIhA3Rwks4efl3Qn7ppCumtUZpjNdoNH23b3oWCQiSf2jjeaqPX6 pUQThL8NTDmjqeQtijTtoBk/1yyoVl4v0sT1Qk3XxjUHnutkh75MtGv48oz6wtuy9zvU e+QQ== 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=D3NziRvdn2+kK8Uw4QbU0HMH6O8cLDFVZEbh6XeL1sY=; b=K0hozlBfZjqFcM8s8F85XCvOWAzXZeYiU3n4pKjFS5HTnI/gzfSopWJsror+DFGfP/ o7AEJZg8kD28STB37QbjBSZ/cDWD+90DKjurTUYpQNYdXFQp/d55qBevQlR104qTDy5U bqbxskrDkZrTcPFS/NPEMDGnkG1cVLWNzA50Iyf4Y12VgadrvUT7SNUO4D8nRGu6fWy9 UBEB4RAikdTPXmpRKi1FehI7hyJ9F0OBGNE8x1e1AOVSzjgvvU05MP8xjwZD6g0jhNds i5z1ly4EstKq17iBKAicJ+EJM5o7oBJW5Tm8cakVeO5eGL0vMeVhD5b/K2xegs3Azc2h 3vnA== X-Gm-Message-State: APjAAAUWJgtsGCzbq5vUNDSupqx65HH+coiMyJ8+mbH4cP7buTANlD1J K18d8Ve/Ph/xp+qfZncf18OyjBf5h9A= X-Google-Smtp-Source: APXvYqwibc/n93kk4yioI3cYg7enfdR9vMrbYOYDY8We1QY/Wy8+oF9ryOtojL4Vfztlf26jhCNyyg== X-Received: by 2002:a6b:7307:: with SMTP id e7mr7757122ioh.138.1571386138008; Fri, 18 Oct 2019 01:08:58 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id z86sm2121026ilf.73.2019.10.18.01.08.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 01:08:57 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Subject: [PATCH v3 6/8] riscv: add missing header file includes Date: Fri, 18 Oct 2019 01:08:39 -0700 Message-Id: <20191018080841.26712-7-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191018080841.26712-1-paul.walmsley@sifive.com> References: <20191018080841.26712-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-20191018_010859_049610_00F597E4 X-CRM114-Status: GOOD ( 10.36 ) 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_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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: linux-kernel@vger.kernel.org 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/process.c:93:5: warning: symbol 'arch_dup_task_struct' 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/time.c:14:13: warning: symbol 'time_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/smpboot.c:134:24: warning: symbol 'smp_callin' 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/smp.c:70:5: warning: symbol 'setup_profiling_timer' 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/vdso.c | 1 + arch/riscv/mm/context.c | 1 + 12 files changed, 16 insertions(+) diff --git a/arch/riscv/include/asm/irq.h b/arch/riscv/include/asm/irq.h index 589e2d9fb2a6..f0e9df6e6049 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/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 Fri Oct 18 08:08:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 11197713 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 2168919A1 for ; Fri, 18 Oct 2019 08:09:12 +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 C684A21D80 for ; Fri, 18 Oct 2019 08:09: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="ao/FeLC6"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="BH2SZAJI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C684A21D80 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=BeDcrUBXCnacWulnoqp4NgDlD3cyzuazqLB0F+KXtBc=; b=ao/FeLC6bO80Sv e5xxt413QpX/W5FUr3Vv2eg1DowP85BgEAOGpDU1cRuG4VDiG7M0PS3aTWcl/SwP49Rd2u5F8lC7o phZ56Vuh4enX/66sGkJwyj5MVMn0dNUAwk2rof7o3hnmHQcRDeazw1DkE2lHrw94a3au1mUZ2cLBt Y6Op9uEExTEk/oFX5YcqkZI/bvvCP+ODeE5nWkac4KnsxWvrroixkGXJ1S/ZndvjIMl7gDwzAQGNA Zaxqe3qwGv841+hwuOdV/Ieo19z0keYHSw/s+Nrucq5KAkT/P0Szkn1OZLP6NSn13Mu1MxmKbPWVN GVOyI0z1dIwqC0Gq5l/A==; 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 1iLNJu-000846-Uk; Fri, 18 Oct 2019 08:09:10 +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 1iLNJk-0007p7-Ez for linux-riscv@lists.infradead.org; Fri, 18 Oct 2019 08:09:02 +0000 Received: by mail-io1-xd42.google.com with SMTP id v2so6351509iob.10 for ; Fri, 18 Oct 2019 01:09: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=BDNARAWoiAFizEyliYmITz0WDECsamFFfEfTjTwse14=; b=BH2SZAJI7pzAjQaIWJl0yJG8OFbAURLSsSN2T7bCaujThYLoFQwOn6z4+Yy2Nr2i+7 VeOFWtmiAtkfd1NjwrjrebM0WUBRv8nJcBFQxeh82F+KKEUrePTE8zrGHu7G7QQ+nCiB Qcb/YSUdh+FN2Z/WjhYa/giocNRxKLilLM3aGMBc16ZftLviykl0epsG5X3Pai//FG4P 68XGtwnDzgtJ1EdabbhJ81T05HwEeiiQJh33FBXeMxf6lj9j9sFxkz1t085zaU8WVa2n hvGfdEvhyCGvBxu4rYLb/g6wl5sOfaxorW7fhDuZPD19m3IimT3JiPejWTbVdryCqfiS bv4Q== 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=BDNARAWoiAFizEyliYmITz0WDECsamFFfEfTjTwse14=; b=J5VKQIPTYyuUcQJYzxpY+cyRw6pT/31owWSeDwtyT9L9u+rulgk6K8uc/PD9FCuD8s DOxBR7tMX044dsFvieVSTdIx2b+os7ZkfULb0CerTFSyqJXGzIhlKC6oCPLS4rPn0Q22 dhmnSoC9YJyfBHEB2oeMJzg1fi/B0htaR72KDPjOY8WvC+GuZj1u+4WlgHuAYH4Qk36p Nsba37cjwcFQzJJfGCXy5NYB4GASoiNcRYGO+O0tOj3M1raFLOT4yJFKW++90Psjm1VP 4y7Ne0qL+XH5rvKTq99sJ8/rmZ4f97qqH6+9A0d3tODFXZFIkuRn03D6niCELpBQKnAi NmaA== X-Gm-Message-State: APjAAAX94DxRyUDApyUTXb+ovvlqYDl8S1etjWETKjQTHlk8QLdRHcbk SLcvpp/y0ZVH+m/vJlvWkzqIGEQfwYM= X-Google-Smtp-Source: APXvYqy6AwVkDkkhxvbEhidluVWq8r5Xas/hfQEFm/idpPNWew4L2BI8RKV4B8QWgFUYKl9y9I+90Q== X-Received: by 2002:a02:6508:: with SMTP id u8mr7939505jab.28.1571386139226; Fri, 18 Oct 2019 01:08:59 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id z86sm2121026ilf.73.2019.10.18.01.08.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 01:08:58 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Subject: [PATCH v3 7/8] riscv: fp: add missing __user pointer annotations Date: Fri, 18 Oct 2019 01:08:40 -0700 Message-Id: <20191018080841.26712-8-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191018080841.26712-1-paul.walmsley@sifive.com> References: <20191018080841.26712-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-20191018_010900_540587_57244B5E X-CRM114-Status: UNSURE ( 9.69 ) X-CRM114-Notice: Please train this message. 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_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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: linux-kernel@vger.kernel.org, Alan Kao 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 85c700ad47e9..9437167f463e 100644 --- a/arch/riscv/kernel/signal.c +++ b/arch/riscv/kernel/signal.c @@ -28,7 +28,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; @@ -55,7 +55,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 Fri Oct 18 08:08:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Walmsley X-Patchwork-Id: 11197715 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 9B90419A1 for ; Fri, 18 Oct 2019 08:09:14 +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 7973821D80 for ; Fri, 18 Oct 2019 08:09:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cXzj/51t"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="AgRnIqMP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7973821D80 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=YS3TeYws4BDPv6bCVuM8vIrFdMBXfJhLaBSZazHgkiM=; b=cXzj/51tz67fq3 Hj/xKVf8nr/GCut0Y9BDJ3mykUYMjcfp481JntmRtegTWZ3lsXE54yHXAlD1ZHocPEu4mphMz9jf9 do0W2FgD2zH+F71BnG7nmsTg9tBzr/3L85g1LXk6MVvrAk7E5RfEZRzqwBn+hy7QnKIRKVuXqoG/o CMf82K9JFpR4oM/K2Rwd12j85QAiq8l+31pSVindNl61DiT75X0D20h5kb4kKvTCCwLBlE55XxRPD 1DEka2IelDXarmMShtxCT/7hj225p1pBdBXIpDAUGnwEu9RLOCZIB+Xy4QXZbFlDV/6tLGKWI1Gpa x6PDvgSWdr32+rgKRzFQ==; 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 1iLNJx-00087k-E2; Fri, 18 Oct 2019 08:09:13 +0000 Received: from mail-io1-xd41.google.com ([2607:f8b0:4864:20::d41]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iLNJl-0007qV-BL for linux-riscv@lists.infradead.org; Fri, 18 Oct 2019 08:09:02 +0000 Received: by mail-io1-xd41.google.com with SMTP id t18so2274524iog.2 for ; Fri, 18 Oct 2019 01:09:01 -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=/rqN9u0/2+ao+d3JFwKTj45TNXeBg3DCl+L7bcDO5L0=; b=AgRnIqMPI9/c78JU0tZ2ukpZmzDiY3JwBESuXLef+ZlyuwPVl0hWk/I4aTbZ37Yz2t wBXespQ6ClJkWurhzK8+z7L3vufj/oD3RDQaBgd+c/seJgwQQwIKdHefZrlyFJm1PCaP D8yAK7khexd85MvufOeWx+kF8/B+8jToNlCiBDxueaWGhck1V9xJ4TPeI5auXeWOPr7D /bsc8iL44mCKAVSzpqLdIvfiQe2wwwpzVWof8Jj3K1Dqhnqb2ZcckbrUGMk0ZRnFupa8 GN/mgsOHEg6SeW83zbui+yitvxqgYKaHLceFXsigsvd3STC1fivnrdZuoJgP1eEir9aV 7k8w== 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=/rqN9u0/2+ao+d3JFwKTj45TNXeBg3DCl+L7bcDO5L0=; b=tY8J1mrv0/tLRfy88aCUxBRGnsh1i5bemQ6lMwu5CBTGgAHS/ZAX7bq8OXuateItyg pKMl778+3eq2NyFsGAUrOCfH4eJcRHMkEivDHpZLA6NuLIWx0vzZCNrB+ukGAE1eW0ck M+j4TtF5VLdOlf6wxee5npqwMiptrUv3zm6dtwEMuPEMroAxOGtr5TDpT8lavIHkSa5p 0quAqjMqn/N4ZHNDbEZ/268flcpMUquW/h+kYI/xAR4sEgUXT6R6zzCULt8huh9VtLWz FiQoTPQFVM8K1GA8PuBHplLK/9OuizPb40BxF+dCk0PTG5PZVgSMhUzHVknvYDT7D4sd ha6Q== X-Gm-Message-State: APjAAAXezcrDeTYQB7HhjCtMPmdGa5Ay8tMiX6NFqcw/AE5wHknIQnn2 44Olp0kG5BzFtcdcjI5wCv90XFvMreo= X-Google-Smtp-Source: APXvYqxG7epqlIJRSyy/8bM9quGUJjMyJ24lYOlQwYCPAW5aHjJzro/76ki7t3mpduRVDdN14r7s+g== X-Received: by 2002:a6b:5a09:: with SMTP id o9mr7397346iob.241.1571386140466; Fri, 18 Oct 2019 01:09:00 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id z86sm2121026ilf.73.2019.10.18.01.08.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 01:09:00 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Subject: [PATCH v3 8/8] riscv: for C functions called only from assembly, mark with __visible Date: Fri, 18 Oct 2019 01:08:41 -0700 Message-Id: <20191018080841.26712-9-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191018080841.26712-1-paul.walmsley@sifive.com> References: <20191018080841.26712-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-20191018_010901_395428_57929CE0 X-CRM114-Status: UNSURE ( 9.98 ) X-CRM114-Notice: Please train this message. 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:d41 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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: linux-kernel@vger.kernel.org, Luc Van Oostenryck 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/ptrace.c:151:6: warning: symbol 'do_syscall_trace_enter' was not declared. Should it be static? arch/riscv/kernel/ptrace.c:175:6: warning: symbol 'do_syscall_trace_exit' was not declared. Should it be static? Based on a suggestion from Luc Van Oostenryck. Signed-off-by: Paul Walmsley Cc: Luc Van Oostenryck Reviewed-by: Christoph Hellwig --- arch/riscv/kernel/ptrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c index 63e47c9f85f0..0f84628b9385 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)) @@ -172,7 +172,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);