Commit 45fad661 authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[PATCH] Unionize IO-APIC registers

[ Registers of the world, unite! ]

This makes the IO-APIC data structures use unions, so that we can
cleanly access them both as flat "raw" values, and as the bitmap
sub-entries.
parent 1d8c1ffb
This diff is collapsed.
...@@ -22,32 +22,44 @@ ...@@ -22,32 +22,44 @@
/* /*
* The structure of the IO-APIC: * The structure of the IO-APIC:
*/ */
struct IO_APIC_reg_00 { union IO_APIC_reg_00 {
__u32 __reserved_2 : 14, u32 raw;
LTS : 1, struct {
delivery_type : 1, u32 __reserved_2 : 14,
__reserved_1 : 8, LTS : 1,
ID : 8; delivery_type : 1,
} __attribute__ ((packed)); __reserved_1 : 8,
ID : 8;
} __attribute__ ((packed)) bits;
};
struct IO_APIC_reg_01 { union IO_APIC_reg_01 {
__u32 version : 8, u32 raw;
__reserved_2 : 7, struct {
PRQ : 1, u32 version : 8,
entries : 8, __reserved_2 : 7,
__reserved_1 : 8; PRQ : 1,
} __attribute__ ((packed)); entries : 8,
__reserved_1 : 8;
} __attribute__ ((packed)) bits;
};
struct IO_APIC_reg_02 { union IO_APIC_reg_02 {
__u32 __reserved_2 : 24, u32 raw;
arbitration : 4, struct {
__reserved_1 : 4; u32 __reserved_2 : 24,
} __attribute__ ((packed)); arbitration : 4,
__reserved_1 : 4;
} __attribute__ ((packed)) bits;
};
struct IO_APIC_reg_03 { union IO_APIC_reg_03 {
__u32 boot_DT : 1, u32 raw;
__reserved_1 : 31; struct {
} __attribute__ ((packed)); u32 boot_DT : 1,
__reserved_1 : 31;
} __attribute__ ((packed)) bits;
};
/* /*
* # of IO-APICs and # of IRQ routing registers * # of IO-APICs and # of IRQ routing registers
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment