[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-654eda5170093e5dc6fe63c044be390b933b172c@git.kernel.org>
Date: Wed, 26 Nov 2014 15:06:24 -0800
From: tip-bot for Jiang Liu <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: benh@...nel.crashing.org, rjw@...ysocki.net, tony.luck@...el.com,
tglx@...utronix.de, hpa@...or.com, jiang.liu@...ux.intel.com,
yinghai@...nel.org, luto@...capital.net, bp@...en8.de,
mingo@...nel.org, joro@...tes.org, rdunlap@...radead.org,
konrad.wilk@...cle.com, bhelgaas@...gle.com,
linux-kernel@...r.kernel.org, srivatsa.bhat@...ux.vnet.ibm.com,
gregkh@...uxfoundation.org
Subject: [tip:x86/apic] x86, hpet:
Use new irqdomain interfaces to allocate/free IRQ
Commit-ID: 654eda5170093e5dc6fe63c044be390b933b172c
Gitweb: http://git.kernel.org/tip/654eda5170093e5dc6fe63c044be390b933b172c
Author: Jiang Liu <jiang.liu@...ux.intel.com>
AuthorDate: Tue, 25 Nov 2014 13:53:12 +0800
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 26 Nov 2014 18:59:24 +0100
x86, hpet: Use new irqdomain interfaces to allocate/free IRQ
Use new irqdomain interfaces to allocate/free IRQ for HPET, so we could
kill GENERIC_IRQ_LEGACY_ALLOC_HWIRQ later.
Signed-off-by: Jiang Liu <jiang.liu@...ux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Cc: Tony Luck <tony.luck@...el.com>
Cc: Joerg Roedel <joro@...tes.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Rafael J. Wysocki <rjw@...ysocki.net>
Cc: Randy Dunlap <rdunlap@...radead.org>
Cc: Yinghai Lu <yinghai@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Srivatsa S. Bhat <srivatsa.bhat@...ux.vnet.ibm.com>
Cc: Andy Lutomirski <luto@...capital.net>
Link: http://lkml.kernel.org/r/1416894816-23245-4-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
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 319bcb9..24db2d3 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists