Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nest instr v3 #194

Closed
wants to merge 7 commits into from
Closed

Nest instr v3 #194

wants to merge 7 commits into from

Commits on Jul 8, 2015

  1. [PATCH v3 1/7]powerpc/powernv: Data structure and macros definition

    Create new header file "nest-pmu.h" to add the data structures
    and macros needed for the nest pmu support.
    
    Signed-off-by: Madhavan Srinivasan <[email protected]>
    Madhavan Srinivasan committed Jul 8, 2015
    Configuration menu
    Copy the full SHA
    4c7813d View commit details
    Browse the repository at this point in the history
  2. powerpc/powernv: Add OPAL support for Nest PMU

    Nest Counters can be configured via PORE Engine and OPAL
    provides an interface to start/stop it.
    
    OPAL side patches are posted in the skiboot mailing.
    Madhavan Srinivasan committed Jul 8, 2015
    Configuration menu
    Copy the full SHA
    e228125 View commit details
    Browse the repository at this point in the history
  3. powerpc/powernv: Nest PMU detection and device tree parser

    Create a file "nest-pmu.c" to contain nest pmu related functions. Code
    to detect nest pmu support and parser to collect per-chip reserved memory
    region information from device tree (DT).
    
    Detection mechanism is to look for specific property "ibm,ima-chip" in DT.
    For Nest pmu, device tree will have two set of information.
    1) Per-chip reserved memory region for nest pmu counter collection area.
    2) Supported Nest PMUs and events
    
    Device tree layout for the Nest PMU as follows.
    
      /                     -- DT root folder
      |
      -nest-ima             -- Nest PMU folder
    
       -ima-chip@<chip-id>  -- Per-chip folder for reserved region information
        |
        -ibm,chip-id        -- Chip id
        -ibm,ima-chip
        -reg                -- HOMER PORE Nest Counter collection Address (RA)
        -size               -- size to map in kernel space
    
       -Alink_BW            -- Nest PMU folder
        |
        -Alink0             -- Nest PMU Alink Event file
        -scale.Alink0.scale -- Event scale file
        -unit.Alink0.unit   -- Event unit file
        -device_type        -- "nest-ima-unit" marker
      ....
    
    Subsequent patch will parse the next part of the DT to find various
    Nest PMUs and their events.
    Madhavan Srinivasan committed Jul 8, 2015
    Configuration menu
    Copy the full SHA
    9749772 View commit details
    Browse the repository at this point in the history
  4. powerpc/powernv: detect supported nest pmus and its events

    Parse device tree to detect supported nest pmu units. Traverse
    through each nest pmu unit folder to find supported events and
    corresponding unit/scale files (if any).
    
    The nest unit event file from DT, will contain the offset in the reserved memory
    region to get the counter data for a given event. Kernel code uses this offset
    as event configuration value.
    
    Device tree parser code also looks for scale/unit in the file name and
    passes on the file as an event attr for perf tool to use in the post.
    
    Signed-off-by: Madhavan Srinivasan <[email protected]>
    Madhavan Srinivasan committed Jul 8, 2015
    Configuration menu
    Copy the full SHA
    8e18675 View commit details
    Browse the repository at this point in the history
  5. powerpc/powernv: add event attribute and group to nest pmu

    Add code to create event/format attributes and attribute groups for
    each nest pmu.
    
    Signed-off-by: Madhavan Srinivasan <[email protected]>
    Madhavan Srinivasan committed Jul 8, 2015
    Configuration menu
    Copy the full SHA
    033815d View commit details
    Browse the repository at this point in the history
  6. powerpc/powernv: generic nest pmu event functions

    Add set of generic nest pmu related event functions to be used by
    each nest pmu. Add code to register nest pmus.
    
    Signed-off-by: Madhavan Srinivasan <[email protected]>
    Madhavan Srinivasan committed Jul 8, 2015
    Configuration menu
    Copy the full SHA
    20d2791 View commit details
    Browse the repository at this point in the history
  7. powerpc/powernv: nest pmu cpumask and cpu hotplug support

    Adds cpumask attribute to be used by each nest pmu since nest
    units are per-chip. Only one cpu (first online cpu) from each node/chip
    is designated to read counters.
    
    On cpu hotplug, dying cpu is checked to see whether it is one of the
    designated cpus, if yes, next online cpu from the same node/chip is designated
    as new cpu to read counters.
    
    Signed-off-by: Madhavan Srinivasan <[email protected]>
    Madhavan Srinivasan committed Jul 8, 2015
    Configuration menu
    Copy the full SHA
    99390cb View commit details
    Browse the repository at this point in the history