From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D13FDC10F0E for ; Thu, 18 Apr 2019 18:04:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B558218DA for ; Thu, 18 Apr 2019 18:04:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555610685; bh=ZVTWULgxHehvTa+KaN8dM8tNF2RV5AwEJYr+qthuFis=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=BK966oRMj0lfrC7OzcO3RVgDRMmNZ4uZqecoRrpO1eAvFEEzR2KovPh76C9S7JQ/O TxWNifs68URTwQidR2376miX4HttXCN3D26qUdhzOigxLD0J6jN6Kv9C3WvnmAv6Ew OD3HEoMFv6H2FO365SkrkORDfKG/tRh+1gytSkeU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391182AbfDRSEo (ORCPT ); Thu, 18 Apr 2019 14:04:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:33738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390766AbfDRSEl (ORCPT ); Thu, 18 Apr 2019 14:04:41 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DD3D5206B6; Thu, 18 Apr 2019 18:04:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555610680; bh=ZVTWULgxHehvTa+KaN8dM8tNF2RV5AwEJYr+qthuFis=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FL+el6K90M71QSHY3NdIbAAmf3TQl7z6rLAS/GAm+Y7Wz7ljZFtxMvB7NrzxehHId kfzE9j2KaBuZL4ewp0/Z1gzeWxtSDm+1bGAcq3PQAXHYeiEzR1Qaz3MkORSiTfKu7V 6DE6ZX/FDXW7YaFDFBwNorEwu6FZZTxtwoVvrfyM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michal Simek , Sasha Levin Subject: [PATCH 4.14 44/92] serial: uartps: console_setup() cant be placed to init section Date: Thu, 18 Apr 2019 19:57:02 +0200 Message-Id: <20190418160434.027770112@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190418160430.325165109@linuxfoundation.org> References: <20190418160430.325165109@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ 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