Received: by 10.223.185.116 with SMTP id b49csp5901600wrg; Wed, 7 Mar 2018 21:24:36 -0800 (PST) X-Google-Smtp-Source: AG47ELuxF2ECJx+sO2PxuulK1qK8dPYOtMkQedUBZ3l9DiXU/VHB+ZBJ2kMI+/jJM7f9xuhpMGv3 X-Received: by 2002:a17:902:2b84:: with SMTP id l4-v6mr22982227plb.338.1520486676352; Wed, 07 Mar 2018 21:24:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520486676; cv=none; d=google.com; s=arc-20160816; b=VASMIblIfwxXhtBdTFyGLb4M8fmeMHBuvDm9w4PUs3uKfiBj5AVEYU5dLe1KMKhmvD Ntsb8QzMsQbzSy00f87Z8ZXXCiMjGcq9d9IysVuDkAX1cnZdPK0vuoNKI+O1cnpOYPP5 pCLHmKqYPk7LupFwBVJCCgL/1xVerCpFQW2mbVqGctwWX5StcvGpMZWDc9elKFvt41Tg GKsEhFVdhc/BM3HOqcqVAnBdturG99x7VeSpv6a8CHh8H96ON/fJxr4VCUearXYuzzlZ A+C2IfZ5IKgS2LgQrzyai6W5EflWV9tU1CujGygmqNZ4H6r0Pz+WKS38H/fxsyex0ge7 Fpqw== 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=KzmDdEK5Bz/X4aiAU+SgtejbinoEIiDL2064heSIqvk=; b=In2rCxyVlN445FDrz1bgwUFd4/ctP31qMBhsdGn52ZUwMrnKBX+1+alSukTMHItAsW FfAQ2KmdlETm+Dc3ICGRTeXPAgi8EQzaTcUPPM7CBWFXhMgGTZJmmRis2vfpJYCH5jCj qQMo1pJynimqtUYx0Ew1BI/Gca3A2RJCcE5Pch0arG1OfvvtTK7YoH6Op3y9RPqEQoc7 MnkXUAKv8Ko7bgf+hLg+qATFecGRb8okP66znqBpWExVnl6XAoV4fvcfodxbI+qD9MsX IfO4fwF81qlKTIu5LBJsrEbEz2ZyBAX5OSAuBo3FaqHHp50Hnopaz2wIO/VUC7NocHqI 0ggw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sooners.onmicrosoft.com header.s=selector1-ou-edu header.b=Ie95erCZ; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ou.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2si12478081pga.143.2018.03.07.21.24.21; Wed, 07 Mar 2018 21:24:36 -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=@sooners.onmicrosoft.com header.s=selector1-ou-edu header.b=Ie95erCZ; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ou.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966781AbeCHFXd (ORCPT + 99 others); Thu, 8 Mar 2018 00:23:33 -0500 Received: from mx0a-00272701.pphosted.com ([67.231.145.144]:52580 "EHLO mx0a-00272701.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966464AbeCHFXO (ORCPT ); Thu, 8 Mar 2018 00:23:14 -0500 Received: from pps.filterd (m0107985.ppops.net [127.0.0.1]) by mx0a-00272701.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w285MXpY003475; Wed, 7 Mar 2018 23:23:11 -0600 Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp0022.outbound.protection.outlook.com [216.32.180.22]) by mx0a-00272701.pphosted.com with ESMTP id 2gjth7gje9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 07 Mar 2018 23:23:11 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sooners.onmicrosoft.com; s=selector1-ou-edu; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=KzmDdEK5Bz/X4aiAU+SgtejbinoEIiDL2064heSIqvk=; b=Ie95erCZ7KYGbw1ohMgth09tmMPgYpSCq7IQWy0A/mZixRuQi43+9kpZlkqy9nJzwFKbD7NfZkJ1YSagXwe3ac/5Sj0Sf3OYg6BBpRz41F5MdBTUOqXUsGNPKGYrOp7ME4YkeiJIUbT7MUIG8uwta1qnfJ+C90xtKnsKC12e3Vg= Received: from DM5PR03MB3035.namprd03.prod.outlook.com (10.175.107.17) by DM5PR03MB2940.namprd03.prod.outlook.com (10.175.106.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.567.14; Thu, 8 Mar 2018 05:23:09 +0000 Received: from DM5PR03MB3035.namprd03.prod.outlook.com ([fe80::9051:8390:78c:ce6a]) by DM5PR03MB3035.namprd03.prod.outlook.com ([fe80::9051:8390:78c:ce6a%15]) with mapi id 15.20.0567.012; Thu, 8 Mar 2018 05:23:09 +0000 From: "French, Nicholas A." To: "Luis R. Rodriguez" , Andy Lutomirski CC: "hans.verkuil@cisco.com" , "linux-kernel@vger.kernel.org" , "linux-media@vger.kernel.org" Subject: Re: ivtv: use arch_phys_wc_add() and require PAT disabled Thread-Topic: ivtv: use arch_phys_wc_add() and require PAT disabled Thread-Index: AQHTsXBOQGvUe478EUWv+ObGTFYl4qO7oBEAgAgWYqaAAXQ9gIAAhKi/gAATUYCAAAJIgIAADbrR Date: Thu, 8 Mar 2018 05:23:09 +0000 Message-ID: References: <20180301171936.GU14069@wotan.suse.de> <20180307190205.GA14069@wotan.suse.de> <20180308040601.GQ14069@wotan.suse.de>,<20180308041411.GR14069@wotan.suse.de> In-Reply-To: <20180308041411.GR14069@wotan.suse.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [70.185.212.125] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR03MB2940;7:LWSEYzvrtgmEqX0Gu1dD1DenXVRR2JZtPt/C72n82f8AgGxrkckOk35y/GXZLmeX/nxomFbdZ7Ut5cAGlY+s94JkeS+IGRsOCbs22Rn7rAwOndpaTFZVaq3zyutLrCNv1qE+0UKBJ56m/X/17ForjowPybbSoQI4TDq1B8ThUwNwFXhLKuuKbPpdLQBXOZTHVOh9U6iHUg+juXYmVpaWoY54XhOw0M0gcjnXzzn1mt0QHUVXFA4U4Z5xkSZOQPXC;20:ny6mUx7Mo376JSI03Hf52nGcuXSfs/DunooTRgUA/BzLSRaGbMNMhNA8hxaiN9oQhvtK/6We/cr/GyANTKFDRjsMHjHF0a5oFebD+v0NGeBW3GrDlU8/YbnwXjK4rXz2evMM6/opGLj8Szgq69739L37cqa1NwA4A/eFqXZIXAY= x-ms-office365-filtering-correlation-id: 28aad507-a663-4f5d-ebf3-08d584b4ae60 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(8989060)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(8990040)(2017052603328)(7153060)(7193020);SRVR:DM5PR03MB2940; x-ms-traffictypediagnostic: DM5PR03MB2940: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(17755550239193); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231220)(944501244)(52105095)(6041288)(20161123560045)(20161123562045)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(6072148)(201708071742011);SRVR:DM5PR03MB2940;BCL:0;PCL:0;RULEID:;SRVR:DM5PR03MB2940; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(366004)(39860400002)(376002)(396003)(346002)(199004)(189003)(3280700002)(33656002)(4326008)(68736007)(7696005)(86362001)(2900100001)(966005)(5660300001)(76176011)(7736002)(305945005)(110136005)(54906003)(316002)(2950100002)(478600001)(88552002)(3660700001)(229853002)(14454004)(74316002)(2906002)(3846002)(6116002)(75432002)(97736004)(102836004)(26005)(25786009)(106356001)(66066001)(93886005)(186003)(99286004)(6506007)(55016002)(59450400001)(53936002)(786003)(9686003)(8936002)(6306002)(6436002)(8676002)(81156014)(81166006)(5250100002)(105586002)(6246003);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR03MB2940;H:DM5PR03MB3035.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: ou.edu does not designate permitted sender hosts) x-microsoft-antispam-message-info: zUTLhzChocjx/3AtI5OB6ntQHUW8njIJydZYjgTmUAjXiWH8ZbLqKIdjfxbsLWpFObrWcZD4CYGKxfcwPEFgPUd5zUBSdLNBA0EP88IOlvEYp0Zp5p04mEsekQ+VwcdQ0AUmIWrriElOgdif6o0BZB63t+pHKU29Sfn6SKG/KVNIxrI/PeZCzU6wIzMjiY94LwTeP52w2TZ/LqZ3NabjV238/ZvgaWa9nftyx6o5cvkrYtcYqGUnblUKMnr7OpiqYcCIrCQRr65P/L+051r5y3QwxHLXNhJEcbE/PBSlI1ceqP7yTW0eDId9V5sBD/Sw5jx+LQYqF0HDmiOW+gZ9Rw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: ou.edu X-MS-Exchange-CrossTenant-Network-Message-Id: 28aad507-a663-4f5d-ebf3-08d584b4ae60 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 05:23:09.6266 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9c7de09d-9034-44c1-b462-c464fece204a X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2940 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-08_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803080067 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 08, 2018 at 04:14:11AM +0000, Luis R. Rodriguez wrote: > On Thu, Mar 08, 2018 at 04:06:01AM +0000, Luis R. Rodriguez wrote: > > On Thu, Mar 08, 2018 at 03:16:29AM +0000, French, Nicholas A. wrote: > > >=20 > > > Ah, I see. So my proposed ioremap_wc call was only "working" by alia= sing the > > > ioremap_nocache()'d mem area and not actually using write combining = at all. > >=20 > > There are some debugging PAT toys out there I think but I haven't play= ed with > > them yet or I forgot how to to confirm or deny this sort of effort, bu= t > > likeley. >=20 > In fact come to think of it I believe some neurons are telling me that i= f > two type does not match we'd get an error? I based my guess on some text i read in "PATting Linux" [1]: "ioremap interfaces will succeed if there is an existing, more lenient mapping. Example: If there is an existing uncached mapping to a physical range, any request for write-back or write-combine mapping will succeed, but will eventually map the memory as uncached" But I will try to get some debugpat going to confirm. [1] =3D https://www.kernel.org/doc/ols/2008/ols2008v2-pages-135-144.pdf > > So unless there is a io-re-remap to change the caching status of a subs= et of > > the decoder's memory once we find out what the framebuffer offset is in= side > > the original iremap_nocache'd area, then its a no go for write combinin= g to > > the framebuffer with PAT. >=20 > No what if the framebuffer driver is just requested as a secondary step > after firmware loading? Its a possibility. The decoder firmware gets loaded at the beginning of the= decoder memory range and we know its length, so its possible to ioremap_nocache eno= ugh=20 room for the firmware only on init and then ioremap the remaining non-firmw= are decoder memory areas appropriately after the firmware load succeeds... =20 > > > On the other hand, it works fine for me with a nocache'd framebuffer.= It's > > > certainly better for me personally to have a nocache framebuffer with > > > PAT-enabled than the framebuffer completely disabled with PAT-enabled= , but I > > > don't think I would even propose to rollback the x86 nopat requiremen= t in > > > general. Apparently the throngs of people using this super-popular dr= iver > > > feature haven't complained in the last couple years, so maybe its OK = for me > > > to just patch the pat-enabled guard out and deal with a nocache'd > > > framebuffer. > >=20 > > Nope, best you add a feature to just let you disable wc stuff, to enabl= e > > life with PAT. I'm not sure I understand what you mean. Perhaps the easy answer is to change the fatal is-pat-enabled check to just= a warning like "you have PAT enabled, so wc is disabled for the framebuffer.= =20 if you want wc, use the nopat parameter"? - Nick=