From: Linus Torvalds <torvalds@linux-foundation.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: kernel test robot <lkp@intel.com>,
Balbir Singh <sblbir@amazon.com>,
kbuild-all@lists.01.org,
Sparse Mailing-list <linux-sparse@vger.kernel.org>,
Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: Re: [tglx-devel:x86/l1dflush 7/9] arch/x86/mm/tlb.c:354:13: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Tue, 27 Apr 2021 10:00:48 -0700 [thread overview]
Message-ID: <CAHk-=wiJ7_LCn19AGj+8mS5bV1jr4S1_6errsnfoZc0PdCNp9A@mail.gmail.com> (raw)
In-Reply-To: <87r1iwnsha.ffs@nanos.tec.linutronix.de>
On Mon, Apr 26, 2021 at 11:37 PM Thomas Gleixner <tglx@linutronix.de> wrote:
>
> > > 354 if (this_cpu_read(cpu_info.smt_active)) {
>
> That's a valid construct and the kernel of full of percpuvar.member reads/writes.
Hmm. "cpu_info" doesn't seem to be marked as a percpu data structure.
Is this perhaps a UP config? Because we have:
extern struct cpuinfo_x86 boot_cpu_data;
...
#ifdef CONFIG_SMP
DECLARE_PER_CPU_READ_MOSTLY(struct cpuinfo_x86, cpu_info);
#define cpu_data(cpu) per_cpu(cpu_info, cpu)
#else
#define cpu_info boot_cpu_data
#define cpu_data(cpu) boot_cpu_data
#endif
and notice how if CONFIG_SMP isn't set, 'cpu_info' just turns into a
regular non-percpu thing.
But the sparse checking doesn't go away just because it's compiled for UP.
Linus
next prev parent reply other threads:[~2021-04-27 17:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <202104271144.G4fgnYlt-lkp@intel.com>
2021-04-27 6:37 ` [tglx-devel:x86/l1dflush 7/9] arch/x86/mm/tlb.c:354:13: sparse: sparse: incorrect type in initializer (different address spaces) Thomas Gleixner
2021-04-27 17:00 ` Linus Torvalds [this message]
2021-04-27 19:23 ` Luc Van Oostenryck
2021-04-27 19:54 ` 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='CAHk-=wiJ7_LCn19AGj+8mS5bV1jr4S1_6errsnfoZc0PdCNp9A@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-sparse@vger.kernel.org \
--cc=lkp@intel.com \
--cc=luc.vanoostenryck@gmail.com \
--cc=sblbir@amazon.com \
--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;
as well as URLs for NNTP newsgroup(s).