History

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.

Frederic Weisbecker committed 4 years ago

Commit a0a7e451 parent 7f434df2 files · +14 −6Browse files

Showing the changes to scripts (1 of 2 files). Show all

Unified · Split

scripts/mkcompile_h+12−5
@@ -5,9 +5,10 @@ TARGET=$1 · 4 unmodified lines
55 ARCH=$2
66 SMP=$3
77 PREEMPT=$4
8−PREEMPT_RT=$5
9−CC_VERSION="$6"
10−LD=$7
8+PREEMPT_DYNAMIC=$5
9+PREEMPT_RT=$6
10+CC_VERSION="$7"
11+LD=$8
1112
1213 # Do not expand names
1314 set -f
@@ -41,8 +42,14 @@ fi · 27 unmodified lines
4142 UTS_VERSION="#$VERSION"
4243 CONFIG_FLAGS=""
4344 if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi
44−if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi
45−if [ -n "$PREEMPT_RT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT_RT"; fi
45+
46+if [ -n "$PREEMPT_RT" ] ; then
47+ CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT_RT"
48+elif [ -n "$PREEMPT_DYNAMIC" ] ; then
49+ CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT_DYNAMIC"
50+elif [ -n "$PREEMPT" ] ; then
51+ CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"
52+fi
4653
4754 # Truncate to maximum length
4855 UTS_LEN=64