Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp636019rwl; Thu, 5 Jan 2023 02:19:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXsUsuE0pkmqdiqrZhrPBisvchFXFUb3hPmniV2ujI7V9fqEhkzXUx5i+vCYrF26yPVgibGY X-Received: by 2002:a05:6a20:d817:b0:af:745f:7838 with SMTP id iv23-20020a056a20d81700b000af745f7838mr73355109pzb.30.1672913982869; Thu, 05 Jan 2023 02:19:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672913982; cv=none; d=google.com; s=arc-20160816; b=E+uWW/e1tLOOsEf6taXgAhQaKpVqZzPRU4F5byQptVjWJgkC0Mc/gqiYxLEdKEUXWr bMBvEQZFsrRBk421KpFqmDLZGSal0WKHRmPRtxw02PfTmuyVUPfS+Xyuy1QRbtHYqU2f mvxmc3P+30CUL5x83eHsMzAIoa28AZstzFOe5iQ1sC4mcJJPtvrVrs5MC/bRMQvmkCNu Evuo7LatZ0VZGAJlfwPm9n2jzTlwK8iVaI3QDDC9V1zWjQPIr5N1QMHr9BtzOwExSZ10 v1BabsjzJvd6qQPnvJUC5YBTQetw4/OJwxX6ZII23MUAMTYjZZj/tdvTkWOPpvDFKwhm N6NA== 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:dkim-signature; bh=Sx5RS30uf2d6PJKDBDI6SAbwke9ZdIpEgVjPdi62s44=; b=c0xkSeEijhmTSa7rD5hURhT7kcrPSkopwW27DVBZWKseR7wjpSwCvR220xMvQfRXl1 RCNiUeZUwB/GY87DSC6zVOtrh4G8o7RG9xYD5Vaz9GBptMTKXb/PI/NY/iHQDwG+PUVL U3s8ZAisFsJjWpN2BGo22EXwk3qvUbOf3HmiWIgf1lbvICp/H3+JnuZm7FagZL2ud5lN RlfAxmNjNAlSngo4DEvGLjYAe7lpsj573M2PZ/x/RzxkNUJr2kEYfMmCXoMT8LlhtCzR Hhy+TtIjDUDrYXg6n/bDLukkzeD/x2q2iZndN+UadvW2HttimZN3rY7WERWqJGaf4Kgt XnQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=hH5wxyez; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f33-20020a635561000000b0046ef21af717si38462021pgm.683.2023.01.05.02.19.35; Thu, 05 Jan 2023 02:19:42 -0800 (PST) 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=@alien8.de header.s=dkim header.b=hH5wxyez; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232196AbjAEJzx (ORCPT + 55 others); Thu, 5 Jan 2023 04:55:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232378AbjAEJzj (ORCPT ); Thu, 5 Jan 2023 04:55:39 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1B3D59D02; Thu, 5 Jan 2023 01:55:31 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 44C5E1EC068E; Thu, 5 Jan 2023 10:55:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1672912530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=Sx5RS30uf2d6PJKDBDI6SAbwke9ZdIpEgVjPdi62s44=; b=hH5wxyezdKdBVaJ7FRpM+B3XvjvhSkBzUgNUrahzckjDDQqMsfOEHESn7teDH83YimEtpH Md2pEPxfIFu2Aj9qAjEZeQodcgQl8CvCLKfwUUWjmYVNHnlCvfQCOnoQ0BOZEZ3TDojcn8 GUG9eCaUqn+9bQjbtJHguETLjYJWAE4= Date: Thu, 5 Jan 2023 10:55:25 +0100 From: Borislav Petkov To: "Zhang, Rui" Cc: "peterz@infradead.org" , "Hansen, Dave" , "kan.liang@linux.intel.com" , "ak@linux.intel.com" , "x86@kernel.org" , "dave.hansen@linux.intel.com" , "mingo@redhat.com" , "tglx@linutronix.de" , "linux-kernel@vger.kernel.org" , "linux-perf-users@vger.kernel.org" Subject: Re: [PATCH 1/2] perf/x86/rapl: Add support for Intel Meteor Lake Message-ID: References: <20230104145831.25498-1-rui.zhang@intel.com> <25d07838-3904-a086-4238-f56c9424b53a@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 On Thu, Jan 05, 2023 at 06:54:31AM +0000, Zhang, Rui wrote: > I thought of this before and got some ideas related. > Say, instead of maintaining the model list in a series of drivers, can > we have something similar to "cpu_feature" instead? Yes, you can define a synthetic X86_FEATURE flag and set it for each CPU model which supports the feature in arch/x86/kernel/cpu/intel.c so that at least all the model matching gunk is kept where it belongs, in the CPU init code and the other code simply tests that flag. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette