All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serial: PL011: move interrupt clearing
@ 2012-03-21 19:15 ` Linus Walleij
  0 siblings, 0 replies; 20+ messages in thread
From: Linus Walleij @ 2012-03-21 19:15 UTC (permalink / raw)
  To: linux-serial, Greg Kroah-Hartman
  Cc: Russell King, Jong-Sung Kim, Linus Walleij, stable, Chanho Min,
	linux-arm-kernel, Shreshtha Kumar Sahu

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 <shreshthakumar.sahu@stericsson.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: stable <stable@vger.kernel.org>
Reported-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 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

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH] serial: PL011: move interrupt clearing
@ 2012-03-21 19:15 ` Linus Walleij
  0 siblings, 0 replies; 20+ messages in thread
From: Linus Walleij @ 2012-03-21 19:15 UTC (permalink / raw)
  To: linux-arm-kernel

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 <shreshthakumar.sahu@stericsson.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: stable <stable@vger.kernel.org>
Reported-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 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

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH] serial: PL011: move interrupt clearing
  2012-03-21 19:15 ` Linus Walleij
@ 2012-03-22  1:04   ` viresh kumar
  -1 siblings, 0 replies; 20+ messages in thread
From: viresh kumar @ 2012-03-22  1:04 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-serial, Greg Kroah-Hartman, Russell King, Jong-Sung Kim,
	stable, Chanho Min, linux-arm-kernel, Shreshtha Kumar Sahu,
	spear-devel

On Thu, Mar 22, 2012 at 12:45 AM, Linus Walleij
<linus.walleij@linaro.org> 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 <shreshthakumar.sahu@stericsson.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: stable <stable@vger.kernel.org>
> Reported-by: Viresh Kumar <viresh.kumar@st.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  drivers/tty/serial/amba-pl011.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)

You missed me in CC??

>
> 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 <viresh.kumar@st.com>

--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH] serial: PL011: move interrupt clearing
@ 2012-03-22  1:04   ` viresh kumar
  0 siblings, 0 replies; 20+ messages in thread
From: viresh kumar @ 2012-03-22  1:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 22, 2012 at 12:45 AM, Linus Walleij
<linus.walleij@linaro.org> 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 <shreshthakumar.sahu@stericsson.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: stable <stable@vger.kernel.org>
> Reported-by: Viresh Kumar <viresh.kumar@st.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ?drivers/tty/serial/amba-pl011.c | ? ?8 ++++----
> ?1 files changed, 4 insertions(+), 4 deletions(-)

You missed me in CC??

>
> 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 <viresh.kumar@st.com>

--
viresh

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] serial: PL011: move interrupt clearing
  2012-03-22  1:04   ` viresh kumar
@ 2012-03-22  8:00     ` Linus Walleij
  -1 siblings, 0 replies; 20+ messages in thread
From: Linus Walleij @ 2012-03-22  8:00 UTC (permalink / raw)
  To: viresh kumar
  Cc: linux-serial, Greg Kroah-Hartman, Russell King, Jong-Sung Kim,
	stable, Chanho Min, linux-arm-kernel, Shreshtha Kumar Sahu,
	spear-devel

On Thu, Mar 22, 2012 at 2:04 AM, viresh kumar <viresh.linux@gmail.com> wrote:

>> Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
>> Cc: Russell King <linux@arm.linux.org.uk>
>> Cc: stable <stable@vger.kernel.org>
>> Reported-by: Viresh Kumar <viresh.kumar@st.com>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH] serial: PL011: move interrupt clearing
@ 2012-03-22  8:00     ` Linus Walleij
  0 siblings, 0 replies; 20+ messages in thread
From: Linus Walleij @ 2012-03-22  8:00 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 22, 2012 at 2:04 AM, viresh kumar <viresh.linux@gmail.com> wrote:

>> Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
>> Cc: Russell King <linux@arm.linux.org.uk>
>> Cc: stable <stable@vger.kernel.org>
>> Reported-by: Viresh Kumar <viresh.kumar@st.com>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>> ?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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] serial: PL011: move interrupt clearing
  2012-03-22  8:00     ` Linus Walleij
@ 2012-03-23  3:39       ` viresh kumar
  -1 siblings, 0 replies; 20+ messages in thread
