Skip to content

First attempt at smp integration

Glauber Costa lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest52 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/52commonize smp.hinclude/asm-x86/smp.h+7 -00 replies
2/52merge extern function definitionsinclude/asm-x86/smp.h include/asm-x86/smp_32.h include/asm-x86/smp_64.h+3 -80 replies
3/52merge extern variables definitionsinclude/asm-x86/smp.h include/asm-x86/smp_32.h include/asm-x86/smp_64.h+6 -80 replies
4/52define smp_ops in common headerinclude/asm-x86/smp.h include/asm-x86/smp_32.h+14 -140 replies
5/52move smp_ops extern declaration to common headerarch/x86/kernel/smp_64.c include/asm-x86/smp.h include/asm-x86/smp_32.h+5 -20 replies
6/52merge smp_send_reschedulearch/x86/kernel/smp_64.c include/asm-x86/smp.h include/asm-x86/smp_32.h +1 more+10 -80 replies
7/52unify smp_call_function_maskarch/x86/kernel/smp_64.c include/asm-x86/smp.h include/asm-x86/smp_32.h+11 -90 replies
8/52unify __cpu_up.arch/x86/kernel/smp_64.c arch/x86/kernel/smpboot_64.c include/asm-x86/smp.h +1 more+9 -60 replies
9/52unify prepare_boot_cpuarch/x86/kernel/smp_64.c arch/x86/kernel/smpboot_64.c include/asm-x86/smp.h +1 more+8 -60 replies
10/52unify smp_prepare_cpusarch/x86/kernel/smp_64.c arch/x86/kernel/smpboot_64.c include/asm-x86/smp.h +1 more+8 -60 replies
11/52unify smp_cpus_donearch/x86/kernel/smp_64.c arch/x86/kernel/smpboot_64.c include/asm-x86/smp.h +1 more+9 -80 replies
12/52move disabled_cpus to common headerinclude/asm-x86/smp.h include/asm-x86/smp_64.h+3 -10 replies
13/52use disabled_cpus in i386arch/x86/kernel/mpparse_32.c+5 -10 replies
14/52move prefill_possible_map to common filearch/x86/kernel/Makefile arch/x86/kernel/smpboot.c arch/x86/kernel/smpboot_64.c +2 more+55 -530 replies
15/52remove export for smp_call_function_mask.arch/x86/kernel/smp_64.c+0 -10 replies
16/52remove irqs disabled warning.arch/x86/kernel/smp_64.c+0 -30 replies
17/52create smpcommon.carch/x86/kernel/Makefile arch/x86/kernel/smp_64.c arch/x86/kernel/smpcommon.c +1 more+85 -1390 replies
18/52provide __smp_call_functionarch/x86/kernel/smp_64.c+33 -10 replies
19/52change x86_64 smp_call_function_mask to look alike i386arch/x86/kernel/smp_32.c arch/x86/kernel/smp_64.c+17 -420 replies
20/52provide hlt_works function.include/asm-x86/processor.h+9 -00 replies
21/52make stop_this_cpu looks exactly equal in both archesarch/x86/kernel/smp_32.c arch/x86/kernel/smp_64.c+4 -30 replies
22/52add reboot_force test to native_smp_send_stoparch/x86/kernel/smp_32.c+7 -20 replies
23/52unify smp_send_stoparch/x86/kernel/smp_64.c include/asm-x86/smp.h include/asm-x86/smp_32.h+7 -60 replies
24/52create smp.carch/x86/kernel/Makefile arch/x86/kernel/smp.c arch/x86/kernel/smp_32.c +1 more+255 -4290 replies
25/52create ipi.carch/x86/kernel/Makefile arch/x86/kernel/ipi.c arch/x86/kernel/smp_32.c+179 -1540 replies
26/52create tlb filesarch/x86/kernel/Makefile arch/x86/kernel/smp_32.c arch/x86/kernel/smp_64.c +2 more+517 -5110 replies
27/52get rid of smp_32.c and smp_64.carch/x86/kernel/Makefile arch/x86/kernel/smp.c arch/x86/kernel/smp_32.c +1 more+93 -1180 replies
28/52remove cpu_llc_id from processor.hinclude/asm-x86/processor.h+1 -30 replies
29/52adjust types in smpcommon_32.carch/x86/kernel/smpboot_32.c include/asm-x86/smp_32.h+6 -60 replies
30/52move equal types to common filearch/x86/kernel/smpboot.c arch/x86/kernel/smpboot_32.c arch/x86/kernel/smpboot_64.c +1 more+29 -600 replies
31/52make set_cpu_sibling_map nonstaticarch/x86/kernel/smpboot_64.c include/asm-x86/smp.h include/asm-x86/smp_32.h+4 -40 replies
32/52make remove_siblinginfo non-staticarch/x86/kernel/smpboot_64.c+1 -10 replies
33/52move hotplug related extern definitions to smp.hinclude/asm-x86/smp.h include/asm-x86/smp_32.h+6 -60 replies
34/52move sibling functions to common filearch/x86/kernel/smpboot.c arch/x86/kernel/smpboot_32.c arch/x86/kernel/smpboot_64.c+88 -1770 replies
35/52move cpu_coregroup_map to common filearch/x86/kernel/smpboot.c arch/x86/kernel/smpboot_32.c arch/x86/kernel/smpboot_64.c+16 -280 replies
36/52remove vector_lock around cpu_online_maparch/x86/kernel/smpboot_64.c+1 -30 replies
37/52use remove_from_maps in cpu_disablearch/x86/kernel/smpboot_32.c arch/x86/kernel/smpboot_64.c+9 -60 replies
38/52do not clear cpu_online_maparch/x86/kernel/smpboot_32.c+1 -20 replies
39/52merge __cpu_disable and cpu_diearch/x86/kernel/smpboot.c arch/x86/kernel/smpboot_32.c arch/x86/kernel/smpboot_64.c +3 more+88 -1520 replies
40/52make x86_64 accept the max_cpus parameterarch/x86/kernel/mpparse_64.c arch/x86/kernel/smpboot.c arch/x86/kernel/smpboot_32.c+19 -130 replies
41/52move trampoline arrays extern definition to smp.harch/x86/kernel/smpboot_32.c arch/x86/kernel/smpboot_64.c include/asm-x86/smp.h+6 -130 replies
42/52adapt voyager's trampoline_basearch/x86/mach-voyager/voyager_smp.c+4 -40 replies
43/52adapt voyager's setup_trampolinearch/x86/mach-voyager/voyager_smp.c+1 -10 replies
44/52unify setup_trampolinearch/x86/kernel/smpboot.c arch/x86/kernel/smpboot_32.c arch/x86/kernel/smpboot_64.c +2 more+37 -450 replies
45/52use wait_for_init_deassert in x86_64arch/x86/kernel/smpboot_64.c+8 -20 replies
46/52use cpu_relax instead of rep_noparch/x86/kernel/smpboot_32.c+2 -20 replies
47/52leave irqs enabled while calibrating delay.arch/x86/kernel/smpboot_32.c+5 -00 replies
48/52modify x86_64 smp_callin so it looks like i386arch/x86/kernel/smpboot_64.c+4 -00 replies
49/52wrap esr setting up in i386 in lapic_setup_esrarch/x86/kernel/apic_32.c+40 -330 replies
50/52provide an end_local_APIC_setup functionarch/x86/kernel/apic_32.c arch/x86/kernel/smpboot_32.c+7 -10 replies
51/52make map_cpu_to_logical_apicid nonstaticarch/x86/kernel/smpboot_32.c+2 -20 replies
52/52merge smp_callinarch/x86/kernel/smpboot.c arch/x86/kernel/smpboot_32.c arch/x86/kernel/smpboot_64.c +1 more+114 -1900 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/52] First attempt at smp integration

