platform-pci.c (9095bf25ea08135a5b74875dd0e3eeaddc4218a0) | platform-pci.c (84d582d236dc1f9085e741affc72e9ba061a67c2) |
---|---|
1/****************************************************************************** 2 * platform-pci.c 3 * 4 * Xen platform PCI device driver 5 * 6 * Authors: ssmith@xensource.com and stefano.stabellini@eu.citrix.com 7 * 8 * Copyright (c) 2005, Intel Corporation. --- 76 unchanged lines hidden (view full) --- 85 return request_irq(pdev->irq, do_hvm_evtchn_intr, 86 IRQF_NOBALANCING | IRQF_TRIGGER_RISING, 87 "xen-platform-pci", pdev); 88} 89 90static int platform_pci_resume(struct pci_dev *pdev) 91{ 92 int err; | 1/****************************************************************************** 2 * platform-pci.c 3 * 4 * Xen platform PCI device driver 5 * 6 * Authors: ssmith@xensource.com and stefano.stabellini@eu.citrix.com 7 * 8 * Copyright (c) 2005, Intel Corporation. --- 76 unchanged lines hidden (view full) --- 85 return request_irq(pdev->irq, do_hvm_evtchn_intr, 86 IRQF_NOBALANCING | IRQF_TRIGGER_RISING, 87 "xen-platform-pci", pdev); 88} 89 90static int platform_pci_resume(struct pci_dev *pdev) 91{ 92 int err; |
93 if (!xen_pv_domain()) | 93 94 if (xen_have_vector_callback) |
94 return 0; | 95 return 0; |
96 |
|
95 err = xen_set_callback_via(callback_via); 96 if (err) { 97 dev_err(&pdev->dev, "platform_pci_resume failure!\n"); 98 return err; 99 } 100 return 0; 101} 102 --- 29 unchanged lines hidden (view full) --- 132 goto pci_out; 133 134 ret = pci_request_region(pdev, 0, DRV_NAME); 135 if (ret < 0) 136 goto mem_out; 137 138 platform_mmio = mmio_addr; 139 platform_mmiolen = mmio_len; | 97 err = xen_set_callback_via(callback_via); 98 if (err) { 99 dev_err(&pdev->dev, "platform_pci_resume failure!\n"); 100 return err; 101 } 102 return 0; 103} 104 --- 29 unchanged lines hidden (view full) --- 134 goto pci_out; 135 136 ret = pci_request_region(pdev, 0, DRV_NAME); 137 if (ret < 0) 138 goto mem_out; 139 140 platform_mmio = mmio_addr; 141 platform_mmiolen = mmio_len; |
140 141 /* 142 * Xen HVM guests always use the vector callback mechanism. 143 * L1 Dom0 in a nested Xen environment is a PV guest inside in an 144 * HVM environment. It needs the platform-pci driver to get 145 * notifications from L0 Xen, but it cannot use the vector callback 146 * as it is not exported by L1 Xen. 147 */ 148 if (xen_pv_domain()) { | 142 if (!xen_have_vector_callback) { |
149 ret = xen_allocate_irq(pdev); 150 if (ret) { 151 dev_warn(&pdev->dev, "request_irq failed err=%d\n", ret); 152 goto out; 153 } 154 callback_via = get_callback_via(pdev); 155 ret = xen_set_callback_via(callback_via); 156 if (ret) { --- 43 unchanged lines hidden --- | 143 ret = xen_allocate_irq(pdev); 144 if (ret) { 145 dev_warn(&pdev->dev, "request_irq failed err=%d\n", ret); 146 goto out; 147 } 148 callback_via = get_callback_via(pdev); 149 ret = xen_set_callback_via(callback_via); 150 if (ret) { --- 43 unchanged lines hidden --- |