Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3183968pxk; Mon, 7 Sep 2020 05:49:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykGITAqSZXzeM776+iDwtywBY++x5Ekxz+wEo2GJ0oV2p2nQ5FIjH6g5UTqhCtD1YRpQzv X-Received: by 2002:a17:906:1484:: with SMTP id x4mr20427721ejc.81.1599482967513; Mon, 07 Sep 2020 05:49:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599482967; cv=none; d=google.com; s=arc-20160816; b=Uh04AsIoVhk8dR9+azZL13udq7v4n1qURzBEsgQ+jLtjdC/wgoQatgDmii2K8kXmnk QBG/couMSXZnrxBR8Yk1CA8Wdm7F3FQJJiCtZm4Mgwf/h4rue5BOyQhx2f1cvy6FyEIs XTEptVJZMsm/QOQEpw75iYAtT1w0K832TApu9d7+p9Ix65ltlY1c2XZUo0xpodQ/O0Ki EuxIcUgA9dN6/mJBxA8Jo5yMr38YnGm9Kkgr7VaXn02RyCfqHYaPeNsXCpLVc2KVzW/x 1wmLeqWIWkVIwXi2ekmku78ugtkMYr6jt4DNV0Ll56V3Z7/hbXWBklwKZnp4IrY+dFA0 YNdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ZPseMrwwbY8Y2+ZDBp8Ei/zmN085vI5PwBS/P73eD3k=; b=Z0FixhaD8Y8OBH9RI7Mmnne7iq5PhEs784xgL33yYxIZ2CVrRbxcA1BEVkNFFoD0Sr CwuDyvWU9aI88wH4DY2B31TPnW68Evj+X8c/Z/6T4UM0PlybY9XNepSc8TYL10zssSTP DaBFCcuDTveWJ4uGGqahkOPNSPtdzS6VfBQiQVLO6Djr8u59Y543PBbPMiQyqY9m0PwU YCVhr9p+kZ8aq8Y0eGXR4LcXfCbuResP4QcJoQ97KcDh1p+fyqaHVdD4/mXqKJaKLHLz AlYxUmKh18K6KJWsej71TAyQAOls4AwUuvE0gXovcOWNtjRBPJ2KJAZtbbUhQgCCjuk+ L1/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MGLJO6yS; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h1si10228478edk.240.2020.09.07.05.49.05; Mon, 07 Sep 2020 05:49:27 -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; dkim=pass header.i=@kernel.org header.s=default header.b=MGLJO6yS; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728792AbgIGMna (ORCPT + 99 others); Mon, 7 Sep 2020 08:43:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:46708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729183AbgIGMfc (ORCPT ); Mon, 7 Sep 2020 08:35:32 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4A796206E6; Mon, 7 Sep 2020 12:35:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599482131; bh=i45Q5Y7+UcDsp9NgOV3maOrvpDqRRVJRZKVEtzcg+3c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MGLJO6yS5MeiLg9qHAMBDR4xg9ulG8Rc4cQz94VRQflH1iulltX+by7nLGRVy+ZeO j/iG3sJFj6V3cNe1YufvOB9++O6Ri2wiW7kF8GwHjCaEJ+vT8wpAQPuf+JWl4rqJ1D CUiI//HVxqlXtCpNUTyGdNG0puVFA8u4LlmlzVgI= Date: Mon, 7 Sep 2020 14:35:46 +0200 From: Greg Kroah-Hartman To: Scott Branden Cc: Arnd Bergmann , Kees Cook , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Subject: Re: [PATCH v3 1/3] bcm-vk: add bcm_vk UAPI Message-ID: <20200907123546.GB2371705@kroah.com> References: <20200825194400.28960-1-scott.branden@broadcom.com> <20200825194400.28960-2-scott.branden@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200825194400.28960-2-scott.branden@broadcom.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 25, 2020 at 12:43:58PM -0700, Scott Branden wrote: > Add user space api for bcm-vk driver. > > Signed-off-by: Scott Branden > --- > include/uapi/linux/misc/bcm_vk.h | 99 ++++++++++++++++++++++++++++++++ > 1 file changed, 99 insertions(+) > create mode 100644 include/uapi/linux/misc/bcm_vk.h > > diff --git a/include/uapi/linux/misc/bcm_vk.h b/include/uapi/linux/misc/bcm_vk.h > new file mode 100644 > index 000000000000..da7848e7c438 > --- /dev/null > +++ b/include/uapi/linux/misc/bcm_vk.h > @@ -0,0 +1,99 @@ > +/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) */ > +/* > + * Copyright 2018-2020 Broadcom. > + */ > + > +#ifndef __UAPI_LINUX_MISC_BCM_VK_H > +#define __UAPI_LINUX_MISC_BCM_VK_H > + > +#include > +#include > + > +#define BCM_VK_MAX_FILENAME 64 > + > +struct vk_image { > + __u32 type; /* Type of image */ > +#define VK_IMAGE_TYPE_BOOT1 1 /* 1st stage (load to SRAM) */ > +#define VK_IMAGE_TYPE_BOOT2 2 /* 2nd stage (load to DDR) */ > + char filename[BCM_VK_MAX_FILENAME]; /* Filename of image */ nit, but this should really be __u8 filename[... right? > +}; > + > +struct vk_reset { > + __u32 arg1; > + __u32 arg2; > +}; > + > +#define VK_MAGIC 0x5e > + > +/* Load image to Valkyrie */ > +#define VK_IOCTL_LOAD_IMAGE _IOW(VK_MAGIC, 0x2, struct vk_image) > + > +/* Send Reset to Valkyrie */ > +#define VK_IOCTL_RESET _IOW(VK_MAGIC, 0x4, struct vk_reset) > + > +/* > + * message block - basic unit in the message where a message's size is always > + * N x sizeof(basic_block) > + */ > +struct vk_msg_blk { > + __u8 function_id; > +#define VK_FID_TRANS_BUF 5 > +#define VK_FID_SHUTDOWN 8 > + __u8 size; Size of what? > + __u16 trans_id; /* transport id, queue & msg_id */ > + __u32 context_id; > + __u32 args[2]; > +#define VK_CMD_PLANES_MASK 0x000f /* number of planes to up/download */ > +#define VK_CMD_UPLOAD 0x0400 /* memory transfer to vk */ > +#define VK_CMD_DOWNLOAD 0x0500 /* memory transfer from vk */ > +#define VK_CMD_MASK 0x0f00 /* command mask */ > +}; What are these defines for? The args? Something else? It's not really obvious here... thanks, greg k-h