2022-05-28 19:03:43

by Dan Williams

[permalink] [raw]
Subject: [GIT PULL] Compute Express Link for 5.19

Hi Linus, please pull from:

git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl tags/cxl-for-5.19

...to receive the CXL update for this cycle. The highlight is new
driver-core infrastructure and CXL subsystem changes for allowing
lockdep to validate device_lock() usage. Thanks to PeterZ for setting
me straight on the current capabilities of the lockdep API, and Greg
acked it as well.

On the CXL ACPI side this update adds support for CXL _OSC so that
platform firmware knows that it is safe to still grant Linux native
control of PCIe hotplug and error handling in the presence of CXL
devices. A circular dependency problem was discovered between suspend
and CXL memory for cases where the suspend image might be stored in
CXL memory where that image also contains the PCI register state to
restore to re-enable the device. Disable suspend for now until an
architecture is defined to clarify that conflict.

Lastly a collection of reworks, fixes, and cleanups to the CXL
subsystem where support for snooping mailbox commands and properly
handling the "mem_enable" flow are the highlights.

It has appeared in -next for several releases with some fixes from Dan
and others, but no more outstanding issues as of now.

Please pull, thanks.

---

The following changes since commit ce522ba9ef7e2d9fb22a39eb3371c0c64e2a433e:

Linux 5.18-rc2 (2022-04-10 14:21:36 -1000)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl tags/cxl-for-5.19

for you to fetch changes up to 34e37b4c432cd0f1842b352fde4b8878b4166888:

cxl/port: Enable HDM Capability after validating DVSEC Ranges
(2022-05-20 12:30:53 -0700)

----------------------------------------------------------------
cxl for 5.19

- Add driver-core infrastructure for lockdep validation of
device_lock(), and fixup a deadlock report that was previously hidden
behind the 'lockdep no validate' policy.

- Add CXL _OSC support for claiming native control of CXL hotplug and
error handling.

- Disable suspend in the presence of CXL memory unless and until a
protocol is identified for restoring PCI device context from memory
hosted on CXL PCI devices.

- Add support for snooping CXL mailbox commands to protect against
inopportune changes, like set-partition with the 'immediate' flag set.

- Rework how the driver detects legacy CXL 1.1 configurations (CXL DVSEC
/ 'mem_enable') before enabling new CXL 2.0 decode configurations (CXL
HDM Capability).

- Miscellaneous cleanups and fixes from -next exposure.

----------------------------------------------------------------
Alison Schofield (11):
cxl/mbox: Move cxl_mem_command construction to helper funcs
cxl/mbox: Move raw command warning to raw command validation
cxl/mbox: Move build of user mailbox cmd to a helper functions
cxl/mbox: Construct a users cxl_mbox_cmd in the validation path
cxl/mbox: Remove dependency on cxl_mem_command for a debug msg
cxl/mbox: Make handle_mailbox_cmd_from_user() use a mbox param
cxl/mbox: Move cxl_mem_command param to a local variable
cxl/mbox: Block immediate mode in SET_PARTITION_INFO command
cxl/pmem: Remove CXL SET_PARTITION_INFO from exclusive_cmds list
cxl/mbox: Use type __u32 for mailbox payload sizes
cxl/mbox: Replace NULL check with IS_ERR() after vmemdup_user()

Dan Carpenter (1):
cxl/mbox: fix logical vs bitwise typo

Dan Williams (29):
cxl/mem: Drop DVSEC vs EFI Memory Map sanity check
cxl/pci: Add debug for DVSEC range init failures
cxl/mem: Make cxl_dvsec_range() init failure fatal
cxl/pci: Make cxl_dvsec_ranges() failure not fatal to cxl_pci
cxl/mem: Rename cxl_dvsec_decode_init() to cxl_hdm_decode_init()
cxl/mem: Replace redundant debug message with a comment
PM: CXL: Disable suspend
PCI/ACPI: Prefer CXL _OSC instead of PCIe _OSC for CXL host bridges
cxl: Replace lockdep_mutex with local lock classes
cxl/acpi: Add root device lockdep validation
cxl: Drop cxl_device_lock()
nvdimm: Replace lockdep_mutex with local lock classes
ACPI: NFIT: Drop nfit_device_lock()
nvdimm: Drop nd_device_lock()
device-core: Kill the lockdep_mutex
nvdimm: Fix firmware activation deadlock scenarios
cxl/mem: Drop mem_enabled check from wait_for_media()
cxl/pci: Consolidate wait_for_media() and wait_for_media_ready()
cxl/pci: Drop wait_for_valid() from cxl_await_media_ready()
cxl/mem: Fix cxl_mem_probe() error exit
cxl/mem: Validate port connectivity before dvsec ranges
cxl/pci: Move cxl_await_media_ready() to the core
cxl/mem: Consolidate CXL DVSEC Range enumeration in the core
cxl/mem: Skip range enumeration if mem_enable clear
cxl/mem: Merge cxl_dvsec_ranges() and cxl_hdm_decode_init()
cxl/pci: Drop @info argument to cxl_hdm_decode_init()
cxl/port: Move endpoint HDM Decoder Capability init to port driver
cxl/port: Reuse 'struct cxl_hdm' context for hdm init
cxl/port: Enable HDM Capability after validating DVSEC Ranges

Davidlohr Bueso (4):
cxl/mbox: Drop mbox_mutex comment
cxl/pci: Use CXL_MBOX_SUCCESS to check against mbox_cmd return code
cxl/mbox: Improve handling of mbox_cmd hw return codes
cxl/mbox: Use new return_code handling

Vishal Verma (2):
PCI/ACPI: add a helper for retrieving _OSC Control DWORDs
PCI/ACPI: negotiate CXL _OSC

drivers/Makefile | 2 +-
drivers/acpi/bus.c | 2 +-
drivers/acpi/nfit/core.c | 30 ++--
drivers/acpi/nfit/nfit.h | 24 ---
drivers/acpi/pci_root.c | 238 ++++++++++++++++++++++----
drivers/base/core.c | 3 -
drivers/cxl/Kconfig | 4 +
drivers/cxl/Makefile | 2 +-
drivers/cxl/acpi.c | 13 ++
drivers/cxl/core/Makefile | 1 +
drivers/cxl/core/mbox.c | 334 ++++++++++++++++++++++--------------
drivers/cxl/core/memdev.c | 3 +
drivers/cxl/core/pci.c | 364 ++++++++++++++++++++++++++++++++++++++++
drivers/cxl/core/pmem.c | 10 +-
drivers/cxl/core/port.c | 68 ++++----
drivers/cxl/core/suspend.c | 24 +++
drivers/cxl/cxl.h | 78 ---------
drivers/cxl/cxlmem.h | 75 ++++++++-
drivers/cxl/cxlpci.h | 2 +
drivers/cxl/mem.c | 148 +++-------------
drivers/cxl/pci.c | 175 +------------------
drivers/cxl/pmem.c | 13 +-
drivers/cxl/port.c | 28 +++-
drivers/nvdimm/btt_devs.c | 23 +--
drivers/nvdimm/bus.c | 38 ++---
drivers/nvdimm/core.c | 19 +--
drivers/nvdimm/dax_devs.c | 4 +-
drivers/nvdimm/dimm_devs.c | 12 +-
drivers/nvdimm/namespace_devs.c | 46 ++---
drivers/nvdimm/nd-core.h | 68 +-------
drivers/nvdimm/pfn_devs.c | 31 ++--
drivers/nvdimm/pmem.c | 2 +-
drivers/nvdimm/region.c | 2 +-
drivers/nvdimm/region_devs.c | 20 ++-
include/acpi/acpi_bus.h | 12 +-
include/linux/acpi.h | 42 ++++-
include/linux/device.h | 48 +++++-
include/linux/lockdep.h | 6 +-
include/linux/pm.h | 9 +
include/uapi/linux/cxl_mem.h | 14 +-
kernel/power/hibernate.c | 2 +-
kernel/power/main.c | 5 +-
kernel/power/suspend.c | 3 +-
lib/Kconfig.debug | 23 ---
tools/testing/cxl/Kbuild | 3 +-
tools/testing/cxl/mock_mem.c | 10 --
tools/testing/cxl/test/mem.c | 17 --
tools/testing/cxl/test/mock.c | 29 ++++
48 files changed, 1266 insertions(+), 863 deletions(-)
create mode 100644 drivers/cxl/core/suspend.c
delete mode 100644 tools/testing/cxl/mock_mem.c