diff options
author | Jan Beulich <jbeulich@novell.com> | 2011-08-16 15:05:30 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2011-08-16 15:05:30 +0100 |
commit | 71abd26c352d6876f60050a2c624dc60e2ac01e3 (patch) | |
tree | 4d58dc321ccdee8e557e614dd0d183487c88b898 /xen/arch/x86/io_apic.c | |
parent | 94ea0622c5b88e5a0513cff512d90130f504cfbe (diff) | |
download | xen-71abd26c352d6876f60050a2c624dc60e2ac01e3.tar.gz xen-71abd26c352d6876f60050a2c624dc60e2ac01e3.tar.bz2 xen-71abd26c352d6876f60050a2c624dc60e2ac01e3.zip |
passthrough: don't use open coded IO-APIC accesses
This makes the respective functions quite a bit more legible.
Since this requires fiddling with __ioapic_{read,write}_entry()
anyway,
make them and their wrappers have their argument types match those of
__io_apic_{read,write}() (int -> unsigned int).
No functional change intended.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/io_apic.c')
-rw-r--r-- | xen/arch/x86/io_apic.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 258f341c25..411e726b67 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -162,7 +162,8 @@ union entry_union { struct IO_APIC_route_entry entry; }; -static struct IO_APIC_route_entry __ioapic_read_entry(int apic, int pin, int raw) +struct IO_APIC_route_entry __ioapic_read_entry( + unsigned int apic, unsigned int pin, bool_t raw) { unsigned int (*read)(unsigned int, unsigned int) = raw ? __io_apic_read : io_apic_read; @@ -172,7 +173,8 @@ static struct IO_APIC_route_entry __ioapic_read_entry(int apic, int pin, int raw return eu.entry; } -static struct IO_APIC_route_entry ioapic_read_entry(int apic, int pin, int raw) +static struct IO_APIC_route_entry ioapic_read_entry( + unsigned int apic, unsigned int pin, bool_t raw) { struct IO_APIC_route_entry entry; unsigned long flags; @@ -183,8 +185,9 @@ static struct IO_APIC_route_entry ioapic_read_entry(int apic, int pin, int raw) return entry; } -static void -__ioapic_write_entry(int apic, int pin, int raw, struct IO_APIC_route_entry e) +void __ioapic_write_entry( + unsigned int apic, unsigned int pin, bool_t raw, + struct IO_APIC_route_entry e) { void (*write)(unsigned int, unsigned int, unsigned int) = raw ? __io_apic_write : io_apic_write; @@ -195,7 +198,9 @@ __ioapic_write_entry(int apic, int pin, int raw, struct IO_APIC_route_entry e) (*write)(apic, 0x10 + 2*pin, eu.w1); } -static void ioapic_write_entry(int apic, int pin, int raw, struct IO_APIC_route_entry e) +static void ioapic_write_entry( + unsigned int apic, unsigned int pin, bool_t raw, + struct IO_APIC_route_entry e) { unsigned long flags; spin_lock_irqsave(&ioapic_lock, flags); |