summaryrefslogtreecommitdiff
path: root/scripts/mkcompile_h
diff options
context:
space:
mode:
authorFrederic Weisbecker <frederic@kernel.org>2022-02-17 14:12:40 +0300
committerPeter Zijlstra <peterz@infradead.org>2022-03-11 17:36:35 +0300
commita0a7e453b502cbbf7ff372f907a4e27a2ebf5445 (patch)
treec65cecad4196e8b70240b6305ca59dad8e5b5c93 /scripts/mkcompile_h
parent7f434dff76215af00c26ba6449eaa4738fe9e2ab (diff)
downloadlinux-a0a7e453b502cbbf7ff372f907a4e27a2ebf5445.tar.xz
sched/preempt: Tell about PREEMPT_DYNAMIC on kernel headers
Displaying "PREEMPT" on kernel headers when CONFIG_PREEMPT_DYNAMIC=y can be misleading for anybody involved in remote debugging because it is then not guaranteed that there is an actual preemption behaviour. It depends on default Kconfig or boot defined choices. Therefore, tell about PREEMPT_DYNAMIC on static kernel headers and leave the search for the actual preemption behaviour to browsing dmesg. Reviewed-by: Valentin Schneider <valentin.schneider@arm.com> Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20220217111240.GA742892@lothringen
Diffstat (limited to 'scripts/mkcompile_h')
-rwxr-xr-xscripts/mkcompile_h17
1 files changed, 12 insertions, 5 deletions
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 6a2a04d92f42..ca40a5258c87 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -5,9 +5,10 @@ TARGET=$1
ARCH=$2
SMP=$3
PREEMPT=$4
-PREEMPT_RT=$5
-CC_VERSION="$6"
-LD=$7
+PREEMPT_DYNAMIC=$5
+PREEMPT_RT=$6
+CC_VERSION="$7"
+LD=$8
# Do not expand names
set -f
@@ -41,8 +42,14 @@ fi
UTS_VERSION="#$VERSION"
CONFIG_FLAGS=""
if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi
-if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi
-if [ -n "$PREEMPT_RT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT_RT"; fi
+
+if [ -n "$PREEMPT_RT" ] ; then
+ CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT_RT"
+elif [ -n "$PREEMPT_DYNAMIC" ] ; then
+ CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT_DYNAMIC"
+elif [ -n "$PREEMPT" ] ; then
+ CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"
+fi
# Truncate to maximum length
UTS_LEN=64