diff options
-rw-r--r-- | arch/x86/kernel/hpet.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 16f82a3aaec7..8ce4212e2b8d 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -345,21 +345,10 @@ static int hpet_shutdown(struct clock_event_device *evt, int timer) | |||
345 | return 0; | 345 | return 0; |
346 | } | 346 | } |
347 | 347 | ||
348 | static int hpet_resume(struct clock_event_device *evt, int timer) | 348 | static int hpet_resume(struct clock_event_device *evt) |
349 | { | 349 | { |
350 | if (!timer) { | 350 | hpet_enable_legacy_int(); |
351 | hpet_enable_legacy_int(); | ||
352 | } else { | ||
353 | struct hpet_dev *hdev = EVT_TO_HPET_DEV(evt); | ||
354 | |||
355 | irq_domain_deactivate_irq(irq_get_irq_data(hdev->irq)); | ||
356 | irq_domain_activate_irq(irq_get_irq_data(hdev->irq)); | ||
357 | disable_hardirq(hdev->irq); | ||
358 | irq_set_affinity(hdev->irq, cpumask_of(hdev->cpu)); | ||
359 | enable_irq(hdev->irq); | ||
360 | } | ||
361 | hpet_print_config(); | 351 | hpet_print_config(); |
362 | |||
363 | return 0; | 352 | return 0; |
364 | } | 353 | } |
365 | 354 | ||
@@ -417,7 +406,7 @@ static int hpet_legacy_set_periodic(struct clock_event_device *evt) | |||
417 | 406 | ||
418 | static int hpet_legacy_resume(struct clock_event_device *evt) | 407 | static int hpet_legacy_resume(struct clock_event_device *evt) |
419 | { | 408 | { |
420 | return hpet_resume(evt, 0); | 409 | return hpet_resume(evt); |
421 | } | 410 | } |
422 | 411 | ||
423 | static int hpet_legacy_next_event(unsigned long delta, | 412 | static int hpet_legacy_next_event(unsigned long delta, |
@@ -510,8 +499,14 @@ static int hpet_msi_set_periodic(struct clock_event_device *evt) | |||
510 | static int hpet_msi_resume(struct clock_event_device *evt) | 499 | static int hpet_msi_resume(struct clock_event_device *evt) |
511 | { | 500 | { |
512 | struct hpet_dev *hdev = EVT_TO_HPET_DEV(evt); | 501 | struct hpet_dev *hdev = EVT_TO_HPET_DEV(evt); |
502 | struct irq_data *data = irq_get_irq_data(hdev->irq); | ||
503 | struct msi_msg msg; | ||
513 | 504 | ||
514 | return hpet_resume(evt, hdev->num); | 505 | /* Restore the MSI msg and unmask the interrupt */ |
506 | irq_chip_compose_msi_msg(data, &msg); | ||
507 | hpet_msi_write(hdev, &msg); | ||
508 | hpet_msi_unmask(data); | ||
509 | return 0; | ||
515 | } | 510 | } |
516 | 511 | ||
517 | static int hpet_msi_next_event(unsigned long delta, | 512 | static int hpet_msi_next_event(unsigned long delta, |