Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3021742pxk; Mon, 28 Sep 2020 06:33:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzhUfpSmqr4ZSyjPub5hxwXWukfN56aJSFtBuJ617th0L6rAJYY9a/ywqiWdhiFInEUcHj X-Received: by 2002:aa7:c98d:: with SMTP id c13mr1821141edt.199.1601300029521; Mon, 28 Sep 2020 06:33:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601300029; cv=none; d=google.com; s=arc-20160816; b=Q0NIY0TIStTe7ceaGlqrYNbE8EX+Nm2CRijMpGCZn+bvfJfQBZn7djIVvNmMlVyD0V K6CwS7HLOzkWhrN8aIeoq+TCvcuUIFpnjs+WXOOmWd36OKF+gm0OEw+Q6TeeGYSV5SeF InfgeDlx30CHK8+33cvZ6xBG9nFxzBBUr+nBygmsEY2/gQJY8DQ517Ve9bRadItNcmnj KOTtQbTtfZ0gVMEHgROfDdeZWzNoZB9rS+ohYO5DOyjEJa/XNy2s5cqn/0f40wY/tW06 VsqvNg9kN63DMNtLNhz0LNP2wF3bXVqgRc+blD37rqUmymAQxZFj8GLL/k46tNsoTIr1 lBpw== 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=0SzWACBuI9QMwCiW7RkNoVRmCLnHWeSCxcbUL7DcVfc=; b=uBwa/tC1G6AMlL9NgExpVTnw75W6JwcMMnrTIiLgtiKUbKzbpLVmEe3eUakD7lI/nu Fr4wOT5ngZ2EO762acA+b0zulz0o6cd8xY0S5HWUEJbUPMB8M+NJXzRIP8OV340NZLzC zKiCTl/oCfgDoetFTqwjxeLm131nAWiT+SMfwmTM1lyr+AzKs23dqOdKuX5mQO6xPuDF NB+NYOPDzijDcROxTbqfQCyNkPWrmSs9jsOfmElJRfGqrtQtc/3RXT6oG50TpUpwyX22 5T+JFCffmWNkhVJjBxAfESSjWbdSlMbUAjPaRB3MN7QzleQRw2WdoHQ7chI2zp0T0qJl 4zWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crapouillou.net header.s=mail header.b=P4xXMCay; 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 jr18si633701ejb.45.2020.09.28.06.33.26; Mon, 28 Sep 2020 06:33:49 -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=P4xXMCay; 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 S1726548AbgI1Nbn (ORCPT + 99 others); Mon, 28 Sep 2020 09:31:43 -0400 Received: from crapouillou.net ([89.234.176.41]:54178 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726327AbgI1Nbn (ORCPT ); Mon, 28 Sep 2020 09:31:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1601299899; 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=0SzWACBuI9QMwCiW7RkNoVRmCLnHWeSCxcbUL7DcVfc=; b=P4xXMCayyWAAUDEbXfTSxFl4XMI4I4+bQRS2Qk7dt0KhWyH5QLZ1rKOaIo3hAxLyYoHIxC r6YtBANmwXXU6POC+6apbG+i/HWU/ed63WaAfGWgrKlrr7kaoa0PEVoQKKY3vISb3E/yBG NucA0ykHdNpTVz8EiYXLt+7u6qAwppU= Date: Mon, 28 Sep 2020 15:31:28 +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: <20200928121002.GA3219@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> 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 Le lun. 28 sept. 2020 =E0 14:10, Christoph Hellwig a =E9crit=20 : > On Mon, Sep 28, 2020 at 01:46:55PM +0200, Paul Cercueil wrote: >>> dma_mmap_attrs can only be used on allocations from dma_mmap_attrs=20 >>> with >>> the same attrs. As there is no allocation using=20 >>> DMA_ATTR_NON_CONSISTENT >>> in the drm core, something looks very fishy here. >>=20 >> Is that a fact? I don't see why you couldn't change the cache=20 >> settings >> after allocation. In practice it works just fine. >=20 > Accessing the same physical address using different caching attributes > is undefined behavior and fairly dangerous on most architectures, and > thus not supported by the DMA API. It's allocated with dma_alloc_wc, but then it's only accessed as=20 non-coherent. Anyway, for the time being I guess you could revert 37054fc81443. But I=20 have patches on top of it in drm-misc-next so it's going to be a mess. If we have time I can come up with a custom dumb_create() fonction, to=20 make sure that the GEM buffers are allocated with=20 dma_alloc_noncoherent(). Is there a dma_mmap_noncoherent() too? -Paul