From: kernel test robot <lkp@intel.com>
To: alejandro.lucero-palau@amd.com, linux-cxl@vger.kernel.org,
netdev@vger.kernel.org, dan.j.williams@intel.com,
martin.habets@xilinx.com, edward.cree@amd.com,
davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, richard.hughes@amd.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Alejandro Lucero <alucerop@amd.com>
Subject: Re: [PATCH v2 10/15] cxl: define a driver interface for DPA allocation
Date: Tue, 16 Jul 2024 11:32:09 +0800 [thread overview]
Message-ID: <202407161159.KA2METLk-lkp@intel.com> (raw)
In-Reply-To: <20240715172835.24757-11-alejandro.lucero-palau@amd.com>
Hi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.10 next-20240715]
[cannot apply to cxl/next cxl/pending horms-ipvs/master]
[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/alejandro-lucero-palau-amd-com/cxl-add-type2-device-basic-support/20240716-015920
base: linus/master
patch link: https://lore.kernel.org/r/20240715172835.24757-11-alejandro.lucero-palau%40amd.com
patch subject: [PATCH v2 10/15] cxl: define a driver interface for DPA allocation
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20240716/202407161159.KA2METLk-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project a0c6b8aef853eedaa0980f07c0a502a5a8a9740e)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240716/202407161159.KA2METLk-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/202407161159.KA2METLk-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/cxl/core/hdm.c:612: warning: Function parameter or struct member 'is_ram' not described in 'cxl_request_dpa'
>> drivers/cxl/core/hdm.c:612: warning: Excess function parameter 'mode' description in 'cxl_request_dpa'
vim +612 drivers/cxl/core/hdm.c
589
590 /**
591 * cxl_request_dpa - search and reserve DPA given input constraints
592 * @endpoint: an endpoint port with available decoders
593 * @mode: DPA operation mode (ram vs pmem)
594 * @min: the minimum amount of capacity the call needs
595 * @max: extra capacity to allocate after min is satisfied
596 *
597 * Given that a region needs to allocate from limited HPA capacity it
598 * may be the case that a device has more mappable DPA capacity than
599 * available HPA. So, the expectation is that @min is a driver known
600 * value for how much capacity is needed, and @max is based the limit of
601 * how much HPA space is available for a new region.
602 *
603 * Returns a pinned cxl_decoder with at least @min bytes of capacity
604 * reserved, or an error pointer. The caller is also expected to own the
605 * lifetime of the memdev registration associated with the endpoint to
606 * pin the decoder registered as well.
607 */
608 struct cxl_endpoint_decoder *cxl_request_dpa(struct cxl_port *endpoint,
609 bool is_ram,
610 resource_size_t min,
611 resource_size_t max)
> 612 {
613 struct cxl_endpoint_decoder *cxled;
614 enum cxl_decoder_mode mode;
615 struct device *cxled_dev;
616 resource_size_t alloc;
617 int rc;
618
619 if (!IS_ALIGNED(min | max, SZ_256M))
620 return ERR_PTR(-EINVAL);
621
622 down_read(&cxl_dpa_rwsem);
623
624 cxled_dev = device_find_child(&endpoint->dev, NULL, find_free_decoder);
625 if (!cxled_dev)
626 cxled = ERR_PTR(-ENXIO);
627 else
628 cxled = to_cxl_endpoint_decoder(cxled_dev);
629
630 up_read(&cxl_dpa_rwsem);
631
632 if (IS_ERR(cxled))
633 return cxled;
634
635 if (is_ram)
636 mode = CXL_DECODER_RAM;
637 else
638 mode = CXL_DECODER_PMEM;
639
640 rc = cxl_dpa_set_mode(cxled, mode);
641 if (rc)
642 goto err;
643
644 down_read(&cxl_dpa_rwsem);
645 alloc = cxl_dpa_freespace(cxled, NULL, NULL);
646 up_read(&cxl_dpa_rwsem);
647
648 if (max)
649 alloc = min(max, alloc);
650 if (alloc < min) {
651 rc = -ENOMEM;
652 goto err;
653 }
654
655 rc = cxl_dpa_alloc(cxled, alloc);
656 if (rc)
657 goto err;
658
659 return cxled;
660 err:
661 put_device(cxled_dev);
662 return ERR_PTR(rc);
663 }
664 EXPORT_SYMBOL_NS_GPL(cxl_request_dpa, CXL);
665
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2024-07-16 3:32 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20240715172835.24757-11-alejandro.lucero-palau@amd.com>]
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=202407161159.KA2METLk-lkp@intel.com \
--to=lkp@intel.com \
--cc=alejandro.lucero-palau@amd.com \
--cc=alucerop@amd.com \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=edward.cree@amd.com \
--cc=kuba@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=martin.habets@xilinx.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=richard.hughes@amd.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox