1. 02 7月, 2018 1 次提交
  2. 29 5月, 2018 1 次提交
    • A
      drivers/bus: arm-cci: fix build warnings · 984e9cf1
      Arnd Bergmann 提交于
      When the arm-cci driver is enabled, but both CONFIG_ARM_CCI5xx_PMU and
      CONFIG_ARM_CCI400_PMU are not, we get a warning about how parts of
      the driver are never used:
      
      drivers/perf/arm-cci.c:1454:29: error: 'cci_pmu_models' defined but not used [-Werror=unused-variable]
      drivers/perf/arm-cci.c:693:16: error: 'cci_pmu_event_show' defined but not used [-Werror=unused-function]
      drivers/perf/arm-cci.c:685:16: error: 'cci_pmu_format_show' defined but not used [-Werror=unused-function]
      
      Marking all three functions as __maybe_unused avoids the warnings in
      randconfig builds. I'm doing this lacking any ideas for a better fix.
      
      Fixes: 3de6be7a ("drivers/bus: Split Arm CCI driver")
      Reviewed-by: NRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      984e9cf1
  3. 22 5月, 2018 4 次提交
  4. 07 3月, 2018 4 次提交
  5. 05 12月, 2017 1 次提交
  6. 16 8月, 2017 1 次提交
  7. 25 12月, 2016 1 次提交
  8. 17 10月, 2016 1 次提交
    • L
      drivers: cci: add missing CCI port availability firmware check · 801f33be
      Lorenzo Pieralisi 提交于
      The CCI ports programming interface is available to the kernel
      only when booted in secure mode (or when firmware enables
      non-secure access to override CCI ports control). In both cases,
      firmware reports the CCI ports availability through the device
      tree CCI ports nodes, which must be parsed and their status checked
      by the kernel probing path.
      
      This check is currently missing and may cause the kernel to
      erroneously believe it is free to take control of CCI ports
      where in practice CCI ports control is forbidden.
      
      Add the missing CCI port availability check to the CCI driver
      in order to guarantee sane CCI usage.
      
      Cc: Liviu Dudau <liviu.dudau@arm.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
      801f33be
  9. 08 9月, 2016 1 次提交
  10. 03 9月, 2016 1 次提交
  11. 14 7月, 2016 1 次提交
  12. 01 3月, 2016 16 次提交
  13. 29 5月, 2015 6 次提交
    • S
      arm-cci: Add aliases for PMU events · e14cfad3
      Suzuki K. Poulose 提交于
      Each CCI model have different event/source codes and formats. This
      patch exports this information via the sysfs, which includes the
      aliases for the events. The aliases are listed by 'perf list', helping
      the users to specify the name of the event instead of the binary
      config values.
      
      Each event alias must accompany the 'source' code except for the
      following cases :
      
      1) CCI-400 - cycles event, doesn't relate to an interface.
      2) CCI-500 - Global events to the CCI. (Fixed source code = 0xf)
      
      Each CCI model provides two sets of attributes(format and event),
      which are dynamically populated before registering the PMU, to
      allow for the appropriate information.
      
      Cc: Punit Agrawal <punit.agrawal@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Signed-off-by: NSuzuki K. Poulose <suzuki.poulose@arm.com>
      Acked-by: NPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      e14cfad3
    • S
      arm-cci: Add CCI-500 PMU support · a95791ef
      Suzuki K. Poulose 提交于
      CCI-500 provides 8 event counters which can count any of the
      supported events independently. The PMU event id is a 9-bit
      value made of two parts.
      	bits [8:5] - Source port
      			0x0-0x6 Slave Ports
      			0x8-0xD Master Ports
      			0xf     Global Events to CCI
      			0x7,0xe Reserved
      	bits [0:4] - Event code (specific to each type of port)
      
      The generic CCI-500 controlling interface remains the same with CCI-400.
      However there are some differences in the PMU event counters.
       - No cycle counter
       - Upto 8 counters(4 in CCI-400)
       - Each counter area is 64K(4K in CCI400)
       - The counter0 starts at offset 0x10000 from the base of CCI
      
      Cc: Punit Agrawal <punit.agrawal@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: devicetree@vger.kernel.org
      Signed-off-by: NSuzuki K. Poulose <suzuki.poulose@arm.com>
      Acked-by: NPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      a95791ef
    • S
      arm-cci: Sanitise CCI400 PMU driver specific code · f4d58938
      Suzuki K. Poulose 提交于
      Rename CCI400 specific defintions from CCI_xxx to CCI400_xxx.
      
      Introduce generic ARM_CCI_PMU to cover common code for handling
      the CCI PMU.
      
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Punit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: NSuzuki K. Poulose <suzuki.poulose@arm.com>
      Acked-by: NPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      f4d58938
    • S
      arm-cci: Abstract handling for CCI events · 31216290
      Suzuki K. Poulose 提交于
      Given that each CCI has different set of interfaces and
      its associated events, it is good to abstract the validation of the
      event codes to make it easier to add support for a new CCI model.
      
      This patch also abstracts the mapping of a given event to a counter,
      as there are some special counters for certain specific events.
      
      We assume that the fixed hardware counters are always at the beginning,
      so that we can use cci_model->fixed_hw_events as an upper bound to given
      idx to check if we need to program the counter for an event.
      
      Cc: Punit Agrawal <punit.agrawal@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NSuzuki K. Poulose <suzuki.poulose@arm.com>
      Acked-by: NPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      31216290
    • S
      arm-cci: Abstract out the PMU counter details · ab5b316d
      Suzuki K. Poulose 提交于
      Adds the PMU model specific counters to the PMU model
      abstraction to make it easier to add a new PMU.
      
      The patch cleans up the naming convention used all over
      the code.
      e.g, CCI_PMU_MAX_HW_EVENTS => maximum number of events that
      can be counted at any time, which is in fact the maximum
      number of counters available.
      
      Change all such namings to use 'counters' instead of events.
      
      This patch also abstracts the following:
      
      1) Size of a PMU event counter area.
      2) Maximum number of programmable counters supported by the PMU model
      3) Number of counters which counts fixed events (e.g, cycle
        counter on CCI-400).
      
      Also changes some of the static allocation of the data
      structures to dynamic, to accommodate the number of events
      supported by a PMU.
      
      Gets rid ofthe CCI_PMU_* defines for the model. All such
      data should be accessed via the model abstraction.
      
      Limits the number of counters to the maximum supported
      by the 'model'.
      
      Cc: Punit Agrawal <punit.agrawal@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NSuzuki K. Poulose <suzuki.poulose@arm.com>
      Acked-by: NPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      ab5b316d
    • S
      arm-cci: Cleanup PMU driver code · a1a076d7
      Suzuki K. Poulose 提交于
      This patch gets rid of the global struct cci_pmu variable and makes
      the code use the cci_pmu explicitly. Makes code a bit more robust
      and reader friendly.
      
      Cc: Punit Agrawal <punit.agrawal@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Signed-off-by: NSuzuki K. Poulose <suzuki.poulose@arm.com>
      Acked-by: NPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      a1a076d7
  14. 08 5月, 2015 1 次提交