• Eric W. Biederman's avatar
    x86, ioapic: Fix io_apic_redir_entries to return the number of entries. · 4b6b19a1
    Eric W. Biederman authored
    io_apic_redir_entries has a huge conceptual bug.  It returns the maximum
    redirection entry not the number of redirection entries.  Which simply
    does not match what the name of the function.  This just caught me
    and it caught  Feng Tang, and  Len Brown when they wrote sfi_parse_ioapic.
    
    Modify io_apic_redir_entries to actually return the number of redirection
    entries, and fix the callers so that they properly handle receiving the
    number of the number of redirection table entries, instead of the
    number of redirection table entries less one.
    
    While the usage in sfi.c does not show up in this patch it is fixed
    by virtue of the fact that io_apic_redir_entries now has the semantics
    sfi_parse_ioapic most reasonably expects.
    Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
    LKML-Reference: <1269936436-7039-7-git-send-email-ebiederm@xmission.com>
    Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
    4b6b19a1
io_apic.c 104 KB