diff options
| -rw-r--r-- | arch/x86/kernel/hpet.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index dedc2bddf7a5..5969e1078fc2 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
| @@ -584,6 +584,8 @@ static void hpet_msi_capability_lookup(unsigned int start_timer) | |||
| 584 | unsigned int num_timers_used = 0; | 584 | unsigned int num_timers_used = 0; |
| 585 | int i; | 585 | int i; |
| 586 | 586 | ||
| 587 | if (boot_cpu_has(X86_FEATURE_ARAT)) | ||
| 588 | return; | ||
| 587 | id = hpet_readl(HPET_ID); | 589 | id = hpet_readl(HPET_ID); |
| 588 | 590 | ||
| 589 | num_timers = ((id & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT); | 591 | num_timers = ((id & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT); |
| @@ -872,10 +874,8 @@ int __init hpet_enable(void) | |||
| 872 | 874 | ||
| 873 | if (id & HPET_ID_LEGSUP) { | 875 | if (id & HPET_ID_LEGSUP) { |
| 874 | hpet_legacy_clockevent_register(); | 876 | hpet_legacy_clockevent_register(); |
| 875 | hpet_msi_capability_lookup(2); | ||
| 876 | return 1; | 877 | return 1; |
| 877 | } | 878 | } |
| 878 | hpet_msi_capability_lookup(0); | ||
| 879 | return 0; | 879 | return 0; |
| 880 | 880 | ||
| 881 | out_nohpet: | 881 | out_nohpet: |
| @@ -908,9 +908,17 @@ static __init int hpet_late_init(void) | |||
| 908 | if (!hpet_virt_address) | 908 | if (!hpet_virt_address) |
| 909 | return -ENODEV; | 909 | return -ENODEV; |
| 910 | 910 | ||
| 911 | if (hpet_readl(HPET_ID) & HPET_ID_LEGSUP) | ||
| 912 | hpet_msi_capability_lookup(2); | ||
| 913 | else | ||
| 914 | hpet_msi_capability_lookup(0); | ||
| 915 | |||
| 911 | hpet_reserve_platform_timers(hpet_readl(HPET_ID)); | 916 | hpet_reserve_platform_timers(hpet_readl(HPET_ID)); |
| 912 | hpet_print_config(); | 917 | hpet_print_config(); |
| 913 | 918 | ||
| 919 | if (boot_cpu_has(X86_FEATURE_ARAT)) | ||
| 920 | return 0; | ||
| 921 | |||
| 914 | for_each_online_cpu(cpu) { | 922 | for_each_online_cpu(cpu) { |
| 915 | hpet_cpuhp_notify(NULL, CPU_ONLINE, (void *)(long)cpu); | 923 | hpet_cpuhp_notify(NULL, CPU_ONLINE, (void *)(long)cpu); |
| 916 | } | 924 | } |
