Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2006324ybn; Thu, 26 Sep 2019 05:42:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjY4EQJCgKBjRH+lAQ9P+2YByWbsWd0r9YeZl1k+/v9AvEkr15ht5pjbdHGknwubRAucQe X-Received: by 2002:aa7:df14:: with SMTP id c20mr3374407edy.133.1569501761693; Thu, 26 Sep 2019 05:42:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569501761; cv=none; d=google.com; s=arc-20160816; b=UHV52DqFq1EwoDSbIlINbSOxYgukQkpJcJl7akFmhnqdgiyi5ej82Uh8XpFSpKkrue cNFKgmuYyHX1XYuMpf0/NUky7IcLoulkp36kI9XEBaHFjmIdXwjY0Y782Ssq7hLT3hXe yycxjFipOb80+2Ckufo2ki1LSrqh0/VvNGRU2q4MdN9qSnLvUQyKvc85EotP0J3Tnk7D xwHTGIyGESB2J2a/BW6/hg6njOtpVN4/yLaK/R/3IqIMkJmLIlNvBcAlSVyMh7O9sI0s UHT5tEexbNn75WaqfTjjMOjJ2QGukNSHIy8i+K5oGLMjcQZJyA+jE///Z39P7z1ap5Vh FRcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=JyBKlp96IO63xq3yVgKnlvDl6PKeEfk+F1pY9KTNABs=; b=p5dJCyXqcIN6UpZ1jZeVBBxwKTMG+A32LU+AoYrSdvNOy0Rlf1eKknpAZyctS/BA+m 4lAPNxwvxekpWjpcZll9bcDwFQpIFd55NeDwpgqp4kUIX77J098t/9grabaUcpBbPz9k AfD/arANV7XQWhIEmvFT3qVK7zxKR6gFg/uN3nL18nLqBUZ6bbFS28VDFIosxU35Wkab l9AaNPvtHhqZ+mJNTl+cSdEXppdIxvAL5TOykaHop+P04eDbMCqemObL8WnXED9WvxqM QnTYojIRVl68m7959r2sjLGsjKt9QogDI6ozGfo1xLOtcZxO0zPN6Q6xA5HM70Of7VJQ s/ng== ARC-Authentication-Results: i=1; mx.google.com; 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 a29si1238992eda.246.2019.09.26.05.42.18; Thu, 26 Sep 2019 05:42:41 -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; 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 S1728220AbfIZJuE (ORCPT + 99 others); Thu, 26 Sep 2019 05:50:04 -0400 Received: from foss.arm.com ([217.140.110.172]:43972 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725980AbfIZJuE (ORCPT ); Thu, 26 Sep 2019 05:50:04 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9467A1000; Thu, 26 Sep 2019 02:50:03 -0700 (PDT) Received: from [10.37.8.90] (unknown [10.37.8.90]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8207A3F67D; Thu, 26 Sep 2019 02:50:01 -0700 (PDT) Subject: Re: [RFC PATCH] xen/gntdev: Stop abusing DT of_dma_configure API To: Rob Herring , Oleksandr Andrushchenko , Boris Ostrovsky Cc: linux-kernel@vger.kernel.org, Robin Murphy , Nicolas Saenz Julienne , Juergen Gross , Stefano Stabellini , xen-devel@lists.xenproject.org References: <20190925215006.12056-1-robh@kernel.org> From: Julien Grall Message-ID: Date: Thu, 26 Sep 2019 10:49:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190925215006.12056-1-robh@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On 9/25/19 10:50 PM, Rob Herring wrote: > As the comment says, this isn't a DT based device. of_dma_configure() > is going to stop allowing a NULL DT node, so this needs to be fixed. And this can't work on arch not selecting CONFIG_OF and can select CONFIG_XEN_GRANT_DMA_ALLOC. We are lucky enough on x86 because, AFAICT, arch_setup_dma_ops is just a nop. > > Not sure exactly what setup besides arch_setup_dma_ops is needed... We probably want to update dma_mask, coherent_dma_mask and dma_pfn_offset. Also, while look at of_configure_dma, I noticed that we consider the DMA will not be coherent for the grant-table. Oleksandr, do you know why they can't be coherent? Cheers, -- Julien Grall