Message ID | 20220613010355.28014-9-samuel@sholland.org |
---|---|
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@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=be3sKvKu; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sholland.org header.i=@sholland.org header.a=rsa-sha256 header.s=fm3 header.b=bBIuL//e; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm2 header.b=CMnkD2fM; 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=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) 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 4LLtdB1S83z9s75 for <incoming@patchwork.ozlabs.org>; Mon, 13 Jun 2022 11:04:30 +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=zzdOtzMwrhac/VbhSTbve9Ji0svEXEkfvmBdrijXvmM=; b=be3sKvKuVC2qGu YD3toZUODQ+KrKqY9KBQ3yYBmGG1vg0AlANPq6dtnJ6W4KJSbhbRUPEWFreYTZ8tyb9HSFJrtlJtA WuP21NGmfnHWCTeKPPdQ8oG4av+BZUYTzw9AwZRP2JcOSpVGDqHwJClPohZ+3dTE/Ui/rAGKH3JDz QHGuPzQGFymu/hL0T2TSJSTs5+8OKiNbUIYEWiTneXtxqXpJwxAjho1oAXn0UpgLKJUm8J4WoO/do FTacaU8r2vcJkdJ4qMo98BTGcKEqSTcJZk0anTlNGx7uTmeIfDCZDslHKB6unx8u0KzyQgYGAtNrX s8EtOW9pFp213ztR8RCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0YV7-000gMg-0t; Mon, 13 Jun 2022 01:04:17 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0YV3-000gJG-TB for opensbi@lists.infradead.org; Mon, 13 Jun 2022 01:04:15 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id EE1333200950; Sun, 12 Jun 2022 21:04:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 12 Jun 2022 21:04:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1655082252; x=1655168652; bh=zG gq3SINEjVYWPH6S2Ad3djLwI8nyGlxcdCpe+Cj0zI=; b=bBIuL//e9g16ba1QmN xTzEE9lykq/IUfMgSkFvRhAeCfnmERba209+Rz+P9JnHujy9QmRII3rRchpGOzDo Cz40LqZYP4kIfyZFzaiP0v+SeI1z6fe+akSM8k7DYSIeGuJBT4Pyg7Kq63v8vvQI 8QrCih/r/OVvvhM7NndC0FYf7r6F6oHUPlUkcuO83ZbCRlnv876GM2wz2Frj5ICu 53I5IQbEiYouOz1SaRjDAZD4wp1YmocQUW1+NFRWwP6eFxN06wb7VcDU2dLoqTlM y5jiWbSudJHyndIoOp7tzGszn4sYo1dmgfFncht2FURk+6twsmWNRWJtvB1vc8QZ Qn2Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1655082252; x=1655168652; bh=zGgq3SINEjVYW PH6S2Ad3djLwI8nyGlxcdCpe+Cj0zI=; b=CMnkD2fMbvqZENc+rEcUfhdO4eH7l mR2Q1oGaNZdjoiIFZywkfwCRswH8WEyT9z+7fdvoo03UR6Zn+/Kel+SM8wvESJMu qRKtVfU/aHEXJg74su8Qi6/kYKMgM1us/+FLRHc157aWubXlfZcyfzU6hxjyeC4t esNhX8XJ7RR96ig2fnXo8+feUz3ZaZk+BtVjRv6ORvI55o0CqsCw1h8QItRGh4xQ LiqNkbBX2dg2WxobUPvA2Ri4E43uck9DPTlxE0XXGKgyOoZtbW850WMtK43w92ke w8QOhL7YWohDUbvUt0gdVyFDYQbQ8cgZ0H5ZgRuEItzEOPL3rzkvL9kkg== X-ME-Sender: <xms:DI2mYmhEZh48eePKYmCz0CjqrBriANRbXOdhGYObBt9JTn330OxBDw> <xme:DI2mYnCs1lokG7Axdqolo6GCFO3KvU5dLnJtN1eauSyvm6N_zatJxL98bDuC7brT3 su4QdnJ9o88Qr2Y5w> X-ME-Received: <xmr:DI2mYuFj9JpkPa2bNffa-s8-Pqnu_QXEQdQ-gx_YPU3F0Sdni9oN_1lUW2ixbTsjjDGbnlH-3buwoKTREre9afqPsdO63UeLDFkULgXZxO4fwjYBCkyAdHmAWttk0AHDzWlWlg> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudduiedgfeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepudekteeuudehtdelteevgfduvddvjefhfedulefgudevgeeghefg udefiedtveetnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: <xmx:DI2mYvQYGgLBwcFvojZx2EnUwxX-EtRjJGZk_1aiQgExLX0FOZSoog> <xmx:DI2mYjycuyxlIQYFMXD9Xw2N4VI0F8yuMbjuWVQvBbR9kRm_agvGzQ> <xmx:DI2mYt4Jdioj7FOuhXuPZG_AdlUgAgRFofJUzSCXciv__3rqwjZmZg> <xmx:DI2mYj-NFv5O7cg-a269-JsLOtCkAr0E608SEUJctaoi577tMGu27g> Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 12 Jun 2022 21:04:12 -0400 (EDT) From: Samuel Holland <samuel@sholland.org> To: opensbi@lists.infradead.org Cc: Wei Fu <wefu@redhat.com>, Guo Ren <guoren@linux.alibaba.com>, Samuel Holland <samuel@sholland.org>, Anup Patel <anup@brainfault.org> Subject: [PATCH v3 8/9] lib: utils/irqchip: Add wrapper for T-HEAD PLIC delegation Date: Sun, 12 Jun 2022 20:03:54 -0500 Message-Id: <20220613010355.28014-9-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220613010355.28014-1-samuel@sholland.org> References: <20220613010355.28014-1-samuel@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220612_180414_005741_DBCDCE3E X-CRM114-Status: UNSURE ( 9.45 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.9 (/) 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: The delegation bit is lost along with the rest of the PLIC state when the CPU power domain in the Allwinner D1 is powered down, so the PLIC needs to be re-delegated to S-mode during the hart resume pa [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [64.147.123.20 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches 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: 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> 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 |
HSM implementation for Allwinner D1
|
expand
|
diff --git a/include/sbi_utils/irqchip/fdt_irqchip_plic.h b/include/sbi_utils/irqchip/fdt_irqchip_plic.h index f158b02..98d4de5 100644 --- a/include/sbi_utils/irqchip/fdt_irqchip_plic.h +++ b/include/sbi_utils/irqchip/fdt_irqchip_plic.h @@ -17,4 +17,6 @@ void fdt_plic_context_save(bool smode, u32 *enable, u32 *threshold); void fdt_plic_context_restore(bool smode, const u32 *enable, u32 threshold); +void thead_plic_restore(void); + #endif diff --git a/lib/utils/irqchip/fdt_irqchip_plic.c b/lib/utils/irqchip/fdt_irqchip_plic.c index 89b12d4..a6e185c 100644 --- a/lib/utils/irqchip/fdt_irqchip_plic.c +++ b/lib/utils/irqchip/fdt_irqchip_plic.c @@ -151,6 +151,13 @@ static void thead_plic_plat_init(struct plic_data *pd) writel_relaxed(BIT(0), (char *)pd->addr + THEAD_PLIC_CTRL_REG); } +void thead_plic_restore(void) +{ + struct plic_data *plic = plic_hartid2data[current_hartid()]; + + thead_plic_plat_init(plic); +} + static const struct fdt_match irqchip_plic_match[] = { { .compatible = "riscv,plic0" }, { .compatible = "sifive,plic-1.0.0" },