From: Andrew Morton <akpm@osdl.org>
To: "Fernando Luis Vázquez Cao" <fernando@oss.ntt.co.jp>
Cc: vgoyal@in.ibm.com, ebiederm@xmission.com, ak@suse.de,
James.Bottomley@steeleye.com, linux-kernel@vger.kernel.org,
fastboot@lists.osdl.org
Subject: Re: [PATCH 1/4] stack overflow safe kdump (2.6.18-rc1-i386) - safe_smp_processor_id
Date: Tue, 11 Jul 2006 23:46:05 -0700 [thread overview]
Message-ID: <20060711234605.86fd8c98.akpm@osdl.org> (raw)
In-Reply-To: <1152597918.2414.54.camel@localhost.localdomain>
On Tue, 11 Jul 2006 15:05:18 +0900
Fernando Luis Vázquez Cao <fernando@oss.ntt.co.jp> wrote:
> ...
With CONFIG_SMP=n:
arch/i386/kernel/crash.c: In function 'crash_save_self':
arch/i386/kernel/crash.c:91: warning: implicit declaration of function 'safe_smp_processor_id'
And it fails to link.
> --- linux-2.6.18-rc1/include/asm-i386/smp.h 2006-07-11 10:11:44.000000000 +0900
> +++ linux-2.6.18-rc1-sof/include/asm-i386/smp.h 2006-07-11 14:05:28.000000000 +0900
> @@ -89,12 +89,14 @@ static __inline int logical_smp_processo
>
> #endif
>
> +extern int safe_smp_processor_id(void);
> extern int __cpu_disable(void);
> extern void __cpu_die(unsigned int cpu);
> #endif /* !__ASSEMBLY__ */
>
> #else /* CONFIG_SMP */
>
> +#define safe_smp_processor_id() 0
> #define cpu_physical_id(cpu) boot_cpu_physical_apicid
>
> #define NO_PROC_ID 0xFF /* No processor magic marker */
The reason for this is that include/linux/smp.h only includes asm/smp.h if
CONFIG_SMP=y. This is not the cleverest thing we've ever done.
I fixed that in cowardly fashion:
--- a/arch/i386/kernel/crash.c~stack-overflow-safe-kdump-crash_use_safe_smp_processor_id-fix
+++ a/arch/i386/kernel/crash.c
@@ -23,6 +23,7 @@
#include <asm/hw_irq.h>
#include <asm/apic.h>
#include <asm/kdebug.h>
+#include <asm/smp.h>
#include <mach_ipi.h>
_
next prev parent reply other threads:[~2006-07-12 6:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-11 6:05 Fernando Luis Vázquez Cao
2006-07-12 6:46 ` Andrew Morton [this message]
2006-07-12 6:59 ` Fernando Luis Vázquez Cao
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=20060711234605.86fd8c98.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=James.Bottomley@steeleye.com \
--cc=ak@suse.de \
--cc=ebiederm@xmission.com \
--cc=fastboot@lists.osdl.org \
--cc=fernando@oss.ntt.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@in.ibm.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
Powered by JetHome