Adapt lttng-modules to Linux 4.10 cpu hotplug state machine
[lttng-modules.git] / lib / ringbuffer / backend_types.h
index 8c53d0754eee633e4bf958c11a82f77fbb95322e..01ed63b9349aac0a71f25d4912774c7f946e9854 100644 (file)
 
 #include <linux/cpumask.h>
 #include <linux/types.h>
+#include <lttng-kernel-version.h>
+#include <lttng-cpuhotplug.h>
 
 struct lib_ring_buffer_backend_page {
        void *virt;                     /* page virtual address (cached) */
-       struct page *page;              /* pointer to page structure */
+       unsigned long pfn;              /* page frame number */
 };
 
 struct lib_ring_buffer_backend_pages {
@@ -97,7 +99,11 @@ struct channel_backend {
        void *priv;                     /* Client-specific information */
        void *priv_ops;                 /* Client-specific ops pointer */
        void (*release_priv_ops)(void *priv_ops);
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
+       struct lttng_cpuhp_node cpuhp_prepare;  /* CPU hotplug prepare */
+#else
        struct notifier_block cpu_hp_notifier;   /* CPU hotplug notifier */
+#endif
        /*
         * We need to copy config because the module containing the
         * source config can vanish before the last reference to this
This page took 0.02462 seconds and 4 git commands to generate.