Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3797472ybi; Mon, 29 Jul 2019 12:49:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+CjaJRgAphpJHy/lflQOjnDMeYFOjrF0mPGfjlMSOtd+LeWKBuDOe3XMD2L9bF25SdxYJ X-Received: by 2002:a63:f304:: with SMTP id l4mr104840334pgh.66.1564429775051; Mon, 29 Jul 2019 12:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429775; cv=none; d=google.com; s=arc-20160816; b=Uz7Z1MeThnLZXNnUVdjo1bWEYc161jVV5BpHrZk2EUGvvQGtQnHjR/285muREtgRUD Kx/ylNKsQTRmyJ76Y8c3xqzq+6tnAMT2w8c5PTsbFwPqZfxWuz0tgu7kAhcR/aXrySnJ qckJe08pbSmh1oB6SKIQBiDNJaKmSxm1xOhAdyxUQsVdB+XCqDguyB9do089y2X13YCD 8B4fkQ8aA+2OSMVPPtAWlJPYs9EQBKuxj7CgvCRZLjpC1WqKedVMeh1/Mw//tlflZShU jrlmNuqlAE999Wgp6XmiYGtiQWcUw3MlnmADYx6CFESaVjPbU3vLC4UtKD3yjevigIyp jo0g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0IKEobInrqDJmFsAr4wbzKCovJ644C7BE+3u8h1Ah64=; b=Y5G55pok68fmYznxhV0o9yLTBB9S7S8eBwd5vT669Rr+gMSyFFM/DfxqAcX9HcQAOI 7ANyA7DGh4AKdEsQN+8mH6x7KuvdoVdF7vbcNpo7ETeH32mOEG4DgsC0jcEWTiavuFp8 n+n5ihfG+AtRW7C4/UBrgJZ4s3z0AW2xkNOqa7lW/NwRTtUG66g4JECSLxGR0ICjsjqu IkqWXF5gwHmT4hj/RkJNcn4PN5+mcgs6jyqEL5oI5yOfR8ArGribFXRiALxCWTnnfSly jp71ikzmjaA33Rfv+vj3eSfzFF1PtdDZYMRl63Q5EJCi5OpdvjNQiiBKcIwEr4p4jb4V EbdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rZjTVRwC; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f20si30563078pfn.166.2019.07.29.12.49.19; Mon, 29 Jul 2019 12:49:35 -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=rZjTVRwC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390396AbfG2TsF (ORCPT + 99 others); Mon, 29 Jul 2019 15:48:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:38018 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729316AbfG2TsF (ORCPT ); Mon, 29 Jul 2019 15:48:05 -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 A26C720C01; Mon, 29 Jul 2019 19:48:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429684; bh=dPWXnPoMNQ/AGftH0Fj6+yl480hMzVScjFP8uUDm/xs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rZjTVRwCM1J5keUG+WArQitLFOUXmz4ilRdpXJ8tx7wHoraAa4zEqTxLDZdZb2S5W vEVeXNC0EPD7ga+bNZLg/IkN8Hav1vi7OjJaeL3hSmdbqhltF4hqeqTiLSs4c1ElYR hAc3kpClzBVNUhjrWQoQC9Pq4z4Sh+2ks/Hwlsjc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John Paul Adrian Glaubitz , "David S. Miller" , Sasha Levin Subject: [PATCH 5.2 060/215] sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg Date: Mon, 29 Jul 2019 21:20:56 +0200 Message-Id: <20190729190750.925642226@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@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 07a6d63eb1b54b5fb38092780fe618dfe1d96e23 ] In d5a2aa24, the name in struct console sunhv_console was changed from "ttyS" to "ttyHV" while the name in struct uart_ops sunhv_pops remained unchanged. This results in the hypervisor console device to be listed as "ttyHV0" under /proc/consoles while the device node is still named "ttyS0": root@osaka:~# cat /proc/consoles ttyHV0 -W- (EC p ) 4:64 tty0 -WU (E ) 4:1 root@osaka:~# readlink /sys/dev/char/4:64 ../../devices/root/f02836f0/f0285690/tty/ttyS0 root@osaka:~# This means that any userland code which tries to determine the name of the device file of the hypervisor console device can not rely on the information provided by /proc/consoles. In particular, booting current versions of debian- installer inside a SPARC LDOM will fail with the installer unable to determine the console device. After renaming the device in struct uart_ops sunhv_pops to "ttyHV" as well, the inconsistency is fixed and it is possible again to determine the name of the device file of the hypervisor console device by reading the contents of /proc/console: root@osaka:~# cat /proc/consoles ttyHV0 -W- (EC p ) 4:64 tty0 -WU (E ) 4:1 root@osaka:~# readlink /sys/dev/char/4:64 ../../devices/root/f02836f0/f0285690/tty/ttyHV0 root@osaka:~# With this change, debian-installer works correctly when installing inside a SPARC LDOM. Signed-off-by: John Paul Adrian Glaubitz Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/tty/serial/sunhv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c index 63e34d868de8..f8503f8fc44e 100644 --- a/drivers/tty/serial/sunhv.c +++ b/drivers/tty/serial/sunhv.c @@ -397,7 +397,7 @@ static const struct uart_ops sunhv_pops = { static struct uart_driver sunhv_reg = { .owner = THIS_MODULE, .driver_name = "sunhv", - .dev_name = "ttyS", + .dev_name = "ttyHV", .major = TTY_MAJOR, }; -- 2.20.1