lkml.org 
[lkml]   [2015]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: rename eisa_set_level_irq to elcr_set_level_irq
On Sat, 9 May 2015, Paul Gortmaker wrote:

> This routine has been around for over a decade, but with EISA
> being dead and abandoned for about twice that long, the name can
> be kind of confusing. The function is going at the PIC Edge/Level
> Configuration Registers (ELCR), so rename it as such and mentally
> decouple it from the long since dead EISA bus.
>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: x86@kernel.org
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Len Brown <len.brown@intel.com>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
> ---
>
> [This was in the "delete EISA bus supoort for x86" series, but since
> we aren't going to apply that, we might as well steal this from it.]

Reviewed-by: Maciej W. Rozycki <macro@linux-mips.org>

FWIW it looks good to me, thanks. Especially for reusing the good parts
of your original change. :)

While cleaning this stuff up you might as well consider getting rid of
the embedded numeric 0x4d0 port reference too and adding macros like
PIC_MASTER_ELCR and PIC_SLAVE_ELCR to <asm/i8259.h> to use them...

> diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c
> index 5dc6ca5e1741..9bd115484745 100644
> --- a/arch/x86/pci/irq.c
> +++ b/arch/x86/pci/irq.c
> @@ -146,19 +146,20 @@ static void __init pirq_peer_trick(void)
>
> /*
> * Code for querying and setting of IRQ routes on various interrupt routers.
> + * PIC Edge/Level Control Registers (ELCR) 0x4d0 & 0x4d1.
> */
>
> -void eisa_set_level_irq(unsigned int irq)
> +void elcr_set_level_irq(unsigned int irq)
> {
> unsigned char mask = 1 << (irq & 7);
> unsigned int port = 0x4d0 + (irq >> 3);

... here, and a bunch of places elsewhere. Your change is of course good
as it stands though, that would have to be a separate clean-up anyway.

Maciej


\
 
 \ /
  Last update: 2015-05-10 03:21    [W:0.306 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site