From: kernel test robot <lkp@intel.com>
To: Hou Tao <houtao@huaweicloud.com>, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, linux-pci@vger.kernel.org,
linux-mm@kvack.org, linux-nvme@lists.infradead.org,
Bjorn Helgaas <helgaas@kernel.org>,
Logan Gunthorpe <logang@deltatee.com>,
Alistair Popple <apopple@nvidia.com>,
Leon Romanovsky <leonro@nvidia.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Tejun Heo <tj@kernel.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
houtao1@huawei.com
Subject: Re: [PATCH 12/13] nvme-pci: introduce cmb_devmap_align module parameter
Date: Sun, 21 Dec 2025 06:22:10 +0800 [thread overview]
Message-ID: <202512210635.b7EdhXBT-lkp@intel.com> (raw)
In-Reply-To: <20251220040446.274991-13-houtao@huaweicloud.com>
Hi Hou,
kernel test robot noticed the following build errors:
[auto build test ERROR on driver-core/driver-core-testing]
[also build test ERROR on driver-core/driver-core-next driver-core/driver-core-linus akpm-mm/mm-everything linus/master v6.19-rc1 next-20251219]
[cannot apply to pci/next pci/for-linus]
[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/Hou-Tao/PCI-P2PDMA-Release-the-per-cpu-ref-of-pgmap-when-vm_insert_page-fails/20251220-121804
base: driver-core/driver-core-testing
patch link: https://lore.kernel.org/r/20251220040446.274991-13-houtao%40huaweicloud.com
patch subject: [PATCH 12/13] nvme-pci: introduce cmb_devmap_align module parameter
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20251221/202512210635.b7EdhXBT-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251221/202512210635.b7EdhXBT-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/202512210635.b7EdhXBT-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/nvme/host/pci.c: In function 'nvme_map_cmb':
>> drivers/nvme/host/pci.c:2319:54: error: passing argument 1 of 'pci_p2pdma_max_pagemap_align' makes integer from pointer without a cast [-Wint-conversion]
2319 | align = pci_p2pdma_max_pagemap_align(pdev, bar, size, offset);
| ^~~~
| |
| struct pci_dev *
In file included from include/linux/blk-mq-dma.h:6,
from drivers/nvme/host/pci.c:10:
include/linux/pci-p2pdma.h:232:67: note: expected 'resource_size_t' {aka 'long long unsigned int'} but argument is of type 'struct pci_dev *'
232 | static inline size_t pci_p2pdma_max_pagemap_align(resource_size_t start,
| ~~~~~~~~~~~~~~~~^~~~~
>> drivers/nvme/host/pci.c:2319:25: error: too many arguments to function 'pci_p2pdma_max_pagemap_align'; expected 3, have 4
2319 | align = pci_p2pdma_max_pagemap_align(pdev, bar, size, offset);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
include/linux/pci-p2pdma.h:232:22: note: declared here
232 | static inline size_t pci_p2pdma_max_pagemap_align(resource_size_t start,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/pci_p2pdma_max_pagemap_align +2319 drivers/nvme/host/pci.c
2267
2268 static void nvme_map_cmb(struct nvme_dev *dev)
2269 {
2270 u64 size, offset;
2271 resource_size_t bar_size;
2272 struct pci_dev *pdev = to_pci_dev(dev->dev);
2273 size_t align;
2274 int bar;
2275
2276 if (dev->cmb_size)
2277 return;
2278
2279 if (NVME_CAP_CMBS(dev->ctrl.cap))
2280 writel(NVME_CMBMSC_CRE, dev->bar + NVME_REG_CMBMSC);
2281
2282 dev->cmbsz = readl(dev->bar + NVME_REG_CMBSZ);
2283 if (!dev->cmbsz)
2284 return;
2285 dev->cmbloc = readl(dev->bar + NVME_REG_CMBLOC);
2286
2287 size = nvme_cmb_size_unit(dev) * nvme_cmb_size(dev);
2288 offset = nvme_cmb_size_unit(dev) * NVME_CMB_OFST(dev->cmbloc);
2289 bar = NVME_CMB_BIR(dev->cmbloc);
2290 bar_size = pci_resource_len(pdev, bar);
2291
2292 if (offset > bar_size)
2293 return;
2294
2295 /*
2296 * Controllers may support a CMB size larger than their BAR, for
2297 * example, due to being behind a bridge. Reduce the CMB to the
2298 * reported size of the BAR
2299 */
2300 size = min(size, bar_size - offset);
2301
2302 if (!IS_ALIGNED(size, memremap_compat_align()) ||
2303 !IS_ALIGNED(pci_resource_start(pdev, bar),
2304 memremap_compat_align()))
2305 return;
2306
2307 /*
2308 * Tell the controller about the host side address mapping the CMB,
2309 * and enable CMB decoding for the NVMe 1.4+ scheme:
2310 */
2311 if (NVME_CAP_CMBS(dev->ctrl.cap)) {
2312 hi_lo_writeq(NVME_CMBMSC_CRE | NVME_CMBMSC_CMSE |
2313 (pci_bus_address(pdev, bar) + offset),
2314 dev->bar + NVME_REG_CMBMSC);
2315 }
2316
2317 align = cmb_devmap_align;
2318 if (!align)
> 2319 align = pci_p2pdma_max_pagemap_align(pdev, bar, size, offset);
2320 if (pci_p2pdma_add_resource(pdev, bar, size, align, offset)) {
2321 dev_warn(dev->ctrl.device,
2322 "failed to register the CMB\n");
2323 hi_lo_writeq(0, dev->bar + NVME_REG_CMBMSC);
2324 return;
2325 }
2326
2327 dev->cmb_size = size;
2328 dev->cmb_use_sqes = use_cmb_sqes && (dev->cmbsz & NVME_CMBSZ_SQS);
2329
2330 if ((dev->cmbsz & (NVME_CMBSZ_WDS | NVME_CMBSZ_RDS)) ==
2331 (NVME_CMBSZ_WDS | NVME_CMBSZ_RDS))
2332 pci_p2pmem_publish(pdev, true);
2333 }
2334
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-12-20 22:22 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-20 4:04 [PATCH 00/13] Enable compound page for p2pdma memory Hou Tao
2025-12-20 4:04 ` [PATCH 01/13] PCI/P2PDMA: Release the per-cpu ref of pgmap when vm_insert_page() fails Hou Tao
2025-12-22 16:49 ` Logan Gunthorpe
2026-01-08 3:23 ` Alistair Popple
2026-01-08 15:55 ` Bjorn Helgaas
2026-01-09 0:41 ` Alistair Popple
2026-01-09 15:03 ` Bjorn Helgaas
2026-01-11 23:21 ` Alistair Popple
2026-01-12 0:12 ` Alistair Popple
2026-01-12 0:23 ` Alistair Popple
2025-12-20 4:04 ` [PATCH 02/13] PCI/P2PDMA: Fix the warning condition in p2pmem_alloc_mmap() Hou Tao
2025-12-22 16:50 ` Logan Gunthorpe
2026-01-07 14:39 ` Christoph Hellwig
2026-01-07 17:17 ` Bjorn Helgaas
2026-01-07 20:34 ` Bjorn Helgaas
2026-01-08 10:17 ` Christoph Hellwig
2026-01-08 3:28 ` Alistair Popple
2025-12-20 4:04 ` [PATCH 03/13] kernfs: add support for get_unmapped_area callback Hou Tao
2025-12-20 15:43 ` kernel test robot
2025-12-20 15:57 ` kernel test robot
2025-12-20 4:04 ` [PATCH 04/13] kernfs: add support for may_split and pagesize callbacks Hou Tao
2025-12-20 4:04 ` [PATCH 05/13] sysfs: support get_unmapped_area callback for binary file Hou Tao
2025-12-20 4:04 ` [PATCH 06/13] PCI/P2PDMA: add align parameter for pci_p2pdma_add_resource() Hou Tao
2025-12-20 4:04 ` [PATCH 07/13] PCI/P2PDMA: create compound page for aligned p2pdma memory Hou Tao
2026-01-08 5:14 ` Alistair Popple
2025-12-20 4:04 ` [PATCH 08/13] mm/huge_memory: add helpers to insert huge page during mmap Hou Tao
2025-12-20 4:04 ` [PATCH 09/13] PCI/P2PDMA: support get_unmapped_area to return aligned vaddr Hou Tao
2025-12-20 4:04 ` [PATCH 10/13] PCI/P2PDMA: support compound page in p2pmem_alloc_mmap() Hou Tao
2025-12-22 17:04 ` Logan Gunthorpe
2025-12-24 2:20 ` Hou Tao
2026-01-05 17:24 ` Logan Gunthorpe
2026-01-07 20:24 ` Jason Gunthorpe
2026-01-07 21:22 ` Logan Gunthorpe
2026-01-08 5:20 ` Alistair Popple
2025-12-20 4:04 ` [PATCH 11/13] PCI/P2PDMA: add helper pci_p2pdma_max_pagemap_align() Hou Tao
2025-12-20 4:04 ` [PATCH 12/13] nvme-pci: introduce cmb_devmap_align module parameter Hou Tao
2025-12-20 22:22 ` kernel test robot [this message]
2025-12-20 4:04 ` [PATCH 13/13] PCI/P2PDMA: enable compound page support for p2pdma memory Hou Tao
2025-12-22 17:10 ` Logan Gunthorpe
2025-12-21 12:19 ` [PATCH 00/13] Enable compound page " Leon Romanovsky
[not found] ` <416b2575-f5e7-7faf-9e7c-6e9df170bf1a@huaweicloud.com>
2025-12-24 1:37 ` Hou Tao
2025-12-24 9:22 ` Leon Romanovsky
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=202512210635.b7EdhXBT-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=axboe@kernel.dk \
--cc=dakr@kernel.org \
--cc=david@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=helgaas@kernel.org \
--cc=houtao1@huawei.com \
--cc=houtao@huaweicloud.com \
--cc=kbusch@kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=lorenzo.stoakes@oracle.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rafael@kernel.org \
--cc=sagi@grimberg.me \
--cc=tj@kernel.org \
/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.