From: kernel test robot <lkp@intel.com>
To: Douglas Gilbert <dgilbert@interlog.com>,
linux-scsi@vger.kernel.org, linux-block@vger.kernel.org
Cc: kbuild-all@lists.01.org, martin.petersen@oracle.com,
jejb@linux.vnet.ibm.com, hare@suse.de, bvanassche@acm.org,
Jason Gunthorpe <jgg@ziepe.ca>,
Bodo Stroesser <bostroesser@gmail.com>
Subject: Re: [PATCH v7 1/4] sgl_alloc_order: remove 4 GiB limit
Date: Tue, 1 Feb 2022 21:46:18 +0800 [thread overview]
Message-ID: <202202012125.JGVcLupw-lkp@intel.com> (raw)
In-Reply-To: <20220201034915.183117-2-dgilbert@interlog.com>
Hi Douglas,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.17-rc2 next-20220131]
[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]
url: https://github.com/0day-ci/linux/commits/Douglas-Gilbert/scatterlist-add-new-capabilities/20220201-115047
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 26291c54e111ff6ba87a164d85d4a4e134b7315c
config: i386-randconfig-a003-20220131 (https://download.01.org/0day-ci/archive/20220201/202202012125.JGVcLupw-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/be1e80a043970c400c00709be739ab26f931331a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Douglas-Gilbert/scatterlist-add-new-capabilities/20220201-115047
git checkout be1e80a043970c400c00709be739ab26f931331a
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
ld: lib/scatterlist.o: in function `sgl_alloc_order':
>> lib/scatterlist.c:612: undefined reference to `__udivdi3'
vim +612 lib/scatterlist.c
586
587 /**
588 * sgl_alloc_order - allocate a scatterlist with equally sized elements each
589 * of which has 2^@order continuous pages
590 * @length: Length in bytes of the scatterlist. Must be at least one
591 * @order: Second argument for alloc_pages(). Each sgl element size will
592 * be (PAGE_SIZE*2^@order) bytes. @order must not exceed 16.
593 * @chainable: Whether or not to allocate an extra element in the scatterlist
594 * for scatterlist chaining purposes
595 * @gfp: Memory allocation flags
596 * @nent_p: [out] Number of entries in the scatterlist that have pages.
597 * Ignored if @nent_p is NULL.
598 *
599 * Returns: A pointer to an initialized scatterlist or %NULL upon failure.
600 */
601 struct scatterlist *sgl_alloc_order(unsigned long long length,
602 unsigned int order, bool chainable,
603 gfp_t gfp, unsigned int *nent_p)
604 {
605 struct scatterlist *sgl, *sg;
606 struct page *page;
607 unsigned int nent, nalloc;
608 u32 elem_len;
609
610 if (length >> (PAGE_SHIFT + order) >= UINT_MAX)
611 return NULL;
> 612 nent = DIV_ROUND_UP(length, PAGE_SIZE << order);
613
614 if (chainable) {
615 if (check_add_overflow(nent, 1U, &nalloc))
616 return NULL;
617 } else {
618 nalloc = nent;
619 }
620 sgl = kmalloc_array(nalloc, sizeof(struct scatterlist),
621 gfp & ~GFP_DMA);
622 if (!sgl)
623 return NULL;
624
625 sg_init_table(sgl, nalloc);
626 sg = sgl;
627 while (length) {
628 elem_len = min_t(u64, length, PAGE_SIZE << order);
629 page = alloc_pages(gfp, order);
630 if (!page) {
631 sgl_free_order(sgl, order);
632 return NULL;
633 }
634
635 sg_set_page(sg, page, elem_len, 0);
636 length -= elem_len;
637 sg = sg_next(sg);
638 }
639 WARN_ONCE(length, "length = %lld\n", length);
640 if (nent_p)
641 *nent_p = nent;
642 return sgl;
643 }
644 EXPORT_SYMBOL(sgl_alloc_order);
645
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next prev parent reply other threads:[~2022-02-01 13:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-01 3:49 [PATCH v7 0/4] scatterlist: add new capabilities Douglas Gilbert
2022-02-01 3:49 ` [PATCH v7 1/4] sgl_alloc_order: remove 4 GiB limit Douglas Gilbert
2022-02-01 12:36 ` Jason Gunthorpe
2022-02-01 13:46 ` kernel test robot [this message]
2022-02-01 3:49 ` [PATCH v7 2/4] scatterlist: add sgl_copy_sgl() function Douglas Gilbert
2022-02-01 3:49 ` [PATCH v7 3/4] scatterlist: add sgl_equal_sgl() function Douglas Gilbert
2022-02-01 3:49 ` [PATCH v7 4/4] scatterlist: add sgl_memset() Douglas Gilbert
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=202202012125.JGVcLupw-lkp@intel.com \
--to=lkp@intel.com \
--cc=bostroesser@gmail.com \
--cc=bvanassche@acm.org \
--cc=dgilbert@interlog.com \
--cc=hare@suse.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=jgg@ziepe.ca \
--cc=kbuild-all@lists.01.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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).