1. 12 3月, 2016 29 次提交
  2. 10 3月, 2016 11 次提交
    • M
      powerpc/perf: Fix misleading comment in pmao_restore_workaround() · 58bffb5b
      Madhavan Srinivasan 提交于
      The current comment in pmao_restore_workaround() regarding
      hard_irq_disable() is wrong. It should say to hard *disable* interrupts
      instead of *enable*. Fix it.
      Signed-off-by: NMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      58bffb5b
    • S
      powerpc/perf/24x7: Eliminate domain suffix in event names · 8f69dc70
      Sukadev Bhattiprolu 提交于
      The Physical Core events of the 24x7 PMU can be monitored across various
      domains (physical core, vcpu home core, vcpu home node etc). For each of
      these core events, we currently create multiple events in sysfs, one for
      each domain the event can be monitored in. These events are distinguished
      by their suffixes like __PHYS_CORE, __VCPU_HOME_CORE etc.
      
      Rather than creating multiple such entries, we could let the user specify
      make 'domain' index a required parameter and let the user specify a value
      for it (like they currently specify the core index).
      
      	$ cat /sys/bus/event_source/devices/hv_24x7/events/HPM_CCYC
      	domain=?,offset=0x98,core=?,lpar=0x0
      
      	$ perf stat -C 0 -e hv_24x7/HPM_CCYC,domain=2,core=1/ true
      
      (the 'domain=?' and 'core=?' in sysfs tell perf tool to enforce them as
      required parameters).
      
      This simplifies the interface and allows users to identify events by the
      name specified in the catalog (User can determine the domain index by
      referring to '/sys/bus/event_source/devices/hv_24x7/interface/domains').
      
      Eliminating the event suffix eliminates several functions and simplifies
      code.
      
      Note that Physical Chip events can only be monitored in the chip domain
      so those events have the domain set to 1 (rather than =?) and users don't
      need to specify the domain index for the Chip events.
      
      	$ cat /sys/bus/event_source/devices/hv_24x7/events/PM_XLINK_CYCLES
      	domain=1,offset=0x230,chip=?,lpar=0x0
      
      	$ perf stat -C 0 -e hv_24x7/PM_XLINK_CYCLES,chip=1/ true
      Signed-off-by: NSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      8f69dc70
    • S
      powerpc/perf/hv-24x7: Display domain indices in sysfs · d34171e8
      Sukadev Bhattiprolu 提交于
      To help users determine domains, display the domain indices used by the
      kernel in sysfs.
      
      	$ cat /sys/bus/event_source/devices/hv_24x7/interface/domains
      	1: Physical Chip
      	2: Physical Core
      	3: VCPU Home Core
      	4: VCPU Home Chip
      	5: VCPU Home Node
      	6: VCPU Remote Node
      Signed-off-by: NSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      d34171e8
    • S
      powerpc/perf/hv-24x7: Display change in counter values · 2b206ee6
      Sukadev Bhattiprolu 提交于
      For 24x7 counters, perf displays the raw value of the 24x7 counter, which
      is a monotonically increasing value.
      
      	perf stat -C 0 -e \
      		'hv_24x7/HPM_0THRD_NON_IDLE_CCYC__PHYS_CORE,core=1/' \
      		sleep 1
      
       Performance counter stats for 'CPU(s) 0':
      
           9,105,403,170      hv_24x7/HPM_0THRD_NON_IDLE_CCYC__PHYS_CORE,core=1/
      
             0.000425751 seconds time elapsed
      
      In the typical usage of 'perf stat' this counter value is not as useful
      as the _change_ in the counter value over the duration of the application.
      
      Have h_24x7_event_init() set the event's prev_count to the raw value of
      the 24x7 counter at the time of initialization. When the application
      terminates, hv_24x7_event_read() will compute the change in value and
      report to the perf tool. Similarly, for the transaction interface, clear
      the event count to 0 at the beginning of the transaction.
      
      	perf stat -C 0 -e \
      		'hv_24x7/HPM_0THRD_NON_IDLE_CCYC__PHYS_CORE,core=1/' \
      		sleep 1
      
       Performance counter stats for 'CPU(s) 0':
      
                 245,758      hv_24x7/HPM_0THRD_NON_IDLE_CCYC__PHYS_CORE,core=1/
      
             1.006366383 seconds time elapsed
      Signed-off-by: NSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      2b206ee6
    • S
      powerpc/perf/hv-24x7: Fix usage with chip events. · e5a5886d
      Sukadev Bhattiprolu 提交于
      24x7 counters can belong to different domains (core, chip, virtual CPU
      etc). For events in the 'chip' domain, sysfs entry currently looks like:
      
      	$ cd /sys/bus/event_source/devices/hv_24x7/events
      	$ cat PM_XLINK_CYCLES__PHYS_CHIP
      	domain=0x1,offset=0x230,core=?,lpar=0x0
      
      where the required parameter, 'core=?' is specified with perf as:
      
      	perf stat -C 0 -e hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP,core=1/ \
      		/bin/true
      
      This is inconsistent in that 'core' is a required parameter for a chip
      event.  Instead, have the the sysfs entry display 'chip=?' for chip
      events:
      
      	$ cd /sys/bus/event_source/devices/hv_24x7/events
      	$ cat PM_XLINK_CYCLES__PHYS_CHIP
      	domain=0x1,offset=0x230,chip=?,lpar=0x0
      
      We also need to add a 'chip' entry in the sysfs format directory:
      
      	$ ls /sys/bus/event_source/devices/hv_24x7/format
      	chip  core  domain  lpar  offset  vcpu
      	^^^^
      	(new)
      
      so the perf tool can automatically check usage and format the chip
      parameter correctly:
      
      	$ perf stat -C 0 -v -e hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP/ \
      		/bin/true
      	Required parameter 'chip' not specified
      	invalid or unsupported event: 'hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP/'
      
      	$ perf stat -C 0 -v -e hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP,chip=1/ \
      		/bin/true
      	hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP,chip=1/: 0 6628908 6628908
      
      	 Performance counter stats for 'CPU(s) 0':
      
      	         0      hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP,chip=1/
      
      	    0.006606970 seconds time elapsed
      Signed-off-by: NSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      e5a5886d
    • S
      powerpc/perf: Export Power8 generic and cache events to sysfs · e0728b50
      Sukadev Bhattiprolu 提交于
      Power8 supports a large number of events in each susbystem so when a
      user runs:
      
      	perf stat -e branch-instructions sleep 1
      	perf stat -e L1-dcache-loads sleep 1
      
      it is not clear as to which PMU events were monitored.
      
      Export the generic hardware and cache perf events for Power8 to sysfs,
      so users can precisely determine the PMU event monitored by the generic
      event.
      
      Eg:
      	cat /sys/bus/event_source/devices/cpu/events/branch-instructions
      	event=0x10068
      
      	$ cat /sys/bus/event_source/devices/cpu/events/L1-dcache-loads
      	event=0x100ee
      Signed-off-by: NSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      e0728b50
    • S
      powerpc/perf: Remove PME_ prefix for power7 events · d4969e24
      Sukadev Bhattiprolu 提交于
      We used the PME_ prefix earlier to avoid some macro/variable name
      collisions.  We have since changed the way we define/use the event
      macros so we no longer need the prefix.
      
      By dropping the prefix, we keep the the event macros consistent with
      their official names.
      Reported-by: NMichael Ellerman <ellerman@au1.ibm.com>
      Signed-off-by: NSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      d4969e24
    • X
      powerpc/p5040: Add device node for RAID Engine · 3b5eb41b
      Xuelin Shi 提交于
      add the missing RAID Engine device node for p5040.
      otherwise, the device can not be detected.
      Signed-off-by: NXuelin Shi <xuelin.shi@nxp.com>
      Signed-off-by: NScott Wood <oss@buserror.net>
      3b5eb41b
    • C
      powerpc: optimise csum_partial() call when len is constant · 7e393220
      Christophe Leroy 提交于
      csum_partial is often called for small fixed length packets
      for which it is suboptimal to use the generic csum_partial()
      function.
      
      For instance, in my configuration, I got:
      * One place calling it with constant len 4
      * Seven places calling it with constant len 8
      * Three places calling it with constant len 14
      * One place calling it with constant len 20
      * One place calling it with constant len 24
      * One place calling it with constant len 32
      
      This patch renames csum_partial() to __csum_partial() and
      implements csum_partial() as a wrapper inline function which
      * uses csum_add() for small 16bits multiple constant length
      * uses ip_fast_csum() for other 32bits multiple constant
      * uses __csum_partial() in all other cases
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NScott Wood <oss@buserror.net>
      7e393220
    • R
      powerpc/fsl-lbc: Modify suspend/resume entry sequence · ac6082dd
      Raghav Dogra 提交于
      Modify platform driver suspend/resume to syscore
      suspend/resume. This is because p1022ds needs to use
      localbus when entering the PCIE resume.
      Signed-off-by: NRaghav Dogra <raghav.dogra@nxp.com>
      [scottwood: dropped makefile churn]
      Signed-off-by: NScott Wood <oss@buserror.net>
      ac6082dd
    • C
      powerpc/8xx: CONFIG_DEBUG_PAGEALLOC requires ITLBmiss for kernel addresses · 921fff35
      Christophe Leroy 提交于
      When CONFIG_DEBUG_PAGEALLOC is activated, the initial TLB mapping gets
      flushed to track accesses to wrong areas. Therefore, kernel addresses
      will also generate ITLB misses.
      Signed-off-by: NChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: NScott Wood <oss@buserror.net>
      921fff35