Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4552178imm; Mon, 17 Sep 2018 16:23:19 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYh0QBjqIizOfl1KFbAiNpdByZUizf6rBJPg94Ci9lANcjee6ffwZM43zztiYg3AOmAIB2W X-Received: by 2002:a63:9a02:: with SMTP id o2-v6mr23357439pge.440.1537226599817; Mon, 17 Sep 2018 16:23:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537226599; cv=none; d=google.com; s=arc-20160816; b=vNEceAAovXrvYYnmYkSk9GSfftlb/S5MlymHRpTXWBy1xaJD/WpUw7DjOAVZjW2RY8 eQfGghsssdyiyemLlnyyI16nq//7ns0tRNEiRNHwJBym12pnCH7Crtq2lIp24TBL/yJu aJwb4kAOvOrWcFKTauLcemVMzahdm6tlpvi4x7ztk3cFSv6blnHH8ZUEAluZx1Issa6v te9UGlMC8lcDtSs7PY5AEiRrlQBZQ7END2zS5pKK1XvHNAG4T0y3iqiKR7wGbuwxPTfe ZIeeSe8/TgDqjK59hRAXsZNormueE89jgNYrOST4zWOm3YzKrOEb2Gw4yCRur/7j3QAW SQJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ZCL3HgdmOEscZMRp29ovpQdUgumnD0V9H/8hzqWR4NU=; b=uPAUoM7GLVvyvxBYZE9oVU1sQGVOq9gy6z4roOWav7iZO+iaIPni9I8GmgvEIiUE91 g2U+y4tasxi56gRLiLu48kstmdih2rChv7E/0XcD3GdyJASXcKLY1FayATO6M/vdEiR7 8eq24yPyRXJKKUmHo6AStkz6LyHI3RGQziKpySzV45UDu0Bqrd6LDhjWKw7Li3ed7CYY 0M2aWmIDbhsod6UHFZRQXLfWwOxFy/dRkGY26HbsJwCuZWJTsKpnnoSR2x/GEq5EpSq6 0kUIS+zqima6htfcW6Ktz1EDuOocCfxWWE25YAjiTazw++3CRQQEQ6jpTOTZXJji2LWn FO7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=QpE+v3pe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y10-v6si17272963plp.410.2018.09.17.16.23.04; Mon, 17 Sep 2018 16:23:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=QpE+v3pe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731642AbeIREhj (ORCPT + 99 others); Tue, 18 Sep 2018 00:37:39 -0400 Received: from merlin.infradead.org ([205.233.59.134]:44404 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727344AbeIREhi (ORCPT ); Tue, 18 Sep 2018 00:37:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZCL3HgdmOEscZMRp29ovpQdUgumnD0V9H/8hzqWR4NU=; b=QpE+v3pehnsgJlDvNRH1e85z7 mWeNNZHTt//5SyZYrFdzX0GUrv5JkWinTyPStqpSvphRtYZByGAyBGa76mcV9umyCBQ8I3B5zUMN0 ly7ib1FGcxIYA/obtfeu4RfBNwyG/zLnO0FquG34wcacpntPP95oMKMi58k1ML6+2/Odh5Fu1nJmn ULsbDB8Ad+5vRMcz6b5v7duE529h00FdHiGHJ1+I3XDoJ1UJ4TXRy21o04tgFrRdVKxabaFM5ozJp tVQKxOkKdJr+37/aZaOqcN5lA9e2LD0T7k+oEwO07U1sS0PfL5weQuYGSxrpeH5GkMb7S1rp766V2 CbgUK8Y5g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g22ca-00074r-2V; Mon, 17 Sep 2018 23:08:00 +0000 Received: by worktop (Postfix, from userid 1000) id 2AE226E0A92; Tue, 18 Sep 2018 01:07:58 +0200 (CEST) Date: Tue, 18 Sep 2018 01:07:58 +0200 From: Peter Zijlstra To: Reinette Chatre Cc: tglx@linutronix.de, fenghua.yu@intel.com, tony.luck@intel.com, mingo@redhat.com, acme@kernel.org, gavin.hindman@intel.com, jithu.joseph@intel.com, dave.hansen@intel.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V3 2/6] perf/core: Add helper to obtain performance counter index Message-ID: <20180917230758.GA3117@worktop.programming.kicks-ass.net> References: <6f93048a74c66a275f8eb6e1298f10552d1e5d95.1536685533.git.reinette.chatre@intel.com> <20180917082336.GP24124@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 17, 2018 at 09:37:14AM -0700, Reinette Chatre wrote: > On 9/17/2018 1:23 AM, Peter Zijlstra wrote: > > I said arch/x86/include/asm/perf_events.h and call it: > > x86_perf_rdpmc_index(). > > > > This function is very much x86 specific. > Moving it to arch/x86/include/asm/perf_event.h is not trivial since this > file is not familiar with struct perf_event. Urgh, right you are. Does it work if you make it a regular function instead of an inline? Put the thing in arch/x86/events/core.c or so and only an extern decl in asm/perf_event.h.