From patchwork Wed Apr 3 08:04:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Atish Kumar Patra X-Patchwork-Id: 13615221 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (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 71B2762A02 for ; Wed, 3 Apr 2024 08:05:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131515; cv=none; b=DF8Tcc0bi2p2KypTeKxC3xIxUlbHBEDFkk71ETvsImInSLbsz2xW1YKFdH179KtHMbV1A4ZzI1jfZk/dW8NgtNGjHToLyCm+1HUhEYfadMCNS738zv77+1Tx1YytPBq4eWNR4t3uqZ9IvXOKMcDf+K2AlonPgzF8BBz8JSkhyPs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712131515; c=relaxed/simple; bh=QPSBE9QZ9I3ka5tiVYaLmRJclnGfjz8CpXpruGJQvzE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=MKM9siRqBi9b9OlwyGC0ZcP/jgnzas5uhRtM66+vg6RlLBYtXORkv+OYLZmO5cX8AcWQswtuucTznrmM4KTsGssVvu6g3neRrpjOpa/HRf2C4mQ5eV+bcp6qDalA9Uts/dfoMUgterBJdxQjkvKvSuS5wqtG9c5e2QcLoMnGMsA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=Jh5qO/+J; arc=none smtp.client-ip=209.85.214.173 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 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="Jh5qO/+J" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1e0edd0340fso54649585ad.2 for ; Wed, 03 Apr 2024 01:05:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1712131514; x=1712736314; 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=wk9dPs2pdPMy/ouYyBMSDOPD1OQUOIvovvehkpc98kM=; b=Jh5qO/+Jj8wcgB/ufwV8mJL6YrXrofnTLzFgpsa198jYW5k5XiCnnki3noQara2nHb WQF1f77pG5O1RY/JA+lZX4FwJ1w8kw/JGKEF0bakvmaZ8dml+I4Xsnp9NohJ6a+VTH2B o3kGPlqwG64nEH5r8P1OckbN3reFARfNvvdd+PJPYyCCiEfMWY6977kvtQQZVJpotM2c v8Ed4pDzJxrfwfrW1skSjD39oUIDU75+iWOAoH1Sb2eB2G6MBl+yMMALvj3XOLelGyIq 5oYhbCaGMuIp8kfy7MuENeERQRMWoWOlmJ56aRckrkECIz8ShRgnF2/oCfe/QfKPqe7n Hk9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712131514; x=1712736314; 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=wk9dPs2pdPMy/ouYyBMSDOPD1OQUOIvovvehkpc98kM=; b=Z9UH3+JwJbAVtWAuLW4crEQ9+alNoV9CTVI+PrWeZGzEoIClNukbVLH7fv8UDY9I6U MbXC48iNmJnxYCmQbX/qub0D/c6iQDIhLlADCvTQw4I4ukZC7K/vul6x0M+8gs3aGxUA yUtrA0JILEJBeZ/E80HQsuNO38i74Z446x82ORhJUYebzA4i7RogcBj8dVh7BzYFJA6v xzAfrace40K6hd08mXhv84l9uy1DTInHumLeUvuIWFFW5Z6gaj5b0EX3fQjcKHR/KNRd qwwwaqfdxlaJedabY4OTh9BlZCBIoCvh/CXGQFfEyXTUoR4qCkV6exW+7SfihPD2wMFi aV2Q== X-Forwarded-Encrypted: i=1; AJvYcCX9Dq+SIe5yn3uq07jYX388QGqnFsx/20XXwrXJnYEwod8b2JnwkQXJjUeF6YfMktX8Yj4WYb53FMF+i9pL6QKnlMQx X-Gm-Message-State: AOJu0Yz8UUBPYrxqgM9hO4Em/Z8zNpcdGxbZJdlE9UuKZWpZ62NKyaCL dBKn7AN4+iU8cuEjTm8JdmPLb9ZhwmLeMYqLUNiKAmFtppKqsXgTH0yZd/fRT/8= X-Google-Smtp-Source: AGHT+IGJGNXcOyb9YrykwAGNPaYyhw8xhsLdGwuGzUBrwVAzvp1h6eGWJ0tNbKMZggDJyDT4f6wwug== X-Received: by 2002:a17:903:292:b0:1e2:6240:72e7 with SMTP id j18-20020a170903029200b001e2624072e7mr5865569plr.53.1712131513754; Wed, 03 Apr 2024 01:05:13 -0700 (PDT) Received: from atishp.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id c12-20020a170902d48c00b001e0b5d49fc7sm12557229plg.161.2024.04.03.01.05.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 01:05:13 -0700 (PDT) From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Conor Dooley , Anup Patel , Ajay Kaher , Alexandre Ghiti , Alexey Makhalov , Andrew Jones , Juergen Gross , kvm-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, Mark Rutland , Palmer Dabbelt , Paolo Bonzini , Paul Walmsley , Shuah Khan , virtualization@lists.linux.dev, VMware PV-Drivers Reviewers , Will Deacon , x86@kernel.org Subject: [PATCH v5 01/22] RISC-V: Fix the typo in Scountovf CSR name Date: Wed, 3 Apr 2024 01:04:30 -0700 Message-Id: <20240403080452.1007601-2-atishp@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240403080452.1007601-1-atishp@rivosinc.com> References: <20240403080452.1007601-1-atishp@rivosinc.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The counter overflow CSR name is "scountovf" not "sscountovf". Fix the csr name. Fixes: 4905ec2fb7e6 ("RISC-V: Add sscofpmf extension support") Reviewed-by: Clément Léger Reviewed-by: Conor Dooley Reviewed-by: Anup Patel Signed-off-by: Atish Patra Reviewed-by: Andrew Jones --- arch/riscv/include/asm/csr.h | 2 +- drivers/perf/riscv_pmu_sbi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/include/asm/csr.h b/arch/riscv/include/asm/csr.h index 2468c55933cd..9d1b07932794 100644 --- a/arch/riscv/include/asm/csr.h +++ b/arch/riscv/include/asm/csr.h @@ -281,7 +281,7 @@ #define CSR_HPMCOUNTER30H 0xc9e #define CSR_HPMCOUNTER31H 0xc9f -#define CSR_SSCOUNTOVF 0xda0 +#define CSR_SCOUNTOVF 0xda0 #define CSR_SSTATUS 0x100 #define CSR_SIE 0x104 diff --git a/drivers/perf/riscv_pmu_sbi.c b/drivers/perf/riscv_pmu_sbi.c index 8cbe6e5f9c39..3e44d2fb8bf8 100644 --- a/drivers/perf/riscv_pmu_sbi.c +++ b/drivers/perf/riscv_pmu_sbi.c @@ -27,7 +27,7 @@ #define ALT_SBI_PMU_OVERFLOW(__ovl) \ asm volatile(ALTERNATIVE_2( \ - "csrr %0, " __stringify(CSR_SSCOUNTOVF), \ + "csrr %0, " __stringify(CSR_SCOUNTOVF), \ "csrr %0, " __stringify(THEAD_C9XX_CSR_SCOUNTEROF), \ THEAD_VENDOR_ID, ERRATA_THEAD_PMU, \ CONFIG_ERRATA_THEAD_PMU, \