direct-io.hg

changeset 12514:fe5ed694b0c2

[IA64] Change callback_irq spec of PV-on-HVM for IPF

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author kfraser@localhost.localdomain
date Wed Nov 22 10:25:21 2006 +0000 (2006-11-22)
parents 395aa5609e6d
children cc180acf4693
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	Wed Nov 22 10:23:14 2006 +0000
     1.2 +++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c	Wed Nov 22 10:25:21 2006 +0000
     1.3 @@ -179,10 +179,24 @@ static int get_hypercall_stubs(void)
     1.4  #define get_hypercall_stubs()	(0)
     1.5  #endif
     1.6  
     1.7 +static int get_callback_irq(struct pci_dev *pdev)
     1.8 +{
     1.9 +#ifdef __ia64__
    1.10 +	int irq;
    1.11 +	for (irq = 0; irq < 16; irq++) {
    1.12 +		if (isa_irq_to_vector(irq) == pdev->irq)
    1.13 +			return irq;
    1.14 +	}
    1.15 +	return 0;
    1.16 +#else /* !__ia64__ */
    1.17 +	return pdev->irq;
    1.18 +#endif
    1.19 +}
    1.20 +
    1.21  static int __devinit platform_pci_init(struct pci_dev *pdev,
    1.22  				       const struct pci_device_id *ent)
    1.23  {
    1.24 -	int i, ret;
    1.25 +	int i, ret, callback_irq;
    1.26  	long ioaddr, iolen;
    1.27  	long mmio_addr, mmio_len;
    1.28  
    1.29 @@ -196,7 +210,9 @@ static int __devinit platform_pci_init(s
    1.30  	mmio_addr = pci_resource_start(pdev, 1);
    1.31  	mmio_len = pci_resource_len(pdev, 1);
    1.32  
    1.33 -	if (mmio_addr == 0 || ioaddr == 0) {
    1.34 +	callback_irq = get_callback_irq(pdev);
    1.35 +
    1.36 +	if (mmio_addr == 0 || ioaddr == 0 || callback_irq == 0) {
    1.37  		printk(KERN_WARNING DRV_NAME ":no resources found\n");
    1.38  		return -ENOENT;
    1.39  	}
    1.40 @@ -231,7 +247,7 @@ static int __devinit platform_pci_init(s
    1.41  		goto out;
    1.42  	}
    1.43  
    1.44 -	if ((ret = set_callback_irq(pdev->irq)))
    1.45 +	if ((ret = set_callback_irq(callback_irq)))
    1.46  		goto out;
    1.47  
    1.48   out: