ia64/xen-unstable

changeset 5450:066293b6c029

bitkeeper revision 1.1713.1.7 (42ae0dd6jIaFvKcbyu8YLCgOrZScdg)

[PATCH] [PATCH] fix x86_64 initrd support

* Chris Wright (chrisw@osdl.org) wrote:

Ugh, that one had some tab damage, here's the proper patch.
-chris
author chrisw@osdl.org[kaf24]
date Mon Jun 13 22:51:02 2005 +0000 (2005-06-13)
parents 463317d0dd8b
children 1696560591a6
files linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c	Mon Jun 13 22:49:32 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/kernel/setup.c	Mon Jun 13 22:51:02 2005 +0000
     1.3 @@ -727,23 +727,20 @@ void __init setup_arch(char **cmdline_p)
     1.4         acpi_reserve_bootmem();
     1.5  #endif
     1.6  #ifdef CONFIG_BLK_DEV_INITRD
     1.7 -        if (xen_start_info.mod_start) {
     1.8 -                if (LOADER_TYPE && INITRD_START) {
     1.9 -                        if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) {
    1.10 -                                /* reserve_bootmem_generic(INITRD_START, INITRD_SIZE); */
    1.11 -                                initrd_start = INITRD_START + PAGE_OFFSET;
    1.12 -                                initrd_end = initrd_start+INITRD_SIZE;
    1.13 -                                initrd_below_start_ok = 1;
    1.14 -                        }
    1.15 -                        else {
    1.16 -                                printk(KERN_ERR "initrd extends beyond end of memory "
    1.17 -                                       "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
    1.18 -                                       (unsigned long)(INITRD_START + INITRD_SIZE),
    1.19 -                                       (unsigned long)(end_pfn << PAGE_SHIFT));
    1.20 -                                initrd_start = 0;
    1.21 -                        }
    1.22 -                }
    1.23 -        }
    1.24 +	if (xen_start_info.mod_start) {
    1.25 +		if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) {
    1.26 +			/*reserve_bootmem_generic(INITRD_START, INITRD_SIZE);*/
    1.27 +			initrd_start = INITRD_START + PAGE_OFFSET;
    1.28 +			initrd_end = initrd_start+INITRD_SIZE;
    1.29 +			initrd_below_start_ok = 1;
    1.30 +		} else {
    1.31 +			printk(KERN_ERR "initrd extends beyond end of memory "
    1.32 +				"(0x%08lx > 0x%08lx)\ndisabling initrd\n",
    1.33 +				(unsigned long)(INITRD_START + INITRD_SIZE),
    1.34 +				(unsigned long)(end_pfn << PAGE_SHIFT));
    1.35 +			initrd_start = 0;
    1.36 +		}
    1.37 +	}
    1.38  #endif
    1.39  	paging_init();
    1.40  #ifdef CONFIG_X86_LOCAL_APIC