All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 00/23] x86: Cleanup apic/ioapic/x2apic setup code
@ 2015-01-15 21:22 Thomas Gleixner
  2015-01-15 21:22 ` [patch 01/23] x86/apic: Avoid open coded x2apic detection Thomas Gleixner
                   ` (23 more replies)
  0 siblings, 24 replies; 80+ messages in thread
From: Thomas Gleixner @ 2015-01-15 21:22 UTC (permalink / raw)
  To: LKML; +Cc: Jiang Liu, Joerg Roedel, x86, Tony Luck, Borislav Petkov

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(-)


^ permalink raw reply	[flat|nested] 80+ messages in thread

end of thread, other threads:[~2015-01-23 16:13 UTC | newest]

Thread overview: 80+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-15 21:22 [patch 00/23] x86: Cleanup apic/ioapic/x2apic setup code Thomas Gleixner
2015-01-15 21:22 ` [patch 01/23] x86/apic: Avoid open coded x2apic detection Thomas Gleixner
2015-01-16  9:59   ` Borislav Petkov
2015-01-22 11:39     ` Thomas Gleixner
2015-01-23 16:13       ` Thomas Gleixner
2015-01-22 14:24   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 02/23] x86/apic: Make x2apic_mode depend on CONFIG_X86_X2APIC Thomas Gleixner
2015-01-16 10:50   ` Borislav Petkov
2015-01-22 14:24   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 03/23] x86/apic: Move x2apic code to one place Thomas Gleixner
2015-01-16 10:55   ` Borislav Petkov
2015-01-22 14:25   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 04/23] x86/ioapic: Check x2apic really Thomas Gleixner
2015-01-16 11:10   ` Borislav Petkov
2015-01-16 11:15     ` Borislav Petkov
2015-01-22 14:25   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 05/23] x86/apic: Make disable x2apic work really Thomas Gleixner
2015-01-16 11:17   ` Borislav Petkov
2015-01-22 14:25   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 06/23] x86/apic: Check x2apic early Thomas Gleixner
2015-01-16  8:07   ` Jiang Liu
2015-01-22 14:26   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 07/23] x86/x2apic: Move code in conditional region Thomas Gleixner
2015-01-16 11:56   ` Borislav Petkov
2015-01-22 14:26   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 08/23] x86/x2apic: Clarify remapping mode for x2apic enablement Thomas Gleixner
2015-01-16 14:19   ` Borislav Petkov
2015-01-22 14:26   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 09/23] x86/x2apic: Add proper state tracking Thomas Gleixner
2015-01-16 18:58   ` Borislav Petkov
2015-01-22 14:27   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 10/23] x86/x2apic: Disable x2apic from nox2apic setup Thomas Gleixner
2015-01-16 19:01   ` Borislav Petkov
2015-01-22 14:27   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 11/23] x86/x2apic: Split enable and setup function Thomas Gleixner
2015-01-16 19:00   ` Borislav Petkov
2015-01-22 13:08     ` Thomas Gleixner
2015-01-22 14:28   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 12/23] x86/x2apic: Use state information for disable Thomas Gleixner
2015-01-16 19:01   ` Borislav Petkov
2015-01-22 14:28   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 13/23] x86/smpboot: Move smpboot inlines to code Thomas Gleixner
2015-01-16 19:01   ` Borislav Petkov
2015-01-22 14:28   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 14/23] x86/ioapic: Provide stub functions for IOAPIC=n Thomas Gleixner
2015-01-16 19:02   ` Borislav Petkov
2015-01-22 14:29   ` [tip:x86/apic] x86/ioapic: Provide stub functions for IOAPIC%3Dn tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 15/23] x86/ioapic: Add proper checks to setp/enable_IO_APIC() Thomas Gleixner
2015-01-16 19:02   ` Borislav Petkov
2015-01-22 14:29   ` [tip:x86/apic] x86/ioapic: Add proper checks to setp/ enable_IO_APIC() tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 16/23] x86/apic: Sanitize ioapic handling Thomas Gleixner
2015-01-16 19:02   ` Borislav Petkov
2015-01-22 14:29   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 17/23] x86/smpboot: Cleanup " Thomas Gleixner
2015-01-16 19:03   ` Borislav Petkov
2015-01-22 14:30   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 18/23] x86/apic: Move apic_init_uniprocessor code Thomas Gleixner
2015-01-16 19:03   ` Borislav Petkov
2015-01-22 14:30   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 19/23] init: Get rid of x86isms Thomas Gleixner
2015-01-22 14:30   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 20/23] x86/smpboot: Move apic init code to apic.c Thomas Gleixner
2015-01-16 19:04   ` Borislav Petkov
2015-01-22 14:31   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 21/23] x86/smpboot: Sanitize uniprocessor init Thomas Gleixner
2015-01-16 19:04   ` Borislav Petkov
2015-01-22 14:31   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 22/23] x86/apic: Reuse apic_bsp_setup() for UP APIC setup Thomas Gleixner
2015-01-16 19:04   ` Borislav Petkov
2015-01-22 14:31   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-15 21:22 ` [patch 23/23] x86: Consolidate boot cpu timer setup Thomas Gleixner
2015-01-16 19:04   ` Borislav Petkov
2015-01-22 14:32   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-01-16  9:37 ` [patch 00/23] x86: Cleanup apic/ioapic/x2apic setup code Jiang Liu
2015-01-16 10:21   ` Thomas Gleixner
2015-01-16 10:35     ` Jiang Liu
2015-01-16 11:05     ` Thomas Gleixner
2015-01-16 19:03       ` Borislav Petkov
2015-01-21  1:50       ` Jiang Liu
2015-01-21  9:33         ` Thomas Gleixner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.