Received: by 2002:a05:7208:3228:b0:82:47:81bb with SMTP id cb40csp551910rbb; Fri, 12 Apr 2024 09:07:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUySlv5BKlghSO/GZvp+kqOhURs+PA7Pd84C4wNhpaeuM3isbpdWX+nvD/PbGZmKSDmOt99imOeCzNWi8YSxgvISC2HmTkc0ysp0dpUHA== X-Google-Smtp-Source: AGHT+IEAc35Yp0Hrd1D4lUu4pWqylEUlmw6UY6qLlOMMAEgHcu8CXnnguopYZMkqFI1NC+YLusgp X-Received: by 2002:ad4:58a4:0:b0:69b:1be3:e773 with SMTP id ea4-20020ad458a4000000b0069b1be3e773mr2927713qvb.5.1712938072108; Fri, 12 Apr 2024 09:07:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712938072; cv=pass; d=google.com; s=arc-20160816; b=TWdkGK5QH1sPeUo048fDQj3bsLr4ysmnkKK8JtpIvy7w/TO0qPYi6MUquCIgfVyrG8 tZzZhg0z3sph/QuJdwfidUWHwxYPdZCWZCM785OxSF+5WHffjRTv+C53Wnt1NuwbRJfw frl56X3okt/w9FAx6gGUta3Ablm6hMoyIqIyXe2RzVqxVt3YdoXjadfPaXegYdN9xV0u CovJ5sVE0PiUsD4WjLgTWlP7fPfvvE5po8GW7Qf+xuLbhZ6CL3wFQ5v1gphFdsPWV8Xa +HhmBEC9Yf0M26VtxrVBa+XXWueIZY0gtGgwaM6AtyMYTCBqsj8q24/Q2AUEaATjIXkp PVNA== ARC-Message-Signature: i=2; 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=JXvp9Toot2l19GH7Uf2AxGsE9RhsEo2z9Z3gf99bCHU=; fh=pwjCGsGokWHU8keqUDlSMSskveZ5NWN3yFML8xuqYcE=; b=EOKi4d0vN0xc3UD4MNBirTwVZLR/jA1/tgNfeAWeg6TX/KrZtfynk5ZekrPrZMy8KX IarL3YX8ICb0ShKjWVwP6Dxy8EN50C6Qc2crAacW4i9l5ZVOEokpAl5tUy5huDMW/Hqi 5i165cGAiU6TgA0mRqyck9AooMxlZ309DJX9fJXos5SnGROsPPuLbZUqcLpvfYiYEnek rSH+9BuDMY+8Y2tlYSXxcwBAqmSyQ8LFdp3n76NrpNg6zm/cl/O8PLdFBfIhBakwi8VZ yGuZFno6lOC8T8g4kglQmqQOr97KcMbnudn9/+6zxmkKLdXMoNf3Rpn0q5qvaAh3As1u XJIQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gsmLtJW9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-143007-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143007-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 dg13-20020a056214084d00b0069b5acc633csi1115931qvb.2.2024.04.12.09.07.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 09:07:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143007-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=@kernel.org header.s=k20201202 header.b=gsmLtJW9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-143007-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143007-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 6E3C11C221B7 for ; Fri, 12 Apr 2024 16:07:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AED40148FEB; Fri, 12 Apr 2024 16:07:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gsmLtJW9" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6672149DE2 for ; Fri, 12 Apr 2024 16:07:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712938021; cv=none; b=dtLx7e4vLbFOEeUrMAYrUr/2qq7Z8t0XDNC2s+BaxigmAjZTJe19VbBkXnsoTh7nWQ4jSi8JlTvCSi86FYHb23sTG0x1eQ7+fwGO6iHf0H+xoJDGL3F2TN9AnUANE5N/YBLfCSjxuQCxE8zHiXPsFP59qD6xzBMjuG/bvcE+cYg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712938021; c=relaxed/simple; bh=Kq2Qv5HKN8VTt0ixnatAxkoSanE29MgxLBoVDR7PqWY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=ftXatXEehsDptSeDsboibUBg8vQJMIY9SPqKxA9agBNKePF5++K/mi/i98+y6OMkWiPT8USZdwXtm463ipyA8D0fERbQvvcZRrvOv80iqI8luszX3q6JSs5mh0qqnn/NAyBsj6p7K8pisY+ANXqWP+/b9w1oP+TvqugeOc2dV3U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gsmLtJW9; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2377FC2BD11; Fri, 12 Apr 2024 16:06:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712938021; bh=Kq2Qv5HKN8VTt0ixnatAxkoSanE29MgxLBoVDR7PqWY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gsmLtJW9LTMwyOItD4ObLaKXkh2lfqifIDB8SftWrBMw9G5Yc5SKyoEyBqdEijis1 RHJx1UXz0nG3E5XDBR9fG3x4RcFxUGHMrAsXYibTEEM8ZQ4EF/Jw8ClIOh/L79CdeT 2xaRmoQbU0QaY6RNzeJ8qen22yv2S4sUMWHfNljofJhd2GKSRipZhhjBU9UQkiy61B 5WKomkGPY4CtW16Kb8lF9q0zxEjq3w+XY0D4nXzKsX6uLYu/NdbBsbLytk8sjdr4T5 fMIfKQVSZK3DyI5XnTvSsQR3raR4OhKoeCylRVwJlZWc3QG7A+Vy0hEelMAL28Vglt Zb/R17NaS9Sww== From: Will Deacon To: mark.rutland@arm.com, catalin.marinas@arm.com, broonie@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yicong Yang Cc: kernel-team@android.com, Will Deacon , jonathan.cameron@huawei.com, prime.zeng@hisilicon.com, linuxarm@huawei.com, yangyicong@hisilicon.com Subject: Re: [PATCH v2] arm64: arm_pmuv3: Correctly extract and check the PMUVer Date: Fri, 12 Apr 2024 17:06:43 +0100 Message-Id: <171292289666.129267.8434461494891295538.b4-ty@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20240411123030.7201-1-yangyicong@huawei.com> References: <20240411123030.7201-1-yangyicong@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Thu, 11 Apr 2024 20:30:30 +0800, Yicong Yang wrote: > Currently we're using "sbfx" to extract the PMUVer from ID_AA64DFR0_EL1 > and skip the init/reset if no PMU present when the extracted PMUVer is > negative or is zero. However for PMUv3p8 the PMUVer will be 0b1000 and > PMUVer extracted by "sbfx" will always be negative and we'll skip the > init/reset in __init_el2_debug/reset_pmuserenr_el0 unexpectedly. > > So this patch use "ubfx" instead of "sbfx" to extract the PMUVer. If > the PMUVer is implementation defined (0b1111) or not implemented(0b0000) > then skip the reset/init. Previously we'll also skip the init/reset > if the PMUVer is higher than the version we known (currently PMUv3p9), > with this patch we'll only skip if the PMU is not implemented or > implementation defined. This keeps consistence with how we probe > the PMU in the driver with pmuv3_implemented(). > > [...] Applied to will (for-next/perf), thanks! [1/1] arm64: arm_pmuv3: Correctly extract and check the PMUVer https://git.kernel.org/will/c/b782e8d07baa Cheers, -- Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev