Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3880685pxb; Tue, 17 Nov 2020 06:06:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNHnmrwkSTksp8ITjZIZ0chvXbHIfRe4cO0sCyPFpNTJTHAMN/a0T9t9YrIs3Sd+I3DnVw X-Received: by 2002:aa7:d3c3:: with SMTP id o3mr21671972edr.319.1605621981770; Tue, 17 Nov 2020 06:06:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605621981; cv=none; d=google.com; s=arc-20160816; b=i3APJ5H+bXgpGOpBGNApCO/RQ/nrrTDFY5hFnFRSLOnMU1S3tdmmLG1+5x91GgOSuC K+8hj8EawoWZbnNIsezasdBNLQKJkg9gG4LlnN/gDgmwGJDw632wqpsd3Y3+1jCB1tw7 HnO2R23t+tKvdmPpXDPzq4rxKfR57E3+HyNWkUxN5+SnWSK4IihMjiXPZVn+kjsJzpmt Ril6VF+fQfPUuHz4Rxa/aTxCeKKOLfl6Y8hDhQSk5zajCHDAhZNutbNwS9IEkEzoYG9F ccn/83jNvAwhieGMRiiHjDKfNvqzG0qEhvtorcZbm+pgUjqmxVB8ZR/KDjixufscEbB5 0dXQ== 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=m0hk7B27NeOlPrLY9cJvHDlIQhUidBou/7Utsa5IK1g=; b=T5XG09UmhmMNzQPjdcukKfe+tQ6aH+OvdPXYQr0wUJ+qCdTmfrUYTu08XCvOhrJP2j LlZfNFqXqza/zwLkqC3Enjpy1OXQ50CIT5fLfijP1P0usPrjdO1bMZHxXzysAkFXthHd njHct94UWWLkXdp13btL/lcbJETQFEUEOlRZLCrAvwGl0pNu9Fpj3AtOX6pS5qMEKzB7 Uv8LlztU/QGeJOh3OHKClsuoUdDo+wdQ3RatbVhBQ11qyheZ/ZpM3z2ICsaDGms1IryJ I+pOmvTk/+waKwlQb02MpsOXX56r1E0CJ/aHv1tJSjd1apbTACYveoq5WY+68yJhvZR+ VdZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=dmPoiDU8; 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 n3si16024380eda.283.2020.11.17.06.05.57; Tue, 17 Nov 2020 06:06:21 -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=dmPoiDU8; 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 S2387524AbgKQOC5 (ORCPT + 99 others); Tue, 17 Nov 2020 09:02:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387477AbgKQOCy (ORCPT ); Tue, 17 Nov 2020 09:02:54 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59BA5C0613CF; Tue, 17 Nov 2020 06:02:54 -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=m0hk7B27NeOlPrLY9cJvHDlIQhUidBou/7Utsa5IK1g=; b=dmPoiDU8T3nNQ2t/waEeUgrzZI k5qNrx2A0lHyPcMXIWNDO0HshkfKPtpOVNdWQJYjkYcYByLttcMxJHgNzVu4a90Z78/r3OezLmBao FU3EuqTrqylL4pd0zDJ5wo11G8mxUPs4VesrCfSMlYHNoCE8LZ2KA5caKj2Qe+IaFAGjBLzd9eXX5 bOQrnE7lBoJmrbAJcCv0y6TXYbj9qmzcmPHMyjfeECuKcA+1f9Yksr1Ij0vg0393q5JhoLioopfN0 tg4wklF1HbhnUL6sdcamNXOADkGJY5O/Hh8vYDxX9NMdbEV8SIRiV2R/YnhtFWW58o2fpWe2r/FqC qMBg9a3w==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kf1Z0-00087I-Ri; Tue, 17 Nov 2020 14:02:30 +0000 Date: Tue, 17 Nov 2020 14:02:30 +0000 From: Christoph Hellwig To: Arnaud POULIQUEN Cc: Christoph Hellwig , Alexander Lobakin , Amit Shah , Arnd Bergmann , Greg Kroah-Hartman , Suman Anna , Mathieu Poirier , Bjorn Andersson , Ohad Ben-Cohen , "Michael S. Tsirkin" , Jason Wang , "virtualization@lists.linux-foundation.org" , "linux-remoteproc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial Message-ID: <20201117140230.GA30567@infradead.org> References: <20201116091950.GA30524@infradead.org> <20201116162844.GB16619@infradead.org> <20201116163907.GA19209@infradead.org> <79d2eb78-caad-9c0d-e130-51e628cedaaa@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79d2eb78-caad-9c0d-e130-51e628cedaaa@st.com> 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 Tue, Nov 17, 2020 at 03:00:32PM +0100, Arnaud POULIQUEN wrote: > The dma_declare_coherent_memory allows to associate vdev0buffer memory region > to the remoteproc virtio device (vdev parent). This region is used to allocated > the rpmsg buffers. > The memory for the rpmsg buffer is allocated by the rpmsg_virtio device in > rpmsg_virtio_bus[1]. The size depends on the total size needed for the rpmsg > buffers. > > The vrings are allocated directly by the remoteproc device. Weird. I thought virtio was pretty strict in not allowing diret DMA API usage in drivers to support the legacy no-mapping case. Either way, the point stands: if you want these magic buffers handed out to specific rpmsg instances I think not having to detour through the DMA API is going to make everyones life easier.