Skip to content

x86-64 support

Takao Indoh lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86-64 supportarch/i386/kernel/nmi.c arch/i386/kernel/reboot.c arch/i386/kernel/smp.c +33 more+2108 -190 replies
2/4x86-64 supportdrivers/scsi/Kconfig drivers/scsi/Makefile drivers/scsi/scsi.c +5 more+657 -01 reply
3/4x86-64 supportdrivers/scsi/aic7xxx/aic79xx_osm.c drivers/scsi/aic7xxx/aic7xxx_osm.c+76 -00 replies
4/4x86-64 supportdrivers/message/fusion/mptbase.c drivers/message/fusion/mptbase.h drivers/message/fusion/mptscsih.c+85 -24 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4][diskdump] x86-64 support

Hi all,

Here is the latest diskdump patch for kernel 2.6.8.1.

- Supports x86_64
- Fix bug of Fusion-MPT scsi driver patch
- Add new functions for finding ram area

Source code can be downloaded from
http://sourceforge.net/projects/lkdump

When I tested diskdump on x86-64 machine, I found that memory dump of the following two areas failed.

1) 04000000 - 07ffffff
2) around last two page

Memory dump of the area 2) failed because page->flag was broken. So I compare PFN to page_to_pfn(pfn_to_page(PFN)) and skip this PFN if these value is different.

		page = pfn_to_page(nr);
		if (nr != page_to_pfn(page)) {
			/* page_to_pfn() is called from kmap_atomic().
			 * If page->flag is broken, it specified a wrong
			 * zone and it causes kmap_atomic() fail.
			 */
			Err("Bad page. PFN %lu flags %lx\n",
			    nr, (unsigned long)page->flags);
			memset(scratch + blk_in_chunk * PAGE_SIZE, 0,
			       PAGE_SIZE);
			sprintf(scratch + blk_in_chunk * PAGE_SIZE,
				"Bad page. PFN %lu flags %lx\n",
			 	 nr, (unsigned long)page->flags);
			goto write;
		}

Memory dump of the area 1) failed because this area was not mapped to vaddr. Diskdump checks page using page_is_ram() and maps it using kmap_atomic(). In the area 1), both page_is_ram() and kmap_atomic() return true, but page is not attached to the page table.

I think this area is AGP Aperture. I found this message in the dmesg.

PCI-DMA: Disabling AGP.
PCI-DMA: aperture base @ 4000000 size 65536 KB
PCI-DMA: Reserving 64MB of IOMMU area in the AGP aperture

To resolve this problem, I check page using kern_addr_valid() before kmap_atomic().

		if (!kern_addr_valid((unsigned long)pfn_to_kaddr(nr))) {
			memset(scratch + blk_in_chunk * PAGE_SIZE, 0,
			       PAGE_SIZE);
			sprintf(scratch + blk_in_chunk * PAGE_SIZE,
				"Unmapped page. PFN %lu\n", nr);
			goto write;
		}

		kaddr = kmap_atomic(page, KM_CRASHDUMP);
		memcpy(scratch + blk_in_chunk * PAGE_SIZE, kaddr, PAGE_SIZE);
		kunmap_atomic(kaddr, KM_CRASHDUMP);

	write:

Now diskdump seems to work correctly. But I am not sure these method is right. Please let me know if there are better methods.

Best Regards,
Takao Indoh