x86: usb handoff in early_quirk
some systems keep getting
APIC calibration not consistent with PM-Timer: 139ms instead of 100ms
APIC delta adjusted to PM-Timer: 831249 (1163736)
USB legacy SMI handler is not disabled at that time.
According to Thomas:
| http://lkml.indiana.edu/hypermail/linux/kernel/0703.2/0420.html
|
| The wrong calibration values are probably caused by SMM code trying to
| emulate a PS/2 keyboard from a (maybe connected or not) USB keyboard.
| This prohibits the accurate delivery of PIT interrupts, which are used
| to calibrate the local APIC timer. Unfortunately we have no way to
| disable this BIOS misfeature in the early boot process.
Try to disable USB legacy support early with this patch.
So later APIC Timer calibration don't get messed up by USB legacy support SMI
handler.
After this patch, that warning never show up for 100 reboot tests.
reuse code from drivers/usb/host/pci-quirks.c
-v2: use get_early_pci_dev() to get dummy pci_dev so we can reuse use API
from drivers/usb/host/pci-quirks.c
-v3: include .h instead of .c file
-v4: remove __ from external functions.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
1 file changed