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.
Showing the changes to scripts (1 of 2 files). Show all
Unified · Split
| @@ -5,9 +5,10 @@ TARGET=$1 · 4 unmodified lines | ||
| 5 | 5 | ARCH=$2 |
| 6 | 6 | SMP=$3 |
| 7 | 7 | 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 | |
| 11 | 12 | |
| 12 | 13 | # Do not expand names |
| 13 | 14 | set -f |
| @@ -41,8 +42,14 @@ fi · 27 unmodified lines | ||
| 41 | 42 | UTS_VERSION="#$VERSION" |
| 42 | 43 | CONFIG_FLAGS="" |
| 43 | 44 | 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 | |
| 46 | 53 | |
| 47 | 54 | # Truncate to maximum length |
| 48 | 55 | UTS_LEN=64 |