All of lore.kernel.org
 help / color / mirror / Atom feed
* [tip:core/urgent 1/1] include/linux/context_tracking.h:99:19: error: redefinition of '__ct_state'
@ 2023-03-20 13:04 kernel test robot
  2023-03-20 23:06 ` Josh Poimboeuf
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-03-20 13:04 UTC (permalink / raw)
  To: Josh Poimboeuf; +Cc: oe-kbuild-all, linux-kernel, x86, Thomas Gleixner

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/urgent
head:   3e2619c4ebba2cab8414c55b131b7a28f628de3b
commit: 3e2619c4ebba2cab8414c55b131b7a28f628de3b [1/1] entry: Fix noinstr warning in __enter_from_user_mode()
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20230320/202303202052.lv1EF1t6-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=3e2619c4ebba2cab8414c55b131b7a28f628de3b
        git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
        git fetch --no-tags tip core/urgent
        git checkout 3e2619c4ebba2cab8414c55b131b7a28f628de3b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc prepare

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303202052.lv1EF1t6-lkp@intel.com/

All errors (new ones prefixed by >>):

   scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr]
   scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr]
   scripts/genksyms/parse.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples
   In file included from include/linux/kvm_host.h:26,
                    from arch/powerpc/include/asm/kvm_ppc.h:19,
                    from arch/powerpc/include/asm/dbell.h:17,
                    from arch/powerpc/kernel/asm-offsets.c:36:
>> include/linux/context_tracking.h:99:19: error: redefinition of '__ct_state'
      99 | static inline int __ct_state(void) { return -1; }
         |                   ^~~~~~~~~~
   In file included from include/linux/hardirq.h:5,
                    from include/linux/interrupt.h:11,
                    from include/linux/kernel_stat.h:9,
                    from include/linux/cgroup.h:26,
                    from include/linux/memcontrol.h:13,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from arch/powerpc/kernel/asm-offsets.c:21:
   include/linux/context_tracking_state.h:50:28: note: previous definition of '__ct_state' with type 'int(void)'
      50 | static __always_inline int __ct_state(void)
         |                            ^~~~~~~~~~
   make[2]: *** [scripts/Makefile.build:114: arch/powerpc/kernel/asm-offsets.s] Error 1
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:1286: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:226: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +/__ct_state +99 include/linux/context_tracking.h

    90	
    91	#else
    92	static inline void user_enter(void) { }
    93	static inline void user_exit(void) { }
    94	static inline void user_enter_irqoff(void) { }
    95	static inline void user_exit_irqoff(void) { }
    96	static inline int exception_enter(void) { return 0; }
    97	static inline void exception_exit(enum ctx_state prev_ctx) { }
    98	static inline int ct_state(void) { return -1; }
  > 99	static inline int __ct_state(void) { return -1; }
   100	static __always_inline bool context_tracking_guest_enter(void) { return false; }
   101	static inline void context_tracking_guest_exit(void) { }
   102	#define CT_WARN_ON(cond) do { } while (0)
   103	#endif /* !CONFIG_CONTEXT_TRACKING_USER */
   104	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [tip:core/urgent 1/1] include/linux/context_tracking.h:99:19: error: redefinition of '__ct_state'
  2023-03-20 13:04 [tip:core/urgent 1/1] include/linux/context_tracking.h:99:19: error: redefinition of '__ct_state' kernel test robot
@ 2023-03-20 23:06 ` Josh Poimboeuf
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Poimboeuf @ 2023-03-20 23:06 UTC (permalink / raw)
  To: kernel test robot; +Cc: oe-kbuild-all, linux-kernel, x86, Thomas Gleixner

On Mon, Mar 20, 2023 at 09:04:00PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/urgent
> head:   3e2619c4ebba2cab8414c55b131b7a28f628de3b
> commit: 3e2619c4ebba2cab8414c55b131b7a28f628de3b [1/1] entry: Fix noinstr warning in __enter_from_user_mode()
> config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20230320/202303202052.lv1EF1t6-lkp@intel.com/config)
> compiler: powerpc-linux-gcc (GCC) 12.1.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=3e2619c4ebba2cab8414c55b131b7a28f628de3b
>         git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
>         git fetch --no-tags tip core/urgent
>         git checkout 3e2619c4ebba2cab8414c55b131b7a28f628de3b
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc prepare
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Link: https://lore.kernel.org/oe-kbuild-all/202303202052.lv1EF1t6-lkp@intel.com/

Not sure why I didn't get this build bot error before.  Thomas, can you
squash in this fix?

diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h
index 4a4d56f77180..fdd537ea513f 100644
--- a/include/linux/context_tracking_state.h
+++ b/include/linux/context_tracking_state.h
@@ -46,7 +46,9 @@ struct context_tracking {
 
 #ifdef CONFIG_CONTEXT_TRACKING
 DECLARE_PER_CPU(struct context_tracking, context_tracking);
+#endif
 
+#ifdef CONFIG_CONTEXT_TRACKING_USER
 static __always_inline int __ct_state(void)
 {
 	return arch_atomic_read(this_cpu_ptr(&context_tracking.state)) & CT_STATE_MASK;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-20 23:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20 13:04 [tip:core/urgent 1/1] include/linux/context_tracking.h:99:19: error: redefinition of '__ct_state' kernel test robot
2023-03-20 23:06 ` Josh Poimboeuf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.