All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/IRQ: create_irq() should call assign_irq_vector()
@ 2011-11-08 10:42 Jan Beulich
  2011-11-08 12:03 ` Andrew Cooper
  2011-11-08 15:40 ` Keir Fraser
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Beulich @ 2011-11-08 10:42 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com

[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]

... rather than __assign_irq_vector(), to ensure desc->affinity gets
initialized properly.

This at once eliminates the need to forward-declare the latter function.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -25,7 +25,6 @@
 #include <public/physdev.h>
 
 static void parse_irq_vector_map_param(char *s);
-static int __assign_irq_vector(int irq, struct irq_desc *, const cpumask_t *);
 
 /* opt_noirqbalance: If true, software IRQ balancing/affinity is disabled. */
 bool_t __read_mostly opt_noirqbalance = 0;
@@ -153,7 +152,6 @@ int __init bind_irq_vector(int irq, int 
  */
 int create_irq(void)
 {
-    unsigned long flags;
     int irq, ret;
     struct irq_desc *desc;
 
@@ -169,11 +167,7 @@ int create_irq(void)
 
     ret = init_one_irq_desc(desc);
     if (!ret)
-    {
-        spin_lock_irqsave(&vector_lock, flags);
-        ret = __assign_irq_vector(irq, desc, TARGET_CPUS);
-        spin_unlock_irqrestore(&vector_lock, flags);
-    }
+        ret = assign_irq_vector(irq);
     if (ret < 0)
     {
         desc->arch.used = IRQ_UNUSED;




[-- Attachment #2: x86-create-irq-assign-vector.patch --]
[-- Type: text/plain, Size: 1204 bytes --]

x86/IRQ: create_irq() should call assign_irq_vector()

... rather than __assign_irq_vector(), to ensure desc->affinity gets
initialized properly.

This at once eliminates the need to forward-declare the latter function.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -25,7 +25,6 @@
 #include <public/physdev.h>
 
 static void parse_irq_vector_map_param(char *s);
-static int __assign_irq_vector(int irq, struct irq_desc *, const cpumask_t *);
 
 /* opt_noirqbalance: If true, software IRQ balancing/affinity is disabled. */
 bool_t __read_mostly opt_noirqbalance = 0;
@@ -153,7 +152,6 @@ int __init bind_irq_vector(int irq, int 
  */
 int create_irq(void)
 {
-    unsigned long flags;
     int irq, ret;
     struct irq_desc *desc;
 
@@ -169,11 +167,7 @@ int create_irq(void)
 
     ret = init_one_irq_desc(desc);
     if (!ret)
-    {
-        spin_lock_irqsave(&vector_lock, flags);
-        ret = __assign_irq_vector(irq, desc, TARGET_CPUS);
-        spin_unlock_irqrestore(&vector_lock, flags);
-    }
+        ret = assign_irq_vector(irq);
     if (ret < 0)
     {
         desc->arch.used = IRQ_UNUSED;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/IRQ: create_irq() should call assign_irq_vector()
  2011-11-08 10:42 [PATCH] x86/IRQ: create_irq() should call assign_irq_vector() Jan Beulich
@ 2011-11-08 12:03 ` Andrew Cooper
  2011-11-08 15:40 ` Keir Fraser
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2011-11-08 12:03 UTC (permalink / raw)
  To: xen-devel

On 08/11/11 10:42, Jan Beulich wrote:
> ... rather than __assign_irq_vector(), to ensure desc->affinity gets
> initialized properly.
>
> This at once eliminates the need to forward-declare the latter function.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

> --- a/xen/arch/x86/irq.c
> +++ b/xen/arch/x86/irq.c
> @@ -25,7 +25,6 @@
>  #include <public/physdev.h>
>  
>  static void parse_irq_vector_map_param(char *s);
> -static int __assign_irq_vector(int irq, struct irq_desc *, const cpumask_t *);
>  
>  /* opt_noirqbalance: If true, software IRQ balancing/affinity is disabled. */
>  bool_t __read_mostly opt_noirqbalance = 0;
> @@ -153,7 +152,6 @@ int __init bind_irq_vector(int irq, int 
>   */
>  int create_irq(void)
>  {
> -    unsigned long flags;
>      int irq, ret;
>      struct irq_desc *desc;
>  
> @@ -169,11 +167,7 @@ int create_irq(void)
>  
>      ret = init_one_irq_desc(desc);
>      if (!ret)
> -    {
> -        spin_lock_irqsave(&vector_lock, flags);
> -        ret = __assign_irq_vector(irq, desc, TARGET_CPUS);
> -        spin_unlock_irqrestore(&vector_lock, flags);
> -    }
> +        ret = assign_irq_vector(irq);
>      if (ret < 0)
>      {
>          desc->arch.used = IRQ_UNUSED;
>
>
>

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/IRQ: create_irq() should call assign_irq_vector()
  2011-11-08 10:42 [PATCH] x86/IRQ: create_irq() should call assign_irq_vector() Jan Beulich
  2011-11-08 12:03 ` Andrew Cooper
@ 2011-11-08 15:40 ` Keir Fraser
  1 sibling, 0 replies; 3+ messages in thread
From: Keir Fraser @ 2011-11-08 15:40 UTC (permalink / raw)
  To: Jan Beulich, xen-devel@lists.xensource.com

On 08/11/2011 10:42, "Jan Beulich" <JBeulich@suse.com> wrote:

> ... rather than __assign_irq_vector(), to ensure desc->affinity gets
> initialized properly.
> 
> This at once eliminates the need to forward-declare the latter function.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Keir Fraser <keir@xen.org>

> --- a/xen/arch/x86/irq.c
> +++ b/xen/arch/x86/irq.c
> @@ -25,7 +25,6 @@
>  #include <public/physdev.h>
>  
>  static void parse_irq_vector_map_param(char *s);
> -static int __assign_irq_vector(int irq, struct irq_desc *, const cpumask_t
> *);
>  
>  /* opt_noirqbalance: If true, software IRQ balancing/affinity is disabled. */
>  bool_t __read_mostly opt_noirqbalance = 0;
> @@ -153,7 +152,6 @@ int __init bind_irq_vector(int irq, int
>   */
>  int create_irq(void)
>  {
> -    unsigned long flags;
>      int irq, ret;
>      struct irq_desc *desc;
>  
> @@ -169,11 +167,7 @@ int create_irq(void)
>  
>      ret = init_one_irq_desc(desc);
>      if (!ret)
> -    {
> -        spin_lock_irqsave(&vector_lock, flags);
> -        ret = __assign_irq_vector(irq, desc, TARGET_CPUS);
> -        spin_unlock_irqrestore(&vector_lock, flags);
> -    }
> +        ret = assign_irq_vector(irq);
>      if (ret < 0)
>      {
>          desc->arch.used = IRQ_UNUSED;
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-08 15:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-08 10:42 [PATCH] x86/IRQ: create_irq() should call assign_irq_vector() Jan Beulich
2011-11-08 12:03 ` Andrew Cooper
2011-11-08 15:40 ` Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.