Received: by 10.223.185.116 with SMTP id b49csp5959566wrg; Wed, 7 Mar 2018 22:41:05 -0800 (PST) X-Google-Smtp-Source: AG47ELuE2PNA/d55bxfusZ1JSnyRFMRbd1Hb2VAZLAoODxJwqQdrwUUflXv2H0EPT/aC6RZD7RoJ X-Received: by 10.98.112.6 with SMTP id l6mr1333791pfc.61.1520491265282; Wed, 07 Mar 2018 22:41:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520491265; cv=none; d=google.com; s=arc-20160816; b=ABRBaESVBLR+h/IYY4V9gdOmTtC4Cl1CDInjyFETy4VYK2UNMcWmPFNVXVyulkme2c dss57f2U9koE+uSWJ2+YO/JhSj/XVY01SL69eNCB/IdhxDh6MDlbzYhD4janl0n4rbPt cCcqJ9CM6LH05COr3ZV9VKYzLhf+FcJrEkMHiOz8Rs8WnRrHve3tAgWzjh/40XdLNdQU Zig+Lu40D8dPj1l7YutG1zg1OYhCWKil+DgtuO6DbPzZb+Pv6o8Bwr1OksxKlvZ9jnrn APStnWG1BxPsoB/huF91sUgSRUtYzu891qJVK9IzwtnE9gGLMNvO3XO4zzrpMaAogspO iEtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=hv+Rj28jMWPhNp2fd3NUblTZQGsEyY8tGJLrUOhHw3g=; b=XvnLWW8MDrbN+eorDexSKOzueaoENtnixau3vJvpM5zoG8WVn0YSsODcOQPEXF/HFj ioL5jd+0+fceIz6VKxTbysGlYCXFw8LAZaxSd35Zdg52Ujt3BhgJdLz171TpzZXhlehL +1z6HN7XLjD1BXxgx/W0s5nYl1SXmge+6CesLlMeKmzd4k9p2haglwSjtMjtyIn+8g7v vPAXGBr3XsPnTYsqX3wAt/fx53W9XW0KvTWSKFfQmu+HEUB5Eog1ub4zvWSI44CtflSP 20M/2Lp8QnCKnzQKFXvaZWIxjLupylxagwWgi6ctqgUzCjQKweNl9fkCrT2fAeNlEZ3D egcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=V9OSeY1/; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d5si12506002pgf.616.2018.03.07.22.40.50; Wed, 07 Mar 2018 22:41:05 -0800 (PST) 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=@microsoft.com header.s=selector1 header.b=V9OSeY1/; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965330AbeCHE7L (ORCPT + 99 others); Wed, 7 Mar 2018 23:59:11 -0500 Received: from mail-sn1nam01on0102.outbound.protection.outlook.com ([104.47.32.102]:61147 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935357AbeCHE7B (ORCPT ); Wed, 7 Mar 2018 23:59:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=hv+Rj28jMWPhNp2fd3NUblTZQGsEyY8tGJLrUOhHw3g=; b=V9OSeY1/YWf2kmHBbh5DVT1oHRWNWUyz/SRkocVKpROkSOYXrxrL/2DCD7z4lkhvOont/iT51qTXWVvxngr7TYDYvaj+Y/J0LUriQkBWONTJeJqDm++adK4K4ntrYF5zt9OW3nOaPCfGi8cWQJD/E94JS/dh6quyQhZKx28yfwA= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1015.namprd21.prod.outlook.com (52.132.133.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.3; Thu, 8 Mar 2018 04:58:57 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0588.008; Thu, 8 Mar 2018 04:58:57 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Bjorn Helgaas , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 40/67] vgacon: Set VGA struct resource types Thread-Topic: [PATCH AUTOSEL for 4.14 40/67] vgacon: Set VGA struct resource types Thread-Index: AQHTtpoBDOV2xT9m/kOS9QAvGUgG1w== Date: Thu, 8 Mar 2018 04:57:49 +0000 Message-ID: <20180308045641.7814-40-alexander.levin@microsoft.com> References: <20180308045641.7814-1-alexander.levin@microsoft.com> In-Reply-To: <20180308045641.7814-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1015;7:61eHJCOlyiikz9d/lCZYaKXarZ3AwsFVlmlVruuDgTJWdKpM7eNT2uC3X7c7wHjlqP0JQnyiWK/hsaNxq4oOaNBX6YdP0Nl44S2OBmTMO8vjOkZDHTG061sIZ0an1spJxvez7Dkaw6U3gtp0iF5FnI6ZE8u8+TKRMPJJ3sgIjjwU3NtgoeUS1pbsNo9d5rjOqJs8qzWt4ohhZrtyHpyWf68smYOODQeYrL1jVH8xKCbNggmAnrfOqYQATXWI4Js6;20:/Hxy9IuBfoXo1+QPSjAZNrbKeuN65fK6L/STF20EHZ/LRycPv4C3ZJS6FWLrJ/xseNkRE5TjTSYxwV97NO2H0fFMWCuWy0YCEtw0PSW42Os2aGyli4f/R/lZCix/woksSUsHnaeobQe4beLgtZkeKEPF0IEpe1RiezI6MdxnTJw= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 8940cf2d-3085-4ff4-a790-08d584b14d0a x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1015; x-ms-traffictypediagnostic: DM5PR2101MB1015: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(211936372134217)(153496737603132); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231220)(944501244)(52105095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041288)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB1015;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1015; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(396003)(366004)(39860400002)(39380400002)(346002)(189003)(199004)(6116002)(53936002)(1076002)(107886003)(3846002)(3660700001)(10090500001)(6666003)(2950100002)(2906002)(6512007)(99286004)(8936002)(6486002)(76176011)(6506007)(68736007)(59450400001)(316002)(110136005)(81156014)(81166006)(8676002)(54906003)(3280700002)(2900100001)(6436002)(97736004)(72206003)(25786009)(10290500003)(86612001)(4326008)(305945005)(7736002)(66066001)(22452003)(478600001)(5660300001)(86362001)(14454004)(106356001)(36756003)(102836004)(5250100002)(105586002)(26005)(2501003)(186003)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1015;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: SbBEjW2kLsojt2J3a4J8GEIYj6ZxuMmRNTL8acB6TFbLrTmkPIgvt/AgAsKUWV8r/eRUMO2/AgZZrbgb6UcupWr7nh/XNSOmkSiKBF4SFdeTzIQEkeMQb0xiviXj3BAbhaGpLPWEfw/907N2wiDtqsaULFl1XGdc9FMgLWrN1E0x/SVEIT8qlXS4YUaF4sXPPcUowPqJqdA1P9Df+oU5Wtkyt1Hnhohhtwi91OFIRMaG+Ou1Rx5wTcqeGOF2LT5MMVrA6B6Cc3PFM7sat7gI2+DVfNd1X1th4udxS3arBKJG5xBkJn/taO0z4uBK85s0nTntcw1FR0zUSgVD4KlaXw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8940cf2d-3085-4ff4-a790-08d584b14d0a X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 04:57:49.0400 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1015 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/alpha/kernel/console.c | 1 + drivers/video/console/vgacon.c | 34 ++++++++++++++++++++++++++-------- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/arch/alpha/kernel/console.c b/arch/alpha/kernel/console.c index 8e9a41966881..5476279329a6 100644 --- a/arch/alpha/kernel/console.c +++ b/arch/alpha/kernel/console.c @@ -21,6 +21,7 @@ struct pci_controller *pci_vga_hose; static struct resource alpha_vga =3D { .name =3D "alpha-vga+", + .flags =3D IORESOURCE_IO, .start =3D 0x3C0, .end =3D 0x3DF }; diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.= c index 445b1dc5d441..a17ba1465815 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -422,7 +422,10 @@ static const char *vgacon_startup(void) vga_video_port_val =3D VGA_CRT_DM; if ((screen_info.orig_video_ega_bx & 0xff) !=3D 0x10) { static struct resource ega_console_resource =3D - { .name =3D "ega", .start =3D 0x3B0, .end =3D 0x3BF }; + { .name =3D "ega", + .flags =3D IORESOURCE_IO, + .start =3D 0x3B0, + .end =3D 0x3BF }; vga_video_type =3D VIDEO_TYPE_EGAM; vga_vram_size =3D 0x8000; display_desc =3D "EGA+"; @@ -430,9 +433,15 @@ static const char *vgacon_startup(void) &ega_console_resource); } else { static struct resource mda1_console_resource =3D - { .name =3D "mda", .start =3D 0x3B0, .end =3D 0x3BB }; + { .name =3D "mda", + .flags =3D IORESOURCE_IO, + .start =3D 0x3B0, + .end =3D 0x3BB }; static struct resource mda2_console_resource =3D - { .name =3D "mda", .start =3D 0x3BF, .end =3D 0x3BF }; + { .name =3D "mda", + .flags =3D IORESOURCE_IO, + .start =3D 0x3BF, + .end =3D 0x3BF }; vga_video_type =3D VIDEO_TYPE_MDA; vga_vram_size =3D 0x2000; display_desc =3D "*MDA"; @@ -454,15 +463,21 @@ static const char *vgacon_startup(void) vga_vram_size =3D 0x8000; =20 if (!screen_info.orig_video_isVGA) { - static struct resource ega_console_resource - =3D { .name =3D "ega", .start =3D 0x3C0, .end =3D 0x3DF }; + static struct resource ega_console_resource =3D + { .name =3D "ega", + .flags =3D IORESOURCE_IO, + .start =3D 0x3C0, + .end =3D 0x3DF }; vga_video_type =3D VIDEO_TYPE_EGAC; display_desc =3D "EGA"; request_resource(&ioport_resource, &ega_console_resource); } else { - static struct resource vga_console_resource - =3D { .name =3D "vga+", .start =3D 0x3C0, .end =3D 0x3DF }; + static struct resource vga_console_resource =3D + { .name =3D "vga+", + .flags =3D IORESOURCE_IO, + .start =3D 0x3C0, + .end =3D 0x3DF }; vga_video_type =3D VIDEO_TYPE_VGAC; display_desc =3D "VGA+"; request_resource(&ioport_resource, @@ -494,7 +509,10 @@ static const char *vgacon_startup(void) } } else { static struct resource cga_console_resource =3D - { .name =3D "cga", .start =3D 0x3D4, .end =3D 0x3D5 }; + { .name =3D "cga", + .flags =3D IORESOURCE_IO, + .start =3D 0x3D4, + .end =3D 0x3D5 }; vga_video_type =3D VIDEO_TYPE_CGA; vga_vram_size =3D 0x2000; display_desc =3D "*CGA"; --=20 2.14.1