[PATCH] serial: PL011: move interrupt clearing

Subsystems: arm primecell uart pl010 and pl011 drivers, the rest, tty layer and serial drivers

STALE5234d

10 messages, 5 authors, 2012-04-03 · open the first message on its own page

[PATCH] serial: PL011: move interrupt clearing

From: Linus Walleij <hidden>
Date: 2012-03-21 19:15:18

Commit 360f748b204275229f8398cb2f9f53955db1503b
"serial: PL011: clear pending interrupts"
attempts to clear interrupts by writing to a
yet-unassigned memory address. This fixes the issue.

The breaking patch is marked for stable so should be
carried along with the other patch.

Cc: Shreshtha Kumar Sahu <redacted>
Cc: Russell King <redacted>
Cc: stable <redacted>
Reported-by: Viresh Kumar <redacted>
Signed-off-by: Linus Walleij <redacted>
---
 drivers/tty/serial/amba-pl011.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 7e01399..4ed35c5 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1930,10 +1930,6 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
 		goto unmap;
 	}
 
-	/* Ensure interrupts from this UART are masked and cleared */
-	writew(0, uap->port.membase + UART011_IMSC);
-	writew(0xffff, uap->port.membase + UART011_ICR);
-
 	uap->vendor = vendor;
 	uap->lcrh_rx = vendor->lcrh_rx;
 	uap->lcrh_tx = vendor->lcrh_tx;
@@ -1951,6 +1947,10 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
 	uap->port.line = i;
 	pl011_dma_probe(uap);
 
+	/* Ensure interrupts from this UART are masked and cleared */
+	writew(0, uap->port.membase + UART011_IMSC);
+	writew(0xffff, uap->port.membase + UART011_ICR);
+
 	snprintf(uap->type, sizeof(uap->type), "PL011 rev%u", amba_rev(dev));
 
 	amba_ports[i] = uap;
-- 
1.7.7.6

[PATCH] serial: PL011: move interrupt clearing

From: viresh kumar <hidden>
Date: 2012-03-22 01:04:37

On Thu, Mar 22, 2012 at 12:45 AM, Linus Walleij
[off-list ref] wrote:
Commit 360f748b204275229f8398cb2f9f53955db1503b
"serial: PL011: clear pending interrupts"
attempts to clear interrupts by writing to a
yet-unassigned memory address. This fixes the issue.

The breaking patch is marked for stable so should be
carried along with the other patch.

Cc: Shreshtha Kumar Sahu <redacted>
Cc: Russell King <redacted>
Cc: stable <redacted>
Reported-by: Viresh Kumar <redacted>
Signed-off-by: Linus Walleij <redacted>
---
?drivers/tty/serial/amba-pl011.c | ? ?8 ++++----
?1 files changed, 4 insertions(+), 4 deletions(-)
You missed me in CC??
quoted hunk
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 7e01399..4ed35c5 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1930,10 +1930,6 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
? ? ? ? ? ? ? ?goto unmap;
? ? ? ?}

- ? ? ? /* Ensure interrupts from this UART are masked and cleared */
- ? ? ? writew(0, uap->port.membase + UART011_IMSC);
- ? ? ? writew(0xffff, uap->port.membase + UART011_ICR);
-
? ? ? ?uap->vendor = vendor;
? ? ? ?uap->lcrh_rx = vendor->lcrh_rx;
? ? ? ?uap->lcrh_tx = vendor->lcrh_tx;
@@ -1951,6 +1947,10 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
? ? ? ?uap->port.line = i;
? ? ? ?pl011_dma_probe(uap);

+ ? ? ? /* Ensure interrupts from this UART are masked and cleared */
+ ? ? ? writew(0, uap->port.membase + UART011_IMSC);
+ ? ? ? writew(0xffff, uap->port.membase + UART011_ICR);
+
? ? ? ?snprintf(uap->type, sizeof(uap->type), "PL011 rev%u", amba_rev(dev));

