Received: by 2002:a05:7412:bc1a:b0:d7:7d3a:4fe2 with SMTP id ki26csp1702rdb; Fri, 18 Aug 2023 12:14:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEDVm9myh+ll/5E008oZnSva8G7s9c7Lx4qpV+g27FgMUGTNnti80Z1Cb2TJlS9+L6zVJ0p X-Received: by 2002:a05:6a20:ce93:b0:133:6816:c889 with SMTP id if19-20020a056a20ce9300b001336816c889mr131218pzb.40.1692386046150; Fri, 18 Aug 2023 12:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692386046; cv=none; d=google.com; s=arc-20160816; b=RDyUWpqzAxMHsDLbDaqx+mRxK0mC0GM7Yt0FUk/zpQ2oAc8mu3kvDMeNHKbKeBn2AY 8i6Gj4jL5RBgioFmLlNBqjbPksddXAZ4RKwlanabaAA2rtGS3xiD6GSCMVDVcgU7veZq mA8UKLFR17oWbZYVP3Gv4XXRQ6on0n2L7P4l55dEFngw/bcIyOVjnH74g1nhoDfGJlPC wk22SgqDhLG6LJkTtGPeK6OKdPLnko6HAz0PkfOdeUKpZ/5aVUtdgb7wt1EJmpneGPdl L7bncEmIi+c4LcLoerns2JwxWyNsylxAVxs5oYzq4a855gc6GklwyS9MNvOXZ4FVBrPI H1EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=n840wiZm9Jtnxsg9MlJYtYvdfLJG9glGHna+dgI7Kkk=; fh=A/zs2DsV89voYsUhfHyF5eC/8wyulAI6rNj4BUZUqE8=; b=Kcm1Xp9CAWUpLT+OjJmgOhBv/7+E9UjI2CfbyKEXcTvgegdU5niyqS3jWCvmObKgm3 uOyQoJkBlmZHtS/7FKncHsDj5aMqzZTfopkngIfHq/9V1HaZhLos8a9kbiPRj+LsgKNM ApXzcE4ahmQ4e41wVJCtBjpY89IeueX+lUE109MMTRstKvuRDaN/WGh9aT/QBdrpz+m5 Fmp+wk/U3Lb8iSEHqmp/zlvN/MpFvXlP6PbP9mqtKlWXxkUUnDECYLGyRJEmOVQ5pU61 V2Irq+92DbmBYiUyypXKkJ7jTrWITzekTGf86L2NoIa+o1I7oHEzTQKSr7hi+HbXtr8b dDRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BPp0q5Qq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l186-20020a6388c3000000b00569374c7c71si825102pgd.857.2023.08.18.12.13.52; Fri, 18 Aug 2023 12:14:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BPp0q5Qq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241062AbjHPQL4 (ORCPT + 99 others); Wed, 16 Aug 2023 12:11:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234312AbjHPQLZ (ORCPT ); Wed, 16 Aug 2023 12:11:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5FC4E2; Wed, 16 Aug 2023 09:11:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6A95264A17; Wed, 16 Aug 2023 16:11:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88A8FC433C7; Wed, 16 Aug 2023 16:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692202283; bh=l0J8yDMBc74nmT7gwZGggcXqRVTFJWQG2J54M7XA4UI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BPp0q5QqydyqEXh/RKGyCfuudu+haCSzEXo8u/ua6uYq8RgUjltDdIFycod4kJCTz wY3Ml5pwlnFsI9dJgfIhOnzXzK2u6NbP1XZBby9cLzY/IJYiwylv8aJYaPTz0x7F2/ YFn+D40+ZYw7aP0iMym2qVoBRyQ5raJUMDztW96kPHz/58DnMl4Pqn0BJkJ58zXhTm 95D2m3ysSi2K+YNtDpffRR66V2DflNFOXqC668ykO5yNWSFZ2XM2EQ7+9cr0shykPk GDA15EOwoKnlG7FhLiUEbK5L0y5Of4I6PgYkcQI0h5XDrCX1Zw6fjBHci1NjcRxcpu M03bniOi6LiXw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id E6BD6404DF; Wed, 16 Aug 2023 13:11:20 -0300 (-03) Date: Wed, 16 Aug 2023 13:11:20 -0300 From: Arnaldo Carvalho de Melo To: James Clark Cc: linux-perf-users@vger.kernel.org, irogers@google.com, john.g.garry@oracle.com, renyu.zj@linux.alibaba.com, Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kan Liang , Haixin Yu , Nick Forrington , Kajol Jain , Eduard Zingerman , Sohom Datta , Rob Herring , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v6 2/6] perf test: Add a test for the new Arm CPU ID comparison behavior Message-ID: References: <20230816114841.1679234-1-james.clark@arm.com> <20230816114841.1679234-3-james.clark@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230816114841.1679234-3-james.clark@arm.com> X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Aug 16, 2023 at 12:47:44PM +0100, James Clark escreveu: > +++ b/tools/perf/arch/arm64/tests/cpuid-match.c > @@ -0,0 +1,38 @@ > +// SPDX-License-Identifier: GPL-2.0 > +#include > + > +#include "arch-tests.h" > +#include "tests/tests.h" > +#include "util/header.h" > + > +int test__cpuid_match(struct test_suite *test __maybe_unused, > + int subtest __maybe_unused) > +{ > + /* midr with no leading zeros matches */ > + if (strcmp_cpuid_str("0x410fd0c0", "0x00000000410fd0c0")) > + return -1; > + /* Upper case matches */ > + if (strcmp_cpuid_str("0x410fd0c0", "0x00000000410FD0C0")) > + return -1; > + /* r0p0 = r0p0 matches */ > + if (strcmp_cpuid_str("0x00000000410fd480", "0x00000000410fd480")) > + return -1; > + /* r0p1 > r0p0 matches */ > + if (strcmp_cpuid_str("0x00000000410fd480", "0x00000000410fd481")) > + return -1; > + /* r1p0 > r0p0 matches*/ > + if (strcmp_cpuid_str("0x00000000410fd480", "0x00000000411fd480")) > + return -1; > + /* r0p0 < r0p1 doesn't match */ > + if (!strcmp_cpuid_str("0x00000000410fd481", "0x00000000410fd480")) > + return -1; > + /* r0p0 < r1p0 doesn't match */ > + if (!strcmp_cpuid_str("0x00000000411fd480", "0x00000000410fd480")) > + return -1; > + /* Different CPU doesn't match */ > + if (!strcmp_cpuid_str("0x00000000410fd4c0", "0x00000000430f0af0")) > + return -1; > + > + return 0; > +} > + > -- > 2.34.1 > ⬢[acme@toolbox perf-tools-next]$ git am ./v6_20230816_james_clark_perf_vendor_events_arm64_update_n2_and_v2_metrics_and_events_using_arm_telem.mbx Applying: perf test: Add a test for the new Arm CPU ID comparison behavior .git/rebase-apply/patch:93: new blank line at EOF. + warning: 1 line adds whitespace errors. ⬢[acme@toolbox perf-tools-next]$ I'm removing it