Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp3713313imd; Mon, 29 Oct 2018 11:09:15 -0700 (PDT) X-Google-Smtp-Source: AJdET5dwE9CZe3+ylznW6AEA1ubiaKIvtsKVekS9OjNcPWugH/csK2Eeq/fdJJPD7HfFDCZfp66U X-Received: by 2002:a17:902:bd8d:: with SMTP id q13-v6mr15350886pls.167.1540836555380; Mon, 29 Oct 2018 11:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540836555; cv=none; d=google.com; s=arc-20160816; b=tW4aGd3b9Y4JGdivefmot3V3BzQKzDjn2KG0zt59ATme8dcoyHCI+/cyDq147h/tzs uSDw1OYgz471/XMqh/0rzXOlv9s/4zhuFnquCKenZXRHe78LkUeyWqVVWuRTJPgt2qBN 29ZHQ5QTy2GGHOcfx0TMONymeRMvCX4a1OvMo4OdBvaHqJFhpGKORtVNX+pbI12hga06 MPIbRhxrMLtOHE7QEorjXPXG8bPhIVHC7rsRipPZeSs84MprolXjZNWMPP9Zvkhqu1wS h7uxB55+VoLfb27rGEv4WaSrztPM7eAMUXgKRoot+VkEfPcE7wSfA/J1OnqY889Iq3MD hsPA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uuVBjLPPAr7vrrxtncgOpWRyj/co0fFGtiULUHSo5OQ=; b=tV6rBZutyTz0FgFH1A+bFug+gElerd5B4A8xIp87Xv6pxhJuFbiw5sZoQ+aRhh63bP 7DFOp9CsTypdCF4g4pUGVOkof709K56aDj7V+lTyWF3MzSuHds2BP0uCD9vXu6mH7Agw ABbDMdrHl8KWgaPYOim+YwKVSYsqBITy65r0duR20Y1hM/d3I+10rDEpXXRHmOMIt83x efbS/DBHej246FCqlltEICSrVeeAfupoOyM5+xMhpIOsIrn4oddF18XXIap1/4Pfsa6B 1BMsewCPlqqVETraEoL6w2goDzVbuHf6FZMs5CrbgAAHSiAO0XlPdNS0L7UYROtSRdSw 48SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="cdj/bG62"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h5-v6si1982194pfg.226.2018.10.29.11.08.59; Mon, 29 Oct 2018 11:09:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@chromium.org header.s=google header.b="cdj/bG62"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728408AbeJ3C6N (ORCPT + 99 others); Mon, 29 Oct 2018 22:58:13 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:40443 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728367AbeJ3C6L (ORCPT ); Mon, 29 Oct 2018 22:58:11 -0400 Received: by mail-pl1-f194.google.com with SMTP id b9-v6so4189266pls.7 for ; Mon, 29 Oct 2018 11:08:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uuVBjLPPAr7vrrxtncgOpWRyj/co0fFGtiULUHSo5OQ=; b=cdj/bG62aAL2KnWaVIAJOSrpnC9nsbsXjlggJ6B4TOaBaVxAQ6niOV4YmXCNLDD+aS o8RSp1GrDIo6cW0XokWZoyRkvyuge1ANtIF5d2SmghbRacfD9khbep4aBt284a/DhMGX wwpy3XRtX76rgm6BpD/CSNA4U/BAad+cmtoRA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uuVBjLPPAr7vrrxtncgOpWRyj/co0fFGtiULUHSo5OQ=; b=cgBNOor+c434fAVnnftvrXUwe8amJWxkhe7fFoAsl7msu/xcvn8bNuveCMbjEsZ985 cPZDY7NjiWwo3w7L+sPLUgRPZs8hRJro9pmlco5xGhQCVPM1tqHbAPslbxW7GuabJhEB kD0FQ71AYV9Xi+iwYyfUm0zFyAi8KKir571WmzmMs6jvk32eHDb/9LegE4/hX+7U0bn4 oA55Cmcv3j2ni3MvJfE1hrmtFgAh35rep698na7HqppcRF7HXD0tuQrG3Vynh8fFnl9s Oxyn408ipitjsWMHn39aD2zkxEBajF8M8ghEZoVVeHCsjCb3f6PQ1AmgouMu1u51dKBx 3NOw== X-Gm-Message-State: AGRZ1gLdNTMepPvhxil/uAXLtc9CVgJ+zH/gaCdDqHrdqnbpVY3dPIe7 MWRSO4chAInPwNVxcuPVV9ddDA== X-Received: by 2002:a17:902:1124:: with SMTP id d33-v6mr6564607pla.125.1540836508342; Mon, 29 Oct 2018 11:08:28 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:c8e0:70d7:4be7:a36]) by smtp.gmail.com with ESMTPSA id u13-v6sm20537765pgp.18.2018.10.29.11.08.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Oct 2018 11:08:26 -0700 (PDT) From: Douglas Anderson To: Jason Wessel , Daniel Thompson , tglx@linutronix.de, mingo@kernel.org, gregkh@linuxfoundation.org Cc: linux-arm-msm@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net, Douglas Anderson , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, jslaby@suse.com Subject: [PATCH 3/7] serial: qcom_geni_serial: Process sysrq at port unlock time Date: Mon, 29 Oct 2018 11:07:03 -0700 Message-Id: <20181029180707.207546-4-dianders@chromium.org> X-Mailer: git-send-email 2.19.1.568.g152ad8e336-goog In-Reply-To: <20181029180707.207546-1-dianders@chromium.org> References: <20181029180707.207546-1-dianders@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Let's take advantage of the new ("serial: core: Allow processing sysrq at port unlock time") to handle sysrqs more cleanly. Signed-off-by: Douglas Anderson --- drivers/tty/serial/qcom_geni_serial.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index 3c8e0202da8b..20edce1e222e 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -499,9 +499,7 @@ static int handle_rx_console(struct uart_port *uport, u32 bytes, bool drop) continue; } - spin_unlock(&uport->lock); - sysrq = uart_handle_sysrq_char(uport, buf[c]); - spin_lock(&uport->lock); + sysrq = uart_prepare_sysrq_char(uport, buf[c]); if (!sysrq) tty_insert_flip_char(tport, buf[c], TTY_NORMAL); @@ -811,7 +809,8 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev) qcom_geni_serial_handle_rx(uport, drop_rx); out_unlock: - spin_unlock_irqrestore(&uport->lock, flags); + uart_unlock_and_check_sysrq(uport, flags); + return IRQ_HANDLED; } -- 2.19.1.568.g152ad8e336-goog