From: Rajesham G. <raj...@ya...> - 2005-04-13 05:58:16
|
Sachin/Alek, I also faced the very similar issue & Sachin analysis is correct. The fix that is working for me is: diff -urN -X kernel-2.6.7-dontdiff kernel-2.6.7-orig/drivers/dump/dump_x8664.c kernel-2.6.7-modif/drivers/dump/dump_x8664.c --- kernel-2.6.7-orig/drivers/dump/dump_x8664.c +++ kernel-2.6.7-modif/drivers/dump/dump_x8664.c @@ -330,7 +330,8 @@ int __dump_page_valid(unsigned long index) { - if (!pfn_valid(index)) + if (!pfn_valid(index) || + !kern_addr_valid((unsigned long)pfn_to_kaddr(index))) return 0; return page_is_ram(index); Rajesham --- Sachin Sant <sa...@in...> wrote: > Aleks , my guess is that you have more than 4G of > RAM on the system. > I recently came across this problem with lkcd on > machines having ram > > 4G . When the RAM is > 4 GB a 64 k chunk of RAM is > reserved for IOMMU > pages. This chunk resides in low memory [ typically > 0x4000000 - > 0x7ffffff] hence page_is_ram fails to find this > hole. > If the ammount of memory is restricted to less than > 4G the dump will > work fine. > > Give the attached patch a try. This is for 2.6 based > kernel. Let me know > if it sounds ok. > > Aleksandar Markovic wrote: > > Hi, Sachin, > > > > I am setting up lkcd on several x86_64 machines, > and > > it works fine on EM64T machines, however lkcd > crashes > > during panic handling on Opterons, producing > unusable > > dumps. > > > > The crash is in memcpy, during copying a page into > > internal buffer. Call stack is: > > > > memcpy() > > dump_lcrash_add_data() > > dump_generic_save_data() > > dump_execute_savedump() > > dump_generic_execute() > > dump_execute() > > manual_handle_crashdump() > > capable() > > sys_ioctl() > > > > Ir looks to me that for some reason LKCD tries to > dump > > a page that is not suitable for dumping. This is > > related to code containing page_is_ram(), etc. > > > > I can gicve you more info, but I was wondering > maybe > > you can tell me some hint on what to do. > > > > Thanks! > > > > Aleks > > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > > > > -- > Thanks > -Sachin > ----------------------------------- > Sachin Sant > Linux Technology Center > IBM Software Lab > Bangalore, INDIA. > > sa...@in... > Ph: 91-80-5044647 > ----------------------------------- > > diff -urNpa old/arch/x86_64/kernel/pci-gart.c > new/arch/x86_64/kernel/pci-gart.c > --- old/arch/x86_64/kernel/pci-gart.c 2005-01-24 > 15:21:50.000000000 +0530 > +++ new/arch/x86_64/kernel/pci-gart.c 2005-03-23 > 16:43:13.335241840 +0530 > @@ -621,6 +621,9 @@ > EXPORT_SYMBOL(pci_dma_supported); > EXPORT_SYMBOL(no_iommu); > EXPORT_SYMBOL(force_iommu); > EXPORT_SYMBOL(bad_dma_address); > +/* Export the following so that the dump driver can > use it */ > +EXPORT_SYMBOL(iommu_bus_base); > +EXPORT_SYMBOL(iommu_size); > > static __init unsigned long > check_iommu_size(unsigned long aper, u64 aper_size) > { > diff -urNpa old/drivers/dump/dump_x8664.c > new/drivers/dump/dump_x8664.c > --- old/drivers/dump/dump_x8664.c 2005-01-24 > 15:22:26.000000000 +0530 > +++ new/drivers/dump/dump_x8664.c 2005-03-23 > 16:41:56.000000000 +0530 > @@ -335,6 +335,10 @@ __dump_cleanup(void) > return; > } > > +#ifdef CONFIG_GART_IOMMU > +extern unsigned long iommu_size; > +extern unsigned long iommu_bus_base; > +#endif > extern int page_is_ram(unsigned long); > > /* > @@ -347,6 +351,13 @@ __dump_page_valid(unsigned long > index) > if (!pfn_valid(index)) > return 0; > > + /* See if the page falls in the IOMMU hole > */ > +#ifdef CONFIG_GART_IOMMU > + if (((index << PAGE_SHIFT) >= > iommu_bus_base) && > + ((index << PAGE_SHIFT) < > (iommu_bus_base + iommu_size))) > + return 0; > +#endif > + > return page_is_ram(index); > } > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |