lkml.org 
[lkml]   [2014]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFT v2 05/24] x86, hpet: Use new irqdomain interfaces to allocate/free IRQ
Date
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@linux.intel.com>
---
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 319bcb9372fe..24db2d33fab7 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);
--
1.7.10.4


\
 
 \ /
  Last update: 2014-09-26 16:21    [W:0.139 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site