Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751551AbdGQQGm (ORCPT ); Mon, 17 Jul 2017 12:06:42 -0400 Received: from smtprelay.synopsys.com ([198.182.47.9]:36188 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751346AbdGQQGk (ORCPT ); Mon, 17 Jul 2017 12:06:40 -0400 Subject: Re: semantics of dma_map_single() To: Christoph Hellwig CC: "linux-arch@vger.kernel.org" , "linux-mm@kvack.org" , , Alexander Duyck , Krzysztof Kozlowski , Andrew Morton , lkml , arcml Newsgroups: gmane.linux.kernel.mm,gmane.linux.kernel.cross-arch,gmane.linux.kernel,gmane.linux.kernel.arc References: <20170717064220.GA15807@lst.de> From: Vineet Gupta Message-ID: <23203d16-da54-99c7-0eba-c082eba120d7@synopsys.com> Date: Mon, 17 Jul 2017 09:06:29 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170717064220.GA15807@lst.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.10.161.108] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 653 Lines: 15 Hi Christoph, On 07/16/2017 11:42 PM, Christoph Hellwig wrote: > I would expect that it would support any contiguous range in > the kernel mapping (e.g. no vmalloc and friends). But it's not > documented anywhere, and if no in kernel users makes use of that > fact at the moment it might be better to document a page size > limitation and add asserts to enforce it. My first thought was indeed to add a BUG_ON for @size > PAGE_SIZE (also accounting for offset etc), but I have a feeling this will cause too many breakages. So perhaps it would be better to add the fact to Documentation that it can handle any physically contiguous range. -Vineet