Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp64853ybh; Tue, 17 Mar 2020 18:13:18 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu431s36J4x/Pk2Z7LCUHSNWWCuUsYeDXuGnqCU71aG3OfBSWGgT0cWMOd08WKStMeKfPuX X-Received: by 2002:aca:df45:: with SMTP id w66mr1353207oig.76.1584493998311; Tue, 17 Mar 2020 18:13:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584493998; cv=none; d=google.com; s=arc-20160816; b=xvUp0+0/tssd0No3D1Mokz0u0CFPLTaHUYLyBP0gEbRtZwUyogSO4E5q20e/nHz8qP 1qhS4bhG71H1liuPzOtfNw9lBScV4bHZEY+uvotSbWEoqv72PwFM3a+tEPcGogbKtBrb OlvbiHbpnWV0gi5Y6dk3dFqkyQy4OjmOTl4lDEYqiunhOVjbYJ8Xe+vgaGKtmHpD/lR2 2mf7zeHDnF5zbwOnK65AN20hA7XuF0WHta269O3DaKuQOpNF6tADkU7Eil61zpC6Jfu0 KxbrGSoGx7udPpqyxxSoCt6bEJnFR5SLRUri3DFCHPYya7nIo7amo2xo1wU5IyhFOdsz 6Cqw== 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 :wdcironportexception:ironport-sdr:ironport-sdr:ironport-sdr :dkim-signature; bh=ohhMsEsPSqdVABGyw3/cvkI6GJoQfMmhZPw+IbwcnGI=; b=oojUK0U2OonibmuFqY5Ej3eJ7CVtiJeoNq/pxc1WhEL+9eJVfBp0M7tfVtT+3J6RAj e7FvMQkaK0vzq8tUyxhvQSl8Da9w+hpbgsjwlWEvspF3xz9v0Ig8HK+l4boVDl8qRgzZ YjAZCF8O1iAw/7IwN0yOOr3kjlNT9UYeqdeksE7nHU4rt0JfEq+hO2Sce4XGUFu07B46 aPys5tJ33IE7tXt/lIrPHzO6gp4QvV9ttnE48ZdZaykR5EMvFUTlZrMuhSnetTtcMdhk Hdzg212WzpbeitoWg+40V2pQNzKMI2w4FSROStqatzoss4682MF7FjzRfwm548MYe3lH ZhHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=AcgJaiUV; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a206si2467559oii.132.2020.03.17.18.13.06; Tue, 17 Mar 2020 18:13:18 -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=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=AcgJaiUV; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727427AbgCRBMF (ORCPT + 99 others); Tue, 17 Mar 2020 21:12:05 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:45915 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727366AbgCRBMB (ORCPT ); Tue, 17 Mar 2020 21:12:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1584493922; x=1616029922; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Q6YXb32CE2pLZ0eeb2hmqPLZGTgurXN/jf3Ug28bkCs=; b=AcgJaiUV6vuVyPbt8ZI5SgQpsfKwdviyG1zzLRFOL1hDWif8122WgAqZ nYdfgx+B+kRAqdV+cTuu/cxxttQZEuxUiRz8InUg1jdCixdgnzB1RCxHZ /gXuI5o7VqyuMi06CjePf/h+ujDO5HPdiqfWEwa4WOK8roq+Z+xhcUY0X sIvBICuZiyObS/p95LK5HCReTFgCKZ9gn90elfcqiOjVn1TWXUgFiqq71 MZGM7NZtZMRXSEdMsqbQ4VWMM8atL7u7rfkU2coXLzIJZ32ECQILMU95q UMX0DwD3km7664GWrERpfoZE2y2XwuRblfJ0o6XmYkUaXIlokGwtV7oLw w==; IronPort-SDR: wFAatpMdvODMX1zChRWDVqs1d6+G2Ln4rtYk0tB6v8E5pMz27D+j40BTyg+M/NSk8EHc7ohxEc m54E60NKpdCUXjCq0lwAq8LuVyF4q4KLZsDf4CCgf8oyp/lAU4AHRuCwBCKS05iCZOkj964OMu Pk5/STvO2Dqh2yueqlMrW0PrRFDx1PiX420B8wSkCTHw84NEnMdCarsiIEuaBPWOlVScdM1jMt mLzNWIIxqkrNUySss2pdfxp78AYJVQtEfj/Wi4RjpaV+xpb4zt5WNGL5eNKehvp7D1psEC+Yiw 468= X-IronPort-AV: E=Sophos;i="5.70,565,1574092800"; d="scan'208";a="133241527" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 18 Mar 2020 09:12:00 +0800 IronPort-SDR: 8UqBuFfMUmCt5AC2V/D6yxTpIms+4dU+F5vHDKVvaZzr4m33T3SUUl4Ut6K5wtq8Oel6TYDwrC g0h7fqVG2mDfGB4IBvwncL0LngwFYfcvEzcWdlWVvykFkSpkoFn0cjOsjkJnj9y8y0Gjnt8o9H NpMgzyn/Prnb5x33EBw9CJueHl0FoJths+skGSxUEnD00FFobSIp66lNMAaH0R2X2oJxY/dV/2 iz5hPoLmaTfHsw3n33bU68kI2c69rMkvgE7UjsVdIrY4qfKLO+zRRfi8kFdwgxdKeNBf6qUVCO 6sNxIFXnap7juzKoUk6f4Umj Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2020 18:03:50 -0700 IronPort-SDR: yoRFOeeKE7eFVW9hxvf+GM8dj/MQId38frm7Hi/bC+DlqYxWz845Bj4zByRLPCtR0deYwX+zCZ xpn/OLtNxv0ZrjMZxN2EzHJXz0AFTqabAiTbXMlOv9lW2GCTNJ6xI7CK6GucFWSI+Aa/SUODu1 /KoQ0X+1HNDsoFaflyquRjRSZB8Qwg6B9fXIVve3keYb5M1VSBzNkqvo4WP5pxL1CwmuZm95lY wZhgB4lb1yoDNKBvO7/can5netrk7DCcJUZa8XlK4az1Yc4uaOvt4t0KklCypquNW8B1ixtX6Y JZw= WDCIronportException: Internal Received: from mccorma-lt.ad.shared (HELO yoda.hgst.com) ([10.86.54.125]) by uls-op-cesaip01.wdc.com with ESMTP; 17 Mar 2020 18:12:00 -0700 From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Anup Patel , Albert Ou , Anup Patel , Gary Guo , Greentime Hu , linux-riscv@lists.infradead.org, Mao Han , Mike Rapoport , Nick Hu , Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Vincent Chen , Zong Li , Bin Meng Subject: [PATCH v11 08/11] RISC-V: Export SBI error to linux error mapping function Date: Tue, 17 Mar 2020 18:11:41 -0700 Message-Id: <20200318011144.91532-9-atish.patra@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200318011144.91532-1-atish.patra@wdc.com> References: <20200318011144.91532-1-atish.patra@wdc.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 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 Reviewed-by: Anup Patel --- arch/riscv/include/asm/sbi.h | 2 ++ arch/riscv/kernel/sbi.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h index 29ce2c494386..2bbfd6bada93 100644 --- a/arch/riscv/include/asm/sbi.h +++ b/arch/riscv/include/asm/sbi.h @@ -130,6 +130,8 @@ 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 1cc0052e1b63..7c24da59bccf 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.1