Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp111513pxb; Thu, 27 Jan 2022 16:28:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJyPtT9/97s+QerbBLLsLFiSSButW76y56N3/M4NcHZYHK1CMLG79YhiwgtQx/Nse7ZXSkKm X-Received: by 2002:a05:6402:5247:: with SMTP id t7mr6053505edd.10.1643329721178; Thu, 27 Jan 2022 16:28:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643329721; cv=none; d=google.com; s=arc-20160816; b=HCR6/mXJWqXk/Km5Gz0lye3im1clDSya3qYSDnhNtxNeoKYv3AuUQsOp7qvsoVozCm nJQDrdGlBr6k1uq5IMGECUK7+6dvGNTVmaWjM/1/auPZrAhCVsAvsrBmnLZXLZ1zGzZ+ +66Uzie0lpF59EeADhG9TIUusOtW7xn2FWZNiV+Jx0V1kcoNHTR6gOXebQDQt5y1UMcr If2ju92dSb4ZKEDazXUIiJ4g3zGVVwW7be0LsmSu9VZzOUUL+NV/6SrwYAGqRerImIw2 PYDL7aFbXUDOzvs7BaBX6/X1K6ytJDzkRzJnpGFixQU2n+PGH15aVT79b2JfIhXTE6i8 IIKA== 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=R10rczCoNInVexJ1TCTKIHNcjnMZr8Df6vy6pBlljCA=; b=ziIaF8ryxt0u3+2iNuv/+15zYgUV9i6slZjL9Z5M5m4cnf2wyV909U5z099APR0gDn 6nqwipNxaXjefZgMHcwVyX9f19kCy8vwaQ/41aoHXmncoRMw0VOxRm5Et/vXKil+rDSj 3c9A8yNDB5OT+N5auQ3+blSBMY7L+NotJgeifH2q7IB3d6tyF1eFu1O7Srloe4s++rvg xb0niAxFO+9VjLMi6VVBuD5njnkCWZ/ZBQLEoJSXmJ/b2++81C+Cc0PGKJG26w8vI2Le Zok5L31Yf2BasiNCApKgGkRIX8DEJyU2YG4m1wmfS6l+ygqJ9mD7mvSLAyOzZ89H5dlg itzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ZD32iGgt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z67si2103942ede.475.2022.01.27.16.28.07; Thu, 27 Jan 2022 16:28:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ZD32iGgt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241531AbiA0NH1 (ORCPT + 99 others); Thu, 27 Jan 2022 08:07:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241535AbiA0NHZ (ORCPT ); Thu, 27 Jan 2022 08:07:25 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3C36C061714 for ; Thu, 27 Jan 2022 05:07:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=R10rczCoNInVexJ1TCTKIHNcjnMZr8Df6vy6pBlljCA=; b=ZD32iGgtBtIR37gKtxeU9b/cx7 eBvrPWVWUGxAC1yS0g/jVw85HOgYplapNWQxUmXg2GE3h+VHpGw/OTXLudFcsknpCTS066W8gr2yO VGU71mJa2bxoZGXaUI4SsGb/tnMPoHiCXJnWAVZcFjijXa+xJl+oyrjokXLpW7ZcIo860EmWqs57q p7N7N9nF3wSMT5u894Q4Cpiv0tpD6YzfHGLMN0RyQ+tvg6znQcnfPFjUiMeJyizgu9CIw8nf91R5Y oCikq9Q7rBcVbinQze9AsXz6T766OvqboHxyDBKxUgNtkixvjIxaclX7vXlImynOx/YR6X/YJ+tHf Un8cTo+w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nD4Uf-005FVR-P7; Thu, 27 Jan 2022 13:07:18 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id CA7B8300268; Thu, 27 Jan 2022 14:07:17 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id B5B212B52092C; Thu, 27 Jan 2022 14:07:17 +0100 (CET) Date: Thu, 27 Jan 2022 14:07:17 +0100 From: Peter Zijlstra To: Stephane Eranian Cc: linux-kernel@vger.kernel.org, kim.phillips@amd.com, acme@redhat.com, jolsa@redhat.com, songliubraving@fb.com Subject: Re: [PATCH v5 09/13] perf/x86/amd: add idle hooks for branch sampling Message-ID: References: <20220126233454.3362047-1-eranian@google.com> <20220126233454.3362047-10-eranian@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220126233454.3362047-10-eranian@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 26, 2022 at 03:34:50PM -0800, Stephane Eranian wrote: > +static inline void perf_lopwr_cb(bool mode) > +{ > + /* key enabled only when BRS is available */ > + if (static_branch_unlikely(&perf_lopwr_needed)) > + perf_amd_brs_lopwr_cb(mode); > +} static_call() might be better at this point..