Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4573768pxk; Wed, 30 Sep 2020 06:34:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5scAZYWReJar3/AGLamrXYEBylutkJ/+ejQpLTgkmigecwcJIKsnygRGE4A58xJq5xZuk X-Received: by 2002:a05:6402:b68:: with SMTP id cb8mr2805936edb.350.1601472894998; Wed, 30 Sep 2020 06:34:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601472894; cv=none; d=google.com; s=arc-20160816; b=XO4TpN7Mx7dMBTy/7oyTp8+ZpkZQ6Y/G96Gh6vHaiDLC8VXQAdQMS4fHiQzmZ1KGhg n82c19eQ5HOFh3+zjCX1fSeDdT03cvCfwzT3X1vWHCet2gVOL7ZHc0a+CEOMg+I5wv2Q GvZ/rGha+KDy96eLEPz+tQ52iuWIYr3MJ/U2XI7WIbXJfgRzgyYIGD1q3VswKZ6p7AaB 0J3JlKC2EP1wuK80g6QZVfu6jhxdMawtBQ7cFPIX7uAsVy6IGTrdc9Y4YlsxsWhLNWIE 4+u11AqjoF+PfjteH4WmRJjcFlRSUCAIMWvwBfB5t+bWRZzeoXiARRCBKZ5uDBff7Obf 7Mlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:subject:from:date :dkim-signature; bh=ecNy/ZxFnTbjbqIO9nlUei1JR0PPL4AarFwXzFKz9CI=; b=AXk9nMDsP/W/HqQRy1p1mCTb6OR9mfwdpHJg05ExtHaOqHAl0NrseoAabthtboiY/V W2AOF6zFfgYePJe7749k1QSBW/oQUlNH2TeEiUXAQrvznaJnwy0UjV5ayZ1zA1HDDFBe P/EETJjf1NnKDRGsivCKNolPpIa3XnP034n3R12XP5x5ZFelxLtLhPB6PQyx1MQIguQK dpdWwKOjvCoLbZz0KfeWCXRmqeIiFNMNs85M7i75I3SRYEYo65xEiU9Z1awzNvV1vT31 mc1lmXW0YpQSGY7aMS/+JEZ8nLGajTxzGZi8sRNGnbEbvOzuV0jtpk8+u87wyS7hUQzX /O4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=lxYQCYkS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j21si1141005ejd.42.2020.09.30.06.34.31; Wed, 30 Sep 2020 06:34:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=lxYQCYkS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730181AbgI3Nd2 (ORCPT + 99 others); Wed, 30 Sep 2020 09:33:28 -0400 Received: from crapouillou.net ([89.234.176.41]:57212 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729663AbgI3Nd1 (ORCPT ); Wed, 30 Sep 2020 09:33:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1601472804; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ecNy/ZxFnTbjbqIO9nlUei1JR0PPL4AarFwXzFKz9CI=; b=lxYQCYkS2XdyqSqq16yw9/T40tnQonUGTBT6Sv19anGho7VUp97RwFz4qhnHgq1E9+MtLF v08Kd9A3oakGolE3MCiGYlzZpXxo5iHj5FyOzgqTweF97cPa8pGejg52DFJ5KEOpNBHrog e+Js9L8qS1uQsNBoXvJoJRJUqwxI91Y= Date: Wed, 30 Sep 2020 15:33:13 +0200 From: Paul Cercueil Subject: Re: linux-next: build failure after merge of the drm tree To: Christoph Hellwig Cc: Stephen Rothwell , Dave Airlie , DRI , Linux Next Mailing List , Linux Kernel Mailing List Message-Id: In-Reply-To: <20200930090252.GA9357@lst.de> References: <20200928135405.73404219@canb.auug.org.au> <20200928060427.GA15041@lst.de> <20200928113415.GA555@lst.de> <72ADHQ.T6LL1SHQF0RG3@crapouillou.net> <20200928121002.GA3219@lst.de> <20200930090252.GA9357@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christoph, Le mer. 30 sept. 2020 =E0 11:02, Christoph Hellwig a =E9crit=20 : > On Mon, Sep 28, 2020 at 03:31:28PM +0200, Paul Cercueil wrote: >> It's allocated with dma_alloc_wc, but then it's only accessed as >> non-coherent. >>=20 >> Anyway, for the time being I guess you could revert 37054fc81443.=20 >> But I >> have patches on top of it in drm-misc-next so it's going to be a=20 >> mess. >>=20 >> If we have time I can come up with a custom dumb_create() fonction,=20 >> to make >> sure that the GEM buffers are allocated with=20 >> dma_alloc_noncoherent(). Is >> there a dma_mmap_noncoherent() too? >=20 > Please use the lower-level dma_alloc_pages and then just insert the > pages directly using remap_pfn_range. Although it might make sense > to eventually create a wrapper around remap_pfn_range for all the > vma sizing sanity checks. One thing missing for remap_pfn_range(), I have no alternative for this: vma->vm_page_prot =3D dma_pgprot(dev, vma->vm_page_prot,=20 DMA_ATTR_NON_CONSISTENT); So I have to do: vma->vm_page_prot =3D pgprot_noncached(vma->vm_page_prot); pgprot_val(vma->vm_page_prot) &=3D ~_CACHE_MASK; pgprot_val(vma->vm_page_prot) |=3D _CACHE_CACHABLE_NONCOHERENT; And that will only compile on MIPS, because these _CACHE_* macros are=20 only defined there. I would need something like a pgprot_noncoherent(), I think. -Paul