From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753117AbcJZGMS (ORCPT ); Wed, 26 Oct 2016 02:12:18 -0400 Received: from mail-ua0-f196.google.com ([209.85.217.196]:39377 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753047AbcJZGMR (ORCPT ); Wed, 26 Oct 2016 02:12:17 -0400 MIME-Version: 1.0 In-Reply-To: <20161026054909.wjwq3uy3mlyvlygi@phenom.ffwll.local> References: <1477290706-7696-1-git-send-email-airlied@redhat.com> <1477290706-7696-2-git-send-email-airlied@redhat.com> <20161025173129.GD8651@wotan.suse.de> <20161026054909.wjwq3uy3mlyvlygi@phenom.ffwll.local> From: Dave Airlie Date: Wed, 26 Oct 2016 16:12:15 +1000 Message-ID: Subject: Re: [PATCH 1/2] x86/io: add interface to reserve io memtype for a resource range. (v1.1) To: "Luis R. Rodriguez" , Dave Airlie , Toshi Kani , Brian Gerst , x86@kernel.org, LKML , dri-devel , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , Denys Vlasenko , Dan Williams , Linus Torvalds Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> >> Is anything on a driver to be able to tell when this is actually needed ? >> How will driver developers know? Can you add a bit of documentation to >> the API? If its transitive towards a secondary solution indicating so >> would help driver developers. > > I'll plug the io-mapping stuff again here, and more specifically the > userspace pte wrangling stuff we've added in 4.9 to i915_mm.c. Should > probably move that one to the core. That way io_mapping takes care of the > full reservartion, and allows you to on-demand kmap (for kernel) and write > ptes. All nicely fast and all, and for bonus, also nicely encapsulated. Yeah I think ideally we'd want to move towards that, however we don't tend to want to ioremap the full range even on 64-bit, which is what io-mapping does. At least on most GPUs with VRAM we rarely want to map VRAM for much, I think page tables and fbcon are probably the main two uses for touch it at all. So I don't think we need to be as efficient as i915 in this area. Dave.