diff mbox

[RFC,Part1,v1,07/18] x86, irq: Introduce helpers to access struct irq_cfg

Message ID 1410423905-26239-8-git-send-email-jiang.liu@linux.intel.com
State Not Applicable
Headers show

Commit Message

Jiang Liu Sept. 11, 2014, 8:24 a.m. UTC
Change irq_cfg() from static to extern, also introduce helper function
irqd_cfg(). Later we could rewrite these two helpers when enabling
hierarchy irqdomain.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
 arch/x86/include/asm/hw_irq.h  |    2 ++
 arch/x86/kernel/apic/io_apic.c |    7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

Comments

Thomas Gleixner Sept. 11, 2014, 9:27 a.m. UTC | #1
On Thu, 11 Sep 2014, Jiang Liu wrote:

> Change irq_cfg() from static to extern, also introduce helper function
> irqd_cfg(). Later we could rewrite these two helpers when enabling
> hierarchy irqdomain.
> 
> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
> ---
>  arch/x86/include/asm/hw_irq.h  |    2 ++
>  arch/x86/kernel/apic/io_apic.c |    7 ++++++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
> index 18e8717bf644..f457fcd0f3ba 100644
> --- a/arch/x86/include/asm/hw_irq.h
> +++ b/arch/x86/include/asm/hw_irq.h
> @@ -132,6 +132,8 @@ struct irq_cfg {
>  	};
>  };
>  
> +extern struct irq_cfg *irq_cfg(unsigned int irq);
> +extern struct irq_cfg *irqd_cfg(struct irq_data *irq_data);
>  extern void setup_vector_irq(int cpu);
>  extern int assign_irq_vector(int, struct irq_cfg *, const struct cpumask *);
>  extern void send_cleanup_vector(struct irq_cfg *);
> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
> index ee3d3ff521a3..9b048c239dd4 100644
> --- a/arch/x86/kernel/apic/io_apic.c
> +++ b/arch/x86/kernel/apic/io_apic.c
> @@ -281,11 +281,16 @@ int __init arch_early_irq_init(void)
>  	return 0;
>  }
>  
> -static inline struct irq_cfg *irq_cfg(unsigned int irq)
> +struct irq_cfg *irq_cfg(unsigned int irq)
>  {
>  	return irq_get_chip_data(irq);
>  }
>  
> +struct irq_cfg *irqd_cfg(struct irq_data *irq_data)
> +{
> +	return irq_data->chip_data;
> +}

We can make those inlines. There is no point to have that as global
functions.

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thomas Gleixner Sept. 11, 2014, 2:47 p.m. UTC | #2
On Thu, 11 Sep 2014, Thomas Gleixner wrote:
> On Thu, 11 Sep 2014, Jiang Liu wrote:
> > -static inline struct irq_cfg *irq_cfg(unsigned int irq)
> > +struct irq_cfg *irq_cfg(unsigned int irq)
> >  {
> >  	return irq_get_chip_data(irq);
> >  }
> >  
> > +struct irq_cfg *irqd_cfg(struct irq_data *irq_data)
> > +{
> > +	return irq_data->chip_data;
> > +}
> 
> We can make those inlines. There is no point to have that as global
> functions.

Never mind. Just reading the other patch set.....
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h
index 18e8717bf644..f457fcd0f3ba 100644
--- a/arch/x86/include/asm/hw_irq.h
+++ b/arch/x86/include/asm/hw_irq.h
@@ -132,6 +132,8 @@  struct irq_cfg {
 	};
 };
 
+extern struct irq_cfg *irq_cfg(unsigned int irq);
+extern struct irq_cfg *irqd_cfg(struct irq_data *irq_data);
 extern void setup_vector_irq(int cpu);
 extern int assign_irq_vector(int, struct irq_cfg *, const struct cpumask *);
 extern void send_cleanup_vector(struct irq_cfg *);
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index ee3d3ff521a3..9b048c239dd4 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -281,11 +281,16 @@  int __init arch_early_irq_init(void)
 	return 0;
 }
 
-static inline struct irq_cfg *irq_cfg(unsigned int irq)
+struct irq_cfg *irq_cfg(unsigned int irq)
 {
 	return irq_get_chip_data(irq);
 }
 
+struct irq_cfg *irqd_cfg(struct irq_data *irq_data)
+{
+	return irq_data->chip_data;
+}
+
 static struct irq_cfg *alloc_irq_cfg(unsigned int irq, int node)
 {
 	struct irq_cfg *cfg;