Skip to content

RFC x86/init: use linker table

Luis R. Rodriguez lkml xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 RFC Latest6 patches 6 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6x86/boot: add BIT() to boot/bitops.harch/x86/boot/bitops.h arch/x86/boot/boot.h+3 -12 replies
2/6x86/init: use linker tables to simplify x86 init and annotate dependenciesarch/x86/Kconfig.debug arch/x86/include/asm/x86_init.h arch/x86/include/asm/x86_init_fn.h +11 more+567 -04 replies
3/6x86/init: move ebda reservations into linker tablearch/x86/Makefile arch/x86/include/asm/bios_ebda.h arch/x86/kernel/Makefile +3 more+5 -110 replies
4/6x86/init: use linker table for i386 early setuparch/x86/kernel/head32.c+5 -40 replies
5/6x86/init: user linker table for ce4100 early setuparch/x86/include/asm/setup.h arch/x86/kernel/head32.c arch/x86/platform/ce4100/ce4100.c+3 -100 replies
6/6x86/init: use linker table for mid early setuparch/x86/include/asm/setup.h arch/x86/kernel/head32.c arch/x86/kernel/head64.c +1 more+3 -220 replies

Reviews trailers per patch

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

PatchKonrad Rzeszutek Wilk
1/6R-b
2/6
3/6R-b
4/6
5/6
6/6

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

Read the v2 thread

Cover letter [RFC v2 0/6] x86/init: use linker table

This v2 is a re-work of the original linker table work [0], I've split that original series out into 3:

* paravirt_enabled() work [1]
* linker table alone and proof of concepts [2]
* this series - a new use for linker tables on x86 init

Since the crux of this work is the the linker tables, I expect most feedback to come through there, but this also had a few comments, which I've addressed in this series.

The key here is we drop the direct use of the subarch and instead make them an explicit requirement consideration for early x86 boot code. Without this we have no ways but code review to ensure mismatches will not happen. In theory code review should catch this, in practice -- its not happening. This takes a proactive approach to the problem.

The full set of patches (from all related series) are also available on linux-next [3] and Linus based tree [4].

[0] http://lkml.kernel.org/r/[email protected]
[1] http://lkml.kernel.org/r/[email protected]
[2] http://lkml.kernel.org/r/[email protected]
[3] https://git.kernel.org/cgit/linux/kernel/git/mcgrof/linux-next.git/log/?h=20160219-linker-table-v2
[4] https://git.kernel.org/cgit/linux/kernel/git/mcgrof/linux.git/log/?h=20160219-linker-table-v2

Luis R. Rodriguez (6):
x86/boot: add BIT() to boot/bitops.h
x86/init: use linker tables to simplify x86 init and annotate
dependencies
x86/init: move ebda reservations into linker table x86/init: use linker table for i386 early setup x86/init: user linker table for ce4100 early setup x86/init: use linker table for mid early setup

 arch/x86/Kconfig.debug                  |  47 ++++++
 arch/x86/Makefile                       |   1 -
 arch/x86/boot/bitops.h                  |   2 +
 arch/x86/boot/boot.h                    |   2 +-
 arch/x86/include/asm/bios_ebda.h        |   2 -
 arch/x86/include/asm/setup.h            |  12 --
 arch/x86/include/asm/x86_init.h         |   1 +
 arch/x86/include/asm/x86_init_fn.h      | 263 ++++++++++++++++++++++++++++++++
 arch/x86/kernel/Makefile                |   5 +-
 arch/x86/kernel/dbg-tables/Makefile     |  18 +++
 arch/x86/kernel/dbg-tables/alpha.c      |  10 ++
 arch/x86/kernel/dbg-tables/beta.c       |  18 +++
 arch/x86/kernel/dbg-tables/delta.c      |  10 ++
 arch/x86/kernel/dbg-tables/gamma.c      |  18 +++
 arch/x86/kernel/dbg-tables/gamma.h      |   3 +
 arch/x86/kernel/{head.c => ebda.c}      |   6 +-
 arch/x86/kernel/head32.c                |  23 +--
 arch/x86/kernel/head64.c                |  12 +-
 arch/x86/kernel/init.c                  |  55 +++++++
 arch/x86/kernel/sort-init.c             | 114 ++++++++++++++
 arch/x86/platform/ce4100/ce4100.c       |   4 +-
 arch/x86/platform/intel-mid/intel-mid.c |   4 +-
 22 files changed, 584 insertions(+), 46 deletions(-)
 create mode 100644 arch/x86/include/asm/x86_init_fn.h
 create mode 100644 arch/x86/kernel/dbg-tables/Makefile
 create mode 100644 arch/x86/kernel/dbg-tables/alpha.c
 create mode 100644 arch/x86/kernel/dbg-tables/beta.c
 create mode 100644 arch/x86/kernel/dbg-tables/delta.c
 create mode 100644 arch/x86/kernel/dbg-tables/gamma.c
 create mode 100644 arch/x86/kernel/dbg-tables/gamma.h
 rename arch/x86/kernel/{head.c => ebda.c} (94%)
 create mode 100644 arch/x86/kernel/init.c
 create mode 100644 arch/x86/kernel/sort-init.c
Signature · 1 line
2.7.0