All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 10/19] cxl/memdev: Indicate probe deferral
@ 2023-06-08 23:16 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2023-06-08 23:16 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <168592155270.1948938.11536845108449547920.stgit@dwillia2-xfh.jf.intel.com>
References: <168592155270.1948938.11536845108449547920.stgit@dwillia2-xfh.jf.intel.com>
TO: Dan Williams <dan.j.williams@intel.com>

Hi Dan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 9561de3a55bed6bdd44a12820ba81ec416e705a7]

url:    https://github.com/intel-lab-lkp/linux/commits/Dan-Williams/cxl-regs-Clarify-when-a-struct-cxl_register_map-is-input-vs-output/20230605-073402
base:   9561de3a55bed6bdd44a12820ba81ec416e705a7
patch link:    https://lore.kernel.org/r/168592155270.1948938.11536845108449547920.stgit%40dwillia2-xfh.jf.intel.com
patch subject: [PATCH 10/19] cxl/memdev: Indicate probe deferral
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: i386-randconfig-m021-20230608 (https://download.01.org/0day-ci/archive/20230609/202306090732.SLD5PmoG-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202306090732.SLD5PmoG-lkp@intel.com/

smatch warnings:
drivers/cxl/core/memdev.c:642 cxl_acquire_endpoint() warn: inconsistent returns '&cxlmd->dev.mutex'.

vim +642 drivers/cxl/core/memdev.c

3d135db510240f Ben Widawsky 2021-08-02  611  
126ed1e685e817 Dan Williams 2023-06-04  612  /*
126ed1e685e817 Dan Williams 2023-06-04  613   * Try to get a locked reference on a memdev's CXL port topology
126ed1e685e817 Dan Williams 2023-06-04  614   * connection. Be careful to observe when cxl_mem_probe() has deposited
126ed1e685e817 Dan Williams 2023-06-04  615   * a probe deferral awaiting the arrival of the CXL root driver
126ed1e685e817 Dan Williams 2023-06-04  616   */
126ed1e685e817 Dan Williams 2023-06-04  617  struct cxl_port *cxl_acquire_endpoint(struct cxl_memdev *cxlmd)
126ed1e685e817 Dan Williams 2023-06-04  618  {
126ed1e685e817 Dan Williams 2023-06-04  619  	struct cxl_port *endpoint;
126ed1e685e817 Dan Williams 2023-06-04  620  	int rc = -ENXIO;
126ed1e685e817 Dan Williams 2023-06-04  621  
126ed1e685e817 Dan Williams 2023-06-04  622  	device_lock(&cxlmd->dev);
126ed1e685e817 Dan Williams 2023-06-04  623  	endpoint = cxlmd->endpoint;
126ed1e685e817 Dan Williams 2023-06-04  624  	if (!endpoint)
126ed1e685e817 Dan Williams 2023-06-04  625  		goto err;
126ed1e685e817 Dan Williams 2023-06-04  626  
126ed1e685e817 Dan Williams 2023-06-04  627  	if (IS_ERR(endpoint)) {
126ed1e685e817 Dan Williams 2023-06-04  628  		rc = PTR_ERR(endpoint);
126ed1e685e817 Dan Williams 2023-06-04  629  		goto err;
126ed1e685e817 Dan Williams 2023-06-04  630  	}
126ed1e685e817 Dan Williams 2023-06-04  631  
126ed1e685e817 Dan Williams 2023-06-04  632  	device_lock(&endpoint->dev);
126ed1e685e817 Dan Williams 2023-06-04  633  	if (!endpoint->dev.driver)
126ed1e685e817 Dan Williams 2023-06-04  634  		goto err_endpoint;
126ed1e685e817 Dan Williams 2023-06-04  635  
126ed1e685e817 Dan Williams 2023-06-04  636  	return endpoint;
126ed1e685e817 Dan Williams 2023-06-04  637  
126ed1e685e817 Dan Williams 2023-06-04  638  err_endpoint:
126ed1e685e817 Dan Williams 2023-06-04  639  	device_unlock(&endpoint->dev);
126ed1e685e817 Dan Williams 2023-06-04  640  err:
126ed1e685e817 Dan Williams 2023-06-04  641  	device_unlock(&cxlmd->dev);
126ed1e685e817 Dan Williams 2023-06-04 @642  	return ERR_PTR(rc);
126ed1e685e817 Dan Williams 2023-06-04  643  }
126ed1e685e817 Dan Williams 2023-06-04  644  EXPORT_SYMBOL_NS(cxl_acquire_endpoint, CXL);
126ed1e685e817 Dan Williams 2023-06-04  645  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH 00/19] cxl: Device memory setup
@ 2023-06-04 23:31 Dan Williams
  2023-06-04 23:32 ` [PATCH 10/19] cxl/memdev: Indicate probe deferral Dan Williams
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Williams @ 2023-06-04 23:31 UTC (permalink / raw)
  To: linux-cxl; +Cc: ira.weiny, navneet.singh

There are 2 models for implementing CXL memory. To date the CXL enabling
has been focused on the common class-device case (Type-3). The
class-code mandates the implementation of standard mechanisms like the
mailbox and mandatory commands. The other model (Type-2) is
implementation specific memory typically associated with local device
memory for an accelerator. Start the support for Type-2 and take the
opportunity to better prepare the CXL core for "a la carte" enabling of
optional CXL features.

Now, to date there has not been any engagement on the list for an
accelerator driver that wants to reuse the CXL core, but I think it is
worth moving ahead with these patches for the following reasons:

1/ The refactoring of region creation is needed by Persistent Memory
   support where the kernel needs to create regions from labels, not sysfs
   input.

2/ The 'struct cxl_dev_state' object carries infrastructure that is
   optional outside of CXL memory-device class-code devices. That makes it
   difficult to even start the discussion with accelerator driver authors
   that want to evaluate what pieces of the CXL core are suitable to reuse.

3/ The example type-2 driver in cxl_test protects against
   type-3-exclusive assumptions from leaking back into the code base.

In other words it is difficult to start the "type-2" discussion when the
kernel is ~1500 lines of change from the baseline such a driver might
need, and the cleanups make the code more maintainable independent of an
immediate non-test user.

The first 9 patches are general cleanups, the last 10 are focused on
refactoring region creation in support of driver-instantiated CXL memory
regions.

---

Dan Williams (19):
      cxl/regs: Clarify when a 'struct cxl_register_map' is input vs output
      tools/testing/cxl: Remove unused @cxlds argument
      cxl/mbox: Move mailbox related driver state to its own data structure
      cxl/memdev: Make mailbox functionality optional
      cxl/port: Rename CXL_DECODER_{EXPANDER,ACCELERATOR} => {HOSTMEM,DEVMEM}
      cxl/hdm: Default CXL_DEVTYPE_DEVMEM decoders to CXL_DECODER_DEVMEM
      cxl/region: Manage decoder target_type at decoder-attach time
      cxl/port: Enumerate flit mode capability
      cxl/memdev: Formalize endpoint port linkage
      cxl/memdev: Indicate probe deferral
      cxl/region: Factor out construct_region_{begin,end} and drop_region() for reuse
      cxl/region: Factor out interleave ways setup
      cxl/region: Factor out interleave granularity setup
      cxl/region: Clarify locking requirements of cxl_region_attach()
      cxl/region: Specify host-only vs device memory at region creation time
      cxl/hdm: Define a driver interface for DPA allocation
      cxl/region: Define a driver interface for HPA free space enumeration
      cxl/region: Define a driver interface for region creation
      tools/testing/cxl: Emulate a CXL accelerator with local memory


 drivers/cxl/acpi.c           |    2 
 drivers/cxl/core/hdm.c       |  164 +++++++++++++---
 drivers/cxl/core/mbox.c      |  277 ++++++++++++++-------------
 drivers/cxl/core/memdev.c    |  108 +++++++++-
 drivers/cxl/core/pci.c       |   84 ++++++++
 drivers/cxl/core/pmem.c      |    2 
 drivers/cxl/core/port.c      |   19 +-
 drivers/cxl/core/region.c    |  437 ++++++++++++++++++++++++++++++++++++------
 drivers/cxl/core/regs.c      |    8 -
 drivers/cxl/cxl.h            |   21 ++
 drivers/cxl/cxlmem.h         |  124 ++++++++----
 drivers/cxl/cxlpci.h         |   25 ++
 drivers/cxl/mem.c            |   17 +-
 drivers/cxl/pci.c            |  114 ++++++-----
 drivers/cxl/pmem.c           |   35 ++-
 drivers/cxl/port.c           |    5 
 drivers/cxl/security.c       |   24 +-
 tools/testing/cxl/test/cxl.c |   20 ++
 tools/testing/cxl/test/mem.c |  214 ++++++++++++++-------
 19 files changed, 1245 insertions(+), 455 deletions(-)

base-commit: 9561de3a55bed6bdd44a12820ba81ec416e705a7

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-08 23:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-08 23:16 [PATCH 10/19] cxl/memdev: Indicate probe deferral kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2023-06-04 23:31 [PATCH 00/19] cxl: Device memory setup Dan Williams
2023-06-04 23:32 ` [PATCH 10/19] cxl/memdev: Indicate probe deferral Dan Williams
2023-06-06 13:54   ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.