WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Remove definition of NR_PIRQS and replace all uses with

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Remove definition of NR_PIRQS and replace all uses with
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 30 Apr 2006 11:12:08 +0000
Delivery-date: Sun, 30 Apr 2006 04:29:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 0ee104bd65570382ac408ccaa480192d9d047452
# Parent  42a8e3101c6c45687d74a213abb3a2723f2cac62
Remove definition of NR_PIRQS and replace all uses with
NR_IRQS. Allows removal of redundant check in pirq_guest_bind().

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 42a8e3101c6c -r 0ee104bd6557 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Sun Apr 30 09:16:15 2006 +0100
+++ b/xen/arch/ia64/xen/domain.c        Sun Apr 30 09:26:01 2006 +0100
@@ -1237,7 +1237,7 @@ static void physdev_init_dom0(struct dom
 {
        if (iomem_permit_access(d, 0UL, ~0UL))
                BUG();
-       if (irqs_permit_access(d, 0, NR_PIRQS-1))
+       if (irqs_permit_access(d, 0, NR_IRQS-1))
                BUG();
 }
 
diff -r 42a8e3101c6c -r 0ee104bd6557 xen/arch/ia64/xen/irq.c
--- a/xen/arch/ia64/xen/irq.c   Sun Apr 30 09:16:15 2006 +0100
+++ b/xen/arch/ia64/xen/irq.c   Sun Apr 30 09:26:01 2006 +0100
@@ -435,9 +435,9 @@ int pirq_guest_unmask(struct domain *d)
     int            irq;
     shared_info_t *s = d->shared_info;
 
-    for ( irq = find_first_bit(d->pirq_mask, NR_PIRQS);
-          irq < NR_PIRQS;
-          irq = find_next_bit(d->pirq_mask, NR_PIRQS, irq+1) )
+    for ( irq = find_first_bit(d->pirq_mask, NR_IRQS);
+          irq < NR_IRQS;
+          irq = find_next_bit(d->pirq_mask, NR_IRQS, irq+1) )
     {
         desc = &irq_desc[irq];
         spin_lock_irq(&desc->lock);
diff -r 42a8e3101c6c -r 0ee104bd6557 xen/arch/x86/domain_build.c
--- a/xen/arch/x86/domain_build.c       Sun Apr 30 09:16:15 2006 +0100
+++ b/xen/arch/x86/domain_build.c       Sun Apr 30 09:26:01 2006 +0100
@@ -809,7 +809,7 @@ int construct_dom0(struct domain *d,
     /* DOM0 is permitted full I/O capabilities. */
     rc |= ioports_permit_access(dom0, 0, 0xFFFF);
     rc |= iomem_permit_access(dom0, 0UL, ~0UL);
-    rc |= irqs_permit_access(dom0, 0, NR_PIRQS-1);
+    rc |= irqs_permit_access(dom0, 0, NR_IRQS-1);
 
     /*
      * Modify I/O port access permissions.
diff -r 42a8e3101c6c -r 0ee104bd6557 xen/arch/x86/i8259.c
--- a/xen/arch/x86/i8259.c      Sun Apr 30 09:16:15 2006 +0100
+++ b/xen/arch/x86/i8259.c      Sun Apr 30 09:26:01 2006 +0100
@@ -19,6 +19,7 @@
 #include <asm/bitops.h>
 #include <xen/delay.h>
 #include <asm/apic.h>
+#include <asm/asm_defns.h>
 #include <io_ports.h>
 
 /*
diff -r 42a8e3101c6c -r 0ee104bd6557 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Sun Apr 30 09:16:15 2006 +0100
+++ b/xen/arch/x86/irq.c        Sun Apr 30 09:26:01 2006 +0100
@@ -356,9 +356,9 @@ int pirq_guest_unmask(struct domain *d)
     unsigned int   irq;
     shared_info_t *s = d->shared_info;
 
-    for ( irq = find_first_bit(d->pirq_mask, NR_PIRQS);
-          irq < NR_PIRQS;
-          irq = find_next_bit(d->pirq_mask, NR_PIRQS, irq+1) )
+    for ( irq = find_first_bit(d->pirq_mask, NR_IRQS);
+          irq < NR_IRQS;
+          irq = find_next_bit(d->pirq_mask, NR_IRQS, irq+1) )
     {
         if ( !test_bit(d->pirq_to_evtchn[irq], s->evtchn_mask) )
             __pirq_guest_eoi(d, irq);
@@ -409,9 +409,6 @@ int pirq_guest_bind(struct vcpu *v, int 
     unsigned long       flags;
     int                 rc = 0;
     cpumask_t           cpumask = CPU_MASK_NONE;
-
-    if ( (irq < 0) || (irq >= NR_IRQS) )
-        return -EINVAL;
 
  retry:
     vector = irq_to_vector(irq);
diff -r 42a8e3101c6c -r 0ee104bd6557 xen/arch/x86/x86_32/traps.c
--- a/xen/arch/x86/x86_32/traps.c       Sun Apr 30 09:16:15 2006 +0100
+++ b/xen/arch/x86/x86_32/traps.c       Sun Apr 30 09:26:01 2006 +0100
@@ -243,6 +243,7 @@ unsigned long do_iret(void)
     return regs->eax;
 }
 
+#include <asm/asm_defns.h>
 BUILD_SMP_INTERRUPT(deferred_nmi, TRAP_deferred_nmi)
 fastcall void smp_deferred_nmi(struct cpu_user_regs *regs)
 {
diff -r 42a8e3101c6c -r 0ee104bd6557 xen/common/dom0_ops.c
--- a/xen/common/dom0_ops.c     Sun Apr 30 09:16:15 2006 +0100
+++ b/xen/common/dom0_ops.c     Sun Apr 30 09:26:01 2006 +0100
@@ -641,7 +641,7 @@ long do_dom0_op(XEN_GUEST_HANDLE(dom0_op
         unsigned int pirq = op->u.irq_permission.pirq;
 
         ret = -EINVAL;
-        if ( pirq >= NR_PIRQS )
+        if ( pirq >= NR_IRQS )
             break;
 
         ret = -ESRCH;
diff -r 42a8e3101c6c -r 0ee104bd6557 xen/include/asm-x86/irq.h
--- a/xen/include/asm-x86/irq.h Sun Apr 30 09:16:15 2006 +0100
+++ b/xen/include/asm-x86/irq.h Sun Apr 30 09:26:01 2006 +0100
@@ -5,7 +5,6 @@
 
 #include <xen/config.h>
 #include <asm/atomic.h>
-#include <asm/asm_defns.h>
 #include <irq_vectors.h>
 
 #define IO_APIC_IRQ(irq)    (((irq) >= 16) || ((1<<(irq)) & io_apic_irqs))
diff -r 42a8e3101c6c -r 0ee104bd6557 xen/include/xen/sched.h
--- a/xen/include/xen/sched.h   Sun Apr 30 09:16:15 2006 +0100
+++ b/xen/include/xen/sched.h   Sun Apr 30 09:26:01 2006 +0100
@@ -15,6 +15,7 @@
 #include <xen/rangeset.h>
 #include <asm/domain.h>
 #include <xen/xenoprof.h>
+#include <xen/irq.h>
 
 extern unsigned long volatile jiffies;
 extern rwlock_t domlist_lock;
@@ -132,9 +133,8 @@ struct domain
      * domain's event-channel spinlock. Read accesses can also synchronise on 
      * the lock, but races don't usually matter.
      */
-#define NR_PIRQS 256 /* Put this somewhere sane! */
-    u16              pirq_to_evtchn[NR_PIRQS];
-    DECLARE_BITMAP(pirq_mask, NR_PIRQS);
+    u16              pirq_to_evtchn[NR_IRQS];
+    DECLARE_BITMAP(pirq_mask, NR_IRQS);
 
     /* I/O capabilities (access to IRQs and memory-mapped I/O). */
     struct rangeset *iomem_caps;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Remove definition of NR_PIRQS and replace all uses with, Xen patchbot -unstable <=