lkml.org 
[lkml]   [2013]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v2 08/20] x86, ACPI: Find acpi tables in initrd early from head_32.S/head64.c
    From
    On Sun, Mar 10, 2013 at 8:44 AM, Yinghai Lu <yinghai@kernel.org> wrote:
    > +void __init x86_acpi_override_find(void)
    > +{
    > + unsigned long ramdisk_image, ramdisk_size;
    > + unsigned char *p = NULL;
    > +
    > +#ifdef CONFIG_X86_32
    > + struct boot_params *boot_params_p;
    > +
    > + /*
    > + * 32bit is from head_32.S, and it is 32bit flat mode.
    > + * So need to use phys address to access global variables.
    > + */
    > + boot_params_p = (struct boot_params *)__pa_symbol(&boot_params);
    > + ramdisk_image = get_ramdisk_image(boot_params_p);
    > + ramdisk_size = get_ramdisk_size(boot_params_p);
    > + p = (unsigned char *)ramdisk_image;
    > + acpi_initrd_override_find(p, ramdisk_size, true);
    > +#else
    > + ramdisk_image = get_ramdisk_image(&boot_params);
    > + ramdisk_size = get_ramdisk_size(&boot_params);
    > + if (ramdisk_image)
    > + p = __va(ramdisk_image);
    > + acpi_initrd_override_find(p, ramdisk_size, false);
    > +#endif
    > +}
    > +#endif

    What is preventing us from making the 64-bit variant also work in flat
    mode to make the code consistent and not hiding the differences under
    the rug? What am I missing here?

    Pekka


    \
     
     \ /
      Last update: 2013-03-10 12:21    [W:4.074 / U:0.288 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site