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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 43B6BC433EF for ; Mon, 25 Jul 2022 12:52:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PnvrwoVk1JzH2+iip+wYJLRzwqV3TSU62oOrcLoM0Gw=; b=V1U89gjza5oiAM s/9IUj22gdydZOQJCLEqOfcGdtG5EMe9DVjDO5919EWCYDBssG8YaHLEhLSWsdXqWa7wJ1vUCHi/d L3q+zGgXvKqtHwtyoJQOVuKS7HtpTSYIgnG8GMXJVzvCwXMh81VK1lf6pfdT9Ev63Gvx5Z6pzcCB4 dogYkaKsMEGlTcueSnIlCmRz0H0bNP3KGTlYLtaqfBAYUbO0EjfhikWyeEQgiPPU1/fToAPLzIkil 9ZQajhqN8oJ9PTZz81JLk2481Fm3+VJ/FOzyppkI10BPEdpq6rDBiLkq7lxDHycK5jYm/eMfcyEJl EpJuLrcqFv1c1z+YeYmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFxYA-009k4a-1u; Mon, 25 Jul 2022 12:51:06 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFxY5-009k1b-Te for linux-arm-kernel@lists.infradead.org; Mon, 25 Jul 2022 12:51:03 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7D1A6B80DCD; Mon, 25 Jul 2022 12:51:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACBF9C341C6; Mon, 25 Jul 2022 12:50:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658753459; bh=rq5R6ViRqezzEg2QCXeGAAFf0M/MhLMEh9Y9kPhCsUk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dhB+MLIaybwyHgnuLVDeuvhX3rnJNJld+K2syPmBtOn0/iGZXhpVXeMURkfGHraiI 3o/0BS9KjGoUvRCcubBZFyDGTScQiwKfC9cxB4cDsqUHtv0xhEDr3s9gbk2YjMWg21 7use+ezgMFrLWyPHjfBulZ2WOGGjq99E12rwQphA= Date: Mon, 25 Jul 2022 14:50:55 +0200 From: Greg KH To: Yuji Ishikawa Cc: Rob Herring , Hans Verkuil , Nobuhiro Iwamatsu , Jonathan Corbet , Sumit Semwal , Christian =?iso-8859-1?Q?K=F6nig?= , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org Subject: Re: [PATCH v2 3/5] soc: visconti: Add Toshiba Visconti DNN image processing accelerator Message-ID: References: <20220722082858.17880-1-yuji2.ishikawa@toshiba.co.jp> <20220722082858.17880-4-yuji2.ishikawa@toshiba.co.jp> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220722082858.17880-4-yuji2.ishikawa@toshiba.co.jp> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220725_055102_273511_3A37BBE8 X-CRM114-Status: GOOD ( 18.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jul 22, 2022 at 05:28:56PM +0900, Yuji Ishikawa wrote: > --- /dev/null > +++ b/drivers/soc/visconti/uapi/dnn.h > @@ -0,0 +1,77 @@ > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ > +/* Toshiba Visconti DNN Accelerator Support > + * > + * (C) Copyright 2022 TOSHIBA CORPORATION > + * (C) Copyright 2022 Toshiba Electronic Devices & Storage Corporation > + */ > + > +#ifndef _UAPI_LINUX_DNN_H > +#define _UAPI_LINUX_DNN_H > + > +#include > +#include > +#include "ipa.h" > + > +#define DRV_DNN_BIT_CONFIG_DESC_FINAL (0x8000U) > +#define DRV_DNN_BUFFER_INDEX_MAX (15) > + > +#define DRV_DNN_BASE_ADDR_NUM (8U) /* DNN number of base address */ > + > +#define DRV_DNN_BASE_ADDR_PURPOSE_INPUT (1U) > +#define DRV_DNN_BASE_ADDR_PURPOSE_OUTPUT (2U) > +#define DRV_DNN_BASE_ADDR_PURPOSE_AWB (3U) > +#define DRV_DNN_BASE_ADDR_PURPOSE_TEMPORARY (4U) > + > +/** > + * struct drv_dnn_status - DNN IPA status for IOC_IPA_GET_STATUS > + * > + * @state: State of driver > + * @eer_cmd: Execution error command > + * @eer: Execution error > + * @reserved: Padding > + * @eer_flags: Execution error flags > + */ > +struct drv_dnn_status { > + enum drv_ipa_state state; > + __u32 eer_cmd; > + __u32 eer : 1; > + __u32 reserved : 31; bitfields will not work like this for uapi files, sorry. > + __u32 eer_flags[32]; What endian is all of these? Big? Little? Unknown? > +}; > + > +struct drv_dnn_base_addr { > + __u32 purpose; > + union { > + struct drv_ipa_addr ipa_addr; > + uintptr_t list_addr; You really do not ever want a uintptr_t in a uapi file, that's not going to be portable at all. It's also not a valid kernel type :( No documentation on what "purpose" is for? > + } addr; > +}; > + > +/** > + * struct drv_dnn_descriptor - DNN IPA Descriptor for IOC_IPA_START > + * > + * @configuration: Address of configuration data > + * @configuration_offset: Configuration offset > + * @configuration_size: Configuration data size > + * @list_num: Number of input/output list > + * @base_addr: Base addresses > + * @base_addr_flag: Bit-fields of base_addr list config; > + * 0 for fixed address, > + * 1 for address list. Where are the bitfield definitions? What about unused bits, what happens with them? You are checking them, right? > + * @config_done: Flags of called configuration > + * @buffer_info: Table of buffer information > + * @buffer_info_num: Number of buffer_info > + */ > +struct drv_dnn_descriptor { > + struct drv_ipa_addr configuration; > + __u32 configuration_offset; What endian are any of these? thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel