Message ID | 20200428153640.76476-1-wei.liu@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 60369a4f8d61bacd437adab0518581afb90bea24 |
Headers | show |
Series | x86/xen: drop an unused parameter gsi_override | expand |
On 4/28/20 11:36 AM, Wei Liu wrote: > All callers within the same file pass in -1 (no override). > > Signed-off-by: Wei Liu <wei.liu@kernel.org> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
On 4/28/20 11:36 AM, Wei Liu wrote: > All callers within the same file pass in -1 (no override). > > Signed-off-by: Wei Liu <wei.liu@kernel.org> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
On Tue, Apr 28, 2020 at 03:36:40PM +0000, Wei Liu wrote: > All callers within the same file pass in -1 (no override). > > Signed-off-by: Wei Liu <wei.liu@kernel.org> Applied to pci/virtualization for v5.8, thanks! I don't see anything else in linux-next that touches this file, but if somebody wants to merge this via another tree, just let me know. > --- > arch/x86/pci/xen.c | 16 ++++++---------- > 1 file changed, 6 insertions(+), 10 deletions(-) > > diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c > index 91220cc25854..e3f1ca316068 100644 > --- a/arch/x86/pci/xen.c > +++ b/arch/x86/pci/xen.c > @@ -60,8 +60,7 @@ static int xen_pcifront_enable_irq(struct pci_dev *dev) > } > > #ifdef CONFIG_ACPI > -static int xen_register_pirq(u32 gsi, int gsi_override, int triggering, > - bool set_pirq) > +static int xen_register_pirq(u32 gsi, int triggering, bool set_pirq) > { > int rc, pirq = -1, irq = -1; > struct physdev_map_pirq map_irq; > @@ -94,9 +93,6 @@ static int xen_register_pirq(u32 gsi, int gsi_override, int triggering, > name = "ioapic-level"; > } > > - if (gsi_override >= 0) > - gsi = gsi_override; > - > irq = xen_bind_pirq_gsi_to_irq(gsi, map_irq.pirq, shareable, name); > if (irq < 0) > goto out; > @@ -112,12 +108,12 @@ static int acpi_register_gsi_xen_hvm(struct device *dev, u32 gsi, > if (!xen_hvm_domain()) > return -1; > > - return xen_register_pirq(gsi, -1 /* no GSI override */, trigger, > + return xen_register_pirq(gsi, trigger, > false /* no mapping of GSI to PIRQ */); > } > > #ifdef CONFIG_XEN_DOM0 > -static int xen_register_gsi(u32 gsi, int gsi_override, int triggering, int polarity) > +static int xen_register_gsi(u32 gsi, int triggering, int polarity) > { > int rc, irq; > struct physdev_setup_gsi setup_gsi; > @@ -128,7 +124,7 @@ static int xen_register_gsi(u32 gsi, int gsi_override, int triggering, int polar > printk(KERN_DEBUG "xen: registering gsi %u triggering %d polarity %d\n", > gsi, triggering, polarity); > > - irq = xen_register_pirq(gsi, gsi_override, triggering, true); > + irq = xen_register_pirq(gsi, triggering, true); > > setup_gsi.gsi = gsi; > setup_gsi.triggering = (triggering == ACPI_EDGE_SENSITIVE ? 0 : 1); > @@ -148,7 +144,7 @@ static int xen_register_gsi(u32 gsi, int gsi_override, int triggering, int polar > static int acpi_register_gsi_xen(struct device *dev, u32 gsi, > int trigger, int polarity) > { > - return xen_register_gsi(gsi, -1 /* no GSI override */, trigger, polarity); > + return xen_register_gsi(gsi, trigger, polarity); > } > #endif > #endif > @@ -491,7 +487,7 @@ int __init pci_xen_initial_domain(void) > if (acpi_get_override_irq(irq, &trigger, &polarity) == -1) > continue; > > - xen_register_pirq(irq, -1 /* no GSI override */, > + xen_register_pirq(irq, > trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE, > true /* Map GSI to PIRQ */); > } > -- > 2.20.1 >
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 91220cc25854..e3f1ca316068 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c @@ -60,8 +60,7 @@ static int xen_pcifront_enable_irq(struct pci_dev *dev) } #ifdef CONFIG_ACPI -static int xen_register_pirq(u32 gsi, int gsi_override, int triggering, - bool set_pirq) +static int xen_register_pirq(u32 gsi, int triggering, bool set_pirq) { int rc, pirq = -1, irq = -1; struct physdev_map_pirq map_irq; @@ -94,9 +93,6 @@ static int xen_register_pirq(u32 gsi, int gsi_override, int triggering, name = "ioapic-level"; } - if (gsi_override >= 0) - gsi = gsi_override; - irq = xen_bind_pirq_gsi_to_irq(gsi, map_irq.pirq, shareable, name); if (irq < 0) goto out; @@ -112,12 +108,12 @@ static int acpi_register_gsi_xen_hvm(struct device *dev, u32 gsi, if (!xen_hvm_domain()) return -1; - return xen_register_pirq(gsi, -1 /* no GSI override */, trigger, + return xen_register_pirq(gsi, trigger, false /* no mapping of GSI to PIRQ */); } #ifdef CONFIG_XEN_DOM0 -static int xen_register_gsi(u32 gsi, int gsi_override, int triggering, int polarity) +static int xen_register_gsi(u32 gsi, int triggering, int polarity) { int rc, irq; struct physdev_setup_gsi setup_gsi; @@ -128,7 +124,7 @@ static int xen_register_gsi(u32 gsi, int gsi_override, int triggering, int polar printk(KERN_DEBUG "xen: registering gsi %u triggering %d polarity %d\n", gsi, triggering, polarity); - irq = xen_register_pirq(gsi, gsi_override, triggering, true); + irq = xen_register_pirq(gsi, triggering, true); setup_gsi.gsi = gsi; setup_gsi.triggering = (triggering == ACPI_EDGE_SENSITIVE ? 0 : 1); @@ -148,7 +144,7 @@ static int xen_register_gsi(u32 gsi, int gsi_override, int triggering, int polar static int acpi_register_gsi_xen(struct device *dev, u32 gsi, int trigger, int polarity) { - return xen_register_gsi(gsi, -1 /* no GSI override */, trigger, polarity); + return xen_register_gsi(gsi, trigger, polarity); } #endif #endif @@ -491,7 +487,7 @@ int __init pci_xen_initial_domain(void) if (acpi_get_override_irq(irq, &trigger, &polarity) == -1) continue; - xen_register_pirq(irq, -1 /* no GSI override */, + xen_register_pirq(irq, trigger ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE, true /* Map GSI to PIRQ */); }
All callers within the same file pass in -1 (no override). Signed-off-by: Wei Liu <wei.liu@kernel.org> --- arch/x86/pci/xen.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)