Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp2080806ybb; Fri, 29 Mar 2019 18:32:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqy46lXBkEf5QCdKAqt57MGBI/jIUjQ2ztKohKGK7sV6gArLVY4hkYbUKc4z3FaDfnLyn1DS X-Received: by 2002:a63:460a:: with SMTP id t10mr47741539pga.354.1553909552382; Fri, 29 Mar 2019 18:32:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553909552; cv=none; d=google.com; s=arc-20160816; b=rNBZ5FxwSR3cvluAIpf/qlVdQtzJ3R/x6VQK6VQoahO1u3GUiJhoGOmTguM6gUKQZL 0YJpjCgw+3dB6FYKrD6LGSF6NzpwQ+DtHuGJadC5Cy04YOrT8P5tER1rVVbHX+Yls4In YKP+TkPsUyzL8wPOGspqu9YM5PIffGlk5egKUS6NDSYvAooBhujr5IZRXPpvgvEtBkVf gpZU6TmSbMGrvBECP1Z2pDeuvnuYXrssr07MFvTYiklWwof0dHKXqtbuEs4HdYoFH0oX ojsOxYUpcaaKN9NCcVdrRdnZGoeP3CHzIshGLWu+vRTu8i2msasxvze7sPCYVuVDjEL9 F0Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=a1MLZ6rbpW4PsV43OTDKfg+YpjwiRzf2KlBB4U9wti0=; b=s+uX30/dPmmWpZmbv7XltnQHF4Wz7xKIjSHs7cjWGuPAtTBK3XEN3CE3nE2AcQowxt pTVtepS1/hGVyUOKPSmrsVbgoIIK6BpZtwU/bMVIWK46ImphMNUSFIIzjnrxVWvshYT/ UdcvpGv/paB1zJ46Xl4xDfFCW9wL9ktNxiCwAqiHKaugBQAtYzGvwkln7UJXw6f5CXaH G01EcIeWRo5v9n8UBZFNDuA2eIMTVQH/XA0wl6ZayjM+7ThhZXT218eOXySKpf/jPWYn hER3bdkVFzH35yOwpPD1giKDDYdJWiHoRWosbgLk5njLzUyQFKY6tb8Dx8wXARv4vSvl D2OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VB2Srvqd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h6si3046732pfn.229.2019.03.29.18.32.17; Fri, 29 Mar 2019 18:32:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VB2Srvqd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731684AbfC3Bab (ORCPT + 99 others); Fri, 29 Mar 2019 21:30:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:37774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731648AbfC3Ba3 (ORCPT ); Fri, 29 Mar 2019 21:30:29 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A0D7D218D3; Sat, 30 Mar 2019 01:30:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553909429; bh=Xe+F8AMn/oMUKBuJALQBNrirq8eQsJho9L4iIQTQiSw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VB2Srvqdg2kLNnquY/j3l3ujEwPqRztclMJzNSxtUJ38jKdYJ24W9vHN+Djhh0PRk ldgnVLn16sL7w5aduBRqqh19XdqfgQpzNb6idIMdQHQzgK80kLEZyj8nhVWQJOot/6 vU/QJ/toiNktoz4M/VOmEedVemki/fKFOeaWNnRY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Michal Simek , Greg Kroah-Hartman , Sasha Levin , linux-serial@vger.kernel.org Subject: [PATCH AUTOSEL 4.14 07/37] serial: uartps: console_setup() can't be placed to init section Date: Fri, 29 Mar 2019 21:29:50 -0400 Message-Id: <20190330013020.379-7-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190330013020.379-1-sashal@kernel.org> References: <20190330013020.379-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michal Simek [ Upstream commit 4bb1ce2350a598502b23088b169e16b43d4bc639 ] When console device is rebinded, console_setup() is called again. But marking it as __init means that function will be clear after boot is complete. If console device is binded again console_setup() is not found and error "Unable to handle kernel paging request at virtual address" is reported. Signed-off-by: Michal Simek Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/serial/xilinx_uartps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index f438a2158006..b0da63737aa1 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1270,7 +1270,7 @@ static void cdns_uart_console_write(struct console *co, const char *s, * * Return: 0 on success, negative errno otherwise. */ -static int __init cdns_uart_console_setup(struct console *co, char *options) +static int cdns_uart_console_setup(struct console *co, char *options) { struct uart_port *port = &cdns_uart_port[co->index]; int baud = 9600; -- 2.19.1