From: viresh kumar @ 2012-03-23  3:39 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-serial, Greg Kroah-Hartman, Russell King, Jong-Sung Kim,
	stable, Chanho Min, linux-arm-kernel, Shreshtha Kumar Sahu,
	spear-devel

On Thu, Mar 22, 2012 at 1:30 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Thu, Mar 22, 2012 at 2:04 AM, viresh kumar <viresh.linux@gmail.com> wrote:
>> 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@vger.kernel.org, Greg Kroah-Hartman
<gregkh@linuxfoundation.org>, Russell King <linux@arm.linux.org.uk>,
Jong-Sung Kim <neidhard.kim@lge.com>, stable <stable@vger.kernel.org>,
Chanho Min <chanho0207@gmail.com>,
linux-arm-kernel@lists.infradead.org, Shreshtha Kumar Sahu
<shreshthakumar.sahu@stericsson.com>

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH] serial: PL011: move interrupt clearing
@ 2012-03-23  3:39       ` viresh kumar
  0 siblings, 0 replies; 20+ messages in thread
From: viresh kumar @ 2012-03-23  3:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 22, 2012 at 1:30 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Thu, Mar 22, 2012 at 2:04 AM, viresh kumar <viresh.linux@gmail.com> wrote:
>> 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
<gregkh@linuxfoundation.org>, Russell King <linux@arm.linux.org.uk>,
Jong-Sung Kim <neidhard.kim@lge.com>, stable <stable@vger.kernel.org>,
Chanho Min <chanho0207@gmail.com>,
linux-arm-kernel at lists.infradead.org, Shreshtha Kumar Sahu
<shreshthakumar.sahu@stericsson.com>

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] serial: PL011: move interrupt clearing
  2012-03-23  3:39       ` viresh kumar
@ 2012-03-23  8:17         ` Linus Walleij
  -1 siblings, 0 replies; 20+ messages in thread
From: Linus Walleij @ 2012-03-23  8:17 UTC (permalink / raw)
  To: viresh kumar
  Cc: linux-serial, Greg Kroah-Hartman, Russell King, Jong-Sung Kim,
	stable, Chanho Min, linux-arm-kernel, Shreshtha Kumar Sahu,
	spear-devel

On Fri, Mar 23, 2012 at 4:39 AM, viresh kumar <viresh.linux@gmail.com> 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@lists.infradead.org,
	Chanho Min <chanho0207@gmail.com>,
	Jong-Sung Kim <neidhard.kim@lge.com>,
	Viresh Kumar <viresh.kumar@st.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>,
	Russell King <linux@arm.linux.org.uk>,
	stable <stable@vger.kernel.org>

Trust no gmail...

Linus Walleij

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH] serial: PL011: move interrupt clearing
@ 2012-03-23  8:17         ` Linus Walleij
  0 siblings, 0 replies; 20+ messages in thread
From: Linus Walleij @ 2012-03-23  8:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Mar 23, 2012 at 4:39 AM, viresh kumar <viresh.linux@gmail.com> 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 <chanho0207@gmail.com>,
	Jong-Sung Kim <neidhard.kim@lge.com>,
	Viresh Kumar <viresh.kumar@st.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>,
	Russell King <linux@arm.linux.org.uk>,
	stable <stable@vger.kernel.org>

Trust no gmail...

Linus Walleij

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] serial: PL011: move interrupt clearing
  2012-03-21 19:15 ` Linus Walleij
@ 2012-03-29 20:49   ` Grant Likely
  -1 siblings, 0 replies; 20+ messages in thread
From: Grant Likely @ 2012-03-29 20:49 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-serial, Greg Kroah-Hartman, Russell King, Jong-Sung Kim,
	stable, Chanho Min, linux-arm-kernel, Shreshtha Kumar Sahu

On Wed, Mar 21, 2012 at 1:15 PM, Linus Walleij <linus.walleij@linaro.org> 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 <shreshthakumar.sahu@stericsson.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: stable <stable@vger.kernel.org>
> Reported-by: Viresh Kumar <viresh.kumar@st.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

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 <grant.likely@secretlab.ca>

