From patchwork Sun Aug 14 14:12:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 1666186 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M5KBR5StJz9s1l for ; Mon, 15 Aug 2022 00:13:02 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QEX87NYso8DydZszHhbHM8EJRAohdGYlqWDUKkreZqk=; b=XugbxA9tsLRZaO 1DztuXXIAoJpPnBcDwTGyMFy9z3H5uQp95Q96ml31qSyDTZV2iAdHcYk5qw0EdQBDMvRgjyy6+lEh Q0IyM9Y+gOvtDEoBdKmMIjv5FK0RadBfkgKYkrAcglCmgJX3U4V75f+82x0zo7cb6Lgc4qCQGu/No uXjhWx+9cCuFuqCtfMyVb43mUBdkjpvIS4JKvlk+B/oqqQTs3sw+TDOkR1RpefdQNRpvY9EXYDzlD GbllWbCKMrhSvNNpwRDFZ+aOwXmVd4mF8mO9nfbEXKIamvIfLF7BFAY1p1O8sUwp6m7da/TbPUEZF O0VIIxqw9ZxlBXCvo6Eg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNEMM-0070XQ-SE; Sun, 14 Aug 2022 14:12:58 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNEMH-0070Ru-IO for kvm-riscv@lists.infradead.org; Sun, 14 Aug 2022 14:12:56 +0000 Received: by mail-wr1-x42a.google.com with SMTP id z12so6342882wrs.9 for ; Sun, 14 Aug 2022 07:12:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=Xqc3VtPSBOAfpxrTQ3FQnbEScSjzijC2Ge9Qv+3BLFo=; b=KSSPXqdDvQ30jRp5ZEhGlfQ/aS0hz2oSUFeTar1lta3J4zdKDfpW/jUYA0/PiDxfDa 7CaS1dovo6wdlqR6phEaSv5eUlvB0h4SZHh1+4WgiaWr9tMGHL3VrRJsE6ppzN8fow3i sRXlxbOajPCerCw1GcDlS2x8dobocGRI1cVsgcqeGnYtM1XDr5z1nMJPIvXFATv4ZA93 ao69Y8ApqC0YOZL0ByltUGbCWAT1GUOx7eu27fPQFM4nExizuoS54M71vFUPoP8n2iPc McBTZn5q2UiGtoC4//f166GNAWF4vGRe7ySnMZp8phvvR0EOCoZZtTw14ts7untZY9li hS7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=Xqc3VtPSBOAfpxrTQ3FQnbEScSjzijC2Ge9Qv+3BLFo=; b=2IiXrz9VGgPYx6O/SH3liZYpE2M6WCAeSs/gligI2jsPaj4FBKao9d6ZbAkjUljnts PlADVuyaGzYc2JaWXESyqZZ/wfm8xqyvfv1DXPd8KT9dp0tv0gxXZKD7pK2kdo0+IPH4 bHLx2Y3pq1yQPmteH5dBlH9xSljvHs8xusswYeTnhLbPzdKhsfyh8zbZmKIbAKMBYoJQ b1RYgWmTkkx2LQ4GK263ZHyknzXpDqGi5SoVFsZouh2phrQwq5CmGUG4Bu9iRzc49UOf 9QeoC792BLPuQNpBEAtXIOGDeVYkzyXBE2DJ+QDnUw7tbST9GVa+7+esvGQodUz2AZza DQLQ== X-Gm-Message-State: ACgBeo2lXhgH9VfsGXgjlK7yFPfIXiE5vJ5nUhXlNIPP/KDhSMSvUaQX kdCs17lFm0hkwDLne2iHnvBunw== X-Google-Smtp-Source: AA6agR7L6qLIdUlUFVOsEa6ZwXoag/PaFOX3IukupKFIqjjhVOE/vcErNmGNQSSR0BwuzhSCaRA2HQ== X-Received: by 2002:adf:f708:0:b0:221:6cb7:8d52 with SMTP id r8-20020adff708000000b002216cb78d52mr6272145wrp.186.1660486371758; Sun, 14 Aug 2022 07:12:51 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id b8-20020adfde08000000b0021db7b0162esm4625419wrm.105.2022.08.14.07.12.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Aug 2022 07:12:51 -0700 (PDT) From: Conor Dooley To: Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: Conor Dooley , Guo Ren , Vincent Chen , Xianting Tian , Heiko Stuebner , Kefeng Wang , Tong Tiangen , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] riscv: kvm: vcpu_timer: fix unused variable warnings Date: Sun, 14 Aug 2022 15:12:35 +0100 Message-Id: <20220814141237.493457-2-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220814141237.493457-1-mail@conchuod.ie> References: <20220814141237.493457-1-mail@conchuod.ie> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220814_071253_630995_4F7C4619 X-CRM114-Status: UNSURE ( 8.94 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Conor Dooley In two places, csr is set but never used: arch/riscv/kvm/vcpu_timer.c:302:23: warning: variable 'csr' set but not used [-Wunused-but-set-variable] struct kvm_vcpu_csr *csr; ^ arch/riscv/kvm/vcpu_timer.c:327:23: warning: variable 'csr' set but [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:42a listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Conor Dooley In two places, csr is set but never used: arch/riscv/kvm/vcpu_timer.c:302:23: warning: variable 'csr' set but not used [-Wunused-but-set-variable] struct kvm_vcpu_csr *csr; ^ arch/riscv/kvm/vcpu_timer.c:327:23: warning: variable 'csr' set but not used [-Wunused-but-set-variable] struct kvm_vcpu_csr *csr; ^ Remove the variable. Fixes: 8f5cb44b1bae ("RISC-V: KVM: Support sstc extension") Signed-off-by: Conor Dooley --- arch/riscv/kvm/vcpu_timer.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/riscv/kvm/vcpu_timer.c b/arch/riscv/kvm/vcpu_timer.c index 16f50c46ba39..185f2386a747 100644 --- a/arch/riscv/kvm/vcpu_timer.c +++ b/arch/riscv/kvm/vcpu_timer.c @@ -299,7 +299,6 @@ static void kvm_riscv_vcpu_update_timedelta(struct kvm_vcpu *vcpu) void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu) { - struct kvm_vcpu_csr *csr; struct kvm_vcpu_timer *t = &vcpu->arch.timer; kvm_riscv_vcpu_update_timedelta(vcpu); @@ -307,7 +306,6 @@ void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu) if (!t->sstc_enabled) return; - csr = &vcpu->arch.guest_csr; #if defined(CONFIG_32BIT) csr_write(CSR_VSTIMECMP, (u32)t->next_cycles); csr_write(CSR_VSTIMECMPH, (u32)(t->next_cycles >> 32)); @@ -324,13 +322,11 @@ void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu) void kvm_riscv_vcpu_timer_save(struct kvm_vcpu *vcpu) { - struct kvm_vcpu_csr *csr; struct kvm_vcpu_timer *t = &vcpu->arch.timer; if (!t->sstc_enabled) return; - csr = &vcpu->arch.guest_csr; t = &vcpu->arch.timer; #if defined(CONFIG_32BIT) t->next_cycles = csr_read(CSR_VSTIMECMP); From patchwork Sun Aug 14 14:12:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 1666188 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=lL1KIRpW; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=conchuod.ie header.i=@conchuod.ie header.a=rsa-sha256 header.s=google header.b=VU4X7ETr; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M5KBZ56K8z9sFs for ; Mon, 15 Aug 2022 00:13:10 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Y0t6zaLA0urz6gSFVg8+cQJUeoIz2ktpm5/jsfF88hI=; b=lL1KIRpWnAFJ1X UdP0MOFK27fI2bJLisNJ06f0tkRYvMZiW+bquJ9VGyc3voGW60Lwh5UCi18O3A6DYcDKoJX3QFKJa W1lQTRufs8b8GnbR1BXIeCnlt904RHnPLNtcD/a6/Rt/qcYZc3Q21aD0350fFW85ze2fX35I2idHi s8axXSkjHUm+uanR7hlMeGdm8aiaRA4mMYWwW7MaZSpWhw0rZ3bMml4r722zXwtpqmy1CD0exZRG6 kBmZyZSapSO4K2RFEsoe0oDUVRHP+8fWt2lKXsW5R7+L/bq+4iEbszNNGH5+5dlvN0IGLfJPofWeN h7XjmRy/mwE7DB4ufr/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNEMQ-0070Zv-RR; Sun, 14 Aug 2022 14:13:04 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNEMJ-0070SD-H6 for kvm-riscv@lists.infradead.org; Sun, 14 Aug 2022 14:12:57 +0000 Received: by mail-wm1-x334.google.com with SMTP id s23so2774056wmj.4 for ; Sun, 14 Aug 2022 07:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=qMUpNbdJFHkt8LehO+vj4FoNVMjMZ3b4RSV8Kbu/byM=; b=VU4X7ETrUmw6SeHfZ8AdO5lxQKOQF2HqiEeNSOaEO67IQgUu4al0l7Lp3vRJzsv8Ft 148XhPJaK+g8F+K2pFvw/ibH2zC/GW6G3TP/Sub0QP9WkIpbzxC521jv+uLO/jzmgdCC diUBrwCfWZAKEoAmALJ7bywyWKZDHeo5iPTbotwxY1F/O5oI4I5Ic4VuSvMYwZdFUQh/ ZEEUY4gc60LRUCvGwVdTLyUl+apOZQtsCzBQlH0d/e91I9A9waemfuZBe86cO8GtLRDm XrQDdAFcRZvf/GQyqSv1qssDXttkUmbTxG0amI78ugyDHn2eEBwwRt3ahtZMIU5vgAfm +YBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=qMUpNbdJFHkt8LehO+vj4FoNVMjMZ3b4RSV8Kbu/byM=; b=uFqw6MpEvWaUE5uPpQu+lpGW7RAnxUzuWdvFaliN8is7906mqOjZNvlwSL6q89WoPW oOc/glWruzdnBnxWRLmXmnmkRIclAaydvw/o9B5lNl0WEp6vomaAx4YqJ5cF0fyb959k jFBPrJ8W1LBJ/lnBy99RKjnEPGFwuplwYxWIL7qiv+d/T+B6mI9dzBnCR0W+EMXyXF/L IDLz0+v+I9GR1g7J0YygeTCgwW61d45XGOAeIQqyp1KWVpwqWgjgyWptDUc2vWd8OJ0E BeErGV2LFqOtf64DYWJDxlcYBh02fgZBCkIOe5xEglFFEqCy4UIVyQK1yrFQVqqfWIr5 piqA== X-Gm-Message-State: ACgBeo2onH1RNk6erbr9wVtfk+56tpIhgWJ+Gld+1hL3Emg34BWL+8RU iYv74byoIDi4h78gvWDoCa+Kwg== X-Google-Smtp-Source: AA6agR4TZ6OGzcxxznTc5xN2jS1X/dAKB1yFSxHRG1y13P0Di1gIIk68PUhQuEwPcdtEnEPKe4wd+Q== X-Received: by 2002:a05:600c:a4c:b0:39c:34d0:fd25 with SMTP id c12-20020a05600c0a4c00b0039c34d0fd25mr7924157wmq.172.1660486373101; Sun, 14 Aug 2022 07:12:53 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id b8-20020adfde08000000b0021db7b0162esm4625419wrm.105.2022.08.14.07.12.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Aug 2022 07:12:52 -0700 (PDT) From: Conor Dooley To: Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: Conor Dooley , Guo Ren , Vincent Chen , Xianting Tian , Heiko Stuebner , Kefeng Wang , Tong Tiangen , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] riscv: kvm: move extern sbi_ext declarations to a header Date: Sun, 14 Aug 2022 15:12:36 +0100 Message-Id: <20220814141237.493457-3-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220814141237.493457-1-mail@conchuod.ie> References: <20220814141237.493457-1-mail@conchuod.ie> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220814_071255_599344_A2B38751 X-CRM114-Status: GOOD ( 10.15 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Conor Dooley Sparse complains about missing statics in the declarations of several variables: arch/riscv/kvm/vcpu_sbi_replace.c:38:37: warning: symbol 'vcpu_sbi_ext_time' was not declared. Should it be static? arc [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:334 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Conor Dooley Sparse complains about missing statics in the declarations of several variables: arch/riscv/kvm/vcpu_sbi_replace.c:38:37: warning: symbol 'vcpu_sbi_ext_time' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_replace.c:73:37: warning: symbol 'vcpu_sbi_ext_ipi' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_replace.c:126:37: warning: symbol 'vcpu_sbi_ext_rfence' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_replace.c:170:37: warning: symbol 'vcpu_sbi_ext_srst' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_base.c:69:37: warning: symbol 'vcpu_sbi_ext_base' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_base.c:90:37: warning: symbol 'vcpu_sbi_ext_experimental' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_base.c:96:37: warning: symbol 'vcpu_sbi_ext_vendor' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_hsm.c:115:37: warning: symbol 'vcpu_sbi_ext_hsm' was not declared. Should it be static? These variables are however used in vcpu_sbi.c where they are declared as extern. Move them to kvm_vcpu_sbi.h which is handily already included by the three other files. Fixes: a046c2d8578c ("RISC-V: KVM: Reorganize SBI code by moving SBI v0.1 to its own file") Fixes: 5f862df5585c ("RISC-V: KVM: Add v0.1 replacement SBI extensions defined in v0.2") Fixes: 3e1d86569c21 ("RISC-V: KVM: Add SBI HSM extension in KVM") Signed-off-by: Conor Dooley --- arch/riscv/include/asm/kvm_vcpu_sbi.h | 12 ++++++++++++ arch/riscv/kvm/vcpu_sbi.c | 12 +----------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/arch/riscv/include/asm/kvm_vcpu_sbi.h b/arch/riscv/include/asm/kvm_vcpu_sbi.h index 83d6d4d2b1df..26a446a34057 100644 --- a/arch/riscv/include/asm/kvm_vcpu_sbi.h +++ b/arch/riscv/include/asm/kvm_vcpu_sbi.h @@ -33,4 +33,16 @@ void kvm_riscv_vcpu_sbi_system_reset(struct kvm_vcpu *vcpu, u32 type, u64 flags); const struct kvm_vcpu_sbi_extension *kvm_vcpu_sbi_find_ext(unsigned long extid); +#ifdef CONFIG_RISCV_SBI_V01 +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_v01; +#endif +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_base; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_time; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_ipi; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_rfence; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_srst; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_hsm; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_experimental; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_vendor; + #endif /* __RISCV_KVM_VCPU_SBI_H__ */ diff --git a/arch/riscv/kvm/vcpu_sbi.c b/arch/riscv/kvm/vcpu_sbi.c index d45e7da3f0d3..f96991d230bf 100644 --- a/arch/riscv/kvm/vcpu_sbi.c +++ b/arch/riscv/kvm/vcpu_sbi.c @@ -32,23 +32,13 @@ static int kvm_linux_err_map_sbi(int err) }; } -#ifdef CONFIG_RISCV_SBI_V01 -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_v01; -#else +#ifndef CONFIG_RISCV_SBI_V01 static const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_v01 = { .extid_start = -1UL, .extid_end = -1UL, .handler = NULL, }; #endif -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_base; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_time; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_ipi; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_rfence; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_srst; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_hsm; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_experimental; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_vendor; static const struct kvm_vcpu_sbi_extension *sbi_ext[] = { &vcpu_sbi_ext_v01, From patchwork Sun Aug 14 14:12:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 1666189 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=MmbIC5eN; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=conchuod.ie header.i=@conchuod.ie header.a=rsa-sha256 header.s=google header.b=HMMTLU/p; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M5KBc18mrz9s1l for ; Mon, 15 Aug 2022 00:13:12 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4UKS5G7+vvqNKdCe+X1/Ki22DG5JIAP6w1gv8bf1nm8=; b=MmbIC5eNIjtyHH X/ZSCpuf6Dkv92nGLq8ix8hgLFV6FNmJ+sM9EBlsEfJbvkkJMaT4IlSQMdlm2ea/0WSfNAWRqHHKq pSyX6qqkiSlgZsmVnJBx2ppVocd6muHMg32UPFhh/BAfyolAGEC9oyA/Sl6PmNi3tjkQ12aVSEeuT oMOE/Nwr4hlqmBgbI32MZeYFu+1MMJQA2Qj/decCWw+oQKr5O0BBTQjfLEUTYUu095vFb/DGWQx4h T9FSE4x5rcpC2A8AYHAmSgiTnj/HW9O2VKgMgeU1KF6XeyWcjCUSU1d+fxAep5Zj2VNHY91wPbIia Nd2hcUPQciiFNnzgxlZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNEMW-0070dL-Ew; Sun, 14 Aug 2022 14:13:08 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNEMK-0070T7-5K for kvm-riscv@lists.infradead.org; Sun, 14 Aug 2022 14:12:57 +0000 Received: by mail-wr1-x432.google.com with SMTP id l22so6348850wrz.7 for ; Sun, 14 Aug 2022 07:12:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=pPv0l6vD5WlLpI1nTN7zzV3sMR7lS/dRIy37KSKLV6k=; b=HMMTLU/p8YLEHSGr0JdrSHHzL+KPSzr/2SbHVIYZPefUDLh0i6BEpVFmoM7PonqAQu XHK1xmVw1UBg2BPE8d6h3iPvrE+h3Ms+3mRmDMA9Wb50IKTeWvZ0qIOlXZ1ZkoUbFGHE 0mUhMOI5/9Bp3r2iu5qSOoF2uZw6OohSrtuVWL1610+z/NlAO6QENPP2PWA5I1CD3+Ng euh7jve2sSLkFojItamUEEE3h9vElikeXBeEWacM1nyspNJDM6MQj9pdpf6uA3YdvvbX JHdWK+memg4nFTSgdmc6BoFrjCm7SFf/6eVZhXMvj+kHJE/DRuNDbHBIhxDKgeNhP0WF Scrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=pPv0l6vD5WlLpI1nTN7zzV3sMR7lS/dRIy37KSKLV6k=; b=js/QyxEuU7qxwrHw2fBsjMGro5aCe8U1dop0SFWb/aW4OlnX1NEv5y0ns5sufrr5pv H7cZc00EHZu7JXLwP8KqAmpBUAI+eMVb+tejaHjDkb5AgWFH8gBHke7oFglbrcFG1wHG nRzLW1WJ5lezHkh4dC5E5/3fmwswXW4JlV5vvRl7kMQRWvOB+yvZe+utE4LRqPRIvhA3 PnOowj4/8m0j37eX9xFeG3pGrEOPZ13wppEOHEBEFQ5d6grdRYHu3F+wvGZbX8Jty+pY R9Vt/ZoRJS7xTQ21CKohIHg5plwIzB9BPN/en3bODQn5MuQuohhXe+JmSixqpmR/L6Z+ wzSA== X-Gm-Message-State: ACgBeo3Z52g/07Adp8CfnKX7QUvEwj2iAfRKoqkZkr27ruCDKF1YuyXP zKZvI5iOh52FZpds9+lHYsb4YA== X-Google-Smtp-Source: AA6agR6BPhLCEYbGHWwFtW7IA0BVcNy4nXrlbW7af92IxkgTrJMJnNk9uz1mkz0iwWDTuJ1TmfrDbA== X-Received: by 2002:a5d:4705:0:b0:21f:3890:8619 with SMTP id y5-20020a5d4705000000b0021f38908619mr6285685wrq.104.1660486374334; Sun, 14 Aug 2022 07:12:54 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id b8-20020adfde08000000b0021db7b0162esm4625419wrm.105.2022.08.14.07.12.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Aug 2022 07:12:53 -0700 (PDT) From: Conor Dooley To: Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: Conor Dooley , Guo Ren , Vincent Chen , Xianting Tian , Heiko Stuebner , Kefeng Wang , Tong Tiangen , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] riscv: signal: fix missing prototype warning Date: Sun, 14 Aug 2022 15:12:37 +0100 Message-Id: <20220814141237.493457-4-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220814141237.493457-1-mail@conchuod.ie> References: <20220814141237.493457-1-mail@conchuod.ie> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220814_071256_223708_5637C790 X-CRM114-Status: GOOD ( 11.83 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Conor Dooley Fix the warning: arch/riscv/kernel/signal.c:316:27: warning: no previous prototype for function 'do_notify_resume' [-Wmissing-prototypes] asmlinkage __visible void do_notify_resume(struct pt_regs *reg [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:432 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Conor Dooley Fix the warning: arch/riscv/kernel/signal.c:316:27: warning: no previous prototype for function 'do_notify_resume' [-Wmissing-prototypes] asmlinkage __visible void do_notify_resume(struct pt_regs *regs, All other functions in the file are static & none of the existing headers stood out as an obvious location. Create signal.h to hold the declaration. Fixes: e2c0cdfba7f6 ("RISC-V: User-facing API") Signed-off-by: Conor Dooley --- arch/riscv/include/asm/signal.h | 12 ++++++++++++ arch/riscv/kernel/signal.c | 1 + 2 files changed, 13 insertions(+) create mode 100644 arch/riscv/include/asm/signal.h diff --git a/arch/riscv/include/asm/signal.h b/arch/riscv/include/asm/signal.h new file mode 100644 index 000000000000..532c29ef0376 --- /dev/null +++ b/arch/riscv/include/asm/signal.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef __ASM_SIGNAL_H +#define __ASM_SIGNAL_H + +#include +#include + +asmlinkage __visible +void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags); + +#endif diff --git a/arch/riscv/kernel/signal.c b/arch/riscv/kernel/signal.c index 38b05ca6fe66..5a2de6b6f882 100644 --- a/arch/riscv/kernel/signal.c +++ b/arch/riscv/kernel/signal.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include From patchwork Sun Aug 14 14:12:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 1666190 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=DXiZSeCf; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=conchuod.ie header.i=@conchuod.ie header.a=rsa-sha256 header.s=google header.b=Qq8AUk/9; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M5KBf4zkBz9s1l for ; Mon, 15 Aug 2022 00:13:14 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4k6JtDI6F/gJ8aHSZfUgx2fgCAxEiojmepcXpU3YGSs=; b=DXiZSeCfs38OMW rahODBcGqdv6XQ198aIewKrwTcuBjNPOVjpS8jbhovmrRMYI70v/S5A4WX1sZvAvLki9qOhUhXGWR RUboJ5qAfQkVHMKr/YPRH1/WHPSBx9wiAgRdKB9+Dpy/wQVM0Ys5JWZxdVHyRq6iLmE8HUWXzmxzi Zal6y3iKqVpynNIA1NMnAa9yjbfNTzL0DWBIfuWxNAhUGYSN2cw68XwAMu2NuOvpUGpNtzkL7EyHN piCz5r2Euc8RSDBpbYQHJkGrhKFpEpdF5+YV5Ky9McZvDR1WN5evn252ke0J1vYhZknFh6jFynfeX jiYLU7qdBbXsp2dmElMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNEMY-0070fo-LQ; Sun, 14 Aug 2022 14:13:10 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNEML-0070U5-HJ for kvm-riscv@lists.infradead.org; Sun, 14 Aug 2022 14:12:59 +0000 Received: by mail-wr1-x430.google.com with SMTP id j7so6363910wrh.3 for ; Sun, 14 Aug 2022 07:12:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=Jpi+qYPVkjjgLSftDLRCVgzhzYoBkPjkNBatqeFjYP4=; b=Qq8AUk/9AWVqplZnZsraolgAwvvs+PIe6EeGfq6jN5MM2n6AruvuyymJsCkvpb+OzP DYg/NMqHsO6QTHRAmrKsuXtxegQV5ArT1zwjqST2UY7tF7wobikGXu8YTrZv50Ep0Ae3 kQ6O0X7afhbpbhHnOfxIltiwZLRErrqF5lam6sIXJu4xMzzliWzprfPqRkgZB1tMXU1/ R7yHX1sH3JLUhkX3H1H84GsxsU9S9kdPrpHmC8xt1v98s+gs4HLrQJ3K/kl6UABKJ4Rr uV7ZKh1Ouv6RetM5zMnnJz7UfMlbuOU52TAUum4YqqIrYAQSjRgz7dY13Phg2BCkc3lq qL4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=Jpi+qYPVkjjgLSftDLRCVgzhzYoBkPjkNBatqeFjYP4=; b=x5qjD3mdO4hrd1zrD/pv7Z7XP5IYmfMcLz5GlvvLs3niYJMlb3YmLuUV0X9xejSb9o cjDCU0GSPQ6x8p34e74Z1D967aAqCvssc4D313d9ys2FcYvASUGuz06tyRog1ZYWZAB3 4nE1dMojBSKZCiFc4oyG2bHAZFQDNrRcxJ+Wl6E9WiQdFSJ5QXsSGNEt8w6w7hhn/lCb CqFe4Y67h+JRo8nP3j/4iDW3s9Cbr8OKtt1tnn4oWH7tkntst2pct3axdzhrpe3JOpEp J2S3VaVFgJ2SoaAXEihzO3DPGdu0KR7VqWzPoV6dpzsdAyr8vraStopgZfb3vJHybwt9 IbGw== X-Gm-Message-State: ACgBeo30SQNZZ5G471cVPsasLtD6A0yI3byY2gPx2iACkRPVzoLArtMs vzp0ndajpPMJsAD8WZq2+MdDAw== X-Google-Smtp-Source: AA6agR6FYk+iY85iu6ZNNhqlEqAtS2htyInEPS/oNlnm6Idei+lVhLdGdUcw2QokwFea/pPKDyVQbg== X-Received: by 2002:adf:f90e:0:b0:21e:417b:dbd with SMTP id b14-20020adff90e000000b0021e417b0dbdmr6282420wrr.425.1660486375541; Sun, 14 Aug 2022 07:12:55 -0700 (PDT) Received: from henark71.. ([109.76.58.63]) by smtp.gmail.com with ESMTPSA id b8-20020adfde08000000b0021db7b0162esm4625419wrm.105.2022.08.14.07.12.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Aug 2022 07:12:55 -0700 (PDT) From: Conor Dooley To: Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: Conor Dooley , Guo Ren , Vincent Chen , Xianting Tian , Heiko Stuebner , Kefeng Wang , Tong Tiangen , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] riscv: traps: add missing prototype Date: Sun, 14 Aug 2022 15:12:38 +0100 Message-Id: <20220814141237.493457-5-mail@conchuod.ie> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220814141237.493457-1-mail@conchuod.ie> References: <20220814141237.493457-1-mail@conchuod.ie> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220814_071257_693164_1FD3DA0A X-CRM114-Status: GOOD ( 10.02 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Conor Dooley Sparse complains: arch/riscv/kernel/traps.c:213:6: warning: symbol 'shadow_stack' was not declared. Should it be static? The variable is used in entry.S, so declare shadow_stack there alongside SHADOW_OVERFLOW_STACK_SIZE. Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:430 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Conor Dooley Sparse complains: arch/riscv/kernel/traps.c:213:6: warning: symbol 'shadow_stack' was not declared. Should it be static? The variable is used in entry.S, so declare shadow_stack there alongside SHADOW_OVERFLOW_STACK_SIZE. Fixes: 31da94c25aea ("riscv: add VMAP_STACK overflow detection") Signed-off-by: Conor Dooley --- arch/riscv/include/asm/thread_info.h | 2 ++ arch/riscv/kernel/traps.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h index 78933ac04995..67322f878e0d 100644 --- a/arch/riscv/include/asm/thread_info.h +++ b/arch/riscv/include/asm/thread_info.h @@ -42,6 +42,8 @@ #ifndef __ASSEMBLY__ +extern long shadow_stack[SHADOW_OVERFLOW_STACK_SIZE / sizeof(long)]; + #include #include diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c index 39d0f8bba4b4..635e6ec26938 100644 --- a/arch/riscv/kernel/traps.c +++ b/arch/riscv/kernel/traps.c @@ -20,9 +20,10 @@ #include #include +#include #include #include -#include +#include int show_unhandled_signals = 1;