[PATCH v2 1/2] powerpc/npu: Use flush_all_mm() instead of flush_tlb_mm()
kbuild test robot
lkp at intel.com
Fri Sep 8 15:38:47 AEST 2017
Hi Alistair,
[auto build test ERROR on powerpc/next]
[also build test ERROR on next-20170907]
[cannot apply to v4.13]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Alistair-Popple/powerpc-npu-Use-flush_all_mm-instead-of-flush_tlb_mm/20170908-080828
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allmodconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc
All errors (new ones prefixed by >>):
arch/powerpc/platforms/powernv/npu-dma.c: In function 'mmio_invalidate':
>> arch/powerpc/platforms/powernv/npu-dma.c:552:2: error: implicit declaration of function 'flush_all_mm' [-Werror=implicit-function-declaration]
flush_all_mm(npu_context->mm);
^~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/flush_all_mm +552 arch/powerpc/platforms/powernv/npu-dma.c
533
534 /*
535 * Invalidate either a single address or an entire PID depending on
536 * the value of va.
537 */
538 static void mmio_invalidate(struct npu_context *npu_context, int va,
539 unsigned long address, bool flush)
540 {
541 int i, j;
542 struct npu *npu;
543 struct pnv_phb *nphb;
544 struct pci_dev *npdev;
545 struct mmio_atsd_reg mmio_atsd_reg[NV_MAX_NPUS];
546 unsigned long pid = npu_context->mm->context.id;
547
548 /*
549 * Unfortunately the nest mmu does not support flushing specific
550 * addresses so we have to flush the whole mm.
551 */
> 552 flush_all_mm(npu_context->mm);
553
554 /*
555 * Loop over all the NPUs this process is active on and launch
556 * an invalidate.
557 */
558 for (i = 0; i <= max_npu2_index; i++) {
559 mmio_atsd_reg[i].reg = -1;
560 for (j = 0; j < NV_MAX_LINKS; j++) {
561 npdev = npu_context->npdev[i][j];
562 if (!npdev)
563 continue;
564
565 nphb = pci_bus_to_host(npdev->bus)->private_data;
566 npu = &nphb->npu;
567 mmio_atsd_reg[i].npu = npu;
568
569 if (va)
570 mmio_atsd_reg[i].reg =
571 mmio_invalidate_va(npu, address, pid,
572 flush);
573 else
574 mmio_atsd_reg[i].reg =
575 mmio_invalidate_pid(npu, pid, flush);
576
577 /*
578 * The NPU hardware forwards the shootdown to all GPUs
579 * so we only have to launch one shootdown per NPU.
580 */
581 break;
582 }
583 }
584
585 mmio_invalidate_wait(mmio_atsd_reg, flush);
586 if (flush)
587 /* Wait for the flush to complete */
588 mmio_invalidate_wait(mmio_atsd_reg, false);
589 }
590
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 54017 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20170908/9ab7f6e3/attachment-0001.gz>
More information about the Linuxppc-dev
mailing list