在 2025/5/7 23:36, Steven Rostedt 写道:
On Wed, 7 May 2025 09:15:35 +0800
Shuai Xue <xueshuai@xxxxxxxxxxxxxxxxx> wrote:
+#endif /* _TRACE_HW_EVENT_PCI_HP_H */
+
+#undef TRACE_INCLUDE_PATH
+#define TRACE_INCLUDE_PATH ../../drivers/pci/hotplug
Note, this is not always safe to do. If "drivers", "pci" or "hotplug" ever
become a macro, the path will also be updated, and this will fail to build.
+#undef TRACE_INCLUDE_FILE
+#define TRACE_INCLUDE_FILE trace
+
+/* This part must be outside protection */
+#include <trace/define_trace.h>
diff --git a/include/uapi/linux/pci.h b/include/uapi/linux/pci.h
The safer way to do this is to have:
In drivers/pci/hotplug/Makefile:
CFLAGS_pciehp_ctrl.o := -I$(src)
And replace the TRACE_INCLUDE_PATH to:
#define TRACE_INCLUDE_PATH .
-- Steve
Got it. Will fix it in next version.
Thanks.
Shuai