diff options
author | Dou Liyang <douly.fnst@cn.fujitsu.com> | 2017-09-13 17:12:51 +0800 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-09-25 15:03:16 +0200 |
commit | ca7c6076baed396737e31e33b87a637d70e9fc5f (patch) | |
tree | 3a9bc456de88d87a1f62fc7d58c2fec94ec3415e /arch/x86/xen | |
parent | 0c759131ae568f2e620485662104ab8c1e770c81 (diff) | |
download | linux-ca7c6076baed396737e31e33b87a637d70e9fc5f.tar.bz2 |
x86/ioapic: Refactor the delay logic in timer_irq_works()
timer_irq_works() is used to detects the timer IRQs. It calls mdelay(10) to
delay ten ticks and check whether the timer IRQ work or not.
mdelay() depends on the loops_per_jiffy which is set up in
calibrate_delay(), but the delay calibration depends on a working timer
interrupt, which causes a chicken and egg problem.
The correct solution is to set up the interrupt mode and making sure that
the timer interrupt is delivered correctly before invoking calibrate_delay().
That means that mdelay() cannot be used in timer_irq_works().
Provide helper functions to make a rough delay estimate which is good enough
to prove that the timer interrupt is working. Either use TSC or a simple
delay loop and assume that 4GHz is the maximum CPU frequency to base the
delay calculation on.
Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: yinghai@kernel.org
Cc: bhe@redhat.com
Link: https://lkml.kernel.org/r/1505293975-26005-9-git-send-email-douly.fnst@cn.fujitsu.com
Diffstat (limited to 'arch/x86/xen')
0 files changed, 0 insertions, 0 deletions