linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Marc Zyngier <maz@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Catalin Marinas <catalin.marinas@arm.com>
Subject: arch/arm64/include/asm/cpufeature.h:273:2: warning: initialized field overwritten
Date: Wed, 30 Jun 2021 20:08:41 +0800	[thread overview]
Message-ID: <202106302037.QmEffgZV-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 9426 bytes --]

Hi Marc,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   007b350a58754a93ca9fe50c498cc27780171153
commit: ed888cb0d1ebce69f12794e89fbd5e2c86d40b8d arm64: Allow CPUs unffected by ARM erratum 1418040 to come in late
date:   10 months ago
config: arm64-buildonly-randconfig-r002-20210630 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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/torvalds/linux.git/commit/?id=ed888cb0d1ebce69f12794e89fbd5e2c86d40b8d
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout ed888cb0d1ebce69f12794e89fbd5e2c86d40b8d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   arch/arm64/kernel/cpu_errata.c:295:13: warning: no previous prototype for 'arm64_update_smccc_conduit' [-Wmissing-prototypes]
     295 | void __init arm64_update_smccc_conduit(struct alt_instr *alt,
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:317:13: warning: no previous prototype for 'arm64_enable_wa2_handling' [-Wmissing-prototypes]
     317 | void __init arm64_enable_wa2_handling(struct alt_instr *alt,
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:486:13: warning: initialized field overwritten [-Woverride-init]
     486 |  .matches = is_affected_midr_range,   \
         |             ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:498:2: note: in expansion of macro 'CAP_MIDR_RANGE'
     498 |  CAP_MIDR_RANGE(model, v_min, r_min, v_max, r_max)
         |  ^~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:506:2: note: in expansion of macro 'ERRATA_MIDR_RANGE'
     506 |  ERRATA_MIDR_RANGE(m, var, r_min, var, r_max)
         |  ^~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:747:3: note: in expansion of macro 'ERRATA_MIDR_REV_RANGE'
     747 |   ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A53, 0, 0, 4),
         |   ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:486:13: note: (near initialization for 'erratum_843419_list[0].matches')
     486 |  .matches = is_affected_midr_range,   \
         |             ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:498:2: note: in expansion of macro 'CAP_MIDR_RANGE'
     498 |  CAP_MIDR_RANGE(model, v_min, r_min, v_max, r_max)
         |  ^~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:506:2: note: in expansion of macro 'ERRATA_MIDR_RANGE'
     506 |  ERRATA_MIDR_RANGE(m, var, r_min, var, r_max)
         |  ^~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:747:3: note: in expansion of macro 'ERRATA_MIDR_REV_RANGE'
     747 |   ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A53, 0, 0, 4),
         |   ^~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:486:13: warning: initialized field overwritten [-Woverride-init]
     486 |  .matches = is_affected_midr_range,   \
         |             ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:498:2: note: in expansion of macro 'CAP_MIDR_RANGE'
     498 |  CAP_MIDR_RANGE(model, v_min, r_min, v_max, r_max)
         |  ^~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:510:2: note: in expansion of macro 'ERRATA_MIDR_RANGE'
     510 |  ERRATA_MIDR_RANGE(model, var, rev, var, rev)
         |  ^~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:753:3: note: in expansion of macro 'ERRATA_MIDR_REV'
     753 |   ERRATA_MIDR_REV(MIDR_BRAHMA_B53, 0, 0),
         |   ^~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:486:13: note: (near initialization for 'erratum_843419_list[1].matches')
     486 |  .matches = is_affected_midr_range,   \
         |             ^~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:498:2: note: in expansion of macro 'CAP_MIDR_RANGE'
     498 |  CAP_MIDR_RANGE(model, v_min, r_min, v_max, r_max)
         |  ^~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:510:2: note: in expansion of macro 'ERRATA_MIDR_RANGE'
     510 |  ERRATA_MIDR_RANGE(model, var, rev, var, rev)
         |  ^~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:753:3: note: in expansion of macro 'ERRATA_MIDR_REV'
     753 |   ERRATA_MIDR_REV(MIDR_BRAHMA_B53, 0, 0),
         |   ^~~~~~~~~~~~~~~
   In file included from arch/arm64/include/asm/ptrace.h:11,
                    from arch/arm64/include/asm/irqflags.h:10,
                    from include/linux/irqflags.h:16,
                    from include/linux/rcupdate.h:26,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/node.h:18,
                    from include/linux/cpu.h:17,
                    from arch/arm64/kernel/cpu_errata.c:10:
>> arch/arm64/include/asm/cpufeature.h:273:2: warning: initialized field overwritten [-Woverride-init]
     273 |  (ARM64_CPUCAP_SCOPE_LOCAL_CPU  | \
         |  ^
   arch/arm64/kernel/cpu_errata.c:918:11: note: in expansion of macro 'ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE'
     918 |   .type = ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE,
         |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/include/asm/cpufeature.h:273:2: note: (near initialization for 'arm64_errata[9].type')
     273 |  (ARM64_CPUCAP_SCOPE_LOCAL_CPU  | \
         |  ^
   arch/arm64/kernel/cpu_errata.c:918:11: note: in expansion of macro 'ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE'
     918 |   .type = ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE,
         |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:942:14: warning: initialized field overwritten [-Woverride-init]
     942 |   .matches = needs_tx2_tvm_workaround,
         |              ^~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm64/kernel/cpu_errata.c:942:14: note: (near initialization for 'arm64_errata[11].matches')


vim +273 arch/arm64/include/asm/cpufeature.h

5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  249  
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  250  /*
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  251   * CPU errata workarounds that need to be enabled at boot time if one or
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  252   * more CPUs in the system requires it. When one of these capabilities
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  253   * has been enabled, it is safe to allow any CPU to boot that doesn't
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  254   * require the workaround. However, it is not safe if a "late" CPU
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  255   * requires a workaround and the system hasn't enabled it already.
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  256   */
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  257  #define ARM64_CPUCAP_LOCAL_CPU_ERRATUM		\
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  258  	(ARM64_CPUCAP_SCOPE_LOCAL_CPU | ARM64_CPUCAP_OPTIONAL_FOR_LATE_CPU)
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  259  /*
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  260   * CPU feature detected at boot time based on system-wide value of a
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  261   * feature. It is safe for a late CPU to have this feature even though
ca7f686ac9fe87 Will Deacon      2018-06-15  262   * the system hasn't enabled it, although the feature will not be used
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  263   * by Linux in this case. If the system has enabled this feature already,
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  264   * then every late CPU must have it.
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  265   */
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  266  #define ARM64_CPUCAP_SYSTEM_FEATURE	\
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  267  	(ARM64_CPUCAP_SCOPE_SYSTEM | ARM64_CPUCAP_PERMITTED_FOR_LATE_CPU)
5c137714dd8cae Suzuki K Poulose 2018-03-26  268  /*
5c137714dd8cae Suzuki K Poulose 2018-03-26  269   * CPU feature detected at boot time based on feature of one or more CPUs.
5c137714dd8cae Suzuki K Poulose 2018-03-26  270   * All possible conflicts for a late CPU are ignored.
5c137714dd8cae Suzuki K Poulose 2018-03-26  271   */
5c137714dd8cae Suzuki K Poulose 2018-03-26  272  #define ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE		\
5c137714dd8cae Suzuki K Poulose 2018-03-26 @273  	(ARM64_CPUCAP_SCOPE_LOCAL_CPU		|	\
5c137714dd8cae Suzuki K Poulose 2018-03-26  274  	 ARM64_CPUCAP_OPTIONAL_FOR_LATE_CPU	|	\
5c137714dd8cae Suzuki K Poulose 2018-03-26  275  	 ARM64_CPUCAP_PERMITTED_FOR_LATE_CPU)
5b4747c5dce7a8 Suzuki K Poulose 2018-03-26  276  

:::::: The code at line 273 was first introduced by commit
:::::: 5c137714dd8cae464dbd5f028c07af149e6d09fc arm64: capabilities: Introduce weak features based on local CPU

:::::: TO: Suzuki K Poulose <suzuki.poulose@arm.com>
:::::: CC: Will Deacon <will.deacon@arm.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29645 bytes --]

             reply	other threads:[~2021-06-30 12:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-30 12:08 kernel test robot [this message]
2021-06-30 12:21 ` arch/arm64/include/asm/cpufeature.h:273:2: warning: initialized field overwritten Marc Zyngier
2021-07-02  8:51   ` [kbuild-all] " Rong Chen
  -- strict thread matches above, loose matches on Subject: below --
2021-02-02 23:20 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202106302037.QmEffgZV-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=catalin.marinas@arm.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).