[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-84245af7297ced9e8fe837dc0fc4782438771bd2@git.kernel.org>
Date: Sat, 21 Jun 2014 14:14:03 -0700
From: tip-bot for Jiang Liu <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, konrad.wilk@...cle.com, rdunlap@...radead.org,
tony.luck@...el.com, gregkh@...uxfoundation.org,
tglx@...utronix.de, len.brown@...el.com,
linux-kernel@...r.kernel.org, hpa@...or.com,
jiang.liu@...ux.intel.com, grant.likely@...aro.org,
yinghai@...nel.org, joro@...tes.org, pavel@....cz,
benh@...nel.crashing.org, bhelgaas@...gle.com, rjw@...ysocki.net,
paul.gortmaker@...driver.com
Subject: [tip:x86/apic] x86, irq, ACPI:
Change __acpi_register_gsi to return IRQ number instead of GSI
Commit-ID: 84245af7297ced9e8fe837dc0fc4782438771bd2
Gitweb: http://git.kernel.org/tip/84245af7297ced9e8fe837dc0fc4782438771bd2
Author: Jiang Liu <jiang.liu@...ux.intel.com>
AuthorDate: Tue, 10 Jun 2014 14:14:47 +0800
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Sat, 21 Jun 2014 23:05:42 +0200
x86, irq, ACPI: Change __acpi_register_gsi to return IRQ number instead of GSI
Currently __acpi_register_gsi is defined to return GSI number and
may be set to acpi_register_gsi_pic(), acpi_register_gsi_ioapic(),
acpi_register_gsi_xen_hvm() and acpi_register_gsi_xen().
Among which, acpi_register_gsi_ioapic() returns GSI number, but
acpi_register_gsi_xen_hvm() and acpi_register_gsi_xen() actually
returns IRQ number instead of GSI. And for acpi_register_gsi_pic(),
GSI number equals to IRQ number.
So change acpi_register_gsi_ioapic() to return IRQ number, it also
simplifies the code.
Signed-off-by: Jiang Liu <jiang.liu@...ux.intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Cc: Tony Luck <tony.luck@...el.com>
Cc: Joerg Roedel <joro@...tes.org>
Cc: Paul Gortmaker <paul.gortmaker@...driver.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Grant Likely <grant.likely@...aro.org>
Cc: Rafael J. Wysocki <rjw@...ysocki.net>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Randy Dunlap <rdunlap@...radead.org>
Cc: Yinghai Lu <yinghai@...nel.org>
Cc: Len Brown <len.brown@...el.com>
Cc: Pavel Machek <pavel@....cz>
Link: http://lkml.kernel.org/r/1402380887-32512-1-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
arch/x86/kernel/acpi/boot.c | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 9965afb..0cf311c 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -419,7 +419,7 @@ static int mp_register_gsi(struct device *dev, u32 gsi, int trigger,
irq = map_gsi_to_irq(gsi);
if (irq < 0)
- return ACPI_INVALID_GSI;
+ return irq;
ioapic = mp_find_ioapic(gsi);
if (ioapic < 0) {
@@ -444,12 +444,11 @@ static int mp_register_gsi(struct device *dev, u32 gsi, int trigger,
polarity == ACPI_ACTIVE_HIGH ? 0 : 1);
ret = io_apic_set_pci_routing(dev, irq, &irq_attr);
if (ret < 0)
- gsi = ACPI_INVALID_GSI;
+ irq = -1;
- return gsi;
+ return irq;
}
-
static int __init
acpi_parse_ioapic(struct acpi_subtable_header * header, const unsigned long end)
{
@@ -652,11 +651,13 @@ static int acpi_register_gsi_pic(struct device *dev, u32 gsi,
static int acpi_register_gsi_ioapic(struct device *dev, u32 gsi,
int trigger, int polarity)
{
+ int irq = gsi;
+
#ifdef CONFIG_X86_IO_APIC
- gsi = mp_register_gsi(dev, gsi, trigger, polarity);
+ irq = mp_register_gsi(dev, gsi, trigger, polarity);
#endif
- return gsi;
+ return irq;
}
int (*__acpi_register_gsi)(struct device *dev, u32 gsi,
@@ -674,13 +675,7 @@ int (*acpi_suspend_lowlevel)(void);
*/
int acpi_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity)
{
- unsigned int plat_gsi;
-
- plat_gsi = __acpi_register_gsi(dev, gsi, trigger, polarity);
- if (plat_gsi != ACPI_INVALID_GSI)
- return map_gsi_to_irq(plat_gsi);
-
- return -1;
+ return __acpi_register_gsi(dev, gsi, trigger, polarity);
}
EXPORT_SYMBOL_GPL(acpi_register_gsi);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists