From: Fengguang Wu <fengguang.wu@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: tipbuild@zytor.com,
Vikas Shivappa <vikas.shivappa@linux.intel.com>,
kbuild-all@01.org, linux-kernel@vger.kernel.org
Subject: Re: [kbuild-all] [tip:x86/cpu 8/12] arch/x86/kernel/cpu/intel_rdt.c:63: error: unknown field 'cache' specified in initializer
Date: Mon, 17 Apr 2017 10:00:50 +0800 [thread overview]
Message-ID: <20170417020050.chexrahs3xmayaft@wfg-t540p.sh.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1704150736390.2327@nanos>
On Sat, Apr 15, 2017 at 07:40:34AM +0200, Thomas Gleixner wrote:
>On Sat, 15 Apr 2017, kbuild test robot wrote:
>
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/cpu
>> head: 64e8ed3d4a6dcd6139a869a3e760e625cb0d3022
>> commit: 05b93417ce5b924c6652de19fdcc27439ab37c90 [8/12] x86/intel_rdt/mba: Add primary support for Memory Bandwidth Allocation (MBA)
>> config: x86_64-randconfig-s0-04150438 (attached as .config)
>> compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
>> reproduce:
>> git checkout 05b93417ce5b924c6652de19fdcc27439ab37c90
>> # save the attached .config to linux build tree
>> make ARCH=x86_64
>
>That's weird.
>
>> c1c7c3f9 Fenghua Yu 2016-10-22 57 {
>> c1c7c3f9 Fenghua Yu 2016-10-22 58 .name = "L3",
>> c1c7c3f9 Fenghua Yu 2016-10-22 59 .domains = domain_init(RDT_RESOURCE_L3),
>> c1c7c3f9 Fenghua Yu 2016-10-22 60 .msr_base = IA32_L3_CBM_BASE,
>> 0921c547 Thomas Gleixner 2017-04-14 61 .msr_update = cat_wrmsr,
>> c1c7c3f9 Fenghua Yu 2016-10-22 62 .cache_level = 3,
>> d3e11b4d Thomas Gleixner 2017-04-14 @63 .cache = {
>> d3e11b4d Thomas Gleixner 2017-04-14 @64 .min_cbm_bits = 1,
>> d3e11b4d Thomas Gleixner 2017-04-14 @65 .cbm_idx_mult = 1,
>> d3e11b4d Thomas Gleixner 2017-04-14 66 .cbm_idx_offset = 0,
>> d3e11b4d Thomas Gleixner 2017-04-14 67 },
>> c1c7c3f9 Fenghua Yu 2016-10-22 68 },
>>
>> :::::: The code at line 63 was first introduced by commit
>> :::::: d3e11b4d6ffd363747ac6e6b5522baa9ca5a20c0 x86/intel_rdt: Move CBM specific data into a struct
>>
>
>So the compiler fails to handle the anon union, which was introduced in
>05b93417ce5b924. No idea why, but that concept is not new and widely used
>in the kernel already.
It looks like a problem with gcc 4.4:
Bug 42875 - gcc disallows named initializers for anonymous unions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42875
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676
gcc-4.4.3 lets you statically initialize named fields, and
lets you assign to anonymous union members, but you cannot
statically initialize a named member of an anonymous union.
Thanks,
Fengguang
next prev parent reply other threads:[~2017-04-17 2:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-14 21:12 kbuild test robot
2017-04-15 5:40 ` Thomas Gleixner
2017-04-17 2:00 ` Fengguang Wu [this message]
2017-04-17 8:11 ` [kbuild-all] " Thomas Gleixner
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=20170417020050.chexrahs3xmayaft@wfg-t540p.sh.intel.com \
--to=fengguang.wu@intel.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tipbuild@zytor.com \
--cc=vikas.shivappa@linux.intel.com \
/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
all inboxes | Powered by JetHome®