Blame SOURCES/rhbz1991631.patch

4890ab
commit 515a6a2d63cdf16c5bc599f0d29283289219d9a4
4890ab
Author: Frank Ch. Eigler <fche@redhat.com>
4890ab
Date:   Thu Jun 24 13:30:38 2021 -0400
4890ab
4890ab
    rhbz1972828: tapsets: iommu tracepoints
4890ab
    
4890ab
    Disable detection of intel-iommu tracepoint family on non-x86
4890ab
    platforms, because the 5.13ish kernel headers for this tracepoint
4890ab
    include references to functions like clcache_flush_range which don't
4890ab
    exist on all non-x86.
4890ab
4890ab
diff --git a/tapsets.cxx b/tapsets.cxx
4890ab
index a5e41129f..20e0cb68f 100644
4890ab
--- a/tapsets.cxx
4890ab
+++ b/tapsets.cxx
4890ab
@@ -11930,6 +11930,13 @@ static vector<string> tracepoint_extra_decls (systemtap_session& s,
4890ab
 	they_live.push_back ("#include <linux/phy.h>");
4890ab
     }
4890ab
 
4890ab
+  if (header.find("intel_iommu") != string::npos && s.architecture != "x86_64" && s.architecture != "i386")
4890ab
+    {
4890ab
+      // need asm/cacheflush.h for clflush_cache_range() used in that header,
4890ab
+      // but this function does not exist on e.g. ppc
4890ab
+      they_live.push_back ("#error nope");
4890ab
+    }
4890ab
+
4890ab
   if (header.find("wbt") != string::npos)
4890ab
     {
4890ab
       // blk-wbt.h gets included as "../../../block/blk-wbt.h", so we