Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1156532rwl; Fri, 24 Mar 2023 07:03:28 -0700 (PDT) X-Google-Smtp-Source: AKy350b1hVaV6TKiVyyiM0h26+6gxe5HHR7BWceqACuCez1K/ivD2YiHJFXnVqZ8gHD5qe5GUada X-Received: by 2002:a17:906:cb98:b0:931:73d:4cc3 with SMTP id mf24-20020a170906cb9800b00931073d4cc3mr2849869ejb.11.1679666608287; Fri, 24 Mar 2023 07:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679666608; cv=none; d=google.com; s=arc-20160816; b=fUACMFOWjytsViUNFasyOV4mILm5xbxyOJUQ7XMAUf0IrsR2uek2BploVcl8j0tANL Q/v0RMrNsJqNwd+xlkIQI4HDqWVOWogKlTY4BEawLOW/poQ4hYAKVVQoKiooIPlVMpNS t+0mqwM8fggP9ijTLUoq8svdmaqEtq9YMO2QSF3b/g3YsoZeHlhv7Iu0aTP/xAB8bLtF 3K5UBHDmxfaom+4pR/JHuwXQ+3FdHsb0ZhWdKvtGT3dzRTDDiU8W/OSHLdhWUX1Q/IpV uFcLO+atbU7OxAshVVAY2GRRzXMcOO50J0UaohVElPQwsrS2OCPcsOlpCqF2tsQrg4+X mqBA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=NXDegrKLdDzuYQZxXumnpzjlEJB5cDY4+QXICVuQmO4=; b=ujb7f6oDAQsd7sdDLq9RssbMZiZI/TVOdTpU4EG2AAbcJ6ZNwZALijkTLW8CL1H5UC Ufm/GKat+UNaxhwom6XuhbIEujRerLcEX3iRFYvjnSgEbEnW5V2aLa1MuLJbeV8giKhZ KtGi8FI8JRUDTRb8evF7gD0D+rqPU/VCpGAihqh/Z5AWwkI25p3nQPLHqkiY/C5LxtYl qacaeU280K3Frvk4bXwr8JBSu1gECbh6DJJqzU1Hh0l/BTYD5B9xYHeDLs7TpghcgKzb 2ZFbJPH1OljGPv16bKiiA+mNRdYbRPoIjR94aGlH65GMYnRBatiSr6Qeuo8LjG7G8LGH 3brg== 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 hu22-20020a170907a09600b0093aa9b57f97si1077989ejc.138.2023.03.24.07.03.03; Fri, 24 Mar 2023 07:03:28 -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 S232093AbjCXOCS (ORCPT + 99 others); Fri, 24 Mar 2023 10:02:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230476AbjCXOBw (ORCPT ); Fri, 24 Mar 2023 10:01:52 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 75C481CAD1; Fri, 24 Mar 2023 07:00:55 -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 6F4A211FB; Fri, 24 Mar 2023 07:01:23 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.55.116]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B9FE53F71E; Fri, 24 Mar 2023 07:00:37 -0700 (PDT) Date: Fri, 24 Mar 2023 14:00:34 +0000 From: Mark Rutland To: Janne Grunau , Will Deacon Cc: Rob Herring , Krzysztof Kozlowski , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] drivers/perf: apple_m1: Add Apple M2 support Message-ID: References: <20230214-apple_m2_pmu-v1-0-9c9213ab9b63@jannau.net> <20230214-apple_m2_pmu-v1-2-9c9213ab9b63@jannau.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230214-apple_m2_pmu-v1-2-9c9213ab9b63@jannau.net> X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 Tue, Feb 14, 2023 at 11:38:02AM +0100, Janne Grunau wrote: > The PMU itself is compatible with the one found on M1. We still know > next to nothing about the counters so keep using CPU uarch specific > compatibles/PMU names. > > Signed-off-by: Janne Grunau Acked-by: Mark Rutland --- > drivers/perf/apple_m1_cpu_pmu.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/perf/apple_m1_cpu_pmu.c b/drivers/perf/apple_m1_cpu_pmu.c > index 979a7c2b4f56..83b74c7fe63f 100644 > --- a/drivers/perf/apple_m1_cpu_pmu.c > +++ b/drivers/perf/apple_m1_cpu_pmu.c > @@ -559,7 +559,21 @@ static int m1_pmu_fire_init(struct arm_pmu *cpu_pmu) > return m1_pmu_init(cpu_pmu); > } > > +static int m2_pmu_avalanche_init(struct arm_pmu *cpu_pmu) > +{ > + cpu_pmu->name = "apple_avalanche_pmu"; > + return m1_pmu_init(cpu_pmu); > +} > + > +static int m2_pmu_blizzard_init(struct arm_pmu *cpu_pmu) > +{ > + cpu_pmu->name = "apple_blizzard_pmu"; > + return m1_pmu_init(cpu_pmu); > +} > + > static const struct of_device_id m1_pmu_of_device_ids[] = { > + { .compatible = "apple,avalanche-pmu", .data = m2_pmu_avalanche_init, }, > + { .compatible = "apple,blizzard-pmu", .data = m2_pmu_blizzard_init, }, > { .compatible = "apple,icestorm-pmu", .data = m1_pmu_ice_init, }, > { .compatible = "apple,firestorm-pmu", .data = m1_pmu_fire_init, }, > { }, > > -- > 2.39.1 >