From patchwork Fri Jun 7 15:39:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 166168 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp809396ili; Fri, 7 Jun 2019 08:55:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOLZRXzPXPV3JNdlx/KUXISR9U1BUFeF59/IbM6XeycmKHcknSS12/i7HAHbdh2hvNN2jx X-Received: by 2002:a17:902:8493:: with SMTP id c19mr57519437plo.58.1559922900325; Fri, 07 Jun 2019 08:55:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559922900; cv=none; d=google.com; s=arc-20160816; b=exPfsQtd+RiPEkGYeKDilRxHW2vK1MH77J2extjab9HfnMy3FphDsyC8NkIT89drmB bRmOjtvQoculDbDhxxFC1m6HwzhFYWwOU1GeYcg2zwWGK9mLedm2DMEorEtiq5V7QJ2Y RJ7QieBU7OWNLNVy+8zYI3U0ddMOcLvntq5HemwbkgwZZ+yXYk3FjZdDqUHdOfPc/gPI ahvFut9N5v9fWIFT89R5Xmml+BcXwMFLDPAppyz0aXymkb1T959NONzvgtPz3aQssiYr JPBoyqOeFR/qzm8cm1gThq2JKr8EsrsKQYDfrtNp+GSvN6i0GpL4aq3T4FbBQwJ5dTy2 vr1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fbliiaENZhdgQIe/6Oy4g6j9XVwKj2jrxFMN3TZ0zVY=; b=v0aA/FtRl83iFc5hBHGp1DG2CN5NtxvP3Dj5tPyGlt52YrZznkYnWLWDclPrGBvfP9 gdBfkt+j/7IZfyGl56gKjCXp7DXXIESP14xLmcv3XUzT/aFUXMh83zM2G2VPrQFrYwzP 28rQQnBG7dUtb0TxjJtVJ2XSZ5SHcXTgUYY4SmZ/OyzfQ6nTGE2AjfkUd0V80rbylanW FBY9YEX6EosQavtDJ8MBj0hR5x40Ds8SJcbjXDTNaEQqsgiSvjPlnk0cU2RmaqKlR5HI gGhp2OXeM6IYxbI6w8QTg/O9atXoiUYHcTCwn4mHHDfleQlPZ5Rl7ecyoDqLlo3m7JrP QwHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gk+LgiKR; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r129si2145124pgr.307.2019.06.07.08.55.00; Fri, 07 Jun 2019 08:55:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gk+LgiKR; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729293AbfFGPy7 (ORCPT + 14 others); Fri, 7 Jun 2019 11:54:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:58514 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731368AbfFGPqR (ORCPT ); Fri, 7 Jun 2019 11:46:17 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B733A2146E; Fri, 7 Jun 2019 15:46:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922377; bh=qsBYCJp0T9BTNFdojWwxp9gA8fp2Y3KEZMWRQhokJBQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gk+LgiKRNRt+iUv4U1aiyzYP65+AGh8BXx/id6KwS6t1okJdtgkgOx5oeUCSMT2wk 6MVHrvafVD1Kkr2s9ZhfjN+f2jzP8uisTOKMkW+5xX6Ji91VRxy1TsTqr+79JyzsX8 pbhg1SIck1qUocwzcwt4dhjTdcCyBJ0+HAWOT6Es= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jorge Ramirez-Ortiz , Bjorn Andersson , Stephen Boyd Subject: [PATCH 4.19 38/73] tty: serial: msm_serial: Fix XON/XOFF Date: Fri, 7 Jun 2019 17:39:25 +0200 Message-Id: <20190607153853.392889944@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607153848.669070800@linuxfoundation.org> References: <20190607153848.669070800@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jorge Ramirez-Ortiz commit 61c0e37950b88bad590056286c1d766b1f167f4e upstream. When the tty layer requests the uart to throttle, the current code executing in msm_serial will trigger "Bad mode in Error Handler" and generate an invalid stack frame in pstore before rebooting (that is if pstore is indeed configured: otherwise the user shall just notice a reboot with no further information dumped to the console). This patch replaces the PIO byte accessor with the word accessor already used in PIO mode. Fixes: 68252424a7c7 ("tty: serial: msm: Support big-endian CPUs") Cc: stable@vger.kernel.org Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/msm_serial.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/tty/serial/msm_serial.c +++ b/drivers/tty/serial/msm_serial.c @@ -860,6 +860,7 @@ static void msm_handle_tx(struct uart_po struct circ_buf *xmit = &msm_port->uart.state->xmit; struct msm_dma *dma = &msm_port->tx_dma; unsigned int pio_count, dma_count, dma_min; + char buf[4] = { 0 }; void __iomem *tf; int err = 0; @@ -869,10 +870,12 @@ static void msm_handle_tx(struct uart_po else tf = port->membase + UART_TF; + buf[0] = port->x_char; + if (msm_port->is_uartdm) msm_reset_dm_count(port, 1); - iowrite8_rep(tf, &port->x_char, 1); + iowrite32_rep(tf, buf, 1); port->icount.tx++; port->x_char = 0; return; From patchwork Fri Jun 7 15:39:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 166160 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp800283ili; Fri, 7 Jun 2019 08:47:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqygg0fWR9cNnQuG7242TZn3gyqZFR10x6zucKKmndD5VHqn9ev+HNIWbFFtNvQBQT3C6npr X-Received: by 2002:a63:ef0e:: with SMTP id u14mr3325817pgh.295.1559922423109; Fri, 07 Jun 2019 08:47:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559922423; cv=none; d=google.com; s=arc-20160816; b=irC48KY4K2QGttePNi0X1Kc9hgOIjI36pdy2LuWyPF3mZQm3eDjfF0otfbIPTMVxQn 1bZlZ9SSC/s3NycoeFZG9eyY5w5tNDiEv4is1kmhtNOqGKNzppuuHAzj85fFSuxVRsoY 8yJt+AGi2pZ/9J3IzatGJ3qI91TGy9jE6Mk0ofwPV6XJB5Uc1IsZ8vxcuJ9QlI49cNo2 VVrWpVknm25vJhEbOJ69BelD7F04PI0VV2sPhBefTjPD5WHTM/DH28bn4ycx9CJMN7va pS8K/F0U2hcms+qCv5DlZEXXuBljS0/Fz4zahM6aBxIEVhtHNLg5AMDv3ek8h8XqFW2z QCMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Dx+xx4M2UTtoUNae+utChSz46p8ENhfOC+gJr/9qCqM=; b=vIo7rrD0i69tiSTMQHQM4uEtOGXMNib0+RFwt2LgBe17no4rnYSKxoDJTvgx/O6SVy c16LNgxZoLudx9GEtTG0XXP4MXZiMTr/nd/h83GH4VG1v0TNOSlC+Fl0fHuKLyaRCBZh w4BYaGypmbnDD40Ve9b0JJNbF/MwTtdN5nbVqPSoxqCRbjaCghIxJYdczveD8/VS40ZC S/hJnDr+CQ+DhnGev/1nuu0/2PAuG5IRRKpGFBPb7vV++PdDUuWgvAWuzNqrQHkf/7v4 2JHoH99vzufI2LmKkJCtHgW5dBeTImQsTXR8dZV3nC4HQ+ep929zhSHbJk+PZA+afd+t eJVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FwQbpfVq; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q20si2087866pjp.24.2019.06.07.08.47.02; Fri, 07 Jun 2019 08:47:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FwQbpfVq; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731500AbfFGPrB (ORCPT + 14 others); Fri, 7 Jun 2019 11:47:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:59602 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731494AbfFGPrA (ORCPT ); Fri, 7 Jun 2019 11:47:00 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9C85421473; Fri, 7 Jun 2019 15:46:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922419; bh=W6EXKwO2WLwrLah4By7DIUZSSEhhHmOZCXmMzKqlDxo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FwQbpfVq7zSZS6ss8afD8PcXZ0pA+ZyTmxtX6rD4wE3BfjsdYHSFOdzoC+jorF9cF GcRF+x9geCTynMp8WLF+A3gZXrv3RaJyDp7J/xc/FjQmQa9bwVjC4zMAmtgn65//lC VAvF0/R8W85WPEwSEFBbBlJl2rUaV+Mqgg5sMBzQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Corbet Subject: [PATCH 4.19 44/73] doc: Cope with the deprecation of AutoReporter Date: Fri, 7 Jun 2019 17:39:31 +0200 Message-Id: <20190607153854.067859834@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607153848.669070800@linuxfoundation.org> References: <20190607153848.669070800@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Jonathan Corbet commit 2404dad1f67f8917e30fc22a85e0dbcc85b99955 upstream. AutoReporter is going away; recent versions of sphinx emit a warning like: Documentation/sphinx/kerneldoc.py:125: RemovedInSphinx20Warning: AutodocReporter is now deprecated. Use sphinx.util.docutils.switch_source_input() instead. Make the switch. But switch_source_input() only showed up in 1.7, so we have to do ugly version checks to keep things working in older versions. Cc: stable@vger.kernel.org Signed-off-by: Jonathan Corbet Signed-off-by: Greg Kroah-Hartman --- Documentation/sphinx/kerneldoc.py | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) --- a/Documentation/sphinx/kerneldoc.py +++ b/Documentation/sphinx/kerneldoc.py @@ -37,7 +37,17 @@ import glob from docutils import nodes, statemachine from docutils.statemachine import ViewList from docutils.parsers.rst import directives, Directive -from sphinx.ext.autodoc import AutodocReporter + +# +# AutodocReporter is only good up to Sphinx 1.7 +# +import sphinx + +Use_SSI = sphinx.__version__[:3] >= '1.7' +if Use_SSI: + from sphinx.util.docutils import switch_source_input +else: + from sphinx.ext.autodoc import AutodocReporter __version__ = '1.0' @@ -121,13 +131,7 @@ class KernelDocDirective(Directive): lineoffset += 1 node = nodes.section() - buf = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter - self.state.memo.reporter = AutodocReporter(result, self.state.memo.reporter) - self.state.memo.title_styles, self.state.memo.section_level = [], 0 - try: - self.state.nested_parse(result, 0, node, match_titles=1) - finally: - self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter = buf + self.do_parse(result, node) return node.children @@ -136,6 +140,20 @@ class KernelDocDirective(Directive): (" ".join(cmd), str(e))) return [nodes.error(None, nodes.paragraph(text = "kernel-doc missing"))] + def do_parse(self, result, node): + if Use_SSI: + with switch_source_input(self.state, result): + self.state.nested_parse(result, 0, node, match_titles=1) + else: + save = self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter + self.state.memo.reporter = AutodocReporter(result, self.state.memo.reporter) + self.state.memo.title_styles, self.state.memo.section_level = [], 0 + try: + self.state.nested_parse(result, 0, node, match_titles=1) + finally: + self.state.memo.title_styles, self.state.memo.section_level, self.state.memo.reporter = save + + def setup(app): app.add_config_value('kerneldoc_bin', None, 'env') app.add_config_value('kerneldoc_srctree', None, 'env')