Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2698309imi; Mon, 25 Jul 2022 06:06:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ujohOwzdz/6aVghWvbOPZCbjJtZ8lxpFhSETWKSBxar9Y1hY+nh4z4x7EhG9deLqtRd04O X-Received: by 2002:a17:907:7b95:b0:72f:9c64:4061 with SMTP id ne21-20020a1709077b9500b0072f9c644061mr10034776ejc.351.1658754372238; Mon, 25 Jul 2022 06:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658754372; cv=none; d=google.com; s=arc-20160816; b=X3gqdWheq+bV8gwmI98O5GGEUdzsaQmlDb77G2xEvxR+JwnO6VV4+Y3Xhabv9XO+NV vh388sxu7yZl0/Sy2+NzAKMw2WAQ7l+1xptNvdhqY7n7nXsDgObaGW8rt7/26KgVmTu1 ttJguGcp/zzDR8+fb6NJe/w0v6sZtJDB0ukez7ja3rXVsUoPH7tKVF5hC5OXaJ2FTHDA vSced/0tR0euXZfIP+km+PbGC+lX5Cb+f7OB9hrCAxt8dTGOKNzSs03kz8Gwngzb7WtJ VCyhv8dm7dklbP1M4VsFiOw88sQSyQQojq94nPvvCSrFaePSy9zWqI2qQgZGPuqBHZ5D Sc+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WdxhoPjuvzVbm0/3xtVuLLMD6zFqwKKu84JKTCfF7P4=; b=xUGBDtRUgG7Om4A7rRXMvyS4UKOoCGcsVpGaqTO6LR3GypDGyMAK1QyWhYHga14wIc 47n1Rs5aHlorJOdfTcrjCurtcnlNEVdWPki72XlpEHHUBB2gR5hY9iiECMr9bdI5Lvbu RtezZVaSO384gCNPaCx+mKgm8jrH2FN2IPZ5Xdx/zKU2nQ1VplgE7UynsxHdz77gEGOE ZMPV/gTDxSDZfexkVozedquIhSH8h7wGUT8abGgi84j6ngiGBxFPGT4DFpkCLb57ioX4 Vy+xA2jc2a6HJsm5+jqZGuoQx7Zx+j7e7Jua8R1WQo05eWkBY3PbnFTnzd1eFa6B8uzf eHRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dhB+MLIa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a65-20020a509ec7000000b0043a256a05c5si13302880edf.548.2022.07.25.06.05.46; Mon, 25 Jul 2022 06:06:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dhB+MLIa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235221AbiGYMvC (ORCPT + 99 others); Mon, 25 Jul 2022 08:51:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234785AbiGYMvA (ORCPT ); Mon, 25 Jul 2022 08:51:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4524D63F4; Mon, 25 Jul 2022 05:51:00 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id D452861092; Mon, 25 Jul 2022 12:50:59 +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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220722082858.17880-4-yuji2.ishikawa@toshiba.co.jp> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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