Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1504866ybv; Thu, 20 Feb 2020 22:01:49 -0800 (PST) X-Google-Smtp-Source: APXvYqzOReapwaRKoSkWvSJQWMEmZz/oK/3W1kiMlRGoYgfuRzK55C9LEVJpVk0pofKCRVu7lGSk X-Received: by 2002:a9d:395:: with SMTP id f21mr26990716otf.67.1582264908761; Thu, 20 Feb 2020 22:01:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582264908; cv=none; d=google.com; s=arc-20160816; b=JEtxfIx6bAQ/wZ44r8ugZT1AO2qCEDlpOaXhg82zxNR+3TEOBfApMF5D4TjiGrbfgj 49qTitmHqBSetggGEkgHqGQjCFSLUflu/xyqIkKQ7NGha9zbWkn8FdSrh5akgCo6Oh1t C0u2DuWfGceynok/sN3PL//G+p0DzBfB3yquvrELTVlEgrwoAxbV8odUnI1vjzzC/epH WjXaxNbiikIXU4/fecPyStkElzaENhzy6dpUCK226e9wHgkg07lKKhhadnUCG7qIxyRk iX+wKL5H/zakY5kgWYQUy8obYMdsCRq3WD5IQaz6h9yRKjGCz/9H8eX3fAj7EXbISJZa rMsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=BmMw69yF1xjsB+33COeMx7MgH3XoFsnMEnp3FC6eBks=; b=1K8+83PhZvEMavhS9kS9rm8s3RDEIA5cbXG2m7zf0mZW5LOokmhtdWpKEimvn4fbfL 6v5Rg0wneYhNUG2cHnqq9UvWA/bWKoK2NDV0TE8xzbXoT4tZ32WB+I6hl53SfBHNguUB ygMgP2CJUxQzE4pUQqJbxeP/j8cxNwDTxqaeH0d0mqRrWfqHBl5I1mVmQ83gqqMBhfBi KIKufxJG2tFYtgoYbG/Wc8JRBfUGErEwAagIg8onCmmXYSRCSTJD9QA78hieaDyDF/E3 CBnvCfEcDeE30usAR+v0drgEoOuXFTaHrBdZYeMO5GGYj3VLdme1L5tmeC7SmLMN+2hO D8VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=uDyg6dtZ; 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 n24si1055180otf.58.2020.02.20.22.01.35; Thu, 20 Feb 2020 22:01:48 -0800 (PST) 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=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=uDyg6dtZ; 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 S1726325AbgBUGB0 (ORCPT + 99 others); Fri, 21 Feb 2020 01:01:26 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:40560 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725973AbgBUGB0 (ORCPT ); Fri, 21 Feb 2020 01:01:26 -0500 Received: by mail-wm1-f66.google.com with SMTP id t14so404671wmi.5 for ; Thu, 20 Feb 2020 22:01:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BmMw69yF1xjsB+33COeMx7MgH3XoFsnMEnp3FC6eBks=; b=uDyg6dtZ9smsx+eqycwjMVDhcPmlDEP1FZK5nl/O2qvCxKvW1P94PT8OnzZbHwCJpu aN6M1H98LeutAxEAsUOtYbTjq+rVGdUqgZRvdwDbgzyvTAQRoDVZisFPZDjF/CE0YUnC 79gvRuR4oO27/YGdnNKEEseriACNpkx0xVTJ3QFQUlhSI33+LJafkcVNQCnHiQtZrB0o ghUUHwvrlhn8PiFdgTV+ffKNK5dVIvOyIn0fsO75TJWs4w+Jl4Qm+FVtDLtgn7ZKEDhd if4toeJjJuDjr0I+ECLbTjnulqYAvq4asTBj7oHOkCq1kJTnxlpUnWOgwYBZsz7QCfqX 1OaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BmMw69yF1xjsB+33COeMx7MgH3XoFsnMEnp3FC6eBks=; b=RnpH1YrhLQZpzUxlIKNpUXQe9L1xs8iPVKR3SFC6QzfdKyMRQDR5Z0bh8iOOcHJ71o BbGhnbmA4PeAt/Tb0AAVUOsZuXdw0XSUczZS08na2DoNZSrc1F07mYuSe0z4lKt+ItaF oLntjrNAJom/Yw0Et8l5SK2UvYI+nprp1/UVagxBln7OBBmm9v51szhaxNr598rwju35 CaoICSLhAJ4TBLV1iMBFA07GkdCYn3ak68Hr9O5M6t3kXjlA9LaPfhuweo/kPA1mOJ0K aYgO6urldFnh/hjeVxrmiiO2jxi9sxXSAZOLrhbrOVlCfGjYqOmSnS3U+XiUF4T3cg7a NLOw== X-Gm-Message-State: APjAAAW5INPNl0LYkzg5Tak+YYq6uS2uB3ZtPgVZJM12XB2uOTuqC5E5 05JmQpGv5p8rfkulZ/hQoROICZ23pWJGPNf/8pFHIw== X-Received: by 2002:a05:600c:285:: with SMTP id 5mr1460069wmk.120.1582264882627; Thu, 20 Feb 2020 22:01:22 -0800 (PST) MIME-Version: 1.0 References: <20200221004413.12869-1-atish.patra@wdc.com> <20200221004413.12869-9-atish.patra@wdc.com> In-Reply-To: <20200221004413.12869-9-atish.patra@wdc.com> From: Anup Patel Date: Fri, 21 Feb 2020 11:31:11 +0530 Message-ID: Subject: Re: [PATCH v9 08/12] RISC-V: Export SBI error to linux error mapping function To: Atish Patra Cc: "linux-kernel@vger.kernel.org List" , Albert Ou , Borislav Petkov , Daniel Lezcano , "Eric W. Biederman" , Geert Uytterhoeven , Greg Kroah-Hartman , Heiko Carstens , Jason Cooper , Kees Cook , linux-riscv , Mao Han , Marc Zyngier , Mike Rapoport , Nick Hu , Palmer Dabbelt , Paul Walmsley , "Rafael J. Wysocki" , Thomas Gleixner , Vincent Chen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 21, 2020 at 6:14 AM Atish Patra wrote: > > All SBI related extensions will not be implemented in sbi.c to avoid > bloating. Thus, sbi_err_map_linux_errno() will be used in other files > implementing that specific extension. > > Export the function so that it can be used later. > > Signed-off-by: Atish Patra > --- > arch/riscv/include/asm/sbi.h | 1 + > arch/riscv/kernel/sbi.c | 3 ++- > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h > index d55d8090ab5c..abbf0a7d3b6e 100644 > --- a/arch/riscv/include/asm/sbi.h > +++ b/arch/riscv/include/asm/sbi.h > @@ -130,6 +130,7 @@ static inline unsigned long sbi_minor_version(void) > { > return sbi_spec_version & SBI_SPEC_VERSION_MINOR_MASK; > } > +int sbi_err_map_linux_errno(int err); > #else /* CONFIG_RISCV_SBI */ > /* stubs for code that is only reachable under IS_ENABLED(CONFIG_RISCV_SBI): */ > void sbi_set_timer(uint64_t stime_value); > diff --git a/arch/riscv/kernel/sbi.c b/arch/riscv/kernel/sbi.c > index 38ec99415060..d0c9516b6c0a 100644 > --- a/arch/riscv/kernel/sbi.c > +++ b/arch/riscv/kernel/sbi.c > @@ -46,7 +46,7 @@ struct sbiret sbi_ecall(int ext, int fid, unsigned long arg0, > } > EXPORT_SYMBOL(sbi_ecall); > > -static int sbi_err_map_linux_errno(int err) > +int sbi_err_map_linux_errno(int err) > { > switch (err) { > case SBI_SUCCESS: > @@ -63,6 +63,7 @@ static int sbi_err_map_linux_errno(int err) > return -ENOTSUPP; > }; > } > +EXPORT_SYMBOL(sbi_err_map_linux_errno); > > #ifdef CONFIG_RISCV_SBI_V01 > /** > -- > 2.25.0 > LGTM. Reviewed-by: Anup Patel Regards, Anup