lkml.org 
[lkml]   [2011]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [patch 1/5] x84_64, apic: Use probe routines to simplify apic selection
    From
    Date
    Ingo, Thomas:

    On Mon, 2011-05-16 at 16:51 -0700, Suresh Siddha wrote:
    > +
    > +/*
    > + * We need to check for Physflat first, so don't change this order!
    > + */
    > +apicdriver(apic_physflat);
    > +apicdriver(apic_flat);

    For the couple of files (one in 32-bit arch and another in 64-bit arch)
    that were listing two apic drivers (which were sharing most of the code)
    in the same file, the above ordering didn't do the trick to enforce the
    order.

    So I ended up defining one more macro for this case and it looks like
    this below.

    /*
    * APIC drivers are probed based on how they are listed in the .apicdrivers
    * section. So the order is important and enforced by the ordering
    * of different apic driver files in the Makefile.
    *
    * For the files having two apic drivers, we use apic_drivers()
    * to enforce the order with in them.
    */
    #define apic_driver(sym) \
    static struct apic *__apicdrivers_##sym __used \
    __aligned(sizeof(struct apic *)) \
    __section(.apicdrivers) = { &sym }

    #define apic_drivers(sym1, sym2) \
    static struct apic *__apicdrivers_##sym1##sym2[2] __used \
    __aligned(sizeof(struct apic *)) \
    __section(.apicdrivers) = { &sym1, &sym2 }

    Posted the refreshed patchset.

    thanks,
    suresh



    \
     
     \ /
      Last update: 2011-05-20 01:57    [W:2.858 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site