1. 02 2月, 2018 1 次提交
  2. 16 11月, 2017 1 次提交
  3. 31 10月, 2017 1 次提交
  4. 30 10月, 2017 1 次提交
  5. 08 10月, 2017 2 次提交
  6. 03 7月, 2017 1 次提交
  7. 16 6月, 2017 1 次提交
  8. 06 6月, 2017 1 次提交
  9. 19 4月, 2017 1 次提交
  10. 18 4月, 2017 2 次提交
  11. 07 12月, 2016 1 次提交
    • D
      tools/testing/nvdimm: unit test acpi_nfit_ctl() · a7de92da
      Dan Williams 提交于
      A recent flurry of bug discoveries in the nfit driver's DSM marshalling
      routine has highlighted the fact that we do not have unit test coverage
      for this routine. Add a self-test of acpi_nfit_ctl() routine before
      probing the "nfit_test.0" device. This mocks stimulus to acpi_nfit_ctl()
      and if any of the tests fail "nfit_test.0" will be unavailable causing
      the rest of the tests to not run / fail.
      
      This unit test will also be a place to land reproductions of quirky BIOS
      behavior discovered in the field and ensure the kernel does not regress
      against implementations it has seen in practice.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      a7de92da
  12. 01 10月, 2016 1 次提交
    • V
      nfit: don't start a full scrub by default for an MCE · 9ffd6350
      Vishal Verma 提交于
      Starting a full Address Range Scrub (ARS) on hitting a memory error
      machine check exception may not always be desirable. Provide a way
      through sysfs to toggle the behavior between just adding the address
      (cache line) where the MCE happened to the poison list and doing a full
      scrub. The former (selective insertion of the address) is done
      unconditionally.
      
      Cc: linux-acpi@vger.kernel.org
      Cc: Linda Knippers <linda.knippers@hpe.com>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      9ffd6350
  13. 02 9月, 2016 1 次提交
  14. 30 8月, 2016 1 次提交
  15. 23 8月, 2016 2 次提交
  16. 24 7月, 2016 3 次提交
    • V
      nfit: do an ARS scrub on hitting a latent media error · 6839a6d9
      Vishal Verma 提交于
      When a latent (unknown to 'badblocks') error is encountered, it will
      trigger a machine check exception. On a system with machine check
      recovery, this will only SIGBUS the process(es) which had the bad page
      mapped (as opposed to a kernel panic on platforms without machine
      check recovery features). In the former case, we want to trigger a full
      rescan of that nvdimm bus. This will allow any additional, new errors
      to be captured in the block devices' badblocks lists, and offending
      operations on them can be trapped early, avoiding machine checks.
      
      This is done by registering a callback function with the
      x86_mce_decoder_chain and calling the new ars_rescan functionality with
      the address in the mce notificatiion.
      
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      6839a6d9
    • D
      nfit: move to nfit/ sub-directory · bdf97013
      Dan Williams 提交于
      With the arrival of x86-machine-check support the nfit driver will add a
      (conditionally-compiled) source file.  Prepare for this by moving all
      nfit source to drivers/acpi/nfit/.  This is pure code movement, no
      functional changes.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      bdf97013
    • V
      nfit, libnvdimm: allow an ARS scrub to be triggered on demand · 37b137ff
      Vishal Verma 提交于
      Normally, an ARS (Address Range Scrub) only happens at
      boot/initialization time. There can however arise situations where a
      bus-wide rescan is needed - notably, in the case of discovering a latent
      media error, we should do a full rescan to figure out what other sectors
      are bad, and thus potentially avoid triggering an mce on them in the
      future. Also provide a sysfs trigger to start a bus-wide scrub.
      
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      37b137ff
  17. 22 7月, 2016 2 次提交
  18. 13 7月, 2016 1 次提交
    • D
      pmem: kill __pmem address space · 7a9eb206
      Dan Williams 提交于
      The __pmem address space was meant to annotate codepaths that touch
      persistent memory and need to coordinate a call to wmb_pmem().  Now that
      wmb_pmem() is gone, there is little need to keep this annotation.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      7a9eb206
  19. 12 7月, 2016 3 次提交
    • D
      libnvdimm: introduce nvdimm_flush() and nvdimm_has_flush() · f284a4f2
      Dan Williams 提交于
      nvdimm_flush() is a replacement for the x86 'pcommit' instruction.  It is
      an optional write flushing mechanism that an nvdimm bus can provide for
      the pmem driver to consume.  In the case of the NFIT nvdimm-bus-provider
      nvdimm_flush() is implemented as a series of flush-hint-address [1]
      writes to each dimm in the interleave set (region) that backs the
      namespace.
      
      The nvdimm_has_flush() routine relies on platform firmware to describe
      the flushing capabilities of a platform.  It uses the heuristic of
      whether an nvdimm bus provider provides flush address data to return a
      ternary result:
      
            1: flush addresses defined
            0: dimm topology described without flush addresses (assume ADR)
       -errno: no topology information, unable to determine flush mechanism
      
      The pmem driver is expected to take the following actions on this ternary
      result:
      
            1: nvdimm_flush() in response to REQ_FUA / REQ_FLUSH and shutdown
            0: do not set, WC or FUA on the queue, take no further action
       -errno: warn and then operate as if nvdimm_has_flush() returned '0'
      
      The caveat of this heuristic is that it can not distinguish the "dimm
      does not have flush address" case from the "platform firmware is broken
      and failed to describe a flush address".  Given we are already
      explicitly trusting the NFIT there's not much more we can do beyond
      blacklisting broken firmwares if they are ever encountered.
      
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      f284a4f2
    • D
      libnvdimm, nfit: move flush hint mapping to region-device driver-data · e5ae3b25
      Dan Williams 提交于
      In preparation for triggering flushes of a DIMM's writes-posted-queue
      (WPQ) via the pmem driver move mapping of flush hint addresses to the
      region driver.  Since this uses devm_nvdimm_memremap() the flush
      addresses will remain mapped while any region to which the dimm belongs
      is active.
      
      We need to communicate more information to the nvdimm core to facilitate
      this mapping, namely each dimm object now carries an array of flush hint
      address resources.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      e5ae3b25
    • D
      libnvdimm, nfit: remove nfit_spa_map() infrastructure · a8a6d2e0
      Dan Williams 提交于
      Now that all shared mappings are handled by devm_nvdimm_memremap() we no
      longer need nfit_spa_map() nor do we need to trigger a callback to the
      bus provider at region disable time.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      a8a6d2e0
  20. 30 6月, 2016 1 次提交
    • D
      nfit: fix format interface code byte order · 1bcbf42d
      Dan Williams 提交于
      Per JEDEC Annex L Release 3 the SPD data is:
      
      Bits 9~5 00 000 = Function Undefined
               00 001 = Byte addressable energy backed
               00 010 = Block addressed
               00 011 = Byte addressable, no energy backed
               All other codes reserved
      Bits 4~0 0 0000 = Proprietary interface
               0 0001 = Standard interface 1
               All other codes reserved; see Definitions of Functions
      
      ...and per the ACPI 6.1 spec:
      
          byte0: Bits 4~0 (0 or 1)
          byte1: Bits 9~5 (1, 2, or 3)
      
      ...so a format interface code displayed as 0x301 should be stored in the
      nfit as (0x1, 0x3), little-endian.
      
      Cc: Toshi Kani <toshi.kani@hpe.com>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Robert Moore <robert.moore@intel.com>
      Cc: Robert Elliott <elliott@hpe.com>
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=121161
      Fixes: 30ec5fd4 ("nfit: fix format interface code byte order per ACPI6.1")
      Fixes: 5ad9a7fd ("acpi/nfit: Update nfit driver to comply with ACPI 6.1")
      Reported-by: NKristin Jacque <kristin.jacque@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      1bcbf42d
  21. 21 6月, 2016 1 次提交
  22. 29 4月, 2016 3 次提交
    • D
      nfit: fix format interface code byte order per ACPI6.1 · 30ec5fd4
      Dan Williams 提交于
      ACPI6.1 clarifies that DCR fields are stored as an array of bytes,
      update the format interface code constants to match.
      Reviewed-by: NToshi Kani <toshi.kani@hpe.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      30ec5fd4
    • D
      nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism · 31eca76b
      Dan Williams 提交于
      There are currently 4 known similar but incompatible definitions of the
      command sets that can be sent to an NVDIMM through ACPI.  It is also
      clear that future platform generations (ACPI or not) will continue to
      revise and extend the DIMM command set as new devices and use cases
      arrive.
      
      It is obviously untenable to continue to proliferate divergence
      of these command definitions, and to that end a standardization process
      has begun to provide for a unified specification.  However, that leaves a
      problem about what to do with this first generation where vendors are
      already shipping divergence.
      
      The Linux kernel can support these initial diverged platforms without
      giving platform-firmware free reign to continue to diverge and compound
      kernel maintenance overhead.  The kernel implementation can encourage
      standardization in two ways:
      
      1/ Require that any function code that userspace wants to send be
         explicitly white-listed in the implementation.  For ACPI this means
         function codes marked as supported by acpi_check_dsm() may
         only be invoked if they appear in the white-list.  A function must be
         publicly documented before it is added to the white-list.
      
      2/ The above restrictions can be trivially bypassed by using the
         "vendor-specific" payload command.  However, since vendor-specific
         commands are by definition not publicly documented and have the
         potential to corrupt the kernel's view of the dimm state, we provide a
         toggle to disable vendor-specific operations.  Enabling undefined
         behavior is a policy decision that can be made by the platform owner
         and encourages firmware implementations to choose public over
         private command implementations.
      
      Based on an initial patch from Jerry Hoemann
      Cc: Jerry Hoemann <jerry.hoemann@hpe.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      31eca76b
    • D
      nfit, libnvdimm: clarify "commands" vs "_DSMs" · e3654eca
      Dan Williams 提交于
      Clarify the distinction between "commands", the ioctls userspace calls
      to request the kernel take some action on a given dimm device, and
      "_DSMs", the actual function numbers used in the firmware interface to
      the DIMM.  _DSMs are ACPI specific whereas commands are Linux kernel
      generic.
      
      This is in preparation for breaking the 1:1 implicit relationship
      between the kernel ioctl number space and the firmware specific function
      numbers.
      
      Cc: Jerry Hoemann <jerry.hoemann@hpe.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      e3654eca
  23. 12 4月, 2016 1 次提交
    • D
      libnvdimm, nfit: report multiple interface codes per-dimm · 8cc6ddfc
      Dan Williams 提交于
      Starting with ACPI 6.1 an NFIT table will report multiple 'NVDIMM
      Control Region Structure' instances per-dimm, one for each supported
      format interface.  Report that code in the following format in sysfs:
      
          nmemX/nfit/formats
          nmemX/nfit/format
          nmemX/nfit/format1
          nmemX/nfit/format2
          ...
          nmemX/nfit/formatN
      
      Where format2 - formatN are theoretical as there are no known DIMMs with
      support for more than two interface formats.
      
      This layout is compatible with existing libndctl binaries that only
      expect one code per-dimm as they will ignore nmemX/nfit/formats and
      nmemX/nfit/formatN.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      8cc6ddfc
  24. 06 3月, 2016 5 次提交
    • D
      nfit: scrub and register regions in a workqueue · 1cf03c00
      Dan Williams 提交于
      Address range scrub is a potentially long running process that we want
      to complete before any pmem regions are registered.  Perform this
      operation asynchronously to allow other drivers to load in the meantime.
      
      Platform firmware may have initiated a partial scrub prior to the driver
      loading, so we must be careful to consume those results before kicking
      off kernel initiated scrubs on other regions.
      
      This rework also makes the registration path more tolerant of scrub
      errors in that it splits scrubbing into 2 phases.  The first phase
      synchronously waits for a platform-firmware initiated scrub to complete.
      The second phase scans the remaining address ranges asynchronously and
      notifies the related driver(s) when the scrub completes.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      1cf03c00
    • D
      nfit, libnvdimm: async region scrub workqueue · 7ae0fa43
      Dan Williams 提交于
      Introduce a workqueue that will be used to run address range scrub
      asynchronously with the rest of nvdimm device probing.
      
      Userspace still wants notification when probing operations complete, so
      introduce a new callback to flush this workqueue when userspace is
      awaiting probe completion.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      7ae0fa43
    • D
      nfit, tools/testing/nvdimm: unify common init for acpi_nfit_desc · a61fe6f7
      Dan Williams 提交于
      The nvdimm unit test infrastructure performs its own initialization of
      an acpi_nfit_desc to specify test overrides over the native
      implementation.  Make it clear which attributes and operations it is
      overriding by re-using acpi_nfit_init_desc() as a common starting point.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      a61fe6f7
    • D
      libnvdimm, nfit: centralize command status translation · aef25338
      Dan Williams 提交于
      The return value from an 'ndctl_fn' reports the command execution
      status, i.e. was the command properly formatted and was it successfully
      submitted to the bus provider.  The new 'cmd_rc' parameter allows the bus
      provider to communicate command specific results, translated into
      common error codes.
      
      Convert the ARS commands to this scheme to:
      
      1/ Consolidate status reporting
      
      2/ Prepare for for expanding ars unit test cases
      
      3/ Make the implementation more generic
      
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      aef25338
    • D
      nfit, tools/testing/nvdimm: add format interface code definitions · be26f9ae
      Dan Williams 提交于
      ACPI 6.1 and JEDEC Annex L Release 3 formalize the format interface
      code.  Add definitions and update their usage in the unit test.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      be26f9ae
  25. 01 12月, 2015 1 次提交
    • L
      nfit: Adjust for different _FIT and NFIT headers · 6b577c9d
      Linda Knippers 提交于
      When support for _FIT was added, the code presumed that the data
      returned by the _FIT method is identical to the NFIT table, which
      starts with an acpi_table_header.  However, the _FIT is defined
      to return a data in the format of a series of NFIT type structure
      entries and as a method, has an acpi_object header rather tahn
      an acpi_table_header.
      
      To address the differences, explicitly save the acpi_table_header
      from the NFIT, since it is accessible through /sys, and change
      the nfit pointer in the acpi_desc structure to point to the
      table entries rather than the headers.
      
      Reported-by: Jeff Moyer (jmoyer@redhat.com>
      Signed-off-by: NLinda Knippers <linda.knippers@hpe.com>
      Acked-by: NVishal Verma <vishal.l.verma@intel.com>
      [vishal: fix up unit test for new header assumptions]
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      6b577c9d
  26. 03 11月, 2015 1 次提交
    • V
      acpi: nfit: Add support for hot-add · 20985164
      Vishal Verma 提交于
      Add a .notify callback to the acpi_nfit_driver that gets called on a
      hotplug event. From this, evaluate the _FIT ACPI method which returns
      the updated NFIT with handles for the hot-plugged NVDIMM.
      
      Iterate over the new NFIT, and add any new tables found, and
      register/enable the corresponding regions.
      
      In the nfit test framework, after normal initialization, update the NFIT
      with a new hot-plugged NVDIMM, and directly call into the driver to
      update its view of the available regions.
      
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: Toshi Kani <toshi.kani@hpe.com>
      Cc: Elliott, Robert <elliott@hpe.com>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Cc: <linux-acpi@vger.kernel.org>
      Cc: <linux-nvdimm@lists.01.org>
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      20985164