[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Small cleanups to PV-on-HVM support code.



# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1170956310 0
# Node ID a68a3c6cac5f33664edd5e94a1c83d9235e8fd3c
# Parent  f9277e2548b5ffcaaffb39ae269c13915084ca59
Small cleanups to PV-on-HVM support code.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 unmodified_drivers/linux-2.6/platform-pci/platform-pci.c |   21 ++++++---------
 1 files changed, 9 insertions(+), 12 deletions(-)

diff -r f9277e2548b5 -r a68a3c6cac5f 
unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c  Thu Feb 08 
17:27:30 2007 +0000
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c  Thu Feb 08 
17:38:30 2007 +0000
@@ -118,14 +118,10 @@ unsigned long alloc_xen_mmio(unsigned lo
 {
        unsigned long addr;
 
-       addr = 0;
-       if (platform_mmio_alloc + len <= platform_mmiolen)
-       {
-               addr = platform_mmio + platform_mmio_alloc;
-               platform_mmio_alloc += len;
-       } else {
-               panic("ran out of xen mmio space");
-       }
+       addr = platform_mmio + platform_mmio_alloc;
+       platform_mmio_alloc += len;
+       BUG_ON(platform_mmio_alloc > platform_mmiolen);
+
        return addr;
 }
 
@@ -182,16 +178,17 @@ static uint64_t get_callback_via(struct 
 static uint64_t get_callback_via(struct pci_dev *pdev)
 {
        u8 pin;
+       int irq;
+
 #ifdef __ia64__
-       int irq, rid;
        for (irq = 0; irq < 16; irq++) {
                if (isa_irq_to_vector(irq) == pdev->irq)
                        return irq; /* ISA IRQ */
        }
 #else /* !__ia64__ */
-
-       if (pdev->irq < 16)
-               return pdev->irq; /* ISA IRQ */
+       irq = pdev->irq;
+       if (irq < 16)
+               return irq; /* ISA IRQ */
 #endif
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.