All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Xuan Truong Nguyen <nx-truong@jinso.co.jp>
Cc: "Wolfram Sang" <wsa@sang-engineering.com>,
	duclm <lm-duc@jinso.co.jp>,
	"Ryusuke Sakato" <ryusuke.sakato.bx@renesas.com>,
	"Kuninori Morimoto" <kuninori.morimoto.gx@renesas.com>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"hideo inayoshi" <h-inayoshi@jinso.co.jp>,
	Dung:人ソ <nv-dung@jinso.co.jp>,
	"Cao Minh Hiep" <cm-hiep@jinso.co.jp>,
	"Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>,
	"Simon Horman" <horms+renesas@verge.net.au>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Subject: RE: The failure summary report of GEN2 for linux stable v4.8
Date: Fri, 28 Oct 2016 08:14:19 +0000	[thread overview]
Message-ID: <SIXPR06MB0559BA3B149F002AE534F8C5D8AD0@SIXPR06MB0559.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <CAMuHMdU1-+AqnQpQPrsSxD0tQpjaeEPxiawULTJaUFsGO2Kc1A@mail.gmail.com>

Hi Geert-san, Xuan-san,

> From: linux-renesas-soc-owner@vger.kernel.org [mailto:linux-renesas-soc-owner@vger.kernel.org] On Behalf Of Geert
> Uytterhoeven
> Sent: Monday, October 24, 2016 6:21 PM
> 
> On Mon, Oct 24, 2016 at 11:13 AM, Xuan Truong Nguyen
> <nx-truong@jinso.co.jp> wrote:
> >> This is with shmobile_defconfig?
> >
> > yes. we also attach the configs file we used
> > (lager-scif-pio-v4.9-rc2.config)
> >
> >> Does it work better if you enable CONFIG_SERIAL_SH_SCI_DMA?
> >
> > yes, it's better a little bit. the kernel does not hangs up, but the warning
> > message is output.
> > please refer lager-scif-dma.log.
> >
> > we tested on v4.9-rc2. the issue is the same.
> >
> > if you need any information, please let us know.
> 
> > WARNING: CPU: 0 PID: 2249 at drivers/dma/sh/rcar-dmac.c:1257 rcar_dmac_tx_status+0x128/0x4
> > No descriptor for cookie!
> 
> > [<c03419e8>] (rcar_dmac_tx_status) from [<c0371e04>] (rx_timer_fn+0x48/0x148)
> 
> > [<c0371dbc>] (rx_timer_fn) from [<c016dedc>] (call_timer_fn+0x2c/0xa0)
> 
> That looks like a race condition between timeout handling and actual completion
> of the DMA?

I found an issue in sh-sci.c and made a patch to resolve it.
But, I'm not sure this is correct way.
If this is correct way, we also have to fix dev_dbg() in some functions.

Best regards,
Yoshihiro Shimoda

Since I send this email using Outlook, the patch format may be not good.
---
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: Fri, 28 Oct 2016 16:52:36 +0900
Subject: [PATCH] serial: sh-sci: remove dev_warn() to avoid double spin lock
 held

If we use serial console and CONFIG_SERIAL_SH_SCI_DMA=y, since
sci_dma_rx_push() is called with port->lock held and dev_warn() will
call serial_console_write() finally, this is possible to call
spin_lock{_irqsave}() twice.
To avoid this, this patch remove dev_warn() in sci_dma_rx_push().

Reported-by: Xuan Truong Nguyen <nx-truong@jinso.co.jp>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 drivers/tty/serial/sh-sci.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 4b26252..380b5d7 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1142,11 +1142,8 @@ static int sci_dma_rx_push(struct sci_port *s, void *buf, size_t count)
 	int copied;
 
 	copied = tty_insert_flip_string(tport, buf, count);
-	if (copied < count) {
-		dev_warn(port->dev, "Rx overrun: dropping %zu bytes\n",
-			 count - copied);
+	if (copied < count)
 		port->icount.buf_overrun++;
-	}
 
 	port->icount.rx += copied;
 
