Skip to content

Commit

Permalink
gen_idt: validate IRQ line before vector assignment
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Andrew Boie authored and Anas Nashif committed Sep 12, 2016
1 parent 9436765 commit 31e3a34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/gen_idt/gen_idt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 31e3a34

Please sign in to comment.