1. 10 11月, 2020 1 次提交
  2. 28 10月, 2020 1 次提交
  3. 24 9月, 2020 2 次提交
  4. 16 9月, 2020 1 次提交
  5. 04 8月, 2020 1 次提交
    • D
      ACPI: NFIT: Fix ARS zero-sized allocation · 9f1048d4
      Dan Williams 提交于
      Pending commit in -next "devres: handle zero size in devm_kmalloc()"
      triggers a boot regression due to the ARS implementation expecting NULL
      from a zero-sized allocation. Avoid the zero-sized allocation by
      skipping ARS, otherwise crashes with the following signature when
      de-referencing ZERO_SIZE_PTR.
      
           BUG: kernel NULL pointer dereference, address: 0000000000000018
           #PF: supervisor read access in kernel mode
           #PF: error_code(0x0000) - not-present page
           RIP: 0010:__acpi_nfit_scrub+0x28a/0x350 [nfit]
           [..]
           Call Trace:
             ? acpi_nfit_query_poison+0x6a/0x180 [nfit]
             acpi_nfit_scrub+0x36/0xb0 [nfit]
             process_one_work+0x23c/0x580
             worker_thread+0x50/0x3b0
      
      Otherwise the implementation correctly aborts when NULL is returned from
      devm_kzalloc() in ars_status_alloc().
      
      Link: https://lore.kernel.org/r/159624590643.3037264.14157533719042907758.stgit@dwillia2-desk3.amr.corp.intel.com
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      9f1048d4
  6. 29 7月, 2020 1 次提交
    • D
      ACPI: NFIT: Add runtime firmware activate support · a1facc1f
      Dan Williams 提交于
      Plumb the platform specific backend for the generic libnvdimm firmware
      activate interface. Register dimm level operations to arm/disarm
      activation, and register bus level operations to report the dynamic
      platform-quiesce time relative to the number of dimms armed for firmware
      activation.
      
      A new nfit-specific bus attribute "firmware_activate_noidle" is added to
      allow the activation to switch between platform enforced, and OS
      opportunistic device quiesce. In other words, let the hibernate cycle
      handle in-flight device-dma rather than the platform attempting to
      increase PCI-E timeouts and the like.
      
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      a1facc1f
  7. 26 7月, 2020 3 次提交
    • D
      ACPI: NFIT: Define runtime firmware activation commands · 6450ddbd
      Dan Williams 提交于
      Platform reboots are expensive. Towards reducing downtime to apply
      firmware updates the Intel NVDIMM command definition is growing support
      for applying live firmware updates that only require temporarily
      suspending memory traffic instead of a full reboot.
      
      Follow-on commits add support for triggering firmware activation, this
      patch only defines the commands, adds probe support, and validates that
      they are blocked via the ioctl path. The ioctl-path block ensures that
      the OS is in charge since these commands have side effects only the OS
      can handle. Specifically firmware activation may cause the memory
      controller to be quiesced on the order of 100s of milliseconds. In that
      case Linux ensure the activation only takes place while the OS is in a
      suspend state.
      
      Link: https://pmem.io/documents/IntelOptanePMem_DSM_Interface-V2.0.pdf
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Len Brown <lenb@kernel.org>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      6450ddbd
    • D
      ACPI: NFIT: Move bus_dsm_mask out of generic nvdimm_bus_descriptor · d46e6a21
      Dan Williams 提交于
      DSMs are strictly an ACPI mechanism, evict the bus_dsm_mask concept from
      the generic 'struct nvdimm_bus_descriptor' object.
      
      As a side effect the test facility ->bus_nfit_cmd_force_en is no longer
      necessary. The test infrastructure can communicate that information
      directly in ->bus_dsm_mask.
      
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      d46e6a21
    • D
      libnvdimm: Validate command family indices · 92fe2aa8
      Dan Williams 提交于
      The ND_CMD_CALL format allows for a general passthrough of passlisted
      commands targeting a given command set. However there is no validation
      of the family index relative to what the bus supports.
      
      - Update the NFIT bus implementation (the only one that supports
        ND_CMD_CALL passthrough) to also passlist the valid set of command
        family indices.
      
      - Update the generic __nd_ioctl() path to validate that field on behalf
        of all implementations.
      
      Fixes: 31eca76b ("nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism")
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Len Brown <lenb@kernel.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      92fe2aa8
  8. 23 4月, 2020 1 次提交
  9. 18 3月, 2020 1 次提交
  10. 29 2月, 2020 1 次提交
  11. 20 11月, 2019 5 次提交
  12. 18 11月, 2019 1 次提交
  13. 22 10月, 2019 1 次提交
  14. 19 7月, 2019 1 次提交
    • D
      driver-core, libnvdimm: Let device subsystems add local lockdep coverage · 87a30e1f
      Dan Williams 提交于
      For good reason, the standard device_lock() is marked
      lockdep_set_novalidate_class() because there is simply no sane way to
      describe the myriad ways the device_lock() ordered with other locks.
      However, that leaves subsystems that know their own local device_lock()
      ordering rules to find lock ordering mistakes manually. Instead,
      introduce an optional / additional lockdep-enabled lock that a subsystem
      can acquire in all the same paths that the device_lock() is acquired.
      
      A conversion of the NFIT driver and NVDIMM subsystem to a
      lockdep-validate device_lock() scheme is included. The
      debug_nvdimm_lock() implementation implements the correct lock-class and
      stacking order for the libnvdimm device topology hierarchy.
      
      Yes, this is a hack, but hopefully it is a useful hack for other
      subsystems device_lock() debug sessions. Quoting Greg:
      
          "Yeah, it feels a bit hacky but it's really up to a subsystem to mess up
           using it as much as anything else, so user beware :)
      
           I don't object to it if it makes things easier for you to debug."
      
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Ira Weiny <ira.weiny@intel.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Dave Jiang <dave.jiang@intel.com>
      Cc: Keith Busch <keith.busch@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Vishal Verma <vishal.l.verma@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Reviewed-by: NIra Weiny <ira.weiny@intel.com>
      Link: https://lore.kernel.org/r/156341210661.292348.7014034644265455704.stgit@dwillia2-desk3.amr.corp.intel.com
      87a30e1f
  15. 06 7月, 2019 1 次提交
  16. 05 6月, 2019 1 次提交
  17. 23 3月, 2019 1 次提交
  18. 02 3月, 2019 1 次提交
  19. 21 2月, 2019 5 次提交
  20. 14 2月, 2019 1 次提交
  21. 13 2月, 2019 1 次提交
    • D
      acpi/nfit: Require opt-in for read-only label configurations · 0171b6b7
      Dan Williams 提交于
      Recent fixes to command handling enabled Linux to read label
      configurations that it could not before. Unfortunately that means that
      configurations that were operating in label-less mode will be broken as
      the kernel ignores the existing namespace configuration and tries to
      honor the new found labels.
      
      Fortunately this seems limited to a case where Linux can quirk the
      behavior and maintain the existing label-less semantics by default.
      When the platform does not emit an _LSW method, disable all label access
      methods. Provide a 'force_labels' module parameter to allow read-only
      label operation.
      
      Fixes: 11189c10 ("acpi/nfit: Fix command-supported detection")
      Reported-by: NDexuan Cui <decui@microsoft.com>
      Reviewed-by: NDexuan Cui <decui@microsoft.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      0171b6b7
  22. 08 2月, 2019 1 次提交
  23. 03 2月, 2019 1 次提交
  24. 30 1月, 2019 3 次提交
  25. 22 1月, 2019 3 次提交