-- 
1.9.1

  parent reply	other threads:[~2016-10-28  8:14 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <57A46D20.7040106@jinso.co.jp>
     [not found] ` <57C9764F.2070802@jinso.co.jp>
     [not found]   ` <f2bb791e-8973-10a9-a2ac-1a944b38d4ad@jinso.co.jp>
2016-09-12  8:57     ` GEN2: Initialization of VSP1 failed at upstream v4.8-rc2 Hiep Cao Minh
2016-09-12  9:06       ` Geert Uytterhoeven
2016-09-12  9:25         ` Hiep Cao Minh
2016-09-12 10:31         ` Laurent Pinchart
     [not found]         ` <57ECF4EA.4010704@jinso.co.jp>
2016-09-29 13:40           ` GEN2:Lager: Only 1 core works when turning off the SW8-PIN4 Geert Uytterhoeven
2016-09-30  9:55             ` Hiep Cao Minh
2016-09-30  9:58               ` Geert Uytterhoeven
2016-09-30 10:05                 ` Hiep Cao Minh
2016-11-07  9:44                   ` Geert Uytterhoeven
2016-11-07 10:37                     ` Hiep Cao Minh
2016-11-07 12:19                       ` Geert Uytterhoeven
2016-09-12  9:33       ` GEN2: Initialization of VIN failed at upstream v4.8-rc2 Hiep Cao Minh
2016-09-12 11:09         ` Niklas Söderlund
2016-09-13  5:12           ` Hiep Cao Minh
     [not found]     ` <9d9a647b-d75f-e89a-2d4d-55e409ccabae@jinso.co.jp>
2016-10-18 13:17       ` The failure summary report of GEN2 for linux stable v4.8 Wolfram Sang
     [not found]         ` <b7e9b4c2-1d5d-2e76-c0f4-fcc50150dc30@jinso.co.jp>
2016-10-24  7:00           ` Geert Uytterhoeven
     [not found]             ` <125b4831-cbdf-f8e1-da97-8ea9cf458c22@jinso.co.jp>
2016-10-24  9:21               ` Geert Uytterhoeven
2016-10-25  2:07                 ` Xuan Truong Nguyen
2016-10-28  8:14                 ` Yoshihiro Shimoda [this message]
2016-10-28 10:29                   ` Xuan Truong Nguyen
2016-11-07  0:30                   ` Xuan Truong Nguyen
2016-10-18 14:13       ` Laurent Pinchart
2016-10-18 15:55         ` Laurent Pinchart
2016-10-19  2:39         ` Xuan Truong Nguyen
     [not found]         ` <a101cec4-c9ee-48fa-4f16-5e4cb2b8fab7@jinso.co.jp>
2016-10-21 11:20           ` Laurent Pinchart
2016-10-24  5:51             ` Xuan Truong Nguyen
2016-11-11  1:31             ` Laurent Pinchart
2016-11-11  2:44               ` Xuan Truong Nguyen
     [not found]       ` <58060015.3020702@jinso.co.jp>
2016-10-19  0:40         ` The failure summary report of GEN3(RCAR H3) " Kuninori Morimoto
2016-10-19  2:45           ` Xuan Truong Nguyen
     [not found]         ` <b4efb8cc-bf55-cf34-a537-4ffa5041291a@jinso.co.jp>
2016-10-31 13:16           ` The failure summary report of GEN3(RCAR H3) for linux upstream v4.9-rc2 Geert Uytterhoeven
2016-11-02  1:29             ` duclm
2016-11-02  7:46               ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SIXPR06MB0559BA3B149F002AE534F8C5D8AD0@SIXPR06MB0559.apcprd06.prod.outlook.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=cm-hiep@jinso.co.jp \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=h-inayoshi@jinso.co.jp \
    --cc=horms+renesas@verge.net.au \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=lm-duc@jinso.co.jp \
    --cc=magnus.damm@gmail.com \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=nv-dung@jinso.co.jp \
    --cc=nx-truong@jinso.co.jp \
    --cc=ryusuke.sakato.bx@renesas.com \
    --cc=wsa@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.