Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2485548rwl; Fri, 6 Jan 2023 07:06:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXvxnGEIRnQw8HZdPXI+KTKE1R1Z4JW7qXUboiV4En9pdcu5qKHU8VCzIVJmy5wBXMZVZb4f X-Received: by 2002:a05:6402:6d8:b0:462:6e5e:329a with SMTP id n24-20020a05640206d800b004626e5e329amr49505052edy.8.1673017583831; Fri, 06 Jan 2023 07:06:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673017583; cv=none; d=google.com; s=arc-20160816; b=gZgNewafDey9Qx3bIggb32nOrUy9+FHRNOmtN1NvvLmSUxpqga+2bqvmHjWunUPCtd 7Gn9pGad4DFR5vXtfUlFY8eXTXf/GTalc/jnJVbpihf+k7V0icT5mHUtYOgaRyONwTMw mTFsB4I/V54zfl+JbxAuTqqSH7VlmZX5zks6LXGab6IKgcdDO3locQEnFyiJ5Kmj755+ L0PXyXcX6tSjuwzQ4E4q9K/MPe1lQNH6A4PnV6K9VajofRCkDtqiBW9aP5gwZrS1NJMy EKUepXPCeGX7MB4qzy4RLYK21NfsTbg9ZlSlnDgZlKBbgjtroToty12sTXOpYHM8XjLi LjYQ== 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=pJXYOpevDeH94S9Y0/8hjDZhR1yAlOLk1AabVA0ifvI=; b=xiFg+JNGkgUinohfoh+VKojqC6dfbQeE4djUDG4QjYZogWT9o6ybcQOr6sdP6hZznX G6dadhJxMTu749p54/UtnchMGOZEE1QdZ4asB+a5x2We+vnhGYq21CRbj4bRjyIF8Bu7 CpbBaIyzN5HnCDu9sshHh9njRKXLoNel4j2wXGvfxoBAkrNG6sWUvsmPvcej20anPGg2 wuXZfmvUBskszHJwf6NFivBsyRlJNBCQX/iCTaxM14iLxw/bfaz1vmre0iS0P0e2ydni Y9kHloYh5yniASt2sCi4oP91Xr++BLKFD2lBGoSLD1vBLguHXruPQeiNCClwdcCgLg8+ ZVjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=SvEJT9UN; 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 b9-20020a056402278900b00453688643fasi2110176ede.260.2023.01.06.07.06.09; Fri, 06 Jan 2023 07:06:23 -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=SvEJT9UN; 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 S232636AbjAFOuL (ORCPT + 56 others); Fri, 6 Jan 2023 09:50:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234782AbjAFOuF (ORCPT ); Fri, 6 Jan 2023 09:50:05 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 391E880AEF; Fri, 6 Jan 2023 06:50:02 -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 C933F1EC050D; Fri, 6 Jan 2023 15:50:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1673016600; 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=pJXYOpevDeH94S9Y0/8hjDZhR1yAlOLk1AabVA0ifvI=; b=SvEJT9UNtkbWfP8Y8B3zja9SXWS0PDGwxOTN8z2sY7qwB2zdisTuyotKg8jaFMc0I0kUFr 7yN1MOrMbBd1A0MCGGjFEBmPFYwnbJG9QL0aVaMfTapxvSeoI2LWdxGV9G6v6NhT4ksMrA VI+ELc8doeCSNwf7Ph+TGsWZ1kJYcdA= Date: Fri, 6 Jan 2023 15:49:56 +0100 From: Borislav Petkov To: "Zhang, Rui" Cc: "Hansen, Dave" , "ak@linux.intel.com" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "peterz@infradead.org" , "linux-perf-users@vger.kernel.org" , "mingo@redhat.com" , "tglx@linutronix.de" , "kan.liang@linux.intel.com" , "Bityutskiy, Artem" , "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: 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 Fri, Jan 06, 2023 at 02:38:10PM +0000, Zhang, Rui wrote: > And then set the feature flags based on this, and make the drivers test > the feature flags. That would be the purpose of synthetic flags. > The goal of this is to do model list update in one place instead of 4 > or more different drivers when a new model comes. Do you really have to update 4 different places each time? As said before, you have to do the model matching *somewhere*. If you have to do model matching in a lot of drivers - and it looks like you do - judging by $ git grep X86_MATCH_INTEL_FAM6 output, then doing the matching once in cpu/intel.c and setting a synthetic flag does make sense because all that matching code will disappear from all the drivers but be concentrated in one place. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette