From e2c10ff3735681591fd97bb705586732cc096c5a Mon Sep 17 00:00:00 2001 From: Juri Lelli Date: Wed, 3 Jun 2020 09:19:26 -0400 Subject: [PATCH] RHBZ1842866 kernel-rt port: treat CONFIG_PREEMPT_RT as if ..._FULL Until recently CONFIG_PREEMPT_RT_FULL was the config switch used by PREEMPT_RT (and RHEL-RT up to 8.2) for building an RT kernel. Upstream commit a50a3f4b6a313 ("sched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT") changed that to be CONFIG_PREEMPT_RT. --- runtime/linux/stat_runtime.h | 2 +- runtime/stp_helper_lock.h | 2 +- runtime/stp_utrace.c | 2 +- testsuite/systemtap.examples/process/pfiles.stp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/linux/stat_runtime.h b/runtime/linux/stat_runtime.h index 44428b78f..edb239ae5 100644 --- a/runtime/linux/stat_runtime.h +++ b/runtime/linux/stat_runtime.h @@ -14,7 +14,7 @@ #define STAT_LOCK(sd) do {} while (0) #define STAT_UNLOCK(sd) do {} while (0) /* get/put_cpu wrappers. Unnecessary if caller is already atomic. */ -#ifdef CONFIG_PREEMPT_RT_FULL +#if defined(CONFIG_PREEMPT_RT_FULL) || defined(CONFIG_PREEMPT_RT) #define STAT_GET_CPU() raw_smp_processor_id() #else #define STAT_GET_CPU() smp_processor_id() diff --git a/runtime/stp_helper_lock.h b/runtime/stp_helper_lock.h index 7fe79f77e..81e6a1644 100644 --- a/runtime/stp_helper_lock.h +++ b/runtime/stp_helper_lock.h @@ -17,7 +17,7 @@ #include -#ifdef CONFIG_PREEMPT_RT_FULL +#if defined(CONFIG_PREEMPT_RT_FULL) || defined(CONFIG_PREEMPT_RT) #define stp_spinlock_t raw_spinlock_t diff --git a/runtime/stp_utrace.c b/runtime/stp_utrace.c index abdf7dacb..c5c06df43 100644 --- a/runtime/stp_utrace.c +++ b/runtime/stp_utrace.c @@ -41,7 +41,7 @@ // For now, disable the task_work_queue on non-RT kernels. // XXX: Need to decide correct CONFIG_* to check for, // sticking with the more conservative option for now. -#ifdef CONFIG_PREEMPT_RT_FULL +#if defined(CONFIG_PREEMPT_RT_FULL) || defined(CONFIG_PREEMPT_RT) #define STP_UTRACE_USE_TASK_WORK_QUEUE #endif /* If STP_UTRACE_USE_TASK_WORK_QUEUE is defined, reporting work diff --git a/testsuite/systemtap.examples/process/pfiles.stp b/testsuite/systemtap.examples/process/pfiles.stp index e680cbda6..d52a1547b 100755 --- a/testsuite/systemtap.examples/process/pfiles.stp +++ b/testsuite/systemtap.examples/process/pfiles.stp @@ -88,8 +88,8 @@ # XXX: For the time being, mark this example as not working on PREEMPT_RT kernels: %{ -#ifdef CONFIG_PREEMPT_RT_FULL -#error "pfiles.stp not supported on CONFIG_PREEMPT_RT_FULL kernels" +#if defined(CONFIG_PREEMPT_RT_FULL) || defined(CONFIG_PREEMPT_RT) +#error "pfiles.stp not supported on PREEMPT_RT kernels" #endif %} -- 2.43.5