[PATCH v4 11/15] habanalabs: add command submission module

2019-02-11 Thread Oded Gabbay
then query the driver regarding the status of the CS, using that sequence number. In case the CS doesn't finish before the timeout expires, the driver will perform a soft-reset of the device. Reviewed-by: Mike Rapoport Signed-off-by: Oded Gabbay --- Changes in v4: - Remove empty line at end

[PATCH v4 09/15] habanalabs: add sysfs and hwmon support

2019-02-11 Thread Oded Gabbay
(operational, malfunction, in_reset) - How many processes are open on the device's file Reviewed-by: Mike Rapoport Signed-off-by: Oded Gabbay --- Changes in v4: - Use sprintf instead of snprintf in sysfs - Use device attribute groups to manage sysfs attributes .../ABI/testing/sysfs-driver

[PATCH v4 08/15] habanalabs: add event queue and interrupts

2019-02-11 Thread Oded Gabbay
entry to the EQ, the control CPU will trigger its dedicated MSI-X entry to signal the driver that there is a new entry in the EQ. The driver will then read the entry and act accordingly. Reviewed-by: Mike Rapoport Signed-off-by: Oded Gabbay --- Changes in v4: - Do not assume state of device CPU

[PATCH v4 03/15] habanalabs: add basic Goya support

2019-02-11 Thread Oded Gabbay
This patch adds a basic support for the Goya device. The code initializes the device's PCI controller and PCI bars. It also initializes various S/W structures and adds some basic helper functions. Reviewed-by: Mike Rapoport Signed-off-by: Oded Gabbay --- Changes in v4: - Remove empty line

[PATCH v4 04/15] habanalabs: add context and ASID modules

2019-02-11 Thread Oded Gabbay
context. A "primary context" is created automatically when the user opens the device's file. Reviewed-by: Mike Rapoport Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/Makefile | 2 +- drivers/misc/habanalabs/asid.c | 58 + drivers/misc/hab

[PATCH v4 00/15] Habana Labs kernel driver

2019-02-11 Thread Oded Gabbay
at the emails, you can grab a copy from our company's page in GitHub: https://github.com/HabanaAI/linux/releases/tag/hl_patchset_v4_20190211 Oded Gabbay (14): habanalabs: add skeleton driver habanalabs: add Goya registers header files habanalabs: add basic Goya support habanalabs: add context

[PATCH v4 01/15] habanalabs: add skeleton driver

2019-02-11 Thread Oded Gabbay
This patch adds the habanalabs skeleton driver. The driver does nothing at this stage except very basic operations. It contains the minimal code to insmod and rmmod the driver and to create a /dev/hlX file per PCI device. Reviewed-by: Mike Rapoport Signed-off-by: Oded Gabbay --- drivers/misc

Re: [PATCH v2 00/15] Habana Labs kernel driver

2019-02-11 Thread Oded Gabbay
On Sat, Feb 9, 2019 at 12:05 AM Oded Gabbay wrote: > > On Sun, Feb 3, 2019 at 10:35 PM Oded Gabbay wrote: > > > > On Sun, Feb 3, 2019 at 1:50 PM Mike Rapoport wrote: > > > > > > Hi Oded, > > > > > > On Thu, Jan 31, 2019 at 12:06:02AM +0200

Re: [PATCH v2 00/15] Habana Labs kernel driver

2019-02-08 Thread Oded Gabbay
On Sun, Feb 3, 2019 at 10:35 PM Oded Gabbay wrote: > > On Sun, Feb 3, 2019 at 1:50 PM Mike Rapoport wrote: > > > > Hi Oded, > > > > On Thu, Jan 31, 2019 at 12:06:02AM +0200, Oded Gabbay wrote: > > > Hello, > > > This is v2 of the Habana

Re: [PATCH v3 00/15] Habana Labs kernel driver

2019-02-08 Thread Oded Gabbay
On Fri, Feb 8, 2019 at 11:43 PM Joe Perches wrote: > > On Fri, 2019-02-08 at 23:33 +0200, Oded Gabbay wrote: > > On Wed, Feb 6, 2019 at 1:52 PM Mike Rapoport wrote: > > > On Mon, Feb 04, 2019 at 10:32:39PM +0200, Oded Gabbay wrote: > > > > Hello, > > &

Re: [PATCH v3 00/15] Habana Labs kernel driver

2019-02-08 Thread Oded Gabbay
On Wed, Feb 6, 2019 at 1:52 PM Mike Rapoport wrote: > > On Mon, Feb 04, 2019 at 10:32:39PM +0200, Oded Gabbay wrote: > > Hello, > > This is v3 of the Habana Labs kernel driver patch-set. It contains minor > > fixes > > according to reviews done on v2. In addit

Re: [PATCH v3 14/15] habanalabs: add debugfs support