? ? ? ?amba_ports[i] = uap;
Reviewed-by: Viresh Kumar <redacted>

--
viresh

[PATCH] serial: PL011: move interrupt clearing

From: Linus Walleij <hidden>
Date: 2012-03-22 08:00:44

On Thu, Mar 22, 2012 at 2:04 AM, viresh kumar [off-list ref] wrote:
quoted
Cc: Shreshtha Kumar Sahu <redacted>
Cc: Russell King <redacted>
Cc: stable <redacted>
Reported-by: Viresh Kumar <redacted>
Signed-off-by: Linus Walleij <redacted>
---
?drivers/tty/serial/amba-pl011.c | ? ?8 ++++----
?1 files changed, 4 insertions(+), 4 deletions(-)
You missed me in CC??
I put you in Reported-by, then used --cc at the prompt because git send-email
still does not realize it must put Reported-by: tags on the CC list.

Yours,
Linus Walleij

[PATCH] serial: PL011: move interrupt clearing

From: viresh kumar <hidden>
Date: 2012-03-23 03:39:16

On Thu, Mar 22, 2012 at 1:30 PM, Linus Walleij [off-list ref] wrote:
On Thu, Mar 22, 2012 at 2:04 AM, viresh kumar [off-list ref] wrote:
quoted
You missed me in CC??
I put you in Reported-by, then used --cc at the prompt because git send-email
still does not realize it must put Reported-by: tags on the CC list.
That's strange. When i check my mail on @st.com id, i see myself in cc
list, but on
gmail i see following cc list in your first mail.

linux-serial at vger.kernel.org, Greg Kroah-Hartman
[off-list ref], Russell King [off-list ref],
Jong-Sung Kim [off-list ref], stable [off-list ref],
Chanho Min [off-list ref],
linux-arm-kernel at lists.infradead.org, Shreshtha Kumar Sahu
[off-list ref]

Why don't i see myself in cc here?

I have seen similar issues earlier too, with our ST internal and
Mainline mailing lists.
Any ideas?

--
viresh

[PATCH] serial: PL011: move interrupt clearing

From: Linus Walleij <hidden>
Date: 2012-03-23 08:17:44

On Fri, Mar 23, 2012 at 4:39 AM, viresh kumar [off-list ref] wrote:
That's strange. When i check my mail on @st.com id, i see myself in cc
list, but on
gmail i see following cc list in your first mail.
(...)
Why don't i see myself in cc here?
No clue :-(

On *my* gmail it looks like this:

Cc: linux-arm-kernel at lists.infradead.org,
	Chanho Min [off-list ref],
	Jong-Sung Kim [off-list ref],
	Viresh Kumar [off-list ref],
	Linus Walleij [off-list ref],
	Shreshtha Kumar Sahu [off-list ref],
	Russell King [off-list ref],
	stable [off-list ref]

Trust no gmail...

Linus Walleij

[PATCH] serial: PL011: move interrupt clearing

From: Grant Likely <hidden>
Date: 2012-03-29 20:49:37

On Wed, Mar 21, 2012 at 1:15 PM, Linus Walleij [off-list ref] wrote:
Commit 360f748b204275229f8398cb2f9f53955db1503b
"serial: PL011: clear pending interrupts"
attempts to clear interrupts by writing to a
yet-unassigned memory address. This fixes the issue.

The breaking patch is marked for stable so should be
carried along with the other patch.

Cc: Shreshtha Kumar Sahu <redacted>
Cc: Russell King <redacted>
Cc: stable <redacted>
Reported-by: Viresh Kumar <redacted>
Signed-off-by: Linus Walleij <redacted>
Ugh; the original patch is obviously broken.  How did it get applied
without testing?

Greg, can you get this out to Linus ASAP please?  I have one comment
below, but I don't think it should block merging this patch.

Tested-by: Grant Likely <redacted>
quoted hunk
---
?drivers/tty/serial/amba-pl011.c | ? ?8 ++++----
?1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 7e01399..4ed35c5 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1930,10 +1930,6 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
? ? ? ? ? ? ? ?goto unmap;
? ? ? ?}

- ? ? ? /* Ensure interrupts from this UART are masked and cleared */
- ? ? ? writew(0, uap->port.membase + UART011_IMSC);
- ? ? ? writew(0xffff, uap->port.membase + UART011_ICR);
-
? ? ? ?uap->vendor = vendor;
? ? ? ?uap->lcrh_rx = vendor->lcrh_rx;
? ? ? ?uap->lcrh_tx = vendor->lcrh_tx;
@@ -1951,6 +1947,10 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
? ? ? ?uap->port.line = i;
? ? ? ?pl011_dma_probe(uap);

+ ? ? ? /* Ensure interrupts from this UART are masked and cleared */
+ ? ? ? writew(0, uap->port.membase + UART011_IMSC);
+ ? ? ? writew(0xffff, uap->port.membase + UART011_ICR);
+
Is it correct to move the interrupt clearing below the
pl011_dma_probe() call?  I've tested the fix with the interrupt
clearing both above and below the pl011_dma_probe() call and versatile
qemu boots in both cases.

g.

[PATCH] serial: PL011: move interrupt clearing

From: Linus Walleij <hidden>
Date: 2012-03-29 21:22:55

On Thu, Mar 29, 2012 at 10:49 PM, Grant Likely
[off-list ref] wrote:
quoted
Commit 360f748b204275229f8398cb2f9f53955db1503b
"serial: PL011: clear pending interrupts"
attempts to clear interrupts by writing to a
yet-unassigned memory address. This fixes the issue.
Ugh; the original patch is obviously broken. ?How did it get applied
without testing?
I've felt bad about that for a while, but to the best of my knowledge I did
test it. Either I did some manual slip with the boot images or there was
something else causing it to actually work as it looked... Chanho also
had it working IIRC.
Greg, can you get this out to Linus ASAP please? ?I have one comment
below, but I don't think it should block merging this patch.

Tested-by: Grant Likely <redacted>
Thanks.
quoted
- ? ? ? /* Ensure interrupts from this UART are masked and cleared */
- ? ? ? writew(0, uap->port.membase + UART011_IMSC);
- ? ? ? writew(0xffff, uap->port.membase + UART011_ICR);
-
? ? ? ?uap->vendor = vendor;
? ? ? ?uap->lcrh_rx = vendor->lcrh_rx;
? ? ? ?uap->lcrh_tx = vendor->lcrh_tx;
@@ -1951,6 +1947,10 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
? ? ? ?uap->port.line = i;
? ? ? ?pl011_dma_probe(uap);

+ ? ? ? /* Ensure interrupts from this UART are masked and cleared */
+ ? ? ? writew(0, uap->port.membase + UART011_IMSC);
+ ? ? ? writew(0xffff, uap->port.membase + UART011_ICR);
+
Is it correct to move the interrupt clearing below the
pl011_dma_probe() call? ?I've tested the fix with the interrupt
clearing both above and below the pl011_dma_probe() call and versatile
qemu boots in both cases.
pl011_dma_probe() basically just make logical setup so we do the
clear-out as the last step of setup.

Yours,
Linus Walleij

[PATCH] serial: PL011: move interrupt clearing

From: gregkh@linuxfoundation.org (Greg Kroah-Hartman)
Date: 2012-03-29 21:33:33

On Thu, Mar 29, 2012 at 02:49:37PM -0600, Grant Likely wrote:
On Wed, Mar 21, 2012 at 1:15 PM, Linus Walleij [off-list ref] wrote:
quoted
Commit 360f748b204275229f8398cb2f9f53955db1503b
"serial: PL011: clear pending interrupts"
attempts to clear interrupts by writing to a
yet-unassigned memory address. This fixes the issue.

The breaking patch is marked for stable so should be
carried along with the other patch.

Cc: Shreshtha Kumar Sahu <redacted>
Cc: Russell King <redacted>
Cc: stable <redacted>
Reported-by: Viresh Kumar <redacted>
Signed-off-by: Linus Walleij <redacted>
Ugh; the original patch is obviously broken.  How did it get applied
without testing?

