From patchwork Fri Dec 13 00:06:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 11289561 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 609E8139A for ; Fri, 13 Dec 2019 00:07:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3EA262464B for ; Fri, 13 Dec 2019 00:07:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sc7H7xBI"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="dgyveXe+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3EA262464B Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=arista.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gjh/62o+lWlQ9i2g+QtsaIZzo/KHPx8QDuYDsPKY5Lo=; b=sc7H7xBInnxKBN FyquP9SPhfXl6MUWmQzRjWeP6h7QLwQW5xASeZQdPP4aRvqvcu10A9TX2viBk38Fb83PBzW+6HrLE cjqkAGTuwbbDnhro2D/PaCi6qLOjS7q83R3L4Aja42nGz3fV6sb8T1Lod9rLaZFsil2ksYE9XiBfF mDRUr09bxCcfV2qvXv0jcwrWKLdAuN/CQqlufCMBohs2pqkH+cEcS1JNQAtbxJ8FxMlPCjepgX2z+ lkx2moBRawDCVbfJyMahoFHmOssaLC+0Senup/kG0Nuqr5yr3wgLPZ08gMrBZJP4Pl4anX/yq6zov wnP8DwEclrWDlcthvC3g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYUT-0003q1-It; Fri, 13 Dec 2019 00:07:29 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYUQ-0003gp-M4 for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 00:07:28 +0000 Received: by mail-pj1-x1041.google.com with SMTP id o11so333609pjp.9 for ; Thu, 12 Dec 2019 16:07:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6mNnjO8v1tpl9yqVUOmaWfH9cLoEm7aFdIH5BtFh2r4=; b=dgyveXe++pvbZzQRfBmAF/BV57WQgKW8tFS6uvjxmvo976OQWCi2hyt+Xte32scieT fDYObp4UGB+chOn+KLJ0V3caJWWZMV+4OUuk9iELuQHxkso4dEwadxwKIK27SZOY7JEv rOIDZhb3i4lGeATobG9gOF0HbRsMf67n1t0XAnXWUyKmK9dni9LrbMJUrTfBe/Pa8HAT qr9EeeafSMpWp11LvOPlgnBKi5xlBn19dQ/Y8qRyf6rxUZfQzjrPeKf5g13cbNqB6Y57 5VxBUNfl4MMdR/wZwE7VQLsab5VacSajatAHncx5Cx9LWx+yROBw3gs8rN8bUc1xMmwz Zuqg== 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=6mNnjO8v1tpl9yqVUOmaWfH9cLoEm7aFdIH5BtFh2r4=; b=PeOIYi7ZRmWpjuv/T+LkORSLqIx+r9TjriAlLohPuexRhLSko90Ga6wOA8LedGgBT7 I+nfFomVoNLzXGLL+Vznd0fhPExIv8wPcUahKSRidUPPxqHBy/HRIt9Nt7MC6+D+HRXA ZvTyRCL2tjWc9/NA8aHn+z+31JiEqJEoiyBcZ5l9u9ErKlodtAdjiXNvsThRhoG38IHf kJOju0ugZrD/anP1o5ImE7sfYmAy4O36NWD1CyO1I78vtcuCCB00qbh2sPTisT8jzeQZ u6IR17oOwqixymJtbd8zeP45SR+rf89IGB4WXFGCPUGCsNscdtExXW1Shcb5K/cEecN7 Jtyg== X-Gm-Message-State: APjAAAWPs6F65lwPMSRDMX0FyXvtNn2r5DifAz1r5Gg6QjBrt6qfQvWA I98w+wP8qcwwZ1nZ/mTtPK9ONw== X-Google-Smtp-Source: APXvYqy/yq33aCSkTVokTTb3YtsIWtq/9olFkGeixr9RtIQxE27PiPzHCSj/k0+5f3lTD5yC44fofw== X-Received: by 2002:a17:90a:b010:: with SMTP id x16mr13564458pjq.130.1576195646097; Thu, 12 Dec 2019 16:07:26 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id j38sm8317647pgj.27.2019.12.12.16.07.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 16:07:25 -0800 (PST) From: Dmitry Safonov To: linux-kernel@vger.kernel.org Subject: [PATCH 04/58] tty/serial: Migrate aspeed_vuart to use has_sysrq Date: Fri, 13 Dec 2019 00:06:03 +0000 Message-Id: <20191213000657.931618-5-dima@arista.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191213000657.931618-1-dima@arista.com> References: <20191213000657.931618-1-dima@arista.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191212_160726_721050_8B44CAE2 X-CRM114-Status: GOOD ( 11.39 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vasiliy Khoruzhick , linux-aspeed@lists.ozlabs.org, Dmitry Safonov , Andrew Jeffery , Greg Kroah-Hartman , Dmitry Safonov <0x7f454c46@gmail.com>, Joel Stanley , linux-serial@vger.kernel.org, Jiri Slaby , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Andrew Jeffery Cc: Joel Stanley Cc: linux-arm-kernel@lists.infradead.org Cc: linux-aspeed@lists.ozlabs.org Signed-off-by: Dmitry Safonov Acked-by: Andrew Jeffery --- drivers/tty/serial/8250/8250_aspeed_vuart.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/8250/8250_aspeed_vuart.c b/drivers/tty/serial/8250/8250_aspeed_vuart.c index 6e67fd89445a..d657aa14c3e4 100644 --- a/drivers/tty/serial/8250/8250_aspeed_vuart.c +++ b/drivers/tty/serial/8250/8250_aspeed_vuart.c @@ -5,10 +5,6 @@ * Copyright (C) 2016 Jeremy Kerr , IBM Corp. * Copyright (C) 2006 Arnd Bergmann , IBM Corp. */ -#if defined(CONFIG_SERIAL_8250_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -#define SUPPORT_SYSRQ -#endif - #include #include #include @@ -406,6 +402,7 @@ static int aspeed_vuart_probe(struct platform_device *pdev) port.port.unthrottle = aspeed_vuart_unthrottle; port.port.status = UPSTAT_SYNC_FIFO; port.port.dev = &pdev->dev; + port.port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_8250_CONSOLE); rc = sysfs_create_group(&vuart->dev->kobj, &aspeed_vuart_attr_group); if (rc < 0) From patchwork Fri Dec 13 00:06:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 11289563 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7DE42139A for ; Fri, 13 Dec 2019 00:07:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 58C33206E2 for ; Fri, 13 Dec 2019 00:07:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NCE03TCE"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="kOAr/bES" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 58C33206E2 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=arista.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Gl9CmkpKHOLfjiXZQ6o9mCU9mrPLx6ONtnWAYCI+3qQ=; b=NCE03TCETYn0Od JduAL4h9knGx0n6U6XJ4KAqmAcyBFCUQG5bbUTFsFSlnm5+Vjr2+z2dLxHEBJCJ302PDLKL8Cnz3q jet1NCwwKVP9RS4m+6tzfvuE9I9HBADmngrYy6eRiaADJVLGRsYn+G7SjKr6T0vF9pi24cLyfoMbP P0i8romntZaxXzxzJeSTf3EcCg6FnT13jHzxTrQ4Rc7trqAPOA8/o2TZzD+HUtJ2eOr8hS1aXflYV MwJ6yiAJKIq50UXKffkMacdCL5hnL0aeQWqF+93EQ6bevMSGXRk01deptoOg1/3rKwOa+vPTumxpf 9+cW7w/BrfTP7zkHiQqw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYUb-0003yP-Bk; Fri, 13 Dec 2019 00:07:37 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYUW-0003tk-Tu for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 00:07:34 +0000 Received: by mail-pf1-x441.google.com with SMTP id y14so366327pfm.13 for ; Thu, 12 Dec 2019 16:07:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LfbwjaEyczfW16aq2QbabEEFZwH6hIDwc8GGJT+n3VM=; b=kOAr/bESfHMzyhYULKoN7VTqNnOTJpMU0mgk421XezJV5Q1gVDfIowuDsypTlEeG+4 Wv3ZxkAmjMRDkhkz30epuMui2pMMycipsnvSCcLAfWGgUChLIeG/qDfWA9Q5c9HHwy3u XAlGyFETvlNhDdukDWBLxJ3ostWQiTIcZ3rZtZZPz94kuRfPi5qohj+AZPRrHu4PG7dM o+S3j4QcHD9ZfqK/MTsu7PgJDr1N/S9YMcvdGzdFkIYDj2yaiJG8g4VE08ogTZnSEJPQ 9Vys6Ais6lUp/4Io5DC91M9R6TqEdsKDjuzM6Qi7g6M3B8HlP6w/+TdGlLnfzkSYyT8z TSxQ== 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=LfbwjaEyczfW16aq2QbabEEFZwH6hIDwc8GGJT+n3VM=; b=O1522nONIrM6DUH0RIbvg2dcQdzPS5nIBJctpGsO035PQ1reQwCoPNVVQjwjqgHnMa bCdU9KZE4z4ndgwwP+vGHpUXJ/2ptoNc6ekSDiEO9qGJ95ixm0h393VzFjV0YCwSmyDl RsWyiZJMVevpByCQ8x4TSjQbiyX8oHZVhuVDNGOwF3YHhz/efPP7byAGMe0/GUBKk6Dn EjFR08aJRR6AkMNhfXxqi2MUakRkrQOkpS6mpxIL2DXGB9MwYZG4LMgvRCQ5qR6m/57F mHNMcZuif1LlLJOkPwKzj0Zd47SNdqSTxIBzU13Gwa/CX21hMMO8S0G/lgPIRUtnkSGr MFlQ== X-Gm-Message-State: APjAAAW0a3AwV9/ndX8a6JthRItozhDekH+J1sTpJF4vetmFkXQj43Ct m65cZKhS/HYxbJXZ8SFqWCflnQ== X-Google-Smtp-Source: APXvYqx9E42sVqpByu4dIZemxH7OmhQpFJLjLb3D8cu5jSrISXChsfZ8EkNjZPIX76mtZROIdvfiIQ== X-Received: by 2002:a62:b60c:: with SMTP id j12mr13118959pff.8.1576195652339; Thu, 12 Dec 2019 16:07:32 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id j38sm8317647pgj.27.2019.12.12.16.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 16:07:31 -0800 (PST) From: Dmitry Safonov To: linux-kernel@vger.kernel.org Subject: [PATCH 06/58] tty/serial: Migrate bcm63xx_uart to use has_sysrq Date: Fri, 13 Dec 2019 00:06:05 +0000 Message-Id: <20191213000657.931618-7-dima@arista.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191213000657.931618-1-dima@arista.com> References: <20191213000657.931618-1-dima@arista.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191212_160733_017252_DFC4A690 X-CRM114-Status: GOOD ( 11.49 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:441 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vasiliy Khoruzhick , Dmitry Safonov , Greg Kroah-Hartman , Dmitry Safonov <0x7f454c46@gmail.com>, Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, linux-serial@vger.kernel.org, Jiri Slaby , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov --- drivers/tty/serial/bcm63xx_uart.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/bcm63xx_uart.c b/drivers/tty/serial/bcm63xx_uart.c index b7adc6127b3d..5674da2b76f0 100644 --- a/drivers/tty/serial/bcm63xx_uart.c +++ b/drivers/tty/serial/bcm63xx_uart.c @@ -10,10 +10,6 @@ * my board. */ -#if defined(CONFIG_SERIAL_BCM63XX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -#define SUPPORT_SYSRQ -#endif - #include #include #include @@ -858,6 +854,7 @@ static int bcm_uart_probe(struct platform_device *pdev) port->fifosize = 16; port->uartclk = clk_get_rate(clk) / 2; port->line = pdev->id; + port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_BCM63XX_CONSOLE); clk_put(clk); ret = uart_add_one_port(&bcm_uart_driver, port); From patchwork Fri Dec 13 00:06:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 11289565 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C6BA1139A for ; Fri, 13 Dec 2019 00:07:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A0448206E2 for ; Fri, 13 Dec 2019 00:07:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Gk2XJXFp"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="lf4Aej6+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0448206E2 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=arista.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Fc0qh/Z+gefaT1zb2nmS34lUeHZJqzyjClimq1z6IrA=; b=Gk2XJXFp7io5gL 9hh0wB2YS2LaGg0YWenQ4JTHO2ahA32km0Zg2+/uJXNSitjd1pF5VBOogMW+W92tXCayF88IGtGIo T0sIHkeA1GPP1DwzKgwsWXFpCLyWHzsn1Pv1AXLioymhYnWjzjA/0Bq/Ehe6yA0l/VWNIoNi6SHvs Y2d3RCwJMSImxXSkWmRIXrsHHO80YRc/ja/xcx6bdmbFD+54AE78jwcGiOmbmgfTF2c991MnnclHI 9t7hMVe6mvKGjZpjk5wrG46B/JYyueLVwAukZN5TLmYyT3I84XrTl5jCJnSUeGjcuXccVMuA9SDrF TEPfWuIGTVw0Tzure1gw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYUt-0004GG-EI; Fri, 13 Dec 2019 00:07:55 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYUo-0004CT-4m for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 00:07:51 +0000 Received: by mail-pj1-x1043.google.com with SMTP id g4so333636pjs.10 for ; Thu, 12 Dec 2019 16:07:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=90upK2rNWVbhL85i5hQP/jGsi5V6IZt+HmB20otgQwk=; b=lf4Aej6+VViJsx13yqwSVC5yLuItQAkGF92kCEBpdJP6ImeRMq3ECDiOksOWoINZTA oXBjj7bPK/FrXCa8PpEr+lbBwkNxflEOyl/Qdp5HwPcikT0eEjT2XFbAJ/zdWAu+mkx9 +l81TS3tdF/8QpB9Dp5fqaogRTafmNji+4KxzXMRGtkJBgXQ5eeN4brRbT85x8s9XSFw m0Uq/V9lFhwua+8W6eAPzclzuUxH9QXcc+w1hZAEFwN3c/3VlFx9fA3cZLQw53ZSzFVt f1iTldQs/7jJY4Kd/L9VuW8f2V8dpFkPJPHK3Ksf1z8h6ykCTQFc//+jWZHKyHmGJe/l zIAQ== 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=90upK2rNWVbhL85i5hQP/jGsi5V6IZt+HmB20otgQwk=; b=nILtXuoFvY4glQMRdf7OK7I76gnoZC9YhjBMBNnIszWHFhF29Tv+qTs4tkmvb5zavI A5wqZMEmU2sB7wK662lGWTBqoWTScFZQVIVova9lAnFewVpdFPOFfQVISE/WUxls44j6 b52t85gy6LedGfFslvVpRgLz5JHN4TLMY+OY45Z7NLctFXwQAE4RjksdMeNo6CN6RdzV OmteKQtiqjZ6KxcaW/39kqqqEcPuF6Yv18Rq8uZ7ur9ue4gs3GI7K5S9hLzaLPm9hAeh Meid3nLpVLQ0VWKAvTqqG+TM9vbe8a3nrnTRGSvOYzjRSqKmnj4mVes2iCBkHihUT3Yz 6Y+A== X-Gm-Message-State: APjAAAWCotgTYaQHrfeNl7LkqPwDNZNrSkLBClLRmtibdwAg95e2LWiE MuC9c9t8KxnzWMk+TUUb+QzA8A== X-Google-Smtp-Source: APXvYqyok9Kicleir7Xd8YV5SWVEkQodaxMdZkamceeJ64Z0/AdH1eoy7toZYsJlUIwn6MPBrJuoPA== X-Received: by 2002:a17:90a:1b6b:: with SMTP id q98mr13390438pjq.106.1576195669296; Thu, 12 Dec 2019 16:07:49 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id j38sm8317647pgj.27.2019.12.12.16.07.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 16:07:48 -0800 (PST) From: Dmitry Safonov To: linux-kernel@vger.kernel.org Subject: [PATCH 12/58] tty/serial: Migrate atmel_serial to use has_sysrq Date: Fri, 13 Dec 2019 00:06:11 +0000 Message-Id: <20191213000657.931618-13-dima@arista.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191213000657.931618-1-dima@arista.com> References: <20191213000657.931618-1-dima@arista.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191212_160750_212203_1D977A80 X-CRM114-Status: GOOD ( 13.63 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Vasiliy Khoruzhick , Dmitry Safonov , Richard Genoud , Greg Kroah-Hartman , Dmitry Safonov <0x7f454c46@gmail.com>, Ludovic Desroches , linux-serial@vger.kernel.org, Jiri Slaby , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. While at it, remove forward-declaration of atmel_console - it wasn't needed even at the moment the driver was first time introduced: commit 1e6c9c2878c9 ("[ARM] 3242/2: AT91RM9200 support for 2.6 (Serial)") Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: Richard Genoud Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov --- drivers/tty/serial/atmel_serial.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index a8dc8af83f39..4020fc8ceb49 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -51,10 +51,6 @@ #define ATMEL_RTS_HIGH_OFFSET 16 #define ATMEL_RTS_LOW_OFFSET 20 -#if defined(CONFIG_SERIAL_ATMEL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -#define SUPPORT_SYSRQ -#endif - #include #include "serial_mctrl_gpio.h" @@ -196,10 +192,6 @@ struct atmel_uart_port { static struct atmel_uart_port atmel_ports[ATMEL_MAX_UART]; static DECLARE_BITMAP(atmel_ports_in_use, ATMEL_MAX_UART); -#ifdef SUPPORT_SYSRQ -static struct console atmel_console; -#endif - #if defined(CONFIG_OF) static const struct of_device_id atmel_serial_dt_ids[] = { { .compatible = "atmel,at91rm9200-usart-serial" }, @@ -2877,6 +2869,7 @@ static int atmel_serial_probe(struct platform_device *pdev) atmel_port = &atmel_ports[ret]; atmel_port->backup_imr = 0; atmel_port->uart.line = ret; + atmel_port->uart.has_sysrq = IS_ENABLED(CONFIG_SERIAL_ATMEL_CONSOLE); atmel_serial_probe_fifos(atmel_port, pdev); atomic_set(&atmel_port->tasklet_shutdown, 0); From patchwork Fri Dec 13 00:06:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 11289567 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 894DF139A for ; Fri, 13 Dec 2019 00:08:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 64382206E2 for ; Fri, 13 Dec 2019 00:08:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Y1F4QrSY"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="UAGjR5Lw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64382206E2 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=arista.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uvp+ONtjHbfSY8RZ7dVi+I5iKoaw3/1TvrNtRJ4gUok=; b=Y1F4QrSYjewsO3 mhoQHvTjmGowT9MB3kOSuGnBYNv66gGgorlQSAhJw1Kywho1BtiNq3gxxUJbCGqzAeWHfXTrCjjSc WVnXxSyHhqwBplLLLlGpejE4UWuZYR4viRVOhe/Hchw6U6xR66JbEc6wb2iXaAOPyV9CwkFEV88UZ Ir1COQ8MvXopmUOGlUUC9b+uOMxtZX431/4byLQKOyL433Plqfh+sZNPij3e/dfYcsuDmfOKvqqqC XlX904x/k0ltlcgdbSH/35OhC2NMYPez0XaKKZdk7YiMQH7NX8sSOLgfW6dUfRU1Mq8oY/p5Jdkkv AvYUqrmLzdukijEwz+rQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYVD-0004Xt-4E; Fri, 13 Dec 2019 00:08:15 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYUr-0004Fb-BK for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 00:07:58 +0000 Received: by mail-pl1-x642.google.com with SMTP id k20so368627pll.13 for ; Thu, 12 Dec 2019 16:07:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1lzeOKE7E2xm2Pt7osPxOs8CjOGmgq2Y6YA5myrIRwI=; b=UAGjR5Lwhlk2Ldz8b3cTLehatxJ/23uzY+Ob377pN0apnlpA770tNf4dQhE0OtCW+S L/QyIj6i2JC/neA9LoyfQmluxjAFkAcgszhlqfHmyDmHOlom6m3rRD1AvK2WraW9al61 +iTX8p0wkbUv84baDL/YqJX2paQPCuceH4dmb8uMHS83muaLzVYaj6xTSassG8mmh4E8 /u1z4oMQmA03jFhf/icDV8SAhnxBTKqNv5SiNq0FEyMdIdVPWm+mrzos74CwWVUzCXC8 S45FAbDm+7QtukDSwo73q4zwfwMRmH8aVTECzWx4T3AaPfQRYMdqcrYcYSZJ55o7+exF AGuw== 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=1lzeOKE7E2xm2Pt7osPxOs8CjOGmgq2Y6YA5myrIRwI=; b=ovP4fnRdLLh5l/sy3YulN/8vrCkBUnRxVbY/CdabwScy9akbBF52c2oBs+HeFfPu49 Ji3RwZdFKiSSFfkPbmUK+fjNy/QppoKAsZwBb3geFKAA1DTZCKhReSOpmP9SjgwI2bND TvwLbyvuJdQ1/VRr8Smr4nSGIXgOfuGLvZ0QDmcEM9K708s9DFRT9COABdII0Z9RrwhU h7PhF1GIgldt/Jnx+om4HVKeHHnI0bfKi+fGjsArg78NmMVGAUbnEIkDBtiSglgljzVh iFfqay9rE/kpBwb6L3cXdpFhGxpimaWhXyALc2FffnSVpq2rNHBW/aU0Yufaif0heCMJ MbaA== X-Gm-Message-State: APjAAAXyrHzl0z3K1q+vl0j5XpVXVNpqHwWby5nTopluwhYmE+i3nIEn xR1L6TgKVu2bnc+w8uq7WUKi6g== X-Google-Smtp-Source: APXvYqwojedrKhxZAq5cumleNwwcoSZ1lEw0FeB3H5QkX03T5VYZcpLlDknvC/Jx8tVgNaDLXobTIg== X-Received: by 2002:a17:902:6b:: with SMTP id 98mr13070692pla.128.1576195672261; Thu, 12 Dec 2019 16:07:52 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id j38sm8317647pgj.27.2019.12.12.16.07.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 16:07:51 -0800 (PST) From: Dmitry Safonov To: linux-kernel@vger.kernel.org Subject: [PATCH 13/58] tty/serial: Migrate clps711x to use has_sysrq Date: Fri, 13 Dec 2019 00:06:12 +0000 Message-Id: <20191213000657.931618-14-dima@arista.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191213000657.931618-1-dima@arista.com> References: <20191213000657.931618-1-dima@arista.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191212_160753_424490_FEA2E84B X-CRM114-Status: GOOD ( 11.10 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:642 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vasiliy Khoruzhick , Alexander Shiyan , Dmitry Safonov , Greg Kroah-Hartman , Dmitry Safonov <0x7f454c46@gmail.com>, linux-serial@vger.kernel.org, Jiri Slaby , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Alexander Shiyan Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov --- drivers/tty/serial/clps711x.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c index 061590795680..95abc6faa3d5 100644 --- a/drivers/tty/serial/clps711x.c +++ b/drivers/tty/serial/clps711x.c @@ -8,10 +8,6 @@ * Copyright (C) 2000 Deep Blue Solutions Ltd. */ -#if defined(CONFIG_SERIAL_CLPS711X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -#define SUPPORT_SYSRQ -#endif - #include #include #include @@ -479,6 +475,7 @@ static int uart_clps711x_probe(struct platform_device *pdev) s->port.mapbase = res->start; s->port.type = PORT_CLPS711X; s->port.fifosize = 16; + s->port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_CLPS711X_CONSOLE); s->port.flags = UPF_SKIP_TEST | UPF_FIXED_TYPE; s->port.uartclk = clk_get_rate(uart_clk); s->port.ops = &uart_clps711x_ops; From patchwork Fri Dec 13 00:06:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 11289569 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 90F2514B7 for ; Fri, 13 Dec 2019 00:08:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 51D08206E2 for ; Fri, 13 Dec 2019 00:08:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bdk2VBOK"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="Vov9+2yB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 51D08206E2 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=arista.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nIsx2xUvd/ClIG2saJSM+swWxF/u9zMZCVKMU4Wb7zM=; b=bdk2VBOKCFUNQs pGiJsH3VDq7CMCDU0TLUFTT1gw0wx2IZSrSSV3W5zFV+8vC6QuNMraV42e6olGEFNG/bCVfLEo32A BDnWnW03e5ZpSlx0aVKyz5ChtmTnVBrJ81rPZc1iN56RybmFBEYFWzL8HLGVjkHFB39KoRjTTpbBD e3vZ9E8viQEwAwKeKH62od/c0ppT6iUDbKyzbrxE0VtCApt9cA9Wc3RoNyn9nSq1vyJnIc7WoLxfU e/tUn8LfKRuif7ZxJomvVqi9hSg4oFZgVGhHotKAQnmZbuB9Ecovk36qb6Z1m/KT8cAAQ+7TE+LSn cpaHN6mmJWs01tsd0eQw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYVS-0004rE-8V; Fri, 13 Dec 2019 00:08:30 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYV0-0004MY-2W for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 00:08:03 +0000 Received: by mail-pf1-x443.google.com with SMTP id 2so387333pfx.6 for ; Thu, 12 Dec 2019 16:08:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Euik8RhSRJjHmC28+StnihMZD1d4qJRUDgdRlDVUqg8=; b=Vov9+2yB9/3J2+7DANI/wPjle8KZwVg0d5zBvN5FnKFK2vBdtzOq7YcpV9aNTO2UVi J+2z+NpVo3Ei+Pl4+oggYNrBLDvL/eMxREVg6SLUIyyiHBghtCgmfaXVT57XltyKauc3 OzAv3XL2UKiRaOikeC7iTvhrIzspRT8CUNWLLjzmuYT+nYNmZaGi5qcUtIqcam0H124e RbclY+ExjONTJH6cmIEhDq6bmEYd9/EAFkqIp/bZq9PKYiVdFbNKprQM4q9hbaC3RKqk IGMkNo2fkuWmlu2mT7mfqbIin7ri/Vc8aIKwHHOOpF2FCjzTecK7E3S40SISqeuGnlox bD6A== 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=Euik8RhSRJjHmC28+StnihMZD1d4qJRUDgdRlDVUqg8=; b=RYhgnR3My6BmZgp8aD82zPCYGbyN5wY9QhyW+n7Q79ydxP+bHN0bkhaxdFevRDDduL yD/CYapitqD0MlWTohcR6221/Ul1kc1jEi3o+eK81Bwvf/E5cm+wv8mlsTsfV3Ckah1K tmbP70LJxy4orVsLjo8N1Sk/ak0a9z1WO3/PK+nS/dK50/olEHjv18XhzQ+Jf7GW4rrg JmXFnOPIcJMg//v5YTwF9QGcxuPIx0Fm+Ah7uHSwrVoDg3woXjEkCULeSnC90YUoHs5W SyGRcqTSPxTg08u81w5YoWEUCpYt791EwhXYMaKBJ+BBMWrGjKEL7AnCRqd1hQRBOpF4 feNg== X-Gm-Message-State: APjAAAWOUualgBhDrcMz036Mcw7+M4WztgK9OKCVa8R1nFQY+BqJrpoU SE7fvocndPzmp02R2RCe+KK24Q== X-Google-Smtp-Source: APXvYqzY6lLiNfLcAT2CBNRvssxZ7MTePv1pHo5Z9zzhPNEs2I5saW4nMcezRwTRhfTnTCpuHM6CLA== X-Received: by 2002:aa7:95a9:: with SMTP id a9mr12656949pfk.15.1576195681400; Thu, 12 Dec 2019 16:08:01 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id j38sm8317647pgj.27.2019.12.12.16.07.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 16:08:00 -0800 (PST) From: Dmitry Safonov To: linux-kernel@vger.kernel.org Subject: [PATCH 16/58] tty/serial: Migrate efm32-uart to use has_sysrq Date: Fri, 13 Dec 2019 00:06:15 +0000 Message-Id: <20191213000657.931618-17-dima@arista.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191213000657.931618-1-dima@arista.com> References: <20191213000657.931618-1-dima@arista.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191212_160802_175148_C22F0162 X-CRM114-Status: GOOD ( 11.15 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:443 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vasiliy Khoruzhick , Pengutronix Kernel Team , Dmitry Safonov , Greg Kroah-Hartman , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Dmitry Safonov <0x7f454c46@gmail.com>, linux-serial@vger.kernel.org, Jiri Slaby , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: "Uwe Kleine-König" Cc: Pengutronix Kernel Team Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov --- drivers/tty/serial/efm32-uart.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/efm32-uart.c b/drivers/tty/serial/efm32-uart.c index d6b5e5463746..2ac87128d7fd 100644 --- a/drivers/tty/serial/efm32-uart.c +++ b/drivers/tty/serial/efm32-uart.c @@ -1,8 +1,4 @@ // SPDX-License-Identifier: GPL-2.0 -#if defined(CONFIG_SERIAL_EFM32_UART_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -#define SUPPORT_SYSRQ -#endif - #include #include #include @@ -748,6 +744,7 @@ static int efm32_uart_probe(struct platform_device *pdev) efm_port->port.type = PORT_EFMUART; efm_port->port.iotype = UPIO_MEM32; efm_port->port.fifosize = 2; + efm_port->port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_EFM32_UART_CONSOLE); efm_port->port.ops = &efm32_uart_pops; efm_port->port.flags = UPF_BOOT_AUTOCONF; From patchwork Fri Dec 13 00:06:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 11289571 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 25ED014B7 for ; Fri, 13 Dec 2019 00:08:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E2C682253D for ; Fri, 13 Dec 2019 00:08:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bVa1nV+t"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="QCtRZf+D" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2C682253D Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=arista.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=irPHWr6sO6Ps86MFoglgaYv+y4ijvmu7ErvkMCP5JoY=; b=bVa1nV+tezf5ii GyCri4B31THHg2ROmlK03mnaD2rN2o9DgBGdN/S6+0FvTuEv7gNOrWzpfHg1OeiM03b2CMPsXyw7M dLdi/0TvdaD0ZHrWWhC9uKhfXTULqe32p6gWj3bufWTv0qDxtm+JTzsF3tMmJDqAW2XY9sAzLLd04 TcOKHAjKUfxkMYQQ03S6/nbkbin3CTZ0o24wPAa0nad9mJ6zswhZfJsY6A9Pxm948zh92pvs2R6G1 FlgF+JLkrOw2CnX3xcDMShTwdYw7TuYio52Iii0g5sAZcvUsgLZpmw9DlBsudtCmtWDfVMODGngHC erpfIigASTg3VlGQRyhA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYVf-00056G-CG; Fri, 13 Dec 2019 00:08:43 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYV9-0004Ub-Mj for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 00:08:15 +0000 Received: by mail-pj1-x1043.google.com with SMTP id o11so335230pjp.9 for ; Thu, 12 Dec 2019 16:08:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=T7vj+qwFtP7xVmHBgaa06jNzp38vBtMsISF/N9QYy00=; b=QCtRZf+DpfijvCDxwWd0IInXC860Nhs1gnLTLXGzQrEyny0IANF6c+HSGP+7/iHmdU DM5EdeqGyMXymv4UANFp1Z+5EsiHLvgA6yQ+XcMwy+PTcU7R7QFRT2hVgHWVQ/j363l8 BgI12yjHkE8/3iqxZ3W2zBJMKdvk4VHuyqHjOre1o03hbAnZy/wYG5+qne5I+RuQXv4x 6O5l4VOyLvv304hUlJOOE+OQBsUq2Uci45yCHYWyQpxJJ/Rqm2pwQa1A9i1DIc80NKuk J9YnQDJtbDSrO/95A7qkhUTtDFXEIcXzu6MQ32q41T9H333pdp1QRtBVdj0+kRMAtNdK zuzw== 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=T7vj+qwFtP7xVmHBgaa06jNzp38vBtMsISF/N9QYy00=; b=gSiV7p3JIYfDkIPynl1Q1tOGPhSU6zNd+8+n4aRTdxeulUFwkVDJrk8Xppa1kjuuL1 mZDp8vvznZVxP5g1D1ZDV+wocCayRjLfeZUAyBppEHCHXy6mhOVMCTnFtgaqu3JCbmuR mm8+l+LnCqa1Of3+U/kAUnHAjUnYlEabFtvovLhSWe6/NFoyi+B6MuuljXnTgevyZNcw 3HpgUl6ectukkGovYSxm7h4b6eznFPno7SxX45v3dLkffD8AdwZ4qf8s2qjijPnwZcB5 We1qcdCn0J5iKNDOWiwPehZtQJH7yf6QjAXrJOZ7YkU3pzf1+dIJe3vSVj2YGDAGdLRE i7vg== X-Gm-Message-State: APjAAAUdQiV/X1eroSXL71oaj4YMWcJN3w+7n8S7nJoz+sMKlUvxVvTZ 4XeSjpeUoJTr1cA2xmDkrSUjPA== X-Google-Smtp-Source: APXvYqwLlbH3BL8PWw8R26CwvErqXpqt7+6m7DaqfHW7yx/zTlishWw5KaaIcP1V5keny7voOTKrsA== X-Received: by 2002:a17:902:9a02:: with SMTP id v2mr12665787plp.221.1576195690418; Thu, 12 Dec 2019 16:08:10 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id j38sm8317647pgj.27.2019.12.12.16.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 16:08:09 -0800 (PST) From: Dmitry Safonov To: linux-kernel@vger.kernel.org Subject: [PATCH 19/58] tty/serial: Migrate imx to use has_sysrq Date: Fri, 13 Dec 2019 00:06:18 +0000 Message-Id: <20191213000657.931618-20-dima@arista.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191213000657.931618-1-dima@arista.com> References: <20191213000657.931618-1-dima@arista.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191212_160811_807414_E15F94EA X-CRM114-Status: GOOD ( 11.68 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vasiliy Khoruzhick , Pengutronix Kernel Team , Dmitry Safonov , Greg Kroah-Hartman , Sascha Hauer , Dmitry Safonov <0x7f454c46@gmail.com>, NXP Linux Team , linux-serial@vger.kernel.org, Jiri Slaby , Shawn Guo , Fabio Estevam , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Fabio Estevam Cc: NXP Linux Team Cc: Pengutronix Kernel Team Cc: Sascha Hauer Cc: Shawn Guo Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov --- drivers/tty/serial/imx.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index a9e20e6c63ad..83c6e2ac0e8d 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -8,10 +8,6 @@ * Copyright (C) 2004 Pengutronix */ -#if defined(CONFIG_SERIAL_IMX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -#define SUPPORT_SYSRQ -#endif - #include #include #include @@ -779,9 +775,7 @@ static irqreturn_t imx_uart_rxint(int irq, void *dev_id) if (rx & URXD_OVRRUN) flg = TTY_OVERRUN; -#ifdef SUPPORT_SYSRQ sport->port.sysrq = 0; -#endif } if (sport->port.ignore_status_mask & URXD_DUMMY_READ) @@ -2231,6 +2225,7 @@ static int imx_uart_probe(struct platform_device *pdev) sport->port.iotype = UPIO_MEM; sport->port.irq = rxirq; sport->port.fifosize = 32; + sport->port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_IMX_CONSOLE); sport->port.ops = &imx_uart_pops; sport->port.rs485_config = imx_uart_rs485_config; sport->port.flags = UPF_BOOT_AUTOCONF; From patchwork Fri Dec 13 00:06:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 11289577 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9546D14BD for ; Fri, 13 Dec 2019 00:09:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6D793227BF for ; Fri, 13 Dec 2019 00:09:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Y6yJCLGU"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="MEiquop+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D793227BF Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=arista.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6EK5vhQ+jJEeVPSM/K3gdVDQmqvQmDvukJPDAeDpGxo=; b=Y6yJCLGUJdTN+9 oVs7T28J1MEr+wHRQCuhsMW+6SmhA0lMy1zmALZGaSe9JfZfgQaLPWtNa+WHRDOWxV7e8XoAsiZvv l2MIR5bX2jbnBlJqOPohRd/2vVs01uvGuuxzK4v7CaruHS+yZf6CfNW6py1JPlhzIJDn0YbDI06GU g0W1mczbbXbiPRPc/l17vvU1NVo8TdxYejDo9Jer9V8Ue1NTV3JzjPwpZe8YaHDNAU/GsFkKJVNQ8 a9ySmuJoADxIalu2w9w2IenrqMFj3Q9wbvV0NkqWqYat7dRoy3WcmIjrkVS0J3Fa6qT5y+N1M41rC xfcoLQ91NfOdYYpmQMqA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYVy-0005PP-5u; Fri, 13 Dec 2019 00:09:02 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYVF-0004aS-7K for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 00:08:19 +0000 Received: by mail-pf1-x442.google.com with SMTP id h14so376620pfe.10 for ; Thu, 12 Dec 2019 16:08:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Uk3TZICnk6L8+YQsKzp4vXh6Lz+AHFrWnELXXHSVLmg=; b=MEiquop+dWgeX+dUKlkKtAa/DS84d2iq6ZW3M0G1Psp+yW+8kVNAYH6uQjsPE6JJ5i za7C7kyKxoDAA2dn0siHaxDAEijdX3Pcmou7RQYXmgc4vMF/39b3nBwSAnB7xRC9myN9 t2TD35xkpGzZz9eHkb5uaIx/Jki9YMY0Hxw/TQqUh0/FAtfLYZcdkHvXPq0eFyvHHyeu HfjUzcroMqSh7D6/IYRUpsyQDt3CqfFUX+Pm8BoUYGT88RmIXIFDxmWn6vlIye7C2QGn 2HwQ81fDPi+rbdnS+9f0Y7tr9+nNMau4z5t+HuFuO6XZeNFTOvveWSvDx00bm7lseGgW KJwg== 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=Uk3TZICnk6L8+YQsKzp4vXh6Lz+AHFrWnELXXHSVLmg=; b=s0OY0IewP/EBQJEJ9KGCn2QLNMWAF0xIVm6pfNzYhR0Yldne8S94sexnIIj79qFNye Z1WtY1rKNartNVpk5Y/CN0uOtki4NHWaK1StP0WdV99SiKm6xrEcgLuVfTpavkiPa+MR 5Tf0zg30gZ65uajd9Ial/M+YUYfT1OLkDGfHpNTuTXgCw27Klt9WlTphSGrrQVohjflO wW+PikIuC0YaqV64KJ/KN5xyUexgQ+PC7QeOjKQf5rM+uCXfKCjAkgSMt014jYugOhQ3 OCqYiuO/WmHuIktKnJ3SQHNHyZHQtlvK4IZG8lA/t8xsOKhBFbUbgOUlKVnlcesgWe97 7f0Q== X-Gm-Message-State: APjAAAUWmfH+EmA1HHEjQqo8wWGLiMM+XJgHpROHnQcjs50l/sCBZ2wr tdkXB0H1K47Hwq+h+FfWzyAt9w== X-Google-Smtp-Source: APXvYqzavE1+kkQp1uQB6Awu3jk2+Wse3GRBkbNukVGHGUDFeOheGMh3MBohyrMn3SZ2woUxcYQijQ== X-Received: by 2002:a63:ca4d:: with SMTP id o13mr13550977pgi.360.1576195696496; Thu, 12 Dec 2019 16:08:16 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id j38sm8317647pgj.27.2019.12.12.16.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 16:08:15 -0800 (PST) From: Dmitry Safonov To: linux-kernel@vger.kernel.org Subject: [PATCH 21/58] tty/serial: Migrate meson_uart to use has_sysrq Date: Fri, 13 Dec 2019 00:06:20 +0000 Message-Id: <20191213000657.931618-22-dima@arista.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191213000657.931618-1-dima@arista.com> References: <20191213000657.931618-1-dima@arista.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191212_160817_274946_46EE06B4 X-CRM114-Status: GOOD ( 10.87 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:442 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vasiliy Khoruzhick , Dmitry Safonov , Greg Kroah-Hartman , Dmitry Safonov <0x7f454c46@gmail.com>, Kevin Hilman , linux-serial@vger.kernel.org, Jiri Slaby , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Kevin Hilman Cc: linux-arm-kernel@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Signed-off-by: Dmitry Safonov --- drivers/tty/serial/meson_uart.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index fbc5bc022a39..12e15358554c 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -5,10 +5,6 @@ * Copyright (C) 2014 Carlo Caione */ -#if defined(CONFIG_SERIAL_MESON_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -#define SUPPORT_SYSRQ -#endif - #include #include #include @@ -703,6 +699,7 @@ static int meson_uart_probe(struct platform_device *pdev) port->mapsize = resource_size(res_mem); port->irq = res_irq->start; port->flags = UPF_BOOT_AUTOCONF | UPF_LOW_LATENCY; + port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_MESON_CONSOLE); port->dev = &pdev->dev; port->line = pdev->id; port->type = PORT_MESON; From patchwork Fri Dec 13 00:06:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 11289579 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B4DE0139A for ; Fri, 13 Dec 2019 00:09:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8A9FA206E2 for ; Fri, 13 Dec 2019 00:09:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LWwGjXZb"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="Fv4cQwiB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A9FA206E2 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=arista.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3DycUfVWA9x2CVsTijitnJLSHqzQwSUCv6LmJd4/Vsg=; b=LWwGjXZb6BRYRK Ak49pMo5XW3yaMXFRrBiWWBfWL8RaiNSicRCgNB6aF31Yi+CenC2HAhjb7FknDTAGrjU8I2vLwc+L zveiW4HcnEUxsM2fpj+BiVwGS8Pe1d1Hb9XB73dJ8n1lEn5iCp44qdWqZ+NIVgBDC6IfBwYPN6bLE DE6K4btxSJ6zsXZhWczdDkDL/Sqe/vdp6MVcFLC3V41zCD9ZpWEygqxOu7apCOwBlmW7yfykruJlA PVykyW1zwiEaRsvkHky8tgJljfsHGsEsAg+zyL+Wg/MuByN1nWNHqDX/kyYWwtF1xnpXnV30S3pXC Hf2Am/BL8K9B8dodNwRw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYWA-0005br-Sd; Fri, 13 Dec 2019 00:09:14 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYVX-0004xQ-RA for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 00:08:37 +0000 Received: by mail-pg1-x542.google.com with SMTP id k3so548665pgc.3 for ; Thu, 12 Dec 2019 16:08:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JPHcF1Ac92GQc/SsDP7K+Yij8n5Op4P4c8xwvHBjRY0=; b=Fv4cQwiBepW2yfuVGe2bIGqgW8ota1ovR0Oqsbc4sPC1d1OUjKvZ6vQ1b4a/simvRZ hkt4QOw7eTenbSMFVj0LK6GV8yxReJromH9baY2pKzNpgT++N5JSrcQVJDe15ur6qMTK 9aX4+KJQ5J3uFZQPd9WZgF0qk80Oa7uLkWC3MVX1R3A13K01fiCyDuP4hhWHh/TKLc1q +KjX4QkipD5ktT3q7JwEvS9TWquf/p9mTa6BPOsC//gM9+Nww7x0Zoo6pDayI7ACHyix wenEXpUU+010mB06MpA8ofbbIn25EJifvYxxvyKkWeZSh6sd3IQq2btODsElDw4xyqEq iSbA== 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=JPHcF1Ac92GQc/SsDP7K+Yij8n5Op4P4c8xwvHBjRY0=; b=ieOidJEGOQUIW/dhUmi+iteuMVJd8fmmfhlblVWB45w44WmCagd7GBtLCGWTgna8Wh CJZktUURxiY2NfAqhjjwO849B6bnujzsA9vrFNHXyKgcH8pfFx8zyfRagQehjBBI10cD R1HS+x/N17ksOzsSValqhKgiyH3cX95jpiFTx7YbnPaONFC0zXbwyW+neSuJKZwy0DdH e/rWWqPMcFlPVT+lV+352Y3VUk8SVufjeCqWWJ54VzRuNHSSNv8Y89h9L2WO6Aey2N0f ImWZwuKH4U+L59+cuVo44Xd8dVcE+cpMvNTx80itZRATIH2cHz5eTEmrYmoLlAW5DZtj 5Alw== X-Gm-Message-State: APjAAAUv51AhSzOG+7McQl8WJgUv0P054tphOtZ0dEA72wUTuouilzbT NudxWNKjdlBK3fRYtIABD6lYHg== X-Google-Smtp-Source: APXvYqyqFKCBWTIp8TYm3kDEts6GcpTPEPycbAbyvkwK3IpCwgEnNSAd2DdwsYCBcerQjSs5m25png== X-Received: by 2002:a62:b60c:: with SMTP id j12mr13123896pff.8.1576195714876; Thu, 12 Dec 2019 16:08:34 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id j38sm8317647pgj.27.2019.12.12.16.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 16:08:33 -0800 (PST) From: Dmitry Safonov To: linux-kernel@vger.kernel.org Subject: [PATCH 27/58] tty/serial: Migrate mxs-auart to use has_sysrq Date: Fri, 13 Dec 2019 00:06:26 +0000 Message-Id: <20191213000657.931618-28-dima@arista.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191213000657.931618-1-dima@arista.com> References: <20191213000657.931618-1-dima@arista.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191212_160835_892882_91C87FAB X-CRM114-Status: GOOD ( 11.24 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:542 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vasiliy Khoruzhick , Pengutronix Kernel Team , Dmitry Safonov , Greg Kroah-Hartman , Sascha Hauer , Dmitry Safonov <0x7f454c46@gmail.com>, NXP Linux Team , linux-serial@vger.kernel.org, Jiri Slaby , Shawn Guo , Fabio Estevam , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Fabio Estevam Cc: NXP Linux Team Cc: Pengutronix Kernel Team Cc: Shawn Guo Cc: Sascha Hauer Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov --- drivers/tty/serial/mxs-auart.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index e34525970682..b4f835e7de23 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c @@ -12,10 +12,6 @@ * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved. */ -#if defined(CONFIG_SERIAL_MXS_AUART_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -#define SUPPORT_SYSRQ -#endif - #include #include #include @@ -1693,6 +1689,7 @@ static int mxs_auart_probe(struct platform_device *pdev) s->port.fifosize = MXS_AUART_FIFO_SIZE; s->port.uartclk = clk_get_rate(s->clk); s->port.type = PORT_IMX; + s->port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_MXS_AUART_CONSOLE); mxs_init_regs(s); From patchwork Fri Dec 13 00:06:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 11289581 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DAE4614B7 for ; Fri, 13 Dec 2019 00:09:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B521B206E2 for ; Fri, 13 Dec 2019 00:09:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qD/QIQIP"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="XF2rsfp6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B521B206E2 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=arista.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eD4PDPxbcY0tZGKp4NC1r3ELwHvChRXDsAi/MRrmXts=; b=qD/QIQIPkNr4xf 2CX8meVVYyFcZUrM3tJudvYXmeMBQGj+5nEVaBOXUkRGS1bhaU/wqgpIPUxJD+cvBno9ohXOFQ+z6 6vUEJqwNWlpTW8nYNSgewFuVkGdWo41eZQNqQRqhndRrfx1OJA2GAXUxJZhHY/1QIoH60Pmzy/tkj fVb/pkiwIfv79K4yBwQ5wGXp3b5qZylF73hUnYKsk7zKjgBI4FUn4+dQL1sLnf6g9yn1R6kY45ZsG sbmyqiEyNgpA69XOpmBMkJcbXCRWps95LFkbZyHwLqrIqx1IMOSE+2ulpKEOIX6zuq/pewNA+CcKD mVT2fiNUKhxw8sOLkQpg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYWU-0005xW-Aq; Fri, 13 Dec 2019 00:09:34 +0000 Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYWI-0005mW-4V for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 00:09:23 +0000 Received: by mail-pj1-x1041.google.com with SMTP id w5so334117pjh.11 for ; Thu, 12 Dec 2019 16:09:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q6Z6h55fqcKu/1XdEPBrCCQZqpAqK/dlHyYZRu6yk0A=; b=XF2rsfp6S8eVpNAwetphzdMntNRfleo8sRWtjge/7tZNQ00G6D+xDWInIppahrgaVP 56NMUvPSH2EP7N0FdLt7Ve9GX2Ow5BwokuTIs/7QmH5OuaOObM07n0rTevRAkVOsN1eB uRvdkEL83YmHbC4hH8sbKzbm40UaJHO/CO1bz1f5qfJqVJmrZ3j+wxV95kM95LLSlrsF bpAY3+MTgrkQ1t12PDoKlijBzwBbfGbZcCmy9w1qVsEeg8M6TOJ5y5fQI/HV6aXO3ksH t8bodtXGK2fCSZcgJSEidF++iq4gbEzVvOwNlntWLZXF+s6M7gk/HuXXKLqM1011bMb3 urUQ== 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=Q6Z6h55fqcKu/1XdEPBrCCQZqpAqK/dlHyYZRu6yk0A=; b=igCaTEXDJM5t05BPmwG3doOyxZUQS1VUcWtGEUP3cmw+1IstlSVFpNTXz4jlZfAGvi 9h/stTuDUt7hGNp8rJazjCoqUXHw8D6FXT+VLS2Z45ImgqNhirY5P4BZWO8TmWa6l56/ sPcOFaFyNpT6iTtcdo2gILrOw4IQSLNm9nC7FyXMtFSp1RJ5hvS55IA9rxofbx1Md6jb kcmpjP+OnzXN7XmATyIDyoo3QU4K1hW1JhQmu7vecDEeAjXsbvrNpcKlVPaPMq9OrHSI QxDUCi1mphn4RcUej6h6TqEytctnEILPrD1qSRd3HL6SoeH4BKuozLqgFjxwP91wo7T2 Cbug== X-Gm-Message-State: APjAAAWF21wDtlpFgngq3qMmevL9msaWWWwNnC4iVxHCLfp/D0lakGOl DVZLOjPSf5x7yO3GNz+d2zGS/w== X-Google-Smtp-Source: APXvYqwlkJz/Si2OVsRDCRLc+xPb5dEar6sDzFHhlOaQ2a+RW7qzAwTJAfBum3Dn/5w7f+5voW+Utg== X-Received: by 2002:a17:902:aa95:: with SMTP id d21mr12764749plr.263.1576195761332; Thu, 12 Dec 2019 16:09:21 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id j38sm8317647pgj.27.2019.12.12.16.09.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 16:09:20 -0800 (PST) From: Dmitry Safonov To: linux-kernel@vger.kernel.org Subject: [PATCH 43/58] tty/serial: Migrate st-asc to use has_sysrq Date: Fri, 13 Dec 2019 00:06:42 +0000 Message-Id: <20191213000657.931618-44-dima@arista.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191213000657.931618-1-dima@arista.com> References: <20191213000657.931618-1-dima@arista.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191212_160922_240896_D8D408D1 X-CRM114-Status: GOOD ( 10.79 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vasiliy Khoruzhick , Dmitry Safonov , Greg Kroah-Hartman , Dmitry Safonov <0x7f454c46@gmail.com>, Patrice Chotard , linux-serial@vger.kernel.org, Jiri Slaby , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Patrice Chotard Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov --- drivers/tty/serial/st-asc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/st-asc.c b/drivers/tty/serial/st-asc.c index 7971997cdead..fb6bbb5e2234 100644 --- a/drivers/tty/serial/st-asc.c +++ b/drivers/tty/serial/st-asc.c @@ -5,10 +5,6 @@ * Copyright (C) 2003-2013 STMicroelectronics (R&D) Limited */ -#if defined(CONFIG_SERIAL_ST_ASC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -#define SUPPORT_SYSRQ -#endif - #include #include #include @@ -730,6 +726,7 @@ static int asc_init_port(struct asc_port *ascport, port->fifosize = ASC_FIFO_SIZE; port->dev = &pdev->dev; port->irq = platform_get_irq(pdev, 0); + port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_ST_ASC_CONSOLE); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); port->membase = devm_ioremap_resource(&pdev->dev, res); From patchwork Fri Dec 13 00:06:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 11289583 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 40DFE14B7 for ; Fri, 13 Dec 2019 00:09:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1EF392253D for ; Fri, 13 Dec 2019 00:09:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MVQZ94Bw"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="MwyEdNtF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EF392253D Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=arista.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Gq44Jj7oox79KLFbhy2cKLgRBQroOMC4bE0xsF4cDcg=; b=MVQZ94Bw8T/ioJ ID46nlc+xXryrUcr/QDlBcEv0mUMsNKsug1EYCa5gWVmwavdSGPt6uldRkpxShwzUz2REnKkVrJgf lalD4ZgQxquPC3th9AGIqhjhtklrBoT9nfOJvgxmq++KzPo5VDNUoMvzncY+TkfW3FLNYTn27ea+g EzdIBpWiWXf/4+rHZWjWogshcDOP13g4CXYQRPFAq5BRO4gIolEReZSEjxEVa4MtQUi0pfvilwmxr NlKwyBjkeieFY7KH+TyxmyoQgour/wTvTeFtn5UNj+gn3hy9cUUudcs1TetYaIN78dvYx+3Jg6YWC 2WirL2gzaPSO77jGxQeQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYWf-0006AV-4O; Fri, 13 Dec 2019 00:09:45 +0000 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYWL-0005qc-Qo for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 00:09:27 +0000 Received: by mail-pj1-x1044.google.com with SMTP id o11so337533pjp.9 for ; Thu, 12 Dec 2019 16:09:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=k2sVyEICGfKf72nEjPqSRaSmfvJt+VQfuvvM6oc7m9s=; b=MwyEdNtFfmjQZoB27Q0dIhnKa/eRsscBYXgN6mThQHZ0xuN2ZLNKi6ckLFpOQcPk+I NEzKUZY20I58iWtE45s2LmQvI8w3hNRVu//WpT5ZtNqDzUOxrG64HmkEASgMeCHQTYsF BERyiqKnSCv+Ntjq+29FADDKOnA7VRMDTnxpTxarc8+nLThS9SCFZDQDKEgOxRraWxtc mDUv5ABTRatRqAX5ufBfjct3CXHzkTHAAHIy1M6tlMHU59duHo5mn7JSUfcm8cmLplf2 wmacPO5wGfnv2SXChdmY0aR2WF1f1/LIscRo2PIXHQtebaWsP6SCeTlACqAjfLxoowH2 7pmg== 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=k2sVyEICGfKf72nEjPqSRaSmfvJt+VQfuvvM6oc7m9s=; b=h1pYh7cwpWbKFOtv/YcpwJkyEtKjEqZ35IsnKSP9tlROgkJv5gPDhQnqNIqepHn9+a mbOW5a8IG08fctyLRll4QOIskL//0r4WBajDNfiiyh4lP70lww+b8LVfwoG8HFFsZ1Ye iju+PwdIIQFyna57ragghI6pnFC3h1k2AEJ0I7HvsJLn2fq+/luvJuPmubwWCWVqpTIt Cw1tesYW5yo1E+jQTz7Sx7ZQyILCLnPDvSDtnOo4QDOQtNcqAkzpWHIUT54EUdTTdekZ BgzJavUxf1A3gdX13SUyRzAaP0oveCk5XZwBzKtopbg0QmlBe3p2gMs2liETNeqEknT9 LcAg== X-Gm-Message-State: APjAAAWfIwf8JyJAK/582wEVu87syDtyNc/AUCeJd00B+jcfiFSeMNzF fMq025DpobhRhZEqu8c/JNfYPw== X-Google-Smtp-Source: APXvYqyKleyWMddswHphitVEN0hVZKzYGZZEyMMWwvlQN495NyB0mhwoFp63U+7Ic280YNH9xNzNyQ== X-Received: by 2002:a17:90a:e291:: with SMTP id d17mr13557645pjz.116.1576195764822; Thu, 12 Dec 2019 16:09:24 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id j38sm8317647pgj.27.2019.12.12.16.09.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 16:09:23 -0800 (PST) From: Dmitry Safonov To: linux-kernel@vger.kernel.org Subject: [PATCH 44/58] tty/serial: Migrate stm32-usart to use has_sysrq Date: Fri, 13 Dec 2019 00:06:43 +0000 Message-Id: <20191213000657.931618-45-dima@arista.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191213000657.931618-1-dima@arista.com> References: <20191213000657.931618-1-dima@arista.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191212_160925_879353_574C4672 X-CRM114-Status: GOOD ( 11.13 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maxime Coquelin , Vasiliy Khoruzhick , Alexandre Torgue , Dmitry Safonov , Greg Kroah-Hartman , Dmitry Safonov <0x7f454c46@gmail.com>, linux-serial@vger.kernel.org, Jiri Slaby , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: linux-arm-kernel@lists.infradead.org Cc: linux-stm32@st-md-mailman.stormreply.com Signed-off-by: Dmitry Safonov --- drivers/tty/serial/stm32-usart.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 2f72514d63ed..5e93e8d40f59 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -8,10 +8,6 @@ * Inspired by st-asc.c from STMicroelectronics (c) */ -#if defined(CONFIG_SERIAL_STM32_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -#define SUPPORT_SYSRQ -#endif - #include #include #include @@ -926,6 +922,7 @@ static int stm32_init_port(struct stm32_port *stm32port, port->ops = &stm32_uart_ops; port->dev = &pdev->dev; port->fifosize = stm32port->info->cfg.fifosize; + port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_STM32_CONSOLE); ret = platform_get_irq(pdev, 0); if (ret <= 0) From patchwork Fri Dec 13 00:06:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 11289585 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8578714B7 for ; Fri, 13 Dec 2019 00:10:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5A8F72073B for ; Fri, 13 Dec 2019 00:10:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VlrgsvZa"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="ZjM0WASa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A8F72073B Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=arista.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LYOKmTIy+YDCgIG61VwZLqu5K+f81ulroUFD5WuVb/Q=; b=VlrgsvZaDD5CZ5 xt3vFwtOaELVZfwlb46aSIKxaOTmXJcOCTI7oqN+SX5Iktk6qlXt8TK5o233vmhdecRieDoTnnXIc LI3ke3YJqCI5Gv3m49hz/V1HewZF0JWxHphR1o/E0yatlGM5X54c3PeX60hFdM+I+ewTkMFsWAXRy JvX1JqyeAWyjuVVz0MlF2kJl+/JaDHegCM5SwC6E9aFXXX87dDi4gr9wu1x4z4Hettevnq31SAJCf x8+1IU+WZrSXTllfcGLv+jmBJS7EV9tK5f+rvOvuBnBM3XZgrYiKttEjBpD3Mbvyktca9A9DLcMYx gVKHfBXFGuqpzOGIB8Pg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYWw-0006RD-Rh; Fri, 13 Dec 2019 00:10:02 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYWg-0006Cl-I2 for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 00:09:48 +0000 Received: by mail-pl1-x642.google.com with SMTP id x13so380708plr.9 for ; Thu, 12 Dec 2019 16:09:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IJ2E958f/h3TR+z5z75agqEzfHRfr6uCgt8ddQ7s9q0=; b=ZjM0WASaUm3158P4aA/qSMiTuTxfZ0g0mnaqn6VQq2A9gp6x/kr2DPY2osBTrCcVOO FeYDIGvkRgR0Sy5Q0c1XfmA+b3xVl+ueMcEQh0SoGPRMO6pVb8czVwHzeq7CUyRD+R3K lsV9Q19RCUEugmfP4IvdYTo19nBAln4FxkhUGA5wX2vsbw/JmDbXxp01HZ6SDbJzrfU7 0akXweakNMC1T9n7nvsK5kVEWHoAWNVX4nFsj/KGnM6kYZ2YjiUIuNWQaAVq6mKZuCj2 Y+EBqOIvzO8p7Yc0T4LHsb5dM9dv2cK30fFPspQT5Tu+lkaIi0WPXm19b4/Z/4nbIFT/ 4QdA== 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=IJ2E958f/h3TR+z5z75agqEzfHRfr6uCgt8ddQ7s9q0=; b=cSCOZ0+x3SgT4VgQh7NrI4KpS7bsLj5Jx93jpXepZZ7exgbOvbPPeHdy7eT216kFvA HJ+OOuGyf9sVbLhSGbjbNTqspKWW4NXRbyw3TJ/tkXM6IDKsp6Lb2D6QRK2vYWji16Wf 1QLU+ERL8/46Ux7oJjYv5U0w73jO2H0iG8rSy+Y+d+MzfXKM6M0KbRXkRCQo+cUR3PwV QlN7+NSV0EHo09yy0zIi+wGEzZ5kC20PG3seaLOOFZgTRkiHEFLGgZTfgsmhNKXfM1AT jYJHnSEodKxTgGNlsx+jX4tMWlUmqu6bOhUshrrOfMFvGPhc/Ucj0aX8gq/mYBlbWJn/ 8I3w== X-Gm-Message-State: APjAAAULJI8Vg+w5bRR8bJWCxlO5WasK6gv2lJVdn15wVmBcPyR+eOzm Ds/FSb40iXocxsQjOZk3iKFLpw== X-Google-Smtp-Source: APXvYqwDYZCTcPhfGFZk4d1JFI8jcLKengT8YOjdiZDuy9hSDm/wiYpEsgokOMWWQd/YlA9PdVg2Rw== X-Received: by 2002:a17:90b:f06:: with SMTP id br6mr13017685pjb.125.1576195785826; Thu, 12 Dec 2019 16:09:45 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id j38sm8317647pgj.27.2019.12.12.16.09.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 16:09:45 -0800 (PST) From: Dmitry Safonov To: linux-kernel@vger.kernel.org Subject: [PATCH 51/58] tty/serial: Migrate vt8500_serial to use has_sysrq Date: Fri, 13 Dec 2019 00:06:50 +0000 Message-Id: <20191213000657.931618-52-dima@arista.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191213000657.931618-1-dima@arista.com> References: <20191213000657.931618-1-dima@arista.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191212_160946_643872_20FA1C6B X-CRM114-Status: GOOD ( 11.50 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:642 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vasiliy Khoruzhick , Dmitry Safonov , Greg Kroah-Hartman , Dmitry Safonov <0x7f454c46@gmail.com>, Tony Prisk , linux-serial@vger.kernel.org, Jiri Slaby , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Tony Prisk Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov --- drivers/tty/serial/vt8500_serial.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c index 3d58e9b34553..764e992438b2 100644 --- a/drivers/tty/serial/vt8500_serial.c +++ b/drivers/tty/serial/vt8500_serial.c @@ -7,10 +7,6 @@ * Author: Robert Love */ -#if defined(CONFIG_SERIAL_VT8500_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -# define SUPPORT_SYSRQ -#endif - #include #include #include @@ -703,6 +699,7 @@ static int vt8500_serial_probe(struct platform_device *pdev) vt8500_port->uart.line = port; vt8500_port->uart.dev = &pdev->dev; vt8500_port->uart.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF; + vt8500_port->uart.has_sysrq = IS_ENABLED(CONFIG_SERIAL_VT8500_CONSOLE); /* Serial core uses the magic "16" everywhere - adjust for it */ vt8500_port->uart.uartclk = 16 * clk_get_rate(vt8500_port->clk) / From patchwork Fri Dec 13 00:06:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 11289589 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D69B3139A for ; Fri, 13 Dec 2019 00:10:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4739206E2 for ; Fri, 13 Dec 2019 00:10:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="swpbAtWF"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="Z/PDy/mV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4739206E2 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=arista.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hMx7Awny7jc0iW4l37PEFanBkbGJSGLZYA4TobzjkZQ=; b=swpbAtWFL1SvbI KA8dzNDSlv2KxFA14UVypdTJvSxeV7cHwQfsgEDH4M4feonvLDUfGA4CF7E1CdcIKABZ14zEAMAhq yM1oP9K3WBuR48hPHSi80wD56F2QfC4VCm2spvk/Sag//JQAaynk1wtnGbdeICUc7ot2bvnDSAYUb ljUVnXiVWT9lXRzQu/mjuWENCOFhpEoDOJICA4fjXMB2lA1UhrWNz8cPkTvDFgkxG6/LCQJ57kM72 PQpgwGlhgy/Kq4H6/SwAm/rGQmgdlZF0cREVl4BNZ5jdkgvj6rf+od1mxzW9vvIspyS+f4axFknLo hMzL+oi5mlx0WHHp5xnQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYXC-0007qJ-4j; Fri, 13 Dec 2019 00:10:18 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifYWk-0006GT-3u for linux-arm-kernel@lists.infradead.org; Fri, 13 Dec 2019 00:09:52 +0000 Received: by mail-pg1-x543.google.com with SMTP id x8so530628pgk.8 for ; Thu, 12 Dec 2019 16:09:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yMq/uVp2bU7wlvZw3KZoovZc3l4G7lkpgRh+6p4cD3E=; b=Z/PDy/mVsZTQqr/IepgWfeO3RQGcdegMuGz3YoVARfv4HpthA8oi8i2KQw6uBDhz33 O4Ow1GEg4g+ZFVImGVpbI1M0s9h/cH7kpfkTKEGX8XgsLS08xVTguobc4MrhmgNwwczx KwoJiECme9OsAKNFUInINhcA04o2VBUuROayRtWWZPFfnQSQEC6tWsz5XMDLIodOAt7d NDOaFUQAFBCjSweyX/Gw9yxlE+PA9WlQxp/bqfdfHXL14bwTBduKD9zMEzL/aXvPpXfn FChEa9mUzsoODPgkqpp5Wrn2rRy+0p3aLx5eVPkkX8gMA80uqMUzR+ZYgmXA7Jp8Ngx9 TZQA== 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=yMq/uVp2bU7wlvZw3KZoovZc3l4G7lkpgRh+6p4cD3E=; b=fBOhucCIN1gC+7AwPLkfJ9OJgEb+/0dMDqXN5oHq7XoOzBxwpgj9xy3IJslZYA/kQC gS2vrf4TECjSC/bJlXWfL3MiHhQMdZ7zn84gNNA9tm0dPQa1NTuOhxhUHTJ5UtbQjMkY HOh1mS9FAxzqeHhXbHqxB3/i9bcmttfjJLf/qZ5iZaruSQQloFcb3eNGD7LN/kbhvhrS LQ4d6RKFS10KWpBnzPz81UTuKRWMtxwV7ZePjMlYX9hOtqiLwUuZ7AYSDAV6J1RUJRgg /RBK8RCwjOqrL7j/gDGKjOVDwKIxPt7h4c4su04Q8zGuoh5YHR96UfJms/wZi4vnEBun siXQ== X-Gm-Message-State: APjAAAXM0VlxG8gfLmZx5lxJnD+eP89fHEVu+FdWrszp2tzdo5UHBwnb RapF/sfH8yJOv+1obpbZcG44KA== X-Google-Smtp-Source: APXvYqwOENiOM4ymiVUwMat/f33ffxUq/FBlNLHyjzgxpbp6j6YG6HK/8dg6aGyVUNuaJlZ5rmXAzg== X-Received: by 2002:a63:f844:: with SMTP id v4mr13352747pgj.71.1576195788732; Thu, 12 Dec 2019 16:09:48 -0800 (PST) Received: from Mindolluin.ire.aristanetworks.com ([217.173.96.166]) by smtp.gmail.com with ESMTPSA id j38sm8317647pgj.27.2019.12.12.16.09.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2019 16:09:47 -0800 (PST) From: Dmitry Safonov To: linux-kernel@vger.kernel.org Subject: [PATCH 52/58] tty/serial: Migrate xilinx_uartps to use has_sysrq Date: Fri, 13 Dec 2019 00:06:51 +0000 Message-Id: <20191213000657.931618-53-dima@arista.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191213000657.931618-1-dima@arista.com> References: <20191213000657.931618-1-dima@arista.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191212_160950_300832_E7127712 X-CRM114-Status: GOOD ( 11.60 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:543 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vasiliy Khoruzhick , Dmitry Safonov , Greg Kroah-Hartman , Dmitry Safonov <0x7f454c46@gmail.com>, Michal Simek , linux-serial@vger.kernel.org, Jiri Slaby , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Michal Simek Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov --- drivers/tty/serial/xilinx_uartps.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 4e55bc327a54..2b5606469bed 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -9,10 +9,6 @@ * in the code. */ -#if defined(CONFIG_SERIAL_XILINX_PS_UART_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -#define SUPPORT_SYSRQ -#endif - #include #include #include @@ -1634,6 +1630,7 @@ static int cdns_uart_probe(struct platform_device *pdev) port->flags = UPF_BOOT_AUTOCONF; port->ops = &cdns_uart_ops; port->fifosize = CDNS_UART_FIFO_SIZE; + port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_XILINX_PS_UART_CONSOLE); /* * Register the port.