linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell Leidich" <rml@google.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"Ingo Molnar" <mingo@elte.hu>, "Pavel Machek" <pavel@suse.cz>,
	"Len Brown" <lenb@kernel.org>,
	"Marcin Slusarz" <marcin.slusarz@gmail.com>
Subject: Re: 2.6.25-rc2-mm1: build failure (x86)
Date: Tue, 19 Feb 2008 10:51:35 -0800	[thread overview]
Message-ID: <3f1a065b0802191051k2c89ecdek769c83d628fac4b4@mail.gmail.com> (raw)
In-Reply-To: <20080217095641.GB6054@joi>

On Feb 17, 2008 1:56 AM, Marcin Slusarz <marcin.slusarz@gmail.com> wrote:
> On Sun, Feb 17, 2008 at 02:37:09AM +0100, Rafael J. Wysocki wrote:
> > On Saturday, 16 of February 2008, Marcin Slusarz wrote:
> > > On Sat, Feb 16, 2008 at 03:09:49AM -0800, Andrew Morton wrote:
> > > > On Sat, 16 Feb 2008 11:59:07 +0100 Marcin Slusarz <marcin.slusarz@gmail.com> wrote:
> > > >
> > > > > arch/x86/kernel/built-in.o: In function `amd_smp_thermal_interrupt':
> > > > > (.text+0xe03b): undefined reference to `mce_log_therm_throt_event'
> > > > > arch/x86/kernel/built-in.o: In function `acpi_save_state_mem':
> > > > > (.text+0x12239): undefined reference to `setup_trampoline'
> > > > >
> > > > > #
> > > > > # Automatically generated make config: don't edit
> > > > > # Linux kernel version: 2.6.25-rc2-mm1
> > > > > # Sat Feb 16 11:32:49 2008
> > > >
> > > > ho hum, thanks.  I think I'll drop x86-amd-thermal-interrupt-support.patch.
> > > >  I don't think it's the final version anwyay.
> > > >
> > > Ok, I had to revert x86-remove-pt_regs-arg-from-smp_thermal_interrupt before x86-amd-thermal-interrupt-support.
> > >
> > > Second error vanished when I reverted "suspend: wakeup code in C".
> >
> > The appended patch should fix the second error.

Thanks for fixing this, Rafael.

I must admit that I'm puzzled as to why this should fail, since my
Kconfig change forces K8_NB=y when X86_MCE_AMD=y -- unless this is a
discussion of my earlier patch, which did not include this change.

Anyhow, I'm pleased that you've created a fix which seems to solve the problem.

