From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B0FBC54E76 for ; Thu, 5 Jan 2023 09:55:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231791AbjAEJzv (ORCPT ); Thu, 5 Jan 2023 04:55:51 -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: Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@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