Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3211864pxb; Mon, 16 Nov 2020 08:32:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBKGMpnOlsLixcCkwxS3rvajSq+anLxx4shvwgcdUAEnlgjXZb1Z+wKLFARexbdbN7TdrZ X-Received: by 2002:a17:906:4807:: with SMTP id w7mr14877693ejq.306.1605544358275; Mon, 16 Nov 2020 08:32:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605544358; cv=none; d=google.com; s=arc-20160816; b=EeGs2KsQeFf1C8LAEReSxluqcZflaJL2EqGtXshbWJzrEJ6kmaXifTa+Rt9hvRvFZW NqZYCX+7Bxug2kYF7aBEMz2BCejt+oseiETI4W9wI9J3l0OqmXqasp7EBQI7K4ruFtQZ zjY9gcMYUjj04hehpsZl1tPTPytXXDRoOv1h7d8y21VaM40XfNffJENzuDTHmCuGHXde TBCZ02hd+8hlVynuT+MSKOr0LHb7HS+kC+xhBQs5rWWTB8PcPC/d8BzVgOgDPLXokz1d 7Y1+AyT4kahw0U5Zrbspc2U+tDzIjBpW/6I85r1/cVMVGnat1cacMPn71jGytwmMmBOB loAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yUFvC+ZrK6PRN0rtQL0QXcTBGoDM4oX8Dm71BpkV+wM=; b=gDMYuXRKwbuxZCk/Dsqpws5LhOgSo2PJ4zFq3qmavtuLzZCBx6tRTuSGv5SqIFFg5C hnl94EQXAYaUVvx/thN0T/MiU78bP0jT9PCgh+AuhVIaxL0cOrIt15rk+rtvCCANbAJ2 u1Qk2z8oI6D4jYf3coGICnEy9hMq3YbHN2WaYnvvbCJ6Ga7rZmGrv1Zu7JCZUw4i6vsO 426bUS/TtHi3VLyBCvZQiJR6aXJKor6bNsvbnFCyzunt1dR1Slw3rxFGj05eJGxjx3S6 wSzjVqHUzpGNGVCniYCIRzR8SZzXEnmyn2uIDg0gLFgGtg3aOkXXQ7QC0VEoQl1bBis8 ciQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=rQ5Eb0gD; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w2si12881562edv.240.2020.11.16.08.32.14; Mon, 16 Nov 2020 08:32:38 -0800 (PST) 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=@infradead.org header.s=casper.20170209 header.b=rQ5Eb0gD; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731990AbgKPQad (ORCPT + 99 others); Mon, 16 Nov 2020 11:30:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726236AbgKPQad (ORCPT ); Mon, 16 Nov 2020 11:30:33 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37ADBC0613CF; Mon, 16 Nov 2020 08:30:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=yUFvC+ZrK6PRN0rtQL0QXcTBGoDM4oX8Dm71BpkV+wM=; b=rQ5Eb0gDl+z8/n2Td6rzDkxACs BemXonCnVeay50Gy70B/PnPwg3sUEpjhTPG9l6RdYa8NsvnUeTuEM50tGQmceYj2UfAmnVGOHJUTb U4rLn2oHqfeleNJYBC9GOy+AURtdfNM4/y2n3o6Bqz1zXjUETpuQRwZ+krsSb+58qKfDqSJyCbkGu qok1Sg6MsvhYZMhLsJ0gr4bk6BX4wiokcauSf4Zu/ePCaMTsqE2ulpMN5zBFVf2ryn3u2LRGU9Qwh awIzRsXoX9qbb61KX3yGdHqiqFX7Po5HNzcSYYug3yWnnaaLLL5+EWCERNDEoaLxxYKJY36/1MnZc UMUS094Q==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kehOY-0004dX-T1; Mon, 16 Nov 2020 16:30:22 +0000 Date: Mon, 16 Nov 2020 16:30:22 +0000 From: Christoph Hellwig To: Alexander Lobakin Cc: "Michael S. Tsirkin" , Christoph Hellwig , Ohad Ben-Cohen , Mathieu Poirier , Arnd Bergmann , Amit Shah , Greg Kroah-Hartman , Arnaud Pouliquen , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Bjorn Andersson , linux-remoteproc@vger.kernel.org, Suman Anna , virtualization@lists.linux-foundation.org Subject: Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial Message-ID: <20201116163022.GC16619@infradead.org> References: <20201116091950.GA30524@infradead.org> <20201116071910-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 16, 2020 at 01:07:28PM +0000, Alexander Lobakin wrote: > But lots of subsystems like netdev for example uses dev->parent for > DMA operations. I know that their pointers go directly to the > platform/PCI/etc. device, but still. Oh, every drivers is perfectly fine to use ->parent as it suits. The problem is when we have layered architectures, where this pokes a massive hole into the layering. > The only reason behind "fake" DMA devices for rproc is to be able to > reserve DMA memory through the Device Tree exclusively for only one > virtio dev like virtio_console or virtio_rpmsg_bus. That's why > they are present, are coercing DMA caps from physical dev > representor, and why questinable dma_declare_coherent_memory() > is still here and doesn't allow to build rproc core as a module. > I agree that this is not the best model obviously, and we should take > a look at it. As far as I can tell the series from Arnaud does the right thing here.