From patchwork Fri Feb 17 14:44:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mayuresh Chitale X-Patchwork-Id: 1744265 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=) 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=2aWhPNU0; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=dZJUzDto; dkim-atps=neutral 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PJF2s1DzFz23j7 for ; Sat, 18 Feb 2023 01:44:53 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=dEnzwjGzM7uH03xxqJgAiyCw/9cRXYZ05htP0uFog4o=; b=2aWhPNU0menDPg OveomcCMqywRECNfSz0yIrwq2f3oYlLH6i0yE62ij3II9Kzpi+q+YzsEVRkSPnWKOHHaUeG8UcmoK d0eq1FFymQMsfveq86Y74GIMkuuBl5yJo+0fjnio2XNgMeJilC4pwdRy6ck+3QDqfTIsd8Q7IlXEi QfVfVNwj/SPSEVdtgCEY8+dc4Nl7EXoet8FMXHHLus3YLe2K4Z5DNXrxNRK1GdculNekCpuClFBr+ jlSa27IuJs0BDycnwQTSAX4IbPtIKAXM6IcAOcR76G1GRR4RujvKNuIeglJFNicfwBFFgV3lMkopX uTc0bxIMyZ4d+SiW9rUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pT1yU-00EbwW-W9; Fri, 17 Feb 2023 14:44:35 +0000 Received: from mail-oa1-x30.google.com ([2001:4860:4864:20::30]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pT1yS-00Ebul-M7 for opensbi@lists.infradead.org; Fri, 17 Feb 2023 14:44:34 +0000 Received: by mail-oa1-x30.google.com with SMTP id 586e51a60fabf-17172af73b7so1352423fac.2 for ; Fri, 17 Feb 2023 06:44:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Tyhw5y3+tl4EDtSTr0/rN5vBOlN19Py/9Ky0ukY/q3Q=; b=dZJUzDtodVInNAA+QfZtj/o88b0cyqlG5ExQAlnFWAhzUCC7ll8uHfMKm0Uu0Z9PxU ZhdcWwuNdaXFpYt0BkmfzkA06kVkmiCEN3H+8ZVErJG0brX1RuXc+XdUvhfjRoX2+qYy VdmrUGL7vpXO7oDVRzLBELsdcuVKX3YagxRpTlUYdDfaNxHSgV1nI/JWFLGUiJ7M4xhD xcrJf+xkjDYtdEcGTrYDBB9RNMTgXUp9TIfX8IpdgCTQujZ7IGtjPy6TWjQ0o62KNZ7k imf2GgVueH3VBvQmPnjoZHbXEL0ByPlrkvzEQOC7ZtbXzO2p0mEacZDhXGtRT1IFjFk+ +srw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Tyhw5y3+tl4EDtSTr0/rN5vBOlN19Py/9Ky0ukY/q3Q=; b=x8sx07r98uSEqf8W/UGclJkwQJTYmNHi6X0487APhvHHku0Aj46RheWlGIQd059pdM Z+mwDunoi/s+GqfWIfNeZFj9d//kCVl/vfiQXAHwxyIFqe+UoxY3xCIG1JV2tGna2C4L TChqOCWu3q0PKW3cxVmg1VYQcLMwZwj1CtpXjSDdul6KqFi95pkBxO9rLvuxilcUjcu2 umgPgANivtdcJw8OdA5eKL9k7pGjbIbe11INTJeRCTnSzAoOCesuh6LR4b5p/Kf020kw dFDUYcXid5NtdXEgpGWoTnALSQbDqG07X0eYQY4ugOslW7F4DqKocmIxchlvAkr77CpQ cLxA== X-Gm-Message-State: AO0yUKV6UfY5Ja9ssrvDtvzBjxu+t8V+BLogNjXgiFketYa5e7Op0tHX MdIxxgoBkNnl+uPpVc5vFN6XGAdav0jDZokx4EE= X-Google-Smtp-Source: AK7set898FU0+GFMr5NylHnxw8uZD6rwqm86mKafQtcvhvRkl4tnvyxydm9H0plOsUsmtyxaoG+UFQ== X-Received: by 2002:a05:6870:b383:b0:163:2390:801e with SMTP id w3-20020a056870b38300b001632390801emr533355oap.34.1676645070574; Fri, 17 Feb 2023 06:44:30 -0800 (PST) Received: from mchitale-vm.. ([182.70.74.242]) by smtp.googlemail.com with ESMTPSA id ec21-20020a0568708c1500b00143824af059sm1718888oab.7.2023.02.17.06.44.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Feb 2023 06:44:30 -0800 (PST) From: Mayuresh Chitale To: opensbi@lists.infradead.org Cc: Mayuresh Chitale Subject: [PATCH v2 0/5] SBI PMU firmware counters and events improvement Date: Fri, 17 Feb 2023 20:14:08 +0530 Message-Id: <20230217144413.3720307-1-mchitale@ventanamicro.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230217_064432_748610_A3BDA07E X-CRM114-Status: UNSURE ( 5.49 ) 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: This patchset implements the improvements described in the following proposal from Anup Patel: https://lists.riscv.org/g/tech-prs/message/102 Changes in v2: - Update Risc V platform specific firmware event handling as per the SBI spec update: https://lists.riscv.org/g/tech-prs/message/211 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 [2001:4860:4864:20:0:0:0:30 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: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This patchset implements the improvements described in the following proposal from Anup Patel: https://lists.riscv.org/g/tech-prs/message/102 Changes in v2: - Update Risc V platform specific firmware event handling as per the SBI spec update: https://lists.riscv.org/g/tech-prs/message/211 Mayuresh Chitale (5): lib: sbi_pmu: add callback for counter width lib: sbi_pmu: Implement sbi_pmu_counter_fw_read_hi lib: sbi_pmu: Reserve space for implementation specific firmware events lib: sbi_pmu: Update custom PMU device ops lib: sbi_pmu: Add hartid parameter PMU device ops include/sbi/sbi_ecall_interface.h | 12 +++ include/sbi/sbi_pmu.h | 33 +++++--- lib/sbi/sbi_ecall_pmu.c | 8 ++ lib/sbi/sbi_pmu.c | 120 +++++++++++++++++++----------- 4 files changed, 121 insertions(+), 52 deletions(-)