Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1962242ybz; Sat, 18 Apr 2020 12:13:18 -0700 (PDT) X-Google-Smtp-Source: APiQypIqWAEzMMP8J+0yi8xTOBxWJKbx3xMauF5sIqjKFQemqmgsPfm7XnSzfwoauU0TlMkDYuVR X-Received: by 2002:a17:906:4f03:: with SMTP id t3mr8695632eju.254.1587237198495; Sat, 18 Apr 2020 12:13:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587237198; cv=none; d=google.com; s=arc-20160816; b=zY7097jJv1+aBD/TnHNX+j2IsnBZDMXKtbfu4uqInP00TL/q4EYDfNgwmdhlu6LlMU yzjVVIL62LHIg3jedCXRSenCtnjMEgs0X0gs6iSu0QFssD1tzpcgagoQy+zWEdY9Fx+Z gvNV+qzJHFuhE3FofVyi796wfuX9xB8vRIU5N21JLs2xeFj2+FVMxdDj/PQtF94RdwAN GT8eoLW4gMGW+pJnMC4CyLXPUb4YisMKShn4GbPe4+mJJmwbcw5UdTUGrtoMgJpF8DcY /Y06oHGfmVfFaVW9Zp17W984w5qUBwdvOzoUId8ct6ee5eTxAud+v4nCqI8qBzUtmquU I4Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=F5K2aoDgI6FlholBatzgx/uTBtwCZOlCwLe+Q3im6WE=; b=OOTp785srwBuwCjCOFKjhZ54KsRN2vrMtg11RcRpAajlUiB3NzLxtTt28qidys5Apy nxbKHlp/bB2iIezXEzSQbGGKYT4Gsbyr6aK/eWwqGxXDfILM4cs5xzIUjLcVUcwlPw9B ooYCzf0Dg3rBben7p7UTsJkosxbobZ4FMao266tMBKMNLOvdk7crEAD7+y9J52XKmkyA co/dHK9AFAZ7A+pZxIHawgcmYF7zwSZt6zfiFQc4Y14xniF3gfTQCqihnsHTIO1NgKQb mYVSf1FwHmxlWD+n4+uqgQyIqfFHX9MVuU375LrFE/86uIjiQJdGLGtxtRo8K7dPhsic X4MQ== 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 ce18si16446836ejc.54.2020.04.18.12.12.56; Sat, 18 Apr 2020 12:13:18 -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 S1728107AbgDRTL0 (ORCPT + 99 others); Sat, 18 Apr 2020 15:11:26 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:60367 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726751AbgDRTLZ (ORCPT ); Sat, 18 Apr 2020 15:11:25 -0400 Received: from mail-qt1-f176.google.com ([209.85.160.176]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPSA (Nemesis) id 1MplLZ-1itsZi2HEb-00qEKQ for ; Sat, 18 Apr 2020 21:11:23 +0200 Received: by mail-qt1-f176.google.com with SMTP id o10so5088085qtr.6 for ; Sat, 18 Apr 2020 12:11:23 -0700 (PDT) X-Gm-Message-State: AGi0Puatjr8ln1TD9BRyVfAaGoQzkASAwdA5xUhgHDazJl9E2N0VWnQm PxWS/FX5AIeYSuoo1PWtlnlYCLwoIMD/VvWoHTs= X-Received: by 2002:ac8:4c8d:: with SMTP id j13mr2801144qtv.142.1587237082474; Sat, 18 Apr 2020 12:11:22 -0700 (PDT) MIME-Version: 1.0 References: <20200418162157.50428-1-wenhu.wang@vivo.com> <20200418162157.50428-5-wenhu.wang@vivo.com> In-Reply-To: <20200418162157.50428-5-wenhu.wang@vivo.com> From: Arnd Bergmann Date: Sat, 18 Apr 2020 21:11:06 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6,4/4] drivers: misc: new driver sram_uapi for user level SRAM access To: Wang Wenhu Cc: gregkh , "linux-kernel@vger.kernel.org" , Scott Wood , christophe leroy , linuxppc-dev , kernel@vivo.com, Randy Dunlap , Michael Ellerman Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:uiior6wTE+Nc8Xy6ROxk5d7Gl0fCXFymWBmYxRzqnaUV9iQsD3Y 1SNbytK61CCgDvybTOJ+RZdkYAjRw60QdHDRRZvOpS+NDEVQDSz4MQDb+BfMqSHq4VZdM/4 hQmrNOHlxN8vpCby0U8eJl6d8kW1cObz7iEyucSpWEAW2rBULnnELShjwsXUHPCqlS4W81E 6bKnPc4zuTILv8NOwa8Hw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:8pk3xkfJstQ=:AcY0KjOCY5BaKbtAFiyUnB GM40StUKPeB2olAHL+qSPDTHAKFRb+lJxHbZ8vNicgZmNeeqHLNEn34Edll9w6bAtGgbBcerF B682lDgKZWfwqvmyY0Jr0UdLVeiinJN5t+aSkuUm1UGQ91Q1nebJ7SrfWDGhVjDE8hCbv+qrK 27vPg0k2S4kHfIb0lEcum7JunZEh8Fi4Ze7POQHAHwwsfrIUsZ6Yynv45Lyrm05dwbS2eYs2x JOYok9uBeazSVeEd0Ucpk2+OQF8RQRHFtkv/Zh0DWMNQW3xml8CeBpOniWWJOnuBsXU9wj/hG kotOO7kYUE5Xh7OqBr4IgXX5fk8IiSK3tUDbmgExyVQ1KxHs0teQ12zAC/B+6l8bFjiLGQZqh gOar9Txv6tlVD25lHdwyuVgI4clnCr0BQMYCsglqi6KE3T0WHk/l0YhZGkSVQDcS6CcKtqBm6 kAK9dq7TP+gb6UIooZM5QhUvMgM9hwoYAOT4qr6V4fygijAge2lVigsDitF4+hW5voVF+yybR GlDW4qvJo7jclj20QR3M9HMK1FT0vhlqMWbjU5NruT70ssYW+jcBNiCZ+zq9SEvOZqPG4H1nk ATxgYwqLCp21Gjq/4YYkxmb4rK8glNv8qbfjiR2w6TY9Der4WuBdUZePGLExrdktHGggtdylh WOa2kHZsobCPWv3RmC2hIEF5pSWTa191uM14fq+6bwSPxvhAUoWNjTwkDuTajFYvmc/OcZHCH bdf3cQgqWMfJLOIiL0B84nrvl98bn5DwuVhMqbL6KM5qKl7jbtAfDcc0E2VUGf4YT4nXGO1mS OcBfBm72A7A1N4koY7TGcDmWvN6pW00XXsdqwatxveYJQUUlgk= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 18, 2020 at 6:22 PM Wang Wenhu wrote: > +#define DRIVER_NAME "sram_uapi" > + > +#define SRAM_UAPI_IOCTL_SET_SRAM_TYPE 0 > +#define SRAM_UAPI_IOCTL_ALLOC 1 > +#define SRAM_UAPI_IOCTL_FREE 2 > + > +struct res_info { > + u32 offset; > + u32 size; > +}; This is of course not a proper ioctl interface at all, please see Documentation/driver-api/ioctl.rst for how to define the numbers in a uapi header file. The offset/size arguments should probably be 64 bit wide. Arnd