lkml.org 
[lkml]   [2019]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH] Kbuild: Handle PREEMPT_RT for version string and magic
    Hi Thomas,

    On Sat, Jul 27, 2019 at 5:49 AM Thomas Gleixner <tglx@linutronix.de> 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@linutronix.de>
    > Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
    > Cc: Michal Marek <michal.lkml@markovi.net>
    > Cc: linux-kbuild@vger.kernel.org

    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

    \
     
     \ /
      Last update: 2019-07-28 06:14    [W:8.745 / U:0.508 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site