* Re: [patch 1/1] acpi: better encapsulate eisa_set_level_irq()
[not found] ` <200410251939.i9PJdH910553-VSHRlsF1veSXDw4h08c5KA@public.gmane.org>
@ 2004-10-26 3:47 ` Len Brown
0 siblings, 0 replies; only message in thread
From: Len Brown @ 2004-10-26 3:47 UTC (permalink / raw)
To: Andrew Morton; +Cc: Bjorn Helgaas, ACPI Developers
Applied,
thanks,
-Len
On Mon, 2004-10-25 at 15:37, akpm-3NddpPZAyC0@public.gmane.org wrote:
> From: Bjorn Helgaas <bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
>
> Move the "only do this once" stuff from acpi_register_gsi() into
> eisa_set_level().
>
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
> Signed-off-by: Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org>
> ---
>
> 25-akpm/arch/i386/kernel/acpi/boot.c | 8 +-------
> 25-akpm/arch/i386/pci/irq.c | 9 ++++++++-
> 2 files changed, 9 insertions(+), 8 deletions(-)
>
> diff -puN
> arch/i386/kernel/acpi/boot.c~acpi-better-encapsulate-eisa_set_level_irq arch/i386/kernel/acpi/boot.c
> ---
> 25/arch/i386/kernel/acpi/boot.c~acpi-better-encapsulate-eisa_set_level_irq Thu Sep 30 16:39:46 2004
> +++ 25-akpm/arch/i386/kernel/acpi/boot.c Thu Sep 30 16:39:46
> 2004
> @@ -457,16 +457,10 @@ unsigned int acpi_register_gsi(u32 gsi,
> * Make sure all (legacy) PCI IRQs are set as level-triggered.
> */
> if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) {
> - static u16 irq_mask;
> extern void eisa_set_level_irq(unsigned int irq);
>
> - if (edge_level == ACPI_LEVEL_SENSITIVE) {
> - if ((gsi < 16) && !((1 << gsi) & irq_mask)) {
> - Dprintk(KERN_DEBUG PREFIX "Setting GSI
> %u as level-triggered\n", gsi);
> - irq_mask |= (1 << gsi);
> + if (edge_level == ACPI_LEVEL_SENSITIVE)
> eisa_set_level_irq(gsi);
> - }
> - }
> }
> #endif
>
> diff -puN
> arch/i386/pci/irq.c~acpi-better-encapsulate-eisa_set_level_irq
> arch/i386/pci/irq.c
> ---
> 25/arch/i386/pci/irq.c~acpi-better-encapsulate-eisa_set_level_irq
> Thu Sep 30 16:39:46 2004
> +++ 25-akpm/arch/i386/pci/irq.c Thu Sep 30 16:39:46 2004
> @@ -127,8 +127,15 @@ void eisa_set_level_irq(unsigned int irq
> {
> unsigned char mask = 1 << (irq & 7);
> unsigned int port = 0x4d0 + (irq >> 3);
> - unsigned char val = inb(port);
> + unsigned char val;
> + static u16 eisa_irq_mask;
>
> + if (irq >= 16 || (1 << irq) & eisa_irq_mask)
> + return;
> +
> + eisa_irq_mask |= (1 << irq);
> + printk("PCI: setting IRQ %u as level-triggered\n", irq);
> + val = inb(port);
> if (!(val & mask)) {
> DBG(" -> edge");
> outb(val | mask, port);
> _
>
>
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-26 3:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200410251939.i9PJdH910553@mail.osdl.org>
[not found] ` <200410251939.i9PJdH910553-VSHRlsF1veSXDw4h08c5KA@public.gmane.org>
2004-10-26 3:47 ` [patch 1/1] acpi: better encapsulate eisa_set_level_irq() Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox