Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp7171568imm; Tue, 28 Aug 2018 07:32:29 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdafj3crD1yTRVC74OLp3Z2Ms6rP3voMlk5cm9vKb9iM4xAnOFDuAQcZrdgLS6Z5xJ44LKpu X-Received: by 2002:a63:fd06:: with SMTP id d6-v6mr1815011pgh.348.1535466749835; Tue, 28 Aug 2018 07:32:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535466749; cv=none; d=google.com; s=arc-20160816; b=g8uootWNHNfGrZlKVFGwP0RhLhHQb9vBQhjCls+dimr/xRdTf/lRJRpUy6Slz4jKlZ 6MzbfRGz34K0/0Q/ymASqunpXGohr3RZXbgKAswDwfK97/q7NdhVC4J+9icgT/FZFBva iE1apFDfSZbccXaADuBcy1AnEHK9aIGdGwTqT/Xk8oSmPhssk3CbxC7p2qXK6DEme9Rk NNIbkCCtZFqbCagKskYEYRuXqaUIvreTATWtts55a0xuNv2d1mcNzxQ7MZdf12AUWHjW OGlKfGYclW8KJnbZeLRrnWfO+WCb9iwXDmgNh5ZaK+hWBMCTQk9Mtlz1x/E+/QDZKqPy 0e8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=HUz93StQ5jKFHi+4JPQAe3s9E3Rgax5hcGjp/PBUEhk=; b=DvnFBR/PIcB3yWZv5kjJu0Ljr0cGVaCk16j9uLe4vsoB5AaMmxbdIvtHAXRXvnHIFw l9wC91jESpZ4fosrGvYyXnxjxRnY1VkLi2b2AqKpdtyA/oiBN8LgMYywign2WXy3nAuE 8eBkqA2WnKbCwxACwKkdXzX2PdvPV6jtDZqoXcLfPyuaORm+rVB9m6RBdI048OSRDbWz bW3i7Z3yEVhudUw//ViJnPBAf7XyMQYRa8GQ0WFe+8AjoMG6aVXihLgrPWXnqPRJdOAe EowdBJXveWAomiCB0Zq3ptx2yaHe8F0RyQg81BEHwSUd3M1tGWzmP2nlL2LgZgE+rG3R 2Sdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ia9PZFig; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f24-v6si1204259pgh.287.2018.08.28.07.32.14; Tue, 28 Aug 2018 07:32:29 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=ia9PZFig; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728238AbeH1SWx (ORCPT + 99 others); Tue, 28 Aug 2018 14:22:53 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:32858 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726120AbeH1SWx (ORCPT ); Tue, 28 Aug 2018 14:22:53 -0400 Received: by mail-wr1-f66.google.com with SMTP id v90-v6so1817008wrc.0 for ; Tue, 28 Aug 2018 07:30:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=HUz93StQ5jKFHi+4JPQAe3s9E3Rgax5hcGjp/PBUEhk=; b=ia9PZFigpw9oPtPELcNdGvF7f40BD06g9sE28wIzxFQCunN+XQVm+qfEsQzqgb2DSH v75Rn9JzCu1AX8E2NU+2KJmeiWjPX4js4fNVohUoFTsvSxcbh7n5N2wCZv/Vpd9O+9ZE wE40qRdTJqwDhhMIMsU5ziMNWLuXb3hVpqqEZl4r4sq1zqTrSZabeDJ9FIWzY03E9Kdi Nda0e10JSooOU7aZiOjHndVbsG5cHrkwdmlTs2RaHcwoXoAwXTOlCXLtdXQ6RRCZUcde fHgAkEUPAT4TaV1dA2D+1j+9qG8vCv9qqem2581DJpHnGKIRD/YV2mPrfclvr+IsrOKk zVWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HUz93StQ5jKFHi+4JPQAe3s9E3Rgax5hcGjp/PBUEhk=; b=uKaX9wevMG5bio+RnfU9cmj4q8uDsKzRiuX4mtgY22r9LIohlTcXv2qpPAvUtHSpj5 WXl66sTnLQY25ZJZnxSW1Dkhr5wV/ZtM1nDhcaQDznb83x8WXPAykjzeLpgrfJELwpX0 NoDE0tX/aNE5p6AOQjpiWASGrSF87h++yemqAGKwMyZtgklVsGqXr17E8BztlbnbPwNa D5wc6b9FEm2HUWBuGk51IKRF+ciRvGS+FsEMJDlvQ+QkDutSg+qwt9IznFutOxvoRXfz kXiOaTCPPw9i4qUDzwRr+TJz8HQ9+kCW7ikWEVXdHKkUPBvSd6OLku586fYvaGc8fgEY kG7g== X-Gm-Message-State: APzg51CfhnyVV3LrPvXfWronF1Bvlrhr/TGHLXbdCQnoilR6a4tqq30P gjvP7TLGcmKmcR+34C98il4= X-Received: by 2002:adf:9244:: with SMTP id 62-v6mr1280987wrj.62.1535466655622; Tue, 28 Aug 2018 07:30:55 -0700 (PDT) Received: from darwi-kernel ([142.93.171.10]) by smtp.gmail.com with ESMTPSA id q5-v6sm771463wru.79.2018.08.28.07.30.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Aug 2018 07:30:54 -0700 (PDT) Date: Tue, 28 Aug 2018 14:30:49 +0000 From: "Ahmed S. Darwish" To: Greg KH , Simon Que Cc: Stephen Rothwell , John Joseph , LKML , Rob Springer , devel@linuxdriverproject.org, Andrew Morton , Todd Poynor , Linus Torvalds Subject: Re: [GIT PULL] Staging/IIO driver patches for 4.19-rc1 Message-ID: <20180828143049.GA7388@darwi-kernel> References: <20180818155724.GA22569@kroah.com> <20180828103817.GB1397@do-kernel> <20180828123607.GB13441@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180828123607.GB13441@kroah.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi! On Tue, Aug 28, 2018 at 02:36:07PM +0200, Greg KH wrote: > On Tue, Aug 28, 2018 at 10:38:17AM +0000, Ahmed S. Darwish wrote: > > [ re-send; forgotten lkml CC added; sorry ] > > > > Hi, > > > > On Sat, 18 Aug 2018 17:57:24 +0200, Greg KH wrote: > > [...] > > > addition of some new IIO drivers. Also added was a "gasket" driver from > > > Google that needs loads of work and the erofs filesystem. > > > > > > > Why are we adding __a whole new in-kernel framework__ for > > developing basic user-space drivers? > > > > We already have a frameowrk for that, and it's UIO. [1] The UIO > > code is a very stable and simple subsystem; it's also heavily used > > in the embedded industry.. > > As Todd said, the code will end up being a simple UIO driver, if even > that big, in th end. It is just going to take him a while to constantly > refactor things until he achieves that goal... > > > I've looked at the gasket documentation [2], and the first user > > of this new in-kernel API [3], and this is almost replicating UIO > > it's not funny. [4] True, the gasket APIs adds some extra new > > conveniences (PCI BAR re-mapping, MSI, ..), but there's no > > technical reason this cannot be added to the UIO code instead. > > {shh} That's my plan :) > Cool, thanks a lot. Can we then merge something like below patch? [ I've searched the gasket included TODO file before posting, but did not find any mention of UIO. Below patch will make sure this will not be forgotten over time.. ] ==> Subject: [PATCH] gasket: TODO: re-implement using UIO The gasket in-kernel APIs, recently introduced under staging, re-implements what is already long-time provided by the UIO framework and subsystem. Before moving it out of staging, make sure we add the new bits to the UIO subsystem instead, then transform its signle client, the Apex driver, to become a UIO driver (uio_driver.h) Signed-off-by: Ahmed S. Darwish --- drivers/staging/gasket/TODO | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/staging/gasket/TODO b/drivers/staging/gasket/TODO index 6ff8e01b04cc..5b1865f8af2d 100644 --- a/drivers/staging/gasket/TODO +++ b/drivers/staging/gasket/TODO @@ -1,9 +1,22 @@ This is a list of things that need to be done to get this driver out of the staging directory. + +- Implement the gasket framework's functionality through UIO instead of + introducing a new user-space drivers framework that is quite similar. + + UIO provides the necessary bits to implement user-space drivers. Meanwhile + the gasket APIs adds some extra conveniences like PCI BAR mapping, and + MSI interrupts. Add these features to the UIO subsystem, then re-implement + the Apex driver as a basic UIO driver instead (include/linux/uio_driver.h) + - Document sysfs files with Documentation/ABI/ entries. + - Use misc interface instead of major number for driver version description. + - Add descriptions of module_param's + - apex_get_status() should actually check status. + - "drivers" should never be dealing with "raw" sysfs calls or mess around with kobjects at all. The driver core should handle all of this for you automaically. There should not be a need for raw attribute macros. Ciao, -- Darwish http://darwish.chasingpointers.com