Re: repeatable, hard lockup on boot in linux-2.6.0-test4 (moredetails)

From: Andrew Morton
Date: Tue Sep 02 2003 - 15:21:38 EST


"Dale E Martin" <dmartin@xxxxxxxxxxxxxxx> wrote:
>
> And then I got one more at 590, inside i8042_check_mux:
> DB();
> if (request_irq(values->irq, i8042_interrupt, SA_SHIRQ,
> "i8042", i8042_request_irq_cookie))
> return -1;
> DB();
>
> This last one did not show up, nor did any inside the conditional loops at
> line 878 or 883, nor at line 888. So perhaps it was in request_irq that it
> locked up?

Looks like it. Please add a DB() to the start of i8042_interrupt(),
see if we locked up in an interrupt storm. Also sprinkle some in
request_irq() I guess. You know the deal ;)

There's an ugly in the irq code there: if i8042_check_mux() or
i8042_check_mux() are called while the device is open we end up freeing the
wrong IRQ. It is unlikely to help though.


--- 25/drivers/input/serio/i8042.c~i8042-free_irq-fix Tue Sep 2 12:55:23 2003
+++ 25-akpm/drivers/input/serio/i8042.c Tue Sep 2 12:57:19 2003
@@ -581,6 +581,7 @@ void i8042_controller_cleanup(void)
static int __init i8042_check_mux(struct i8042_values *values)
{
unsigned char param;
+ static int i8042_check_mux_cookie;
int i;

/*
@@ -588,9 +589,9 @@ static int __init i8042_check_mux(struct
*/

if (request_irq(values->irq, i8042_interrupt, SA_SHIRQ,
- "i8042", i8042_request_irq_cookie))
+ "i8042", &i8042_check_mux_cookie))
return -1;
- free_irq(values->irq, i8042_request_irq_cookie);
+ free_irq(values->irq, &i8042_check_mux_cookie);

/*
* Get rid of bytes in the queue.
@@ -653,6 +654,7 @@ static int __init i8042_check_mux(struct
static int __init i8042_check_aux(struct i8042_values *values)
{
unsigned char param;
+ static int i8042_check_aux_cookie;

/*
* Check if AUX irq is available. If it isn't, then there is no point
@@ -660,9 +662,9 @@ static int __init i8042_check_aux(struct
*/

if (request_irq(values->irq, i8042_interrupt, SA_SHIRQ,
- "i8042", i8042_request_irq_cookie))
+ "i8042", &i8042_check_aux_cookie))
return -1;
- free_irq(values->irq, i8042_request_irq_cookie);
+ free_irq(values->irq, &i8042_check_aux_cookie);

/*
* Get rid of bytes in the queue.

_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
"Dale E Martin" <dmartin@xxxxxxxxxxxxxxx> wrote:
>
> And then I got one more at 590, inside i8042_check_mux:
> DB();
> if (request_irq(values->irq, i8042_interrupt, SA_SHIRQ,
> "i8042", i8042_request_irq_cookie))
> return -1;
> DB();
>
> This last one did not show up, nor did any inside the conditional loops at
> line 878 or 883, nor at line 888. So perhaps it was in request_irq that it
> locked up?

Looks like it. Please add a DB() to the start of i8042_interrupt(),
see if we locked up in an interrupt storm. Also sprinkle some in
request_irq() I guess. You know the deal ;)

There's an ugly in the irq code there: if i8042_check_mux() or
i8042_check_mux() are called while the device is open we end up freeing the
wrong IRQ. It is unlikely to help though.


--- 25/drivers/input/serio/i8042.c~i8042-free_irq-fix Tue Sep 2 12:55:23 2003
+++ 25-akpm/drivers/input/serio/i8042.c Tue Sep 2 12:57:19 2003
@@ -581,6 +581,7 @@ void i8042_controller_cleanup(void)
static int __init i8042_check_mux(struct i8042_values *values)
{
unsigned char param;
+ static int i8042_check_mux_cookie;
int i;

/*
@@ -588,9 +589,9 @@ static int __init i8042_check_mux(struct
*/

if (request_irq(values->irq, i8042_interrupt, SA_SHIRQ,
- "i8042", i8042_request_irq_cookie))
+ "i8042", &i8042_check_mux_cookie))
return -1;
- free_irq(values->irq, i8042_request_irq_cookie);
+ free_irq(values->irq, &i8042_check_mux_cookie);

/*
* Get rid of bytes in the queue.
@@ -653,6 +654,7 @@ static int __init i8042_check_mux(struct
static int __init i8042_check_aux(struct i8042_values *values)
{
unsigned char param;
+ static int i8042_check_aux_cookie;

/*
* Check if AUX irq is available. If it isn't, then there is no point
@@ -660,9 +662,9 @@ static int __init i8042_check_aux(struct
*/

if (request_irq(values->irq, i8042_interrupt, SA_SHIRQ,
- "i8042", i8042_request_irq_cookie))
+ "i8042", &i8042_check_aux_cookie))
return -1;
- free_irq(values->irq, i8042_request_irq_cookie);
+ free_irq(values->irq, &i8042_check_aux_cookie);

/*
* Get rid of bytes in the queue.

_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/