Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1367779lqd; Thu, 25 Apr 2024 13:22:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVsEqUtTWlgjUXmo7l2QEH3OTVP7j3+ONNdcck0t2JHewO85qS3J4rQCkLS7e2yNY8+J5R6A30PNWP5sNyB5jqJN0VdjiY1fsZKTcExmw== X-Google-Smtp-Source: AGHT+IGdecv8tHCe0/TU1kwpiceqaOEGVk9XKxPpZWgJIc+htev6NroBJt0U3zfkMS2Pb2Y6omK8 X-Received: by 2002:a05:6214:29e7:b0:69b:5803:d961 with SMTP id jv7-20020a05621429e700b0069b5803d961mr1201347qvb.0.1714076551754; Thu, 25 Apr 2024 13:22:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714076551; cv=pass; d=google.com; s=arc-20160816; b=PWTXqiWvXUn28mFenRxs7wXvANuXOabn35Pizl06ot1G0UFmGu4NqAuHcbWIfBdzkc rHXAEo+OcyaTwq0rdLVpZHGMXOE2kQomghEPO1N0nfkRGuSHDy5DoHSEHmJ4/kb3JXWI wZc7O7J5a5M5YfElU3aAEJaKuRQHxn8MgRSj7l6wBnwpI35ibwnYkxcRp/3DnCo8HY89 E+hLH8hH6c/06YffSch2hSnVH95RK7Xj2T+7Or1DzrQrx43YyWEi8HfgJDRpG47rvL7Q eGMD9vJPRmr6fZxYGTkXoOPN5p7CfaK4Pvo/zYKlHNGJonE8F9+BRm5x9uoHe+3zaEq7 +ccw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=jqqSigyROQSHlUq3V4XKgpMi7kpUzFBPzo0oPCMdIRM=; fh=65lSqu5lvPew+3w9nrC+tqLIladiOLrNF/r5J/lTfBo=; b=OckHN19t0kpv5QW5yHozACV68NjKrCkWda+GVUZhotegdINGprcxbwj2mqI8Ujq+76 VxTmkqvrpmMC46kSjAD75BR+Cp6SW6VIjK0gkwoRgNi+Ka8uHhngeLgMRcetjJGqBy21 HurRAulLCaswbAHAX9TTL8170y3H5Pi+eQbl0j8P6un8s+cvsdxm4uLjL2IHHC9YVQIk JJqCnC+GryAMwHVUI8P3TmCcBkgcFZUbu/0TVoZSUs5e3ySYHmOaxdOO/JT9vvY+nhA8 GlUFYHCvBLWrzY6rfjcE7xgRwyHXT0JPEjWiJ09iAQTIvc5eHHHMPuYDbnRU/2L2ICd/ aeaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b="MuTr2/Bv"; arc=pass (i=1 spf=pass spfdomain=atishpatra.org dkim=pass dkdomain=atishpatra.org); spf=pass (google.com: domain of linux-kernel+bounces-159118-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159118-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id s15-20020a0562140caf00b0069c79a15ae9si18663985qvs.290.2024.04.25.13.22.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 13:22:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-159118-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b="MuTr2/Bv"; arc=pass (i=1 spf=pass spfdomain=atishpatra.org dkim=pass dkdomain=atishpatra.org); spf=pass (google.com: domain of linux-kernel+bounces-159118-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-159118-linux.lists.archive=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 7B5591C2196F for ; Thu, 25 Apr 2024 20:22:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CDB915351C; Thu, 25 Apr 2024 20:22:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=atishpatra.org header.i=@atishpatra.org header.b="MuTr2/Bv" Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 2B99A15250D for ; Thu, 25 Apr 2024 20:22:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714076544; cv=none; b=C4vOsHfZjYPwlsSufSFrBiR7eG115clZs0EpOz9541NNcc2tjVH7yZlrnFuJ/PK6BWhmbmlxa7qXhK56CsI2X5OwoCqVIlgqToiSkyItLyEkb+3rpWlCCJXG8cxgeXmb+gML5qR8VhJ/Mz3cLt0PbV2FzPvXyDQJrJiwXMz9zMA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714076544; c=relaxed/simple; bh=41YtzbVRrCg3XTTkSACQriKeXiqHI+7Llqjp7Wbx6M8=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ENCvWAI/tzcb0Fzo2+jc4h6fk25909N5etm0V/2P6jv25kGuWqJ81pM+tetuLmXuyrVl3mWPnonuV/74iELhPTtutR32yn7D4AGKSoxG8FmlNxSa/J+pmzM2oiMxe5Krci1CLcZsRWM5n8GIixGi36g43sriE98Q90iA22BbJo4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=atishpatra.org; spf=pass smtp.mailfrom=atishpatra.org; dkim=pass (1024-bit key) header.d=atishpatra.org header.i=@atishpatra.org header.b=MuTr2/Bv; arc=none smtp.client-ip=209.85.208.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=atishpatra.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=atishpatra.org Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2dae975d0dcso26078751fa.1 for ; Thu, 25 Apr 2024 13:22:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; t=1714076540; x=1714681340; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=jqqSigyROQSHlUq3V4XKgpMi7kpUzFBPzo0oPCMdIRM=; b=MuTr2/BvwbDzZNJFMo5mmPEfXPy+1OgmNtQvPx/plFLVvvAwJz1p88W7350zeHZSoc EdOsJ9Met5Rk0YR2qgWWPPkInak9bRB4AMMy+rs8cZMVaZz8ZzAfM5aX5+jINk4DmJU3 LbkrjIH6DwtObUIgvZsQXofjx0lH4IKyXqCNk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714076540; x=1714681340; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jqqSigyROQSHlUq3V4XKgpMi7kpUzFBPzo0oPCMdIRM=; b=o6akrFDN/N73H3o9lUHmMrZ6O5fPPrm9em+7JTzEfzmUZ9QxQ8WW7Si/i5So7vz7xo Ipd1Ihh2lzDxXqJqlQry5+PL7/lF8nr2/x+1C7JFZsMz1v47zVWDRAeNiTYJwX5AjYi+ zWzJb6i9tVDQX1Vg7A8DgUc/tlZsFKtMmoLhRq8dweZCbwMK7FfwRy0HQBjeUGF/XKwC POgi7XzHnacGFvAaiTZk9tNtvXiwfohQjyiScvdH5oAbqi/42ttaHSfj2HrtR2qAO2oi VH+8Yu/HqDUiV61zqTLsS4X17amQbEKfbiAsHlPUyj06uwHS9ZLsqYD96ZIj0gimLrHb +L+A== X-Forwarded-Encrypted: i=1; AJvYcCW2J2wIQfMN9E9pycdcSF2zcJpWAklFpkFatAh0+wnnfYgaiShEQ5pbgmnpyumbdUkDaMpZnCD9Nf+ReW7H0eD/90Jhb5N6sJWEbXSr X-Gm-Message-State: AOJu0Yw4kkiVKwD6RnT3vOgfjk59I8UCoRa6axCOZx1mvOoGLv35VFp6 U5gg2B8Sc4AnME4YwTTpi3R8U5bvvV5Qb+V+q64Gf8HrN7R5c7rICPhdk87UHoQoOFuQisvKYpS bBFHXqyrkqPq1RMybIuGPgzhvqg3dsmA68nvV X-Received: by 2002:a2e:2e15:0:b0:2d8:79d6:454d with SMTP id u21-20020a2e2e15000000b002d879d6454dmr242743lju.23.1714076539984; Thu, 25 Apr 2024 13:22:19 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240425232933.4111680-1-atishp@rivosinc.com> <20240425232933.4111680-2-atishp@rivosinc.com> In-Reply-To: From: Atish Patra Date: Thu, 25 Apr 2024 13:22:08 -0700 Message-ID: Subject: Re: [kvm-riscv/for-next 1/2] drivers/perf: riscv: Remove the warning from stop function To: Samuel Holland Cc: Atish Patra , linux-kernel@vger.kernel.org, Alexandre Ghiti , Andrew Jones , Anup Patel , Conor Dooley , linux-riscv@lists.infradead.org, kvm-riscv@lists.infradead.org, Mark Rutland , Palmer Dabbelt , Paul Walmsley , Will Deacon Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 25, 2024 at 1:08=E2=80=AFPM Samuel Holland wrote: > > On 2024-04-25 6:29 PM, Atish Patra wrote: > > The warning message was initially added just to indicate that counter > > stop function is being called while the event is already stopped. > > > > However, we update the state to stopped case now in an overflow handler > > after stopping the counter. If there is another child overflow handler > > is registered (e.g kvm) it may call stop again which will trigger the > > warning. > > > > Fixes : commit 22f5dac41004d ("drivers/perf: riscv: Implement SBI PMU s= napshot function") > > This may be intentional, since you wanted these to be squashed, but this = isn't > the right format for a Fixes: tag (no space before ":" and no "commit"). = Otherwise, > Yeah. Just wanted to be explicit as the commit is based on kvm-riscv queue and not based on upstream commit. > Reviewed-by: Samuel Holland > > > Signed-off-by: Atish Patra > > --- > > drivers/perf/riscv_pmu.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/drivers/perf/riscv_pmu.c b/drivers/perf/riscv_pmu.c > > index 36d348753d05..78c490e0505a 100644 > > --- a/drivers/perf/riscv_pmu.c > > +++ b/drivers/perf/riscv_pmu.c > > @@ -191,8 +191,6 @@ void riscv_pmu_stop(struct perf_event *event, int f= lags) > > struct hw_perf_event *hwc =3D &event->hw; > > struct riscv_pmu *rvpmu =3D to_riscv_pmu(event->pmu); > > > > - WARN_ON_ONCE(hwc->state & PERF_HES_STOPPED); > > - > > if (!(hwc->state & PERF_HES_STOPPED)) { > > if (rvpmu->ctr_stop) { > > rvpmu->ctr_stop(event, 0); > --=20 Regards, Atish