tree:
git://git.infradead.org/users/hch/misc.git dma-bypass.5
head: 80ac26860d23173c1c10beeaf76f3f0cf23942f1
commit: 8e1e62260cf3e8f1255de8c5f65c633b5e54bb5c [7/9] dma-mapping: make support for dma
ops optional
config: i386-randconfig-a013-20200711 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout 8e1e62260cf3e8f1255de8c5f65c633b5e54bb5c
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/infiniband/core/device.c: In function 'setup_dma_device':
> drivers/infiniband/core/device.c:1186:17: error: 'struct
device' has no member named 'dma_ops'
1186 | if
(device->dev.dma_ops) {
| ^
vim +1186 drivers/infiniband/core/device.c
0df91bb67334ee Jason Gunthorpe 2019-02-06 1180
548cb4fbe80d68 Parav Pandit 2018-10-17 1181 static void setup_dma_device(struct
ib_device *device)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1182 {
99db9494035f5b Bart Van Assche 2017-01-20 1183 struct device *parent =
device->dev.parent;
99db9494035f5b Bart Van Assche 2017-01-20 1184
0957c29f78af7d Bart Van Assche 2017-03-07 1185 WARN_ON_ONCE(device->dma_device);
0957c29f78af7d Bart Van Assche 2017-03-07 @1186 if (device->dev.dma_ops) {
0957c29f78af7d Bart Van Assche 2017-03-07 1187 /*
0957c29f78af7d Bart Van Assche 2017-03-07 1188 * The caller provided custom DMA
operations. Copy the
0957c29f78af7d Bart Van Assche 2017-03-07 1189 * DMA-related fields that are used by
e.g. dma_alloc_coherent()
0957c29f78af7d Bart Van Assche 2017-03-07 1190 * into device->dev.
0957c29f78af7d Bart Van Assche 2017-03-07 1191 */
0957c29f78af7d Bart Van Assche 2017-03-07 1192 device->dma_device =
&device->dev;
02ee9da3478736 Bart Van Assche 2018-01-03 1193 if (!device->dev.dma_mask) {
02ee9da3478736 Bart Van Assche 2018-01-03 1194 if (parent)
99db9494035f5b Bart Van Assche 2017-01-20 1195 device->dev.dma_mask =
parent->dma_mask;
02ee9da3478736 Bart Van Assche 2018-01-03 1196 else
02ee9da3478736 Bart Van Assche 2018-01-03 1197 WARN_ON_ONCE(true);
02ee9da3478736 Bart Van Assche 2018-01-03 1198 }
02ee9da3478736 Bart Van Assche 2018-01-03 1199 if (!device->dev.coherent_dma_mask)
{
02ee9da3478736 Bart Van Assche 2018-01-03 1200 if (parent)
0957c29f78af7d Bart Van Assche 2017-03-07 1201 device->dev.coherent_dma_mask =
0957c29f78af7d Bart Van Assche 2017-03-07 1202 parent->coherent_dma_mask;
02ee9da3478736 Bart Van Assche 2018-01-03 1203 else
02ee9da3478736 Bart Van Assche 2018-01-03 1204 WARN_ON_ONCE(true);
02ee9da3478736 Bart Van Assche 2018-01-03 1205 }
0957c29f78af7d Bart Van Assche 2017-03-07 1206 } else {
0957c29f78af7d Bart Van Assche 2017-03-07 1207 /*
0957c29f78af7d Bart Van Assche 2017-03-07 1208 * The caller did not provide custom
DMA operations. Use the
0957c29f78af7d Bart Van Assche 2017-03-07 1209 * DMA mapping operations of the parent
device.
0957c29f78af7d Bart Van Assche 2017-03-07 1210 */
02ee9da3478736 Bart Van Assche 2018-01-03 1211 WARN_ON_ONCE(!parent);
0957c29f78af7d Bart Van Assche 2017-03-07 1212 device->dma_device = parent;
0957c29f78af7d Bart Van Assche 2017-03-07 1213 }
d10bcf947a3ea2 Shiraz Saleem 2019-04-02 1214
c9121262d57b8a Bart Van Assche 2019-10-25 1215 if (!device->dev.dma_parms) {
c9121262d57b8a Bart Van Assche 2019-10-25 1216 if (parent) {
c9121262d57b8a Bart Van Assche 2019-10-25 1217 /*
c9121262d57b8a Bart Van Assche 2019-10-25 1218 * The caller did not provide DMA
parameters, so
c9121262d57b8a Bart Van Assche 2019-10-25 1219 * 'parent' probably
represents a PCI device. The PCI
c9121262d57b8a Bart Van Assche 2019-10-25 1220 * core sets the maximum segment size
to 64
c9121262d57b8a Bart Van Assche 2019-10-25 1221 * KB. Increase this parameter to 2
GB.
c9121262d57b8a Bart Van Assche 2019-10-25 1222 */
c9121262d57b8a Bart Van Assche 2019-10-25 1223 device->dev.dma_parms =
parent->dma_parms;
c9121262d57b8a Bart Van Assche 2019-10-25 1224
dma_set_max_seg_size(device->dma_device, SZ_2G);
c9121262d57b8a Bart Van Assche 2019-10-25 1225 } else {
c9121262d57b8a Bart Van Assche 2019-10-25 1226 WARN_ON_ONCE(true);
c9121262d57b8a Bart Van Assche 2019-10-25 1227 }
c9121262d57b8a Bart Van Assche 2019-10-25 1228 }
e349f858d29f30 Jason Gunthorpe 2018-09-25 1229 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1230
:::::: The code at line 1186 was first introduced by commit
:::::: 0957c29f78af7d890c4ac506eda8f76bfc5a137a IB/core: Restore I/O MMU, s390 and powerpc
support
:::::: TO: Bart Van Assche <bart.vanassche(a)sandisk.com>
:::::: CC: Doug Ledford <dledford(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org