Greg, can you get this out to Linus ASAP please?  I have one comment
below, but I don't think it should block merging this patch.

Tested-by: Grant Likely <redacted>
Thanks, I'll get it to him after 3.4-rc1 is out, in a few days, along
with other tty fixes being queued up.

greg k-h

[PATCH] serial: PL011: move interrupt clearing

From: Paul Gortmaker <hidden>
Date: 2012-04-03 15:36:23

On Thu, Mar 29, 2012 at 5:33 PM, Greg Kroah-Hartman
[off-list ref] wrote:
On Thu, Mar 29, 2012 at 02:49:37PM -0600, Grant Likely wrote:
quoted
On Wed, Mar 21, 2012 at 1:15 PM, Linus Walleij [off-list ref] wrote:
quoted
Commit 360f748b204275229f8398cb2f9f53955db1503b
"serial: PL011: clear pending interrupts"
attempts to clear interrupts by writing to a
yet-unassigned memory address. This fixes the issue.

The breaking patch is marked for stable so should be
carried along with the other patch.

Cc: Shreshtha Kumar Sahu <redacted>
Cc: Russell King <redacted>
Cc: stable <redacted>
Reported-by: Viresh Kumar <redacted>
Signed-off-by: Linus Walleij <redacted>
Ugh; the original patch is obviously broken. ?How did it get applied
without testing?

Greg, can you get this out to Linus ASAP please? ?I have one comment
below, but I don't think it should block merging this patch.

Tested-by: Grant Likely <redacted>
Thanks, I'll get it to him after 3.4-rc1 is out, in a few days, along
with other tty fixes being queued up.
Hi Greg,

Just wanted to check this didn't fall through the cracks, as I don't
see it in your tty-next or tty-linus branches.

The original bad commit causes Silent Boot Death on qemu ARM
versatile, which is kind of nasty.  It pretty much forces a bisection,
which I did, which then led me here.

Thanks,
Paul.
--
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at ?http://vger.kernel.org/majordomo-info.html

[PATCH] serial: PL011: move interrupt clearing

From: gregkh@linuxfoundation.org (Greg Kroah-Hartman)
Date: 2012-04-03 16:19:23

On Tue, Apr 03, 2012 at 11:36:23AM -0400, Paul Gortmaker wrote:
On Thu, Mar 29, 2012 at 5:33 PM, Greg Kroah-Hartman
[off-list ref] wrote:
quoted
On Thu, Mar 29, 2012 at 02:49:37PM -0600, Grant Likely wrote:
quoted
On Wed, Mar 21, 2012 at 1:15 PM, Linus Walleij [off-list ref] wrote:
quoted
Commit 360f748b204275229f8398cb2f9f53955db1503b
"serial: PL011: clear pending interrupts"
attempts to clear interrupts by writing to a
yet-unassigned memory address. This fixes the issue.

The breaking patch is marked for stable so should be
carried along with the other patch.

Cc: Shreshtha Kumar Sahu <redacted>
Cc: Russell King <redacted>
Cc: stable <redacted>
Reported-by: Viresh Kumar <redacted>
Signed-off-by: Linus Walleij <redacted>
Ugh; the original patch is obviously broken. ?How did it get applied
without testing?

Greg, can you get this out to Linus ASAP please? ?I have one comment
below, but I don't think it should block merging this patch.

Tested-by: Grant Likely <redacted>
Thanks, I'll get it to him after 3.4-rc1 is out, in a few days, along
with other tty fixes being queued up.
Hi Greg,

Just wanted to check this didn't fall through the cracks, as I don't
see it in your tty-next or tty-linus branches.

The original bad commit causes Silent Boot Death on qemu ARM
versatile, which is kind of nasty.  It pretty much forces a bisection,
which I did, which then led me here.
It's still in my "to-apply" queue, don't worry, it's not lost.

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help