Re: [masahiroy-kbuild:modpost-v5 23/23] arch/x86/kernel/callthunks.c:45:1: sparse: sparse: cast removes address space '__percpu' of expression

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

 



On Sun, May 28, 2023 at 9:40 AM kernel test robot <lkp@xxxxxxxxx> wrote:
>
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git modpost-v5
> head:   952d644bb57db01d034e1faf94519473fbb1a0a1
> commit: 952d644bb57db01d034e1faf94519473fbb1a0a1 [23/23] kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion
> config: x86_64-randconfig-s053-20230528 (https://download.01.org/0day-ci/archive/20230528/202305280830.Rj5ltc9M-lkp@xxxxxxxxx/config)
> compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
> reproduce:
>         # apt-get install sparse
>         # sparse version: v0.6.4-39-gce1a6720-dirty
>         # https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/commit/?id=952d644bb57db01d034e1faf94519473fbb1a0a1
>         git remote add masahiroy-kbuild https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git
>         git fetch --no-tags masahiroy-kbuild modpost-v5
>         git checkout 952d644bb57db01d034e1faf94519473fbb1a0a1
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 olddefconfig
>         make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kernel/ kernel/trace/ lib/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202305280830.Rj5ltc9M-lkp@xxxxxxxxx/
>
> sparse warnings: (new ones prefixed by >>)
> >> arch/x86/kernel/callthunks.c:45:1: sparse: sparse: cast removes address space '__percpu' of expression
>    arch/x86/kernel/callthunks.c:46:1: sparse: sparse: cast removes address space '__percpu' of expression





Thanks.

This commit is unrelated.

This seems to be a regression of
https://patchwork.kernel.org/project/linux-kbuild/patch/20230521160426.1881124-11-masahiroy@xxxxxxxxxx/

I will squash the following fix-up.


diff --git a/include/linux/export.h b/include/linux/export.h
index 32461a01608c..245ecd342772 100644
--- a/include/linux/export.h
+++ b/include/linux/export.h
@@ -56,6 +56,7 @@ extern struct module __this_module;
 #else

 #define ___EXPORT_SYMBOL(sym, license, ns)                     \
+       extern typeof(sym) sym;                                 \
        __ADDRESSABLE(sym)                                      \
        asm(__stringify(____EXPORT_SYMBOL(sym, license, ns)))























> vim +/__percpu +45 arch/x86/kernel/callthunks.c
>
> e81dc127ef6988 Thomas Gleixner 2022-09-15  39
> f5c1bb2afe9339 Thomas Gleixner 2022-09-15  40  #ifdef CONFIG_CALL_THUNKS_DEBUG
> f5c1bb2afe9339 Thomas Gleixner 2022-09-15  41  DEFINE_PER_CPU(u64, __x86_call_count);
> f5c1bb2afe9339 Thomas Gleixner 2022-09-15  42  DEFINE_PER_CPU(u64, __x86_ret_count);
> f5c1bb2afe9339 Thomas Gleixner 2022-09-15  43  DEFINE_PER_CPU(u64, __x86_stuffs_count);
> f5c1bb2afe9339 Thomas Gleixner 2022-09-15  44  DEFINE_PER_CPU(u64, __x86_ctxsw_count);
> f5c1bb2afe9339 Thomas Gleixner 2022-09-15 @45  EXPORT_SYMBOL_GPL(__x86_ctxsw_count);
> f5c1bb2afe9339 Thomas Gleixner 2022-09-15  46  EXPORT_SYMBOL_GPL(__x86_call_count);
> f5c1bb2afe9339 Thomas Gleixner 2022-09-15  47  #endif
> f5c1bb2afe9339 Thomas Gleixner 2022-09-15  48
>
> :::::: The code at line 45 was first introduced by commit
> :::::: f5c1bb2afe93396d41c5cbdcb909b08a75b8dde4 x86/calldepth: Add ret/call counting for debug
>
> :::::: TO: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> :::::: CC: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki



-- 
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