Commit 0d5b9944 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fix from Thomas Gleixner:
 "The recent irq core changes unearthed API abuse in the HPET code,
  which manifested itself in a suspend/resume regression.

  The fix replaces the cruft with the proper function calls and cures
  the regression"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/hpet: Cure interface abuse in the resume path
parents d1faa3e7 bb68cfe2
...@@ -345,21 +345,10 @@ static int hpet_shutdown(struct clock_event_device *evt, int timer) ...@@ -345,21 +345,10 @@ static int hpet_shutdown(struct clock_event_device *evt, int timer)
return 0; return 0;
} }
static int hpet_resume(struct clock_event_device *evt, int timer) static int hpet_resume(struct clock_event_device *evt)
{ {
if (!timer) {
hpet_enable_legacy_int(); hpet_enable_legacy_int();
} else {
struct hpet_dev *hdev = EVT_TO_HPET_DEV(evt);
irq_domain_deactivate_irq(irq_get_irq_data(hdev->irq));
irq_domain_activate_irq(irq_get_irq_data(hdev->irq));
disable_hardirq(hdev->irq);
irq_set_affinity(hdev->irq, cpumask_of(hdev->cpu));
enable_irq(hdev->irq);
}
hpet_print_config(); hpet_print_config();
return 0; return 0;
} }
...@@ -417,7 +406,7 @@ static int hpet_legacy_set_periodic(struct clock_event_device *evt) ...@@ -417,7 +406,7 @@ static int hpet_legacy_set_periodic(struct clock_event_device *evt)
static int hpet_legacy_resume(struct clock_event_device *evt) static int hpet_legacy_resume(struct clock_event_device *evt)
{ {
return hpet_resume(evt, 0); return hpet_resume(evt);
} }
static int hpet_legacy_next_event(unsigned long delta, 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,8 +499,14 @@ static int hpet_msi_set_periodic(struct clock_event_device *evt)
static int hpet_msi_resume(struct clock_event_device *evt) static int hpet_msi_resume(struct clock_event_device *evt)
{ {
struct hpet_dev *hdev = EVT_TO_HPET_DEV(evt); struct hpet_dev *hdev = EVT_TO_HPET_DEV(evt);
struct irq_data *data = irq_get_irq_data(hdev->irq);
struct msi_msg msg;
return hpet_resume(evt, hdev->num); /* Restore the MSI msg and unmask the interrupt */
irq_chip_compose_msi_msg(data, &msg);
hpet_msi_write(hdev, &msg);
hpet_msi_unmask(data);
return 0;
} }
static int hpet_msi_next_event(unsigned long delta, static int hpet_msi_next_event(unsigned long delta,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment