Message ID | 1709692540-77803-4-git-send-email-ganboing@gmail.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=RDqVA+Ig; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=PQYbAVXa; dkim-atps=neutral Authentication-Results: legolas.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=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) 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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TqGlT4RHYz23qk for <incoming@patchwork.ozlabs.org>; Wed, 6 Mar 2024 13:36:19 +1100 (AEDT) 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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id: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=i58WVegK27kJG8/ua8/hNzkL6Dumazv61gksIZJJc3U=; b=RDqVA+IgC0yX+B Y5WtY8VTVf3WQKmS657Dy15WlNbgjp5QdLfTxFE7ulMKwKP0OAtS5pmXj7zHf5a565AI2cdxNxCxg +uiph8vcpMaCKgqw7sVGZ60WcPPTiYG3KoP1Bbldj9O2nvK/ZFHY3OlDVg2q+7a0KC+bbUfjgoAE1 XA+e3gDXoUPYmG5o2gKnZLSK/64Y9JST/dWedxTlUDErqxmCpJjbzr18DSUm0vtfVxQkHCmcu6OYx KD5uGlD8VDzOfzJvDtys3PQ9AqldWRIYEqqdep6wuWAvqJP48ze/NEcQzgXaXbJlbevCHd6xndxpi /sUuUdrPLaMuE/+He7gw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhh8d-0000000G0J0-0ISk; Wed, 06 Mar 2024 02:36:11 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rhh8a-0000000G0Hc-2LMR for opensbi@lists.infradead.org; Wed, 06 Mar 2024 02:36:09 +0000 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-6e56787e691so301818b3a.0 for <opensbi@lists.infradead.org>; Tue, 05 Mar 2024 18:36:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709692566; x=1710297366; darn=lists.infradead.org; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=vrxOUDkomFevDeC5cBM+hym8H6jljjcciFB2tbm8fn4=; b=PQYbAVXaThMAoqjRQ0wgzOSPN8vFcczIf1t3LbdOb+AMMij8kK1UB/qK8f488sx+wO KtPF7eDyXheh5iKex+0M4f1FDa5JRHmQPom/1oWxAy6DTQNgXfuyviL/pOTffW2oI7LP gmsZs1u/1iWJrNSLZSOOlihHe2bM9wBTzMD7dW/pO0mXbpB48XgQLI6Sxn+9E/935MfE 7/U7yPeOlj2cDC7pkCWfjOMgNJ7PDaddUqQYAcKkorh01MyO3saa1qpMPkUIEEGlD7Jx OmkyYL6SUABpauctjbpONuILwIWXdNjhGqm4uPGx8iq28D7QlCC8neL1KMvYYgmJ92Ld Tytw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709692566; x=1710297366; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vrxOUDkomFevDeC5cBM+hym8H6jljjcciFB2tbm8fn4=; b=i1bBGiuLMVXWB9LkFtk23+uRI71JpW+oV8alg7iaXJdLNTURZHMC8NOgaFDRdaS9Yx mLHia1cUIydChYlhtkNaNhH4U5KuwYa32gRInq+seTvp2+PEl4HCVLJUPgCqU2J7FfFd +QJmEYJluZLRFiq2T24T+//YTMpEnS73LGEiOYEAhqfnzfNjCdogn7mUbY0w6WqQ7yH2 /KEABeCR9gKnQJCKOajAbKEsAlwoMMbemS0qfObUdXi37mB7OmGaDDHt9S9CtG35TGU2 uxrzdLYY1cYukSaSTuRKMXrWotMPC7h325FwUxOtqcHFqcFABZdD9VWexs0ZhQgaMrrv Gsmg== X-Gm-Message-State: AOJu0Yzj2ZnRyjtBg9iKHSE7R4+d5tGri4H/+VDUvMxCsbHdpeBq5lCQ sImb7kySoCPcpXfeasNJKM8QzPvimTZkLQ5AE8pCs4WfLlvznF0iP6yB4JqBlr0= X-Google-Smtp-Source: AGHT+IFtZ/JKwFZOxrG90vSeMTl8ByScazJFckKaTAQjgq+0hI06rqmpem7pvJ2ZSM3/UteBbcOBsg== X-Received: by 2002:a05:6a21:339c:b0:1a1:4eb3:63ce with SMTP id yy28-20020a056a21339c00b001a14eb363cemr4889336pzb.4.1709692566387; Tue, 05 Mar 2024 18:36:06 -0800 (PST) Received: from m91p.airy.home ([172.92.174.232]) by smtp.gmail.com with ESMTPSA id v27-20020aa799db000000b006e5a0abb167sm9005653pfi.1.2024.03.05.18.36.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2024 18:36:05 -0800 (PST) From: Bo Gan <ganboing@gmail.com> To: opensbi@lists.infradead.org Cc: wxjstz@126.com, anup@brainfault.org Subject: [PATCH v4 3/7] lib: sbi: change prototype of sbi_trap_redirect Date: Tue, 5 Mar 2024 18:35:36 -0800 Message-Id: <1709692540-77803-4-git-send-email-ganboing@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1709692540-77803-1-git-send-email-ganboing@gmail.com> References: <1709692540-77803-1-git-send-email-ganboing@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240305_183608_626203_BCEBAFFD X-CRM114-Status: GOOD ( 11.48 ) 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: sbi_trap_redirect now uses const pointer to `trap`. This ensures the caller that we never change `trap` in sbi_trap_redirect. Signed-off-by: Bo Gan Reviewed-by: Anup Patel --- include/sbi/sbi_trap.h | 2 +- lib/sbi/sbi_trap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -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_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ganboing(at)gmail.com] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:42a listed in] [list.dnswl.org] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <opensbi.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/opensbi>, <mailto:opensbi-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/opensbi/> List-Post: <mailto:opensbi@lists.infradead.org> List-Help: <mailto:opensbi-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/opensbi>, <mailto:opensbi-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "opensbi" <opensbi-bounces@lists.infradead.org> Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
Allow platform to handle load/store faults
|
expand
|
diff --git a/include/sbi/sbi_trap.h b/include/sbi/sbi_trap.h index a562b95..2727bdb 100644 --- a/include/sbi/sbi_trap.h +++ b/include/sbi/sbi_trap.h @@ -225,7 +225,7 @@ static inline unsigned long sbi_regs_gva(const struct sbi_trap_regs *regs) } int sbi_trap_redirect(struct sbi_trap_regs *regs, - struct sbi_trap_info *trap); + const struct sbi_trap_info *trap); struct sbi_trap_regs *sbi_trap_handler(struct sbi_trap_regs *regs); diff --git a/lib/sbi/sbi_trap.c b/lib/sbi/sbi_trap.c index 145db4b..1024981 100644 --- a/lib/sbi/sbi_trap.c +++ b/lib/sbi/sbi_trap.c @@ -84,7 +84,7 @@ static void __noreturn sbi_trap_error(const char *msg, int rc, * @return 0 on success and negative error code on failure */ int sbi_trap_redirect(struct sbi_trap_regs *regs, - struct sbi_trap_info *trap) + const struct sbi_trap_info *trap) { ulong hstatus, vsstatus, prev_mode; #if __riscv_xlen == 32