Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1297259ybg; Fri, 18 Oct 2019 15:25:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMj0dk0jToGvpWVBfW+y7W3eEY4PvHBYlOTac8DS0NGKn3KYSlpIlw3jAQvMRBMZbHx/1+ X-Received: by 2002:a17:906:7257:: with SMTP id n23mr11299233ejk.132.1571437515578; Fri, 18 Oct 2019 15:25:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571437515; cv=none; d=google.com; s=arc-20160816; b=JacO9YPaw+mH/IIX/unYI7adxx743kkWnBhmMXhO+3ofxo99U8ISPzrBlzRB9WfTOd 1YxeM1HzkSp7Si1sRpdbuM8dWpyfaorFOz9h5n/+lRR5YULECTMLsNPQ4OVBQpZ+AHuK ZSth5Ebohqv+Fwwn3w1LqZbfewJlhITUW4utoPuyH3zwHRvTEbVpOGZjN0/AYYr+tzmS aEEFAOeDr2ZE67fsvVoTtWS3INUYY56Wv6lkt8DPrz3GtACzE3lZnETpiZ39hAtVP78q NY04/H8nAL3XrdKaU0g7Ps6SoxfeDd1D3nnHU3OMgkl7fQE5XboMXRxd4zNv2vX64v2A wbCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BhNZJ/+01P0kEF6Kf+e/ysZ/4G6fTDDw4/sqJjXlOAY=; b=hljSciUdTduE4zIqLYvdUd5pMrt7fLwDC4bKTEulg8RBvOeimElvaMNmjaum3Ed/NY QPfJABFvjcFJ4qGtGN9rVq5rtNNZFJbZW4NzMb/C5aMbF7Wi8HFi52cfxYpiKRu8FGAW yCGHRrRN+AuZf2XUJ0Yo2BbcvL9xEh/NnNm5VR6qDDnlFgHAWKmd6BdlxYMtAMQKY1qL ABuOfvcBaZaeCNhaHbDAFwPNN5Vlnw7FIlcNhy498DfMcpG6lglasHwg8a07MjFw2bx2 85uKk5UGqjKcNTHhQZKiUah9UUDa64b9lTTU4DYRlgv44BE54kG863aYwamHvKCh1pz0 oJVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=ehkIOPdn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z11si4892939edl.1.2019.10.18.15.24.53; Fri, 18 Oct 2019 15:25:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=ehkIOPdn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407306AbfJRAtx (ORCPT + 99 others); Thu, 17 Oct 2019 20:49:53 -0400 Received: from mail-il1-f196.google.com ([209.85.166.196]:37910 "EHLO mail-il1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726951AbfJRAtx (ORCPT ); Thu, 17 Oct 2019 20:49:53 -0400 Received: by mail-il1-f196.google.com with SMTP id y5so3941400ilb.5 for ; Thu, 17 Oct 2019 17:49: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=BhNZJ/+01P0kEF6Kf+e/ysZ/4G6fTDDw4/sqJjXlOAY=; b=ehkIOPdn3CRMG5PytE7+4nIxgQAUmtNUHg9RLR/0iq3ceQ+LLyOya4r2zB9ZQv3rLT EOV6baW5GLOj4xjTpQTUcNeZg2Do0rH9/rM2eoFeq95ROtZugTPXYljg086q218p37XU PupD2xZ3y/8wUtdn4md7XSrO2J63hei4Qi49d6JEvzx6AV0EgK3LhO2WASmsnw6jks4K 43ERMMOjyJISfX4oh0rL3ExTo+az5GNY6b/fiYN+fP0D1JLHXmaYglSRH1YYAI7kUt3V sOalfJpAWI/cKyGM6KDmaSVXDFCGebnbMVU+PT+3wE2TKqj48f/dVcUvKXtS2Qas/QBh 9Vrg== 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=BhNZJ/+01P0kEF6Kf+e/ysZ/4G6fTDDw4/sqJjXlOAY=; b=IemtN8JxeLiwfImKY2EAPuBbMS+ejZ9AWUcsMsJyvR/NdrfxiXHnIGfNU1nBghCVYO xJkBr4E7bBPZ25SLA4AW799FDy8J7bhTAxTxecuaIaWesBhOD+bVSlf5lULIAopR/kE0 c7vSOph0un9rZlAa1eeuTpXtnDKfTtE94YSCzvHxaDLgo2jbHJmwaHPs2DaNhDbnpCxf 8pgE5nIIsI2MNxJlyTV/AC2WjwjgcqEUCW18VzEpZDHpcJes4opIS0VKlDdD2wg02ss/ 3gOSeND1o9XPGpuRzcrtWM7a7QdYTyp9GyhevtRa1hvZSQyUmwlQxnM/tIvSaXczL8wj 9xrA== X-Gm-Message-State: APjAAAX02rn014t26+/nlQulMduYntJGxRGm+2w+OGIOfmRnEAZwhcbp 2UrhfrBnrPV/Vfg1YEVF/2PLqcPDhnw= X-Received: by 2002:a92:c88b:: with SMTP id w11mr6675702ilo.154.1571359790821; Thu, 17 Oct 2019 17:49:50 -0700 (PDT) Received: from viisi.Home ([64.62.168.194]) by smtp.gmail.com with ESMTPSA id z20sm1493891iof.38.2019.10.17.17.49.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 17:49:50 -0700 (PDT) From: Paul Walmsley To: linux-riscv@lists.infradead.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 2/8] riscv: add prototypes for assembly language functions from head.S Date: Thu, 17 Oct 2019 17:49:23 -0700 Message-Id: <20191018004929.3445-3-paul.walmsley@sifive.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191018004929.3445-1-paul.walmsley@sifive.com> References: <20191018004929.3445-1-paul.walmsley@sifive.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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..ec15a9b15448 100644 --- a/arch/riscv/mm/fault.c +++ b/arch/riscv/mm/fault.c @@ -18,6 +18,8 @@ #include #include +#include "../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); -- 2.23.0