Skip to content

x86/entry: Consolidation - Part V

Thomas Gleixner lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15x86/irq: Convey vector as argument and not in ptregsarch/x86/entry/entry_32.S arch/x86/entry/entry_64.S arch/x86/include/asm/entry_arch.h +6 more+41 -258 replies
2/15x86/entry/64: Add ability to switch to IRQ stacks in idtentryarch/x86/entry/entry_64.S+14 -40 replies
3/15x86/entry: Add IRQENTRY_IRQ macroarch/x86/include/asm/idtentry.h+44 -01 reply
4/15x86/entry: Use idtentry for interruptsarch/x86/entry/entry_32.S arch/x86/entry/entry_64.S arch/x86/include/asm/hw_irq.h +6 more+44 -700 replies
5/15x86/entry: Provide IDTEnTRY_SYSVECarch/x86/entry/entry_32.S arch/x86/entry/entry_64.S arch/x86/include/asm/idtentry.h+44 -42 replies
6/15x86/entry: Convert APIC interrupts to IDTENTRY_SYSVECarch/x86/entry/entry_64.S arch/x86/include/asm/entry_arch.h arch/x86/include/asm/hw_irq.h +6 more+18 -270 replies
7/15x86/entry: Convert SMP system vectors to IDTENTRY_SYSVECarch/x86/entry/entry_64.S arch/x86/include/asm/entry_arch.h arch/x86/include/asm/hw_irq.h +5 more+21 -370 replies
8/15x86/entry: Convert various system vectorsarch/x86/entry/entry_64.S arch/x86/include/asm/entry_arch.h arch/x86/include/asm/hw_irq.h +10 more+41 -780 replies
9/15x86/entry: Convert KVM vectors to IDTENTRY_SYSVECarch/x86/entry/entry_32.S arch/x86/entry/entry_64.S arch/x86/include/asm/entry_arch.h +5 more+12 -431 reply
10/15x86/entry: Convert various hypervisor vectors to IDTENTRY_SYSVECarch/x86/entry/entry_32.S arch/x86/entry/entry_64.S arch/x86/hyperv/hv_init.c +5 more+28 -680 replies
11/15x86/entry: Convert XEN hypercall vector to IDTENTRY_SYSVECarch/x86/entry/entry_32.S arch/x86/entry/entry_64.S arch/x86/include/asm/idtentry.h +3 more+12 -180 replies
12/15x86/entry: Remove the apic/BUILD interrupt leftoversarch/x86/entry/entry_32.S arch/x86/entry/entry_64.S+0 -1330 replies
13/15x86/entry/32: Remove redundant irq disable codearch/x86/entry/entry_32.S+0 -110 replies
14/15x86/entry: Provide return_from exception()arch/x86/entry/common.c arch/x86/include/asm/idtentry.h+45 -00 replies
15/15x86/entry: Use return_from_exception()arch/x86/entry/common.c arch/x86/entry/entry_32.S arch/x86/entry/entry_64.S +1 more+14 -560 replies

Reviews trailers per patch

2 of 15 patches have a Reviewed-by or Acked-by.

PatchAndy LutomirskiPaolo Bonzini
1/15Originally-by R-b
2/15
3/15
4/15
5/15
6/15
7/15
8/15
9/15A-b
10/15
11/15
12/15
13/15
14/15
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [patch 00/15] x86/entry: Consolidation - Part V

Hi!

This is the fifthh batch of a 73 patches series which consolidates the x86 entry code. The larger explanation is in the part I cover letter:

https://lore.kernel.org/r/[email protected]

I applies on top of part IV which can be found here:

https://lore.kernel.org/r/[email protected]

This is the last step of _this_ consolidation work:

- Get rid of the odd vector number transport via pt_regs for do_IRQ() and spurious interrupt handlers by pushing the plain vector number into the error code location and providing it as second argument to the C functions. This also gets rid of thehistorical adjustment of the vector number into the -0x80 to 0x7f range which does not make any sense for at least 15 years but still survived until today

- Get rid of the special entry code for device interrupts which just can use the common idtentry mechanisms as all other exceptions do.

- Convert all the system vectors to the IDTENTRY mechanism and get rid of the pointless difference in evicting them on 32 and 64 bit

- Finally move the return from exception work (prepare return to user mode and kernel preemption) into C-code and get rid of the ASM gunk.

This applies on top of part three which is available here:

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git entry-v1-part4

To get part 1 - 5 pull from here:

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git entry-v1-part5

The diffstat for part V is appended below. The overall diffstat summary is:

 50 files changed, 1380 insertions(+), 1264 deletions(-)

but most importantly the overall diffstat for the ASM code is:

 3 files changed, 302 insertions(+), 759 deletions(-)

i.e. 457 lines of ASM gone...

and all idt entry points have now:

- a central home in idtentry.h instead of being sprinkled aorund 10 files

- a consistent naming scheme also vs. XEN/PV

- the same entry/exit conventions and protections against all sorts of instrumentation which makes it harder to screw up for new entry points

This finally allows to move the sysall entry/exit work into a generic place and fix the initial problem of moving POSIX CPu tiemrs hevay lifting into thread context. But that's going to be another 25 patches which are coming once this is resolved.

Thanks,

tglx

8<---------------

 arch/x86/include/asm/acrn.h             |   11 -
 arch/x86/include/asm/entry_arch.h       |   56 ------
 b/arch/x86/entry/common.c               |   56 ++++--
 b/arch/x86/entry/entry_32.S             |  123 ++-----------
 b/arch/x86/entry/entry_64.S             |  296 +++++---------------------------
 b/arch/x86/hyperv/hv_init.c             |    3 
 b/arch/x86/include/asm/hw_irq.h         |   22 --
 b/arch/x86/include/asm/idtentry.h       |  143 +++++++++++++++
 b/arch/x86/include/asm/irq.h            |    6 
 b/arch/x86/include/asm/irq_work.h       |    1 
 b/arch/x86/include/asm/mshyperv.h       |   14 -
 b/arch/x86/include/asm/traps.h          |   10 -
 b/arch/x86/include/asm/uv/uv_bau.h      |    6 
 b/arch/x86/kernel/apic/apic.c           |   28 ++-
 b/arch/x86/kernel/apic/msi.c            |    3 
 b/arch/x86/kernel/apic/vector.c         |    2 
 b/arch/x86/kernel/cpu/acrn.c            |    6 
 b/arch/x86/kernel/cpu/mce/amd.c         |    2 
 b/arch/x86/kernel/cpu/mce/therm_throt.c |    2 
 b/arch/x86/kernel/cpu/mce/threshold.c   |    2 
 b/arch/x86/kernel/cpu/mshyperv.c        |   18 +
 b/arch/x86/kernel/idt.c                 |   34 +--
 b/arch/x86/kernel/irq.c                 |   21 +-
 b/arch/x86/kernel/irq_work.c            |    3 
 b/arch/x86/kernel/smp.c                 |   10 -
 b/arch/x86/platform/uv/tlb_uv.c         |    2 
 b/arch/x86/xen/enlighten_hvm.c          |    6 
 b/drivers/xen/events/events_base.c      |    3 
 b/include/xen/events.h                  |    7 
 29 files changed, 350 insertions(+), 546 deletions(-)