Messages in this thread | | | Subject | Re: [patch 1/5] x84_64, apic: Use probe routines to simplify apic selection | From | Suresh Siddha <> | Date | Thu, 19 May 2011 16:54:05 -0700 |
| |
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
| |