mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Tsoy <alexander@tsoy.me>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Dave Hansen <dave.hansen@intel.com>, Greg KH <greg@kroah.com>,
	Andy Lutomirski <luto@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@suse.de>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Borislav Petkov <bp@alien8.de>, Borislav Petkov <bpetkov@suse.de>,
	Brian Gerst <brgerst@gmail.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	David Laight <David.Laight@aculab.com>,
	Denys Vlasenko <dvlasenk@redhat.com>,
	Eduardo Valentin <eduval@amazon.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Juergen Gross <jgross@suse.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Rik van Riel <riel@redhat.com>, Will Deacon <will.deacon@arm.com>,
	"Liguori, Anthony" <aliguori@amazon.com>,
	Daniel Gruss <daniel.gruss@iaik.tugraz.at>,
	Hugh Dickins <hughd@google.com>, Kees Cook <keescook@google.com>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>
Subject: Re: 4.14.9 with CONFIG_MCORE2 fails to boot
Date: Sat, 30 Dec 2017 00:50:57 +0300	[thread overview]
Message-ID: <1514584257.28262.13.camel@tsoy.me> (raw)
In-Reply-To: <CA+55aFxEQm2DCUFZ4aS=EEsk9uBSDwZo0ExFsQjPRcHcX-R5kw@mail.gmail.com>

В Пт, 29/12/2017 в 12:34 -0800, Linus Torvalds пишет:
> On Fri, Dec 29, 2017 at 12:22 PM, Alexander Tsoy <alexander@tsoy.me>
> wrote:
> > > But double-checking that "-march=core2" case is definitely worth
> > > looking into. Especially since there are clear indications that
> > > it's
> > > gcc version-dependent anyway. Alexander?
> > 
> > Yes, the change suggested by Dave makes the problem go away.
> 
> Ok, that's good information.
> 
> It doesn't really explain *why* that commit 7f2590a110b8
> ("x86/entry/64: Use a per-CPU trampoline stack for IDT entries") ends
> up being sensitive to that compiler option, though.
> 
> So it narrows the cause down, but it doesn't really root-cause the
> problem. It tends to be almost impossible to find differences in code
> generation, because they are generally all over.
> 
> Ho humm. What happens if you change the "-march=core2" to
> "-mtune=core2"? Does it still boot?
> 
> Because maybe the actual differences that "-march=core2" generates
> might be easier to see when compared to "-mtune=core2".

That's interesting. Compiled with -mtune=core2, the kernel fails to
boot.

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 3e73bc255e4e..f4d8f9497666 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -127,8 +127,7 @@ else
         cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
         cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)
 
-        cflags-$(CONFIG_MCORE2) += \
-                $(call cc-option,-march=core2,$(call cc-option,-
mtune=generic))
+        cflags-$(CONFIG_MCORE2) += $(call cc-option,-mtune=core2)
    cflags-$(CONFIG_MATOM) += $(call cc-option,-march=atom) \
        $(call cc-option,-mtune=atom,$(call cc-option,-mtune=generic))
         cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-
mtune=generic)

  reply	other threads:[~2017-12-29 21:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-28  9:33 Alexander Tsoy
2017-12-29  9:17 ` Greg KH
2017-12-29 14:31   ` Alexander Tsoy
2017-12-29 14:41     ` Alexander Tsoy
2017-12-29 16:11       ` Thomas Gleixner
2017-12-29 16:59         ` Alexander Tsoy
2017-12-29 17:32       ` Dave Hansen
2017-12-29 18:46         ` Alexander Tsoy
2017-12-30  1:04           ` Dave Hansen
2017-12-30  1:32             ` Alexander Tsoy
2017-12-29 19:31         ` Linus Torvalds
2017-12-29 20:22           ` Alexander Tsoy
2017-12-29 20:34             ` Linus Torvalds
2017-12-29 21:50               ` Alexander Tsoy [this message]
2017-12-29 22:09                 ` Linus Torvalds
2017-12-29 23:15                   ` Alexander Tsoy
2017-12-29 23:56                     ` Linus Torvalds

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=1514584257.28262.13.camel@tsoy.me \
    --to=alexander@tsoy.me \
    --cc=David.Laight@aculab.com \
    --cc=aliguori@amazon.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=bp@suse.de \
    --cc=bpetkov@suse.de \
    --cc=brgerst@gmail.com \
    --cc=daniel.gruss@iaik.tugraz.at \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dvlasenk@redhat.com \
    --cc=eduval@amazon.com \
    --cc=greg@kroah.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=hughd@google.com \
    --cc=jgross@suse.com \
    --cc=jpoimboe@redhat.com \
    --cc=keescook@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=will.deacon@arm.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®