Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2806388ybt; Mon, 22 Jun 2020 07:30:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBgrASZSSwy9LSk8znSyVGXS5kWM6uIwyB/+Dko+oD2UrpPhWphBb57F1e74nxhIfU8c60 X-Received: by 2002:a50:c44b:: with SMTP id w11mr17978507edf.317.1592836241087; Mon, 22 Jun 2020 07:30:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592836241; cv=none; d=google.com; s=arc-20160816; b=x9nO8ajNyRlqAZtVeN7XzvoaFFWN/Bf+hVAsw3YwyuCZpXW8/TPLe/y/Uo5n/dPmKX zEBehiamrmL/A+zkYcEC3sWJJTIEFmnlOLjspUj6CoIVIdqHKG3djYpG0BPwdC4hmCqH 3Vy1WvDOMKzr0R0Mw5O1JgVZTTwPJfOige+naQPTd9kYNU5ZWQb+sMl7f7C/2S7CTXiT IKxlVRRSAjohVsK2nVPkbyqJUp9AgXuQvnFTLZCtlrQxL5ZApcFkXDzcSNvw/YQnnNrI SyheUjkBPSJ6rZ+u2SHwXqU664F5bfmb9cGV+yLdR/IczWsOgs9+3MQbGe67Mxgs/gBX Bv6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=Q8XZGlRV/H7ipjUMwZ0R6upcC6zi/GhiQnizl6ayNWQ=; b=T0qXzpq2ddqjxLsygIjkg5JZRXVV8jQaPzJQJzUOBlT+vPZ0yKVkJublty201W4pZ/ rOjEVMfaZsAEnmD3erHBFoaZXjSghhoNswsECvU0xorQnaVkw777tS/8Uu8iSAX+qByG UY/0uWY3i4Vdc+iT0xhO04wM3RKDZ92gm+rbaoMMbHgB/1INNkAY2SlZwOEs+ZizZGA/ Xw1GkYA1w3QTau85gN34Vk7mokCnG2ydMcHggfqCGNOsguL3WWMNL5MgD3hI/IPKb7fd ULAzb2aeE3k8c/ZQVSECewzyCaon20AX/zflMtFOM4rmiuY93XZjDVtkncypkaWUmVWX eWEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iES2Z3LS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s5si1673196ejx.28.2020.06.22.07.30.18; Mon, 22 Jun 2020 07:30:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iES2Z3LS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729806AbgFVO1s (ORCPT + 99 others); Mon, 22 Jun 2020 10:27:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729386AbgFVO1q (ORCPT ); Mon, 22 Jun 2020 10:27:46 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF836C061795 for ; Mon, 22 Jun 2020 07:27:45 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id h95so8701597pje.4 for ; Mon, 22 Jun 2020 07:27:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Q8XZGlRV/H7ipjUMwZ0R6upcC6zi/GhiQnizl6ayNWQ=; b=iES2Z3LS/+1ufp5YulU7Lewvw1bchggk2aWycD2ouwUfDqw/J2BDmhkYLoA5Q8Xi1/ czE87Id/eTsr/WIJUHU8BJT+s05ule9+LYv0Ido5T4GknU8qZXkBGUNrJUw9Yoc9s4/b GbKx6DlF9lfyzRTu+u41x/JFhfpsQDL13xVlQtBdo9b5QcM3gFxunzDEApVgBt2ZCiMC fe4kGGgabD666+6T0pGDqHa2rTr0hbLHGBP9dQ91Z9MHTbd+skiPXa44ljD14bUyQwDe IqyvhXNM6ncGGDSSPex+2Zmrr3VIqDY+mSqst1UwK3XIJ5tQNVugk+49gE/f2ylISQlv Zfzw== 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; bh=Q8XZGlRV/H7ipjUMwZ0R6upcC6zi/GhiQnizl6ayNWQ=; b=Hoglf9/ClrSysS9pMaiq6ESQECp9rMCdrxYp6RrRkc6Kgcn2HCyHo9IT5NSU5q4lXq RGI/ORGlPv28gFUZ5ywEOSrVIHFE58y/+KiWZoHaqNN3q52Cf/n1ifOXV6LdJ5xTI+kr tUX8qg+E1n89+VXgXJgXZoqt9YoBhypcIlFQ8dbufG8Ap5u++li05XtryxYkIAzYQhbI s2tlGXroY3LBXW2/GgJrnKcfBbVgwnSlUIPU1TL3ErAqnWooEM6cKyl3rluBzn0wXvSU pSEe3d8F1/cvtXlYqxUeT9l+t4XKIDYQRrKHAesXcfz89PVfyGKaiQa/NJj6ErKBZTt9 s/EQ== X-Gm-Message-State: AOAM531vt5KVNVe5jiXovpNCg7e1uRwVDJsH/nbitJOd7tSj+L801J7c K3Szg5yoLSh9oi20K83R4tdIXQ== X-Received: by 2002:a17:90a:36cf:: with SMTP id t73mr19089365pjb.100.1592836065367; Mon, 22 Jun 2020 07:27:45 -0700 (PDT) Received: from localhost.localdomain ([117.252.67.186]) by smtp.gmail.com with ESMTPSA id d6sm14547939pjh.5.2020.06.22.07.27.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2020 07:27:44 -0700 (PDT) From: Sumit Garg To: kgdb-bugreport@lists.sourceforge.net, linux-serial@vger.kernel.org Cc: gregkh@linuxfoundation.org, daniel.thompson@linaro.org, jason.wessel@windriver.com, dianders@chromium.org, jslaby@suse.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, Sumit Garg Subject: [PATCH 5/7] serial: 8250: Implement poll_get_irq() interface Date: Mon, 22 Jun 2020 19:56:22 +0530 Message-Id: <1592835984-28613-6-git-send-email-sumit.garg@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1592835984-28613-1-git-send-email-sumit.garg@linaro.org> References: <1592835984-28613-1-git-send-email-sumit.garg@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Daniel Thompson Support kgdb NMI console feature via implementing poll_get_irq() interface. This will allow usage of RX interrupts to support kgdb entry while serial device is operating in polling mode. Signed-off-by: Daniel Thompson Signed-off-by: Sumit Garg --- drivers/tty/serial/8250/8250_port.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index f77bf82..1473b1a 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -2138,6 +2138,21 @@ static void serial8250_put_poll_char(struct uart_port *port, serial8250_rpm_put(up); } +static int serial8250_get_poll_irq(struct uart_port *port) +{ + unsigned int ier; + struct uart_8250_port *up = up_to_u8250p(port); + + serial8250_rpm_get(up); + + ier = serial_port_in(port, UART_IER); + ier |= UART_IER_RLSI | UART_IER_RDI; + serial_port_out(port, UART_IER, ier); + + serial8250_rpm_put(up); + return port->irq; +} + #endif /* CONFIG_CONSOLE_POLL */ int serial8250_do_startup(struct uart_port *port) @@ -3141,6 +3156,7 @@ static const struct uart_ops serial8250_pops = { #ifdef CONFIG_CONSOLE_POLL .poll_get_char = serial8250_get_poll_char, .poll_put_char = serial8250_put_poll_char, + .poll_get_irq = serial8250_get_poll_irq, #endif }; -- 2.7.4