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
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
(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
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
-by: Mike Rapoport
Signed-off-by: Oded Gabbay
---
Changes in v4:
- Use -ENOTTY to signal bad ioctl parameter in info ioctl
drivers/misc/habanalabs/goya/goya.c| 6 +
drivers/misc/habanalabs/habanalabs.h | 2 +
drivers/misc/habanalabs/habanalabs_ioctl.c | 126
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.
Reviewed-by: Mike Rapoport
Signed-off-by: Oded Gabbay
---
Changes in v4:
- Use
to perform reads and writes through Goya's PCI
bars.
Reviewed-by: Mike Rapoport
Signed-off-by: Oded Gabbay
---
Changes in v4:
- debugfs init shouldn't check for errors
- Remove empty line at end of debugfs-driver-habanalabs
.../ABI/testing/debugfs-driver-habanalabs | 126 ++
drivers/misc
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 v4:
- Return number of ptes in dec pte
- Rename dec/inc_num_of_ptes to put/get_pte
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
that was given to
it. The internal QMAN doesn't do that.
Reviewed-by: Mike Rapoport
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/Makefile |2 +-
drivers/misc/habanalabs/device.c | 75 +-
drivers/misc/habanalabs/goya/goya.c | 1525
is empty, the driver
will go to the slow-path of allocating a new CB, i.e. calling
dma_alloc_coherent.
Reviewed-by: Mike Rapoport
Signed-off-by: Oded Gabbay
---
Changes in v4:
- Use -ENOTTY to signal bad ioctl parameter
- Call put_cb() after updating its values (to prevent dereference after free
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 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
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
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
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
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
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
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
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
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
-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
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
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
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
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
(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
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
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
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:
> > > > +
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
>
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
>
>
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
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
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
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
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
This patch only does renaming of certain variables and structure members,
and their accompanied comments.
This is done to better reflect the actions these variables and members
represent.
There is no functional change in this patch.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs
d values: disable, enable, suspend, resume,
> cpu_timeout\n";
> + return simple_read_from_buffer(buf, count, ppos, help, strlen(help));
> }
>
> static ssize_t hl_device_write(struct file *f, const char __user *buf,
> @@ -739,7 +715,7 @@ static ssize_t hl_device_write(struct file *f, const char
> __user *buf,
> {
> struct hl_dbg_device_entry *entry = file_inode(f)->i_private;
> struct hl_device *hdev = entry->hdev;
> - char data[30];
> + char data[30] = {0};
>
> /* don't allow partial writes */
> if (*ppos != 0)
> --
> 2.21.0.1020.gf2820cf01a-goog
>
Thanks!
Will be applied to my -next branch
This patch is:
Reviewed-by: Oded Gabbay
On Mon, May 6, 2019 at 1:15 PM Oded Gabbay wrote:
>
> On Sat, May 4, 2019 at 4:56 PM Jann Horn wrote:
> >
> > This fixes multiple things in the habanalabs debugfs code, in particular:
> >
> > - mmu_write() was unnecessarily verbose, copying around b
This patch removes some dead code that performs checks about variables
with hard-coded values.
The patch also moves the initialization of those variables to a separate
function, that will possibly have different values per ASIC.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs
This patch changes the order of checks when initializing the device CPU.
We want first to check if we need to load the F/W, and only if we need to,
then we want to check the status of the CPU boot program.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 6 +++---
1 file
-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/misc/habanalabs/goya/goya.c
b/drivers/misc/habanalabs/goya/goya.c
index ccf9d925b6ed..756921c52cf7 100644
--- a/drivers/misc/habanalabs/goya/goya.c
+++ b
or timeout and for the (cond) in the calling function.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/command_submission.c | 10 +--
drivers/misc/habanalabs/device.c | 89
drivers/misc/habanalabs/firmware_if.c| 29 +++
drivers/misc/habanalabs/g
The driver allocates memory for fence object with GFP_ZERO flag, so there
is no need to explicitly write 0 to the allocated object after the
allocation.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/misc
This patch adds a new parameter that is passed to the
add_end_of_cb_packets() asic-specific function.
The parameter is the pointer to the driver's device structure. The
function needs this pointer for future ASICs.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 4
is upstreamed in kernel 5.2, I
think this is justified at this point because we won't be able to change
the API later.
Jann Horn (1):
habanalabs: fix debugfs code
Oded Gabbay (1):
uapi/habanalabs: add opcode for enable/disable
):
habanalabs: remove implicit include from header files
Igor Grinberg (1):
habanalabs: add new device CPU boot status
Oded Gabbay (18):
habanalabs: rename goya_non_fatal_events array to all events
habanalabs: use EQ MSI/X ID per chip
habanalabs: remove unused defines
to be prone
to compilation errors.
This patch cancels this dependency by defining the macro only in the few
source files that use it.
Signed-off-by: Tomer Tayar
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/device.c | 2 ++
drivers/misc/habanalabs/habanalabs.h | 2 --
drivers/misc
.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya_coresight.c | 16
include/uapi/misc/habanalabs.h| 9 ++---
2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/drivers/misc/habanalabs/goya/goya_coresight.c
b/drivers/misc/habanalabs
This patch re-factors goya_parse_cb_no_ext_queue() to make it more
readable by inverting the check inside the first if statement so the bulk
of the function won't be inside an if statement.
The patch also fixes a spelling error in the name of the function.
Signed-off-by: Oded Gabbay
of
this macro in the simulator files.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 4 +++-
drivers/misc/habanalabs/habanalabs.h | 32 ++--
2 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/drivers/misc/habanalabs/goya/goya.c
b/drivers
of
this macro in the simulator files.
As a result from this change, more functions in goya.c are shared with the
simulator and therefore, should not be defined as static.
Signed-off-by: Oded Gabbay
---
Changes in v2:
- Remove static from some functions as goya.c as they are now called
from
of
this macro in the simulator files.
As a result from this change, more functions in goya.c are shared with the
simulator and therefore, should not be defined as static.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 32 +++
drivers/misc/habanalabs/goya
of
this macro in the simulator files.
As a result from this change, more functions in goya.c are shared with the
simulator and therefore, should not be defined as static.
Signed-off-by: Oded Gabbay
---
Changes in v2:
- Remove static from some functions as goya.c as they are now called
from
From: Tomer Tayar
The MMU cache mutex is used in the ASIC hw_init() functions, but it is
initialized only later in hl_mmu_init().
This patch prevents it by moving the initialization to the
device_early_init() function.
Signed-off-by: Tomer Tayar
Signed-off-by: Oded Gabbay
Cc: sta
From: Omer Shpigelman
This patch increases the timeout for PCI ELBI configuration to support low
frequency Palladium images.
Signed-off-by: Omer Shpigelman
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/habanalabs.h | 2 ++
drivers/misc/habanalabs/pci.c| 10 +-
2
This patch renames four functions in the ASIC-specific functions section,
so it will be easier to differentiate them from the generic kernel
functions with the same name.
This will help in future code reviews, to make sure we don't use the
kernel functions directly.
Signed-off-by: Oded Gabbay
-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 27 +++
1 file changed, 3 insertions(+), 24 deletions(-)
diff --git a/drivers/misc/habanalabs/goya/goya.c
b/drivers/misc/habanalabs/goya/goya.c
index 04e4ed8a0be6..9fc8b6e1369d 100644
--- a/drivers/misc
Tayar
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/firmware_if.c | 7 +--
drivers/misc/habanalabs/goya/goya.c | 90 +--
drivers/misc/habanalabs/habanalabs.h | 10 ++-
drivers/misc/habanalabs/hw_queue.c| 6 +-
drivers/misc/habanalabs/memory.c | 4
-by: Dalit Ben Zoor
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/command_submission.c | 1 -
drivers/misc/habanalabs/goya/goya.c | 2 +-
drivers/misc/habanalabs/habanalabs.h | 3 ---
3 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/misc/habanalabs
From: Dalit Ben Zoor
After removing the parsing of the command submission
when doing memset of the device memory, goya_validate_dma_pkt_host
is never called by the kernel, so there is no need to check
context id.
Signed-off-by: Dalit Ben Zoor
Signed-off-by: Oded Gabbay
---
drivers/misc
with simulator.
Signed-off-by: Dalit Ben Zoor
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/device.c | 8 +++-
drivers/misc/habanalabs/habanalabs.h | 7 ++-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/habanalabs/device.c b/drivers/misc/habanalabs
From: Tomer Tayar
The CPU accessible DMA pool is general and not used only for PQ.
Accordingly, this patch rename the "free_cpu_pq_pool" label with
"free_cpu_accessible_dma_pool".
Signed-off-by: Tomer Tayar
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goy
that is always true
habanalabs: increase timeout if working with simulator
Oded Gabbay (6):
habanalabs: re-factor goya_parse_cb_no_ext_queue()
uapi/habanalabs: add missing fields in bmon params
habanalabs: use ASIC functions interface for rreg/wreg
habanalabs: rename restore
On Fri, May 3, 2019 at 10:51 AM Greg KH wrote:
>
> On Fri, May 03, 2019 at 10:36:21AM +0300, Oded Gabbay wrote:
> > Hi Greg,
> >
> > This is the second pull request of habanalabs driver for kernel 5.2.
> >
> > As the tag describes, all of the changes a
the driver currently does NOT support multiple users, the
implementation of the restrictions is not required at this point. However,
the interface definition is needed in order to avoid changing the user API
later on.
Signed-off-by: Oded Gabbay
---
include/uapi/misc/habanalabs.h | 22
is also opposed to the general rule where nothing runs on
the device after the user process closes.
The patch stops the debug H/W engines upon process termination and thus
makes sure nothing runs on the device after the process goes away.
Signed-off-by: Omer Shpigelman
Signed-off-by: Oded Gabbay
needed for easier support in future ASICs.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 60 +---
drivers/misc/habanalabs/habanalabs.h | 5 ++-
drivers/misc/habanalabs/pci.c| 5 ++-
3 files changed, 35 insertions(+), 35 deletions(-)
diff
have the same MSBs starting at bit 40.
This patch modifies the allocation of the PQ and EQ to be also from the
dedicated pool, to ensure compliance with the limitation.
Signed-off-by: Tomer Tayar
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/habanalabs.h | 12 +++
drivers/misc
This patch adds support to the goya memset function to perform memset to
device memory with size larger then 4GB. In this case, we need to use
multiple LIN_DMA packets because a single packet supports up to 4GB.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 49
of the packets.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/firmware_if.c | 12
drivers/misc/habanalabs/goya/goya.c | 2 +-
drivers/misc/habanalabs/habanalabs.h | 12 ++--
3 files changed, 3 insertions(+), 23 deletions(-)
diff --git a/drivers/misc/habanalabs
during the MMU unmap.
Hence adding a wait between killing the user process and the start of the
reset flow.
Signed-off-by: Omer Shpigelman
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/device.c | 24 +++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git
.
As a result virtual addresses were mapped to wrong physical address.
The fix is to apply the break down for the physical addresses as well in
order to get correct mappings.
Signed-off-by: Omer Shpigelman
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/mmu.c | 6 --
1 file changed, 4 insertions
From: Omer Shpigelman
The requested allocation size is 64bit, hence the number of requested
pages and the total requested size should 64bit as well.
This patch fixes all places where these are treated as 32bit.
Signed-off-by: Omer Shpigelman
Signed-off-by: Oded Gabbay
---
drivers/misc
with kmalloc, hence changing to kvmalloc.
Signed-off-by: Omer Shpigelman
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/memory.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/misc/habanalabs/memory.c b/drivers/misc/habanalabs/memory.c
index 4f8c968e441a
] *
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/habanalabs/goya/goya.c
b/drivers/misc/habanalabs/goya/goya.c
index 538d8d59d9dc..ea979ebd62fb 100644
--- a/drivers/misc/habanalabs/goya/goya.c
+++ b
to perform accounting on their number.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/command_submission.c | 6 ++
drivers/misc/habanalabs/device.c | 1 +
drivers/misc/habanalabs/habanalabs.h | 13 -
drivers/misc/habanalabs/hw_queue.c | 5
was
loaded. If the controller is not initialized and the device tries to
access the device through the PCI bars, the host will crash with PCI
completion timeout error.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/device.c| 46 +++--
drivers/misc/habanalabs/goya/goya.c
):
habanalabs: remove implicit include from header files
Igor Grinberg (1):
habanalabs: add new device CPU boot status
Oded Gabbay (7):
habanalabs: rename goya_non_fatal_events array to all events
habanalabs: use EQ MSI/X ID per chip
habanalabs: remove unused defines
habanalabs: ratelimit
The goya_non_fatal_events array actually contains all the possible events
the driver can receive from the F/W. Therefore, use a proper name
for the array.
The patch also adds missing event Ids to the goya_async_event_id enum.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c
From: Tomer Tayar
Move duplicated PCI-related code from ASIC-specific files into the common
pci.c file.
Signed-off-by: Tomer Tayar
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/Makefile | 2 +-
drivers/misc/habanalabs/goya/goya.c | 272 +
drivers
From: Dotan Barak
This will prevent unneeded include of header files, which may increase
compilation time.
Signed-off-by: Dotan Barak
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya_security.c | 1 +
drivers/misc/habanalabs/include/goya/goya.h | 4
2 files changed, 1
The Event Queue MSI/X ID is different per ASIC. This patch renames the
current define to have the GOYA_ prefix to mark it only for Goya. It also
moves it from the common armcp_if.h file to the ASIC specific goya_fw_if.h
file.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c
From: Igor Grinberg
This patch adds a definition of a new status in the device CPU boot stages
and add the handling of the new status.
Signed-off-by: Igor Grinberg
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 5 +
drivers/misc/habanalabs/include
From: Tomer Tayar
The addr/data32 debugfs nodes currently permit the access to only physical
addresses of a device. This patch extends it and allows accessing also
device's DRAM virtual addresses.
Signed-off-by: Tomer Tayar
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/debugfs.c
Hard-reset of our device should never fail, due to dangers of permanent
damage to the H/W.
This patch removes the last place in the reset path where the driver might
exit before doing the actual reset.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/device.c | 19 +--
1
From: Tomer Tayar
Print the name of a busy engine when checking if a device is idle.
The change is done mainly to help a user to pinpoint problems in his
topology's recipe.
Signed-off-by: Tomer Tayar
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c| 24
From: Tomer Tayar
Remove pointers to ASIC-specific functions and instead call the functions
explicitly as they are not accessed from outside the ASIC-specific files.
Signed-off-by: Tomer Tayar
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 12 +++-
drivers/misc
This patch adds two comments in uapi/habanalabs.h:
- From which queue id the internal queues begin
- Invalid values that can be returned in the seq field from the CS IOCTL
Signed-off-by: Oded Gabbay
---
include/uapi/misc/habanalabs.h | 7 +--
1 file changed, 5 insertions(+), 2 deletions
- in all the relevant IOCTLs.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/command_submission.c | 2 +-
drivers/misc/habanalabs/habanalabs_ioctl.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/habanalabs/command_submission.c
b/drivers/misc/habanalabs
of map/unmap flow, writings to the device are performed in
order to sync the H/W page tables with the shadow ones.
Signed-off-by: Omer Shpigelman
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/habanalabs.h | 24 +-
.../include/hw_ip/mmu/mmu_general.h | 16 +-
drivers
This patch removes some old defines which are not in use anymore.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goyaP.h | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/misc/habanalabs/goya/goyaP.h
b/drivers/misc/habanalabs/goya/goyaP.h
From: Tomer Tayar
This patch moves the code that is responsible of the communication
vs. the F/W to a dedicated file. This will allow us to share the code
between different ASICs.
Signed-off-by: Tomer Tayar
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/Makefile | 2
will be in a bus address which is lower then 39 bits. Later,
Goya will try to increase that mask to 48 bits, but only if setting the
mask to 39 bits was successful.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 32
drivers/misc/habanalabs/habanalabs.h | 5
On Tue, Mar 26, 2019 at 9:53 AM Greg KH wrote:
>
> On Thu, Mar 21, 2019 at 05:28:16PM +0200, Oded Gabbay wrote:
> > Hi Greg,
> >
> > A couple of important fixes for habanalabs driver:
> >
> > - Fix host crash upon resume after suspend
> > - Fix MMU relate
stuck
- Fix race between user context cleanup and hard-reset which results in
host crash
- Fix sparse warning
Oded Gabbay (3):
habanalabs: perform accounting for active CS
habanalabs: prevent host crash during suspend
Because DMA #0 is now used by the user, remove the limitation of credits
from this channel. Without this patch, this channel is pretty much
unusable due to its very low bandwidth configuration.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 9 -
1 file changed, 4
From: Dalit Ben Zoor
This patch adds a new opcode to INFO IOCTL that returns the device status.
This will allow users to query the device status in order to avoid sending
command submissions while device is in reset.
Signed-off-by: Dalit Ben Zoor
Signed-off-by: Oded Gabbay
---
drivers/misc
On Wed, Feb 27, 2019 at 9:05 AM Yue Haibing wrote:
>
> From: YueHaibing
>
> Fixes the following sparse warnings:
>
> drivers/misc/habanalabs/goya/goya.c:1233:5: warning: symbol
> 'goya_init_cpu_queues' was not declared. Should it be static?
> drivers/misc/habanalabs/goya/goya.c:2914:5: warning:
1201 - 1300 of 1658 matches
Mail list logo