From patchwork Tue Oct 30 22:11:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 991138 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42l5Kr716Kz9sBj for ; Wed, 31 Oct 2018 09:12:00 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="lsehY/L8"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42l5Kr5WDqzDsGh for ; Wed, 31 Oct 2018 09:12:00 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="lsehY/L8"; dkim-atps=neutral X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=chromium.org (client-ip=2607:f8b0:4864:20::441; helo=mail-pf1-x441.google.com; envelope-from=dianders@chromium.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="lsehY/L8"; dkim-atps=neutral Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42l5Kb3nJfzF0Pd for ; Wed, 31 Oct 2018 09:11:47 +1100 (AEDT) Received: by mail-pf1-x441.google.com with SMTP id f78-v6so6564431pfe.1 for ; Tue, 30 Oct 2018 15:11:47 -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=94psJMyqz8IkfzVie06Fc1uYcJtaXinZcw3VnGuFFDk=; b=lsehY/L8EcTjAHcVmYw2kWgDuy0jhwcjzWfAnRWkA1CmkV/5uEz9tqmfB0zrJWi1DW vh3FZSEO5NcuNadT0CJX0Cm75uPCxo6Sr5VuKxcjrbY3v7GXEPEGlhAWiaT4ClOoneQp AFfyw0ZLvuSPYC/YzXRURJ377ViUey6Q3tyds= 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=94psJMyqz8IkfzVie06Fc1uYcJtaXinZcw3VnGuFFDk=; b=NtR9LnhwLvLLk/N6u9bQ6SBzMbs4/q/H6CYV14xOAMONiVy8ZZuwmZyfjrrWrpuQMx YFEgsec0CO3y1fcn5/GlqUHghtcPxARaDfbUnHCqM9vcO4FPrezrScnDUB8yZMNBetnf MGUYXeuecnRwJOUA7HOxkRru+x7manA/4r0AgyAhUt78jzjPfTm8+m40m4NSfvqwespW cUIdRRSmGMKDLR89gAXxNRUkBtNWMe1m7J7WZWo2SzJABD2HIq6krj2g760AwVaSleQ/ 65fsxI9Q6YeG7nPneOlt7WbVesZq14eVO2t2j+NuaqG7Y/tovCgzLhMVbx4EilcitZLM pK9A== X-Gm-Message-State: AGRZ1gJXdNqVxzAzAVGezJPW5SeYtxJEEbKfMCz3XJLEtnRaGWADJi4s HCJDe7Z4i3ccjZwj9KJTCH2LPQ== X-Google-Smtp-Source: AJdET5cgkvKnnP49uNC3FnivblVrxS6bINQFRUrAXaVXsY2Awh35LGm4zeqSp5GDOSBvVhqwYWyOzA== X-Received: by 2002:a63:a612:: with SMTP id t18-v6mr503544pge.338.1540937505696; Tue, 30 Oct 2018 15:11:45 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:c8e0:70d7:4be7:a36]) by smtp.gmail.com with ESMTPSA id b11-v6sm12844491pgi.10.2018.10.30.15.11.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Oct 2018 15:11:44 -0700 (PDT) From: Douglas Anderson To: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v2 3/5] serial: qcom_geni_serial: Process sysrq at port unlock time Date: Tue, 30 Oct 2018 15:11:05 -0700 Message-Id: <20181030221107.79758-4-dianders@chromium.org> X-Mailer: git-send-email 2.19.1.568.g152ad8e336-goog In-Reply-To: <20181030221107.79758-1-dianders@chromium.org> References: <20181030221107.79758-1-dianders@chromium.org> MIME-Version: 1.0 X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dan.carpenter@oracle.com, vigneshr@ti.com, linux-aspeed@lists.ozlabs.org, linux-arm-msm@vger.kernel.org, Douglas Anderson , tony@atomide.com, linux-serial@vger.kernel.org, andriy.shevchenko@linux.intel.com, linux-arm-kernel@lists.infradead.org, jk@ozlabs.org Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" 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 b83e3554bced..29ddc1fc65f8 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; }