Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1638841 > unrolled thread
| Started by | Dou Liyang <douly.fnst@cn.fujitsu.com> |
|---|---|
| First post | 2017-05-10 15:50 +0200 |
| Last post | 2017-05-10 15:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[RFC PATCH v3 04/12] x86/time: Initialize interrupt mode behind timer init Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-05-10 15:50 +0200
| From | Dou Liyang <douly.fnst@cn.fujitsu.com> |
|---|---|
| Date | 2017-05-10 15:50 +0200 |
| Subject | [RFC PATCH v3 04/12] x86/time: Initialize interrupt mode behind timer init |
| Message-ID | <tFAa6-1mz-25@gated-at.bofh.it> |
In start_kernel(), firstly, it works on the default interrupy mode, then
switch to the final mode. Normally, Booting with BIOS reset is OK.
But, At dump-capture kernel, it boot up without BIOS reset, default mode
may not be compatible with the actual registers, that causes the delivery
interrupt to fail.
Try to set up the final mode as soon as possible. according to the parts
which split from that initialization:
1) Set up the APIC/IOAPIC (including testing whether the timer
interrupt works)
2) Calibrate TSC
3) Set up the local APIC timer
-- From Thomas Gleixner
Initializing the mode should be earlier than calibrating TSC as soon as
possible and needs testing whether the timer interrupt works at the same
time.
Add apic_interrupt_mode_init() just behind timers init, which meet the
above conditions.
Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
---
arch/x86/kernel/time.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/x86/kernel/time.c b/arch/x86/kernel/time.c
index d39c091..23b074e 100644
--- a/arch/x86/kernel/time.c
+++ b/arch/x86/kernel/time.c
@@ -21,6 +21,7 @@
#include <asm/timer.h>
#include <asm/hpet.h>
#include <asm/time.h>
+#include <asm/apic.h>
#ifdef CONFIG_X86_64
__visible volatile unsigned long jiffies __cacheline_aligned = INITIAL_JIFFIES;
@@ -84,6 +85,13 @@ void __init hpet_time_init(void)
static __init void x86_late_time_init(void)
{
x86_init.timers.timer_init();
+
+ /*
+ * After PIT/HPET timers init, select and setup
+ * the final interrupt mode for delivering IRQs.
+ */
+ apic_interrupt_mode_init();
+
tsc_init();
}
--
2.5.5
Back to top | Article view | linux.kernel
csiph-web