We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b08ba64 commit 16ef7dfCopy full SHA for 16ef7df
driver/main.c
@@ -1799,8 +1799,11 @@ static inline void g_n_tracepoint_hit_inc(void)
1799
{
1800
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
1801
this_cpu_inc(g_n_tracepoint_hit);
1802
-#else
1803
- /*
+#elif defined(this_cpu_inc)
+ /* this_cpu_inc has been added with 2.6.33 but backported by RHEL/CentOS to 2.6.32
1804
+ * so just checking the existence of the symbol rather than matching the kernel version
1805
+ * https://github.com/torvalds/linux/commit/7340a0b15280c9d902c7dd0608b8e751b5a7c403
1806
+ *
1807
* per_cpu_var removed with:
1808
* https://github.com/torvalds/linux/commit/dd17c8f72993f9461e9c19250e3f155d6d99df22
1809
*/
0 commit comments