2004-01-15 14:57:04

by Jes Sorensen

[permalink] [raw]
Subject: [patch] 2.6.1-mm3 acpi frees free irq0

Hi,

There is a bug in the ACPI code found in 2.6.1-mm3 where if it can't
find the interrupt source for the ACPI System Control Interrupt Handler,
it end up trying to free irq 0.

Included patch fixes the problem.

Cheers,
Jes

--- linux-2.6.1-mm3/drivers/acpi/osl.c~ Wed Jan 14 05:00:25 2004
+++ linux-2.6.1-mm3/drivers/acpi/osl.c Thu Jan 15 06:43:28 2004
@@ -257,13 +257,13 @@
return AE_OK;
}
#endif
- acpi_irq_irq = irq;
acpi_irq_handler = handler;
acpi_irq_context = context;
if (request_irq(irq, acpi_irq, SA_SHIRQ, "acpi", acpi_irq)) {
printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq);
return AE_NOT_ACQUIRED;
}
+ acpi_irq_irq = irq;

return AE_OK;
}
@@ -271,12 +271,13 @@
acpi_status
acpi_os_remove_interrupt_handler(u32 irq, OSD_HANDLER handler)
{
- if (acpi_irq_handler) {
+ if (irq) {
#if defined(CONFIG_IA64) || defined(CONFIG_PCI_USE_VECTOR)
irq = acpi_irq_to_vector(irq);
#endif
free_irq(irq, acpi_irq);
acpi_irq_handler = NULL;
+ acpi_irq_irq = 0;
}

return AE_OK;


2004-01-15 17:20:27

by Brown, Len

[permalink] [raw]
Subject: RE: [patch] 2.6.1-mm3 acpi frees free irq0

The primary failure is that the SCI was not found, and the secondary
symptom is that we failed to handle that error properly -- which you've
patched.

Can you tell me more about the primary failure?
Was the SCI found in other releases?

Thanks,
-Len

> -----Original Message-----
> From: Jes Sorensen [mailto:[email protected]]
> Sent: Thursday, January 15, 2004 9:57 AM
> To: [email protected]
> Cc: [email protected];
> [email protected]; Brown, Len; Jesse Barnes
> Subject: [patch] 2.6.1-mm3 acpi frees free irq0
>
>
> Hi,
>
> There is a bug in the ACPI code found in 2.6.1-mm3 where if it can't
> find the interrupt source for the ACPI System Control
> Interrupt Handler,
> it end up trying to free irq 0.
>
> Included patch fixes the problem.
>
> Cheers,
> Jes
>
> --- linux-2.6.1-mm3/drivers/acpi/osl.c~ Wed Jan 14 05:00:25 2004
> +++ linux-2.6.1-mm3/drivers/acpi/osl.c Thu Jan 15 06:43:28 2004
> @@ -257,13 +257,13 @@
> return AE_OK;
> }
> #endif
> - acpi_irq_irq = irq;
> acpi_irq_handler = handler;
> acpi_irq_context = context;
> if (request_irq(irq, acpi_irq, SA_SHIRQ, "acpi", acpi_irq)) {
> printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation
> failed\n", irq);
> return AE_NOT_ACQUIRED;
> }
> + acpi_irq_irq = irq;
>
> return AE_OK;
> }
> @@ -271,12 +271,13 @@
> acpi_status
> acpi_os_remove_interrupt_handler(u32 irq, OSD_HANDLER handler)
> {
> - if (acpi_irq_handler) {
> + if (irq) {
> #if defined(CONFIG_IA64) || defined(CONFIG_PCI_USE_VECTOR)
> irq = acpi_irq_to_vector(irq);
> #endif
> free_irq(irq, acpi_irq);
> acpi_irq_handler = NULL;
> + acpi_irq_irq = 0;
> }
>
> return AE_OK;
>

2004-01-15 22:02:06

by Jes Sorensen

[permalink] [raw]
Subject: Re: [patch] 2.6.1-mm3 acpi frees free irq0

>>>>> "Len" == Brown, Len <[email protected]> writes:

Len> The primary failure is that the SCI was not found, and the
Len> secondary symptom is that we failed to handle that error properly
Len> -- which you've patched.

Len> Can you tell me more about the primary failure? Was the SCI
Len> found in other releases?

Hi Len,

In this specific case the prom doesn't have it in it's tables, so not
finding it is expected behavior.

Cheers,
Jes

2004-01-18 06:29:42

by Luming Yu

[permalink] [raw]
Subject: RE: [patch] 2.6.1-mm3 acpi frees free irq0


> In this specific case the prom doesn't have it in it's tables, so not
> finding it is expected behavior.

What's your machine type, and BIOS version?
This specific box seems to be short of
fundamental ACPI power button support.

Please refer ACPI spec 3.2.1

2004-01-19 07:59:54

by Jes Sorensen

[permalink] [raw]
Subject: Re: [patch] 2.6.1-mm3 acpi frees free irq0

>>>>> ">" == Yu, Luming <[email protected]> writes:

>> In this specific case the prom doesn't have it in it's tables, so
>> not finding it is expected behavior.

>> What's your machine type, and BIOS version? This specific box
>> seems to be short of fundamental ACPI power button support.

Oh it's very short of those features, it really only uses ACPI to
provide system setup information and thats about it. It's an Altix box
fwiw.

Cheers,
Jes

2004-01-26 20:32:14

by Brown, Len

[permalink] [raw]
Subject: Re: [patch] 2.6.1-mm3 acpi frees free irq0

Accepted.

thanks,
-Len

On Thu, 2004-01-15 at 09:56, Jes Sorensen wrote:
> Hi,
>
> There is a bug in the ACPI code found in 2.6.1-mm3 where if it can't
> find the interrupt source for the ACPI System Control Interrupt Handler,
> it end up trying to free irq 0.
>
> Included patch fixes the problem.
>
> Cheers,
> Jes
>
> --- linux-2.6.1-mm3/drivers/acpi/osl.c~ Wed Jan 14 05:00:25 2004
> +++ linux-2.6.1-mm3/drivers/acpi/osl.c Thu Jan 15 06:43:28 2004
> @@ -257,13 +257,13 @@
> return AE_OK;
> }
> #endif
> - acpi_irq_irq = irq;
> acpi_irq_handler = handler;
> acpi_irq_context = context;
> if (request_irq(irq, acpi_irq, SA_SHIRQ, "acpi", acpi_irq)) {
> printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq);
> return AE_NOT_ACQUIRED;
> }
> + acpi_irq_irq = irq;
>
> return AE_OK;
> }
> @@ -271,12 +271,13 @@
> acpi_status
> acpi_os_remove_interrupt_handler(u32 irq, OSD_HANDLER handler)
> {
> - if (acpi_irq_handler) {
> + if (irq) {
> #if defined(CONFIG_IA64) || defined(CONFIG_PCI_USE_VECTOR)
> irq = acpi_irq_to_vector(irq);
> #endif
> free_irq(irq, acpi_irq);
> acpi_irq_handler = NULL;
> + acpi_irq_irq = 0;
> }
>
> return AE_OK;