* [linux-rt-devel:linux-5.9.y-rt-rebase 220/233] arch/powerpc/platforms/pseries/iommu.c:181:8: error: type defaults to 'int' in declaration of 'DEFINE_LOCAL_IRQ_LOCK'
@ 2020-10-15 20:28 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-10-15 20:28 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 9484 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.9.y-rt-rebase
head: ae29d238360226f2ec8d2531d96e64dc6901bf54
commit: e12a247d307d484a76032015c1fd9db09a898d26 [220/233] powerpc/pseries/iommu: Use a locallock instead local_irq_save()
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-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://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?id=e12a247d307d484a76032015c1fd9db09a898d26
git remote add linux-rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
git fetch --no-tags linux-rt-devel linux-5.9.y-rt-rebase
git checkout e12a247d307d484a76032015c1fd9db09a898d26
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
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 >>):
>> arch/powerpc/platforms/pseries/iommu.c:181:8: error: type defaults to 'int' in declaration of 'DEFINE_LOCAL_IRQ_LOCK' [-Werror=implicit-int]
181 | static DEFINE_LOCAL_IRQ_LOCK(tcp_page_lock);
| ^~~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/pseries/iommu.c:181:1: warning: parameter names (without types) in function declaration
181 | static DEFINE_LOCAL_IRQ_LOCK(tcp_page_lock);
| ^~~~~~
In file included from include/asm-generic/percpu.h:7,
from arch/powerpc/include/asm/percpu.h:18,
from include/linux/irqflags.h:17,
from include/linux/spinlock.h:54,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from arch/powerpc/platforms/pseries/iommu.c:15:
arch/powerpc/platforms/pseries/iommu.c: In function 'tce_buildmulti_pSeriesLP':
>> arch/powerpc/platforms/pseries/iommu.c:204:21: error: 'tcp_page_lock' undeclared (first use in this function)
204 | local_lock_irqsave(tcp_page_lock, flags);
| ^~~~~~~~~~~~~
include/linux/percpu-defs.h:219:47: note: in definition of macro '__verify_pcpu_ptr'
219 | const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
| ^~~
include/linux/percpu-defs.h:252:27: note: in expansion of macro 'raw_cpu_ptr'
252 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
include/linux/local_lock_internal.h:163:22: note: in expansion of macro 'this_cpu_ptr'
163 | local_lock_acquire(this_cpu_ptr(lock)); \
| ^~~~~~~~~~~~
include/linux/local_lock.h:31:2: note: in expansion of macro '__local_lock_irqsave'
31 | __local_lock_irqsave(lock, flags)
| ^~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/pseries/iommu.c:204:2: note: in expansion of macro 'local_lock_irqsave'
204 | local_lock_irqsave(tcp_page_lock, flags);
| ^~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/pseries/iommu.c:204:21: note: each undeclared identifier is reported only once for each function it appears in
204 | local_lock_irqsave(tcp_page_lock, flags);
| ^~~~~~~~~~~~~
include/linux/percpu-defs.h:219:47: note: in definition of macro '__verify_pcpu_ptr'
219 | const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
| ^~~
include/linux/percpu-defs.h:252:27: note: in expansion of macro 'raw_cpu_ptr'
252 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
include/linux/local_lock_internal.h:163:22: note: in expansion of macro 'this_cpu_ptr'
163 | local_lock_acquire(this_cpu_ptr(lock)); \
| ^~~~~~~~~~~~
include/linux/local_lock.h:31:2: note: in expansion of macro '__local_lock_irqsave'
31 | __local_lock_irqsave(lock, flags)
| ^~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/pseries/iommu.c:204:2: note: in expansion of macro 'local_lock_irqsave'
204 | local_lock_irqsave(tcp_page_lock, flags);
| ^~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/pseries/iommu.c: In function 'tce_setrange_multi_pSeriesLP':
arch/powerpc/platforms/pseries/iommu.c:422:17: error: 'tcp_page_lock' undeclared (first use in this function)
422 | local_lock_irq(tcp_page_lock);
| ^~~~~~~~~~~~~
include/linux/percpu-defs.h:219:47: note: in definition of macro '__verify_pcpu_ptr'
219 | const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
| ^~~
include/linux/percpu-defs.h:252:27: note: in expansion of macro 'raw_cpu_ptr'
252 | #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
| ^~~~~~~~~~~
include/linux/local_lock_internal.h:157:22: note: in expansion of macro 'this_cpu_ptr'
157 | local_lock_acquire(this_cpu_ptr(lock)); \
| ^~~~~~~~~~~~
include/linux/local_lock.h:22:31: note: in expansion of macro '__local_lock_irq'
22 | #define local_lock_irq(lock) __local_lock_irq(lock)
| ^~~~~~~~~~~~~~~~
arch/powerpc/platforms/pseries/iommu.c:422:2: note: in expansion of macro 'local_lock_irq'
422 | local_lock_irq(tcp_page_lock);
| ^~~~~~~~~~~~~~
arch/powerpc/platforms/pseries/iommu.c: At top level:
arch/powerpc/platforms/pseries/iommu.c:181:8: warning: 'DEFINE_LOCAL_IRQ_LOCK' declared 'static' but never defined [-Wunused-function]
181 | static DEFINE_LOCAL_IRQ_LOCK(tcp_page_lock);
| ^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +181 arch/powerpc/platforms/pseries/iommu.c
179
180 static DEFINE_PER_CPU(__be64 *, tce_page);
> 181 static DEFINE_LOCAL_IRQ_LOCK(tcp_page_lock);
182
183 static int tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
184 long npages, unsigned long uaddr,
185 enum dma_data_direction direction,
186 unsigned long attrs)
187 {
188 u64 rc = 0;
189 u64 proto_tce;
190 __be64 *tcep;
191 u64 rpn;
192 long l, limit;
193 long tcenum_start = tcenum, npages_start = npages;
194 int ret = 0;
195 unsigned long flags;
196
197 if ((npages == 1) || !firmware_has_feature(FW_FEATURE_PUT_TCE_IND)) {
198 return tce_build_pSeriesLP(tbl->it_index, tcenum,
199 tbl->it_page_shift, npages, uaddr,
200 direction, attrs);
201 }
202
203 /* to protect tcep and the page behind it */
> 204 local_lock_irqsave(tcp_page_lock, flags);
205
206 tcep = __this_cpu_read(tce_page);
207
208 /* This is safe to do since interrupts are off when we're called
209 * from iommu_alloc{,_sg}()
210 */
211 if (!tcep) {
212 tcep = (__be64 *)__get_free_page(GFP_ATOMIC);
213 /* If allocation fails, fall back to the loop implementation */
214 if (!tcep) {
215 local_unlock_irqrestore(tcp_page_lock, flags);
216 return tce_build_pSeriesLP(tbl->it_index, tcenum,
217 tbl->it_page_shift,
218 npages, uaddr, direction, attrs);
219 }
220 __this_cpu_write(tce_page, tcep);
221 }
222
223 rpn = __pa(uaddr) >> TCE_SHIFT;
224 proto_tce = TCE_PCI_READ;
225 if (direction != DMA_TO_DEVICE)
226 proto_tce |= TCE_PCI_WRITE;
227
228 /* We can map max one pageful of TCEs at a time */
229 do {
230 /*
231 * Set up the page with TCE data, looping through and setting
232 * the values.
233 */
234 limit = min_t(long, npages, 4096/TCE_ENTRY_SIZE);
235
236 for (l = 0; l < limit; l++) {
237 tcep[l] = cpu_to_be64(proto_tce | (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT);
238 rpn++;
239 }
240
241 rc = plpar_tce_put_indirect((u64)tbl->it_index,
242 (u64)tcenum << 12,
243 (u64)__pa(tcep),
244 limit);
245
246 npages -= limit;
247 tcenum += limit;
248 } while (npages > 0 && !rc);
249
250 local_unlock_irqrestore(tcp_page_lock, flags);
251
252 if (unlikely(rc == H_NOT_ENOUGH_RESOURCES)) {
253 ret = (int)rc;
254 tce_freemulti_pSeriesLP(tbl, tcenum_start,
255 (npages_start - (npages + limit)));
256 return ret;
257 }
258
259 if (rc && printk_ratelimit()) {
260 printk("tce_buildmulti_pSeriesLP: plpar_tce_put failed. rc=%lld\n", rc);
261 printk("\tindex = 0x%llx\n", (u64)tbl->it_index);
262 printk("\tnpages = 0x%llx\n", (u64)npages);
263 printk("\ttce[0] val = 0x%llx\n", tcep[0]);
264 dump_stack();
265 }
266 return ret;
267 }
268
---
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: 70405 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-15 20:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 20:28 [linux-rt-devel:linux-5.9.y-rt-rebase 220/233] arch/powerpc/platforms/pseries/iommu.c:181:8: error: type defaults to 'int' in declaration of 'DEFINE_LOCAL_IRQ_LOCK' kernel test robot
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.