Hi,

This series of patches does a first attempt at smp integration (I call it first, although I don't believe it's too far away from a real one). The series comprises 52 patches, and the full diffstat says in the end:

	 34 files changed, 1858 insertions(+), 2344 deletions(-)

smp_32.c and smp_64.c are completely gone. smp.h and smpboot_{32,64}.c are not, although substantially reduced. I know that ideally, no leftovers are wanted, but the series were already big enough (I tried to split the patches as much as I could), so I considered this a good cutting point. If this is all agreed upon and merged, I'll start looking at the other bits that are left.

All patches are tested is various random x86 subarchitectures, and all of them works. The result also boots fine in mine x86_64 and i386 boxes.

Comments are welcome.

 arch/x86/kernel/Makefile               |   11 
 arch/x86/kernel/apic_32.c              |    7 
 arch/x86/kernel/smp_32.c               |  730 ---------------------------------
 arch/x86/kernel/smp_64.c               |  674 +++---------------------------
 arch/x86/kernel/smpboot.c              |  372 ++++++++++++++++
 arch/x86/kernel/smpboot_32.c           |  363 ----------------
 arch/x86/kernel/smpboot_64.c           |  432 -------------------
 arch/x86/mach-voyager/voyager_smp.c    |    3 
 b/arch/x86/kernel/Makefile             |    2 
 b/arch/x86/kernel/apic_32.c            |   74 +--
 b/arch/x86/kernel/ipi.c                |  178 ++++++++
 b/arch/x86/kernel/mpparse_32.c         |    7 
 b/arch/x86/kernel/mpparse_64.c         |    7 
 b/arch/x86/kernel/smp.c                |  253 +++++++++++
 b/arch/x86/kernel/smp_32.c             |    2 
 b/arch/x86/kernel/smp_64.c             |    2 
 b/arch/x86/kernel/smpboot.c            |   53 ++
 b/arch/x86/kernel/smpboot_32.c         |    6 
 b/arch/x86/kernel/smpboot_64.c         |    2 
 b/arch/x86/kernel/smpcommon.c          |   83 +++
 b/arch/x86/kernel/smpcommon_32.c       |   82 ---
 b/arch/x86/kernel/tlb_32.c             |  243 ++++++++++
 b/arch/x86/kernel/tlb_64.c             |  274 ++++++++++++
 b/arch/x86/mach-voyager/voyager_smp.c  |    9 
 b/include/asm-x86/processor.h          |   10 
 b/include/asm-x86/smp.h                |    8 
 b/include/asm-x86/smp_32.h             |    4 
 b/include/asm-x86/smp_64.h             |    5 
 include/asm-x86/processor.h            |    5 
 include/asm-x86/smp.h                  |   99 ++++
 include/asm-x86/smp_32.h               |   86 ---
 include/asm-x86/smp_64.h               |   21 
 linux-2.6-x86/arch/x86/kernel/Makefile |    4 
 linux-2.6-x86/arch/x86/kernel/smp.c    |   91 ++++
 34 files changed, 1858 insertions(+), 2344 deletions(-)