From: kernel test robot <lkp@intel.com>
To: Cai Huoqing <caihuoqing@baidu.com>
Cc: kbuild-all@lists.01.org, Tyrel Datwyler <tyreld@linux.ibm.com>,
linux-scsi@vger.kernel.org,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] scsi: ibmvscsi: Use dma_alloc_coherent() instead of get_zeroed_page/dma_map_single()
Date: Tue, 12 Oct 2021 14:12:04 +0800 [thread overview]
Message-ID: <202110121452.nWPHZeZg-lkp@intel.com> (raw)
In-Reply-To: <20211010160121.539-1-caihuoqing@baidu.com>
[-- Attachment #1: Type: text/plain, Size: 5081 bytes --]
Hi Cai,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on v5.15-rc5 next-20211011]
[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/Cai-Huoqing/scsi-ibmvscsi-Use-dma_alloc_coherent-instead-of-get_zeroed_page-dma_map_single/20211011-000515
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/a1533699f9b84980097fc59d047b5292c1abab1b
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Cai-Huoqing/scsi-ibmvscsi-Use-dma_alloc_coherent-instead-of-get_zeroed_page-dma_map_single/20211011-000515
git checkout a1533699f9b84980097fc59d047b5292c1abab1b
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc 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 >>):
drivers/scsi/ibmvscsi/ibmvscsi.c: In function 'ibmvscsi_init_crq_queue':
>> drivers/scsi/ibmvscsi/ibmvscsi.c:334:21: error: 'struct crq_queue' has no member named 'msg'; did you mean 'msgs'?
334 | if (!queue->msg)
| ^~~
| msgs
drivers/scsi/ibmvscsi/ibmvscsi.c:388:60: error: 'struct crq_queue' has no member named 'msg'; did you mean 'msgs'?
388 | dma_free_coherent(hostdata->dev, PAGE_SIZE, queue->msg, queue->msg_token);
| ^~~
| msgs
vim +334 drivers/scsi/ibmvscsi/ibmvscsi.c
312
313 /**
314 * ibmvscsi_init_crq_queue() - Initializes and registers CRQ with hypervisor
315 * @queue: crq_queue to initialize and register
316 * @hostdata: ibmvscsi_host_data of host
317 * @max_requests: maximum requests (unused)
318 *
319 * Allocates a page for messages, maps it for dma, and registers
320 * the crq with the hypervisor.
321 * Returns zero on success.
322 */
323 static int ibmvscsi_init_crq_queue(struct crq_queue *queue,
324 struct ibmvscsi_host_data *hostdata,
325 int max_requests)
326 {
327 int rc;
328 int retrc;
329 struct vio_dev *vdev = to_vio_dev(hostdata->dev);
330
331 queue->size = PAGE_SIZE / sizeof(*queue->msgs);
332 queue->msgs = dma_alloc_coherent(hostdata->dev, PAGE_SIZE,
333 &queue->msg_token, GFP_KERNEL);
> 334 if (!queue->msg)
335 goto malloc_failed;
336
337 gather_partition_info();
338 set_adapter_info(hostdata);
339
340 retrc = rc = plpar_hcall_norets(H_REG_CRQ,
341 vdev->unit_address,
342 queue->msg_token, PAGE_SIZE);
343 if (rc == H_RESOURCE)
344 /* maybe kexecing and resource is busy. try a reset */
345 rc = ibmvscsi_reset_crq_queue(queue,
346 hostdata);
347
348 if (rc == H_CLOSED) {
349 /* Adapter is good, but other end is not ready */
350 dev_warn(hostdata->dev, "Partner adapter not ready\n");
351 retrc = 0;
352 } else if (rc != 0) {
353 dev_warn(hostdata->dev, "Error %d opening adapter\n", rc);
354 goto reg_crq_failed;
355 }
356
357 queue->cur = 0;
358 spin_lock_init(&queue->lock);
359
360 tasklet_init(&hostdata->srp_task, (void *)ibmvscsi_task,
361 (unsigned long)hostdata);
362
363 if (request_irq(vdev->irq,
364 ibmvscsi_handle_event,
365 0, "ibmvscsi", (void *)hostdata) != 0) {
366 dev_err(hostdata->dev, "couldn't register irq 0x%x\n",
367 vdev->irq);
368 goto req_irq_failed;
369 }
370
371 rc = vio_enable_interrupts(vdev);
372 if (rc != 0) {
373 dev_err(hostdata->dev, "Error %d enabling interrupts!!!\n", rc);
374 goto req_irq_failed;
375 }
376
377 return retrc;
378
379 req_irq_failed:
380 tasklet_kill(&hostdata->srp_task);
381 rc = 0;
382 do {
383 if (rc)
384 msleep(100);
385 rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address);
386 } while ((rc == H_BUSY) || (H_IS_LONG_BUSY(rc)));
387 reg_crq_failed:
388 dma_free_coherent(hostdata->dev, PAGE_SIZE, queue->msg, queue->msg_token);
389 malloc_failed:
390 return -1;
391 }
392
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 74089 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Cai Huoqing <caihuoqing@baidu.com>
Cc: Tyrel Datwyler <tyreld@linux.ibm.com>,
kbuild-all@lists.01.org, linux-scsi@vger.kernel.org,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] scsi: ibmvscsi: Use dma_alloc_coherent() instead of get_zeroed_page/dma_map_single()
Date: Tue, 12 Oct 2021 14:12:04 +0800 [thread overview]
Message-ID: <202110121452.nWPHZeZg-lkp@intel.com> (raw)
In-Reply-To: <20211010160121.539-1-caihuoqing@baidu.com>
[-- Attachment #1: Type: text/plain, Size: 5081 bytes --]
Hi Cai,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on v5.15-rc5 next-20211011]
[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/Cai-Huoqing/scsi-ibmvscsi-Use-dma_alloc_coherent-instead-of-get_zeroed_page-dma_map_single/20211011-000515
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/a1533699f9b84980097fc59d047b5292c1abab1b
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Cai-Huoqing/scsi-ibmvscsi-Use-dma_alloc_coherent-instead-of-get_zeroed_page-dma_map_single/20211011-000515
git checkout a1533699f9b84980097fc59d047b5292c1abab1b
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc 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 >>):
drivers/scsi/ibmvscsi/ibmvscsi.c: In function 'ibmvscsi_init_crq_queue':
>> drivers/scsi/ibmvscsi/ibmvscsi.c:334:21: error: 'struct crq_queue' has no member named 'msg'; did you mean 'msgs'?
334 | if (!queue->msg)
| ^~~
| msgs
drivers/scsi/ibmvscsi/ibmvscsi.c:388:60: error: 'struct crq_queue' has no member named 'msg'; did you mean 'msgs'?
388 | dma_free_coherent(hostdata->dev, PAGE_SIZE, queue->msg, queue->msg_token);
| ^~~
| msgs
vim +334 drivers/scsi/ibmvscsi/ibmvscsi.c
312
313 /**
314 * ibmvscsi_init_crq_queue() - Initializes and registers CRQ with hypervisor
315 * @queue: crq_queue to initialize and register
316 * @hostdata: ibmvscsi_host_data of host
317 * @max_requests: maximum requests (unused)
318 *
319 * Allocates a page for messages, maps it for dma, and registers
320 * the crq with the hypervisor.
321 * Returns zero on success.
322 */
323 static int ibmvscsi_init_crq_queue(struct crq_queue *queue,
324 struct ibmvscsi_host_data *hostdata,
325 int max_requests)
326 {
327 int rc;
328 int retrc;
329 struct vio_dev *vdev = to_vio_dev(hostdata->dev);
330
331 queue->size = PAGE_SIZE / sizeof(*queue->msgs);
332 queue->msgs = dma_alloc_coherent(hostdata->dev, PAGE_SIZE,
333 &queue->msg_token, GFP_KERNEL);
> 334 if (!queue->msg)
335 goto malloc_failed;
336
337 gather_partition_info();
338 set_adapter_info(hostdata);
339
340 retrc = rc = plpar_hcall_norets(H_REG_CRQ,
341 vdev->unit_address,
342 queue->msg_token, PAGE_SIZE);
343 if (rc == H_RESOURCE)
344 /* maybe kexecing and resource is busy. try a reset */
345 rc = ibmvscsi_reset_crq_queue(queue,
346 hostdata);
347
348 if (rc == H_CLOSED) {
349 /* Adapter is good, but other end is not ready */
350 dev_warn(hostdata->dev, "Partner adapter not ready\n");
351 retrc = 0;
352 } else if (rc != 0) {
353 dev_warn(hostdata->dev, "Error %d opening adapter\n", rc);
354 goto reg_crq_failed;
355 }
356
357 queue->cur = 0;
358 spin_lock_init(&queue->lock);
359
360 tasklet_init(&hostdata->srp_task, (void *)ibmvscsi_task,
361 (unsigned long)hostdata);
362
363 if (request_irq(vdev->irq,
364 ibmvscsi_handle_event,
365 0, "ibmvscsi", (void *)hostdata) != 0) {
366 dev_err(hostdata->dev, "couldn't register irq 0x%x\n",
367 vdev->irq);
368 goto req_irq_failed;
369 }
370
371 rc = vio_enable_interrupts(vdev);
372 if (rc != 0) {
373 dev_err(hostdata->dev, "Error %d enabling interrupts!!!\n", rc);
374 goto req_irq_failed;
375 }
376
377 return retrc;
378
379 req_irq_failed:
380 tasklet_kill(&hostdata->srp_task);
381 rc = 0;
382 do {
383 if (rc)
384 msleep(100);
385 rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address);
386 } while ((rc == H_BUSY) || (H_IS_LONG_BUSY(rc)));
387 reg_crq_failed:
388 dma_free_coherent(hostdata->dev, PAGE_SIZE, queue->msg, queue->msg_token);
389 malloc_failed:
390 return -1;
391 }
392
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 74089 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] scsi: ibmvscsi: Use dma_alloc_coherent() instead of get_zeroed_page/dma_map_single()
Date: Tue, 12 Oct 2021 14:12:04 +0800 [thread overview]
Message-ID: <202110121452.nWPHZeZg-lkp@intel.com> (raw)
In-Reply-To: <20211010160121.539-1-caihuoqing@baidu.com>
[-- Attachment #1: Type: text/plain, Size: 5211 bytes --]
Hi Cai,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on v5.15-rc5 next-20211011]
[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/Cai-Huoqing/scsi-ibmvscsi-Use-dma_alloc_coherent-instead-of-get_zeroed_page-dma_map_single/20211011-000515
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/a1533699f9b84980097fc59d047b5292c1abab1b
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Cai-Huoqing/scsi-ibmvscsi-Use-dma_alloc_coherent-instead-of-get_zeroed_page-dma_map_single/20211011-000515
git checkout a1533699f9b84980097fc59d047b5292c1abab1b
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc 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 >>):
drivers/scsi/ibmvscsi/ibmvscsi.c: In function 'ibmvscsi_init_crq_queue':
>> drivers/scsi/ibmvscsi/ibmvscsi.c:334:21: error: 'struct crq_queue' has no member named 'msg'; did you mean 'msgs'?
334 | if (!queue->msg)
| ^~~
| msgs
drivers/scsi/ibmvscsi/ibmvscsi.c:388:60: error: 'struct crq_queue' has no member named 'msg'; did you mean 'msgs'?
388 | dma_free_coherent(hostdata->dev, PAGE_SIZE, queue->msg, queue->msg_token);
| ^~~
| msgs
vim +334 drivers/scsi/ibmvscsi/ibmvscsi.c
312
313 /**
314 * ibmvscsi_init_crq_queue() - Initializes and registers CRQ with hypervisor
315 * @queue: crq_queue to initialize and register
316 * @hostdata: ibmvscsi_host_data of host
317 * @max_requests: maximum requests (unused)
318 *
319 * Allocates a page for messages, maps it for dma, and registers
320 * the crq with the hypervisor.
321 * Returns zero on success.
322 */
323 static int ibmvscsi_init_crq_queue(struct crq_queue *queue,
324 struct ibmvscsi_host_data *hostdata,
325 int max_requests)
326 {
327 int rc;
328 int retrc;
329 struct vio_dev *vdev = to_vio_dev(hostdata->dev);
330
331 queue->size = PAGE_SIZE / sizeof(*queue->msgs);
332 queue->msgs = dma_alloc_coherent(hostdata->dev, PAGE_SIZE,
333 &queue->msg_token, GFP_KERNEL);
> 334 if (!queue->msg)
335 goto malloc_failed;
336
337 gather_partition_info();
338 set_adapter_info(hostdata);
339
340 retrc = rc = plpar_hcall_norets(H_REG_CRQ,
341 vdev->unit_address,
342 queue->msg_token, PAGE_SIZE);
343 if (rc == H_RESOURCE)
344 /* maybe kexecing and resource is busy. try a reset */
345 rc = ibmvscsi_reset_crq_queue(queue,
346 hostdata);
347
348 if (rc == H_CLOSED) {
349 /* Adapter is good, but other end is not ready */
350 dev_warn(hostdata->dev, "Partner adapter not ready\n");
351 retrc = 0;
352 } else if (rc != 0) {
353 dev_warn(hostdata->dev, "Error %d opening adapter\n", rc);
354 goto reg_crq_failed;
355 }
356
357 queue->cur = 0;
358 spin_lock_init(&queue->lock);
359
360 tasklet_init(&hostdata->srp_task, (void *)ibmvscsi_task,
361 (unsigned long)hostdata);
362
363 if (request_irq(vdev->irq,
364 ibmvscsi_handle_event,
365 0, "ibmvscsi", (void *)hostdata) != 0) {
366 dev_err(hostdata->dev, "couldn't register irq 0x%x\n",
367 vdev->irq);
368 goto req_irq_failed;
369 }
370
371 rc = vio_enable_interrupts(vdev);
372 if (rc != 0) {
373 dev_err(hostdata->dev, "Error %d enabling interrupts!!!\n", rc);
374 goto req_irq_failed;
375 }
376
377 return retrc;
378
379 req_irq_failed:
380 tasklet_kill(&hostdata->srp_task);
381 rc = 0;
382 do {
383 if (rc)
384 msleep(100);
385 rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address);
386 } while ((rc == H_BUSY) || (H_IS_LONG_BUSY(rc)));
387 reg_crq_failed:
388 dma_free_coherent(hostdata->dev, PAGE_SIZE, queue->msg, queue->msg_token);
389 malloc_failed:
390 return -1;
391 }
392
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 74089 bytes --]
next prev parent reply other threads:[~2021-10-12 6:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-10 16:01 [PATCH] scsi: ibmvscsi: Use dma_alloc_coherent() instead of get_zeroed_page/dma_map_single() Cai Huoqing
2021-10-10 16:01 ` Cai Huoqing
2021-10-12 6:12 ` kernel test robot [this message]
2021-10-12 6:12 ` kernel test robot
2021-10-12 6:12 ` kernel test robot
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=202110121452.nWPHZeZg-lkp@intel.com \
--to=lkp@intel.com \
--cc=caihuoqing@baidu.com \
--cc=jejb@linux.ibm.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=martin.petersen@oracle.com \
--cc=paulus@samba.org \
--cc=tyreld@linux.ibm.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 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.