> Yes, it did.
>
>
> > Thanks,
> > Rafael
> >
> > ---
> > On x86-64 the CPU trampoline code is now used while waking up from ACPI
> > suspend to RAM.  For this reason, make it depend on
> > (64BIT && ACPI_SLEEP) as well as on SMP, move the relevant declarations
> > to a separate header and move the definition of setup_trampoline() from
> > smpboot_64.c .
> >
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > ---
> >  arch/x86/Kconfig             |    2 +-
> >  arch/x86/kernel/acpi/sleep.c |    1 -
> >  arch/x86/kernel/acpi/sleep.h |    3 ++-
> >  arch/x86/kernel/e820_64.c    |    5 +++--
> >  arch/x86/kernel/setup_64.c   |   16 ++++++++++++++++
> >  arch/x86/kernel/smpboot_64.c |   23 ++---------------------
> >  include/asm-x86/smp_64.h     |    2 --
> >  include/asm-x86/trampoline.h |   18 ++++++++++++++++++
> >  8 files changed, 42 insertions(+), 28 deletions(-)
> >
> > Index: linux-2.6.25-rc2-mm1/arch/x86/Kconfig
> > ===================================================================
> > --- linux-2.6.25-rc2-mm1.orig/arch/x86/Kconfig
> > +++ linux-2.6.25-rc2-mm1/arch/x86/Kconfig
> > @@ -180,7 +180,7 @@ config X86_BIOS_REBOOT
> >
> >  config X86_TRAMPOLINE
> >       bool
> > -     depends on X86_SMP || (X86_VOYAGER && SMP)
> > +     depends on X86_SMP || (X86_VOYAGER && SMP) || (64BIT && ACPI_SLEEP)
> >       default y
> >
> >  config KTIME_SCALAR
> > Index: linux-2.6.25-rc2-mm1/arch/x86/kernel/e820_64.c
> > ===================================================================
> > --- linux-2.6.25-rc2-mm1.orig/arch/x86/kernel/e820_64.c
> > +++ linux-2.6.25-rc2-mm1/arch/x86/kernel/e820_64.c
> > @@ -27,6 +27,7 @@
> >  #include <asm/setup.h>
> >  #include <asm/sections.h>
> >  #include <asm/kdebug.h>
> > +#include <asm/trampoline.h>
> >
> >  struct e820map e820;
> >
> > @@ -58,8 +59,8 @@ struct early_res {
> >  };
> >  static struct early_res early_res[MAX_EARLY_RES] __initdata = {
> >       { 0, PAGE_SIZE, "BIOS data page" },                     /* BIOS data page */
> > -#ifdef CONFIG_SMP
> > -     { SMP_TRAMPOLINE_BASE, SMP_TRAMPOLINE_BASE + 2*PAGE_SIZE, "SMP_TRAMPOLINE" },
> > +#ifdef CONFIG_X86_TRAMPOLINE
> > +     { TRAMPOLINE_BASE, TRAMPOLINE_BASE + 2 * PAGE_SIZE, "TRAMPOLINE" },
> >  #endif
> >       {}
> >  };
> > Index: linux-2.6.25-rc2-mm1/arch/x86/kernel/smpboot_64.c
> > ===================================================================
> > --- linux-2.6.25-rc2-mm1.orig/arch/x86/kernel/smpboot_64.c
> > +++ linux-2.6.25-rc2-mm1/arch/x86/kernel/smpboot_64.c
> > @@ -59,6 +59,7 @@
> >  #include <asm/irq.h>
> >  #include <asm/hw_irq.h>
> >  #include <asm/numa.h>
> > +#include <asm/trampoline.h>
> >
> >  /* Number of siblings per CPU package */
> >  int smp_num_siblings = 1;
> > @@ -96,13 +97,6 @@ EXPORT_PER_CPU_SYMBOL(cpu_sibling_map);
> >  DEFINE_PER_CPU(cpumask_t, cpu_core_map);
> >  EXPORT_PER_CPU_SYMBOL(cpu_core_map);
> >
> > -/*
> > - * Trampoline 80x86 program as an array.
> > - */
> > -
> > -extern const unsigned char trampoline_data[];
> > -extern const unsigned char trampoline_end[];
> > -
> >  /* State of each CPU */
> >  DEFINE_PER_CPU(int, cpu_state) = { 0 };
> >
> > @@ -127,19 +121,6 @@ struct task_struct *idle_thread_array[NR
> >
> >
> >  /*
> > - * Currently trivial. Write the real->protected mode
> > - * bootstrap into the page concerned. The caller
> > - * has made sure it's suitably aligned.
> > - */
> > -
> > -unsigned long __cpuinit setup_trampoline(void)
> > -{
> > -     void *tramp = __va(SMP_TRAMPOLINE_BASE);
> > -     memcpy(tramp, trampoline_data, trampoline_end - trampoline_data);
> > -     return virt_to_phys(tramp);
> > -}
> > -
> > -/*
> >   * The bootstrap kernel entry code has set these up. Save them for
> >   * a given CPU
> >   */
> > @@ -690,7 +671,7 @@ do_rest:
> >                       Dprintk("CPU has booted.\n");
> >               } else {
> >                       boot_error = 1;
> > -                     if (*((volatile unsigned char *)phys_to_virt(SMP_TRAMPOLINE_BASE))
> > +                     if (*((unsigned char *)phys_to_virt(TRAMPOLINE_BASE))
> >                                       == 0xA5)
> >                               /* trampoline started but...? */
> >                               printk("Stuck ??\n");
> > Index: linux-2.6.25-rc2-mm1/include/asm-x86/smp_64.h
> > ===================================================================
> > --- linux-2.6.25-rc2-mm1.orig/include/asm-x86/smp_64.h
> > +++ linux-2.6.25-rc2-mm1/include/asm-x86/smp_64.h
> > @@ -47,8 +47,6 @@ static inline int cpu_present_to_apicid(
> >
> >  #ifdef CONFIG_SMP
> >
> > -#define SMP_TRAMPOLINE_BASE 0x6000
> > -
> >  extern int __cpu_disable(void);
> >  extern void __cpu_die(unsigned int cpu);
> >  extern void prefill_possible_map(void);
> > Index: linux-2.6.25-rc2-mm1/arch/x86/kernel/acpi/sleep.h
> > ===================================================================
> > --- linux-2.6.25-rc2-mm1.orig/arch/x86/kernel/acpi/sleep.h
> > +++ linux-2.6.25-rc2-mm1/arch/x86/kernel/acpi/sleep.h
> > @@ -2,6 +2,8 @@
> >   *   Variables and functions used by the code in sleep.c
> >   */
> >
> > +#include <asm/trampoline.h>
> > +
> >  extern char wakeup_code_start, wakeup_code_end;
> >
> >  extern unsigned long saved_video_mode;
> > @@ -13,5 +15,4 @@ extern int wakeup_pmode_return;
> >  extern char swsusp_pg_dir[PAGE_SIZE];
> >
> >  extern unsigned long acpi_copy_wakeup_routine(unsigned long);
> > -extern unsigned long setup_trampoline(void);
> >  extern void wakeup_long64(void);
> > Index: linux-2.6.25-rc2-mm1/arch/x86/kernel/setup_64.c
> > ===================================================================
> > --- linux-2.6.25-rc2-mm1.orig/arch/x86/kernel/setup_64.c
> > +++ linux-2.6.25-rc2-mm1/arch/x86/kernel/setup_64.c
> > @@ -66,6 +66,7 @@
> >  #include <asm/mce.h>
> >  #include <asm/ds.h>
> >  #include <asm/topology.h>
> > +#include <asm/trampoline.h>
> >
> >  #ifdef CONFIG_PARAVIRT
> >  #include <asm/paravirt.h>
> > @@ -1184,3 +1185,18 @@ const struct seq_operations cpuinfo_op =
> >       .stop = c_stop,
> >       .show = show_cpuinfo,
> >  };
> > +
> > +#ifdef CONFIG_X86_TRAMPOLINE
> > +/*
> > + * Currently trivial. Write the real->protected mode
> > + * bootstrap into the page concerned. The caller
> > + * has made sure it's suitably aligned.
> > + */
> > +
> > +unsigned long setup_trampoline(void)
> > +{
> > +     void *tramp = __va(TRAMPOLINE_BASE);
> > +     memcpy(tramp, trampoline_data, trampoline_end - trampoline_data);
> > +     return virt_to_phys(tramp);
> > +}
> > +#endif /* CONFIG_X86_TRAMPOLINE */
> > Index: linux-2.6.25-rc2-mm1/arch/x86/kernel/acpi/sleep.c
> > ===================================================================
> > --- linux-2.6.25-rc2-mm1.orig/arch/x86/kernel/acpi/sleep.c
> > +++ linux-2.6.25-rc2-mm1/arch/x86/kernel/acpi/sleep.c
> > @@ -10,7 +10,6 @@
> >  #include <linux/dmi.h>
> >  #include <linux/cpumask.h>
> >
> > -#include <asm/smp.h>
> >  #include "realmode/wakeup.h"
> >  #include "sleep.h"
> >
> > Index: linux-2.6.25-rc2-mm1/include/asm-x86/trampoline.h
> > ===================================================================
> > --- /dev/null
> > +++ linux-2.6.25-rc2-mm1/include/asm-x86/trampoline.h
> > @@ -0,0 +1,18 @@
> > +#ifndef __TRAMPOLINE_HEADER
> > +#define __TRAMPOLINE_HEADER
> > +
> > +#ifndef __ASSEMBLY__
> > +
> > +#define TRAMPOLINE_BASE 0x6000
> > +
> > +/*
> > + * Trampoline 80x86 program as an array.
> > + */
> > +extern const unsigned char trampoline_data[];
> > +extern const unsigned char trampoline_end[];
> > +
> > +extern unsigned long setup_trampoline(void);
> > +
> > +#endif /* __ASSEMBLY__ */
> > +
> > +#endif /* __TRAMPOLINE_HEADER */
>



-- 
Russell Leidich

  reply	other threads:[~2008-02-19 18:51 UTC|newest]

Thread overview: 134+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-16  8:25 2.6.25-rc2-mm1 Andrew Morton
2008-02-16 10:59 ` 2.6.25-rc2-mm1: build failure (x86) Marcin Slusarz
2008-02-16 11:09   ` Andrew Morton
2008-02-16 11:37     ` Marcin Slusarz
2008-02-17  0:22       ` Rafael J. Wysocki
2008-02-17  9:54         ` Marcin Slusarz
2008-02-17  1:37       ` Rafael J. Wysocki
2008-02-17  9:56         ` Marcin Slusarz
2008-02-19 18:51           ` Russell Leidich [this message]
2008-02-16 16:15 ` [BUG] 2.6.25-rc2-mm1 - kernel oops while bootup on s390x Kamalesh Babulal
2008-02-16 19:45   ` Andrew Morton
2008-02-16 19:49     ` Thomas Gleixner
2008-02-16 19:50       ` Thomas Gleixner
2008-02-17  3:40         ` Kamalesh Babulal
2008-02-17  9:06           ` Heiko Carstens
2008-02-18 14:08             ` Kamalesh Babulal
2008-02-16 17:21 ` 2.6.25-rc2-mm1 Randy Dunlap
2008-02-16 17:31 ` [PATCH]2.6.25-rc2-mm1 - Build Failure at security/keys/compat.c on powerpc Kamalesh Babulal
2008-02-16 17:48 ` 2.6.25-rc2-mm1 (wakeup) Randy Dunlap
2008-02-17  1:18   ` Rafael J. Wysocki
2008-02-17  1:22     ` H. Peter Anvin
2008-02-17  2:19       ` Randy Dunlap
2008-02-17  3:58         ` H. Peter Anvin
2008-02-17  4:38           ` [PATCH v2] " Randy Dunlap
2008-02-17  4:35             ` H. Peter Anvin
2008-02-17  4:47               ` Randy Dunlap
2008-02-17 20:40                 ` Rafael J. Wysocki
2008-02-17 21:07                   ` Sam Ravnborg
2008-02-17 21:21                     ` H. Peter Anvin
2008-02-17 21:28                       ` Sam Ravnborg
2008-02-17 21:31                         ` H. Peter Anvin
2008-02-17 21:46                           ` Sam Ravnborg
2008-02-17 21:20                   ` H. Peter Anvin
2008-02-16 19:47 ` [BUILD_FAILURE] 2.6.25-rc2-mm1 - Build Failure at acpi_os Kamalesh Babulal
2008-02-16 20:01   ` Laura Garcia
2008-02-21  7:08   ` Len Brown
2008-02-21 18:54     ` Nish Aravamudan
2008-02-21 22:22       ` Sam Ravnborg
2008-02-22  1:38         ` Nish Aravamudan
2008-02-22 18:08           ` Sam Ravnborg
2008-02-22 18:12             ` Nish Aravamudan
2008-02-22 18:13             ` Randy Dunlap
2008-02-22 18:21               ` Nish Aravamudan
2008-02-22 18:27               ` Sam Ravnborg
2008-02-22 18:29                 ` Randy Dunlap
2008-02-22 18:56                   ` Sam Ravnborg
2008-02-22 19:25                     ` [PATCH] " Randy Dunlap
2008-02-23  5:41                       ` Len Brown
2008-02-23 15:33                       ` Kamalesh Babulal
2008-02-16 21:27 ` 2.6.25-rc2-mm1: WARNING at arch/x86/mm/ioremap.c:129 Laurent Riffard
2008-02-16 21:52   ` Arjan van de Ven
2008-02-18  4:58     ` Brown, Len
2008-02-18  5:18       ` Arjan van de Ven
2008-02-18 19:35   ` Arjan van de Ven
2008-02-18 21:05     ` Laurent Riffard
2008-02-18 21:12       ` Arjan van de Ven
2008-02-24  0:44   ` Gabriel C
2008-02-24  2:50     ` Arjan van de Ven
2008-02-25 16:31       ` Gabriel C
2008-02-25 22:44         ` Arjan van de Ven
2008-02-25 23:33           ` Gabriel C
2008-02-25 23:59             ` Gabriel C
2008-03-01 15:40               ` Mirco Tischler
2008-03-02 15:53           ` Fabio Checconi
2008-03-02 16:58             ` Arjan van de Ven
2008-03-03  8:46               ` Ingo Molnar
2008-03-03  8:47                 ` Ingo Molnar
2008-03-03 10:21                 ` Fabio Checconi
2008-03-02 20:40             ` Laurent Riffard
2008-03-02 23:35               ` Mirco Tischler
2008-02-17  4:10 ` [BUG] 2.6.25-rc2-mm1 - Kernel panic while bootup caused by signal_group_exit() Kamalesh Babulal
2008-02-17  4:50   ` Andrew Morton
2008-02-17  5:02     ` Kamalesh Babulal
2008-02-17 12:41   ` Oleg Nesterov
2008-02-20 19:34   ` Rik van Riel
2008-02-20 20:04     ` Oleg Nesterov
2008-02-20 22:53       ` Rik van Riel
2008-02-28 13:13         ` Cedric Le Goater
2008-02-20 20:07     ` Alan Cox
2008-02-17  5:08 ` 2.6.25-rc2-mm1 Kamalesh Babulal
2008-02-17  5:24   ` 2.6.25-rc2-mm1 Andrew Morton
2008-02-17  7:36     ` 2.6.25-rc2-mm1 Kamalesh Babulal
2008-02-17  5:16 ` 2.6.25-rc2-mm1 (x64 thermal build failure) Randy Dunlap
2008-02-17  5:44   ` Andrew Morton
2008-02-18 10:15     ` Thomas Petazzoni
2008-02-18 12:13       ` Andrew Morton
2008-02-19 15:55         ` Thomas Petazzoni
2008-02-19 17:41           ` Randy Dunlap
2008-02-19 22:00             ` Thomas Petazzoni
2008-02-19 22:05               ` Randy Dunlap
2008-02-19 23:21           ` Andrew Morton
2008-02-20  7:21             ` Thomas Petazzoni
2008-02-20  9:55               ` Andrew Morton
2008-02-17  5:32 ` 2.6.25-rc2-mm1 (build failure) Randy Dunlap
2008-02-17  5:46   ` Andrew Morton
2008-02-17 19:52     ` Pavel Machek
2008-02-17 20:12       ` Rafael J. Wysocki
2008-02-17 11:23   ` Rafael J. Wysocki
2008-02-17 17:54     ` Randy Dunlap
2008-02-17  6:25 ` 2.6.25-rc2-mm1 Joel Becker
2008-02-17  6:32   ` 2.6.25-rc2-mm1 Joel Becker
2008-02-17  6:51   ` 2.6.25-rc2-mm1 Andrew Morton
2008-02-17 10:50 ` 2.6.25-rc2-mm1: new create_proc_entry() users Alexey Dobriyan
2008-02-18 13:01   ` Andrew Morton
2008-02-18 16:13   ` Daniel Walker
2008-02-19 22:25   ` Miller, Mike (OS Dev)
2008-02-19 23:59     ` Andrew Morton
2008-02-18  0:14 ` 2.6.25-rc2-mm1 (cifs build errs) Randy Dunlap
2008-02-18  4:10   ` Steve French
2008-02-18  0:16 ` 2.6.25-rc2-mm1 Randy Dunlap
2008-02-18  9:34   ` 2.6.25-rc2-mm1 Andrew Morton
2008-02-18  5:17 ` 2.6.25-rc2-mm1 (x86 MCE build error) Randy Dunlap
2008-02-18  6:03   ` Yinghai Lu
2008-02-18 13:31   ` Adrian Bunk
2008-02-18 17:13 ` 2.6.25-rc2-mm1 (cciss " Randy Dunlap
2008-02-19  0:08 ` 2.6.25-rc2-mm1 Kevin Winchester
2008-02-19  0:15   ` 2.6.25-rc2-mm1 Andrew Morton
2008-02-19  0:22     ` 2.6.25-rc2-mm1 Steven Rostedt
2008-02-19  1:15       ` 2.6.25-rc2-mm1 Kevin Winchester
2008-02-20 21:14 ` 2.6.25-rc2-mm1 - several bugs and a crash Tilman Schmidt
2008-02-20 21:50   ` Patrick McHardy
2008-02-21 11:28   ` Patrick McHardy
2008-02-21 16:32     ` Stephen Hemminger
2008-02-21 16:34       ` Patrick McHardy
2008-02-22  0:40     ` Tilman Schmidt
2008-02-22  0:52       ` Tilman Schmidt
2008-02-22 17:09         ` Paul E. McKenney
2008-02-25  8:54           ` Tilman Schmidt
2008-02-27 16:37     ` nf_conntrack fix smp_processor_id() in preemptible code (was: 2.6.25-rc2-mm1 - several bugs and a crash) Tilman Schmidt
2008-02-27 16:47       ` nf_conntrack fix smp_processor_id() in preemptible code Patrick McHardy
2008-02-21 12:38   ` 2.6.25-rc2-mm1 - several bugs and a crash Andrew Morton
2008-02-21 16:46     ` Christoph Hellwig
2008-02-22  0:10       ` Tilman Schmidt
2008-02-21 19:36     ` Dave Hansen

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=3f1a065b0802191051k2c89ecdek769c83d628fac4b4@mail.gmail.com \
    --to=rml@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcin.slusarz@gmail.com \
    --cc=mingo@elte.hu \
    --cc=pavel@suse.cz \
    --cc=rjw@sisk.pl \
    /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).