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

Unified · Split

2 files
  1. init/Makefile +2 −1
  2. scripts/mkcompile_h +12 −5
init/Makefile+2−1
@@ -31,7 +31,8 @@ quiet_cmd_compile.h = CHK $@ · 30 unmodified lines
31 cmd_compile.h = \31 cmd_compile.h = \
32 $(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \32 $(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
33 "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT_BUILD)" \33 "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT_BUILD)" \
34 "$(CONFIG_PREEMPT_RT)" "$(CONFIG_CC_VERSION_TEXT)" "$(LD)"34 "$(CONFIG_PREEMPT_DYNAMIC)" "$(CONFIG_PREEMPT_RT)" \
35 "$(CONFIG_CC_VERSION_TEXT)" "$(LD)"
35 36
36include/generated/compile.h: FORCE37include/generated/compile.h: FORCE
37 $(call cmd,compile.h)38 $(call cmd,compile.h)
scripts/mkcompile_h+12−5
@@ -5,9 +5,10 @@ TARGET=$1 · 4 unmodified lines
5ARCH=$25ARCH=$2
6SMP=$36SMP=$3
7PREEMPT=$47PREEMPT=$4
8PREEMPT_RT=$58PREEMPT_DYNAMIC=$5
9CC_VERSION="$6"9PREEMPT_RT=$6
10LD=$710CC_VERSION="$7"
11LD=$8
11 12
12# Do not expand names13# Do not expand names
13set -f14set -f
@@ -41,8 +42,14 @@ fi · 27 unmodified lines
41UTS_VERSION="#$VERSION"42UTS_VERSION="#$VERSION"
42CONFIG_FLAGS=""43CONFIG_FLAGS=""
43if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi44if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi
44if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi45
45if [ -n "$PREEMPT_RT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT_RT"; fi46if [ -n "$PREEMPT_RT" ] ; then
47 CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT_RT"
48elif [ -n "$PREEMPT_DYNAMIC" ] ; then
49 CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT_DYNAMIC"
50elif [ -n "$PREEMPT" ] ; then
51 CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"
52fi
46 53
47# Truncate to maximum length54# Truncate to maximum length
48UTS_LEN=6455UTS_LEN=64