From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: kernel test robot <fengguang.wu@intel.com>, LKP <lkp@01.org>,
linux-kernel@vger.kernel.org, wfg@linux.intel.com,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: c88d71508e ("x86/boot/64: Rewrite startup_64() in C"): BUG: kernel reboot-without-warning in early-boot stage, last printk: Booting the kernel.
Date: Fri, 16 Jun 2017 14:30:24 +0300 [thread overview]
Message-ID: <20170616113024.ajmif63cmcszry5a@black.fi.intel.com> (raw)
In-Reply-To: <20170616081630.mvc52ku6spchsqj4@gmail.com>
On Fri, Jun 16, 2017 at 10:16:30AM +0200, Ingo Molnar wrote:
>
> * kernel test robot <fengguang.wu@intel.com> wrote:
>
> > Greetings,
> >
> > 0day kernel testing robot got the below dmesg and the first bad commit is
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> >
> > commit c88d71508e36b514413464bd2e01f96f34583a0e
> > Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> > AuthorDate: Tue Jun 6 14:31:26 2017 +0300
> > Commit: Ingo Molnar <mingo@kernel.org>
> > CommitDate: Tue Jun 13 08:56:54 2017 +0200
> >
> > x86/boot/64: Rewrite startup_64() in C
> >
> > The patch write most of startup_64 logic in C.
> >
> > This is preparation for 5-level paging enabling.
> >
> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
>
> Kirill, should I drop the 5-level paging series for now, or is there a fix in the
> works?
The patch below works for me, but I don't really understant all details of
how linking kernel image works.
Please double check that it makes sense.
>From b8c7201e97bbe86e88401376338ed92a5a53859e Mon Sep 17 00:00:00 2001
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Date: Fri, 16 Jun 2017 14:15:44 +0300
Subject: [PATCH] x86/boot/64: Put __startup_64() into .head.text
Put __startup_64() and fixup_pointer() into .head.text section to make
sure it's always near startup_64 and always callable.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
arch/x86/kernel/head64.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 2b2ac381195a..46c3c73e7f43 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -38,12 +38,14 @@ extern pmd_t early_dynamic_pgts[EARLY_DYNAMIC_PAGE_TABLES][PTRS_PER_PMD];
static unsigned int __initdata next_early_pgt;
pmdval_t early_pmd_flags = __PAGE_KERNEL_LARGE & ~(_PAGE_GLOBAL | _PAGE_NX);
-static void __init *fixup_pointer(void *ptr, unsigned long physaddr)
+#define __head __section(.head.text)
+
+static void __head *fixup_pointer(void *ptr, unsigned long physaddr)
{
return ptr - (void *)_text + (void *)physaddr;
}
-void __init __startup_64(unsigned long physaddr)
+void __head __startup_64(unsigned long physaddr)
{
unsigned long load_delta, *p;
pgdval_t *pgd;
--
Kirill A. Shutemov
next prev parent reply other threads:[~2017-06-16 11:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 16:10 kernel test robot
2017-06-16 8:16 ` Ingo Molnar
2017-06-16 9:27 ` Kirill A. Shutemov
2017-06-16 11:30 ` Kirill A. Shutemov [this message]
2017-06-20 13:29 ` [tip:x86/mm] x86/boot/64: Put __startup_64() into .head.text tip-bot for Kirill A. Shutemov
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=20170616113024.ajmif63cmcszry5a@black.fi.intel.com \
--to=kirill.shutemov@linux.intel.com \
--cc=fengguang.wu@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=wfg@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®