Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2516595ybz; Sun, 26 Apr 2020 21:55:02 -0700 (PDT) X-Google-Smtp-Source: APiQypL/v0vOuDrPvze4mJlFI3pZVLoTvqGV8+wdrMJjoBdLNGx9hYVsr4zWsKVXybZLKkiXRAnB X-Received: by 2002:aa7:d514:: with SMTP id y20mr17355040edq.28.1587963302015; Sun, 26 Apr 2020 21:55:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587963302; cv=none; d=google.com; s=arc-20160816; b=Y2u5Jt4L70/HcYod2BunD6I6rfpKWM/NSskfIpSiTuWmD9zApxZvJwnWY6K8s8kylC 73CCG5HLqMqj1H4fBztwt4p3Khsl6ocnrR5OrBk8WwjU0WOWUxaShZqJdhZ9bBTRgLGM b0ZVpwzjduTvpuX2FSNMV/mYYFFq/oT6FSiDW/I1Fl3yP9t1fU89u3xzSWspdMAoAL+i /xW+/Ikvjlavk1gCpt0MPDP8gX7FzFm8ToMcJOL0bbE8yHwfL9QuYHXVfwKG2HN7pBzk 2HaQCpRkw/0gSh5lpoiW4dKG7IFjiYmwa56M26ONVNdVM6UrZimzomvz7anrxXuBdKVZ nt7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:organization:references:in-reply-to:date:cc:to:from :message-id; bh=CuBdIoYTihh54Ps2QiztIn9n8Lw0KHEO/+PTu2nEscU=; b=iRZKtF2hbWFTCYt0zfG4smapEQfl8V84Ik5IqR+blRBlWURRqRPno6evRnuf74iC6t iV3DESXqqwrveASQbghb5iUTRulmbeAc0MVymXDlbXUrdXfakrMP1wNdAQao8fq6fQ0T BDK9l4dmBWq5Oadc/Rasg0jzNzwkpNeQ3/GkmBAedIFDE6ussum445YzRlfGWe8oCzwr asv4zVkbbFCEguqacVVQ+YZi2Jny1QZIIXgt1ns6smbDmALs2qkvOYYGwJJAhpI+8dpN CMal/y8CahxC6VkE0z8TwtNJt16KyTAr4ne6cb4/Q/ET6hEZ7hsSnAin442MhJYpJWxu Q5IA== ARC-Authentication-Results: i=1; mx.google.com; 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 x61si7578095ede.23.2020.04.26.21.54.27; Sun, 26 Apr 2020 21:55:02 -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; 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 S1726246AbgD0EuA (ORCPT + 99 others); Mon, 27 Apr 2020 00:50:00 -0400 Received: from baldur.buserror.net ([165.227.176.147]:35002 "EHLO baldur.buserror.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726172AbgD0EuA (ORCPT ); Mon, 27 Apr 2020 00:50:00 -0400 Received: from [2601:449:8480:af0:12bf:48ff:fe84:c9a0] by baldur.buserror.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1jSvgG-0007p7-BQ; Sun, 26 Apr 2020 23:47:44 -0500 Message-ID: <35c53c47c4b8cc648f56144306c21224163f1e72.camel@buserror.net> From: Scott Wood To: Greg KH , =?UTF-8?Q?=E7=8E=8B=E6=96=87=E8=99=8E?= Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kernel@vivo.com, robh@kernel.org, Christophe Leroy , Michael Ellerman , Randy Dunlap Date: Sun, 26 Apr 2020 23:47:43 -0500 In-Reply-To: <20200421093427.GC725219@kroah.com> References: <20200420145128.GA4131449@kroah.com> <20200421093427.GC725219@kroah.com> Organization: Red Hat Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2601:449:8480:af0:12bf:48ff:fe84:c9a0 X-SA-Exim-Rcpt-To: gregkh@linuxfoundation.org, wenhu.wang@vivo.com, arnd@arndb.de, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kernel@vivo.com, robh@kernel.org, christophe.leroy@c-s.fr, mpe@ellerman.id.au, rdunlap@infradead.org X-SA-Exim-Mail-From: oss@buserror.net X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on baldur.localdomain X-Spam-Level: X-Spam-Status: No, score=-17.5 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -15 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -1.5 GREYLIST_ISWHITE The incoming server has been whitelisted for * this recipient and sender Subject: Re: [PATCH v2,RESEND] misc: new driver sram_uapi for user level SRAM access X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on baldur.buserror.net) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-04-21 at 11:34 +0200, Greg KH wrote: > On Tue, Apr 21, 2020 at 05:09:47PM +0800, 王文虎 wrote: > > Hi, Greg, Arnd, > > > > Thank you for your comments first, and then really very very very sorry > > for driving Greg to sigh and I hope there would be chance to share Moutai > > (rather than whisky, we drink it much, a kind of Baijiu), after the virus. > > > > Back to the comments, I'd like to do a bit of documentation or explanation > > first, > > which should have been done early or else there would not be so much to > > explain: > > 1. What I have been trying to do is to access the Freescale Cache-SRAM > > device form > > user level; > > 2. I implemented it using UIO, which was thought of non-proper; > > I still think that using uio is the best way to do this, and never said > it was "non-proper". All we got bogged down in was the DT > representation of stuff from what I remember. That should be worked > through. The hardware is already reperesented in the DT (the various "fsl,-l2- cache-controller" nodes). What is there to "work through"? I didn't say UIO was "non-proper" though I did question whether it was the best fit. We don't need the IRQ stuff, and we do want some means of allocating multiple regions to different users (at least, that seems to be a requirement for Wenhu, and it leaves open the possibility of a kernel driver allocating some SRAM for itself which appears to be what arch/powerpc/sysdev/fsl_85xx_cache_sram.c was originally meant for) and I don't see how you'd do that through UIO. So that leaves either a separate interface for dynamic region allocation (in which case why not map through that interface), static allocation via boot/module parameters which you didn't like, or abusing the device tree with something that's not hardware description (why don't we replace kmalloc with some device tree nodes while we're at it). -Scott