Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 305679 Details for
Bug 446188
BUG: Don't reserve crashkernel memory > 4 GB on ia64
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
RHEL5 fix for this issue
446188.patch (text/plain), 4.81 KB, created by
Prarit Bhargava
on 2008-05-16 13:18:23 UTC
(
hide
)
Description:
RHEL5 fix for this issue
Filename:
MIME Type:
Creator:
Prarit Bhargava
Created:
2008-05-16 13:18:23 UTC
Size:
4.81 KB
patch
obsolete
>Backport of > >http://marc.info/?l=git-commits-head&m=121088524228704&w=2 > >and removal of "machvec=dig" WAR. > >From the commit: > >"Some IA64 machines map all cell-local memory above 4 GB (32 bit limit). > However, in most cases, the kernel needs some memory below that limit that is > DMA-capable. So in this machine configuration, the crashkernel will be reserved > above 4 GB. > > For machines that use SWIOTLB implementation because they lack an I/O MMU > the low memory is required by the SWIOTLB implementation. In that case, > it doesn't make sense to reserve the crashkernel at all because it's unusable > for kdump." > >Successfully tested by me. > >Resolves BZ 446188. > >diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c >index 69ff026..c0f6eac 100644 >--- a/arch/ia64/hp/common/sba_iommu.c >+++ b/arch/ia64/hp/common/sba_iommu.c >@@ -40,12 +40,9 @@ > #include <asm/page.h> /* PAGE_OFFSET */ > #include <asm/dma.h> > #include <asm/system.h> /* wmb() */ >-#include <asm/kexec.h> > > #include <asm/acpi-ext.h> > >-extern int swiotlb_late_init_with_default_size (size_t size); >- > #define PFX "IOC: " > > /* >@@ -2060,22 +2057,11 @@ sba_init(void) > if (!ia64_platform_is("hpzx1") && !ia64_platform_is("hpzx1_swiotlb")) > return 0; > >- /* If we are booting a kdump kernel, the sba_iommu will >- * cause devices that were not shutdown properly to MCA >- * as soon as they are turned back on. Our only option for >- * a successful kdump kernel boot is to use the swiotlb: >- */ >- if (kdump_kernel) { >- if (swiotlb_late_init_with_default_size(64 * (1<<20)) != 0) >- panic("Unable to initialize software I/O TLB:" >- " Try machvec=dig boot option"); >- machvec_init("dig"); >- return 0; >- } >- > acpi_bus_register_driver(&acpi_sba_ioc_driver); > if (!ioc_list) { > #ifdef CONFIG_IA64_GENERIC >+ extern int swiotlb_late_init_with_default_size (size_t size); >+ > /* > * If we didn't find something sba_iommu can claim, we > * need to setup the swiotlb and switch to the dig machvec. >diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c >index 9144e81..423cbec 100644 >--- a/arch/ia64/kernel/setup.c >+++ b/arch/ia64/kernel/setup.c >@@ -62,7 +62,6 @@ > #include <asm/system.h> > #include <asm/unistd.h> > #include <asm/system.h> >-#include <asm/kexec.h> > #ifdef CONFIG_XEN > #include <asm/hypervisor.h> > #include <asm/xen/xencomm.h> >@@ -148,8 +147,6 @@ EXPORT_SYMBOL(ia64_iobase); > struct io_space io_space[MAX_IO_SPACES]; > EXPORT_SYMBOL(io_space); > unsigned int num_io_spaces; >-int kdump_kernel; >-EXPORT_SYMBOL(kdump_kernel); > > /* > * "flush_icache_range()" needs to know what processor dependent stride size to use >@@ -301,6 +298,26 @@ static int __init register_memory(void) > > __initcall(register_memory); > >+/* >+ * This function checks if the reserved crashkernel is allowed on the specific >+ * IA64 machine flavour. Machines without an IO TLB use swiotlb and require >+ * some memory below 4 GB (i.e. in 32 bit area), see the implementation of >+ * lib/swiotlb.c. The hpzx1 architecture has an IO TLB but cannot use that >+ * in kdump case. See the comment in sba_init() in sba_iommu.c. >+ * >+ * So, the only machvec that really supports loading the kdump kernel >+ * over 4 GB is "sn2". >+ */ >+static int __init check_crashkernel_memory(unsigned long pbase, size_t size) >+{ >+ if (ia64_platform_is("sn2")) >+ return 1; >+ else { >+ printk("%s: pbase = %0lx\n", __FUNCTION__, pbase); >+ return pbase < (1UL << 32); >+ } >+} >+ > /** > * reserve_memory - setup reserved memory areas > * >@@ -367,7 +384,18 @@ reserve_memory (void) > if (size) { > sort_regions(rsvd_region, n); > base = kdump_find_rsvd_region(size, >- rsvd_region, n); >+ rsvd_region, n); >+ printk("%s: base = %0lx\n", __FUNCTION__, base); >+ if (!check_crashkernel_memory(base,size)) { >+ printk("crashkernel: There would be " >+ "kdump memory at %ld GB but " >+ "this is unusable because it " >+ "must\nbe below 4 GB. Change " >+ "the memory configuration of " >+ "of the machine.\n", >+ (unsigned long)(base >> 30)); >+ return; >+ } > if (base != ~0UL) { > rsvd_region[n].start = > (unsigned long)__va(base); >@@ -563,8 +591,6 @@ setup_arch (char **cmdline_p) > *cmdline_p = __va(ia64_boot_param->command_line); > strlcpy(saved_command_line, *cmdline_p, COMMAND_LINE_SIZE); > >- kdump_kernel = (strstr(saved_command_line, "elfcorehdr=") != NULL); >- > efi_init(); > io_port_init(); > >diff --git a/include/asm-ia64/kexec.h b/include/asm-ia64/kexec.h >index 7bd0963..cd1fcc5 100644 >--- a/include/asm-ia64/kexec.h >+++ b/include/asm-ia64/kexec.h >@@ -50,6 +50,5 @@ extern void kdump_cpu_freeze(struct unw_frame_info *info, void *arg); > extern int kdump_status[]; > extern atomic_t kdump_cpu_freezed; > extern atomic_t kdump_in_progress; >-extern int kdump_kernel; > > #endif /* _ASM_IA64_KEXEC_H */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 446188
:
305230
| 305679