1. 05 8月, 2014 26 次提交
  2. 31 7月, 2014 1 次提交
    • S
      powerpc/t2080rdb: Add T2080RDB board support · 78eb9094
      Shengzhou Liu 提交于
      T2080PCIe-RDB is a Freescale Reference Design Board that hosts T2080 SoC.
      The board feature overview:
      Processor:
       - T2080 SoC integrating four 64-bit dual-threads e6500 cores up to 1.8GHz
      DDR Memory:
       - Single memory controller capable of supporting DDR3 and DDR3-LP devices
       - 72bit 4GB DDR3-LP SODIMM in slot
      Ethernet interfaces:
       - Two 1Gbps RGMII ports on-board
       - Two 10Gbps SFP+ ports on-board
       - Two 10Gbps Base-T ports on-board
      Accelerator:
       - DPAA components consist of FMan, BMan, QMan, PME, DCE and SEC
      IFC/Local Bus
       - NOR:  128MB 16-bit NOR flash
       - NAND: 1GB 8-bit NAND flash
       - CPLD: for system controlling with programable header on-board
      eSPI:
       - 64MB N25Q512 SPI flash
      USB:
       - Two USB2.0 ports with internal PHY (both Type-A)
      PCIe:
       - One PCIe x4 goldfinger(support SR-IOV)
       - One PCIe x4 slot
       - One PCIe x2 end-point device (C293 crypto co-processor)
      SATA:
       - Two SATA 2.0 ports on-board
      SDHC:
       - support a MicroSD/TF card on-board
      I2C:
       - Four I2C controllers.
      UART:
       - Dual 4-pins UART serial ports
      Signed-off-by: NShengzhou Liu <Shengzhou.Liu@freescale.com>
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      78eb9094
  3. 30 7月, 2014 6 次提交
  4. 28 7月, 2014 7 次提交
    • M
      powerpc/perf: Add per-event excludes on Power8 · 9de5cb0f
      Michael Ellerman 提交于
      Power8 has a new register (MMCR2), which contains individual freeze bits
      for each counter. This is an improvement on previous chips as it means
      we can have multiple events on the PMU at the same time with different
      exclude_{user,kernel,hv} settings. Previously we had to ensure all
      events on the PMU had the same exclude settings.
      
      The core of the patch is fairly simple. We use the 207S feature flag to
      indicate that the PMU backend supports per-event excludes, if it's set
      we skip the generic logic that enforces the equality of excludes between
      events. We also use that flag to skip setting the freeze bits in MMCR0,
      the PMU backend is expected to have handled setting them in MMCR2.
      
      The complication arises with EBB. The FCxP bits in MMCR2 are accessible
      R/W to a task using EBB. Which means a task using EBB will be able to
      see that we are using MMCR2 for freezing, whereas the old logic which
      used MMCR0 is not user visible.
      
      The task can not see or affect exclude_kernel & exclude_hv, so we only
      need to consider exclude_user.
      
      The table below summarises the behaviour both before and after this
      commit is applied:
      
       exclude_user           true  false
       ------------------------------------
              | User visible |  N    N
       Before | Can freeze   |  Y    Y
              | Can unfreeze |  N    Y
       ------------------------------------
              | User visible |  Y    Y
        After | Can freeze   |  Y    Y
              | Can unfreeze |  Y/N  Y
       ------------------------------------
      
      So firstly I assert that the simple visibility of the exclude_user
      setting in MMCR2 is a non-issue. The event belongs to the task, and
      was most likely created by the task. So the exclude_user setting is not
      privileged information in any way.
      
      Secondly, the behaviour in the exclude_user = false case is unchanged.
      This is important as it is the case that is actually useful, ie. the
      event is created with no exclude setting and the task uses MMCR2 to
      implement exclusion manually.
      
      For exclude_user = true there is no meaningful change to freezing the
      event. Previously the task could use MMCR2 to freeze the event, though
      it was already frozen with MMCR0. With the new code the task can use
      MMCR2 to freeze the event, though it was already frozen with MMCR2.
      
      The only real change is when exclude_user = true and the task tries to
      use MMCR2 to unfreeze the event. Previously this had no effect, because
      the event was already frozen in MMCR0. With the new code the task can
      unfreeze the event in MMCR2, but at some indeterminate time in the
      future the kernel will overwrite its setting and refreeze the event.
      
      Therefore my final assertion is that any task using exclude_user = true
      and also fiddling with MMCR2 was deeply confused before this change, and
      remains so after it.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      9de5cb0f
    • M
      powerpc/perf: Pass the struct perf_events down to compute_mmcr() · 8abd818f
      Michael Ellerman 提交于
      To support per-event exclude settings on Power8 we need access to the
      struct perf_events in compute_mmcr().
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8abd818f
    • M
      powerpc/perf: Clear all MMCR settings before calling compute_mmcr() · 79a4cb28
      Michael Ellerman 提交于
      Because we reuse cpuhw->mmcr on each call to compute_mmcr() there's a
      risk that we could forget to set one of the values and use whatever
      value was in there previously.
      
      Currently all the implementations are careful to set all the values, but
      it's safer to clear them all before we call compute_mmcr().
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      79a4cb28
    • M
      powerpc: Document how we set AIL on guest kernels · 633440f1
      Michael Ellerman 提交于
      I spent ten minutes scratching my head, trying to work out where we
      enabled relocation on interrupts for guest kernels. Expand the doco to
      make it clear.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      633440f1
    • M
      powerpc/pseries: Switch pseries drivers to use machine_xxx_initcall() · 8e83e905
      Michael Ellerman 提交于
      A lot of the code in platforms/pseries is using non-machine initcalls.
      That means if a kernel built with pseries support runs on another
      platform, for example powernv, the initcalls will still run.
      
      Most of these cases are OK, though sometimes only due to luck. Some were
      having more effect:
      
       * hcall_inst_init
        - Checking FW_FEATURE_LPAR which is set on ps3 & celleb.
       * mobility_sysfs_init
        - created sysfs files unconditionally
        - but no effect due to ENOSYS from rtas_ibm_suspend_me()
       * apo_pm_init
        - created sysfs, allows write
        - nothing checks the value written to though
       * alloc_dispatch_log_kmem_cache
        - creating kmem_cache on non-pseries machines
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8e83e905
    • M
      powerpc/powernv: Switch powernv drivers to use machine_xxx_initcall() · b14726c5
      Michael Ellerman 提交于
      A lot of the code in platforms/powernv is using non-machine initcalls.
      That means if a kernel built with powernv support runs on another
      platform, for example pseries, the initcalls will still run.
      
      That is usually OK, because the initcalls will check for something in
      the device tree or elsewhere before doing anything, so on other
      platforms they will usually just return.
      
      But it's fishy for powernv code to be running on other platforms, so
      switch them all to be machine initcalls. If we want any of them to run
      on other platforms in future they should move to sysdev.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      b14726c5
    • M
      8d3c941e