2019-02-08 Thread Oded Gabbay
On Fri, Feb 8, 2019 at 2:16 PM Greg KH wrote: > > On Mon, Feb 04, 2019 at 10:32:53PM +0200, Oded Gabbay wrote: > > +int __init hl_debugfs_init(void) > > +{ > > + hl_debug_root = debugfs_create_dir("habanalabs", NULL); > > + if (IS_ERR_OR_NULL(hl

Re: [PATCH v3 09/15] habanalabs: add sysfs and hwmon support

2019-02-08 Thread Oded Gabbay
On Fri, Feb 8, 2019 at 2:14 PM Greg KH wrote: > > On Mon, Feb 04, 2019 at 10:32:48PM +0200, Oded Gabbay wrote: > > This patch add the sysfs and hwmon entries that are exposed by the driver. > > > > Goya has several sensors, from various categories such as temperature, &

Re: [PATCH v3 05/15] habanalabs: add command buffer module

2019-02-08 Thread Oded Gabbay
On Fri, Feb 8, 2019 at 2:06 PM Greg KH wrote: > > On Mon, Feb 04, 2019 at 10:32:44PM +0200, Oded Gabbay wrote: > > +int hl_cb_ioctl(struct hl_fpriv *hpriv, void *data) > > +{ > > + union hl_cb_args *args = data; > > + struct hl_device *hdev = hpr

Re: [PATCH v3 12/15] habanalabs: add virtual memory and MMU modules

2019-02-07 Thread Oded Gabbay
On Wed, Feb 6, 2019 at 5:14 PM Mike Rapoport wrote: > > On Mon, Feb 04, 2019 at 10:32:51PM +0200, Oded Gabbay wrote: > > From: Omer Shpigelman > > > > This patch adds the Virtual Memory and MMU modules. > > > > Goya has an internal MMU which provides proce

[PATCH v3 05/15] habanalabs: add command buffer module

2019-02-04 Thread Oded Gabbay
is empty, the driver will go to the slow-path of allocating a new CB, i.e. calling dma_alloc_coherent. Signed-off-by: Oded Gabbay --- Changes in v3: - Remove use of three exclamation marks drivers/misc/habanalabs/Makefile | 3 +- drivers/misc/habanalabs/command_buffer.c | 423

[PATCH v3 13/15] habanalabs: implement INFO IOCTL

2019-02-04 Thread Oded Gabbay
-by: Oded Gabbay --- Changes in v3: - Remove use of three exclamation marks drivers/misc/habanalabs/goya/goya.c| 6 + drivers/misc/habanalabs/habanalabs.h | 2 + drivers/misc/habanalabs/habanalabs_ioctl.c | 126 + include/uapi/misc/habanalabs.h

[PATCH v3 04/15] habanalabs: add context and ASID modules

2019-02-04 Thread Oded Gabbay
context. A "primary context" is created automatically when the user opens the device's file. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/Makefile | 2 +- drivers/misc/habanalabs/asid.c | 58 + drivers/misc/habanalabs/context.c| 155 +++

[PATCH v3 08/15] habanalabs: add event queue and interrupts

2019-02-04 Thread Oded Gabbay
entry to the EQ, the control CPU will trigger its dedicated MSI-X entry to signal the driver that there is a new entry in the EQ. The driver will then read the entry and act accordingly. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/device.c | 34 +- drivers/misc/habanalabs/goya

[PATCH v3 14/15] habanalabs: add debugfs support

2019-02-04 Thread Oded Gabbay
to perform reads and writes through Goya's PCI bars. Signed-off-by: Oded Gabbay --- Changes in v3: - Adjust code to huge page optimization .../ABI/testing/debugfs-driver-habanalabs | 127 ++ drivers/misc/habanalabs/Makefile |2 + drivers/misc/habanalabs/command_buffer.c

[PATCH v3 15/15] Update MAINTAINERS and CREDITS with habanalabs info

2019-02-04 Thread Oded Gabbay
The habanalabs driver was written from scratch from the very first days of Habana and is maintained by Oded Gabbay. Signed-off-by: Oded Gabbay --- CREDITS | 2 +- MAINTAINERS | 9 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CREDITS b/CREDITS index e818eb6a3e71

[PATCH v3 10/15] habanalabs: add device reset support

2019-02-04 Thread Oded Gabbay
will restore the max power attribute and in case of manual power management, the frequencies that were set. This patch also adds two entries to the sysfs, which allows the root user to initiate a soft or hard reset. Signed-off-by: Oded Gabbay --- Changes in v3: - Remove use of three exclamation

[PATCH v3 11/15] habanalabs: add command submission module

2019-02-04 Thread Oded Gabbay
then query the driver regarding the status of the CS, using that sequence number. In case the CS doesn't finish before the timeout expires, the driver will perform a soft-reset of the device. Signed-off-by: Oded Gabbay --- Changes in v3: - Remove use of three exclamation marks - Remove hdev

[PATCH v3 12/15] habanalabs: add virtual memory and MMU modules

2019-02-04 Thread Oded Gabbay
and freeing memory on the DDR upon user request. It also provides an interface to map and unmap DDR and Host memory to the device address space. Signed-off-by: Omer Shpigelman Signed-off-by: Oded Gabbay --- Changes in v3: - Remove use of three exclamation marks - Add optimization - support mapping

[PATCH v3 09/15] habanalabs: add sysfs and hwmon support

2019-02-04 Thread Oded Gabbay
(operational, malfunction, in_reset) - How many processes are open on the device's file Signed-off-by: Oded Gabbay --- .../ABI/testing/sysfs-driver-habanalabs | 190 ++ drivers/misc/habanalabs/Makefile | 2 +- drivers/misc/habanalabs/device.c | 146

[PATCH v3 07/15] habanalabs: add h/w queues module

2019-02-04 Thread Oded Gabbay
that was given to it. The internal QMAN doesn't do that. Signed-off-by: Oded Gabbay --- Changes in v3: - Fix the return value in goya_stop_external_queues() - Remove hdev->ifh field as it was used for debugging drivers/misc/habanalabs/Makefile |2 +- drivers/misc/habanal

[PATCH v3 03/15] habanalabs: add basic Goya support

2019-02-04 Thread Oded Gabbay
This patch adds a basic support for the Goya device. The code initializes the device's PCI controller and PCI bars. It also initializes various S/W structures and adds some basic helper functions. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/Makefile| 4 + drivers/misc

[PATCH v3 01/15] habanalabs: add skeleton driver

2019-02-04 Thread Oded Gabbay
This patch adds the habanalabs skeleton driver. The driver does nothing at this stage except very basic operations. It contains the minimal code to insmod and rmmod the driver and to create a /dev/hlX file per PCI device. Signed-off-by: Oded Gabbay --- drivers/misc/Kconfig

[PATCH v3 00/15] Habana Labs kernel driver

2019-02-04 Thread Oded Gabbay
appricate any feedback, question and/or review. Thanks, Oded p.s. for those who prefer to clone the tree instead of looking at the emails, you can grab a copy from our company's page in GitHub: https://github.com/HabanaAI/linux/releases/tag/hl_patchset_v3_20190204 Oded Gabbay (14): habanalabs: add

Re: [PATCH v2 00/15] Habana Labs kernel driver

2019-02-03 Thread Oded Gabbay
On Sun, Feb 3, 2019 at 1:50 PM Mike Rapoport wrote: > > Hi Oded, > > On Thu, Jan 31, 2019 at 12:06:02AM +0200, Oded Gabbay wrote: > > Hello, > > This is v2 of the Habana Labs kernel driver patch-set. It contains fixes > > for almost everything that was

Re: [PATCH v2 07/15] habanalabs: add h/w queues module

2019-02-03 Thread Oded Gabbay
On Thu, Jan 31, 2019 at 3:32 PM Mike Rapoport wrote: > > On Thu, Jan 31, 2019 at 12:06:09AM +0200, Oded Gabbay wrote: > > This patch adds the H/W queues module and the code to initialize Goya's > > various compute and DMA engines and their queues. > > > > Goya has

Re: [PATCH v2 00/15] Habana Labs kernel driver

2019-02-03 Thread Oded Gabbay
On Sun, Feb 3, 2019 at 1:50 PM Mike Rapoport wrote: > > Hi Oded, > > On Thu, Jan 31, 2019 at 12:06:02AM +0200, Oded Gabbay wrote: > > Hello, > > This is v2 of the Habana Labs kernel driver patch-set. It contains fixes > > for almost everything that was

[PATCH v2 09/15] habanalabs: add sysfs and hwmon support

2019-01-30 Thread Oded Gabbay
(operational, malfunction, in_reset) - How many processes are open on the device's file Signed-off-by: Oded Gabbay --- Changes in v2: - Replace /** with /* in all functions - Remove Authors: from comment at start of file - Remove bitfields in interface to F/W and use __le16/32/64 - Remove

[PATCH v2 03/15] habanalabs: add basic Goya support

2019-01-30 Thread Oded Gabbay
This patch adds a basic support for the Goya device. The code initializes the device's PCI controller and PCI bars. It also initializes various S/W structures and adds some basic helper functions. Signed-off-by: Oded Gabbay --- Changes in v2: - Replace /** with /* in all functions - Add

[PATCH v2 10/15] habanalabs: add device reset support

2019-01-30 Thread Oded Gabbay
will restore the max power attribute and in case of manual power management, the frequencies that were set. This patch also adds two entries to the sysfs, which allows the root user to initiate a soft or hard reset. Signed-off-by: Oded Gabbay --- Changes in v2: - Add soft reset code to hw_fini

[PATCH v2 05/15] habanalabs: add command buffer module

2019-01-30 Thread Oded Gabbay
is empty, the driver will go to the slow-path of allocating a new CB, i.e. calling dma_alloc_coherent. Signed-off-by: Oded Gabbay --- Changes in v2: - Add comment in hl_cb_alloc() about use of GFP_ATOMIC - Use dev_dbg when printing about empty cb pool - Simplify return of error code

[PATCH v2 04/15] habanalabs: add context and ASID modules

2019-01-30 Thread Oded Gabbay
context. A "primary context" is created automatically when the user opens the device's file. Signed-off-by: Oded Gabbay --- Changes in v2: - Use fd_open_cnt to identify whether we have an open process on the device - Replace /** with /* in all functions - Rename device_open mutex to fd

[PATCH v2 13/15] habanalabs: implement INFO IOCTL

2019-01-30 Thread Oded Gabbay
-by: Oded Gabbay --- Changes in v2: - Use generic function for testing disabled or in reset - Remove ioctl specific code for checking for hard reset pending drivers/misc/habanalabs/goya/goya.c| 6 + drivers/misc/habanalabs/habanalabs.h | 2 + drivers/misc/habanalabs

[PATCH v2 07/15] habanalabs: add h/w queues module

2019-01-30 Thread Oded Gabbay
that was given to it. The internal QMAN doesn't do that. Signed-off-by: Oded Gabbay --- Changes in v2: - Add goya_async_events.h in this patch - Add return of -ENOMEM in error path (was originally missing) - Replace /** with /* in all functions - Add comment about stopping QMANs - Better error

[PATCH v2 12/15] habanalabs: add virtual memory and MMU modules

2019-01-30 Thread Oded Gabbay
and freeing memory on the DDR upon user request. It also provides an interface to map and unmap DDR and Host memory to the device address space. Signed-off-by: Omer Shpigelman Signed-off-by: Oded Gabbay --- Changes in v2: - Replace /** with /* in all functions - Rename PTE_SIZE to HL_PTE_SIZE - Use

[PATCH v2 08/15] habanalabs: add event queue and interrupts

2019-01-30 Thread Oded Gabbay
entry to the EQ, the control CPU will trigger its dedicated MSI-X entry to signal the driver that there is a new entry in the EQ. The driver will then read the entry and act accordingly. Signed-off-by: Oded Gabbay --- Changes in v2: - Replace /** with /* in all functions - Remove unused local

[PATCH v2 01/15] habanalabs: add skeleton driver

2019-01-30 Thread Oded Gabbay
This patch adds the habanalabs skeleton driver. The driver does nothing at this stage except very basic operations. It contains the minimal code to insmod and rmmod the driver and to create a /dev/hlX file per PCI device. Signed-off-by: Oded Gabbay --- Changes in v2: - Add newline in Makefile

[PATCH v2 11/15] habanalabs: add command submission module

2019-01-30 Thread Oded Gabbay
then query the driver regarding the status of the CS, using that sequence number. In case the CS doesn't finish before the timeout expires, the driver will perform a soft-reset of the device. Signed-off-by: Oded Gabbay --- Changes in v2: - Replace /** with /* in all functions - Use generic

[PATCH v2 14/15] habanalabs: add debugfs support

2019-01-30 Thread Oded Gabbay
to perform reads and writes through Goya's PCI bars. Signed-off-by: Oded Gabbay --- Changes in v2: - Replace /** with /* in all functions - Use generic function for testing disabled or in reset - Switch MMU physical pages list to array as list is not needed - Remove Authors: from comment

[PATCH v2 15/15] Update MAINTAINERS and CREDITS with habanalabs info

2019-01-30 Thread Oded Gabbay
The habanalabs driver was written from scratch from the very first days of Habana and is maintained by Oded Gabbay. Signed-off-by: Oded Gabbay --- CREDITS | 2 +- MAINTAINERS | 9 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CREDITS b/CREDITS index e818eb6a3e71

[PATCH v2 00/15] Habana Labs kernel driver

2019-01-30 Thread Oded Gabbay
instead of looking at the emails, you can grab a copy from our company's page in GitHub: https://github.com/HabanaAI/linux/releases/tag/hl_patchset_v2_20190130 Oded Gabbay (14): habanalabs: add skeleton driver habanalabs: add Goya registers header files habanalabs: add basic Goya support

Re: [PATCH 12/15] habanalabs: add virtual memory and MMU modules

2019-01-30 Thread Oded Gabbay
On Sun, Jan 27, 2019 at 6:13 PM Mike Rapoport wrote: > > On Wed, Jan 23, 2019 at 02:00:54AM +0200, Oded Gabbay wrote: > > From: Omer Shpigelman > > > > This patch adds the Virtual Memory and MMU modules. > > > > Goya has an internal MMU which provides proce

Re: [PATCH 01/15] habanalabs: add skeleton driver

2019-01-29 Thread Oded Gabbay
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: > > > > > > &

Re: [PATCH 11/15] habanalabs: add command submission module

2019-01-28 Thread Oded Gabbay
On Sun, Jan 27, 2019 at 5:11 PM Mike Rapoport wrote: > > On Wed, Jan 23, 2019 at 02:00:53AM +0200, Oded Gabbay wrote: > > This patch adds the main flow for the user to submit work to the device. > > > > Each work is described by a command submission object (CS). The

Re: [PATCH 10/15] habanalabs: add device reset support

2019-01-28 Thread Oded Gabbay
On Sun, Jan 27, 2019 at 9:51 AM Mike Rapoport wrote: > > On Wed, Jan 23, 2019 at 02:00:52AM +0200, Oded Gabbay wrote: > > This patch adds support for doing various on-the-fly reset of Goya. > > > > The driver supports two types of resets: > > 1. soft-reset > &

Re: [PATCH 09/15] habanalabs: add sysfs and hwmon support

2019-01-28 Thread Oded Gabbay
On Fri, Jan 25, 2019 at 9:54 AM Mike Rapoport wrote: > > On Wed, Jan 23, 2019 at 02:00:51AM +0200, Oded Gabbay wrote: > > This patch add the sysfs and hwmon entries that are exposed by the driver. > > > > Goya has several sensors, from various categories such as temperatu

Re: [PATCH 08/15] habanalabs: add event queue and interrupts

2019-01-28 Thread Oded Gabbay
On Fri, Jan 25, 2019 at 9:51 AM Mike Rapoport wrote: > > On Wed, Jan 23, 2019 at 02:00:50AM +0200, Oded Gabbay wrote: > > This patch adds support for receiving events from Goya's control CPU and > > for receiving MSI-X interrupts from Goya's DMA engines and CPU. > > &

Re: [PATCH 07/15] habanalabs: add h/w queues module

2019-01-28 Thread Oded Gabbay
On Fri, Jan 25, 2019 at 9:51 AM Mike Rapoport wrote: > > On Wed, Jan 23, 2019 at 02:00:49AM +0200, Oded Gabbay wrote: > > This patch adds the H/W queues module and the code to initialize Goya's > > various compute and DMA engines and their queues. > > > > Goya has

Re: [PATCH 06/15] habanalabs: add basic Goya h/w initialization

2019-01-28 Thread Oded Gabbay
; rather than code can help. > > On Wed, Jan 23, 2019 at 02:00:48AM +0200, Oded Gabbay wrote: > > This patch adds the basic part of Goya's H/W initialization. It adds code > > that initializes Goya's internal CPU, various registers that are related to > > internal routing, scrambl

Re: [PATCH 05/15] habanalabs: add command buffer module

2019-01-27 Thread Oded Gabbay
On Sun, Jan 27, 2019 at 8:49 AM Mike Rapoport wrote: > > On Fri, Jan 25, 2019 at 11:47:03PM +0200, Oded Gabbay wrote: > > On Wed, Jan 23, 2019 at 2:28 PM Mike Rapoport wrote: > > > > > > On Wed, Jan 23, 2019 at 02:00:47AM +0200, Oded Gabbay wrote: > > >

Re: [PATCH 03/15] habanalabs: add basic Goya support

2019-01-27 Thread Oded Gabbay
On Sun, Jan 27, 2019 at 8:39 AM Mike Rapoport wrote: > > On Fri, Jan 25, 2019 at 10:32:55PM +0200, Oded Gabbay wrote: > > On Wed, Jan 23, 2019 at 2:28 PM Mike Rapoport wrote: > > > > > > On Wed, Jan 23, 2019 at 02:00:45AM +0200, Oded Gabbay wrote: > >

Re: [PATCH 01/15] habanalabs: add skeleton driver

2019-01-26 Thread Oded Gabbay
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: > > > > &g

Re: [PATCH 01/15] habanalabs: add skeleton driver

2019-01-26 Thread Oded Gabbay
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 10

Re: [PATCH 05/15] habanalabs: add command buffer module

2019-01-25 Thread Oded Gabbay
On Wed, Jan 23, 2019 at 2:28 PM Mike Rapoport wrote: > > On Wed, Jan 23, 2019 at 02:00:47AM +0200, Oded Gabbay wrote: > > This patch adds the CB module, which allows the user to create and > > destroy CBs and to map them to the user's process address-space. > > Can y

Re: [PATCH 04/15] habanalabs: add context and ASID modules

2019-01-25 Thread Oded Gabbay
On Wed, Jan 23, 2019 at 2:28 PM Mike Rapoport wrote: > > On Wed, Jan 23, 2019 at 02:00:46AM +0200, Oded Gabbay wrote: > > This patch adds two modules - ASID and context. > > > > Each user process the opens a device's file must have at least one context > >

Re: [PATCH 03/15] habanalabs: add basic Goya support

2019-01-25 Thread Oded Gabbay
On Wed, Jan 23, 2019 at 2:28 PM Mike Rapoport wrote: > > On Wed, Jan 23, 2019 at 02:00:45AM +0200, Oded Gabbay wrote: > > This patch adds a basic support for the Goya device. The code initializes > > the device's PCI controller and PCI bars. It also initializes various S/W >

Re: [PATCH 01/15] habanalabs: add skeleton driver

2019-01-25 Thread Oded Gabbay
On Wed, Jan 23, 2019 at 2:55 PM Mike Rapoport wrote: > > On Wed, Jan 23, 2019 at 01:40:04PM +0100, Greg KH wrote: > > On Wed, Jan 23, 2019 at 02:28:05PM +0200, Mike Rapoport wrote: > > > On Wed, Jan 23, 2019 at 02:00:43AM +0200, Oded Gabbay wrote: > > > > +

Re: [PATCH 01/15] habanalabs: add skeleton driver

2019-01-25 Thread Oded Gabbay
On Wed, Jan 23, 2019 at 2:28 PM Mike Rapoport wrote: > > On Wed, Jan 23, 2019 at 02:00:43AM +0200, Oded Gabbay wrote: > > This patch adds the habanalabs skeleton driver. The driver does nothing at > > this stage except very basic operations. It contains the minimal code to &g

Re: [PATCH 01/15] habanalabs: add skeleton driver

2019-01-25 Thread Oded Gabbay
On Wed, Jan 23, 2019 at 2:49 AM Joe Perches wrote: > > On Wed, 2019-01-23 at 02:00 +0200, Oded Gabbay wrote: > > This patch adds the habanalabs skeleton driver. The driver does nothing at > > this stage except very basic operations. It contains the minimal code to > > ins

Re: [PATCH 00/15] Habana Labs kernel driver

2019-01-24 Thread Oded Gabbay
ote: > > > > > > > > On Wed, Jan 23, 2019 at 03:04:33PM -0800, Olof Johansson wrote: > > > > > On Wed, Jan 23, 2019 at 2:45 PM Dave Airlie wrote: > > > > > > > > > > > > On Thu, 24 Jan 2019 at 08:32, Oded Gabbay > &g

Re: [PATCH 00/15] Habana Labs kernel driver

2019-01-23 Thread Oded Gabbay
On Thu, Jan 24, 2019 at 1:20 AM Jerome Glisse wrote: > > On Wed, Jan 23, 2019 at 03:04:33PM -0800, Olof Johansson wrote: > > On Wed, Jan 23, 2019 at 2:45 PM Dave Airlie wrote: > > > > > > On Thu, 24 Jan 2019 at 08:32, Oded Gabbay wrote: > > > > >

Re: [PATCH 00/15] Habana Labs kernel driver

2019-01-23 Thread Oded Gabbay
On Thu, Jan 24, 2019 at 1:04 AM Olof Johansson wrote: > > On Wed, Jan 23, 2019 at 2:45 PM Dave Airlie wrote: > > > > On Thu, 24 Jan 2019 at 08:32, Oded Gabbay wrote: > > > > > > On Thu, Jan 24, 2019 at 12:02 AM Dave Airlie wrote: > > > > >

Re: [PATCH 00/15] Habana Labs kernel driver

2019-01-23 Thread Oded Gabbay
On Wed, Jan 23, 2019 at 2:28 PM Mike Rapoport wrote: > > Hi, > > On Wed, Jan 23, 2019 at 02:00:42AM +0200, Oded Gabbay wrote: > > Hello, > > > > For those who don't know me, my name is Oded Gabbay (Kernel Maintainer > > for AMD's amdkfd driver, worked a

Re: [PATCH 00/15] Habana Labs kernel driver

2019-01-23 Thread Oded Gabbay
On Wed, Jan 23, 2019 at 11:52 PM Olof Johansson wrote: > > Hi, > > On Tue, Jan 22, 2019 at 4:01 PM Oded Gabbay wrote: > > > > Hello, > > > > For those who don't know me, my name is Oded Gabbay (Kernel Maintainer > > for AMD's amdkfd driver, wo

Re: [PATCH 00/15] Habana Labs kernel driver

2019-01-23 Thread Oded Gabbay
On Thu, Jan 24, 2019 at 12:02 AM Dave Airlie wrote: > > Adding Daniel as well. > > Dave. > > On Thu, 24 Jan 2019 at 07:57, Dave Airlie wrote: > > > > On Wed, 23 Jan 2019 at 10:01, Oded Gabbay wrote: > > > > > > Hello, > > > > >

[PATCH 10/15] habanalabs: add device reset support

2019-01-22 Thread Oded Gabbay
will restore the max power attribute and in case of manual power management, the frequencies that were set. This patch also adds two entries to the sysfs, which allows the root user to initiate a soft or hard reset. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/command_buffer.c | 11

[PATCH 07/15] habanalabs: add h/w queues module

2019-01-22 Thread Oded Gabbay
that was given to it. The internal QMAN doesn't do that. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/Makefile |2 +- drivers/misc/habanalabs/device.c | 74 +- drivers/misc/habanalabs/goya/goya.c | 1518 +++-- drivers/misc/habanalabs/goya

[PATCH 04/15] habanalabs: add context and ASID modules

2019-01-22 Thread Oded Gabbay
. A "primary context" is created automatically when the user opens the device's file. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/Makefile | 2 +- drivers/misc/habanalabs/asid.c | 58 + drivers/misc/habanalabs/context.c| 155 +++

[PATCH 14/15] habanalabs: add debugfs support

2019-01-22 Thread Oded Gabbay
to perform reads and writes through Goya's PCI bars. Signed-off-by: Oded Gabbay --- .../ABI/testing/debugfs-driver-habanalabs | 127 ++ drivers/misc/habanalabs/Makefile |2 + drivers/misc/habanalabs/command_buffer.c |4 + drivers/misc/habanalabs/command_submission.c

[PATCH 15/15] Update MAINTAINERS and CREDITS with habanalabs info

2019-01-22 Thread Oded Gabbay
The habanalabs driver was written from scratch from the very first days of Habana and is maintained by Oded Gabbay. Signed-off-by: Oded Gabbay --- CREDITS | 2 +- MAINTAINERS | 9 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CREDITS b/CREDITS index e818eb6a3e71

[PATCH 12/15] habanalabs: add virtual memory and MMU modules

2019-01-22 Thread Oded Gabbay
and freeing memory on the DDR upon user request. It also provides an interface to map and unmap DDR and Host memory to the device address space. Signed-off-by: Omer Shpigelman Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/Makefile |2 +- drivers/misc/habanalabs/context.c

[PATCH 08/15] habanalabs: add event queue and interrupts

2019-01-22 Thread Oded Gabbay
entry to the EQ, the control CPU will trigger its dedicated MSI-X entry to signal the driver that there is a new entry in the EQ. The driver will then read the entry and act accordingly. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/device.c| 35 +- drivers/misc/habanalabs/goya

[PATCH 09/15] habanalabs: add sysfs and hwmon support

2019-01-22 Thread Oded Gabbay
(operational, malfunction, in_reset) - How many processes are open on the device's file Signed-off-by: Oded Gabbay --- .../ABI/testing/sysfs-driver-habanalabs | 190 ++ drivers/misc/habanalabs/Makefile | 2 +- drivers/misc/habanalabs/device.c | 146

[PATCH 11/15] habanalabs: add command submission module

2019-01-22 Thread Oded Gabbay
then query the driver regarding the status of the CS, using that sequence number. In case the CS doesn't finish before the timeout expires, the driver will perform a soft-reset of the device. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/Makefile |3 +- drivers/misc

[PATCH 13/15] habanalabs: implement INFO IOCTL

2019-01-22 Thread Oded Gabbay
-by: Oded Gabbay --- drivers/misc/habanalabs/goya/goya.c| 6 + drivers/misc/habanalabs/habanalabs.h | 2 + drivers/misc/habanalabs/habanalabs_ioctl.c | 132 + include/uapi/misc/habanalabs.h | 76 +++- 4 files changed, 215 insertions(+), 1

[PATCH 01/15] habanalabs: add skeleton driver

2019-01-22 Thread Oded Gabbay
This patch adds the habanalabs skeleton driver. The driver does nothing at this stage except very basic operations. It contains the minimal code to insmod and rmmod the driver and to create a /dev/hlX file per PCI device. Signed-off-by: Oded Gabbay --- drivers/misc/Kconfig

[PATCH 03/15] habanalabs: add basic Goya support

2019-01-22 Thread Oded Gabbay
This patch adds a basic support for the Goya device. The code initializes the device's PCI controller and PCI bars. It also initializes various S/W structures and adds some basic helper functions. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/Makefile| 5 +- drivers/misc

[PATCH 00/15] Habana Labs kernel driver

2019-01-22 Thread Oded Gabbay
Hello, For those who don't know me, my name is Oded Gabbay (Kernel Maintainer for AMD's amdkfd driver, worked at RedHat's Desktop group) and I work at Habana Labs since its inception two and a half years ago. Habana is a leading startup in the emerging AI processor space and we have already

[PATCH 05/15] habanalabs: add command buffer module

2019-01-22 Thread Oded Gabbay
will go to the slow-path of allocating a new CB, i.e. calling dma_alloc_coherent. Signed-off-by: Oded Gabbay --- drivers/misc/habanalabs/Makefile | 3 +- drivers/misc/habanalabs/command_buffer.c | 414 + drivers/misc/habanalabs/device.c | 43

Re: [PATCH 2/8] drm/amdgpu: fix 32-bit build warning

2018-05-28 Thread Oded Gabbay
t; WREG32(SOC15_REG_OFFSET(GC, 0, mmCP_PQ_WPTR_POLL_CNTL1), >get_queue_mask(adev, pipe_id, queue_id)); > } > -- > 2.9.0 > There is a change scheduled for the next merge window that will cause this file to not build anymore on 32-bit targets (because the am

Re: [PATCH 2/8] drm/amdgpu: fix 32-bit build warning

2018-05-28 Thread Oded Gabbay
R_POLL_CNTL1), >get_queue_mask(adev, pipe_id, queue_id)); > } > -- > 2.9.0 > There is a change scheduled for the next merge window that will cause this file to not build anymore on 32-bit targets (because the amdkfd driver is not supported on 32 bit targets). Never the less I'm taking the patch for good measure. This patch is: Reviewed-by: Oded Gabbay

Re: linux-next: build failure after merge of the drm tree

2018-05-16 Thread Oded Gabbay
ject: [PATCH] drm/amdgpu: include pagemap.h for release_pages() > > Fixes: 5ae0283e831a ("drm/amdgpu: Add userptr support for KFD" > Cc: Felix Kuehling <felix.kuehl...@amd.com> > Cc: Oded Gabbay <oded.gab...@gmail.com> > Signed-off-by: Stephen Rothwell <s...@

Re: linux-next: build failure after merge of the drm tree

2018-05-16 Thread Oded Gabbay
e_pages() > > Fixes: 5ae0283e831a ("drm/amdgpu: Add userptr support for KFD" > Cc: Felix Kuehling > Cc: Oded Gabbay > Signed-off-by: Stephen Rothwell > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --g

Re: [PATCHv3] drm/amdkfd: Remove vla

2018-05-12 Thread Oded Gabbay
On Thu, May 3, 2018 at 12:49 AM, Kees Cook wrote: > On Fri, Apr 13, 2018 at 2:24 PM, Laura Abbott wrote: >> >> There's an ongoing effort to remove VLAs[1] from the kernel to eventually >> turn on -Wvla. Switch to a constant value that covers all

Re: [PATCHv3] drm/amdkfd: Remove vla

2018-05-12 Thread Oded Gabbay
On Thu, May 3, 2018 at 12:49 AM, Kees Cook wrote: > On Fri, Apr 13, 2018 at 2:24 PM, Laura Abbott wrote: >> >> There's an ongoing effort to remove VLAs[1] from the kernel to eventually >> turn on -Wvla. Switch to a constant value that covers all hardware. >> >> [1]

Re: [PATCH] amdkfd: always select MMU_NOTIFIER

2018-04-24 Thread Oded Gabbay
Thanks, but I took Randy's patch as it was earlier in my email queue. Oded On Thu, Apr 19, 2018 at 8:47 PM, Felix Kuehling wrote: > On 2018-04-19 06:56 AM, Anders Roxell wrote: >> On 28 March 2018 at 18:04, Christian König wrote: >>> Am

Re: [PATCH] amdkfd: always select MMU_NOTIFIER

2018-04-24 Thread Oded Gabbay
Thanks, but I took Randy's patch as it was earlier in my email queue. Oded On Thu, Apr 19, 2018 at 8:47 PM, Felix Kuehling wrote: > On 2018-04-19 06:56 AM, Anders Roxell wrote: >> On 28 March 2018 at 18:04, Christian König wrote: >>> Am 28.03.2018 um 17:53 schrieb Arnd Bergmann: Building

Re: [PATCH] gpu/drm/amd/amdkfd: fix build, select MMU_NOTIFIER

2018-04-24 Thread Oded Gabbay
led by default] >> ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:439:2: warning: (near >> initialization for 'kfd_process_mmu_notifier_ops') [enabled by default] >> ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:534:2: error: implicit >> declaration of function 'mmu_notifier_register'

Re: [PATCH] gpu/drm/amd/amdkfd: fix build, select MMU_NOTIFIER

2018-04-24 Thread Oded Gabbay
r >> initialization for 'kfd_process_mmu_notifier_ops') [enabled by default] >> ../drivers/gpu/drm/amd/amdkfd/kfd_process.c:534:2: error: implicit >> declaration of function 'mmu_notifier_register' >> [-Werror=implicit-function-declaration] >> >> Signed-off-by: Randy Dun

Re: [PATCH] uapi: fix linux/kfd_ioctl.h userspace compilation errors

2018-04-24 Thread Oded Gabbay
Thanks, but already fixed in latest upstream tree Oded On Thu, Apr 5, 2018 at 7:26 AM, Dmitry V. Levin wrote: > Consistently use types provided by via > to fix the following linux/kfd_ioctl.h userspace compilation errors: > > /usr/include/linux/kfd_ioctl.h:266:2: error:

Re: [PATCH] uapi: fix linux/kfd_ioctl.h userspace compilation errors

2018-04-24 Thread Oded Gabbay
Thanks, but already fixed in latest upstream tree Oded On Thu, Apr 5, 2018 at 7:26 AM, Dmitry V. Levin wrote: > Consistently use types provided by via > to fix the following linux/kfd_ioctl.h userspace compilation errors: > > /usr/include/linux/kfd_ioctl.h:266:2: error: unknown type name

Re: [PATCH -next] drm/amdkfd: Fix the error return code in kfd_ioctl_unmap_memory_from_gpu()

2018-04-24 Thread Oded Gabbay
On Mon, Apr 2, 2018 at 9:02 PM, Felix Kuehling wrote: > Thanks for catching that. I'd use -ENODEV to match what is done a few > lines below for peer_pdd. With that fixed, this patch is Reviewed-by: > Felix Kuehling > > Regards, > Felix > > > On

Re: [PATCH -next] drm/amdkfd: Fix the error return code in kfd_ioctl_unmap_memory_from_gpu()

2018-04-24 Thread Oded Gabbay
On Mon, Apr 2, 2018 at 9:02 PM, Felix Kuehling wrote: > Thanks for catching that. I'd use -ENODEV to match what is done a few > lines below for peer_pdd. With that fixed, this patch is Reviewed-by: > Felix Kuehling > > Regards, > Felix > > > On 2018-03-29 10:25 PM, Wei Yongjun wrote: >>

Re: [PATCH -next] drm/amdkfd: Make function kfd_dev_is_large_bar() static

2018-04-24 Thread Oded Gabbay
On Mon, Apr 2, 2018 at 9:03 PM, Felix Kuehling wrote: > This patch is Reviewed-by: Felix Kuehling > > > On 2018-03-29 10:25 PM, Wei Yongjun wrote: >> Fixes the following sparse warning: >> >> drivers/gpu/drm/amd/amdkfd/kfd_chardev.c:1150:6:

Re: [PATCH -next] drm/amdkfd: Make function kfd_dev_is_large_bar() static

2018-04-24 Thread Oded Gabbay
On Mon, Apr 2, 2018 at 9:03 PM, Felix Kuehling wrote: > This patch is Reviewed-by: Felix Kuehling > > > On 2018-03-29 10:25 PM, Wei Yongjun wrote: >> Fixes the following sparse warning: >> >> drivers/gpu/drm/amd/amdkfd/kfd_chardev.c:1150:6: warning: >> symbol 'kfd_dev_is_large_bar' was not

<    4   5   6   7   8   9   10   11   12   13   >