Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp332535ybf; Wed, 26 Feb 2020 14:05:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxotaJDtqbEJV92qXR9h0rLM2bOr6rxXy0GNKEegZVjKPM2sW/wCPv082d+5y2uIK9UD6x8 X-Received: by 2002:a9d:6212:: with SMTP id g18mr783280otj.187.1582754716742; Wed, 26 Feb 2020 14:05:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582754716; cv=none; d=google.com; s=arc-20160816; b=DK3hsT3pkgJPzLmTQY5Qi+mZTm/I2FLvvOuT2WOGJffielzKd/PBUy4dCDqVgRfngk USHc6nr6cZURIbihZIJzacevpx47bHnRDDB0BwxNp1sTbmeu0mWKK6fwG/nzl2pztOg4 zokhYO1tzcyepzr7esi8iedK5ILzQ+iJY7VotJbFQVz2OuTOvII1Ow/kb6mYYKQmRdH6 GDCzmI5EClDfiHzDakoT6CJoqpK6E6+aiUDPgKt6P+QkfJVnuq2wiS+rUMlomnMUMaUm PFP1tV0PRu6Y0pKH9ZBoEhzXkEvoh3ZjIpvN+hxnrJYjbIBAau/+tfGA25t5rWkW+X3A 8Ruw== 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=zMKRgPZQqBDX7dImFKAFTs2xTyaBV4wkVFd8eAzc4fM=; b=TnzX4KED9g6eLfVm7s0rgAhjiraArioi34i5TdPfk/OtFyU1EXakFf3lO7hFVadW3X kpQQPKBy2iIOUOD2/oy3Qz0y/3oZaeXlUblZnFAbkk8XWmp8ex7Cfj57/UHFkv9naeh5 m/K3rm/kr+/mKXFDSesqBczVwRFvTSD+QA0wrKQHfXCXKRmTDe4+/Fa/N2d+W62p5W9y 23bF495wHKiSz+Wpslv/MqqOHJhjSvHYfMU3p7JxS0ocNU3xLuqmsd25UWLxJksGcMWC gilHMzQEPg7q9+EGqr18UMMMMsv1pFg1Y9JXl/0HTrC28FW+eyTGDV7yYQE38zDNi10W W27Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=UggKKzIx; 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 k16si299348oiw.128.2020.02.26.14.04.51; Wed, 26 Feb 2020 14:05:16 -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=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=UggKKzIx; 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 S1727774AbgBZWCr (ORCPT + 99 others); Wed, 26 Feb 2020 17:02:47 -0500 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:45043 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727881AbgBZWCZ (ORCPT ); Wed, 26 Feb 2020 17:02:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1582754545; x=1614290545; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JqXfvLC9I8btjifDyDxA+vz0y13stX9yiYKqjoJkjmU=; b=UggKKzIxrQMSHQA4QAKAbus1hkfJHhj2E+YEHIZzQslMBUdeczbjJG/2 KLcQnnRWDIaCzovsts3rD9qtq+7HwctjnMM1+LaaP2rCSep6JZ9Dj2RDe wpToRwwDNigQcyOO3nvNrItyWHxdqofwwpSH7hE/5wjLoJW6shig/5Atv u58rqF/1isBQId7g1HIHFVdAWmvTPxxuRf1/OBo8zb3wgM0KU2iBh4LHg 35jorpr6UR8qNp3fcUgfE9VzQ5TA94UsmFq57ZLXIMefkVmpqwiHvxlxK dd2NGZ7ybpCbcIeqC+EezZ+ke81fYzPf57+1j/VHCckoC+2zHLK4MPyT+ g==; IronPort-SDR: q6Zk/FjtH0+o4gCAUjGYVpN+tPAjO0ATV/INIBthNj5bEIaLidO8rDt0uDwNtxBq/F+lDeqmj2 Sepn8QZC8cXitce0PxgjL5mluxIG3QqLATPSw4JM9298GhGWH2Omi1pNe6N1mME4IeYwCL4DlT qypzw/rC/n6QkPCwsVKQ8ZzZ6BwgeDq9/LVsrEzfobFXibpbpFyhc270p01CGin6CLjXoPGJNN pN0qlU89cVb0YxcbmY2m22SyFq/mbaaa99xeA7Rs5s6miwlFB+WDDhwDO7kO8e6qqVfUeTxWN1 aE8= X-IronPort-AV: E=Sophos;i="5.70,489,1574092800"; d="scan'208";a="132290740" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 27 Feb 2020 06:02:25 +0800 IronPort-SDR: MZlEgA5Y4GtXhCYvgdHfngCfD006+qwzyJpXeZ+KKrBn+YQou8obI7wgeZn4EUlJ+j7kiWJeld 1/u6LrdpyH0UXB1vTO2PmE6cfGuzxbsQvGjFlbC7Gfi/gdIBKZUnTuflOlO18WpO5hz7lQV0W6 ZXHLITwTsHCML5v2aa3AaLBjRh/barRyrD53gMfwkr9LZO17rdmyMWtnTpSH1lKHxG3rf9iE1x 0fYA0OWn+tsoV6q3QXuW3V6r7c+GafPGF5rXZB94HvqRk00pLU5n7I0jwj1vs8FMwvy88le+qk gK+KC6vZWtx9P5KWwM9rr58p Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2020 13:54:49 -0800 IronPort-SDR: EVY8lUPNbgljmW6HqEuqUs1GnjnBfBSafUXNYMK1AMj6XuCsBqsRkDnNQI1K0i0CCkdrN7W9V9 ysHazwBXnlQMwZfgMr8PTvYVU9zP8Xyi9hfVBkXLxN9hZDPt5ln0P5Jv3UJDkg2dU9+tPydUPz gVWO1CYmsd52gIsvas27XINqLZ+RvJPkXX6yH30hsTpy6aeRfPlD4Lvlji8UTOFG3GoB+LvUgY gKa7m8TeX4ssIDVdSdE9QFEJx3uLqo46bT/S/VbJtIeiqdIaAr62kQniHQwh0ZLSdesWkyhoT4 Uq4= WDCIronportException: Internal Received: from yoda.sdcorp.global.sandisk.com (HELO yoda.int.fusionio.com) ([10.196.158.80]) by uls-op-cesaip02.wdc.com with ESMTP; 26 Feb 2020 14:02:24 -0800 From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Anup Patel , Albert Ou , Alexios Zavras , Anup Patel , Borislav Petkov , Daniel Jordan , "Eric W. Biederman" , Gary Guo , Geert Uytterhoeven , Greentime Hu , Greg Kroah-Hartman , Heiko Carstens , Jason Cooper , Kate Stewart , Kees Cook , linux-riscv@lists.infradead.org, Madhavan Srinivasan , Mao Han , Marc Zyngier , Michael Kelley , Mike Rapoport , Nick Hu , Palmer Dabbelt , Paul Walmsley , "Rafael J. Wysocki" , Steven Price , Sudeep Holla , Thomas Gleixner , Vincent Chen , Zong Li Subject: [PATCH v10 08/12] RISC-V: Export SBI error to linux error mapping function Date: Wed, 26 Feb 2020 14:02:09 -0800 Message-Id: <20200226220213.27423-9-atish.patra@wdc.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200226220213.27423-1-atish.patra@wdc.com> References: <20200226220213.27423-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 | 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 8766f6af9eb8..82ff88f06ddc 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 932b23272be5..3a2a5352316b 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