RFC x86: Refactor the setup code to provide a base for embedded platforms
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest32 patches 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/32 | x86: Add platform_setup infrastructurearch/ arch/ arch/ +1 more | +43 | 0 replies | |
| 2/32 | x86: Add probe_roms to platform_setuparch/ arch/ arch/ +1 more | +18 | 12 replies | |
| 3/32 | x86: Add request_standard_resources to platform_setuparch/ arch/ arch/ +2 more | +25 | 0 replies | |
| 4/32 | x86: Add reserve_ebda_region to platform_setuparch/ arch/ arch/ +1 more | +7 | 0 replies | |
| 5/32 | x86: Move memory_setup to platformarch/ arch/ arch/ +8 more | +11 | 0 replies | |
| 6/32 | x86: Sanitize smp_record and move it to platform_setuparch/ arch/ arch/ +2 more | +26 | 0 replies | |
| 7/32 | x86: Move ioapic_ids_setup to platform_setuparch/ arch/ arch/ +4 more | +23 | 0 replies | |
| 8/32 | x86: Move mpc_apic_id to platform_setuparch/ arch/ arch/ +3 more | +15 | 0 replies | |
| 9/32 | x86: Move smp_read_mpc_oem to platform_setuparch/ arch/ arch/ +3 more | +13 | 0 replies | |
| 10/32 | x86: Move mpc_oem_pci_bus to platform_setuparch/ arch/ arch/ +1 more | +6 | 0 replies | |
| 11/32 | x86: Move oem_bus_info to platform_setuparch/ arch/ arch/ +3 more | +18 | 0 replies | |
| 12/32 | x86: Move get/find_smp_config to platform_setuparch/ arch/ arch/ +5 more | +36 | 0 replies | |
| 13/32 | x86: Move pre_intr_init to platform_setuparch/ arch/ arch/ +4 more | +22 | 0 replies | |
| 14/32 | x86: Move irq_init to platform_setuparch/ arch/ arch/ +9 more | +11 | 0 replies | |
| 15/32 | x86: Move traps_init to platform_setuparch/ arch/ arch/ +4 more | +8 | 0 replies | |
| 16/32 | x86: Replace ARCH_SETUP by a proper platform functionarch/ arch/ arch/ +3 more | +15 | 4 replies | |
| 17/32 | x86: Move paravirt banner printout to platformarch/ arch/ arch/ +3 more | +11 | 0 replies | |
| 18/32 | x86: Move paravirt pagetable_setup to platformarch/ arch/ arch/ +7 more | +32 | 0 replies | |
| 19/32 | x86: Move xen_post_allocator_init into xen_pagetable_setup_donearch/ arch/ arch/ +3 more | +4 | 0 replies | |
| 20/32 | x86: Move percpu clockevents setup to platformarch/ arch/ arch/ +7 more | +43 | 0 replies | |
| 21/32 | x86: Add timer_init to platformarch/ arch/ arch/ +13 more | +54 | 1 reply | |
| 22/32 | x86: Remove do_timer hookarch/ arch/ | +4 | 0 replies | |
| 23/32 | x86: Prepare unification of time_32/64.carch/ arch/ | +16 | 0 replies | |
| 24/32 | x86: Simplify timer_ack magic in time_32.carch/ arch/ arch/ | +21 | 0 replies | |
| 25/32 | x86: Remove mca bus ifdef from timer interruptarch/ arch/ | +6 | 0 replies | |
| 26/32 | x86: Make timer setup and global variables the same in time_32/64.carch/ arch/ | +35 | 0 replies | |
| 27/32 | x86: Move calibrate_cpu to tsc.carch/ arch/ arch/ +1 more | +55 | 0 replies | |
| 28/32 | x86: time_32/64.c unify profile_pcarch/ arch/ | +11 | 0 replies | |
| 29/32 | x86: Replace the now identical time_32/64.c by time.carch/ arch/ arch/ +1 more | +121 | 0 replies | |
| 30/32 | x86: Move tsc_calibration to platformarch/ arch/ arch/ +14 more | +42 | 0 replies | |
| 31/32 | init: Move sched_clock_init after late_time_initinit/ | +1 | 0 replies | |
| 32/32 | x86: Move tsc_init to late_time_initarch/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC patch 00/32] x86: Refactor the setup code to provide a base for embedded platforms
The recently posted Moorestown support patches finally indicate the arrival of the embedded nightmare to arch/x86.
Moorestown is a SoC with a x86 core and a bunch of random peripherals glued around it. It finally gets rid of legacy hardware like PIT, 8042 et. al. but on the other hand it introduces the full embedded horror by adding random peripheral IP cores as an replacement which are glued onto the x86 CPU with duct tape and other nasty tricks.
The most remarkable achievement is the PIT replacement AHBT timer which is originally an ARM AMBA based IP core and provides random timer readout and other fancy features. It's the final prove that Intel HW folks are unable to design a working timer. Sigh, I eventually hoped that we see something usable in that area after a decade of suffering. :(
Anyway. We want to support Moorestown & Co. nevertheless, but as we have seen from the initial patches it needs to fiddle in the guts of the x86 setup code. Most of the points where it interferes are already covered by x86_quirks or paravirt modifications, but we cannot use either of those to do sane multi platform support.
The following patch series refactors the setup related x86_quirks and the setup related paravirt hooks and puts them into an extensible platform_setup infrastructure to provide a proper base for adding the Moorestown modifications. As a side effect it also unifies time_32/64.c and removes some leftovers of the pre arch/x86 era.
Note, this is not a replacement for paravirt_ops. It is just replacing the setup related paravirt stuff so it can be reused for other platforms though I have to say that it removes a fair amount of obscurity which was introduced by paravirt & Co.
The total result of this overhaul is:
arch/x86/include/asm/do_timer.h | 16 -- arch/x86/kernel/time_32.c | 137 ------------------------- arch/x86/kernel/time_64.c | 135 ------------------------ linux-2.6/arch/x86/include/asm/apic.h | 3 linux-2.6/arch/x86/include/asm/e820.h | 2 linux-2.6/arch/x86/include/asm/hypervisor.h | 2 linux-2.6/arch/x86/include/asm/io_apic.h | 3 linux-2.6/arch/x86/include/asm/irq.h | 3 linux-2.6/arch/x86/include/asm/mpspec.h | 40 ++++++- linux-2.6/arch/x86/include/asm/paravirt.h | 63 ----------- linux-2.6/arch/x86/include/asm/pgtable.h | 10 - linux-2.6/arch/x86/include/asm/pgtable_types.h | 4 linux-2.6/arch/x86/include/asm/platform.h | 130 +++++++++++++++++++++++ linux-2.6/arch/x86/include/asm/setup.h | 45 -------- linux-2.6/arch/x86/include/asm/time.h | 3 linux-2.6/arch/x86/include/asm/timer.h | 14 -- linux-2.6/arch/x86/include/asm/tsc.h | 3 linux-2.6/arch/x86/include/asm/vmware.h | 2 linux-2.6/arch/x86/kernel/Makefile | 4 linux-2.6/arch/x86/kernel/apic/apic.c | 3 linux-2.6/arch/x86/kernel/apic/io_apic.c | 11 -- linux-2.6/arch/x86/kernel/apic/numaq_32.c | 55 ++++------ linux-2.6/arch/x86/kernel/cpu/hypervisor.c | 14 +- linux-2.6/arch/x86/kernel/cpu/vmware.c | 35 +++--- linux-2.6/arch/x86/kernel/e820.c | 19 --- linux-2.6/arch/x86/kernel/head32.c | 11 +- linux-2.6/arch/x86/kernel/head64.c | 3 linux-2.6/arch/x86/kernel/irqinit.c | 36 +----- linux-2.6/arch/x86/kernel/kvmclock.c | 7 - linux-2.6/arch/x86/kernel/mpparse.c | 75 ++++--------- linux-2.6/arch/x86/kernel/paravirt.c | 34 ------ linux-2.6/arch/x86/kernel/platform_setup.c | 73 +++++++++++++ linux-2.6/arch/x86/kernel/setup.c | 111 ++------------------ linux-2.6/arch/x86/kernel/smpboot.c | 4 linux-2.6/arch/x86/kernel/time.c | 120 +++++++++++++++++++++ linux-2.6/arch/x86/kernel/traps.c | 5 linux-2.6/arch/x86/kernel/tsc.c | 69 ++++++++++-- linux-2.6/arch/x86/kernel/visws_quirks.c | 56 +++------- linux-2.6/arch/x86/kernel/vmi_32.c | 9 - linux-2.6/arch/x86/kernel/vmiclock_32.c | 2 linux-2.6/arch/x86/lguest/boot.c | 9 - linux-2.6/arch/x86/xen/enlighten.c | 23 ++-- linux-2.6/arch/x86/xen/irq.c | 5 linux-2.6/arch/x86/xen/mmu.c | 16 ++ linux-2.6/arch/x86/xen/mmu.h | 2 linux-2.6/arch/x86/xen/xen-ops.h | 2 linux-2.6/init/main.c | 2 47 files changed, 622 insertions(+), 808 deletions(-)
Thanks,
tglx