Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp2082756rdb; Thu, 17 Aug 2023 10:10:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGNehvPGCWkrYOhwcINv2ai5Ysgi1WgjThh5qayMLtW0W6IBAjOnFSBhXQAYZiUeOYJUgkJ X-Received: by 2002:a05:6808:147:b0:3a7:b5ea:f5e7 with SMTP id h7-20020a056808014700b003a7b5eaf5e7mr112953oie.39.1692292219589; Thu, 17 Aug 2023 10:10:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692292219; cv=none; d=google.com; s=arc-20160816; b=nCdud3t5v7ujVTy/3olZQKezcpqbmhUIfRysz1+gRw6wYAYyqdBmMUg60bSGvjrvwy U+RkFK0y6nF7QxdJAc0Hb2lL7ujuwcjB3wztYAJ8m1GJZ194iTa5SGbo2G8J5dWfwrNW DlPFP9l6EkZAbzL7moFehCD7nhtig1mVi4oMe7TQnj4A+Z79Wc/0+0T/stmrDx00vef1 I3gyvLXCLgc43AKIEaBQe8Tx0ntzfA5ULk0gjKyEYuNtJe9RJefviBGQ0897muooRjfj NEuU4G4SF62oqtDoAutvaYnycPN27h6ZXShDhIY37MfBTxxrXEEH2HEPz3K5KsvDVQzS e/cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=IwRGkyd3zUld8CHdV9bBYAkQ1rajHMyOd1LtTf6xKJY=; fh=heJlvO2YharwnPvD5eeprwigmgKVMKzSs/CDaHrfMeU=; b=Jp6g39Bns6V5dV5Q1bQ+lnf9oeG4UiGtwarznqvwHMv+Um3UOS8c83D0ibfCyKhuUa vvJVVr1IJWdTwKtYYjk+07EZUILjqhbeT3G2XEae2xTLnpku8XYdx+S1/plFIathZvaM O8ECF9Kli/4jsbdYP4eCP7NlR5S0cY8DSsPMFbGg/wPy6Wbzhgnj00CVgyxeRSpPOsyh 02eIIdsavbS9la3mFgjf9f0fYx8riFVmJsrneJ38pauqh6PiknrMViyl4VXCqE+iCCNf 36idlIVeeOJ8MLp3AYj7CviCvr+H3Pe6VDgYynTla6kUvWXW89HK8p8DCTeqoJMyHPOr sNOQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j2-20020a63e742000000b00569374c7c71si978573pgk.857.2023.08.17.10.10.04; Thu, 17 Aug 2023 10:10:19 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349202AbjHQJCs (ORCPT + 99 others); Thu, 17 Aug 2023 05:02:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232046AbjHQJCS (ORCPT ); Thu, 17 Aug 2023 05:02:18 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 03A6AE7C; Thu, 17 Aug 2023 02:02:12 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 484CDD75; Thu, 17 Aug 2023 02:02:53 -0700 (PDT) Received: from [10.57.3.248] (unknown [10.57.3.248]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 602CF3F64C; Thu, 17 Aug 2023 02:02:09 -0700 (PDT) Message-ID: Date: Thu, 17 Aug 2023 10:02:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v6 2/6] perf test: Add a test for the new Arm CPU ID comparison behavior Content-Language: en-US To: Arnaldo Carvalho de Melo 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 References: <20230816114841.1679234-1-james.clark@arm.com> <20230816114841.1679234-3-james.clark@arm.com> From: James Clark In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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 On 16/08/2023 17:11, Arnaldo Carvalho de Melo wrote: > 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 Interesting that checkpatch.pl doesn't see that. Thanks for the fix.