x86, ioapic: Fix io_apic_redir_entries to return the number of entries.
commit4b6b19a1c7302477653d799a53d48063dd53d555
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 30 Mar 2010 08:07:08 +0000 (30 01:07 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 4 May 2010 20:34:48 +0000 (4 13:34 -0700)
tree1bce228481fc2ad7d81e8cb636bcc045c53d88ff
parent9638fa521e42c9281c874c6b5a382b1ced4ee496
x86, ioapic: Fix io_apic_redir_entries to return the number of entries.

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: Eric W. Biederman <ebiederm@xmission.com>
LKML-Reference: <1269936436-7039-7-git-send-email-ebiederm@xmission.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/kernel/apic/io_apic.c