On Wed, Feb 14, 2007 at 03:48:40PM -0800, Jay Lan wrote:
> Jay Lan wrote:
> > Jay Lan wrote:
> >> Jay Lan wrote:
> >>> Horms wrote:
> >>>> On Tue, Feb 13, 2007 at 07:07:14PM -0800, Jay Lan wrote:
> >>>>> I found this patch from Nan-hai was missing in your git tree.
> >>>>> I do not have the url of his original posting, but here is the
> >>>>> content. :)
> >>>> Thanks, I have applied this.
> >>>>
> >>>> This is actually the second time its been applied, unfortunately it got
> >>>> reverted as part of the crash_create_elf64_headers() patch,
> >>>> f038d30bff8510a1df1e72af08db1766581d1f2c.
> >>> I found problem in the crash_create_elf64_headers() patch more than
> >>> this one. For example, when calculating the size, the nr_cpus should not
> >>> be a long. It is an int. It will cause problem only when initializing
> >>> the crash utility.
> >>>
> >>> However, even after reverting f038d30bff8510a1df1e72af08db1766581d1f2c
> >>> i still had problem in booting up a crashdump kernel on SN platform.
> >>> I saw many many "Bad state" and "Bad pte" errors, probably when trying
> >>> to create the vmcore.
> >> BTW, i did my testing with 2.6.20 kernel and the kexec-tools-testing
> >> tot tree as of early yesterday.
> >
> > :(
> > I just tried 2.6.20 with a "working" kexec (the rhel5 kexec that
> > worked on rhel5 kernel), but it showed
> > put_kernel_page: page at 0xe000003018b44000 not in reserved memory
> > put_kernel_page: page at 0xe000003018b44000 not in reserved memory
> > put_kernel_page: page at 0xe000003018b3c000 not in reserved memory
> > put_kernel_page: page at 0xe000003018b3c000 not in reserved memory
> > put_kernel_page: page at 0xe000003018b3c000 not in reserved memory
> > put_kernel_page: page at 0xe000003018b3c000 not in reserved memory
> > put_kernel_page: page at 0xe000003018b3c000 not in reserved memory
> > put_kernel_page: page at 0xe000003018b3c000 not in reserved memory
> >
> > and followed by tons of "Bad page state" and "Bad pte" errors.
>
> It took a long long time, but the kdump kernel eventually came up.
>
> What essential IA64 patches do i need (besides the zero-size-vmcore)
> for kexec/kdump to work in 2.6.20?
You might want to just check out Linus' git tree and work from there,
a couple of kexec changes have gone in there recently.
I've attached 3 that may be useful to you, though to be honest
I doubt any of them fix problems that you are seeing.
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
commit 139b830477ccdca21b68c40f9a83ec327e65eb56
tree 0aab2140315579525dfef89189b9bea5033af2ba
parent d1598e05faa11d9f04e0a226122dd57674fb1dab
author Bob Picco <[EMAIL PROTECTED]> 1170151869 -0800
committer Tony Luck <[EMAIL PROTECTED]> 1170716867 -0800
[IA64] register memory ranges in a consistent manner
While pursuing and unrelated issue with 64Mb granules I noticed a problem
related to inconsistent use of add_active_range. There doesn't appear any
reason to me why FLATMEM versus DISCONTIG_MEM should register memory to
add_active_range with different code. So I've changed the code into a
common implementation.
The other subtle issue fixed by this patch was calling add_active_range in
count_node_pages before granule aligning is performed. We were lucky with
16MB granules but not so with 64MB granules. count_node_pages has reserved
regions filtered out and as a consequence linked kernel text and data
aren't covered by calls to count_node_pages. So linked kernel regions
wasn't reported to add_active_regions. This resulted in free_initmem
causing numerous bad_page reports. This won't occur with this patch
because now all known memory regions are reported by
register_active_ranges.
Acked-by: Mel Gorman <[EMAIL PROTECTED]>
Signed-off-by: Bob Picco <[EMAIL PROTECTED]>
Acked-by: Simon Horman <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
arch/ia64/mm/discontig.c | 4 +++-
arch/ia64/mm/init.c | 19 +++++++++++++++++--
include/asm-ia64/meminit.h | 3 ++-
3 files changed, 22 insertions(+), 4 deletions(-)
139b830477ccdca21b68c40f9a83ec327e65eb56
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index d3edb12..999cefd 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -473,6 +473,9 @@ void __init find_memory(void)
node_clear(node, memory_less_mask);
mem_data[node].min_pfn = ~0UL;
}
+
+ efi_memmap_walk(register_active_ranges, NULL);
+
/*
* Initialize the boot memory maps in reverse order since that's
* what the bootmem allocator expects
@@ -660,7 +663,6 @@ static __init int count_node_pages(unsigned long start, unsigned long len, int n
{
unsigned long end = start + len;
- add_active_range(node, start >> PAGE_SHIFT, end >> PAGE_SHIFT);
mem_data[node].num_physpages += len >> PAGE_SHIFT;
if (start <= __pa(MAX_DMA_ADDRESS))
mem_data[node].num_dma_physpages +=
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 1373fae..8b75998 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -19,6 +19,7 @@
#include <linux/swap.h>
#include <linux/proc_fs.h>
#include <linux/bitops.h>
+#include <linux/kexec.h>
#include <asm/a.out.h>
#include <asm/dma.h>
@@ -595,13 +596,27 @@ find_largest_hole (u64 start, u64 end, void *arg)
return 0;
}
+#endif /* CONFIG_VIRTUAL_MEM_MAP */
+
int __init
register_active_ranges(u64 start, u64 end, void *arg)
{
- add_active_range(0, __pa(start) >> PAGE_SHIFT, __pa(end) >> PAGE_SHIFT);
+ int nid = paddr_to_nid(__pa(start));
+
+ if (nid < 0)
+ nid = 0;
+#ifdef CONFIG_KEXEC
+ if (start > crashk_res.start && start < crashk_res.end)
+ start = crashk_res.end;
+ if (end > crashk_res.start && end < crashk_res.end)
+ end = crashk_res.start;
+#endif
+
+ if (start < end)
+ add_active_range(nid, __pa(start) >> PAGE_SHIFT,
+ __pa(end) >> PAGE_SHIFT);
return 0;
}
-#endif /* CONFIG_VIRTUAL_MEM_MAP */
static int __init
count_reserved_pages (u64 start, u64 end, void *arg)
diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h
index c8df759..6dd476b 100644
--- a/include/asm-ia64/meminit.h
+++ b/include/asm-ia64/meminit.h
@@ -51,12 +51,13 @@ extern void efi_memmap_init(unsigned long *, unsigned long *);
#define IGNORE_PFN0 1 /* XXX fix me: ignore pfn 0 until TLB miss handler is updated... */
+extern int register_active_ranges(u64 start, u64 end, void *arg);
+
#ifdef CONFIG_VIRTUAL_MEM_MAP
# define LARGE_GAP 0x40000000 /* Use virtual mem map if hole is > than this */
extern unsigned long vmalloc_end;
extern struct page *vmem_map;
extern int find_largest_hole (u64 start, u64 end, void *arg);
- extern int register_active_ranges (u64 start, u64 end, void *arg);
extern int create_mem_map_page_table (u64 start, u64 end, void *arg);
extern int vmemmap_find_next_valid_pfn(int, int);
#else
commit bcb9b99d1fb6a1cbe592f131dc95450d2f18c91f
tree 7c3e9711112c0559f8d734b5fed6e82eb846c3be
parent 62d0cfcb27cf755cebdc93ca95dabc83608007cd
author Magnus Damm <[EMAIL PROTECTED]> 1170657822 +0900
committer Tony Luck <[EMAIL PROTECTED]> 1170703641 -0800
[IA64] kexec: Fix CONFIG_SMP=n compilation
Kexec support for 2.6.20 on ia64 does not build properly using a config
made up by CONFIG_SMP=n and CONFIG_HOTPLUG_CPU=n:
Signed-off-by: Magnus Damm <[EMAIL PROTECTED]>
Acked-by: Simon Horman <[EMAIL PROTECTED]>
Acked-by: Jay Lan <[EMAIL PROTECTED]>
Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
arch/ia64/kernel/crash.c | 11 +++++++----
arch/ia64/kernel/machine_kexec.c | 2 ++
2 files changed, 9 insertions(+), 4 deletions(-)
bcb9b99d1fb6a1cbe592f131dc95450d2f18c91f
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index bc2f64d..2018e62 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -79,6 +79,7 @@ crash_save_this_cpu()
final_note(buf);
}
+#ifdef CONFIG_SMP
static int
kdump_wait_cpu_freeze(void)
{
@@ -91,6 +92,7 @@ kdump_wait_cpu_freeze(void)
}
return 1;
}
+#endif
void
machine_crash_shutdown(struct pt_regs *pt)
@@ -132,11 +134,12 @@ kdump_cpu_freeze(struct unw_frame_info *info, void *arg)
atomic_inc(&kdump_cpu_freezed);
kdump_status[cpuid] = 1;
mb();
- if (cpuid == 0) {
- for (;;)
- cpu_relax();
- } else
+#ifdef CONFIG_HOTPLUG_CPU
+ if (cpuid != 0)
ia64_jump_to_sal(&sal_boot_rendez_state[cpuid]);
+#endif
+ for (;;)
+ cpu_relax();
}
static int
diff --git a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c
index e2ccc9f..7141795 100644
--- a/arch/ia64/kernel/machine_kexec.c
+++ b/arch/ia64/kernel/machine_kexec.c
@@ -70,12 +70,14 @@ void machine_kexec_cleanup(struct kimage *image)
void machine_shutdown(void)
{
+#ifdef CONFIG_HOTPLUG_CPU
int cpu;
for_each_online_cpu(cpu) {
if (cpu != smp_processor_id())
cpu_down(cpu);
}
+#endif
kexec_disable_iosapic();
}
commit 29a002776ba5ef170446910b1f93c480cdd43706
tree fa06004ecc2495d8b2b17b6fb2129365b7fd9eaf
parent dee11c2364f51cac53df17d742a0c69097e29a4e
author Magnus Damm <[EMAIL PROTECTED]> 1170494028 -0800
committer Linus Torvalds <[EMAIL PROTECTED]> 1170530766 -0800
[PATCH] kexec: Avoid migration of already disabled irqs (ia64)
This patch fixes up ia64 kexec support for HP rx2620 hardware. It does
this by skipping migration of already disabled irqs. This is most likely a
problem on other ia64 platforms as well, but I've only been able to
reproduce it on one machine so far.
The full story is that handle_bad_irq() gets invoked before starting the
new kernel without this patch. This seems to happen when fixup_irqs()
calls generic_handle_irq() on already migrated (and disabled) irqs. So by
avoiding migration of disabled irqs we stay away of handle_bad_irq().
The code has been tested on three different ia64 machines, all with good
results. It is possible to trigger the same bug by offlining a processor
using echo 0 > /sys/devices/system/cpu/cpuX/online.
More detailed information is available in the following mail thread:
http://lists.osdl.org/pipermail/fastboot/2007-January/thread.html#5774
Signed-off-by: Magnus Damm <[EMAIL PROTECTED]>
Acked-by: Simon Horman <[EMAIL PROTECTED]>
Acked-by: Zou, Nanhai <[EMAIL PROTECTED]>
Acked-by: Jay Lan <[EMAIL PROTECTED]>
Acked-by: "Luck, Tony" <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
arch/ia64/kernel/irq.c | 3 +++
1 file changed, 3 insertions(+)
29a002776ba5ef170446910b1f93c480cdd43706
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index 54d55e4..ce49c85 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -122,6 +122,9 @@ static void migrate_irqs(void)
for (irq=0; irq < NR_IRQS; irq++) {
desc = irq_desc + irq;
+ if (desc->status == IRQ_DISABLED)
+ continue;
+
/*
* No handling for now.
* TBD: Implement a disable function so we can now
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot