From patchwork Wed Jan 10 23:13:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atish Patra X-Patchwork-Id: 187106 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp1110222dyi; Wed, 10 Jan 2024 15:16:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IEpT2cHTXyGShwZBK3JWxV5RDeBGIaSAabN4aNRWvrHomYUsFI1WGrpbyY+eAKc9lZ+GXzg X-Received: by 2002:ac8:5ad1:0:b0:429:a4d0:7c69 with SMTP id d17-20020ac85ad1000000b00429a4d07c69mr1463697qtd.48.1704928566299; Wed, 10 Jan 2024 15:16:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704928566; cv=none; d=google.com; s=arc-20160816; b=0dGJmdnrTZYeOLsc0xezjzm09Px3N9+NG3nNXkpktZwzMJt/xI3KBHfmTz/9llg5Pj PWZVX9QEUJQRe9XNKjc+w+sXOsKcPaU2fTxcsk6yUP1fght7+vwtfABC393RDxA38z3i cAdia1xhRlRNAe5YOIkdsg62aZq4xm4pbvYKp5cvYx0B+v697p1IqffH03803qcWdnZq YE8vHSOzH7+S1lM3EasqObiUIenkrdpjPXTFPxmOk7UFDjf61koec0VtBDNJAeH5bx9f VGjA3UW2/D3T0Hbsz57J1gH6e5Js1E42/5rwH/FLyZZY8mbmbjnbKSijQJBXdySpuAVT EYVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=DpN1MW+95i3F5wasxziCwuSYEcNzMGQOQLUR8+9YpL0=; fh=GUONBiPXFlfMAlwlN34bAK0Q/sgEvcY22ARTS56U1VU=; b=EQ3EIGEp5U7mwSYb0BikQPK1JkWOrlSN1nAa3xM1KIPF3sVqEMnGeXBpxZH4eYBaiB hT4kHYFUjOgYvDsAdcV404CoxlU+S1IQdGqBGM/FF+ntzq5lcB5zHxUP6RFsKLjaWlAC M8UJ8k2evYoYt+OhG1nmg53rL8Qm7p1NWEzyJQxqREhOtSEv//xAtaiWsfHgv2G4QUm+ L0ZsINE9KSCvkoZE/hTVc4gj+EnYfTsZ0YR1vzA9kFfFmVocDyOmWyvbgtl0nqsEx9eS VM79XQqWw7Vk7lzQCinnfON8SOJE7+t/FtBmd/LQEaHjetzujzFLT1MAwi53o+T64K0+ 15Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=0F98St71; spf=pass (google.com: domain of linux-kernel+bounces-22878-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22878-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id bb37-20020a05622a1b2500b00429b9fa47edsi1563089qtb.269.2024.01.10.15.16.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 15:16:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22878-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=0F98St71; spf=pass (google.com: domain of linux-kernel+bounces-22878-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22878-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 06CD71C21B5C for ; Wed, 10 Jan 2024 23:16:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D0E6524C9; Wed, 10 Jan 2024 23:14:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="0F98St71" Received: from mail-il1-f175.google.com (mail-il1-f175.google.com [209.85.166.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 078894F8BD for ; Wed, 10 Jan 2024 23:14:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-il1-f175.google.com with SMTP id e9e14a558f8ab-3608bdb484fso11499145ab.1 for ; Wed, 10 Jan 2024 15:14:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1704928481; x=1705533281; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DpN1MW+95i3F5wasxziCwuSYEcNzMGQOQLUR8+9YpL0=; b=0F98St71ILMisMGT6EsMyuiC5F0vqPN8co9EpR+2OW/piJMMgnwqKDyTXQHYHIzK2C HswkcuSfpjy3Wj5Mgr7M0NoQpCETx2nT23lVUUpxPyc7KuzJlyxuNAcrasniF3F4SaSQ TOCJxYujAlZc5mFSnH0Wspziv4eLUAbNJo5SZylut+rVOBVyJ5OAobJ0F9po9XoNP4Cg JwKFqYoVGdFlSq/Py1mAGtVKgIqfBPx/enXVr9gXvS0CozeWsFk8a42FpCYBaOCR5YgY HZm1VOilzaD5i/v3hbCYs+C42qiryFfKI0yBgeuQy861Aju4fIY+V7Ye5/F1AyTIiIf6 yrWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704928481; x=1705533281; h=content-transfer-encoding:mime-version: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=DpN1MW+95i3F5wasxziCwuSYEcNzMGQOQLUR8+9YpL0=; b=dZr090ycuX2KSzGySiBwkWl1QO6tDvZYwhK9dUwHHjaSfrHKgGM/5Row1OjJh0FXn5 ZP+e9bZs9H6VF950o5Sn2+AIITB3G+RZBbPguYp813WBMAbMtqR0E1cs6V+hEzIYmzBe E79iHqU0Zh84SKFhnMCy9EX62/kiDUyQlnr8xfV8SH1xbJUJYHdBMoR0T3SyzlizcGWN SDv0i+o3DWu9zYFwF/a1X6v++WysubAxmAq5avLXwQ7C22V9aOsAHF1q2SqJuWX1mCdu ofJsrgVrJtj4ON7/xDKCybH5DEt7SkJ/OnAzxoUorYTuugd3VQj7Upfw2IqBDW2Fdxe4 DIbQ== X-Gm-Message-State: AOJu0YwZSSbM7kHZDVk2aYZqkgHvVoUuQq8GGTAPz0NAypsmypd2ZdSm dBfDQX2BgI6SQUJa9hPDrIOCdtk6rr/Vw9tCrQ2GJ3jqN80= X-Received: by 2002:a05:6e02:180b:b0:360:7947:f14f with SMTP id a11-20020a056e02180b00b003607947f14fmr650893ilv.17.1704928481341; Wed, 10 Jan 2024 15:14:41 -0800 (PST) Received: from atishp.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id co13-20020a0566383e0d00b0046e3b925818sm1185503jab.37.2024.01.10.15.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 15:14:41 -0800 (PST) From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Conor Dooley , Anup Patel , Alexandre Ghiti , Andrew Jones , Atish Patra , Guo Ren , Icenowy Zheng , kvm-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-riscv@lists.infradead.org, Mark Rutland , Palmer Dabbelt , Paul Walmsley , Will Deacon , Vladimir Isaev Subject: [v3 02/10] RISC-V: Add FIRMWARE_READ_HI definition Date: Wed, 10 Jan 2024 15:13:51 -0800 Message-Id: <20240110231359.1239367-3-atishp@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240110231359.1239367-1-atishp@rivosinc.com> References: <20240110231359.1239367-1-atishp@rivosinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787747176324346432 X-GMAIL-MSGID: 1787747176324346432 SBI v2.0 added another function to SBI PMU extension to read the upper bits of a counter with width larger than XLEN. Add the definition for that function. Acked-by: Conor Dooley Reviewed-by: Anup Patel Signed-off-by: Atish Patra --- arch/riscv/include/asm/sbi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h index b6f898c56940..914eacc6ba2e 100644 --- a/arch/riscv/include/asm/sbi.h +++ b/arch/riscv/include/asm/sbi.h @@ -122,6 +122,7 @@ enum sbi_ext_pmu_fid { SBI_EXT_PMU_COUNTER_START, SBI_EXT_PMU_COUNTER_STOP, SBI_EXT_PMU_COUNTER_FW_READ, + SBI_EXT_PMU_COUNTER_FW_READ_HI, }; union sbi_pmu_ctr_info {