ia64/xen-unstable

changeset 13889:a68a3c6cac5f

Small cleanups to PV-on-HVM support code.
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Thu Feb 08 17:38:30 2007 +0000 (2007-02-08)
parents f9277e2548b5
children 355c740d1330
files unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
line diff
     1.1 --- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c	Thu Feb 08 17:27:30 2007 +0000
     1.2 +++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c	Thu Feb 08 17:38:30 2007 +0000
     1.3 @@ -118,14 +118,10 @@ unsigned long alloc_xen_mmio(unsigned lo
     1.4  {
     1.5  	unsigned long addr;
     1.6  
     1.7 -	addr = 0;
     1.8 -	if (platform_mmio_alloc + len <= platform_mmiolen)
     1.9 -	{
    1.10 -		addr = platform_mmio + platform_mmio_alloc;
    1.11 -		platform_mmio_alloc += len;
    1.12 -	} else {
    1.13 -		panic("ran out of xen mmio space");
    1.14 -	}
    1.15 +	addr = platform_mmio + platform_mmio_alloc;
    1.16 +	platform_mmio_alloc += len;
    1.17 +	BUG_ON(platform_mmio_alloc > platform_mmiolen);
    1.18 +
    1.19  	return addr;
    1.20  }
    1.21  
    1.22 @@ -182,16 +178,17 @@ static int get_hypercall_stubs(void)
    1.23  static uint64_t get_callback_via(struct pci_dev *pdev)
    1.24  {
    1.25  	u8 pin;
    1.26 +	int irq;
    1.27 +
    1.28  #ifdef __ia64__
    1.29 -	int irq, rid;
    1.30  	for (irq = 0; irq < 16; irq++) {
    1.31  		if (isa_irq_to_vector(irq) == pdev->irq)
    1.32  			return irq; /* ISA IRQ */
    1.33  	}
    1.34  #else /* !__ia64__ */
    1.35 -
    1.36 -	if (pdev->irq < 16)
    1.37 -		return pdev->irq; /* ISA IRQ */
    1.38 +	irq = pdev->irq;
    1.39 +	if (irq < 16)
    1.40 +		return irq; /* ISA IRQ */
    1.41  #endif
    1.42  
    1.43  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)