Re: [PATCH v1 1/9]powerpc/powernv: Data structure and macros definition

2015-06-04 Thread Madhavan Srinivasan



On Wednesday 03 June 2015 04:41 AM, Daniel Axtens wrote:

+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */

I'm not certain about this, but I _think_ this is supposed to be version
2 only:
http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/COPYING#n9
I referred other files for license information from the same folder. So 
I could wait

for the maintainers comment on this.



+/*
+ * Device tree parser code detect nest pmu support
+ * and create 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 registering.
+ */

The first sentence of that comment is unclear: I think your trying to
say Device tree parser code detects nest pmu support and registers new
nest pmus? Also s/registering/registration/.

Yes. I will rewrite the comment.


+struct nest_pmu {
+   struct pmu pmu;
+   const struct attribute_group *attr_groups[4];
+};
+

Regards,
Daniel Axtens

Thanks for the review
Maddy

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v1 1/9]powerpc/powernv: Data structure and macros definition

2015-06-02 Thread Daniel Axtens

 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
 + * as published by the Free Software Foundation; either version
 + * 2 of the License, or (at your option) any later version.
 + */

I'm not certain about this, but I _think_ this is supposed to be version
2 only:
http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/COPYING#n9


 +/*
 + * Device tree parser code detect nest pmu support
 + * and create 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 registering.
 + */

The first sentence of that comment is unclear: I think your trying to
say Device tree parser code detects nest pmu support and registers new
nest pmus? Also s/registering/registration/.

 +struct nest_pmu {
 + struct pmu pmu;
 + const struct attribute_group *attr_groups[4];
 +};
 +

Regards,
Daniel Axtens


signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH v1 1/9]powerpc/powernv: Data structure and macros definition

2015-06-02 Thread Madhavan Srinivasan
Patch creates a new header file nest-pmu.h to add the data structures
and macros needed for the nest pmu support.

Cc: Michael Ellerman m...@ellerman.id.au
Cc: Benjamin Herrenschmidt b...@kernel.crashing.org
Cc: Paul Mackerras pau...@samba.org
Cc: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com
Cc: Anshuman Khandual khand...@linux.vnet.ibm.com
Cc: Stephane Eranian eran...@google.com
Signed-off-by: Madhavan Srinivasan ma...@linux.vnet.ibm.com
---
 arch/powerpc/perf/nest-pmu.h | 55 
 1 file changed, 55 insertions(+)
 create mode 100644 arch/powerpc/perf/nest-pmu.h

diff --git a/arch/powerpc/perf/nest-pmu.h b/arch/powerpc/perf/nest-pmu.h
new file mode 100644
index 000..ed3f79f
--- /dev/null
+++ b/arch/powerpc/perf/nest-pmu.h
@@ -0,0 +1,55 @@
+/*
+ * Nest Performance Monitor counter support for POWER8 processors.
+ *
+ * Copyright 2015 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
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include linux/perf_event.h
+#include linux/slab.h
+#include linux/of.h
+#include linux/io.h
+#include asm/opal.h
+
+#define P8_MAX_CHIP32
+#define MAX_PMU_NAME_LEN   256
+#define MAX_EVENTS_SUPPORTED256
+#define P8_NEST_ENGINE_START   1
+#define P8_NEST_ENGINE_STOP0
+#define P8_MAX_NEST_PMUS   32
+
+/*
+ * Structure to hold per chip specific memory address
+ * information for nest pmus. Nest Counter data are exported
+ * in per-chip HOMER region by the PORE Engine.
+ */
+struct perchip_nest_info {
+uint32_t chip_id;
+uint64_t pbase;
+uint64_t vbase;
+uint32_t size;
+};
+
+/*
+ * Place holder for nest pmu events and values.
+ */
+struct ppc64_nest_ima_events {
+const char *ev_name;
+const char *ev_value;
+};
+
+/*
+ * Device tree parser code detect nest pmu support
+ * and create 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 registering.
+ */
+struct nest_pmu {
+   struct pmu pmu;
+   const struct attribute_group *attr_groups[4];
+};
+
-- 
1.9.1

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev