Received: by 10.213.65.68 with SMTP id h4csp238152imn; Fri, 23 Mar 2018 03:37:57 -0700 (PDT) X-Google-Smtp-Source: AG47ELsmiv10CKGQPJuEXLXC2NkDaEKQmGsQ6mPq9002owhWips/iOjoVaIEdrXSRmQHve+DEYHk X-Received: by 2002:a17:902:7790:: with SMTP id o16-v6mr4788598pll.294.1521801477651; Fri, 23 Mar 2018 03:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521801477; cv=none; d=google.com; s=arc-20160816; b=orY4xHpDI0oDrIIO+/nt3Y1pmudLmJKpZpQ789waJwY6Zm9PIrrcozPObaxXcr71fo pxnn9xe84Vqnk1ojZthvFDC/44zDwufa6dYBcA3H9x34qNG1lLLfoNGNcCd3wNLTcNHj 4SUAvLZEfyOb5fBfGCTzNUuh+F1F4/Z5lXbBDja5duxBoqvCrk3//ecuooIdeIUpmg3D nJeX/ovwc7mvN+Dw8w6ET/zGHFVXLFw1S+HkelptZntTkwBeicPuzdXDWLPPTcUDJxV3 arT9EyQbXiE/4kxpBwfkYGT14HgP26IqEkpA2aCo7FoBsRXVuhIlg/0iwZKL/yTtvW9Z OhvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Z+o4tJd9KRnuWPeY9dfZNN+VqaJq0R/xnaHIEaKq+0w=; b=ZhRrB4UVUUXU0e79mXjAZ9IIFQUvFdd5XI4CD60KN05lpnTqdZj4gy2/xNwci48gg7 KEJV3z4RxG6XEgpHoHK7mPM9X2iNw4CfjtEnDDoOrdhJcfCSB6jt0BVsh0Ia9kuP0/Le kUaGPqVHutp74XSkCzS/+ndbuwFz43AaQu2ElVHkVxaIJRRoKL6vhna8Y5eKQ7fnpqZs jLhW3oZeg4QiKu69Dtkvn8nvPozMaqTEw38a+ATC7RTVqkF4DZnM4Xqtdv2JhXce+fFo IlPsFcHOfqltRw2bef/A+b1ld7y2gUlmMZBWZJ3PhT8i6N71dl/GkWkmork2PaTTud5F 62Xw== ARC-Authentication-Results: i=1; mx.google.com; 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 y10-v6si8921240plt.533.2018.03.23.03.37.43; Fri, 23 Mar 2018 03:37:57 -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; 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 S933828AbeCWKRc (ORCPT + 99 others); Fri, 23 Mar 2018 06:17:32 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47200 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754388AbeCWKR2 (ORCPT ); Fri, 23 Mar 2018 06:17:28 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0BB63E73; Fri, 23 Mar 2018 10:17:27 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bjorn Helgaas , Sasha Levin Subject: [PATCH 4.4 86/97] vgacon: Set VGA struct resource types Date: Fri, 23 Mar 2018 10:55:13 +0100 Message-Id: <20180323094202.317079898@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094157.535925724@linuxfoundation.org> References: <20180323094157.535925724@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bjorn Helgaas [ Upstream commit c82084117f79bcae085e40da526253736a247120 ] Set the resource type when we reserve VGA-related I/O port resources. The resource code doesn't actually look at the type, so it inserts resources without a type in the tree correctly even without this change. But if we ever print a resource without a type, it looks like this: vga+ [??? 0x000003c0-0x000003df flags 0x0] Setting the type means it will be printed correctly as: vga+ [io 0x000003c0-0x000003df] Signed-off-by: Bjorn Helgaas Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/alpha/kernel/console.c | 1 + drivers/video/console/vgacon.c | 34 ++++++++++++++++++++++++++-------- 2 files changed, 27 insertions(+), 8 deletions(-) --- a/arch/alpha/kernel/console.c +++ b/arch/alpha/kernel/console.c @@ -20,6 +20,7 @@ struct pci_controller *pci_vga_hose; static struct resource alpha_vga = { .name = "alpha-vga+", + .flags = IORESOURCE_IO, .start = 0x3C0, .end = 0x3DF }; --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -409,7 +409,10 @@ static const char *vgacon_startup(void) vga_video_port_val = VGA_CRT_DM; if ((screen_info.orig_video_ega_bx & 0xff) != 0x10) { static struct resource ega_console_resource = - { .name = "ega", .start = 0x3B0, .end = 0x3BF }; + { .name = "ega", + .flags = IORESOURCE_IO, + .start = 0x3B0, + .end = 0x3BF }; vga_video_type = VIDEO_TYPE_EGAM; vga_vram_size = 0x8000; display_desc = "EGA+"; @@ -417,9 +420,15 @@ static const char *vgacon_startup(void) &ega_console_resource); } else { static struct resource mda1_console_resource = - { .name = "mda", .start = 0x3B0, .end = 0x3BB }; + { .name = "mda", + .flags = IORESOURCE_IO, + .start = 0x3B0, + .end = 0x3BB }; static struct resource mda2_console_resource = - { .name = "mda", .start = 0x3BF, .end = 0x3BF }; + { .name = "mda", + .flags = IORESOURCE_IO, + .start = 0x3BF, + .end = 0x3BF }; vga_video_type = VIDEO_TYPE_MDA; vga_vram_size = 0x2000; display_desc = "*MDA"; @@ -441,15 +450,21 @@ static const char *vgacon_startup(void) vga_vram_size = 0x8000; if (!screen_info.orig_video_isVGA) { - static struct resource ega_console_resource - = { .name = "ega", .start = 0x3C0, .end = 0x3DF }; + static struct resource ega_console_resource = + { .name = "ega", + .flags = IORESOURCE_IO, + .start = 0x3C0, + .end = 0x3DF }; vga_video_type = VIDEO_TYPE_EGAC; display_desc = "EGA"; request_resource(&ioport_resource, &ega_console_resource); } else { - static struct resource vga_console_resource - = { .name = "vga+", .start = 0x3C0, .end = 0x3DF }; + static struct resource vga_console_resource = + { .name = "vga+", + .flags = IORESOURCE_IO, + .start = 0x3C0, + .end = 0x3DF }; vga_video_type = VIDEO_TYPE_VGAC; display_desc = "VGA+"; request_resource(&ioport_resource, @@ -493,7 +508,10 @@ static const char *vgacon_startup(void) } } else { static struct resource cga_console_resource = - { .name = "cga", .start = 0x3D4, .end = 0x3D5 }; + { .name = "cga", + .flags = IORESOURCE_IO, + .start = 0x3D4, + .end = 0x3D5 }; vga_video_type = VIDEO_TYPE_CGA; vga_vram_size = 0x2000; display_desc = "*CGA";