[tip:x86/apic] x86/hpet: Use new irqdomain interfaces to allocate /free IRQ

From: tip-bot for Jiang Liu
Date: Fri Apr 24 2015 - 11:45:22 EST


Commit-ID: bd8eb63f8a3907bb477992145cb6ce0064a1e43f
Gitweb: http://git.kernel.org/tip/bd8eb63f8a3907bb477992145cb6ce0064a1e43f
Author: Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx>
AuthorDate: Mon, 13 Apr 2015 14:11:25 +0800
Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CommitDate: Fri, 24 Apr 2015 15:36:48 +0200

x86/hpet: Use new irqdomain interfaces to allocate/free IRQ

Use new irqdomain interfaces to allocate/free IRQ for HPET, so we can
remove GENERIC_IRQ_LEGACY_ALLOC_HWIRQ later.

Signed-off-by: Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Cc: David Cohen <david.a.cohen@xxxxxxxxxxxxxxx>
Cc: Sander Eikelenboom <linux@xxxxxxxxxxxxxx>
Cc: David Vrabel <david.vrabel@xxxxxxxxxx>
Cc: Tony Luck <tony.luck@xxxxxxxxx>
Cc: Joerg Roedel <joro@xxxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Srivatsa S. Bhat <srivatsa.bhat@xxxxxxxxxxxxxxxxxx>
Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Cc: Rafael J. Wysocki <rjw@xxxxxxxxxxxxx>
Cc: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Yinghai Lu <yinghai@xxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: Dimitri Sivanich <sivanich@xxxxxxx>
Cc: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
Link: http://lkml.kernel.org/r/1416894816-23245-4-git-send-email-jiang.liu@xxxxxxxxxxxxxxx
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
arch/x86/kernel/hpet.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 3acbff4..ae29554 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -11,6 +11,7 @@
#include <linux/cpu.h>
#include <linux/pm.h>
#include <linux/io.h>
+#include <linux/irqdomain.h>

#include <asm/fixmap.h>
#include <asm/hpet.h>
@@ -476,7 +477,7 @@ static int hpet_msi_next_event(unsigned long delta,
static int hpet_setup_msi_irq(unsigned int irq)
{
if (x86_msi.setup_hpet_msi(irq, hpet_blockid)) {
- irq_free_hwirq(irq);
+ irq_domain_free_irqs(irq, 1);
return -EINVAL;
}
return 0;
@@ -484,9 +485,10 @@ static int hpet_setup_msi_irq(unsigned int irq)

static int hpet_assign_irq(struct hpet_dev *dev)
{
- unsigned int irq = irq_alloc_hwirq(-1);
+ int irq;

- if (!irq)
+ irq = irq_domain_alloc_irqs(NULL, 1, NUMA_NO_NODE, NULL);
+ if (irq <= 0)
return -EINVAL;

irq_set_handler_data(irq, dev);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/