Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1224798ybv; Sun, 23 Feb 2020 02:00:54 -0800 (PST) X-Google-Smtp-Source: APXvYqzNDXEFloOxU7y01UgifvPUf/thZ4ksgZoowEkiD2+vXJv7veLnCO9h5Ag+3f+uq+GjdtTk X-Received: by 2002:a9d:6f8f:: with SMTP id h15mr33834474otq.1.1582452054638; Sun, 23 Feb 2020 02:00:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582452054; cv=none; d=google.com; s=arc-20160816; b=Jg1gYCR78DfGtHPxLhT9dn3+A5Z3Jg6AmOkw2vQY8lj3KUIGPMgilYPWseUDlFYIMJ BdHQI+792CP75sD3Rw5jCWk/l+n/B21V8JLcL3jeWluffNmFs4qdVX8G4ie0MT7nK1Bk OVVi58UTWdtV7vVtxcGPUZw6fYmJgkNB18KWLHFCGondSzTPbe+AhQdp7t/hm1JkQByO Gv/atDMekrxogvNYmdd+lkdgHXLenruTSKB4Gl3qBpg1m/mbl8AcbwU5y5fhcbybfq+X Cc2zynVQwqc7+lDhKwollvqERuCfIpIaZTq+T1Pj2aPhDy2QMrPGhsT0y50jWCaea6QR qNWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qLGdGNPaA7Z5PXHEr9oHeRXi5Z5CLhexJiJ9/uM7CTM=; b=mIioYNhCmBXGwp8isWYI2p9qhMoruyoc8Y70QxOwOQW99NAtu/V1SRjAARZ29Aj8GB 3U59TN6RovA9SScdZt6qC4gCRZOjLlJTuyKO84ddLSeMkT5SorICwSGn9lRBLzGwJOUY 03d4IA5hoCFHNZ4PKcHDf9a4MPoBa7v9h4yIO/0v5lu9NCmSjvpnilQia1Yyv8NPhAVA ev0DaDq2n9PwpT+cOLDq/XsGt/oWBk78y/lVLiwLnSfM5AVVprH+IM2UNeW7AundtSSx AhgDvPg1TZbPV4PssIn5IK6l88EFGn2r5NEqYUx3PtCXyyEu+ZS7c1J7mGb4bx5/+ywZ 3t0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NwryWQ5G; 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 w7si3737206oie.196.2020.02.23.02.00.30; Sun, 23 Feb 2020 02:00:54 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=NwryWQ5G; 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 S1727170AbgBWKA0 (ORCPT + 99 others); Sun, 23 Feb 2020 05:00:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:44162 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725980AbgBWKA0 (ORCPT ); Sun, 23 Feb 2020 05:00:26 -0500 Received: from localhost (95-141-97-180.as16211.net [95.141.97.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8CC16206ED; Sun, 23 Feb 2020 10:00:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582452025; bh=xwKm9mG+11CRzycDripWRYB5FalIoOmjBWJgOiYvD5k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NwryWQ5Goji2SiP6xJzMmh7wCi300mTSXPWWqyPuSGdZGL3+TXg/MKgteSFqqoFLa vqqDacaNByLoHmQQIHWfBnP8xK+rBbROt7YWk6Tf2cCbWOEgm+iLjcG0PSEFnradCr p1xCdrnh264QsepdCKdaenBu4e5yDT334vyn1CD0= Date: Sun, 23 Feb 2020 11:00:22 +0100 From: Greg Kroah-Hartman To: Arnd Bergmann Cc: Scott Branden , Luis Chamberlain , David Brown , Alexander Viro , Shuah Khan , Bjorn Andersson , Shuah Khan , "Rafael J . Wysocki" , "linux-kernel@vger.kernel.org" , linux-arm-msm , Linux FS-devel Mailing List , BCM Kernel Feedback , Olof Johansson , Andrew Morton , Dan Carpenter , Colin Ian King , Kees Cook , Takashi Iwai , "open list:KERNEL SELFTEST FRAMEWORK" , Andy Gross , Desmond Yan , James Hu Subject: Re: [PATCH v2 6/7] misc: bcm-vk: add Broadcom VK driver Message-ID: <20200223100022.GB120495@kroah.com> References: <20200220004825.23372-1-scott.branden@broadcom.com> <20200220004825.23372-7-scott.branden@broadcom.com> <20200220074711.GA3261162@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 22, 2020 at 09:02:44AM +0100, Arnd Bergmann wrote: > On Fri, Feb 21, 2020 at 7:19 PM Scott Branden > wrote: > > On 2020-02-19 11:47 p.m., Greg Kroah-Hartman wrote: > > > > Have you worked with the V4L developers to tie this into the proper > > > in-kernel apis for this type of functionality? > > We looked at the V4L model doesn't have any support for anything we are > > doing in this driver. > > We also want a driver that doesn't care about video. It could be > > offloading crypto or other operations. > > We talked with Olof about all of this previously and he said leave it as > > a misc driver for now. > > He was going to discuss at linux plumbers conference that we need some > > sort of offload engine model that such devices could fit into. > > I see. Have you looked at the "uacce" driver submission? It seems > theirs is similar enough that there might be some way to share interfaces. > > > > Using a tty driver seems like the totally incorrect way to do this, what > > > am I missing? > > tty driver is used to provide console access to the processors running > > on vk. > > Data is sent using the bcm_vk_msg interface by read/write operations > > from user space. > > VK then gets the messages and DMA's the data to/from host memory when > > needed to process. > > In turn here, it sounds like you'd want to look at what drivers/misc/mic/ > and the mellanox bluefield drivers are doing. As I understand, they have the > same requirements for console, but have a nicer approach of providing > abstract 'virtio' channels between the PCIe endpoint and the host, and > then run regular virtio based drivers (console, tty, block, filesystem, > network, ...) along with application specific ones to provide the custom > high-level protocols. This is also similar to what the drivers/pci/endpoint > (from the other end) as the drivers/ntb (pci host on both ends) frameworks > and of course the rpmsg/remoteproc framework do. > > In the long run, I would want much more consolidation between the > low-level parts of all these frameworks, but moving your high-level > protocols to the same virtio method would sound like a step in the > direction towards a generialized framework and easier sharing of > the abstractions. I agree, please do not override the generic tty api with something so hardware-specific like this as it really is not a serial device here. thanks, greg k-h