| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f45edca commit b715339
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -71,11 +71,16 @@ struct mk_pci_host_bridge; | |||
| 71 | 71 | ||
| 72 | 72 | #ifdef CONFIG_MULTIKERNEL | |
| 73 | 73 | void __init x86_multikernel_pci_platform_init(void); | |
| 74 | + bool x86_multikernel_skip_apic_timer_verify(void); | ||
| 74 | 75 | int mk_arch_snapshot_pci_host_bridges(const struct mk_instance *instance, | |
| 75 | 76 | struct mk_pci_host_bridge *bridges, | |
| 76 | 77 | size_t capacity); | |
| 77 | 78 | #else | |
| 78 | 79 | static inline void x86_multikernel_pci_platform_init(void) { } | |
| 80 | + static inline bool x86_multikernel_skip_apic_timer_verify(void) | ||
| 81 | + { | ||
| 82 | + return false; | ||
| 83 | + } | ||
| 79 | 84 | #endif | |
| 80 | 85 | ||
| 81 | 86 | #endif /* __ASSEMBLY__ */ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -67,6 +67,7 @@ | |||
| 67 | 67 | #include <asm/intel-family.h> | |
| 68 | 68 | #include <asm/irq_regs.h> | |
| 69 | 69 | #include <asm/cpu.h> | |
| 70 | + #include <asm/multikernel.h> | ||
| 70 | 71 | ||
| 71 | 72 | #include "local.h" | |
| 72 | 73 | ||
@@ -923,7 +924,8 @@ static int __init calibrate_APIC_clock(void) | |||
| 923 | 924 | * timer based calibration, if a global clockevent device is | |
| 924 | 925 | * available. | |
| 925 | 926 | */ | |
| 926 | - if (!pm_referenced && global_clock_event) { | ||
| 927 | + if (!pm_referenced && global_clock_event && | ||
| 928 | + !x86_multikernel_skip_apic_timer_verify()) { | ||
| 927 | 929 | apic_pr_verbose("... verify APIC timer\n"); | |
| 928 | 930 | ||
| 929 | 931 | /* | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,4 +3,4 @@ | |||
| 3 | 3 | # Makefile for multikernel spawn support | |
| 4 | 4 | # | |
| 5 | 5 | ||
| 6 | - obj-y += spawn.o pci.o direct_boot.o head_64.o | ||
| 6 | + obj-y += spawn.o pci.o timer.o direct_boot.o head_64.o | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,22 @@ | |||
| 1 | + // SPDX-License-Identifier: GPL-2.0-only | ||
| 2 | + /* x86 timer policy for multikernel spawn kernels. */ | ||
| 3 | + | ||
| 4 | + #include <linux/printk.h> | ||
| 5 | + | ||
| 6 | + #include <asm/bootparam.h> | ||
| 7 | + #include <asm/multikernel.h> | ||
| 8 | + #include <asm/setup.h> | ||
| 9 | + | ||
| 10 | + bool x86_multikernel_skip_apic_timer_verify(void) | ||
| 11 | + { | ||
| 12 | + if (boot_params.hdr.hardware_subarch != X86_SUBARCH_MULTIKERNEL) | ||
| 13 | + return false; | ||
| 14 | + | ||
| 15 | + /* | ||
| 16 | + * A spawn kernel does not own the platform timer interrupt used by the | ||
| 17 | + * legacy verification. Its LAPIC was calibrated against the TSC, while | ||
| 18 | + * jiffies driven by the primary kernel's timer cannot advance here. | ||
| 19 | + */ | ||
| 20 | + pr_info("APIC timer: skipping legacy timer verification for multikernel\n"); | ||
| 21 | + return true; | ||
| 22 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments