Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp2079646ybb; Fri, 29 Mar 2019 18:30:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7nGNO9EvtgvE0Axr4IztnOFe1cQtE9Pc38eeN82CHcVgpt9yMACpalq5OyO3KZghysxcd X-Received: by 2002:a17:902:361:: with SMTP id 88mr52606154pld.78.1553909446983; Fri, 29 Mar 2019 18:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553909446; cv=none; d=google.com; s=arc-20160816; b=aGcDo2st1yurDs/ZpZUxckpm0f0TRzG3H7/JexAzo0ruijL0sfLEdEa53vAqX8pHEr MvBXx5xKvVyJO+mYj80JnUAxIqeAIvAUyBkIx6apPbF7AW5Khz0nk4865HGHLrunpZPU SQipDpBAkYIR7yoyeKM9dIAnxFxbrk+Y0T2iYCwyzJCm4YwIrA7SmzblpXyjuLGjIC+g wYFraC+aQnPsoyjBpyVkd5NR+TWwWg/hVZkzjNwKKPAitFsKzkDO5w5IDwAIxMRRrA6y QatLn/Ri5rUfMiPt8FZc/6ZpVXJkso0yVeX8NCPJ8w6NcP2CI79AaEfTn35E1ZawOg3Z elzg== 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=0Db4TdSCSsrj0dSSLPMgTLLMMae7WXQVvCXUnvVt2Ks=; b=tccekAIjGSEsfURH2LTxkCBy7R/2Fl7WFwXnVEZGDtdDiOr7Zp4/R/mQaW9dXBo3Jd rAyy90/OkndGTU59f+kRk16DxSRyH6QX3EWBs6N/ngjCpS/vf9gnkdWCQT7mZw8Cf0WU 2rhorXPAUe32xVGbCYaO6vlGuL3IMISaeS1pZCILXUc8IwvqYOQ08ZygII1GE8UcWng8 8PIVDKgv1it5sjW40+vmOqh82l18DlPD3lT7kvlcSb1EI+QrzvaMWuHYWNrBofmuv8md W33y2jf5L/15sjen0dbOduW0WrKkWRpPAJ80+Z/sGL9kFRxuNJ8dvOJXKKrPbm5/O6M3 ZHyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gNfErQpD; 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 c15si3123766pga.465.2019.03.29.18.30.32; Fri, 29 Mar 2019 18:30:46 -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=gNfErQpD; 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 S1730883AbfC3B3M (ORCPT + 99 others); Fri, 29 Mar 2019 21:29:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:35940 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730784AbfC3B3H (ORCPT ); Fri, 29 Mar 2019 21:29:07 -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 D66D0218FE; Sat, 30 Mar 2019 01:29:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553909346; bh=PThzBADCX0C/qtnyMJHLAXilgCeKap49mscGIklJ5us=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gNfErQpD9hddImFqdgUfJ4eG6M/pJvtbUK9JgbcQt6ChkNkYSVzBJKLofGZkCcJfJ yIkQdX6j8+dlNyEXTmrDo2M3Oghuft59A07lg/pIz4Qq35D7kcebbpmmuN9rCnEeru 8JZniFKnVzdvCKWGFsiQ6iB9KLjhUff6gBIo0Sto= 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.19 10/57] serial: uartps: console_setup() can't be placed to init section Date: Fri, 29 Mar 2019 21:28:03 -0400 Message-Id: <20190330012854.32212-10-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190330012854.32212-1-sashal@kernel.org> References: <20190330012854.32212-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 0e3627289047..77efa0a43fe7 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1223,7 +1223,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 = console_port; -- 2.19.1