From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v4 2/2] PCI: dwc: Fix MSI page leakage in suspend/resume
Date: Tue, 29 Sep 2020 20:56:30 +0800 [thread overview]
Message-ID: <202009292028.ChEcRYDF-lkp@intel.com> (raw)
In-Reply-To: <20200929183458.37f91a38@xhacker.debian>
[-- Attachment #1: Type: text/plain, Size: 3874 bytes --]
Hi Jisheng,
I love your patch! Perhaps something to improve:
[auto build test WARNING on v5.9-rc7]
[cannot apply to pci/next next-20200929]
[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/Jisheng-Zhang/PCI-dwc-fix-two-MSI-issues/20200929-183629
base: a1b8638ba1320e6684aa98233c15255eb803fac7
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/e7104054d08d424991118262205da4112c40fd37
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jisheng-Zhang/PCI-dwc-fix-two-MSI-issues/20200929-183629
git checkout e7104054d08d424991118262205da4112c40fd37
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/pci-dma-compat.h:8,
from include/linux/pci.h:2402,
from drivers/pci/controller/dwc/pci-dra7xx.c:21:
drivers/pci/controller/dwc/pci-dra7xx.c: In function 'dra7xx_pcie_msi_host_init':
>> drivers/pci/controller/dwc/pci-dra7xx.c:515:39: warning: passing argument 2 of 'dma_map_single_attrs' makes pointer from integer without a cast [-Wint-conversion]
515 | pp->msi_data = dma_map_single(dev, pp->msi_msg, sizeof(pp->msi_msg),
| ~~^~~~~~~~~
| |
| u16 {aka short unsigned int}
include/linux/dma-mapping.h:504:60: note: in definition of macro 'dma_map_single'
504 | #define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, 0)
| ^
include/linux/dma-mapping.h:392:73: note: expected 'void *' but argument is of type 'u16' {aka 'short unsigned int'}
392 | static inline dma_addr_t dma_map_single_attrs(struct device *dev, void *ptr,
| ~~~~~~^~~
vim +/dma_map_single_attrs +515 drivers/pci/controller/dwc/pci-dra7xx.c
489
490 static int dra7xx_pcie_msi_host_init(struct pcie_port *pp)
491 {
492 struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
493 struct device *dev = pci->dev;
494 u32 ctrl, num_ctrls;
495 int ret;
496
497 pp->msi_irq_chip = &dra7xx_pci_msi_bottom_irq_chip;
498
499 num_ctrls = pp->num_vectors / MAX_MSI_IRQS_PER_CTRL;
500 /* Initialize IRQ Status array */
501 for (ctrl = 0; ctrl < num_ctrls; ctrl++) {
502 pp->irq_mask[ctrl] = ~0;
503 dw_pcie_writel_dbi(pci, PCIE_MSI_INTR0_MASK +
504 (ctrl * MSI_REG_CTRL_BLOCK_SIZE),
505 pp->irq_mask[ctrl]);
506 dw_pcie_writel_dbi(pci, PCIE_MSI_INTR0_ENABLE +
507 (ctrl * MSI_REG_CTRL_BLOCK_SIZE),
508 ~0);
509 }
510
511 ret = dw_pcie_allocate_domains(pp);
512 if (ret)
513 return ret;
514
> 515 pp->msi_data = dma_map_single(dev, pp->msi_msg, sizeof(pp->msi_msg),
516 DMA_FROM_DEVICE);
517 ret = dma_mapping_error(dev, pp->msi_data);
518 if (ret) {
519 dev_err(dev, "Failed to map MSI data\n");
520 pp->msi_data = 0;
521 dw_pcie_free_msi(pp);
522 }
523 return ret;
524 }
525
---
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: 75876 bytes --]
prev parent reply other threads:[~2020-09-29 12:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-29 10:34 [PATCH v4 0/2] PCI: dwc: fix two MSI issues Jisheng Zhang
2020-09-29 10:34 ` Jisheng Zhang
2020-09-29 10:34 ` [PATCH v4 1/2] PCI: dwc: Skip PCIE_MSI_INTR0* programming if MSI is disabled Jisheng Zhang
2020-09-29 10:34 ` Jisheng Zhang
2020-09-29 10:34 ` [PATCH v4 2/2] PCI: dwc: Fix MSI page leakage in suspend/resume Jisheng Zhang
2020-09-29 10:34 ` Jisheng Zhang
2020-09-29 12:56 ` kernel test robot [this message]
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=202009292028.ChEcRYDF-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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.