> ---
>  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.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH] serial: PL011: move interrupt clearing
@ 2012-03-29 20:49   ` Grant Likely
  0 siblings, 0 replies; 20+ messages in thread
From: Grant Likely @ 2012-03-29 20:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 21, 2012 at 1:15 PM, Linus Walleij <linus.walleij@linaro.org> 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 <shreshthakumar.sahu@stericsson.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: stable <stable@vger.kernel.org>
> Reported-by: Viresh Kumar <viresh.kumar@st.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

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 <grant.likely@secretlab.ca>

> ---
> ?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.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] serial: PL011: move interrupt clearing
  2012-03-29 20:49   ` Grant Likely
@ 2012-03-29 21:22     ` Linus Walleij
  -1 siblings, 0 replies; 20+ messages in thread
From: Linus Walleij @ 2012-03-29 21:22 UTC (permalink / raw)
  To: Grant Likely
  Cc: linux-serial, Greg Kroah-Hartman, Russell King, Jong-Sung Kim,
	stable, Chanho Min, linux-arm-kernel, Shreshtha Kumar Sahu

On Thu, Mar 29, 2012 at 10:49 PM, Grant Likely
<grant.likely@secretlab.ca> wrote:

>> 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 <grant.likely@secretlab.ca>

Thanks.

>> -       /* 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
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH] serial: PL011: move interrupt clearing
@ 2012-03-29 21:22     ` Linus Walleij
  0 siblings, 0 replies; 20+ messages in thread
From: Linus Walleij @ 2012-03-29 21:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 29, 2012 at 10:49 PM, Grant Likely
<grant.likely@secretlab.ca> wrote:

>> 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 <grant.likely@secretlab.ca>

Thanks.

