From: kernel test robot <lkp@intel.com>
To: Zhu Lingshan <lingshan.zhu@intel.com>,
jasowang@redhat.com, mst@redhat.com
Cc: kbuild-all@lists.01.org,
virtualization@lists.linux-foundation.org,
netdev@vger.kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Zhu Lingshan <lingshan.zhu@intel.com>
Subject: Re: [PATCH 1/2] vDPA/ifcvf: record virtio notify base
Date: Wed, 28 Apr 2021 19:48:54 +0800 [thread overview]
Message-ID: <202104281949.sBWGBRFf-lkp@intel.com> (raw)
In-Reply-To: <20210428082133.6766-2-lingshan.zhu@intel.com>
[-- Attachment #1: Type: text/plain, Size: 4303 bytes --]
Hi Zhu,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.12 next-20210428]
[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/Zhu-Lingshan/vDPA-ifcvf-implement-doorbell-mapping-feature/20210428-162843
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git acd3d28594536e9096c1ea76c5867d8a68babef6
config: x86_64-randconfig-s022-20210428 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/0day-ci/linux/commit/79474dca6dd202684180ad6ea88b5f73fc4a87c2
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Zhu-Lingshan/vDPA-ifcvf-implement-doorbell-mapping-feature/20210428-162843
git checkout 79474dca6dd202684180ad6ea88b5f73fc4a87c2
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/vdpa/ifcvf/ifcvf_base.c:136:80: sparse: sparse: restricted __le32 degrades to integer
vim +136 drivers/vdpa/ifcvf/ifcvf_base.c
98
99 int ifcvf_init_hw(struct ifcvf_hw *hw, struct pci_dev *pdev)
100 {
101 struct virtio_pci_cap cap;
102 u16 notify_off;
103 int ret;
104 u8 pos;
105 u32 i;
106
107 ret = pci_read_config_byte(pdev, PCI_CAPABILITY_LIST, &pos);
108 if (ret < 0) {
109 IFCVF_ERR(pdev, "Failed to read PCI capability list\n");
110 return -EIO;
111 }
112
113 while (pos) {
114 ret = ifcvf_read_config_range(pdev, (u32 *)&cap,
115 sizeof(cap), pos);
116 if (ret < 0) {
117 IFCVF_ERR(pdev,
118 "Failed to get PCI capability at %x\n", pos);
119 break;
120 }
121
122 if (cap.cap_vndr != PCI_CAP_ID_VNDR)
123 goto next;
124
125 switch (cap.cfg_type) {
126 case VIRTIO_PCI_CAP_COMMON_CFG:
127 hw->common_cfg = get_cap_addr(hw, &cap);
128 IFCVF_DBG(pdev, "hw->common_cfg = %p\n",
129 hw->common_cfg);
130 break;
131 case VIRTIO_PCI_CAP_NOTIFY_CFG:
132 pci_read_config_dword(pdev, pos + sizeof(cap),
133 &hw->notify_off_multiplier);
134 hw->notify_bar = cap.bar;
135 hw->notify_base = get_cap_addr(hw, &cap);
> 136 hw->notify_pa = pci_resource_start(pdev, cap.bar) + cap.offset;
137 IFCVF_DBG(pdev, "hw->notify_base = %p\n",
138 hw->notify_base);
139 break;
140 case VIRTIO_PCI_CAP_ISR_CFG:
141 hw->isr = get_cap_addr(hw, &cap);
142 IFCVF_DBG(pdev, "hw->isr = %p\n", hw->isr);
143 break;
144 case VIRTIO_PCI_CAP_DEVICE_CFG:
145 hw->net_cfg = get_cap_addr(hw, &cap);
146 IFCVF_DBG(pdev, "hw->net_cfg = %p\n", hw->net_cfg);
147 break;
148 }
149
150 next:
151 pos = cap.cap_next;
152 }
153
154 if (hw->common_cfg == NULL || hw->notify_base == NULL ||
155 hw->isr == NULL || hw->net_cfg == NULL) {
156 IFCVF_ERR(pdev, "Incomplete PCI capabilities\n");
157 return -EIO;
158 }
159
160 for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) {
161 ifc_iowrite16(i, &hw->common_cfg->queue_select);
162 notify_off = ifc_ioread16(&hw->common_cfg->queue_notify_off);
163 hw->vring[i].notify_addr = hw->notify_base +
164 notify_off * hw->notify_off_multiplier;
165 }
166
167 hw->lm_cfg = hw->base[IFCVF_LM_BAR];
168
169 IFCVF_DBG(pdev,
170 "PCI capability mapping: common cfg: %p, notify base: %p\n, isr cfg: %p, device cfg: %p, multiplier: %u\n",
171 hw->common_cfg, hw->notify_base, hw->isr,
172 hw->net_cfg, hw->notify_off_multiplier);
173
174 return 0;
175 }
176
---
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: 31685 bytes --]
next prev parent reply other threads:[~2021-04-28 11:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-28 8:21 [PATCH 0/2] vDPA/ifcvf: implement doorbell mapping feature Zhu Lingshan
2021-04-28 8:21 ` [PATCH 1/2] vDPA/ifcvf: record virtio notify base Zhu Lingshan
2021-04-28 8:39 ` Jason Wang
2021-04-28 10:00 ` Zhu, Lingshan
2021-04-28 10:09 ` Jason Wang
2021-04-28 10:18 ` Zhu, Lingshan
2021-04-28 11:48 ` kernel test robot [this message]
2021-04-28 8:21 ` [PATCH 2/2] vDPA/ifcvf: implement doorbell mapping for ifcvf Zhu Lingshan
2021-04-28 8:42 ` Jason Wang
2021-04-28 8:59 ` Zhu, Lingshan
2021-04-28 9:21 ` Jason Wang
2021-04-28 9:56 ` Zhu, Lingshan
2021-04-28 10:03 ` Jason Wang
2021-04-28 10:20 ` Zhu, Lingshan
2021-04-28 13:08 ` Jason Wang
2021-04-29 11:26 ` Zhu, Lingshan
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=202104281949.sBWGBRFf-lkp@intel.com \
--to=lkp@intel.com \
--cc=jasowang@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=kvm@vger.kernel.org \
--cc=lingshan.zhu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.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 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).