1. 06 Feb, 2015 2 commits
    • Ian Munsie's avatar
      cxl: Fail AFU initialisation if an invalid configuration record is found · 3d5be039
      Ian Munsie authored
      If an AFU claims to have a configuration record but doesn't actually
      contain a vendor and device ID, fail the AFU initialisation. Right now
      this is just a way of politely letting AFU developers know that they
      need to fix their config space, but later on we may expose the AFUs as
      actual PCI devices in their own right and don't want to inadvertendly
      expose an AFU with a bad config space.
      Signed-off-by: default avatarIan Munsie <imunsie@au1.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      3d5be039
    • Ian Munsie's avatar
      cxl: Export optional AFU configuration record in sysfs · b087e619
      Ian Munsie authored
      An AFU may optionally contain one or more PCIe like configuration
      records, which can be used to identify the AFU.
      
      This patch adds support for exposing the raw config space and the
      vendor, device and class code under sysfs. These will appear in a
      subdirectory of the AFU device corresponding with the configuration
      record number, e.g.
      
      cat /sys/class/cxl/afu0.0/cr0/vendor
      0x1014
      
      cat /sys/class/cxl/afu0.0/cr0/device
      0x4350
      
      cat /sys/class/cxl/afu0.0/cr0/class
      0x120000
      
      hexdump -C /sys/class/cxl/afu0.0/cr0/config
      00000000  14 10 50 43 00 00 00 00  06 00 00 12 00 00 00 00  |..PC............|
      00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
      *
      00000100
      
      These files behave in much the same way as the equivalent files for PCI
      devices, with one exception being that the config file is currently
      read-only and restricted to the root user. It is not necessarily
      required to be this strict, but we currently do not have a compelling
      use-case to make it writable and/or world-readable, so I erred on the
      side of being restrictive.
      Signed-off-by: default avatarIan Munsie <imunsie@au1.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      b087e619
  2. 04 Feb, 2015 3 commits
  3. 02 Feb, 2015 11 commits
  4. 31 Jan, 2015 1 commit
    • Arseny Solokha's avatar
      powerpc/mm: bail out early when flushing TLB page · 0dc294f7
      Arseny Solokha authored
      MMU_NO_CONTEXT is conditionally defined as 0 or (unsigned int)-1. However,
      in __flush_tlb_page() a corresponding variable is only tested for open
      coded 0, which can cause NULL pointer dereference if `mm' argument was
      legitimately passed as such.
      
      Bail out early in case the first argument is NULL, thus eliminate confusion
      between different values of MMU_NO_CONTEXT and avoid disabling and then
      re-enabling preemption unnecessarily.
      Signed-off-by: default avatarArseny Solokha <asolokha@kb.kras.ru>
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      0dc294f7
  5. 30 Jan, 2015 23 commits