[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140508121443.4E71CC40D85@trevor.secretlab.ca>
Date: Thu, 08 May 2014 13:14:43 +0100
From: Grant Likely <grant.likely@...retlab.ca>
To: Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>
Cc: Ingo Molnar <mingo@...e.hu>, Peter Anvin <hpa@...or.com>,
Tony Luck <tony.luck@...el.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [patch 29/32] genirq: Remove irq_reserve_irq[s]
On Wed, 07 May 2014 15:44:21 -0000, Thomas Gleixner <tglx@...utronix.de> wrote:
> No more users. And it's not going to come back. If you need
> hotplugable irq chips, use irq domains.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Grant Likely <grant.likely@...retlab.ca>
The ironic thing is that irq_domain may end up bringing this function
back in some form as an optimization for irq_domains that need a
contiguous range, but don't want to allocate all the irq_descs
immediately. But if that happens it will be a very private API and it
doesn't nullify removing the function now.
g.
> ---
> include/linux/irq.h | 7 -------
> kernel/irq/irqdesc.c | 25 -------------------------
> 2 files changed, 32 deletions(-)
>
> Index: tip/include/linux/irq.h
> ===================================================================
> --- tip.orig/include/linux/irq.h
> +++ tip/include/linux/irq.h
> @@ -617,18 +617,11 @@ int __irq_alloc_descs(int irq, unsigned
> irq_alloc_descs(-1, from, cnt, node)
>
> void irq_free_descs(unsigned int irq, unsigned int cnt);
> -int irq_reserve_irqs(unsigned int from, unsigned int cnt);
> -
> static inline void irq_free_desc(unsigned int irq)
> {
> irq_free_descs(irq, 1);
> }
>
> -static inline int irq_reserve_irq(unsigned int irq)
> -{
> - return irq_reserve_irqs(irq, 1);
> -}
> -
> #ifdef CONFIG_GENERIC_IRQ_LEGACY_ALLOC_HWIRQ
> unsigned int irq_alloc_hwirqs(int cnt, int node);
> static inline unsigned int irq_alloc_hwirq(int node)
> Index: tip/kernel/irq/irqdesc.c
> ===================================================================
> --- tip.orig/kernel/irq/irqdesc.c
> +++ tip/kernel/irq/irqdesc.c
> @@ -455,31 +455,6 @@ EXPORT_SYMBOL_GPL(irq_free_hwirqs);
> #endif
>
> /**
> - * irq_reserve_irqs - mark irqs allocated
> - * @from: mark from irq number
> - * @cnt: number of irqs to mark
> - *
> - * Returns 0 on success or an appropriate error code
> - */
> -int irq_reserve_irqs(unsigned int from, unsigned int cnt)
> -{
> - unsigned int start;
> - int ret = 0;
> -
> - if (!cnt || (from + cnt) > nr_irqs)
> - return -EINVAL;
> -
> - mutex_lock(&sparse_irq_lock);
> - start = bitmap_find_next_zero_area(allocated_irqs, nr_irqs, from, cnt, 0);
> - if (start == from)
> - bitmap_set(allocated_irqs, start, cnt);
> - else
> - ret = -EEXIST;
> - mutex_unlock(&sparse_irq_lock);
> - return ret;
> -}
> -
> -/**
> * irq_get_next_irq - get next allocated irq number
> * @offset: where to start the search
> *
>
>
> --
> 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/
--
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