From: Jay Lan <jlan@sgi.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: "kexec@lists.infradead.org" <kexec@lists.infradead.org>,
Bernhard Walle <bwalle@suse.de>,
Simon Horman <horms@verge.net.au>,
"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>
Subject: Re: kdump broken on Altix 350
Date: Mon, 29 Sep 2008 17:30:59 -0700 [thread overview]
Message-ID: <48E17343.7060700@sgi.com> (raw)
In-Reply-To: <200809292342.m8TNgq4u004680@agluck-lia64.sc.intel.com>
Luck, Tony wrote:
> Does this make kexec/kdump happier? Bare minimum testing so far
> (builds and boots on tiger ... didn't try kexec yet).
Hi Tony,
Yep, the 2.6.27-rc7 kdump kernel built with this patch worked fine!
Actually you probably can predict the results by doing 'readelf -l
vmlinux'. If the PT_LOAD headers do not have a gap betweens headers,
it is good. In other words, if the (PhysAddr+MemSiz) rounded up to
Align value of one header is the same as the PhysAddr of the next
header, kexec should produce a good boot memmap for the kdump kernel.
Thanks for the patch!
jay
>
>
>
> [IA64] Put the space for cpu0 per-cpu area into .data section
>
> Initial fix for making sure that we can access percpu variables
> in all C code commit: 10617bbe84628eb18ab5f723d3ba35005adde143
> inadvertantly allocated the memory in the "percpu" section of
> the vmlinux ELF executable. This confused kexec.
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
>
> diff --git a/arch/ia64/include/asm/sections.h b/arch/ia64/include/asm/sections.h
> index f667998..1a873b3 100644
> --- a/arch/ia64/include/asm/sections.h
> +++ b/arch/ia64/include/asm/sections.h
> @@ -11,6 +11,9 @@
> #include <asm-generic/sections.h>
>
> extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[];
> +#ifdef CONFIG_SMP
> +extern char __cpu0_per_cpu[];
> +#endif
> extern char __start___vtop_patchlist[], __end___vtop_patchlist[];
> extern char __start___rse_patchlist[], __end___rse_patchlist[];
> extern char __start___mckinley_e9_bundles[], __end___mckinley_e9_bundles[];
> diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S
> index 8bdea8e..66e491d 100644
> --- a/arch/ia64/kernel/head.S
> +++ b/arch/ia64/kernel/head.S
> @@ -367,16 +367,17 @@ start_ap:
> ;;
> #else
> (isAP) br.few 2f
> - mov r20=r19
> - sub r19=r19,r18
> + movl r20=__cpu0_per_cpu
> ;;
> shr.u r18=r18,3
> 1:
> - ld8 r21=[r20],8;;
> - st8[r19]=r21,8
> + ld8 r21=[r19],8;;
> + st8[r20]=r21,8
> adds r18=-1,r18;;
> cmp4.lt p7,p6=0,r18
> (p7) br.cond.dptk.few 1b
> + mov r19=r20
> + ;;
> 2:
> #endif
> tpa r19=r19
> diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
> index de71da8..10a7d47 100644
> --- a/arch/ia64/kernel/vmlinux.lds.S
> +++ b/arch/ia64/kernel/vmlinux.lds.S
> @@ -215,9 +215,6 @@ SECTIONS
> /* Per-cpu data: */
> percpu : { } :percpu
> . = ALIGN(PERCPU_PAGE_SIZE);
> -#ifdef CONFIG_SMP
> - . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */
> -#endif
> __phys_per_cpu_start = .;
> .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET)
> {
> @@ -233,6 +230,11 @@ SECTIONS
> data : { } :data
> .data : AT(ADDR(.data) - LOAD_OFFSET)
> {
> +#ifdef CONFIG_SMP
> + . = ALIGN(PERCPU_PAGE_SIZE);
> + __cpu0_per_cpu = .;
> + . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */
> +#endif
> DATA_DATA
> *(.data1)
> *(.gnu.linkonce.d*)
> diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
> index e566ff4..0ee085e 100644
> --- a/arch/ia64/mm/contig.c
> +++ b/arch/ia64/mm/contig.c
> @@ -163,7 +163,7 @@ per_cpu_init (void)
> * get_zeroed_page().
> */
> if (first_time) {
> - void *cpu0_data = __phys_per_cpu_start - PERCPU_PAGE_SIZE;
> + void *cpu0_data = __cpu0_per_cpu;
>
> first_time=0;
>
> diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
> index 78026aa..d8c5fcd 100644
> --- a/arch/ia64/mm/discontig.c
> +++ b/arch/ia64/mm/discontig.c
> @@ -144,7 +144,7 @@ static void *per_cpu_node_setup(void *cpu_data, int node)
>
> for_each_possible_early_cpu(cpu) {
> if (cpu == 0) {
> - void *cpu0_data = __phys_per_cpu_start - PERCPU_PAGE_SIZE;
> + void *cpu0_data = __cpu0_per_cpu;
> __per_cpu_offset[cpu] = (char*)cpu0_data -
> __per_cpu_start;
> } else if (node == node_cpuid[cpu].nid) {
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: Jay Lan <jlan@sgi.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: "kexec@lists.infradead.org" <kexec@lists.infradead.org>,
Bernhard Walle <bwalle@suse.de>,
Simon Horman <horms@verge.net.au>,
"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>
Subject: Re: kdump broken on Altix 350
Date: Tue, 30 Sep 2008 00:30:59 +0000 [thread overview]
Message-ID: <48E17343.7060700@sgi.com> (raw)
In-Reply-To: <200809292342.m8TNgq4u004680@agluck-lia64.sc.intel.com>
Luck, Tony wrote:
> Does this make kexec/kdump happier? Bare minimum testing so far
> (builds and boots on tiger ... didn't try kexec yet).
Hi Tony,
Yep, the 2.6.27-rc7 kdump kernel built with this patch worked fine!
Actually you probably can predict the results by doing 'readelf -l
vmlinux'. If the PT_LOAD headers do not have a gap betweens headers,
it is good. In other words, if the (PhysAddr+MemSiz) rounded up to
Align value of one header is the same as the PhysAddr of the next
header, kexec should produce a good boot memmap for the kdump kernel.
Thanks for the patch!
jay
>
>
>
> [IA64] Put the space for cpu0 per-cpu area into .data section
>
> Initial fix for making sure that we can access percpu variables
> in all C code commit: 10617bbe84628eb18ab5f723d3ba35005adde143
> inadvertantly allocated the memory in the "percpu" section of
> the vmlinux ELF executable. This confused kexec.
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
>
> diff --git a/arch/ia64/include/asm/sections.h b/arch/ia64/include/asm/sections.h
> index f667998..1a873b3 100644
> --- a/arch/ia64/include/asm/sections.h
> +++ b/arch/ia64/include/asm/sections.h
> @@ -11,6 +11,9 @@
> #include <asm-generic/sections.h>
>
> extern char __per_cpu_start[], __per_cpu_end[], __phys_per_cpu_start[];
> +#ifdef CONFIG_SMP
> +extern char __cpu0_per_cpu[];
> +#endif
> extern char __start___vtop_patchlist[], __end___vtop_patchlist[];
> extern char __start___rse_patchlist[], __end___rse_patchlist[];
> extern char __start___mckinley_e9_bundles[], __end___mckinley_e9_bundles[];
> diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S
> index 8bdea8e..66e491d 100644
> --- a/arch/ia64/kernel/head.S
> +++ b/arch/ia64/kernel/head.S
> @@ -367,16 +367,17 @@ start_ap:
> ;;
> #else
> (isAP) br.few 2f
> - mov r20=r19
> - sub r19=r19,r18
> + movl r20=__cpu0_per_cpu
> ;;
> shr.u r18=r18,3
> 1:
> - ld8 r21=[r20],8;;
> - st8[r19]=r21,8
> + ld8 r21=[r19],8;;
> + st8[r20]=r21,8
> adds r18=-1,r18;;
> cmp4.lt p7,p6=0,r18
> (p7) br.cond.dptk.few 1b
> + mov r19=r20
> + ;;
> 2:
> #endif
> tpa r19=r19
> diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
> index de71da8..10a7d47 100644
> --- a/arch/ia64/kernel/vmlinux.lds.S
> +++ b/arch/ia64/kernel/vmlinux.lds.S
> @@ -215,9 +215,6 @@ SECTIONS
> /* Per-cpu data: */
> percpu : { } :percpu
> . = ALIGN(PERCPU_PAGE_SIZE);
> -#ifdef CONFIG_SMP
> - . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */
> -#endif
> __phys_per_cpu_start = .;
> .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET)
> {
> @@ -233,6 +230,11 @@ SECTIONS
> data : { } :data
> .data : AT(ADDR(.data) - LOAD_OFFSET)
> {
> +#ifdef CONFIG_SMP
> + . = ALIGN(PERCPU_PAGE_SIZE);
> + __cpu0_per_cpu = .;
> + . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */
> +#endif
> DATA_DATA
> *(.data1)
> *(.gnu.linkonce.d*)
> diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
> index e566ff4..0ee085e 100644
> --- a/arch/ia64/mm/contig.c
> +++ b/arch/ia64/mm/contig.c
> @@ -163,7 +163,7 @@ per_cpu_init (void)
> * get_zeroed_page().
> */
> if (first_time) {
> - void *cpu0_data = __phys_per_cpu_start - PERCPU_PAGE_SIZE;
> + void *cpu0_data = __cpu0_per_cpu;
>
> first_time=0;
>
> diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
> index 78026aa..d8c5fcd 100644
> --- a/arch/ia64/mm/discontig.c
> +++ b/arch/ia64/mm/discontig.c
> @@ -144,7 +144,7 @@ static void *per_cpu_node_setup(void *cpu_data, int node)
>
> for_each_possible_early_cpu(cpu) {
> if (cpu = 0) {
> - void *cpu0_data = __phys_per_cpu_start - PERCPU_PAGE_SIZE;
> + void *cpu0_data = __cpu0_per_cpu;
> __per_cpu_offset[cpu] = (char*)cpu0_data -
> __per_cpu_start;
> } else if (node = node_cpuid[cpu].nid) {
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-09-30 0:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-29 16:03 kdump broken on Altix 350 Bernhard Walle
2008-08-29 16:03 ` Bernhard Walle
2008-08-29 16:05 ` Bernhard Walle
2008-08-29 16:05 ` Bernhard Walle
2008-08-29 20:42 ` Luck, Tony
2008-08-29 20:42 ` Luck, Tony
2008-08-29 20:48 ` Bernhard Walle
2008-08-29 20:48 ` Bernhard Walle
2008-09-10 11:48 ` Bernhard Walle
2008-09-10 11:48 ` Bernhard Walle
2008-09-10 20:21 ` Jay Lan
2008-09-10 20:21 ` Jay Lan
2008-09-27 1:00 ` Jay Lan
2008-09-27 1:00 ` Jay Lan
2008-09-29 20:55 ` Luck, Tony
2008-09-29 20:55 ` Luck, Tony
2008-09-29 23:42 ` Luck, Tony
2008-09-29 23:42 ` Luck, Tony
2008-09-30 0:30 ` Jay Lan [this message]
2008-09-30 0:30 ` Jay Lan
2008-10-02 5:13 ` Simon Horman
2008-10-02 5:13 ` Simon Horman
2008-10-02 17:04 ` Jay Lan
2008-10-02 17:04 ` Jay Lan
2008-09-10 12:19 ` Bernhard Walle
2008-09-10 12:19 ` Bernhard Walle
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=48E17343.7060700@sgi.com \
--to=jlan@sgi.com \
--cc=bwalle@suse.de \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
--cc=linux-ia64@vger.kernel.org \
--cc=tony.luck@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.