From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754612AbcBVLIL (ORCPT ); Mon, 22 Feb 2016 06:08:11 -0500 Received: from www.linutronix.de ([62.245.132.108]:33109 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754543AbcBVLIG (ORCPT ); Mon, 22 Feb 2016 06:08:06 -0500 Message-Id: <20160222110440.939423008@linutronix.de> User-Agent: quilt/0.63-1 Date: Mon, 22 Feb 2016 11:06:49 -0000 From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , x86@kernel.org, Borislav Petkov , Stephane Eranian , Harish Chegondi , Kan Liang , Andi Kleen , Jacob Pan Subject: [patch V2 09/28] perf: Allow storage of pmu private data in event References: <20160222110337.198341739@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=perf--Allow-storage-of-pmu-private-data-in-event.patch X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For pmus which are not per cpu, but e.g. per package/socket, we want to be able to store a reference to the underlying per package/socket facility in the event at init time so we can avoid magic storage constructs in the pmu driver. This allows us to get rid of the per cpu dance in the intel uncore and rapl drivers. Signed-off-by: Thomas Gleixner --- include/linux/perf_event.h | 1 + 1 file changed, 1 insertion(+) --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -467,6 +467,7 @@ struct perf_event { int group_flags; struct perf_event *group_leader; struct pmu *pmu; + void *pmu_private; enum perf_event_active_state state; unsigned int attach_state;