Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2230511ybi; Thu, 20 Jun 2019 11:15:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzxLclWNb9+QRGSdBQ/jIQ9YONZtSkDr7Y4VG1wF4AW5gQlOJHwNqv6PmVcvQJxVeFClVAQ X-Received: by 2002:a17:902:9898:: with SMTP id s24mr27248270plp.226.1561054530338; Thu, 20 Jun 2019 11:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561054530; cv=none; d=google.com; s=arc-20160816; b=MW0FHLW64onEmmJ6ziNHTJjdxsP14hINkPK+GgJsyAIoBP7yZHNsbVhUzsqFJWz3tD +ueOkxY2aRuD065KGQdnv4w0AEeeq3N5MrPfZn9gZHGH0/2AOQVnW2/QH3CQE52DyJyA flF1FDGzI2/UFdcWze5L9bIwTf5T/umU5HVUA7O0l2bZlvGvm94hlu2MluQViMApa4GU mHFW+NXzUdRuT5i0lQNNfFqYgV7Eo/uQd4+4Ux3tX5+Kpne7ARh+o33kjQgu+iw2nLyp iQHHumt0V0XJq4vLHU9yiaey+BTfZ75BG07W24CLVdhor4XL/Vq+Xo5g+O/QC7SvqErI sFtQ== 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=bbx87UYP8QwOPaWAxNi8GAAXffKh4y3HK4riuQEB82s=; b=vvWl8Exs0M7C61dJw/8gZSaz8FamSBLkXqjX0fOUuk9qc8QvjzQG1bHtV5C2btDxWs nj9fpGM0rCTB6htVTfM1eST1YwQ6RBOeTdFbzJNelTDvMcbTMwuPwvwHg7H04xfKfp19 NUTqMNrilSzi7vL2uLyOE9Y0Q33hggoC+WBAKjU7jJi9iAWtzhvtwNqD5uR4jTxsEpS9 cRVOpvCfzIkGxMwWmeuq/t6WCG6jsullKF9nDIYb5miVNKhce+J3ovuEPOBAOi+rb9hL CnsXSCE8o8i3ML+jbKfbdPCE5mXdjt7R1FyPfiqvnFexoFLQmwreFYpbwF5+UBbbWphk m9/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cP7msR1l; 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 o39si401431pje.28.2019.06.20.11.15.15; Thu, 20 Jun 2019 11:15:30 -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=cP7msR1l; 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 S1729558AbfFTSPK (ORCPT + 99 others); Thu, 20 Jun 2019 14:15:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:43748 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729550AbfFTSPI (ORCPT ); Thu, 20 Jun 2019 14:15:08 -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 A404C205F4; Thu, 20 Jun 2019 18:15:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561054507; bh=0Y6kIeY0L6yEjnbxo0rO+2g48CwMEk1CvaHVEL/4CBE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cP7msR1l5TmlIXjH0W36/fsEkdTn6ZEYezVG5+qAM/e99oMfFlpLNL9m4kqSgSbRG ZspJ/6SAOXuaIY75bxgXVHLZuDCBDao+qcKUjJ26uyS4QoLjPwQ9Tq4RziK2iEqLeK r6K19czimgvbHc44oSMmgnwSxmIvlDRp3DDdzyWY= 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" Subject: [PATCH 5.1 13/98] sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg Date: Thu, 20 Jun 2019 19:56:40 +0200 Message-Id: <20190620174349.918337068@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190620174349.443386789@linuxfoundation.org> References: <20190620174349.443386789@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 From: John Paul Adrian Glaubitz [ 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: Greg Kroah-Hartman --- drivers/tty/serial/sunhv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 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, };