diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-07-06 15:15:23 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-07-11 13:19:33 -0400 |
commit | 78316ada2222b5e3abc043eea7644e12319042d6 (patch) | |
tree | 92220adf3b6fbcf4d49a7f7933838e9e6464f245 /arch/x86/pci/xen.c | |
parent | 34b1d1269d9fdaa1558e3014c3cc03ac0967de95 (diff) |
xen/pci: Remove 'xen_allocate_pirq_gsi'.
In the past (2.6.38) the 'xen_allocate_pirq_gsi' would allocate
an entry in a Linux IRQ -> {XEN_IRQ, type, event, ..} array. All
of that has been removed in 2.6.39 and the Xen IRQ subsystem uses
an linked list that is populated when the call to
'xen_allocate_irq_gsi' (universally done from any of the xen_bind_*
calls) is done. The 'xen_allocate_pirq_gsi' is a NOP and there is
no need for it anymore so lets remove it.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86/pci/xen.c')
-rw-r--r-- | arch/x86/pci/xen.c | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 6eddc524603c..f07c419a616c 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c | |||
@@ -37,14 +37,8 @@ static int xen_pcifront_enable_irq(struct pci_dev *dev) | |||
37 | rc); | 37 | rc); |
38 | return rc; | 38 | return rc; |
39 | } | 39 | } |
40 | 40 | /* In PV DomU the Xen PCI backend puts the PIRQ in the interrupt line.*/ | |
41 | rc = xen_allocate_pirq_gsi(gsi); | 41 | pirq = gsi; |
42 | if (rc < 0) { | ||
43 | dev_warn(&dev->dev, "Xen PCI: failed to allocate a PIRQ for GSI%d: %d\n", | ||
44 | gsi, rc); | ||
45 | return rc; | ||
46 | } | ||
47 | pirq = rc; | ||
48 | 42 | ||
49 | if (gsi < NR_IRQS_LEGACY) | 43 | if (gsi < NR_IRQS_LEGACY) |
50 | share = 0; | 44 | share = 0; |
@@ -63,18 +57,16 @@ static int xen_pcifront_enable_irq(struct pci_dev *dev) | |||
63 | 57 | ||
64 | #ifdef CONFIG_ACPI | 58 | #ifdef CONFIG_ACPI |
65 | static int xen_register_pirq(u32 gsi, int gsi_override, int triggering, | 59 | static int xen_register_pirq(u32 gsi, int gsi_override, int triggering, |
66 | bool alloc_pirq) | 60 | bool set_pirq) |
67 | { | 61 | { |
68 | int rc, pirq = -1, irq = -1; | 62 | int rc, pirq = -1, irq = -1; |
69 | struct physdev_map_pirq map_irq; | 63 | struct physdev_map_pirq map_irq; |
70 | int shareable = 0; | 64 | int shareable = 0; |
71 | char *name; | 65 | char *name; |
72 | 66 | ||
73 | if (alloc_pirq) { | 67 | if (set_pirq) |
74 | pirq = xen_allocate_pirq_gsi(gsi); | 68 | pirq = gsi; |
75 | if (pirq < 0) | 69 | |
76 | goto out; | ||
77 | } | ||
78 | map_irq.domid = DOMID_SELF; | 70 | map_irq.domid = DOMID_SELF; |
79 | map_irq.type = MAP_PIRQ_TYPE_GSI; | 71 | map_irq.type = MAP_PIRQ_TYPE_GSI; |
80 | map_irq.index = gsi; | 72 | map_irq.index = gsi; |
@@ -112,8 +104,8 @@ static int acpi_register_gsi_xen_hvm(struct device *dev, u32 gsi, | |||
112 | if (!xen_hvm_domain()) | 104 | if (!xen_hvm_domain()) |
113 | return -1; | 105 | return -1; |
114 | 106 | ||
115 | return xen_register_pirq(gsi, -1 /* no GSI override */, | 107 | return xen_register_pirq(gsi, -1 /* no GSI override */, trigger, |
116 | trigger, false /* no PIRQ allocation */); | 108 | false /* no mapping of GSI to PIRQ */); |
117 | } | 109 | } |
118 | 110 | ||
119 | #ifdef CONFIG_XEN_DOM0 | 111 | #ifdef CONFIG_XEN_DOM0 |
@@ -430,7 +422,7 @@ static __init void xen_setup_acpi_sci(void) | |||
430 | 422 | ||
431 | int __init pci_xen_initial_domain(void) | 423 | int __init pci_xen_initial_domain(void) |
432 | { | 424 | { |
433 | int pirq, irq; | 425 | int irq; |
434 | 426 | ||
435 | #ifdef CONFIG_PCI_MSI | 427 | #ifdef CONFIG_PCI_MSI |
436 | x86_msi.setup_msi_irqs = xen_initdom_setup_msi_irqs; | 428 | x86_msi.setup_msi_irqs = xen_initdom_setup_msi_irqs; |
@@ -447,16 +439,11 @@ int __init pci_xen_initial_domain(void) | |||
447 | 439 | ||
448 | xen_register_pirq(irq, -1 /* no GSI override */, | 440 | xen_register_pirq(irq, -1 /* no GSI override */, |
449 | trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE, | 441 | trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE, |
450 | true /* allocate IRQ */); | 442 | true /* Map GSI to PIRQ */); |
451 | } | 443 | } |
452 | if (0 == nr_ioapics) { | 444 | if (0 == nr_ioapics) { |
453 | for (irq = 0; irq < NR_IRQS_LEGACY; irq++) { | 445 | for (irq = 0; irq < NR_IRQS_LEGACY; irq++) |
454 | pirq = xen_allocate_pirq_gsi(irq); | 446 | xen_bind_pirq_gsi_to_irq(irq, irq, 0, "xt-pic"); |
455 | if (WARN(pirq < 0, | ||
456 | "Could not allocate PIRQ for legacy interrupt\n")) | ||
457 | break; | ||
458 | irq = xen_bind_pirq_gsi_to_irq(irq, pirq, 0, "xt-pic"); | ||
459 | } | ||
460 | } | 447 | } |
461 | return 0; | 448 | return 0; |
462 | } | 449 | } |