mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 13:36:43 +07:00
x86, acpi, irq: Kill static function irq_to_gsi()
Static function irq_to_gsi() is only called by acpi_isa_irq_to_gsi(), so kill function irq_to_gsi() and simplify acpi_isa_irq_to_gsi(). Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Joerg Roedel <joro@8bytes.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Yinghai Lu <yinghai@kernel.org> Cc: Len Brown <len.brown@intel.com> Cc: Pavel Machek <pavel@ucw.cz> Link: http://lkml.kernel.org/r/1402302011-23642-7-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
965cd0e4a5
commit
032329eebb
@ -120,22 +120,6 @@ static unsigned int gsi_to_irq(unsigned int gsi)
|
||||
return irq;
|
||||
}
|
||||
|
||||
static u32 irq_to_gsi(int irq)
|
||||
{
|
||||
unsigned int gsi;
|
||||
|
||||
if (irq < NR_IRQS_LEGACY)
|
||||
gsi = isa_irq_to_gsi[irq];
|
||||
else if (irq < gsi_top)
|
||||
gsi = irq;
|
||||
else if (irq < (gsi_top + NR_IRQS_LEGACY))
|
||||
gsi = irq - gsi_top;
|
||||
else
|
||||
gsi = 0xffffffff;
|
||||
|
||||
return gsi;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is just a simple wrapper around early_ioremap(),
|
||||
* with sanity checks for phys == 0 and size == 0.
|
||||
@ -640,10 +624,12 @@ EXPORT_SYMBOL_GPL(acpi_gsi_to_irq);
|
||||
|
||||
int acpi_isa_irq_to_gsi(unsigned isa_irq, u32 *gsi)
|
||||
{
|
||||
if (isa_irq >= 16)
|
||||
return -1;
|
||||
*gsi = irq_to_gsi(isa_irq);
|
||||
return 0;
|
||||
if (isa_irq < NR_IRQS_LEGACY) {
|
||||
*gsi = isa_irq_to_gsi[isa_irq];
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int acpi_register_gsi_pic(struct device *dev, u32 gsi,
|
||||
|
Loading…
Reference in New Issue
Block a user