All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Davidlohr Bueso <dave@stgolabs.net>, dave.jiang@intel.com
Cc: oe-kbuild-all@lists.linux.dev, jic23@kernel.org,
	alison.schofield@intel.com, ira.weiny@intel.com, djbw@kernel.org,
	dongjoo.seo1@samsung.com, anisa.su@samsung.com,
	linux-cxl@vger.kernel.org, Davidlohr Bueso <dave@stgolabs.net>
Subject: Re: [PATCH] cxl/mbox: Support Media Operation
Date: Fri, 1 May 2026 12:31:41 +0800	[thread overview]
Message-ID: <202605011237.9gVT596v-lkp@intel.com> (raw)
In-Reply-To: <20260428000220.587249-1-dave@stgolabs.net>

Hi Davidlohr,

kernel test robot noticed the following build errors:

[auto build test ERROR on cxl/next]
[also build test ERROR on linus/master v7.1-rc1 next-20260430]
[cannot apply to cxl/pending]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Davidlohr-Bueso/cxl-mbox-Support-Media-Operation/20260429-230352
base:   https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git next
patch link:    https://lore.kernel.org/r/20260428000220.587249-1-dave%40stgolabs.net
patch subject: [PATCH] cxl/mbox: Support Media Operation
config: i386-randconfig-016-20260321 (https://download.01.org/0day-ci/archive/20260501/202605011237.9gVT596v-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260501/202605011237.9gVT596v-lkp@intel.com/reproduce)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605011237.9gVT596v-lkp@intel.com/

All errors (new ones prefixed by >>):

   ld: drivers/cxl/core/mbox.o: in function `cxl_media_op_discover':
>> drivers/cxl/core/mbox.c:973:(.text+0x2718): undefined reference to `__umoddi3'


vim +973 drivers/cxl/core/mbox.c

   901	
   902	/**
   903	 * cxl_media_op_discover() - Discover supported media operation
   904	 * @mds: The device data for the operation
   905	 *
   906	 * Discover any available Media Operations.
   907	 *
   908	 * Return: 0 on success or if Media Operation is not supported,
   909	 * negative error code on failure.
   910	 */
   911	int cxl_media_op_discover(struct cxl_memdev_state *mds)
   912	{
   913		int rc, i;
   914		u16 num_returned;
   915		u64 granularity;
   916		struct cxl_mailbox *cxl_mbox = &mds->cxlds.cxl_mbox;
   917		struct cxl_mbox_media_op_discovery_out *disc_out __free(kfree) = NULL;
   918		struct cxl_mbox_media_op_discovery_in *disc_in __free(kfree) = NULL;
   919	
   920		if (!test_bit(CXL_SEC_ENABLED_MEDIA_OPERATIONS,
   921			      mds->security.enabled_cmds))
   922			return 0;
   923	
   924		disc_in = kzalloc_obj(*disc_in);
   925		if (!disc_in)
   926			return -ENOMEM;
   927	
   928		disc_in->class = CXL_MEDIA_OP_CLASS_GENERAL;
   929		disc_in->subclass = CXL_MEDIA_OP_GENERAL_DISCOVERY;
   930		disc_in->dpa_range_count = 0;
   931		disc_in->start_index = 0;
   932		disc_in->num_ops = cpu_to_le16(CXL_MEDIA_OP_MAX_OPS);
   933	
   934		disc_out = kzalloc_flex(*disc_out, ops, CXL_MEDIA_OP_MAX_OPS);
   935		if (!disc_out)
   936			return -ENOMEM;
   937	
   938		struct cxl_mbox_cmd mbox_cmd = (struct cxl_mbox_cmd) {
   939			.opcode = CXL_MBOX_OP_MEDIA_OPERATION,
   940			.payload_in = disc_in,
   941			.size_in = sizeof(*disc_in),
   942			.payload_out = disc_out,
   943			.size_out = struct_size(disc_out, ops, CXL_MEDIA_OP_MAX_OPS),
   944			.min_out = sizeof(*disc_out),
   945			.poll_count = 1,
   946			.poll_interval_ms = 1000,
   947		};
   948	
   949		rc = cxl_internal_send_cmd(cxl_mbox, &mbox_cmd);
   950		if (rc < 0) {
   951			dev_dbg(cxl_mbox->host,
   952				"Media Operation Discovery failed: %d\n", rc);
   953			return rc;
   954		}
   955	
   956		num_returned = le16_to_cpu(disc_out->num_returned);
   957		if (num_returned > CXL_MEDIA_OP_MAX_OPS) {
   958			dev_dbg(cxl_mbox->host,
   959				"Discovery returned %u ops, expected max %u\n",
   960				num_returned, CXL_MEDIA_OP_MAX_OPS);
   961			return -EINVAL;
   962		}
   963	
   964		granularity = le64_to_cpu(disc_out->granularity);
   965		/* spec requires granularity to be a power of 2 and a multiple of 0x40 */
   966		if (!is_power_of_2(granularity) || !IS_ALIGNED(granularity, SZ_64)) {
   967			dev_dbg(cxl_mbox->host,
   968				"Discovery returned invalid granularity: %llu\n",
   969				granularity);
   970			return -EINVAL;
   971		}
   972		mds->media_op.granularity = granularity;
 > 973		mds->media_op.range_limit = rounddown(SZ_1G, granularity);
   974	
   975		for (i = 0; i < num_returned; i++) {
   976			u8 cls = disc_out->ops[i].class;
   977			u8 sub = disc_out->ops[i].subclass;
   978	
   979			if (cls == CXL_MEDIA_OP_CLASS_SANITIZE &&
   980			    sub == CXL_MEDIA_OP_SANITIZE_SANITIZE)
   981				mds->media_op.sanitize_supported = true;
   982			if (cls == CXL_MEDIA_OP_CLASS_SANITIZE &&
   983			    sub == CXL_MEDIA_OP_SANITIZE_ZERO)
   984				mds->media_op.zero_supported = true;
   985		}
   986	
   987		dev_dbg(cxl_mbox->host,
   988			"Media Operation: granularity=%llu sanitize=%d zero=%d\n",
   989			mds->media_op.granularity,
   990			mds->media_op.sanitize_supported,
   991			mds->media_op.zero_supported);
   992	
   993		return 0;
   994	}
   995	EXPORT_SYMBOL_NS_GPL(cxl_media_op_discover, "CXL");
   996	

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

      reply	other threads:[~2026-05-01  4:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-28  0:02 [PATCH] cxl/mbox: Support Media Operation Davidlohr Bueso
2026-05-01  4:31 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202605011237.9gVT596v-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alison.schofield@intel.com \
    --cc=anisa.su@samsung.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=djbw@kernel.org \
    --cc=dongjoo.seo1@samsung.com \
    --cc=ira.weiny@intel.com \
    --cc=jic23@kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.