Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757184AbcJZHAY (ORCPT ); Wed, 26 Oct 2016 03:00:24 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:36272 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754320AbcJZHAW (ORCPT ); Wed, 26 Oct 2016 03:00:22 -0400 MIME-Version: 1.0 X-Originating-IP: [2a02:168:56b5:0:ac27:b86c:7764:9429] In-Reply-To: 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: Daniel Vetter Date: Wed, 26 Oct 2016 09:00:21 +0200 X-Google-Sender-Auth: 8XpGLdyNpglNuvswsz8uc5_GCwY Message-ID: Subject: Re: [PATCH 1/2] x86/io: add interface to reserve io memtype for a resource range. (v1.1) To: Dave Airlie Cc: "Luis R. Rodriguez" , Dave Airlie , Toshi Kani , Brian Gerst , X86 ML , 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 Content-Length: 1134 Lines: 23 On Wed, Oct 26, 2016 at 8:12 AM, Dave Airlie wrote: >>> 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. Hm, I thought on 64 we have linear mappings of all the io space anyway, and they're essentially for free. Am I wrong and there's some overhead here too? -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch