Received: by 10.213.65.16 with SMTP id m16csp30298imf; Sun, 11 Mar 2018 13:20:31 -0700 (PDT) X-Google-Smtp-Source: AG47ELvSYdE9pLxeDFwMGTisHqwdhEBvEM3J42dp8VoHqFZntkweuzozfuY3JRexw38YhzKCmNHO X-Received: by 10.99.117.6 with SMTP id q6mr4661858pgc.146.1520799631596; Sun, 11 Mar 2018 13:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520799631; cv=none; d=google.com; s=arc-20160816; b=TKcZ8ZzEj4Y/LoaafkW0iXQpBmDHoRW8kEPlcpVyPcnD6rDij17I6PvaUJFLWI+Q4u TkHLhnk/N0wczKsBqWXpdd6AuOeTxaalQMkQ32ixjXbB8wnbr3BqAtMuJyl/j169KcGe LYDn3+THQbYTdLlA89hjaHyGTmg/k3lhRUl3ti1MABqe+25lE6hAnAhbzTqXKc3NGLQt ifrksIOz//yhlaEF0apCoCkZXD/Wt7uuTQ//eu/gO1S0lnDk/5THpSODKKF6L/D1whL6 8KuH5zX/68nN8gBJXZU8rvyNUcgWhg3be/iqNKDNKA/NUPolUqG0AoE5iqVvKM4vGMGY KDkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:arc-authentication-results; bh=Wa5BGbLh/ok6k05w+vIsT6AFWlRbl+YMfczNgXp2rYw=; b=vJDi2DO2Ct73A6I5bM+2qX9hMe/N8aCQlkdjV+u50TgoelsxJLoX346P66VUjIIVK0 JqtBxliqInd8yPPi14bjuHUi8AVKQLlBhRWRevi3vpRVhOUz3j5Bb4+HSYd9dCfKxCRD y9briDJ0g4aPOsSaOmd/obZAqxY+C0mUV2Mt8ct50qlm5V0Eceof815jZsHiPVapFc6R iqXpUAeR7jCkkU8/eUeSupXZL2Bb/0EOPyWxI1Ywv4PnSC1PY/tkhLXB8PpZXi4mpTo1 Bp/gp7h1S+hRBmvmy8aqqh0MIlQYkEe/rYGTR0s4xAHpHa1qADz9TduBcKacH2jmbS5x QTsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=iXKd85Xs; 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 o11si4046190pgn.364.2018.03.11.13.20.17; Sun, 11 Mar 2018 13:20:31 -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=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=iXKd85Xs; 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 S932314AbeCKUTI (ORCPT + 99 others); Sun, 11 Mar 2018 16:19:08 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:46681 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932144AbeCKUTG (ORCPT ); Sun, 11 Mar 2018 16:19:06 -0400 Received: by mail-pl0-f68.google.com with SMTP id f5-v6so589630plj.13 for ; Sun, 11 Mar 2018 13:19:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Wa5BGbLh/ok6k05w+vIsT6AFWlRbl+YMfczNgXp2rYw=; b=iXKd85Xs825Vdo9m3GsORkiocZ9B+FKTU9PscEMsMhFFJR7qoffsuLx6QV2y9cCoVE 3BVckI513i6cXP5T4j/5gSBdrKveTMvKCwFfYiZ7KAmNjEjGibz/nup0/sPl8Tm4pTGD 3fggFq8Lv4DBd4BIbglaIKZyfrMtXMy+H3TJBeDCrZ8Wx4ciyETX6P+F3j2A23wLV2DL ULEshxGyHI6gp9QkstA465k3VS5mnwxr/pcO3IRrRkkPTGmsVXVVa6n368t6OF2ZOxdb +06RBOfbIQuWkEtOh/kvb/x/8ZvShCJkn58Q5daE3hQCITqsifl89UppEMCQc9sU4MRc nSuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Wa5BGbLh/ok6k05w+vIsT6AFWlRbl+YMfczNgXp2rYw=; b=hFOuDvRPFhYnzMZP9nUMhZXXZiMzRF+Lr1VoR5tcXvYZcp1k/TFux/G+F9iKROVFl7 iNEZpsFey4d7oUFKKFOQPscRbSwUCxhCr2wOzJKNSO08NjLLdL0ba3SoCARQeBylbBUL qeSfKKWduWwKm1BNrAEQt9XrlR0zbKzT1IE7o7dVgG1vlO/g0GNd03INijVZ55cGEII+ JHmF1bybL4UaBu48lHvl75tkazj98rKYaicZwOWmFQPaXyOdfcz0mAybKMFtniq+/OqI JCAkLJFq/bqrGB9GWrJpIK3OlJ6E0gw4fc7nRmPggtLBL25Jq7fy6+W8+GXtnJzWx9/k UIpA== X-Gm-Message-State: AElRT7EnWH/jPvB9F8b8mQR6XpEmXgYacSg71LoHHm/86ELqV0U0fRNN 3d1/nqrsls55GRdXQHu2tRl6iA== X-Received: by 2002:a17:902:76c9:: with SMTP id j9-v6mr1522440plt.250.1520799545796; Sun, 11 Mar 2018 13:19:05 -0700 (PDT) Received: from ?IPv6:2600:1010:b05d:dc76:e069:cad1:42ef:c98b? ([2600:1010:b05d:dc76:e069:cad1:42ef:c98b]) by smtp.gmail.com with ESMTPSA id e12sm2711927pfl.147.2018.03.11.13.19.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Mar 2018 13:19:05 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: ivtv: use arch_phys_wc_add() and require PAT disabled From: Andy Lutomirski X-Mailer: iPhone Mail (15D100) In-Reply-To: <20180311195116.GB4645@tivo.lan> Date: Sun, 11 Mar 2018 13:19:03 -0700 Cc: "Luis R. Rodriguez" , Andy Lutomirski , "hans.verkuil@cisco.com" , "linux-kernel@vger.kernel.org" , "linux-media@vger.kernel.org" Content-Transfer-Encoding: quoted-printable Message-Id: <38CB7D59-7F11-4BC3-B73C-C2F0BF16EFF8@amacapital.net> References: <20180301171936.GU14069@wotan.suse.de> <20180307190205.GA14069@wotan.suse.de> <20180308040601.GQ14069@wotan.suse.de> <20180308041411.GR14069@wotan.suse.de> <67E7293F-6045-4EA1-8AEF-E4B92E046581@amacapital.net> <20180311195116.GB4645@tivo.lan> To: Nick French Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Mar 11, 2018, at 12:51 PM, Nick French wrote: >=20 > On Sat, Mar 10, 2018 at 10:20:23AM -0800, Andy Lutomirski wrote: >>>> Perhaps the easy answer is to change the fatal is-pat-enabled check to j= ust >>>> a warning like "you have PAT enabled, so wc is disabled for the framebu= ffer. >>>> if you want wc, use the nopat parameter"? >>>=20 >>> I like this idea more and more. I haven't experience any problems runnin= g >>> with PAT-enabled and no write-combining on the framebuffer. Any objectio= ns? >>>=20 >>=20 >> None from me. >>=20 >> However, since you have the hardware, you could see if you can use the >> change_page_attr machinery to change the memory type on the framebuffer o= nce >> you figure out where it is. >=20 > I am certainly willing to try this, but my understanding of the goal of th= e > changes that disabled ivtvfb originally is that it was trying to hide the > architecture-specific memory management from the driver. Not really. The goal was to eliminate all code that touches MTRRs on PAT sys= tems. So mtrr_add got unexported and the arch_phys are legacy hints that do n= othing on modern machines.=20 >=20 > Wouldn't (figuring out a way to) expose x86/mm/pageattr internals to the > driver be doing the opposite? (or maybe I misunderstand your suggestion) It doesn=E2=80=99t conflict at all. Obviously the code should be tidy.=20 =46rom memory, I see two potentially reasonable real fixes. One is to find a= way to punch a hole in an ioremap. So you=E2=80=99d find the framebuffer, r= emove it from theproblematic mapping, and then make a new mapping. The secon= d is to change the mapping type in place.=20 Or maybe you could just iounmap the whole thing after firmware is loaded and= the framebuffer is found and then redo the mapping right.=20