gen_idt: validate IRQ line before vector assignment

On systems with fixed IRQ-to-vector mapping (like Quark D2000),
if multiple drivers tried to use the same IRQ line, gen_idt would
report an IDT vector collision rather than multiple IRQ line collision,
which is much less intuitive.

Move the IRQ line validation to before the vector validation to report
an easier to understand error.

Change-Id: I3930d8df38391e4708db5486e4bd4527d33c4cce
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2016-09-12 09:51:10 -07:00 committed by Anas Nashif
commit 31e3a345e5

View file

@ -445,9 +445,9 @@ static void validate_irq(void)
static void validate_input_file(void)
{
validate_dpl(); /* exits on error */
validate_irq(); /* exits on error */
validate_vector_id(); /* exits on error */
validate_priority(); /* exits on error */
validate_irq(); /* exits on error */
}
static void generate_idt(void)