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 6E35FC3DA7A for ; Fri, 6 Jan 2023 11:12:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232478AbjAFLMC (ORCPT ); Fri, 6 Jan 2023 06:12:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbjAFLMB (ORCPT ); Fri, 6 Jan 2023 06:12:01 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04EB56E0E1; Fri, 6 Jan 2023 03:12:01 -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 970B71EC06F0; Fri, 6 Jan 2023 12:11:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1673003519; 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=Zwa1AJdb1Yx9W9VHqmxo19nMGtCwdhn9fNGoNRc3Nhc=; b=Pb3VcGqBfz/Sy3m2F7IeNoquqxzxNd6SRV3L/jVX4g54WtQqhez88GO5R+myAv9erg9oE8 Uj+QZu2Vo4e76djS5EOlrwsfE4uETg/cJABcWHk2u7WrDJ+h3AvjkTND2Tg0XHdqM79JAs f0lhpYl92UU5GuGsBubOWJ+Mi9+77vM= Date: Fri, 6 Jan 2023 12:11:54 +0100 From: Borislav Petkov To: Ingo Molnar Cc: "Zhang, Rui" , "Hansen, Dave" , "ak@linux.intel.com" , "x86@kernel.org" , "dave.hansen@linux.intel.com" , "peterz@infradead.org" , "linux-perf-users@vger.kernel.org" , "mingo@redhat.com" , "tglx@linutronix.de" , "kan.liang@linux.intel.com" , "linux-kernel@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> <4cc5cd868b20366fc9d4bf157656e0c295074282.camel@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 Fri, Jan 06, 2023 at 11:56:18AM +0100, Ingo Molnar wrote: > It's a trade-off in any case: there's a point where quirk flags or even > feature flags become harder to read and harder to maintain than cleanly > separated per model driver functions. Yeah, no, singular: a synthetic feature *flag*: X86_FEATURE_RAPL. cpu/intel.c can set it and driver can test it. Everything else inside the driver. Until Intel can get their act together and actually do a CPUID bit like AMD. :-P But when you think about it, whether the model matching happens in the driver or in cpu/intel.c doesn't matter a whole lot. All that matters is, they should finally give it a CPUID bit. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette