From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5CD95223313; Thu, 12 Dec 2024 17:43:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734025396; cv=none; b=ouhVK7AbIWp17uBXBctpvKmOCZsnmqrqTzjvVtHDBnyTkgJcdAQZqPn+qYDeoAgp16VnxxkGFZaMEYFH6o1KMdJL2Lq+WB2yqNETrkp1z3ZNSjHXoHutjbAvbhgwXRctMK+rosSFLbBNbicHS8vFrJ18+t9s1R6NQeqLpljDyvc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734025396; c=relaxed/simple; bh=foLi0UgPkYBibXgGp6IGFN9PNRAJBO2a3rnyuoIH+P0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q9CzcVqS50wPu4gWIcFvZiZv7J+frZBDOxGwrQRmC8+ncd6lTAy/MDT99kc5Ft0PJuAPSj9/GTQjRfHmQZLJIzaGqDwwHZAVALa0U1lknVu/aGL+AfTC27E+xXj9D1O+gvqddQmAUU8eeWj9jrrwt4vHs6bgMH06s3CbblE8XR4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=usnqYgnP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="usnqYgnP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 482BAC4CED0; Thu, 12 Dec 2024 17:43:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1734025395; bh=foLi0UgPkYBibXgGp6IGFN9PNRAJBO2a3rnyuoIH+P0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=usnqYgnPQXSKALNW5sjPUfwoTUwyBWDLF8gwm4uJ8kXki7uOff2PF2adWctlvMljM dSm6kGnBsvfIxeFQTt1Ex12DmuqTqpToPIpHL+ogX0YxqARzuRfNt6f9Gp1aXOgum4 IdPtU7fOLjrnBz3Ji5EhVb277XI0Dd9xIIwq5bT4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Geert Uytterhoeven , stable , Claudiu Beznea Subject: [PATCH 5.4 156/321] Revert "serial: sh-sci: Clean sci_ports[0] after at earlycon exit" Date: Thu, 12 Dec 2024 16:01:14 +0100 Message-ID: <20241212144236.138510769@linuxfoundation.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241212144229.291682835@linuxfoundation.org> References: <20241212144229.291682835@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Greg Kroah-Hartman commit 718632467d88e98816fa01ab12681ef1c2aa56f8 upstream. This reverts commit 3791ea69a4858b81e0277f695ca40f5aae40f312. It was reported to cause boot-time issues, so revert it for now. Reported-by: Geert Uytterhoeven Fixes: 3791ea69a485 ("serial: sh-sci: Clean sci_ports[0] after at earlycon exit") Cc: stable Cc: Claudiu Beznea Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/sh-sci.c | 28 ---------------------------- 1 file changed, 28 deletions(-) --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -3457,32 +3457,6 @@ early_platform_init_buffer("earlyprintk" #ifdef CONFIG_SERIAL_SH_SCI_EARLYCON static struct plat_sci_port port_cfg __initdata; -static int early_console_exit(struct console *co) -{ - struct sci_port *sci_port = &sci_ports[0]; - struct uart_port *port = &sci_port->port; - unsigned long flags; - int locked = 1; - - if (port->sysrq) - locked = 0; - else if (oops_in_progress) - locked = uart_port_trylock_irqsave(port, &flags); - else - uart_port_lock_irqsave(port, &flags); - - /* - * Clean the slot used by earlycon. A new SCI device might - * map to this slot. - */ - memset(sci_ports, 0, sizeof(*sci_port)); - - if (locked) - uart_port_unlock_irqrestore(port, flags); - - return 0; -} - static int __init early_console_setup(struct earlycon_device *device, int type) { @@ -3501,8 +3475,6 @@ static int __init early_console_setup(st SCSCR_RE | SCSCR_TE | port_cfg.scscr); device->con->write = serial_console_write; - device->con->exit = early_console_exit; - return 0; } static int __init sci_early_console_setup(struct earlycon_device *device,