From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42CEFC54FD0 for ; Mon, 27 Apr 2020 14:13:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 178952063A for ; Mon, 27 Apr 2020 14:13:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587996802; bh=Xg8u6B1gRKJJyhc2ghpbZWMsF25bOlRNgkDeAPMsyhQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=SmfYB3gFxibV6kfnm4YkHkhQLxwy2U5d2SACgnxHxSfp34cD7kp6t1hgny+Fc7L2A 6xqaLMu5T0p7An1D2JO7mo3mkXAe3oOSyz9jmxlE24KR0WlxgsgfR6k0+pEtrSFwex NgbNydyYHLBJFdCcTScCrCnQhDAh/Gm5ncrugm8M= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728060AbgD0ONV (ORCPT ); Mon, 27 Apr 2020 10:13:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:42236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727059AbgD0ONV (ORCPT ); Mon, 27 Apr 2020 10:13:21 -0400 Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5CAD32063A for ; Mon, 27 Apr 2020 14:13:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587996800; bh=Xg8u6B1gRKJJyhc2ghpbZWMsF25bOlRNgkDeAPMsyhQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=osEHPWYdXxkYQ78QupC0ZbxmDHM4nKIFYj+hceaPPcun89vocxPgKHy9Qq40zoUbk QrSGQhV62SZsNwG4VYijAjgIkna3Zq5CZv8uSHXvJpUm0nEf2beyNZ5DWzkUmgTNml Q4e1Vc2b+Xxgtf65Jn47m5wnj59udKDIW1tjL3uk= Received: by mail-qt1-f176.google.com with SMTP id x12so13785235qts.9 for ; Mon, 27 Apr 2020 07:13:20 -0700 (PDT) X-Gm-Message-State: AGi0PubIF6YXTfdX4GnVJSw1Pd26mPUtiDnstmb8CcUf6rarSzqnP6so wRCw2HSPTfPmP2buFcsolyAQgIVLiNWAQ/kS+w== X-Google-Smtp-Source: APiQypIvO+0zNT12ohswoL68dXvl6sO1zbOdn5h7ZevGpjPFRFXJndduPs3pSHS2ibmtQnJF8M8fsotgSW9W3De7vbk= X-Received: by 2002:ac8:7cba:: with SMTP id z26mr23458821qtv.143.1587996798916; Mon, 27 Apr 2020 07:13:18 -0700 (PDT) MIME-Version: 1.0 References: <20200420030538.101696-1-wenhu.wang@vivo.com> In-Reply-To: <20200420030538.101696-1-wenhu.wang@vivo.com> From: Rob Herring Date: Mon, 27 Apr 2020 09:13:06 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2,RESEND] misc: new driver sram_uapi for user level SRAM access To: Wang Wenhu Cc: Greg Kroah-Hartman , Arnd Bergmann , "linux-kernel@vger.kernel.org" , linuxppc-dev , kernel@vivo.com, Christophe Leroy , Scott Wood , Michael Ellerman , Randy Dunlap Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 19, 2020 at 10:06 PM Wang Wenhu wrote: > > A generic User-Kernel interface that allows a misc device created > by it to support file-operations of ioctl and mmap to access SRAM > memory from user level. Different kinds of SRAM alloction and free > APIs could be registered by specific SRAM hardware level driver to > the available list and then be chosen by users to allocate and map > SRAM memory from user level. > > It is extremely helpful for the user space applications that require > high performance memory accesses, such as embedded networking devices > that would process data in user space, and PowerPC e500 is a case. > > Signed-off-by: Wang Wenhu > Cc: Greg Kroah-Hartman > Cc: Arnd Bergmann > Cc: Christophe Leroy > Cc: Scott Wood > Cc: Michael Ellerman > Cc: Randy Dunlap > Cc: linuxppc-dev@lists.ozlabs.org > --- > Changes since v1: addressed comments from Arnd > * Changed the ioctl cmd definitions using _IO micros > * Export interfaces for HW-SRAM drivers to register apis to available list > * Modified allocation alignment to PAGE_SIZE > * Use phys_addr_t as type of SRAM resource size and offset > * Support compat_ioctl > * Misc device name:sram > > Note: From this on, the SRAM_UAPI driver is independent to any hardware > drivers, so I would only commit the patch itself as v2, while the v1 of > it was wrapped together with patches for Freescale L2-Cache-SRAM device. > Then after, I'd create patches for Freescale L2-Cache-SRAM device as > another series. There's work to add SRAM support to dma-buf heaps[1]. Take a look and see if that works for you. Rob [1] https://lore.kernel.org/lkml/20200424222740.16259-1-afd@ti.com/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EABDBC54FCB for ; Mon, 27 Apr 2020 14:17:17 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3A06F206B6 for ; Mon, 27 Apr 2020 14:17:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="osEHPWYd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A06F206B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 499n0S3rZXzDqV8 for ; Tue, 28 Apr 2020 00:17:12 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=robh@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=osEHPWYd; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 499mw26lVVzDqDQ for ; Tue, 28 Apr 2020 00:13:22 +1000 (AEST) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6277F206D4 for ; Mon, 27 Apr 2020 14:13:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587996800; bh=Xg8u6B1gRKJJyhc2ghpbZWMsF25bOlRNgkDeAPMsyhQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=osEHPWYdXxkYQ78QupC0ZbxmDHM4nKIFYj+hceaPPcun89vocxPgKHy9Qq40zoUbk QrSGQhV62SZsNwG4VYijAjgIkna3Zq5CZv8uSHXvJpUm0nEf2beyNZ5DWzkUmgTNml Q4e1Vc2b+Xxgtf65Jn47m5wnj59udKDIW1tjL3uk= Received: by mail-qt1-f178.google.com with SMTP id k12so14338310qtm.4 for ; Mon, 27 Apr 2020 07:13:20 -0700 (PDT) X-Gm-Message-State: AGi0PuZGkUlacK7uYFILMjLrjzrhT3trvunCPSBGXFsZCWLySRn2rnRX aS9wOw3Juf08B/d7/6cmYV2KNylvSPZ2cUL65Q== X-Google-Smtp-Source: APiQypIvO+0zNT12ohswoL68dXvl6sO1zbOdn5h7ZevGpjPFRFXJndduPs3pSHS2ibmtQnJF8M8fsotgSW9W3De7vbk= X-Received: by 2002:ac8:7cba:: with SMTP id z26mr23458821qtv.143.1587996798916; Mon, 27 Apr 2020 07:13:18 -0700 (PDT) MIME-Version: 1.0 References: <20200420030538.101696-1-wenhu.wang@vivo.com> In-Reply-To: <20200420030538.101696-1-wenhu.wang@vivo.com> From: Rob Herring Date: Mon, 27 Apr 2020 09:13:06 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2, RESEND] misc: new driver sram_uapi for user level SRAM access To: Wang Wenhu Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Greg Kroah-Hartman , Randy Dunlap , "linux-kernel@vger.kernel.org" , Scott Wood , kernel@vivo.com, linuxppc-dev Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Sun, Apr 19, 2020 at 10:06 PM Wang Wenhu wrote: > > A generic User-Kernel interface that allows a misc device created > by it to support file-operations of ioctl and mmap to access SRAM > memory from user level. Different kinds of SRAM alloction and free > APIs could be registered by specific SRAM hardware level driver to > the available list and then be chosen by users to allocate and map > SRAM memory from user level. > > It is extremely helpful for the user space applications that require > high performance memory accesses, such as embedded networking devices > that would process data in user space, and PowerPC e500 is a case. > > Signed-off-by: Wang Wenhu > Cc: Greg Kroah-Hartman > Cc: Arnd Bergmann > Cc: Christophe Leroy > Cc: Scott Wood > Cc: Michael Ellerman > Cc: Randy Dunlap > Cc: linuxppc-dev@lists.ozlabs.org > --- > Changes since v1: addressed comments from Arnd > * Changed the ioctl cmd definitions using _IO micros > * Export interfaces for HW-SRAM drivers to register apis to available list > * Modified allocation alignment to PAGE_SIZE > * Use phys_addr_t as type of SRAM resource size and offset > * Support compat_ioctl > * Misc device name:sram > > Note: From this on, the SRAM_UAPI driver is independent to any hardware > drivers, so I would only commit the patch itself as v2, while the v1 of > it was wrapped together with patches for Freescale L2-Cache-SRAM device. > Then after, I'd create patches for Freescale L2-Cache-SRAM device as > another series. There's work to add SRAM support to dma-buf heaps[1]. Take a look and see if that works for you. Rob [1] https://lore.kernel.org/lkml/20200424222740.16259-1-afd@ti.com/