x86: Cleanup apic/ioapic/x2apic setup code
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest23 patches 33 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/23 | x86/apic: Avoid open coded x2apic detectionarch/ arch/ | +10 | 3 replies | |
| 2/23 | x86/apic: Make x2apic_mode depend on CONFIG_X86_X2APICarch/ arch/ | +5 | 1 reply | |
| 3/23 | x86/apic: Move x2apic code to one placearch/ | +28 | 1 reply | |
| 4/23 | x86/ioapic: Check x2apic reallyarch/ arch/ arch/ | +4 | 2 replies | |
| 5/23 | x86/apic: Make disable x2apic work reallyarch/ | +5 | 1 reply | |
| 6/23 | x86/apic: Check x2apic earlyarch/ arch/ | +21 | 1 reply | |
| 7/23 | x86/x2apic: Move code in conditional regionarch/ arch/ | +35 | 1 reply | |
| 8/23 | x86/x2apic: Clarify remapping mode for x2apic enablementarch/ | +4 | 1 reply | |
| 9/23 | x86/x2apic: Add proper state trackingarch/ | +14 | 1 reply | |
| 10/23 | x86/x2apic: Disable x2apic from nox2apic setuparch/ arch/ | +24 | 1 reply | |
| 11/23 | x86/x2apic: Split enable and setup functionarch/ arch/ arch/ | +36 | 2 replies | |
| 12/23 | x86/x2apic: Use state information for disablearch/ | +10 | 1 reply | |
| 13/23 | x86/smpboot: Move smpboot inlines to codearch/ arch/ | +66 | 1 reply | |
| 14/23 | x86/ioapic: Provide stub functions for IOAPIC=narch/ | +5 | 1 reply | |
| 15/23 | x86/ioapic: Add proper checks to setp/enable_IO_APIC()arch/ | +7 | 1 reply | |
| 16/23 | x86/apic: Sanitize ioapic handlingarch/ | +3 | 1 reply | |
| 17/23 | x86/smpboot: Cleanup ioapic handlingarch/ | +7 | 1 reply | |
| 18/23 | x86/apic: Move apic_init_uniprocessor codearch/ | +62 | 1 reply | |
| 19/23 | init: Get rid of x86ismsarch/ init/ | +4 | 0 replies | |
| 20/23 | x86/smpboot: Move apic init code to apic.carch/ arch/ arch/ | +47 | 1 reply | |
| 21/23 | x86/smpboot: Sanitize uniprocessor initarch/ | +26 | 1 reply | |
| 22/23 | x86/apic: Reuse apic_bsp_setup() for UP APIC setuparch/ arch/ arch/ | +26 | 1 reply | |
| 23/23 | x86: Consolidate boot cpu timer setuparch/ arch/ | +2 | 1 reply |
Reviews trailers per patch
13 of 23 patches have a Reviewed-by or Acked-by.
| Patch | Borislav Petkov |
|---|---|
| 1/23 | |
| 2/23 | A-b |
| 3/23 | A-b |
| 4/23 | |
| 5/23 | |
| 6/23 | |
| 7/23 | |
| 8/23 | A-b |
| 9/23 | A-b |
| 10/23 | |
| 11/23 | |
| 12/23 | A-b |
| 13/23 | |
| 14/23 | A-b |
| 15/23 | A-b |
| 16/23 | A-b |
| 17/23 | Vehemently-Acked-by |
| 18/23 | A-b |
| 19/23 | |
| 20/23 | A-b |
| 21/23 | A-b |
| 22/23 | A-b |
| 23/23 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [patch 00/23] x86: Cleanup apic/ioapic/x2apic setup code
While reviewing Jiangs interrupt remapping patch set, I had several serious WTF moments when trying to understand what that code is doing.
The main issues I've seen are:
- Blindly copy and pasted code
- Random places which initialize bits and pieces
- Code which got mindlessly expanded with duct tape and glue without considering readability and maintainability.
- Missing inline stubs which result in a ifdef nightmare
- Superflous inline stubs to artificially avoid sensible ifdefs
The deeper I looked the more I started to get grumpy about that maze and finally sat down and cleaned it up seriously. One bug I fixed on the way (surprise, surprise) got folded into Jiangs series which is now in tip/x86/apic. The other one is not that crucial and cant be fixed in the previous code without adding more mess.
The following patch series applies on top of tip/x86/apic. It cleans up and consolidates the apic/ioapic/x2apic setup functions.
Please give it a proper review and testing.
Thanks,
tglx
--- arch/x86/include/asm/smpboot_hooks.h | 68 ------ tip/arch/x86/include/asm/apic.h | 57 +---- tip/arch/x86/include/asm/io_apic.h | 5 tip/arch/x86/kernel/apic/apic.c | 395 ++++++++++++++++++----------------- tip/arch/x86/kernel/apic/io_apic.c | 13 - tip/arch/x86/kernel/cpu/common.c | 2 tip/arch/x86/kernel/smpboot.c | 113 +++++----- tip/init/main.c | 14 - 8 files changed, 308 insertions(+), 359 deletions(-)