Skip to content

Commit

Permalink
Merge pull request #972 from pubyun/master
Browse files Browse the repository at this point in the history
fix compile error on RHEL 9.4
  • Loading branch information
ywc689 authored Jul 15, 2024
2 parents 072fd44 + eff346a commit 53ff10b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions kmod/uoa/uoa.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,13 @@ static int uoa_stats_percpu_show(struct seq_file *seq, void *arg)
unsigned int start;

do {

#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0) || \
( defined(RHEL_MAJOR) && ((RHEL_MAJOR == 9 && RHEL_MINOR > 3) || RHEL_MAJOR > 9))
start = u64_stats_fetch_begin(&s->syncp);
#else
start = u64_stats_fetch_begin_irq(&s->syncp);
#endif
#endif
success = s->success;
miss = s->miss;
Expand All @@ -209,7 +215,12 @@ static int uoa_stats_percpu_show(struct seq_file *seq, void *arg)
saved = s->uoa_saved;
ack_fail = s->uoa_ack_fail;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0) || \
( defined(RHEL_MAJOR) && ((RHEL_MAJOR == 9 && RHEL_MINOR > 3) || RHEL_MAJOR > 9))
} while (u64_stats_fetch_retry(&s->syncp, start));
#else
} while (u64_stats_fetch_retry_irq(&s->syncp, start));
#endif
#endif

seq_printf(seq,
Expand Down

0 comments on commit 53ff10b

Please sign in to comment.