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);