>> - ? ? ? /* 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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] serial: PL011: move interrupt clearing
  2012-03-29 20:49   ` Grant Likely
@ 2012-03-29 21:33     ` Greg Kroah-Hartman
  -1 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2012-03-29 21:33 UTC (permalink / raw)
  To: Grant Likely
  Cc: Linus Walleij, linux-serial, Russell King, Jong-Sung Kim, stable,
	Chanho Min, linux-arm-kernel, Shreshtha Kumar Sahu

On Thu, Mar 29, 2012 at 02:49:37PM -0600, Grant Likely wrote:
> On Wed, Mar 21, 2012 at 1:15 PM, Linus Walleij <linus.walleij@linaro.org> 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 <shreshthakumar.sahu@stericsson.com>
> > Cc: Russell King <linux@arm.linux.org.uk>
> > Cc: stable <stable@vger.kernel.org>
> > Reported-by: Viresh Kumar <viresh.kumar@st.com>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> 
> 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 <grant.likely@secretlab.ca>

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH] serial: PL011: move interrupt clearing
@ 2012-03-29 21:33     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2012-03-29 21:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 29, 2012 at 02:49:37PM -0600, Grant Likely wrote:
> On Wed, Mar 21, 2012 at 1:15 PM, Linus Walleij <linus.walleij@linaro.org> 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 <shreshthakumar.sahu@stericsson.com>
> > Cc: Russell King <linux@arm.linux.org.uk>
> > Cc: stable <stable@vger.kernel.org>
> > Reported-by: Viresh Kumar <viresh.kumar@st.com>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> 
> 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 <grant.likely@secretlab.ca>

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] serial: PL011: move interrupt clearing
  2012-03-29 21:33     ` Greg Kroah-Hartman
@ 2012-04-03 15:36       ` Paul Gortmaker
  -1 siblings, 0 replies; 20+ messages in thread
From: Paul Gortmaker @ 2012-04-03 15:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Grant Likely, Linus Walleij, linux-serial, Russell King,
	Jong-Sung Kim, stable, Chanho Min, linux-arm-kernel,
	Shreshtha Kumar Sahu

On Thu, Mar 29, 2012 at 5:33 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Thu, Mar 29, 2012 at 02:49:37PM -0600, Grant Likely wrote:
>> On Wed, Mar 21, 2012 at 1:15 PM, Linus Walleij <linus.walleij@linaro.org> 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 <shreshthakumar.sahu@stericsson.com>
>> > Cc: Russell King <linux@arm.linux.org.uk>
>> > Cc: stable <stable@vger.kernel.org>
>> > Reported-by: Viresh Kumar <viresh.kumar@st.com>
>> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>>
>> 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 <grant.likely@secretlab.ca>
>
> 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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH] serial: PL011: move interrupt clearing
@ 2012-04-03 15:36       ` Paul Gortmaker
  0 siblings, 0 replies; 20+ messages in thread
From: Paul Gortmaker @ 2012-04-03 15:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Mar 29, 2012 at 5:33 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Thu, Mar 29, 2012 at 02:49:37PM -0600, Grant Likely wrote:
>> On Wed, Mar 21, 2012 at 1:15 PM, Linus Walleij <linus.walleij@linaro.org> 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 <shreshthakumar.sahu@stericsson.com>
>> > Cc: Russell King <linux@arm.linux.org.uk>
>> > Cc: stable <stable@vger.kernel.org>
>> > Reported-by: Viresh Kumar <viresh.kumar@st.com>
>> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>>
>> 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 <grant.likely@secretlab.ca>
>
> 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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] serial: PL011: move interrupt clearing
  2012-04-03 15:36       ` Paul Gortmaker
@ 2012-04-03 16:19         ` Greg Kroah-Hartman
  -1 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2012-04-03 16:19 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: Grant Likely, Linus Walleij, linux-serial, Russell King,
	Jong-Sung Kim, stable, Chanho Min, linux-arm-kernel,
	Shreshtha Kumar Sahu

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
> <gregkh@linuxfoundation.org> wrote:
> > On Thu, Mar 29, 2012 at 02:49:37PM -0600, Grant Likely wrote:
> >> On Wed, Mar 21, 2012 at 1:15 PM, Linus Walleij <linus.walleij@linaro.org> 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 <shreshthakumar.sahu@stericsson.com>
> >> > Cc: Russell King <linux@arm.linux.org.uk>
> >> > Cc: stable <stable@vger.kernel.org>
> >> > Reported-by: Viresh Kumar <viresh.kumar@st.com>
> >> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> >>
> >> 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 <grant.likely@secretlab.ca>
> >
> > 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
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH] serial: PL011: move interrupt clearing
@ 2012-04-03 16:19         ` Greg Kroah-Hartman
  0 siblings, 0 replies; 20+ messages in thread
From: Greg Kroah-Hartman @ 2012-04-03 16:19 UTC (permalink / raw)
  To: linux-arm-kernel

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
> <gregkh@linuxfoundation.org> wrote:
> > On Thu, Mar 29, 2012 at 02:49:37PM -0600, Grant Likely wrote:
> >> On Wed, Mar 21, 2012 at 1:15 PM, Linus Walleij <linus.walleij@linaro.org> 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 <shreshthakumar.sahu@stericsson.com>
> >> > Cc: Russell King <linux@arm.linux.org.uk>
> >> > Cc: stable <stable@vger.kernel.org>
> >> > Reported-by: Viresh Kumar <viresh.kumar@st.com>
> >> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> >>
> >> 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 <grant.likely@secretlab.ca>
> >
> > 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

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2012-04-03 16:19 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-21 19:15 [PATCH] serial: PL011: move interrupt clearing Linus Walleij
2012-03-21 19:15 ` Linus Walleij
2012-03-22  1:04 ` viresh kumar
2012-03-22  1:04   ` viresh kumar
2012-03-22  8:00   ` Linus Walleij
2012-03-22  8:00     ` Linus Walleij
2012-03-23  3:39     ` viresh kumar
2012-03-23  3:39       ` viresh kumar
2012-03-23  8:17       ` Linus Walleij
2012-03-23  8:17         ` Linus Walleij
2012-03-29 20:49 ` Grant Likely
2012-03-29 20:49   ` Grant Likely
2012-03-29 21:22   ` Linus Walleij
2012-03-29 21:22     ` Linus Walleij
2012-03-29 21:33   ` Greg Kroah-Hartman
2012-03-29 21:33     ` Greg Kroah-Hartman
2012-04-03 15:36     ` Paul Gortmaker
2012-04-03 15:36       ` Paul Gortmaker
2012-04-03 16:19       ` Greg Kroah-Hartman
2012-04-03 16:19         ` Greg Kroah-Hartman

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.