public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom•net>
To: Paul Mackerras <paulus@samba•org>
Cc: linuxppc-dev@ozlabs•org, torvalds@linux-foundation•org
Subject: [PATCH] [POWERPC] Fix compilation for CONFIG_DEBUGGER=n and CONFIG_KEXEC=y
Date: Wed, 30 Jan 2008 21:34:47 -0600	[thread overview]
Message-ID: <20080131033447.GA28125@lixom.net> (raw)
In-Reply-To: <18337.8955.539106.868486@cargo.ozlabs.ibm.com>

Looks like "[POWERPC] kdump shutdown hook support" broke builds when
CONFIG_DEBUGGER=n and CONFIG_KEXEC=y, such as in g5_defconfig:

arch/powerpc/kernel/crash.c: In function 'default_machine_crash_shutdown':
arch/powerpc/kernel/crash.c:388: error: '__debugger_fault_handler' undeclared (first use in this function)
arch/powerpc/kernel/crash.c:388: error: (Each undeclared identifier is reported only once
arch/powerpc/kernel/crash.c:388: error: for each function it appears in.)

Move the debugger hooks to under CONFIG_DEBUGGER || CONFIG_KEXEC, since
that's when the crash code is enabled.

(I should have caught this with my build-script pre-merge, my bad. :( )


Signed-off-by: Olof Johansson <olof@lixom•net>


diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 848a204..4b5b7ff 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -54,7 +54,7 @@
 #endif
 #include <asm/kexec.h>
 
-#ifdef CONFIG_DEBUGGER
+#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
 int (*__debugger)(struct pt_regs *regs);
 int (*__debugger_ipi)(struct pt_regs *regs);
 int (*__debugger_bpt)(struct pt_regs *regs);
diff --git a/include/asm-powerpc/system.h b/include/asm-powerpc/system.h
index bc9739d..8d37283 100644
--- a/include/asm-powerpc/system.h
+++ b/include/asm-powerpc/system.h
@@ -65,7 +65,7 @@
 struct task_struct;
 struct pt_regs;
 
-#ifdef CONFIG_DEBUGGER
+#if defined(CONFIG_DEBUGGER) || defined(CONFIG_KEXEC)
 
 extern int (*__debugger)(struct pt_regs *regs);
 extern int (*__debugger_ipi)(struct pt_regs *regs);

  reply	other threads:[~2008-01-31  3:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-31  1:23 Please pull powerpc.git for-2.6.25 branch Paul Mackerras
2008-01-31  3:34 ` Olof Johansson [this message]
2008-01-31  6:41 ` [PATCH] [POWERPC] Set dma_data correctly for direct_ops on pasemi Olof Johansson
2008-01-31 12:38   ` Michael Ellerman
2008-01-31 16:18     ` Olof Johansson
2008-01-31 16:25   ` [PATCH v2] " Olof Johansson
2008-01-31 23:50   ` [PATCH] [POWERPC] pasemi: Fix thinko in dma_direct_ops setup Olof Johansson
2008-02-01  7:56     ` Michael Ellerman

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=20080131033447.GA28125@lixom.net \
    --to=olof@lixom$(echo .)net \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=paulus@samba$(echo .)org \
    --cc=torvalds@linux-foundation$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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