From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757115AbcBWD5a (ORCPT ); Mon, 22 Feb 2016 22:57:30 -0500 Received: from e28smtp04.in.ibm.com ([125.16.236.4]:33492 "EHLO e28smtp04.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757084AbcBWD52 (ORCPT ); Mon, 22 Feb 2016 22:57:28 -0500 X-IBM-Helo: d28relay04.in.ibm.com X-IBM-MailFrom: maddy@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org From: Madhavan Srinivasan To: linux-kernel@vger.kernel.org Cc: Madhavan Srinivasan , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Anton Blanchard , Daniel Axtens , Stephane Eranian , Sukadev Bhattiprolu Subject: [PATCH v8 1/7] powerpc/powernv: Data structure and macros definition Date: Tue, 23 Feb 2016 09:16:32 +0530 Message-Id: <1456199198-11056-2-git-send-email-maddy@linux.vnet.ibm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1456199198-11056-1-git-send-email-maddy@linux.vnet.ibm.com> References: <1456199198-11056-1-git-send-email-maddy@linux.vnet.ibm.com> X-TM-AS-MML: disable x-cbid: 16022303-0013-0000-0000-00000A4DE186 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Create new header file "nest-pmu.h" to add the data structures and macros needed for the nest pmu support. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton Blanchard Cc: Daniel Axtens Cc: Stephane Eranian Cc: Sukadev Bhattiprolu Signed-off-by: Madhavan Srinivasan --- arch/powerpc/include/asm/nest-pmu.h | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 arch/powerpc/include/asm/nest-pmu.h diff --git a/arch/powerpc/include/asm/nest-pmu.h b/arch/powerpc/include/asm/nest-pmu.h new file mode 100644 index 000000000000..13c21817e3cc --- /dev/null +++ b/arch/powerpc/include/asm/nest-pmu.h @@ -0,0 +1,55 @@ +/* + * Nest Performance Monitor counter support. + * + * Copyright (C) 2016 Madhavan Srinivasan, IBM Corporation. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include + +#define NEST_MAX_CHIPS 32 +#define NEST_MAX_PMUS 32 +#define NEST_MAX_PMU_NAME_LEN 256 +#define NEST_MAX_EVENTS_SUPPORTED 64 +#define NEST_ENGINE_START 1 +#define NEST_ENGINE_STOP 0 +#define NEST_MODE_PRODUCTION 1 +#define NEST_MAX_PAGES 16 + +/* + * Structure to hold per chip specific memory address + * information for nest pmus. Nest Counter data are exported + * in per-chip reserved memory region by the PORE Engine. + */ +struct perchip_nest_info { + u32 chip_id; + u64 pbase; + u64 vbase[NEST_MAX_PAGES]; + u32 size; +}; + +/* + * Place holder for nest pmu events and values. + */ +struct nest_ima_events { + char *ev_name; + char *ev_value; +}; + +/* + * Device tree parser code detects nest pmu support and + * registers new nest pmus. This structure will + * hold the pmu functions and attrs for each nest pmu and + * will be referenced at the time of pmu registration. + */ +struct nest_pmu { + struct pmu pmu; + const struct attribute_group *attr_groups[4]; +}; -- 1.9.1