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
Cc: oe-kbuild-all@lists.linux.dev, Alejandro Lucero <alucerop@amd.com>
Subject: Re: [PATCH v3 12/20] efx: use acquire_endpoint when looking for free HPA
Date: Sun, 8 Sep 2024 03:33:29 +0800 [thread overview]
Message-ID: <202409080317.xjZq1ABN-lkp@intel.com> (raw)
In-Reply-To: <20240907081836.5801-13-alejandro.lucero-palau@amd.com>
Hi,
kernel test robot noticed the following build warnings:
[auto build test WARNING on cxl/next]
[also build test WARNING on linus/master v6.11-rc6 next-20240906]
[cannot apply to 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/20240907-162231
base: https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git next
patch link: https://lore.kernel.org/r/20240907081836.5801-13-alejandro.lucero-palau%40amd.com
patch subject: [PATCH v3 12/20] efx: use acquire_endpoint when looking for free HPA
config: powerpc-ppc6xx_defconfig (https://download.01.org/0day-ci/archive/20240908/202409080317.xjZq1ABN-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 13.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240908/202409080317.xjZq1ABN-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/202409080317.xjZq1ABN-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/cxl/cxl.h:7,
from drivers/net/ethernet/sfc/efx_cxl.c:12:
drivers/net/ethernet/sfc/efx_cxl.c: In function 'efx_cxl_init':
>> drivers/net/ethernet/sfc/efx_cxl.c:114:34: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
114 | pci_err(pci_dev, "%s: no enough free HPA space %llu < %u\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:154:56: note: in expansion of macro 'dev_fmt'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
include/linux/pci.h:2679:41: note: in expansion of macro 'dev_err'
2679 | #define pci_err(pdev, fmt, arg...) dev_err(&(pdev)->dev, fmt, ##arg)
| ^~~~~~~
drivers/net/ethernet/sfc/efx_cxl.c:114:17: note: in expansion of macro 'pci_err'
114 | pci_err(pci_dev, "%s: no enough free HPA space %llu < %u\n",
| ^~~~~~~
drivers/net/ethernet/sfc/efx_cxl.c:114:67: note: format string is defined here
114 | pci_err(pci_dev, "%s: no enough free HPA space %llu < %u\n",
| ~~~^
| |
| long long unsigned int
| %u
vim +114 drivers/net/ethernet/sfc/efx_cxl.c
> 12 #include <linux/cxl/cxl.h>
13 #include <linux/cxl/pci.h>
14 #include <linux/pci.h>
15
16 #include "net_driver.h"
17 #include "efx_cxl.h"
18
19 #define EFX_CTPIO_BUFFER_SIZE (1024 * 1024 * 256)
20
21 int efx_cxl_init(struct efx_nic *efx)
22 {
23 struct pci_dev *pci_dev = efx->pci_dev;
24 struct efx_cxl *cxl;
25 struct resource res;
26 resource_size_t max;
27 u16 dvsec;
28 int rc;
29
30 efx->efx_cxl_pio_initialised = false;
31
32 dvsec = pci_find_dvsec_capability(pci_dev, PCI_VENDOR_ID_CXL,
33 CXL_DVSEC_PCIE_DEVICE);
34
35 if (!dvsec)
36 return 0;
37
38 pci_dbg(pci_dev, "CXL_DVSEC_PCIE_DEVICE capability found\n");
39
40 efx->cxl = kzalloc(sizeof(*cxl), GFP_KERNEL);
41 if (!efx->cxl)
42 return -ENOMEM;
43
44 cxl = efx->cxl;
45
46 cxl->cxlds = cxl_accel_state_create(&pci_dev->dev);
47 if (IS_ERR(cxl->cxlds)) {
48 pci_err(pci_dev, "CXL accel device state failed");
49 kfree(efx->cxl);
50 return -ENOMEM;
51 }
52
53 cxl_set_dvsec(cxl->cxlds, dvsec);
54 cxl_set_serial(cxl->cxlds, pci_dev->dev.id);
55
56 res = DEFINE_RES_MEM(0, EFX_CTPIO_BUFFER_SIZE);
57 if (cxl_set_resource(cxl->cxlds, res, CXL_ACCEL_RES_DPA)) {
58 pci_err(pci_dev, "cxl_set_resource DPA failed\n");
59 rc = -EINVAL;
60 goto err;
61 }
62
63 res = DEFINE_RES_MEM_NAMED(0, EFX_CTPIO_BUFFER_SIZE, "ram");
64 if (cxl_set_resource(cxl->cxlds, res, CXL_ACCEL_RES_RAM)) {
65 pci_err(pci_dev, "cxl_set_resource RAM failed\n");
66 rc = -EINVAL;
67 goto err;
68 }
69
70 rc = cxl_pci_accel_setup_regs(pci_dev, cxl->cxlds);
71 if (rc) {
72 pci_err(pci_dev, "CXL accel setup regs failed");
73 goto err;
74 }
75
76 rc = cxl_request_resource(cxl->cxlds, CXL_ACCEL_RES_RAM);
77 if (rc) {
78 pci_err(pci_dev, "CXL request resource failed");
79 goto err;
80 }
81
82 /* We do not have the register about media status. Hardware design
83 * implies it is ready.
84 */
85 cxl_set_media_ready(cxl->cxlds);
86
87 cxl->cxlmd = devm_cxl_add_memdev(&pci_dev->dev, cxl->cxlds);
88 if (IS_ERR(cxl->cxlmd)) {
89 pci_err(pci_dev, "CXL accel memdev creation failed");
90 rc = PTR_ERR(cxl->cxlmd);
91 goto err;
92 }
93
94 cxl->endpoint = cxl_acquire_endpoint(cxl->cxlmd);
95 if (IS_ERR(cxl->endpoint)) {
96 rc = PTR_ERR(cxl->endpoint);
97 if (rc != -EPROBE_DEFER) {
98 pci_err(pci_dev, "CXL accel acquire endpoint failed");
99 goto err;
100 }
101 }
102
103 cxl->cxlrd = cxl_get_hpa_freespace(cxl->endpoint,
104 CXL_DECODER_F_RAM | CXL_DECODER_F_TYPE2,
105 &max);
106
107 if (IS_ERR(cxl->cxlrd)) {
108 pci_err(pci_dev, "cxl_get_hpa_freespace failed\n");
109 rc = PTR_ERR(cxl->cxlrd);
110 goto err_release;
111 }
112
113 if (max < EFX_CTPIO_BUFFER_SIZE) {
> 114 pci_err(pci_dev, "%s: no enough free HPA space %llu < %u\n",
115 __func__, max, EFX_CTPIO_BUFFER_SIZE);
116 rc = -ENOSPC;
117 goto err;
118 }
119
120 cxl_release_endpoint(cxl->cxlmd, cxl->endpoint);
121
122 return 0;
123
124 err_release:
125 cxl_release_endpoint(cxl->cxlmd, cxl->endpoint);
126 err:
127 kfree(cxl->cxlds);
128 kfree(cxl);
129 efx->cxl = NULL;
130
131 return rc;
132 }
133
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-09-07 19:34 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-07 8:18 [PATCH v3 00/20] cxl: add Type2 device support alejandro.lucero-palau
2024-09-07 8:18 ` [PATCH v3 01/20] cxl: add type2 device basic support alejandro.lucero-palau
2024-09-07 20:26 ` kernel test robot
2024-09-10 6:12 ` Li, Ming4
2024-09-10 7:25 ` Alejandro Lucero Palau
2024-09-12 8:57 ` Zhi Wang
2024-09-16 9:52 ` Alejandro Lucero Palau
2024-09-12 9:35 ` Zhi Wang
2024-09-16 10:03 ` Alejandro Lucero Palau
2024-09-13 16:41 ` Jonathan Cameron
2024-09-16 12:03 ` Alejandro Lucero Palau
2024-09-16 12:24 ` Jonathan Cameron
2024-09-07 8:18 ` [PATCH v3 02/20] cxl: add capabilities field to cxl_dev_state and cxl_port alejandro.lucero-palau
2024-09-07 18:08 ` kernel test robot
2024-09-11 22:17 ` Dave Jiang
2024-09-16 8:36 ` Alejandro Lucero Palau
2024-09-16 16:07 ` Dave Jiang
2024-09-13 17:25 ` Jonathan Cameron
2024-09-16 12:13 ` Alejandro Lucero Palau
2024-09-07 8:18 ` [PATCH v3 03/20] cxl/pci: add check for validating capabilities alejandro.lucero-palau
2024-09-10 3:26 ` Li, Ming4
2024-09-10 6:24 ` Li, Ming4
2024-09-10 7:31 ` Alejandro Lucero Palau
2024-09-11 23:06 ` Dave Jiang
2024-09-16 8:56 ` Alejandro Lucero Palau
2024-09-16 16:11 ` Dave Jiang
2024-09-13 17:28 ` Jonathan Cameron
2024-09-16 12:17 ` Alejandro Lucero Palau
2024-09-07 8:18 ` [PATCH v3 04/20] cxl: move pci generic code alejandro.lucero-palau
2024-09-11 23:55 ` Dave Jiang
2024-09-16 9:46 ` Alejandro Lucero Palau
2024-09-07 8:18 ` [PATCH v3 05/20] cxl: add function for type2 cxl regs setup alejandro.lucero-palau
2024-09-10 6:00 ` Li, Ming4
2024-09-10 7:24 ` Alejandro Lucero Palau
2024-09-12 9:08 ` Zhi Wang
2024-09-13 17:32 ` Jonathan Cameron
2024-09-16 12:23 ` Alejandro Lucero Palau
2024-09-07 8:18 ` [PATCH v3 06/20] cxl: add functions for resource request/release by a driver alejandro.lucero-palau
2024-09-10 6:15 ` Li, Ming4
2024-09-16 8:15 ` Alejandro Lucero Palau
2024-09-13 17:35 ` Jonathan Cameron
2024-09-16 12:33 ` Alejandro Lucero Palau
2024-09-16 13:21 ` Jonathan Cameron
2024-09-07 8:18 ` [PATCH v3 07/20] cxl: harden resource_contains checks to handle zero size resources alejandro.lucero-palau
2024-09-13 17:36 ` Jonathan Cameron
2024-09-16 12:36 ` Alejandro Lucero Palau
2024-09-07 8:18 ` [PATCH v3 08/20] cxl: add function for setting media ready by a driver alejandro.lucero-palau
2024-09-07 8:18 ` [PATCH v3 09/20] cxl: support type2 memdev creation alejandro.lucero-palau
2024-09-12 18:19 ` Dave Jiang
2024-09-16 12:38 ` Alejandro Lucero Palau
2024-09-07 8:18 ` [PATCH v3 10/20] cxl: indicate probe deferral alejandro.lucero-palau
2024-09-10 6:37 ` Li, Ming4
2024-09-16 8:24 ` Alejandro Lucero Palau
2024-09-17 3:31 ` Li, Ming4
2024-09-17 9:16 ` Alejandro Lucero Palau
2024-09-12 9:19 ` Zhi Wang
2024-09-16 10:08 ` Alejandro Lucero Palau
2024-09-13 17:43 ` Jonathan Cameron
2024-09-16 13:24 ` Alejandro Lucero Palau
2024-09-07 8:18 ` [PATCH v3 11/20] cxl: define a driver interface for HPA free space enumaration alejandro.lucero-palau
2024-09-13 17:52 ` Jonathan Cameron
2024-09-16 14:09 ` Alejandro Lucero Palau
2024-09-07 8:18 ` [PATCH v3 12/20] efx: use acquire_endpoint when looking for free HPA alejandro.lucero-palau
2024-09-07 19:33 ` kernel test robot [this message]
2024-09-12 23:09 ` Dave Jiang
2024-09-16 10:29 ` Alejandro Lucero Palau
2024-09-07 8:18 ` [PATCH v3 13/20] cxl: define a driver interface for DPA allocation alejandro.lucero-palau
2024-09-13 17:59 ` Jonathan Cameron
2024-09-16 14:26 ` Alejandro Lucero Palau
2024-09-07 8:18 ` [PATCH v3 14/20] cxl: make region type based on endpoint type alejandro.lucero-palau
2024-09-07 8:18 ` [PATCH v3 15/20] cxl/region: factor out interleave ways setup alejandro.lucero-palau
2024-09-07 8:18 ` [PATCH v3 16/20] cxl/region: factor out interleave granularity setup alejandro.lucero-palau
2024-09-07 8:18 ` [PATCH v3 17/20] cxl: allow region creation by type2 drivers alejandro.lucero-palau
2024-09-13 18:08 ` Jonathan Cameron
2024-09-16 16:31 ` Alejandro Lucero Palau
2024-09-07 8:18 ` [PATCH v3 18/20] cxl: preclude device memory to be used for dax alejandro.lucero-palau
2024-09-13 17:26 ` Dave Jiang
2024-09-16 14:32 ` Alejandro Lucero Palau
2024-09-07 8:18 ` [PATCH v3 19/20] cxl: add function for obtaining params from a region alejandro.lucero-palau
2024-09-13 17:48 ` Dave Jiang
2024-09-16 16:22 ` Alejandro Lucero Palau
2024-09-07 8:18 ` [PATCH v3 20/20] efx: support pio mapping based on cxl alejandro.lucero-palau
2024-09-13 17:45 ` Edward Cree
2024-09-16 16:12 ` Alejandro Lucero Palau
2024-09-13 17:52 ` Dave Jiang
2024-09-16 16:23 ` Alejandro Lucero Palau
2024-09-13 18:10 ` Jonathan Cameron
2024-09-16 16:23 ` Alejandro Lucero Palau
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=202409080317.xjZq1ABN-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=martin.habets@xilinx.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).