From: Ingo Molnar <mingo@kernel.org>
To: Kevin Winchester <kjwinchester@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>,
Randy Dunlap <rdunlap@xenotime.net>,
Nick Bowler <nbowler@elliptictech.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 1/5] x86: Move per cpu cpu_llc_shared_map to a field in struct cpuinfo_x86
Date: Mon, 7 May 2012 10:32:38 +0200 [thread overview]
Message-ID: <20120507083238.GJ16608@gmail.com> (raw)
In-Reply-To: <CAELBVzCzqZMbmGzE-dNgXogh95SNdvYWE5tHAxy1OYa+kknsCw@mail.gmail.com>
* Kevin Winchester <kjwinchester@gmail.com> wrote:
> On 29 April 2012 20:37, H. Peter Anvin <hpa@zytor.com> wrote:
> > On 04/29/2012 04:33 PM, Kevin Winchester wrote:
> >> Commit 141168c36cde ("x86: Simplify code by removing a !SMP #ifdefs from
> >> 'struct cpuinfo_x86'") caused the compilation error:
> >>
> >> mce_amd.c:(.cpuinit.text+0x4723): undefined reference to 'cpu_llc_shared_map'
> >>
> >> by removing an #ifdef CONFIG_SMP around a block containing a reference
> >> to cpu_llc_shared_map. Rather than replace the #ifdef, move
> >> cpu_llc_shared_map to be a new cpumask_t field llc_shared_map in
> >> struct cpuinfo_x86 and adjust all references to cpu_llc_shared_map.
> >>
> >
> > Okay... I must not get this.
> >
> > Why is this better than just moving the DEFINE_PER_CPU to a place which
> > isn't dependent on SMP?
> >
>
> To be honest, the idea was suggested by Ingo a while back, and
> I just volunteered to implement it. I believe the idea was to
> work towards gathering all CPU-specific data for SMP and !SMP
> into one place. That said, moving the DEFINE_PER_CPU
> elsewhere would likely still give the same benefits as my
> patch in terms of ifdef reduction. I cannot really see a
> benefit/downside either way, really.
>
> Perhaps Ingo will chime in, and you and he (and anyone else
> with an opinion) can figure out the best way of accomplishing
> this simplification, and then I can adjust my series
> accordingly.
Well, cpu_llc_shared_map is really a CPU attribute and as such I
think the logical place for it is "struct cpuinfo_x86". Peter,
any objections to that?
Thanks,
Ingo
next prev parent reply other threads:[~2012-05-07 8:32 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 23:57 [PATCH v4 0/5] x86: Cleanup and simplify cpu-specific data Kevin Winchester
2012-02-23 23:57 ` [PATCH v4 1/5] x86: Move per cpu cpu_llc_shared_map to a field in struct cpuinfo_x86 Kevin Winchester
2012-02-23 23:57 ` [PATCH v4 2/5] x86: Move per cpu cpu_llc_id " Kevin Winchester
2012-02-23 23:57 ` [PATCH v4 3/5] x86: Move per cpu cpu_sibling_map " Kevin Winchester
2012-02-23 23:57 ` [PATCH v4 4/5] x86: Move per cpu cpu_core_map " Kevin Winchester
2012-02-23 23:57 ` [PATCH v4 5/5] x86: Remove #ifdef CONFIG_SMP sections by moving smp_num_siblings into common.c Kevin Winchester
2012-02-24 11:47 ` [PATCH v4 0/5] x86: Cleanup and simplify cpu-specific data Borislav Petkov
2012-02-24 12:22 ` Kevin Winchester
2012-02-24 12:30 ` Borislav Petkov
2012-02-27 11:59 ` Ingo Molnar
2012-02-28 0:52 ` Kevin Winchester
2012-02-28 3:43 ` H. Peter Anvin
2012-02-28 8:24 ` Ingo Molnar
2012-02-28 8:31 ` H. Peter Anvin
2012-03-01 13:06 ` Kevin Winchester
2012-03-01 13:45 ` Ingo Molnar
2012-03-28 22:43 ` [PATCH v5 " Kevin Winchester
2012-03-28 22:43 ` [PATCH v5 1/5] x86: Move per cpu cpu_llc_shared_map to a field in struct cpuinfo_x86 Kevin Winchester
2012-03-28 22:43 ` [PATCH v5 2/5] x86: Move per cpu cpu_llc_id " Kevin Winchester
2012-03-28 22:43 ` [PATCH v5 3/5] x86: Move per cpu cpu_sibling_map " Kevin Winchester
2012-03-28 22:43 ` [PATCH v5 4/5] x86: Move per cpu cpu_core_map " Kevin Winchester
2012-03-28 22:43 ` [PATCH v5 5/5] x86: Remove #ifdef CONFIG_SMP sections by moving smp_num_siblings into common.c Kevin Winchester
2012-04-26 18:09 ` [PATCH v5 0/5] x86: Cleanup and simplify cpu-specific data Kevin Winchester
2012-04-26 19:48 ` H. Peter Anvin
[not found] ` <CAELBVzAi_yndZbDc0TkXhbqzn2wULpnsFMA_dop=Uvaii8tkqg@mail.gmail.com>
2012-04-26 21:21 ` H. Peter Anvin
2012-04-27 23:37 ` Kevin Winchester
2012-04-29 12:47 ` Borislav Petkov
2012-04-29 22:55 ` Kevin Winchester
2012-04-29 23:33 ` [PATCH v6 " Kevin Winchester
2012-04-29 23:33 ` [PATCH v6 1/5] x86: Move per cpu cpu_llc_shared_map to a field in struct cpuinfo_x86 Kevin Winchester
2012-04-29 23:37 ` H. Peter Anvin
2012-04-30 15:05 ` Kevin Winchester
2012-05-07 8:32 ` Ingo Molnar [this message]
2012-04-29 23:33 ` [PATCH v6 2/5] x86: Move per cpu cpu_llc_id " Kevin Winchester
2012-04-29 23:33 ` [PATCH v6 3/5] x86: Move per cpu cpu_sibling_map " Kevin Winchester
2012-04-29 23:33 ` [PATCH v6 4/5] x86: Move per cpu cpu_core_map " Kevin Winchester
2012-04-29 23:33 ` [PATCH v6 5/5] x86: Remove #ifdef CONFIG_SMP sections by moving smp_num_siblings into common.c Kevin Winchester
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=20120507083238.GJ16608@gmail.com \
--to=mingo@kernel.org \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=kjwinchester@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nbowler@elliptictech.com \
--cc=rdunlap@xenotime.net \
--cc=tglx@linutronix.de \
/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®