Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3108736pxa; Tue, 18 Aug 2020 06:54:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1dZj4wzG0NN5YVvPTIMUdWoXZEQF5df6ohG+71IPpHvpUCi0nTIjtQV3+aPGOhSiFEKeC X-Received: by 2002:a17:906:f8d5:: with SMTP id lh21mr21015199ejb.360.1597758872938; Tue, 18 Aug 2020 06:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597758872; cv=none; d=google.com; s=arc-20160816; b=QVXgNByL3CaBxwD1cyzFCfIDy/qk5uj8gIx5yx99GfHbUUsFXkXF1MigATYO6RfwRp PVa6d7mAUoqua73TrRpyR+2NUA2hZFow5MosR33qo+Y25cktpK/tSb97DFsrh8nKVDSI 0C9JioLzm8+C/QzL43RNNvBPKfCWGA9wJxTUEu9EbmBlyiN7k6yTY0eLVmvvYE9KII/N N+nIk+UXfztXgrU/wRF0nGhY1xl4mGznkJueV5P0c9hM7OiQmF4WpEmGrQfodqi70fMW KlR87pCoT0wYiZu9scUk8wfeQh1ABPyjZZZZ0XZ8UjiXQj+OB7wRYZkINKSi8OtShbWG IhcQ== 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=7ko5FVu/b2FucxYEOOn8wHdAH+zPj33CPmvokNKVoIw=; b=eUaBD/vAlaKkR7kqBs6+phiBI/ZCPoZoHLhZvXG4BqFpJveZ+dAy9lkLAGIjhk+9gT nc8VbzPVjbTqMvvP0ZrqhBnvzNOi5vV13ib2PYR+UBdN4YKambTtPAtjgmVIgGjamvYB RDYPdi8/hDTqB/bVHjRlAyb5Xy2oATRN9JrXzraDjOxIVV5aeqgFG+M0qCTfrB1mjFfa sR73psyrSiaRgW/AjukeDR/49Rb6bGKnDYhpHgXkpSlhOgq2pVEsbNMgFkzAylgB2p// bmym8Oj/p8voCpqb5ivX9OGEkM15y9YnKYc6Fc2//6r83Z9yBFirHYJj2Vsi5DvuOYfa WGPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Sv+ZmIaQ; 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 m4si13577349edr.500.2020.08.18.06.54.09; Tue, 18 Aug 2020 06:54:32 -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=Sv+ZmIaQ; 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 S1726861AbgHRNw5 (ORCPT + 99 others); Tue, 18 Aug 2020 09:52:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:55454 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726482AbgHRNwv (ORCPT ); Tue, 18 Aug 2020 09:52:51 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 056D2206B5; Tue, 18 Aug 2020 13:52:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597758770; bh=6hrK9TB08p6VocWQstnqpci8voX5oEdPlL2UWco2SW8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Sv+ZmIaQi/k2DA/VMd29kDMrMRDoPozNzTDI0/rMzh7rLafBdsr/nxnU42ptGh9Si eFAa6ydMTPL7ZaREaC4qzzj+ceDTBOxNmImoI5Qx4SHWfF9cvajwcFKcHP9VDfySsg UjsFa9bdEC/vd7wb+XwW3dTsuLZvQ+LPEaxryLfc= Date: Tue, 18 Aug 2020 15:53:13 +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 v2 1/3] bcm-vk: add bcm_vk UAPI Message-ID: <20200818135313.GB495837@kroah.com> References: <20200806004631.8102-1-scott.branden@broadcom.com> <20200806004631.8102-2-scott.branden@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200806004631.8102-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 Wed, Aug 05, 2020 at 05:46:29PM -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..783087b7c31f > --- /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 */ > +}; > + > +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; > + __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 */ > +}; > + > +#define VK_BAR_FWSTS 0x41c > +#define VK_BAR_COP_FWSTS 0x428 > +/* VK_FWSTS definitions */ > +#define VK_FWSTS_RELOCATION_ENTRY BIT(0) I thought BIT() was not allowed in uapi .h files, this really works properly??? thanks, greg k-h