linux_dsm_epyc7002/drivers/vfio/pci/trace.h
Masahiro Yamada d1fc1176c0 vfio/pci: set TRACE_INCLUDE_PATH to fix the build error
drivers/vfio/pci/vfio_pci_nvlink2.c cannot be compiled for in-tree
building.

    CC      drivers/vfio/pci/vfio_pci_nvlink2.o
  In file included from drivers/vfio/pci/trace.h:102,
                   from drivers/vfio/pci/vfio_pci_nvlink2.c:29:
  ./include/trace/define_trace.h:89:42: fatal error: ./trace.h: No such file or directory
   #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
                                          ^
  compilation terminated.
  make[1]: *** [scripts/Makefile.build;277: drivers/vfio/pci/vfio_pci_nvlink2.o] Error 1

To fix the build error, let's tell include/trace/define_trace.h the
location of drivers/vfio/pci/trace.h

Fixes: 7f92891778 ("vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver")
Reported-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2019-01-08 09:08:30 -07:00

103 lines
2.5 KiB
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* VFIO PCI mmap/mmap_fault tracepoints
*
* Copyright (C) 2018 IBM Corp. All rights reserved.
* Author: Alexey Kardashevskiy <aik@ozlabs.ru>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#undef TRACE_SYSTEM
#define TRACE_SYSTEM vfio_pci
#if !defined(_TRACE_VFIO_PCI_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_VFIO_PCI_H
#include <linux/tracepoint.h>
TRACE_EVENT(vfio_pci_nvgpu_mmap_fault,
TP_PROTO(struct pci_dev *pdev, unsigned long hpa, unsigned long ua,
vm_fault_t ret),
TP_ARGS(pdev, hpa, ua, ret),
TP_STRUCT__entry(
__field(const char *, name)
__field(unsigned long, hpa)
__field(unsigned long, ua)
__field(int, ret)
),
TP_fast_assign(
__entry->name = dev_name(&pdev->dev),
__entry->hpa = hpa;
__entry->ua = ua;
__entry->ret = ret;
),
TP_printk("%s: %lx -> %lx ret=%d", __entry->name, __entry->hpa,
__entry->ua, __entry->ret)
);
TRACE_EVENT(vfio_pci_nvgpu_mmap,
TP_PROTO(struct pci_dev *pdev, unsigned long hpa, unsigned long ua,
unsigned long size, int ret),
TP_ARGS(pdev, hpa, ua, size, ret),
TP_STRUCT__entry(
__field(const char *, name)
__field(unsigned long, hpa)
__field(unsigned long, ua)
__field(unsigned long, size)
__field(int, ret)
),
TP_fast_assign(
__entry->name = dev_name(&pdev->dev),
__entry->hpa = hpa;
__entry->ua = ua;
__entry->size = size;
__entry->ret = ret;
),
TP_printk("%s: %lx -> %lx size=%lx ret=%d", __entry->name, __entry->hpa,
__entry->ua, __entry->size, __entry->ret)
);
TRACE_EVENT(vfio_pci_npu2_mmap,
TP_PROTO(struct pci_dev *pdev, unsigned long hpa, unsigned long ua,
unsigned long size, int ret),
TP_ARGS(pdev, hpa, ua, size, ret),
TP_STRUCT__entry(
__field(const char *, name)
__field(unsigned long, hpa)
__field(unsigned long, ua)
__field(unsigned long, size)
__field(int, ret)
),
TP_fast_assign(
__entry->name = dev_name(&pdev->dev),
__entry->hpa = hpa;
__entry->ua = ua;
__entry->size = size;
__entry->ret = ret;
),
TP_printk("%s: %lx -> %lx size=%lx ret=%d", __entry->name, __entry->hpa,
__entry->ua, __entry->size, __entry->ret)
);
#endif /* _TRACE_VFIO_PCI_H */
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH ../../drivers/vfio/pci
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE trace
/* This part must be outside protection */
#include <trace/define_trace.h>