* [PATCH] tpm: interrupt clear fix
@ 2006-07-12 21:01 Kylene Jo Hall
2006-07-12 22:04 ` Alan Cox
2006-07-13 11:45 ` linux-os (Dick Johnson)
0 siblings, 2 replies; 4+ messages in thread
From: Kylene Jo Hall @ 2006-07-12 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: TPM Device Driver List, akpm
Under stress testing I found that the interrupt is not always cleared.
This is a bug and this patch should go into 2.6.18 and 2.6.17.x.
Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
---
--- tcg/tpmdd/drivers/char/tpm/tpm_tis.c 2006-06-07 11:37:08.000000000 -0700
+++ linux-2.6.17/drivers/char/tpm/tpm_tis.c 2006-07-10 12:58:28.000000000 -0700
@@ -424,6 +424,7 @@ static irqreturn_t tis_int_handler(int i
iowrite32(interrupt,
chip->vendor.iobase +
TPM_INT_STATUS(chip->vendor.locality));
+ mb();
return IRQ_HANDLED;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tpm: interrupt clear fix
2006-07-12 21:01 [PATCH] tpm: interrupt clear fix Kylene Jo Hall
@ 2006-07-12 22:04 ` Alan Cox
2006-07-13 11:45 ` linux-os (Dick Johnson)
1 sibling, 0 replies; 4+ messages in thread
From: Alan Cox @ 2006-07-12 22:04 UTC (permalink / raw)
To: Kylene Jo Hall; +Cc: linux-kernel, TPM Device Driver List, akpm
Ar Mer, 2006-07-12 am 14:01 -0700, ysgrifennodd Kylene Jo Hall:
> Under stress testing I found that the interrupt is not always cleared.
> This is a bug and this patch should go into 2.6.18 and 2.6.17.x.
>
> Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
> ---
> --- tcg/tpmdd/drivers/char/tpm/tpm_tis.c 2006-06-07 11:37:08.000000000 -0700
> +++ linux-2.6.17/drivers/char/tpm/tpm_tis.c 2006-07-10 12:58:28.000000000 -0700
> @@ -424,6 +424,7 @@ static irqreturn_t tis_int_handler(int i
> iowrite32(interrupt,
> chip->vendor.iobase +
> TPM_INT_STATUS(chip->vendor.locality));
> + mb();
NAK
This looks incorrect.
The iowrite32 will be posted for mmio. mb() may half hide the problem on
some processors but you should read from the same PCI device as per the
PCI spec.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tpm: interrupt clear fix
2006-07-12 21:01 [PATCH] tpm: interrupt clear fix Kylene Jo Hall
2006-07-12 22:04 ` Alan Cox
@ 2006-07-13 11:45 ` linux-os (Dick Johnson)
2006-07-13 19:24 ` Kylene Jo Hall
1 sibling, 1 reply; 4+ messages in thread
From: linux-os (Dick Johnson) @ 2006-07-13 11:45 UTC (permalink / raw)
To: Kylene Jo Hall; +Cc: linux-kernel, TPM Device Driver List, akpm
On Wed, 12 Jul 2006, Kylene Jo Hall wrote:
> Under stress testing I found that the interrupt is not always cleared.
> This is a bug and this patch should go into 2.6.18 and 2.6.17.x.
>
> Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
> ---
> --- tcg/tpmdd/drivers/char/tpm/tpm_tis.c 2006-06-07 11:37:08.000000000 -0700
> +++ linux-2.6.17/drivers/char/tpm/tpm_tis.c 2006-07-10 12:58:28.000000000 -0700
> @@ -424,6 +424,7 @@ static irqreturn_t tis_int_handler(int i
> iowrite32(interrupt,
> chip->vendor.iobase +
> TPM_INT_STATUS(chip->vendor.locality));
> + mb();
> return IRQ_HANDLED;
> }
PCI devices need a final read to flush all pending writes. Whatever
mb() does, just hides the problem.
Cheers,
Dick Johnson
Penguin : Linux version 2.6.16.24 on an i686 machine (5592.63 BogoMips).
New book: http://www.AbominableFirebug.com/
_
\x1a\x04
****************************************************************
The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.
Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tpm: interrupt clear fix
2006-07-13 11:45 ` linux-os (Dick Johnson)
@ 2006-07-13 19:24 ` Kylene Jo Hall
0 siblings, 0 replies; 4+ messages in thread
From: Kylene Jo Hall @ 2006-07-13 19:24 UTC (permalink / raw)
To: linux-os (Dick Johnson); +Cc: linux-kernel, TPM Device Driver List, akpm
Under stress testing I found that the interrupt is not always cleared.
This is a bug and this patch should go into 2.6.18 and 2.6.17.x.
On Thu, 2006-07-13 at 07:45 -0400, linux-os (Dick Johnson) wrote:
> PCI devices need a final read to flush all pending writes. Whatever
> mb() does, just hides the problem.
Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
---
--- linux-2.6.18-rc1/drivers/char/tpm/tpm_tis.c 2006-07-13 14:46:39.727500500 -0500
+++ linux-2.6.18-rc1-tpm/drivers/char/tpm/tpm_tis.c 2006-07-13 14:47:33.878884750 -0500
@@ -424,6 +424,7 @@ static irqreturn_t tis_int_handler(int i
iowrite32(interrupt,
chip->vendor.iobase +
TPM_INT_STATUS(chip->vendor.locality));
+ ioread32(chip->vendor.iobase + TPM_INT_STATUS(chip->vendor.locality));
return IRQ_HANDLED;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-07-13 19:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-12 21:01 [PATCH] tpm: interrupt clear fix Kylene Jo Hall
2006-07-12 22:04 ` Alan Cox
2006-07-13 11:45 ` linux-os (Dick Johnson)
2006-07-13 19:24 ` Kylene Jo Hall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.