Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2254475imu; Sun, 27 Jan 2019 00:33:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN4AIjPc2uX45uONi4tEzPEESdI8qKM3+0cqvJo+qoqACTB1X5/dvMefEPpvQy+6VEyz9BjK X-Received: by 2002:a17:902:934a:: with SMTP id g10mr16749317plp.172.1548578039424; Sun, 27 Jan 2019 00:33:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548578039; cv=none; d=google.com; s=arc-20160816; b=LMifn7GLfKtUjeJIjvKxV4qZ1sxstlIXIXx1DFGkeaAoKeyroNMnJ1uZVqdP2/1bPa 4cYRQKoY4iqtY9xCfK48JMXKqdZxi03e8Mz7fN27N4EdhqhNuPiTbSuCwwDrcpx6SnZi A8dNWCfX1F5/muG/P8yLtgtIlnAo0+YgS43y/R/I/p7ezB61THBygN/mWPGqGjO5m5Vt T2HjvSUL+pd6HGS5qw1f4tI6bi1JDIUF8AaUKBGMWOO5DbDqTVbsQrX2YlsI49XjhXVG ES83k0DQfsFFj0T/cInjBKzPCGdoNoqu0zHrpf/vnEHUBQDDmOvNrqyhWegqUryD1y0h x77Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=L1r3HPKEp1Xwcw81QUaVFu+ZjILAVXMrL6luo+ha1JE=; b=L2Am6NffkqPoST0gKRACst6s7DRuh8L5pXectzKaNbK7r0MSnPgYg9UK391dZQRsaq 7iay1bMQGK4jK4PwLDh+zeps1XwCVReq74GjXWy09sgd9h9PWlvZ0EBc+zPNc8hpPzdu bjOE5YQ4rKbVWQs21/9EEk6twaq79LOEuZB7GldjzuDIc80YFv2jujyJUJSwB61nbGA8 tAyjVms2xTmHH0UFOy1s4+QqF51X2+SpmcN5mYJDMv7tl5xzqgr/ULAH0VZcqDIya2fU sJj9xbI9bwcDg45DaITX8CG7xdpY3fDoYpQ3/b/V+bYKxpUlelTaHYYll99Bl79SKGFk AWkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=B9LgnseC; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k72si28207597pge.310.2019.01.27.00.33.43; Sun, 27 Jan 2019 00:33:59 -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=@kernel.org header.s=default header.b=B9LgnseC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726683AbfA0IcW (ORCPT + 99 others); Sun, 27 Jan 2019 03:32:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:35634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726511AbfA0IcV (ORCPT ); Sun, 27 Jan 2019 03:32:21 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 12982214C6; Sun, 27 Jan 2019 08:32:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548577940; bh=nQXDxP01s4SLMY6bzfqIw/LMSfQaNg6LvEpP7Ni8Izs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=B9LgnseCMb3D7LsL3cgC7lxiDi1RrKVyjCSdTgqptMqaFfHv+xjHvYKgQUqedd9Nd n1ViOAzKt/pNCHNwn5ZYZd6FHBY4sG71lEL+sD24wcP6myfvXQh7tA9YaT62n0x6QW SMXZTTZ7ymmZDHaiqbO5Q3X2lAvCQrAFKnHsetlY= Date: Sun, 27 Jan 2019 09:32:17 +0100 From: gregkh To: Oded Gabbay Cc: Arnd Bergmann , Linux Kernel Mailing List , ogabbay@habana.ai Subject: Re: [PATCH 01/15] habanalabs: add skeleton driver Message-ID: <20190127083217.GB4561@kroah.com> References: <20190123000057.31477-1-oded.gabbay@gmail.com> <20190123000057.31477-2-oded.gabbay@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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