- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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 copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Did you verify if the workaround can work?
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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.

- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora