Re: [PATCH] Kbuild: Handle PREEMPT_RT for version string and magic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Thomas,

On Sat, Jul 27, 2019 at 5:49 AM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxxxxx>
> Cc: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
> Cc: Michal Marek <michal.lkml@xxxxxxxxxxx>
> Cc: linux-kbuild@xxxxxxxxxxxxxxx

Since CONFIG_PREEMPTION was introduced after -rc1,
I think this should be queued on top of -rc2.

Just a nit below.


> ---
>  include/linux/vermagic.h |   10 +++++++---
>  init/Makefile            |    5 +++--
>  scripts/Makefile.modpost |    2 +-
>  scripts/mkcompile_h      |    4 +++-
>  4 files changed, 14 insertions(+), 7 deletions(-)
>
> --- a/include/linux/vermagic.h
> +++ b/include/linux/vermagic.h
> @@ -7,10 +7,14 @@
>  #else
>  #define MODULE_VERMAGIC_SMP ""
>  #endif
> -#ifdef CONFIG_PREEMPT
> -#define MODULE_VERMAGIC_PREEMPT "preempt "
> +#ifdef CONFIG_PREEMPTION
> +# ifdef CONFIG_PREEMPT
> +#  define MODULE_VERMAGIC_PREEMPT "preempt "
> +# else
> +#  define MODULE_VERMAGIC_PREEMPT "preempt_rt "
> +# endif
>  #else
> -#define MODULE_VERMAGIC_PREEMPT ""
> +# define MODULE_VERMAGIC_PREEMPT ""

Maybe, is the following more readable?

#if defined(CONFIG_PREEMPT_RT)
#define MODULE_VERMAGIC_PREEMPT "preempt_rt "
#elif defined(CONFIG_PREEMPT)
#define MODULE_VERMAGIC_PREEMPT "preempt "
#else
#define MODULE_VERMAGIC_PREEMPT ""
#endif


Thanks.

-- 
Best Regards
Masahiro Yamada



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux