From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [Intel-gfx] [PATCH v5 16/16] of: Add plumbing for restricted DMA pool
Date: Thu, 22 Apr 2021 23:09:25 +0800 [thread overview]
Message-ID: <202104222342.IjyWQX9p-lkp@intel.com> (raw)
In-Reply-To: <20210422081508.3942748-17-tientzu@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 6361 bytes --]
Hi Claire,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20210421]
[cannot apply to swiotlb/linux-next robh/for-next xen-tip/linux-next linus/master v5.12-rc8 v5.12-rc7 v5.12-rc6 v5.12-rc8]
[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/Claire-Chang/Restricted-DMA/20210422-161942
base: b74523885a715463203d4ccc3cf8c85952d3701a
config: s390-allmodconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.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/2c0a859fc4095e12d1119617c6fd60037cfde731
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Claire-Chang/Restricted-DMA/20210422-161942
git checkout 2c0a859fc4095e12d1119617c6fd60037cfde731
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=s390
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/of/device.c: In function 'of_dma_configure_id':
>> drivers/of/device.c:169:10: error: implicit declaration of function 'of_dma_set_restricted_buffer'; did you mean 'of_dma_get_restricted_buffer'? [-Werror=implicit-function-declaration]
169 | return of_dma_set_restricted_buffer(dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| of_dma_get_restricted_buffer
cc1: some warnings being treated as errors
vim +169 drivers/of/device.c
54
55 /**
56 * of_dma_configure_id - Setup DMA configuration
57 * @dev: Device to apply DMA configuration
58 * @np: Pointer to OF node having DMA configuration
59 * @force_dma: Whether device is to be set up by of_dma_configure() even if
60 * DMA capability is not explicitly described by firmware.
61 * @id: Optional const pointer value input id
62 *
63 * Try to get devices's DMA configuration from DT and update it
64 * accordingly.
65 *
66 * If platform code needs to use its own special DMA configuration, it
67 * can use a platform bus notifier and handle BUS_NOTIFY_ADD_DEVICE events
68 * to fix up DMA configuration.
69 */
70 int of_dma_configure_id(struct device *dev, struct device_node *np,
71 bool force_dma, const u32 *id)
72 {
73 const struct iommu_ops *iommu;
74 const struct bus_dma_region *map = NULL;
75 u64 dma_start = 0;
76 u64 mask, end, size = 0;
77 bool coherent;
78 int ret;
79
80 ret = of_dma_get_range(np, &map);
81 if (ret < 0) {
82 /*
83 * For legacy reasons, we have to assume some devices need
84 * DMA configuration regardless of whether "dma-ranges" is
85 * correctly specified or not.
86 */
87 if (!force_dma)
88 return ret == -ENODEV ? 0 : ret;
89 } else {
90 const struct bus_dma_region *r = map;
91 u64 dma_end = 0;
92
93 /* Determine the overall bounds of all DMA regions */
94 for (dma_start = ~0; r->size; r++) {
95 /* Take lower and upper limits */
96 if (r->dma_start < dma_start)
97 dma_start = r->dma_start;
98 if (r->dma_start + r->size > dma_end)
99 dma_end = r->dma_start + r->size;
100 }
101 size = dma_end - dma_start;
102
103 /*
104 * Add a work around to treat the size as mask + 1 in case
105 * it is defined in DT as a mask.
106 */
107 if (size & 1) {
108 dev_warn(dev, "Invalid size 0x%llx for dma-range(s)\n",
109 size);
110 size = size + 1;
111 }
112
113 if (!size) {
114 dev_err(dev, "Adjusted size 0x%llx invalid\n", size);
115 kfree(map);
116 return -EINVAL;
117 }
118 }
119
120 /*
121 * If @dev is expected to be DMA-capable then the bus code that created
122 * it should have initialised its dma_mask pointer by this point. For
123 * now, we'll continue the legacy behaviour of coercing it to the
124 * coherent mask if not, but we'll no longer do so quietly.
125 */
126 if (!dev->dma_mask) {
127 dev_warn(dev, "DMA mask not set\n");
128 dev->dma_mask = &dev->coherent_dma_mask;
129 }
130
131 if (!size && dev->coherent_dma_mask)
132 size = max(dev->coherent_dma_mask, dev->coherent_dma_mask + 1);
133 else if (!size)
134 size = 1ULL << 32;
135
136 /*
137 * Limit coherent and dma mask based on size and default mask
138 * set by the driver.
139 */
140 end = dma_start + size - 1;
141 mask = DMA_BIT_MASK(ilog2(end) + 1);
142 dev->coherent_dma_mask &= mask;
143 *dev->dma_mask &= mask;
144 /* ...but only set bus limit and range map if we found valid dma-ranges earlier */
145 if (!ret) {
146 dev->bus_dma_limit = end;
147 dev->dma_range_map = map;
148 }
149
150 coherent = of_dma_is_coherent(np);
151 dev_dbg(dev, "device is%sdma coherent\n",
152 coherent ? " " : " not ");
153
154 iommu = of_iommu_configure(dev, np, id);
155 if (PTR_ERR(iommu) == -EPROBE_DEFER) {
156 /* Don't touch range map if it wasn't set from a valid dma-ranges */
157 if (!ret)
158 dev->dma_range_map = NULL;
159 kfree(map);
160 return -EPROBE_DEFER;
161 }
162
163 dev_dbg(dev, "device is%sbehind an iommu\n",
164 iommu ? " " : " not ");
165
166 arch_setup_dma_ops(dev, dma_start, size, iommu, coherent);
167
168 if (!iommu)
> 169 return of_dma_set_restricted_buffer(dev);
170
171 return 0;
172 }
173 EXPORT_SYMBOL_GPL(of_dma_configure_id);
174
---
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: 28485 bytes --]
next prev parent reply other threads:[~2021-04-22 15:09 UTC|newest]
Thread overview: 182+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 8:14 [PATCH v5 00/16] Restricted DMA Claire Chang
2021-04-22 8:14 ` [Intel-gfx] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` [Nouveau] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` [PATCH v5 01/16] swiotlb: Fix the type of index Claire Chang
2021-04-22 8:14 ` [Intel-gfx] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` [Nouveau] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-23 7:11 ` Christoph Hellwig
2021-04-23 7:11 ` [Intel-gfx] " Christoph Hellwig
2021-04-23 7:11 ` Christoph Hellwig
2021-04-23 7:11 ` [Nouveau] " Christoph Hellwig
2021-04-23 7:11 ` Christoph Hellwig
2021-04-22 8:14 ` [PATCH v5 02/16] swiotlb: Refactor swiotlb init functions Claire Chang
2021-04-22 8:14 ` [Intel-gfx] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` [Nouveau] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` [PATCH v5 03/16] swiotlb: Refactor swiotlb_create_debugfs Claire Chang
2021-04-22 8:14 ` [Intel-gfx] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` [Nouveau] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` [PATCH v5 04/16] swiotlb: Add DMA_RESTRICTED_POOL Claire Chang
2021-04-22 8:14 ` [Intel-gfx] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` [Nouveau] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` [PATCH v5 05/16] swiotlb: Add restricted DMA pool initialization Claire Chang
2021-04-22 8:14 ` [Intel-gfx] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` [Nouveau] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-23 11:34 ` Steven Price
2021-04-23 11:34 ` [Intel-gfx] " Steven Price
2021-04-23 11:34 ` Steven Price
2021-04-23 11:34 ` Steven Price
2021-04-23 11:34 ` [Nouveau] " Steven Price
2021-04-23 11:34 ` Steven Price
2021-04-26 16:37 ` Claire Chang
2021-04-26 16:37 ` Claire Chang
2021-04-26 16:37 ` [Intel-gfx] " Claire Chang
2021-04-26 16:37 ` Claire Chang
2021-04-26 16:37 ` Claire Chang
2021-04-26 16:37 ` [Nouveau] " Claire Chang
2021-04-26 16:37 ` Claire Chang
2021-04-28 9:50 ` Steven Price
2021-04-28 9:50 ` [Intel-gfx] " Steven Price
2021-04-28 9:50 ` Steven Price
2021-04-28 9:50 ` Steven Price
2021-04-28 9:50 ` [Nouveau] " Steven Price
2021-04-28 9:50 ` Steven Price
2021-04-22 8:14 ` [PATCH v5 06/16] swiotlb: Add a new get_io_tlb_mem getter Claire Chang
2021-04-22 8:14 ` [Intel-gfx] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` [Nouveau] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` [PATCH v5 07/16] swiotlb: Update is_swiotlb_buffer to add a struct device argument Claire Chang
2021-04-22 8:14 ` [Intel-gfx] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:14 ` [Nouveau] " Claire Chang
2021-04-22 8:14 ` Claire Chang
2021-04-22 8:15 ` [PATCH v5 08/16] swiotlb: Update is_swiotlb_active " Claire Chang
2021-04-22 8:15 ` [Intel-gfx] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` [Nouveau] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-23 13:31 ` Robin Murphy
2021-04-23 13:31 ` [Intel-gfx] " Robin Murphy
2021-04-23 13:31 ` Robin Murphy
2021-04-23 13:31 ` Robin Murphy
2021-04-23 13:31 ` [Nouveau] " Robin Murphy
2021-04-23 13:31 ` Robin Murphy
2021-04-26 16:37 ` Claire Chang
2021-04-26 16:37 ` Claire Chang
2021-04-26 16:37 ` [Intel-gfx] " Claire Chang
2021-04-26 16:37 ` Claire Chang
2021-04-26 16:37 ` Claire Chang
2021-04-26 16:37 ` [Nouveau] " Claire Chang
2021-04-26 16:37 ` Claire Chang
2021-04-22 8:15 ` [PATCH v5 09/16] swiotlb: Bounce data from/to restricted DMA pool if available Claire Chang
2021-04-22 8:15 ` [Intel-gfx] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` [Nouveau] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` [PATCH v5 10/16] swiotlb: Move alloc_size to find_slots Claire Chang
2021-04-22 8:15 ` [Intel-gfx] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` [Nouveau] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` [PATCH v5 11/16] swiotlb: Refactor swiotlb_tbl_unmap_single Claire Chang
2021-04-22 8:15 ` [Intel-gfx] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` [Nouveau] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` [PATCH v5 12/16] dma-direct: Add a new wrapper __dma_direct_free_pages() Claire Chang
2021-04-22 8:15 ` [Intel-gfx] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` [Nouveau] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` [PATCH v5 13/16] swiotlb: Add restricted DMA alloc/free support Claire Chang
2021-04-22 8:15 ` [Intel-gfx] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` [Nouveau] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` [PATCH v5 14/16] dma-direct: Allocate memory from restricted DMA pool if available Claire Chang
2021-04-22 8:15 ` [Intel-gfx] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` [Nouveau] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-23 13:46 ` Robin Murphy
2021-04-23 13:46 ` [Intel-gfx] " Robin Murphy
2021-04-23 13:46 ` Robin Murphy
2021-04-23 13:46 ` Robin Murphy
2021-04-23 13:46 ` [Nouveau] " Robin Murphy
2021-04-23 13:46 ` Robin Murphy
2021-05-03 14:26 ` Claire Chang
2021-05-03 14:26 ` Claire Chang
2021-05-03 14:26 ` [Intel-gfx] " Claire Chang
2021-05-03 14:26 ` Claire Chang
2021-05-03 14:26 ` Claire Chang
2021-05-03 14:26 ` [Nouveau] " Claire Chang
2021-05-03 14:26 ` Claire Chang
2021-04-22 8:15 ` [PATCH v5 15/16] dt-bindings: of: Add restricted DMA pool Claire Chang
2021-04-22 8:15 ` [Intel-gfx] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` [Nouveau] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` [PATCH v5 16/16] of: Add plumbing for " Claire Chang
2021-04-22 8:15 ` [Intel-gfx] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 8:15 ` [Nouveau] " Claire Chang
2021-04-22 8:15 ` Claire Chang
2021-04-22 12:11 ` [Intel-gfx] " kernel test robot
2021-04-22 15:09 ` kernel test robot [this message]
2021-04-23 2:52 ` Claire Chang
2021-04-23 2:52 ` Claire Chang
2021-04-23 2:52 ` [Intel-gfx] " Claire Chang
2021-04-23 2:52 ` Claire Chang
2021-04-23 2:52 ` Claire Chang
2021-04-23 2:52 ` [Nouveau] " Claire Chang
2021-04-23 2:52 ` Claire Chang
2021-04-23 13:35 ` Robin Murphy
2021-04-23 13:35 ` [Intel-gfx] " Robin Murphy
2021-04-23 13:35 ` Robin Murphy
2021-04-23 13:35 ` Robin Murphy
2021-04-23 13:35 ` [Nouveau] " Robin Murphy
2021-04-23 13:35 ` Robin Murphy
2021-04-26 16:38 ` Claire Chang
2021-04-26 16:38 ` Claire Chang
2021-04-26 16:38 ` [Intel-gfx] " Claire Chang
2021-04-26 16:38 ` Claire Chang
2021-04-26 16:38 ` Claire Chang
2021-04-26 16:38 ` [Nouveau] " Claire Chang
2021-04-26 16:38 ` Claire Chang
2021-04-22 9:37 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Restricted DMA Patchwork
2021-05-10 9:53 ` [PATCH v5 00/16] " Claire Chang
2021-05-10 9:53 ` Claire Chang
2021-05-10 9:53 ` [Intel-gfx] " Claire Chang
2021-05-10 9:53 ` Claire Chang
2021-05-10 9:53 ` Claire Chang
2021-05-10 9:53 ` [Nouveau] " Claire Chang
2021-05-10 9:53 ` Claire Chang
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=202104222342.IjyWQX9p-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.