1. 23 8月, 2016 2 次提交
  2. 09 8月, 2016 1 次提交
  3. 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
  4. 23 7月, 2016 1 次提交
  5. 22 7月, 2016 4 次提交
    • D
      libnvdimm: move ->module to struct nvdimm_bus_descriptor · bc9775d8
      Dan Williams 提交于
      Let the provider module be explicitly passed in rather than implicitly
      assumed by the module that calls nvdimm_bus_register().  This is in
      preparation for unifying the nfit and nfit_test driver teardown paths.
      Reviewed-by: NLee, Chun-Yi <jlee@suse.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      bc9775d8
    • D
      nfit: cleanup acpi_nfit_init calling convention · e7a11b44
      Dan Williams 提交于
      Pass the nfit buffer as a parameter rather than hanging it off of
      acpi_desc.
      Reviewed-by: N"Lee, Chun-Yi" <jlee@suse.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      e7a11b44
    • D
      nfit: fix _FIT evaluation memory leak + use after free · 31932041
      Dan Williams 提交于
      acpi_evaluate_object() allocates memory. Free the buffer allocated
      during acpi_nfit_add(). In order for this memory to be freed
      acpi_nfit_init() needs to be converted to duplicate the nfit contents in
      its internal allocation.  Use zero-length arrays to minimize the thrash
      with the rest of the nfit driver implementation.
      
      All of the add_<nfit-sub-table>() routines now validate a minimum table
      size and expect hotplugged tables to match the size of the original
      table to count as a duplicate. For variable length tables, like 'idt'
      and 'flush', we calculate the dynamic size. Note that hotplug by
      definition cannot change the interleave as it would cause data
      corruption of in-use namespaces.
      
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Reported-by: NXiao Guangrong <guangrong.xiao@intel.com>
      Reported-by: NHaozhong Zhang <haozhong.zhang@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      31932041
    • L
      acpi, nfit: treat virtual ramdisk SPA as pmem region · c2f32acd
      Lee, Chun-Yi 提交于
      This patch adds logic to treat virtual ramdisk SPA as pmem region, then
      ramdisk's /dev/pmem* device can be mounted with iso9660.
      
      It's useful to work with the httpboot in EFI firmware to pull a remote
      ISO file to the local memory region for booting and installation.
      
      Wiki page of UEFI HTTPBoot with OVMF:
      	https://en.opensuse.org/UEFI_HTTPBoot_with_OVMF
      
      The ramdisk function in EDK2/OVMF generates a ACPI0012 root device that
      it contains empty _STA but without _DSM:
      
      DefinitionBlock ("ssdt2.aml", "SSDT", 2, "INTEL ", "RamDisk ", 0x00001000)
      {
          Scope (\_SB)
          {
              Device (NVDR)
              {
                  Name (_HID, "ACPI0012")  // _HID: Hardware ID
                  Name (_STR, Unicode ("NVDIMM Root Device"))  // _STR: Description String
                  Method (_STA, 0, NotSerialized)  // _STA: Status
                  {
                      Return (0x0F)
                  }
              }
          }
      }
      
      In section 5.2.25.2 of ACPI 6.1 spec, it mentions that the "SPA Range
      Structure Index" of virtual SPA shall be set to zero. That means virtual SPA
      will not be associated by any NVDIMM region mapping.
      
      The VCD's SPA Range Structure in NFIT is similar to virtual disk region
      as following:
      
      [028h 0040   2]                Subtable Type : 0000 [System Physical Address Range]
      [02Ah 0042   2]                       Length : 0038
      
      [02Ch 0044   2]                  Range Index : 0000
      [02Eh 0046   2]        Flags (decoded below) : 0000
                         Add/Online Operation Only : 0
                            Proximity Domain Valid : 0
      [030h 0048   4]                     Reserved : 00000000
      [034h 0052   4]             Proximity Domain : 00000000
      [038h 0056  16]           Address Range GUID : 77AB535A-45FC-624B-5560-F7B281D1F96E
      [048h 0072   8]           Address Range Base : 00000000B6ABD018
      [050h 0080   8]         Address Range Length : 0000000005500000
      [058h 0088   8]         Memory Map Attribute : 0000000000000000
      
      The way to not associate a SPA range is to never reference it from a "flush hint",
      "interleave", or "control region" table.
      
      After testing on OVMF, pmem driver can support the region that it doesn't
      assoicate to any NVDIMM mapping. So, treat VCD like pmem is a idea to get
      a pmem block device that it contains iso.
      
      v4:
      Instoduce nfit_spa_is_virtual() to check virtual ramdisk SPA and create
      pmem region.
      
      v3:
      To simplify patch, removed useless VCD region in libnvdimm.
      
      v2:
      Removed the code for setting VCD to a read-only region.
      
      Cc: Gary Lin <GLin@suse.com>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Linda Knippers <linda.knippers@hpe.com>
      Signed-off-by: NLee, Chun-Yi <jlee@suse.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      c2f32acd
  6. 20 7月, 2016 1 次提交
    • D
      nfit: make DIMM DSMs optional · a7225598
      Dan Williams 提交于
      Commit 4995734e "acpi, nfit: fix acpi_check_dsm() vs zero functions
      implemented" attempted to fix a QEMU regression by supporting its usage
      of a zero-mask as a valid response to a DSM-family probe request.
      However, this behavior breaks HP platforms that return a zero-mask by
      default causing the probe to misidentify the DSM-family.
      
      Instead, the QEMU regression can be fixed by simply not requiring the DSM
      family to be identified.
      
      This effectively reverts commit 4995734e, and removes the DSM
      requirement from the init path.
      
      Cc: "Rafael J. Wysocki" <rafael@kernel.org>
      Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
      Cc: Linda Knippers <linda.knippers@hpe.com>
      Fixes: 4995734e ("acpi, nfit: fix acpi_check_dsm() vs zero functions implemented")
      Reported-by: NJerry Hoemann <jerry.hoemann@hpe.com>
      Tested-by: NJerry Hoemann <jerry.hoemann@hpe.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      a7225598
  7. 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
  8. 08 7月, 2016 3 次提交
    • D
      libnvdimm: introduce devm_nvdimm_memremap(), convert nfit_spa_map() users · 29b9aa0a
      Dan Williams 提交于
      In preparation for generically mapping flush hint addresses for both the
      BLK and PMEM use case, provide a generic / reference counted mapping
      api.  Given the fact that a dimm may belong to multiple regions (PMEM
      and BLK), the flush hint addresses need to be held valid as long as any
      region associated with the dimm is active.  This is similar to the
      existing BLK-region case where multiple BLK-regions may share an
      aperture mapping.  Up-level this shared / reference-counted mapping
      capability from the nfit driver to a core nvdimm capability.
      
      This eliminates the need for the nd_blk_region.disable() callback.  Note
      that the removal of nfit_spa_map() and related infrastructure is
      deferred to a later patch.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      29b9aa0a
    • D
      nfit: don't override return value of nfit_mem_init · 81ed4e36
      Dan Williams 提交于
      We were needlessly converting nfit_mem_init() errors to -ENOMEM.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      81ed4e36
    • D
      nfit: always associate flush hints · ad9ac5e1
      Dan Williams 提交于
      Before enabling use of flush hints for pmem regions, we need to make
      sure they are always associated.  Move the initialization of nfit_flush
      out of the block-window specific init path to the general init path.
      
      Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      ad9ac5e1
  9. 07 7月, 2016 1 次提交
  10. 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
  11. 25 6月, 2016 1 次提交
    • D
      acpi, nfit: fix acpi_check_dsm() vs zero functions implemented · 4995734e
      Dan Williams 提交于
      QEMU 2.6 implements nascent support for nvdimm DSMs. Depending on
      configuration it may only implement the function0 dsm to indicate that
      no other DSMs are available. Commit 31eca76b "nfit, libnvdimm:
      limited/whitelisted dimm command marshaling mechanism" breaks QEMU, but
      QEMU is spec compliant.  Per the spec the way to indicate that no
      functions are supported is:
      
          If Function Index is zero, the return is a buffer containing one bit
          for each function index, starting with zero. Bit 0 indicates whether
          there is support for any functions other than function 0 for the
          specified UUID and Revision ID. If set to zero, no functions are
          supported (other than function zero) for the specified UUID and
          Revision ID.
      
      Update the nfit driver to determine the family (interface UUID) without
      requiring the implementation to define any other functions, i.e.
      short-circuit acpi_check_dsm() to succeed per the spec.  The nfit driver
      appears to be the only user passing funcs==0 to acpi_check_dsm(), so
      this behavior change of the common routine should be limited to the
      probing done by the nfit driver.
      
      Cc: Len Brown <lenb@kernel.org>
      Cc: Jerry Hoemann <jerry.hoemann@hpe.com>
      Acked-by: N"Rafael J. Wysocki" <rafael@kernel.org>
      Fixes: 31eca76b ("nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism")
      Reported-by: NXiao Guangrong <guangrong.xiao@linux.intel.com>
      Tested-by: NXiao Guangrong <guangrong.xiao@linux.intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      4995734e
  12. 21 6月, 2016 1 次提交
  13. 06 5月, 2016 2 次提交
  14. 03 5月, 2016 1 次提交
  15. 30 4月, 2016 1 次提交
  16. 29 4月, 2016 2 次提交
    • 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
  17. 27 4月, 2016 2 次提交
    • T
      acpi/nfit: Add sysfs "id" for NVDIMM ID · 38a879ba
      Toshi Kani 提交于
      ACPI 6.1, section 5.2.25.9, defines an identifier for an NVDIMM.
      
      Change the NFIT driver to add a new sysfs file "id" under nfit
      directory.
      Signed-off-by: NToshi Kani <toshi.kani@hpe.com>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Robert Moore <robert.moore@intel.com>
      Cc: Robert Elliott <elliott@hpe.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      38a879ba
    • T
      acpi/nfit: Update nfit driver to comply with ACPI 6.1 · 5ad9a7fd
      Toshi Kani 提交于
      ACPI 6.1, Table 5-133, updates NVDIMM Control Region Structure
      as follows.
       - Valid Fields, Manufacturing Location, and Manufacturing Date
         are added from reserved range.  No change in the structure size.
       - IDs (SPD values) are stored as arrays of bytes (i.e. big-endian
         format).  The spec clarifies that they need to be represented
         as arrays of bytes as well.
      
      This patch makes the following changes to support this update.
       - Change the NFIT driver to show SPD ID values in big-endian
         format.
       - Change sprintf format to use "0x" instead of "#" since "%#02x"
         does not prepend '0'.
      
      link: http://www.uefi.org/sites/default/files/resources/ACPI_6_1.pdfSigned-off-by: NToshi Kani <toshi.kani@hpe.com>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Robert Moore <robert.moore@intel.com>
      Cc: Robert Elliott <elliott@hpe.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      5ad9a7fd
  18. 12 4月, 2016 2 次提交
  19. 10 3月, 2016 1 次提交
    • T
      ACPI: Change NFIT driver to insert new resource · af1996ef
      Toshi Kani 提交于
      ACPI 6 defines persistent memory (PMEM) ranges in multiple
      firmware interfaces, e820, EFI, and ACPI NFIT table.  This EFI
      change, however, leads to hit a bug in the grub bootloader, which
      treats EFI_PERSISTENT_MEMORY type as regular memory and corrupts
      stored user data [1].
      
      Therefore, BIOS may set generic reserved type in e820 and EFI to
      cover PMEM ranges.  The kernel can initialize PMEM ranges from
      ACPI NFIT table alone.
      
      This scheme causes a problem in the iomem table, though.  On x86,
      for instance, e820_reserve_resources() initializes top-level entries
      (iomem_resource.child) from the e820 table at early boot-time.
      This creates "reserved" entry for a PMEM range, which does not allow
      region_intersects() to check with PMEM type.
      
      Change acpi_nfit_register_region() to call acpi_nfit_insert_resource(),
      which calls insert_resource() to insert a PMEM entry from NFIT when
      the iomem table does not have a PMEM entry already.  That is, when
      a PMEM range is marked as reserved type in e820, it inserts
      "Persistent Memory" entry, which results as follows.
      
       + "Persistent Memory"
          + "reserved"
      
      This allows the EINJ driver, which calls region_intersects() to check
      PMEM ranges, to work continuously even if BIOS sets reserved type
      (or sets nothing) to PMEM ranges in e820 and EFI.
      
      [1]: https://lists.gnu.org/archive/html/grub-devel/2015-11/msg00209.htmlSigned-off-by: NToshi Kani <toshi.kani@hpe.com>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      af1996ef
  20. 06 3月, 2016 6 次提交
    • D
      nfit, libnvdimm: clear poison command support · d4f32367
      Dan Williams 提交于
      Add the boiler-plate for a 'clear error' command based on section
      9.20.7.6 "Function Index 4 - Clear Uncorrectable Error" from the ACPI
      6.1 specification, and add a reference implementation in nfit_test.
      Reviewed-by: NVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      d4f32367
    • D
      nfit: disable userspace initiated ars during scrub · 87bf572e
      Dan Williams 提交于
      While the nfit driver is issuing address range scrub commands and
      reaping the results do not permit an ars_start command issued from
      userspace.  The scrub thread assumes that all ars completions are for
      scrubs initiated by platform firmware at boot, or by the nfit driver.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      87bf572e
    • 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
  21. 05 3月, 2016 1 次提交