]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
Kbuild: Handle PREEMPT_RT for version string and magic
authorThomas Gleixner <tglx@linutronix.de>
Sun, 28 Jul 2019 18:27:41 +0000 (20:27 +0200)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 13 Aug 2019 16:10:42 +0000 (01:10 +0900)
Update the build scripts and the version magic to reflect when
CONFIG_PREEMPT_RT is enabled in the same way as CONFIG_PREEMPT is treated.

The resulting version strings:

  Linux m 5.3.0-rc1+ #100 SMP Fri Jul 26 ...
  Linux m 5.3.0-rc1+ #101 SMP PREEMPT Fri Jul 26 ...
  Linux m 5.3.0-rc1+ #102 SMP PREEMPT_RT Fri Jul 26 ...

The module vermagic:

  5.3.0-rc1+ SMP mod_unload modversions
  5.3.0-rc1+ SMP preempt mod_unload modversions
  5.3.0-rc1+ SMP preempt_rt mod_unload modversions

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
include/linux/vermagic.h
init/Makefile
scripts/Makefile.modpost
scripts/mkcompile_h

index bae807eb2933f9391d42c3d0dd73d98928b91a98..9aced11e90000c45926045e5e0c6ea2e2c35f36c 100644 (file)
@@ -9,6 +9,8 @@
 #endif
 #ifdef CONFIG_PREEMPT
 #define MODULE_VERMAGIC_PREEMPT "preempt "
+#elif defined(CONFIG_PREEMPT_RT)
+#define MODULE_VERMAGIC_PREEMPT "preempt_rt "
 #else
 #define MODULE_VERMAGIC_PREEMPT ""
 #endif
index a3e5ce2bcf08bf2bee9c6139ac61360055dd4949..6246a06364d0f1228a4e8967a80b2ee850140ec4 100644 (file)
@@ -33,5 +33,6 @@ $(obj)/version.o: include/generated/compile.h
 silent_chk_compile.h = :
 include/generated/compile.h: FORCE
        @$($(quiet)chk_compile.h)
-       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
-       "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(KBUILD_CFLAGS)"
+       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@   \
+       "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)"    \
+       "$(CONFIG_PREEMPT_RT)" "$(CC) $(KBUILD_CFLAGS)"
index 26e6574ecd08d4e0e189a35524aff1c704fb0e24..e003350bc473f95f43da686d8a23314bcfe5fa27 100644 (file)
@@ -23,7 +23,7 @@
 #   Version magic (see include/linux/vermagic.h for full details)
 #     - Kernel release
 #     - SMP is CONFIG_SMP
-#     - PREEMPT is CONFIG_PREEMPT
+#     - PREEMPT is CONFIG_PREEMPT[_RT]
 #     - GCC Version
 #   Module info
 #     - Module version (MODULE_VERSION)
index 2339f86126cb8f0747086a8e9a155dbf87b6521a..d1d757c6edf4f63bdf66ef9bb4d9bf0f2601d0aa 100755 (executable)
@@ -5,7 +5,8 @@ TARGET=$1
 ARCH=$2
 SMP=$3
 PREEMPT=$4
-CC=$5
+PREEMPT_RT=$5
+CC=$6
 
 vecho() { [ "${quiet}" = "silent_" ] || echo "$@" ; }
 
@@ -53,6 +54,7 @@ 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
 UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS $TIMESTAMP"
 
 # Truncate to maximum length