Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5203059imu; Tue, 29 Jan 2019 14:50:34 -0800 (PST) X-Google-Smtp-Source: ALg8bN7Y214gEDEC7d9BFLY0ZAyOR688DqtDpK9p+uKHjYyPdRirhrp/VMii6aUi4VKFbGBViXDc X-Received: by 2002:a17:902:8d94:: with SMTP id v20mr27695439plo.194.1548802234068; Tue, 29 Jan 2019 14:50:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548802234; cv=none; d=google.com; s=arc-20160816; b=ZpQAECm7OKGjoAgBDZYjNsJT6ZKEwO1DYLcCGp/kpaAOT/TqDR2x7aIPwq0a8xlJeN xPS7eD5Le1kWDN5brTznJly7r3LcBVH1kYac9qE3SEJhusqLjRn5KKJFeN2rnXxRUFD6 XaQTf4szqelkRPL2UF/D4GmYuWCV0UMUpk+40YpXDmkk+zDz6W+/XqlSrJ5EPY+2ccbn w4Qqm9JcltrJqO1OGid5/j4iepH6wYpjPTw2H98qVdh3gAJ7FU7TVFlgMVrbb0EsLdtA cluaU5MfPJTxP+ZK8Zvkxq19aYHBVmEFtmj9alMjoAqJUT7S3i3PTdzFtOORb5RwevPn jakg== 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:dkim-signature; bh=UECppes1NXlONSBM2u64eJ/FcHzNxJoDIt0Oeyx5+iw=; b=xkbrivQeTHaPfVVzDZV4aY3kzAeKJSK0PR/jzrKCY0QA/wvl2GrML6elzeMN98tW1n TU5WbFjDeZmQXCYrbOpMc47ucdpcNqyKKsBkIVCmNlyH6erreaxGtGddr/G3/eVevZiN 4TzEayYQ562zjyX+eNdXkxruAVjBRvC87tGYwYYon0hWpV5kPOHM0TWXFmc6tryIjuQU lwTQZ0PGTWU8SVL/N5pNuQdaMRAl7vcg7jf3yzkUSJxpRj3ZsX8IYxVqAUf+kMbd+1Xu dTta8cEjuUiWsBg2G9CZBKv4TK65dlbkkMram9TxCB7eT9Qone1tBX7kSd2quuBsonk5 hgYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="ebtV/hFg"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c11si37384045pgj.255.2019.01.29.14.50.18; Tue, 29 Jan 2019 14:50:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="ebtV/hFg"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728438AbfA2Wth (ORCPT + 99 others); Tue, 29 Jan 2019 17:49:37 -0500 Received: from mail-vs1-f67.google.com ([209.85.217.67]:42583 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727358AbfA2Wth (ORCPT ); Tue, 29 Jan 2019 17:49:37 -0500 Received: by mail-vs1-f67.google.com with SMTP id b74so13021317vsd.9 for ; Tue, 29 Jan 2019 14:49:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UECppes1NXlONSBM2u64eJ/FcHzNxJoDIt0Oeyx5+iw=; b=ebtV/hFgYQx2Dl+4oqYrvHR4oqk6mEnaJxBo5cZzZZ4CFI5wrmnO+OlGlfDt6uUkWq MeMDAlDntefx4bgKy/VpZ6TBEdy/rOzjiP8Txh4WKeMkmMxkjjAAqwRbtit0E64gzsJk iSiFOsb3njWO8BmpCCmVvhjOTCc7G/f2obJ/nRqSGeyTOR1FTlL6pMZRvMQScSVLXDw1 ezgKncd60uxDdXk/H9WTrLz7rF7oQ4s1pwSjkYePxyG30N8ET0BDVg5dOxJ00asxA1Qb v3pqtgg7jakvOPpzKWxpsUV8ldobWqsG7LERqG+1t901rNBtaw+Cy5murQLrk9LZsVUp GIOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UECppes1NXlONSBM2u64eJ/FcHzNxJoDIt0Oeyx5+iw=; b=HkofpY30T0zEzCZ8EXywSGL+sK3FTGMnE++pHaPCFbIbigtkxRvtFJylmhaJidMauh RNHsP0Zo7cYjL7DqYsdbrFU+6C2VNoxtxZu7el8POZ/p3jQ33OYNhPg/UvTaeV6WOAUW cgpovX3faf9EmIB6609KsFNi/lIiJ6sXcYnAZ9LXZpT5ACKrzmIc0/PUpWDW2Mc6t80S 4n9v/HdFNWdhmfM2s9KLEnEw1F4ieICEYjumHSXO8n+WuMtbyMX16i1ATW+FRyGQSNSz BcZ9OUC+GWTVQOrTD+h7ASb8ipJ+62mz9yG49cyyomIFogoIW+MPjiqQgSa2BsVlJ3eg pnNw== X-Gm-Message-State: AJcUukcJELCBlCtSeCIc8ayYc50UuJ5hDKNzllirJlGo7wmFZYeOt0TN cb517GXR0zFl/Wg9MwHbNC54yN0nnqQoUe1t+HE= X-Received: by 2002:a67:d20d:: with SMTP id y13mr11663171vsi.163.1548802175921; Tue, 29 Jan 2019 14:49:35 -0800 (PST) MIME-Version: 1.0 References: <20190123000057.31477-1-oded.gabbay@gmail.com> <20190123000057.31477-2-oded.gabbay@gmail.com> <20190127083217.GB4561@kroah.com> In-Reply-To: <20190127083217.GB4561@kroah.com> From: Oded Gabbay Date: Wed, 30 Jan 2019 00:49:10 +0200 Message-ID: Subject: Re: [PATCH 01/15] habanalabs: add skeleton driver To: gregkh Cc: Arnd Bergmann , Linux Kernel Mailing List , ogabbay@habana.ai Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 27, 2019 at 10:32 AM gregkh wrote: > > On Sat, Jan 26, 2019 at 11:48:02PM +0200, Oded Gabbay wrote: > > On Sat, Jan 26, 2019 at 11:14 PM Arnd Bergmann wrote: > > > > > > On Sat, Jan 26, 2019 at 5:25 PM Oded Gabbay wrote: > > > > > > > > On Sat, Jan 26, 2019 at 6:06 PM Arnd Bergmann wrote: > > > > > > > > > > On Wed, Jan 23, 2019 at 1:01 AM Oded Gabbay wrote: > > > > > > > > > > > diff --git a/drivers/misc/habanalabs/include/habanalabs_device_if.h b/drivers/misc/habanalabs/include/habanalabs_device_if.h > > > > > > new file mode 100644 > > > > > > index 000000000000..9dbb7077eabd > > > > > > --- /dev/null > > > > > > +++ b/drivers/misc/habanalabs/include/habanalabs_device_if.h > > > > > > > > > > Since this is a apparently a user space ABI, the file should be in > > > > > include/uapi/linux/, > > > > > not in the driver directory. > > > > > > > > This is not a user space ABI. This is the ABI between the driver and the F/W. > > > > > > Ah, I see. In that case, you should get rid of all the bitfields and make the > > > struct members all __le32/__le64/... to make it work on big-endian kernels. > > > > > I really don't want to start converting bitfields and structures to > > use __le32/64. > > As I wrote in one of the previous reviews, we don't support big-endian > > architecture (what's left after POWER moved to support little endian > > ?). We actually do run on POWER9 but with ppc64le architecture > > In any case, our software stack is so big that this minor change in > > the driver won't have any impact on the overall ability to run > > something on our H/W > > You don't have to do anything at the moment to "convert" to use a > specific endian, but you do have to always mark such variables that are > in a specific endian that this is the format they are expected in. > > Then, when you run a tool like sparse, you will be notified if you > happen to be making any assumptions that might not be correct about > those variables, and it's trivial to usually fix it up at that time. > > hope this helps, > > greg k-h ok, understood, fixed. Thanks, Oded