- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There seems to be some recent changes in Redhat 9 that cause the problems when building the sampling drivers. (I'm using 2024.1 but others are impacted as well).
Specifically, somewhere between 5.14.0-362.24.1 and 5.14.0-427.18.1 RedHat changed the header file:
/lib/modules/5.14.0-427.20.1.el9_4.x86_64/build/include/linux/device/class.h
to use the version of class_create:
struct class * __must_check class_create(const char *name);
as opposed to the previous version which was:
#define class_create(owner, name) \
({ \
static struct lock_class_key __key; \
__class_create(owner, name, &__key); \
})
There are ifdefs in the sepdk source to handle this for newer kernels, but they don't work for the 5.14.0 (the RedHat 9 version):
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
pmu_class = class_create(SOCPERF_DRIVER_NAME);
#else
pmu_class = class_create(THIS_MODULE, SOCPERF_DRIVER_NAME);
#endif
The work around seems to be to edit:
...sepdk/src/socperf/src/socperfdrv.c
...sepdk/src/socperf/src/lwpmudrv.c
...sepdk/src/socperf/src/pax/pax.c
...sepdk/src/socperf/src/socwatch/socwatch_driver/src/sw_file_ops.c
and remove the "THIS_MODULE, " from the 2 argument version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue is with driver build errors where class_create macro definition has been changed since Linux kernel 6.4 as you mentioned.
-#define class_create(owner, name) \
+#define class_create(name) \
We already fixed our drivers for 6.4 or later kernels but RH 9.4 kernel 5.14.0 has the changed back ported. Currently, there is no better way to detect it easily. We need to explore more.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you verify if the workaround can work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The drivers build with out error and installing the result seems to be working for us.
I don't really understand the details of the driver code, so it would be nice to have Intel verify that this is a proper/complete work around.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue is with driver build errors where class_create macro definition has been changed since Linux kernel 6.4 as you mentioned.
-#define class_create(owner, name) \
+#define class_create(name) \
We already fixed our drivers for 6.4 or later kernels but RH 9.4 kernel 5.14.0 has the changed back ported. Currently, there is no better way to detect it easily. We need to explore more.
![](/skins/images/45C6C2D737ED71F4C51F0145C8CB1E9C/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page