From: Moti Haimovski
This commit fixes an incorrect error message
Signed-off-by: Moti Haimovski
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/habanalabs/common
From: Ofir Bitton
Once FW security is enabled there is no access to PLL registers,
need to read values from FW using a dedicated interface.
Signed-off-by: Ofir Bitton
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/firmware_if.c | 26
ogy recipe.
To re-enable that functionality, the driver can simply restore the
value of vm_pgoff before returning to userspace but after calling
dma_mmap_coherent().
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/command_buffer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dr
From: Tomer Tayar
Several header files are repeatedly included in many files.
Move these files to habanalabs.h which is included by all.
Signed-off-by: Tomer Tayar
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/command_buffer.c | 1 -
drivers/misc
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/gaudi/gaudi.c | 14 +-
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c
b/drivers/misc/habanalabs/gaudi/gaudi.c
index ae4f3669261d..c075f7f10843 100644
From: Ofir Bitton
The new state indicates that device should be reset in order
to re-gain funcionality.
This unique state can occur if reset_on_lockup is disabled
and an actual lockup has occurred.
Signed-off-by: Ofir Bitton
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
.../misc
From: Tomer Tayar
Slightly refactor the cs_do_release() function, to reduce nesting level
and to ease the handling of future CS types.
Signed-off-by: Tomer Tayar
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
.../habanalabs/common/command_submission.c| 99 +--
1
From: farah kassabri
failure in reading pre-boot verion is not handled correctly,
upon failure we need to reset the device in order to be able
to reinstall the driver.
Signed-off-by: farah kassabri
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common
.
Signed-off-by: Omer Shpigelman
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/device.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/misc/habanalabs/common/device.c
b/drivers/misc/habanalabs/common/device.c
From: Ofir Bitton
As in standard wait cs, we must release a signal fence once
a collective wait cs was dropped and not submitted.
Signed-off-by: Ofir Bitton
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/command_submission.c | 6 --
1 file changed
We print twice the firmware status regarding security, once in
common code and once in asic code. Remove the print in asic code
and leave the common code print.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/gaudi/gaudi.c | 3 ---
drivers/misc/habanalabs/goya/goya.c | 3 ---
2 files
-by: Tomer Tayar
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
.../habanalabs/common/command_submission.c| 25 ++-
drivers/misc/habanalabs/common/debugfs.c | 13 +-
drivers/misc/habanalabs/common/habanalabs.h | 2 ++
3 files changed, 28 insertions(+), 12
From: Tomer Tayar
There are no internal queues if H/W queues are being used.
In this case we can skip the redundant traversal over the queues array,
looking for internal queues.
Signed-off-by: Tomer Tayar
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common
of those queues are full.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/gaudi/gaudiP.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/habanalabs/gaudi/gaudiP.h
b/drivers/misc/habanalabs/gaudi/gaudiP.h
index 1dcf7c41e698..c3c24e8da4e2 100644
--- a/drivers
From: Ofir Bitton
Driver must verify if HW is dirty before trying to fetch preboot
information. Hence, we move this validation to a prior stage of
the boot sequence.
Signed-off-by: Ofir Bitton
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/device.c
support for MMU with 6 HOPs
Oded Gabbay (28):
habanalabs: increase length of ASIC name
habanalabs: change CB's ID to be 64 bits
habanalabs: cast int to u32 before printing it with %u
habanalabs: eliminate redundant else condition
habanalabs: use standard BIT
On Tue, Sep 22, 2020 at 1:08 AM Shuah Khan wrote:
>
> All,
>
> While I was looking at the atomic_t api usages for an unrelated issue,
> I noticed free_slots_cnt in struct hl_cq incerment/decrement/reads are
> not consistent.
>
> atomic_inc() and atomic_set() are used, however instead of
Add new structures and messages that the driver use to interact with the
firmware to receive information and events (errors) about GAUDI's NIC.
Signed-off-by: Omer Shpigelman
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
.../misc/habanalabs/include/common/cpucp_if.h | 34
, such as collective
wait mechanism.
Thanks,
Oded
Oded Gabbay (4):
habanalabs/gaudi: add NIC QMAN H/W and registers definitions
habanalabs/gaudi: add NIC firmware-related definitions
habanalabs/gaudi: add NIC security configuration
habanalabs/gaudi: add support for NIC QMANs
drivers/misc/habanalabs/common
the firmware.
However, the nic_ports_mask is still initialized to 0. That means this code
won't initialize the QMANs just yet. That will be in a later patch.
Signed-off-by: Omer Shpigelman
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/habanalabs.h | 3
From: Ofir Bitton
DMA5 QMAN is designated to be used for reduction process, hence it will
be no longer configured as external queue.
Signed-off-by: Ofir Bitton
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/gaudi/gaudi.c | 31
From: Ofir Bitton
Implement sync stream collective for GAUDI. Need to allocate additional
resources for that and add ctx_fini() to clean up those resources.
Signed-off-by: Ofir Bitton
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
.../habanalabs/common/command_submission.c| 11
From: Ofir Bitton
Define new API for collective wait support and modify sync stream
common flow. In addition add kernel CB allocation support for
internal queues.
Signed-off-by: Ofir Bitton
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
.../habanalabs/common/command_submission.c
will allow to
combine the two options.
Add a flag to the uapi so the user will be able to indicate whether
the CB was allocated by kernel or by user. Of course the driver
validates that.
Signed-off-by: Tal Cohen
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
.../habanalabs/common
the configuration was not executed in some
cases
- Mask watchdog timeout errors in QMANs which can spam the kernel log
Arnd Bergmann (1):
habanalabs: fix kernel pointer type
Oded Gabbay (1):
habanalabs/gaudi: mask WDT error
From: Ofir Bitton
We must relocate the coresight mmu configuration to the coresight
flow to make it work in case the first submission is to configure
the profiler.
Signed-off-by: Ofir Bitton
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/gaudi/gaudi.c
This interrupt cause is not relevant because of how the user use the
QMAN arbitration mechanism. We must mask it as the log explodes with it.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/include/gaudi/gaudi_masks.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/misc
Update the email to my kernel.org email address and update the git
repository address to the git.kernel.org
Signed-off-by: Oded Gabbay
---
MAINTAINERS | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index b516bb34a8d5..c3f3704acd64 100644
From: Ofir Bitton
Currently mmu_prepare is located at context switch.
Since we support a single context, no reason to reconfigure
the MMU registers every context switch.
Signed-off-by: Ofir Bitton
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/gaudi/gaudi.c
In case we will have multiple contexts/processes, we can't just
increment aggregated counters. We need to make them atomic as they can
be incremented by multiple processes
Signed-off-by: Oded Gabbay
---
.../habanalabs/common/command_submission.c| 42 +--
drivers/misc
F/W can be loaded but device CPU queues disabled. In that case, HWMON
should be disabled. This is only relevant when debugging
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/hwmon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/habanalabs/common
We already check if queue index is smaller than max queues a few lines
above this check so no need to check this again.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/command_submission.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/misc
No need to print when the driver starts to initialize the H/W. Drivers
should be silent when everything is OK.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/gaudi/gaudi.c | 2 --
drivers/misc/habanalabs/goya/goya.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/drivers/misc
In case we are running without MMU enabled (debug mode), no need to
initialize the VM module in the driver.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/memory.c | 33 +++--
1 file changed, 14 insertions(+), 19 deletions(-)
diff --git a/drivers/misc
From: Ofir Bitton
Support advanced monitor functionality to monitor more than a
single SOB. In addition expand all CB generation functions
with buffer offset in order to put in them multiple packets that are
generated by different functions.
Signed-off-by: Ofir Bitton
Reviewed-by: Oded Gabbay
From: Ofir Bitton
Refactor sync stream implementation by adding more structures for
better readability. In addition reducing allocated resources.
Signed-off-by: Ofir Bitton
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/habanalabs.h | 78
From: Ofir Bitton
Refactor sync stream implementation by reducing function length
for better readability.
Signed-off-by: Ofir Bitton
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
.../habanalabs/common/command_submission.c| 210 ++
1 file changed, 119 insertions
The driver now loads the firmware in two stages. For debugging purposes
we need to support situations where only the first stage firmware is
loaded.
Therefore, use a bitmask to determine which F/W is loaded
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/firmware_if.c| 9
From: Ofir Bitton
In order to support staged submission feature, we need to
distinguish on which command submission we want to receive
timeout and for which we want to receive completion.
Signed-off-by: Ofir Bitton
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
.../habanalabs
habanalabs: report dram_page_size in hw_ip_info ioctl
habanalabs: support non power-of-2 DRAM phys page sizes
Oded Gabbay (8):
habanalabs: update firmware boot interface
habanalabs: add ASIC property of functional HBMs
habanalabs: update to latest hl_boot_if.h
habanala
As the driver does with all interrupts, we need to tell F/W to unmask
the HBM interrupts after the driver handled them.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/gaudi/gaudi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c
b/drivers/misc
The firmware provides more information about SyncManager events.
Adjust the code to the latest firmware interface file.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/gaudi/gaudi.c | 14 +++---
drivers/misc/habanalabs/include/common/cpucp_if.h | 11 +--
2
It adds the definition for indication that the F/W handles HBM ECC
events.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/include/common/hl_boot_if.h | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/habanalabs/include/common/hl_boot_if.h
b/drivers
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
.../habanalabs/common/command_submission.c| 214 --
drivers/misc/habanalabs/common/habanalabs.h | 9 +
drivers/misc/habanalabs/common/hw_queue.c | 27 +++
drivers/misc/habanalabs/gaudi/gaudi.c | 1 +
4
From: Ohad Sharabi
ETR should always be non-secured as it is used by the users to record
profiling/trace data.
This patch fixes the configuration to match those requirements.
Signed-off-by: Ohad Sharabi
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
.../misc/habanalabs/gaudi
From: Ohad Sharabi
Currently this API uses single 64 bits mask for engines idle indication.
Recently, it was observed that more bits are needed for some ASICs.
This patch modifies the use of the idle mask and the idle_extensions
mask.
Signed-off-by: Ohad Sharabi
Reviewed-by: Oded Gabbay
-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/firmware_if.c| 17 +++--
drivers/misc/habanalabs/common/habanalabs.h | 3 +++
drivers/misc/habanalabs/gaudi/gaudi.c | 6 +-
drivers/misc/habanalabs/goya/goya.c | 6
From: Ofir Bitton
User must be aware of the available CQs when it needs to use them.
Signed-off-by: Ofir Bitton
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/habanalabs.h | 2 ++
drivers/misc/habanalabs/common/habanalabs_ioctl.c | 3
it shouldn't be.
Same logic should be applied after hard-reset.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/common/device.c | 23 +
drivers/misc/habanalabs/common/habanalabs.h | 9 ++--
drivers/misc/habanalabs/gaudi/gaudi.c | 10 ++---
drivers/misc
From: Ohad Sharabi
driver should use ECC info from FW only if HBM ECC CAP is set.
otherwise, try to fetch the data from MC regs only if security is
disabled.
Signed-off-by: Ohad Sharabi
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/gaudi/gaudi.c | 18
This patch adds some in-code documentation on the different opcodes of the
INFO IOCTL.
Signed-off-by: Oded Gabbay
---
include/uapi/misc/habanalabs.h | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc/habanalabs.h
When rejecting CS because of too many in-flight CS, print a debug message
about it as it useful to know when the user is debugging (it indicates a
back-pressure from the driver as the device is not fast enough to consume
the CS)
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs
seconds, which
is our largest timeout in the code. That is more then enough for anything
the simulator is doing.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/habanalabs.h | 20 ++--
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/misc/habanalabs
habanalabs: support hwmon_reset_history attribute
Dotan Barak (1):
habanalabs: print all CB handles as hex numbers
Oded Gabbay (17):
habanalabs: don't wait for ASIC CPU after reset
habanalabs: unify and improve device cpu init
habanalabs: print warning when reset is
Thanks, we already have a patch ready for that in -fixes branch that
will be applied in 5.8-rc2
Oded
On Thu, May 28, 2020 at 3:39 PM Dan Carpenter wrote:
>
> Smatch complains that "rc" can be uninitialized on certain paths.
>
> Fixes: 8ff5f4fd40df ("habanalabs: handle MMU cache invalidation
vaddr + phys_pg_pack->total_size - 1);
> + int tmp_rc;
> +
> if (rc)
> + dev_err(hdev->dev,
> + "unmapping vaddr 0x%llx failed due to MMU
> cache invalidation\n",
> + vaddr);
> +
> + tmp_rc = add_va_block(hdev, va_range, vaddr,
> + vaddr + phys_pg_pack->total_size - 1);
> + if (tmp_rc) {
> dev_warn(hdev->dev,
> "add va block failed for vaddr:
> 0x%llx\n",
> vaddr);
> + if (!rc)
> + rc = tmp_rc;
> + }
> }
>
> atomic_dec(_pg_pack->mapping_cnt);
> @@ -1108,7 +1129,7 @@ static int unmap_device_va(struct hl_ctx *ctx, u64
> vaddr, bool ctx_free)
> dma_unmap_host_va(hdev, userptr);
> }
>
> - return 0;
> + return rc;
>
> mapping_cnt_err:
> if (is_userptr)
> --
> 2.17.1
>
This patch is:
Reviewed-by: Oded Gabbay
because of gen_pool checks
- Don't initialize the default wait callback of dma_buf with the default
wait function as that's the default...
Daniel Vetter (1):
habanalabs: don't set default fence_ops->wait
Oded Gabbay
Use the u64_to_user_ptr(x) kernel macro to correctly cast u64 to void*
Reported-by: kbuild test robot
Reviewed-by: Omer Shpigelman
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/command_submission.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc
From: Tomer Tayar
Fix the following smatch error in unmap_device_va():
error: uninitialized symbol 'rc'.
Signed-off-by: Tomer Tayar
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
ruct hl_ctx *ctx, u64
> vaddr, bool ctx_free)
> struct hl_va_range *va_range;
> enum vm_type_t *vm_type;
> bool is_userptr;
> - int rc;
> + int rc = 0;
>
> /* protect from double entrance */
> mutex_lock(>mem_hash_lock);
> --
> 2.17.1
>
This patch is:
Reviewed-by: Oded Gabbay
Applied to -fixes
Use the u64_to_user_ptr(x) kernel macro to correctly cast u64 to void*
Reported-by: kbuild test robot
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/command_submission.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/habanalabs/command_submission.c
b
From: Omer Shpigelman
The PS flow for MMU cache invalidation caused timeouts in stress tests.
Use PS + PI flow so no timeouts should happen whatsoever.
Signed-off-by: Omer Shpigelman
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/gaudi/gaudi.c | 8
In Gaudi, the user can't execute scalar load_and_exe on external queue
because it can be a security hole. The driver doesn't parse the commands
being loaded and it can be msg_prot, which the user isn't allowed to use.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/gaudi/gaudi.c
The function name conflicts with a static inline function in
arch/m68k/include/asm/mcfmmu.h
Reported-by: kernel test robot
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/debugfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/habanalabs/debugfs.c
On Sat, Jan 20, 2018 at 12:30 AM, Gustavo A. R. Silva
wrote:
>
> Quoting Felix Kuehling :
>
>> Looks good. This change is Reviewed-by: Felix Kuehling
>>
>>
>
> Thanks Felix.
> --
> Gustavo
>
Applied to -next
Oded
>
>
>
>
on other architectures
(e.g. x86-64, ARM).
Thanks,
Oded
Oded Gabbay (8):
habanalabs: initialize device CPU queues after MMU init
habanalabs: de-couple MMU and VM module initialization
habanalabs: initialize MMU context for driver
habanalabs: add MMU mappings for Goya CPU
habanalabs: set Goya
, a practice that is not working on POWER architecture.
The patch sets the DMA mask to 48 bits once during the initialization. The
address of the CPU accessible memory area is configured to the MMU and the
matching VA is given to the device CPU.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya
(the remainder of address/page size).
Because the physical address is being handled by the driver, a WARN is
suitable here as it implies a bug in the driver code itself and not a user
bug.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/mmu.c | 4
1 file changed, 4 insertions(+)
diff --git
. And upon such failure, the driver must fall-back to set the mask
to 32 bits.
3. There is no standard way to differentiate in runtime between POWER9 and
other architectures.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 6 +-
drivers/misc/habanalabs
This patch configures the Goya CPU to actually go through the MMU for
translation. The configuration is done after the configuration of the
relevant MMU mappings.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 23 ---
1 file changed, 20 insertions(+), 3
This patch changes the order of H/W IP initializations. The MMU needs to
be initialized before the device CPU queues, because the CPU will go
through the ASIC MMU in order to reach the host memory (where the queues
are located).
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/asid.c
and the device CPU is also being mapped.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/debugfs.c| 7 +-
drivers/misc/habanalabs/goya/goya.c | 126 +--
drivers/misc/habanalabs/goya/goyaP.h | 12 ++-
drivers/misc/habanalabs/habanalabs.h | 6 +-
4 files changed, 137
because it depends on the size of the DRAM, which is
retrieved from the device CPU. Communication with the device CPU will
require the MMU mappings to be configured and hence the de-coupling.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/device.c | 23 ---
drivers/misc
This patch initializes the MMU structures for the kernel context. This is
needed before we can configure mappings for the kernel context.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/context.c | 7 +++
drivers/misc/habanalabs/mmu.c | 10 ++
2 files changed, 13
On Tue, Jun 11, 2019 at 10:59 AM Greg KH wrote:
>
> On Tue, Jun 11, 2019 at 08:50:45AM +0300, Oded Gabbay wrote:
> > --- a/drivers/misc/habanalabs/habanalabs_drv.c
> > +++ b/drivers/misc/habanalabs/habanalabs_drv.c
> > @@ -28,6 +28,7 @@ static DEFINE_MUTEX(hl_devs_idr_lo
On Tue, Jun 11, 2019 at 11:08 AM Oded Gabbay wrote:
>
> On Tue, Jun 11, 2019 at 10:59 AM Greg KH wrote:
> >
> > On Tue, Jun 11, 2019 at 08:50:45AM +0300, Oded Gabbay wrote:
> > > --- a/drivers/misc/habanalabs/habanalabs_drv.c
> > > +++ b/drivers/misc/habana
.
The activation of this special configuration is done in case the PCI
parent device of Goya is a PHB4 PCI device of IBM.
Signed-off-by: Oded Gabbay
---
Changes in v2:
- Remove kernel module parameter and instead read the PCI device ID of the
parent PCI bus. If it is PHB4, do the special configuration
"kernel ctx is still alive on initialization
> failure\n");
> -free_ctx:
> - kfree(hdev->kernel_ctx);
> mmu_fini:
> hl_mmu_fini(hdev);
> eq_fini:
> --
> 2.17.1
>
This patch is:
Reviewed-by: Oded Gabbay
Applied to -fixed
Oded
, the code ignored the
first requirement for the first DMA chunk.
This patch fix that issue by making sure the requirement of address
alignment is validated against all DMA chunks.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/memory.c | 6 --
1 file changed, 6 deletions(-)
diff --git
VRHOT event from the F/W indicates the device has reached a temperature of
100 Celsius degrees. In this case, the driver should only print this
information to the kernel log. The device will shutdown itself
automatically when reaching 125 degrees.
Signed-off-by: Oded Gabbay
---
drivers/misc
-by: Oded Gabbay
---
.../ABI/testing/sysfs-driver-habanalabs | 5 +-
drivers/misc/habanalabs/goya/goya_hwmgr.c | 98 +++
drivers/misc/habanalabs/sysfs.c | 98 ---
3 files changed, 101 insertions(+), 100 deletions(-)
diff --git a/Documentation/ABI
Arnd Bergmann (1):
habanalabs: use %pad for printing a dma_addr_t
Oded Gabbay (1):
habanalabs: don't reset device when getting VRHOT
drivers/misc/habanalabs/goya/goya.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
_reg_map.h
> @@ -29,4 +29,6 @@
> #define mmUBOOT_OFFSET mmPSOC_GLOBAL_CONF_SCRATCHPAD_30
> #define mmBTL_ID mmPSOC_GLOBAL_CONF_SCRATCHPAD_31
>
> +#define mmHW_STATE mmPSOC_GLOBAL_CONF_APP_STATUS
> +
> #endif /* GOYA_REG_MAP_H_ */
> --
> 2.17.1
>
The two patches are:
Reviewed-by: Oded Gabbay
Applied to -next.
Thanks,
Oded
gt;asid);
> + atomic64_sub(phys_pg_list->total_size,
> + >dram_used_mem);
> free_phys_pg_pack(hdev, phys_pg_list);
> idr_remove(>phys_pg_pack_handles, i);
> }
> --
> 2.17.1
>
This patch is:
Reviewed-by: Oded Gabbay
Applied to -fixed.
Thanks.
Oded
nt_types[i]);
> + WREG32(base_reg + SPMU_EVENT_TYPES_OFFSET + i * 4,
> + input->event_types[i]);
>
> WREG32(base_reg + 0xE04, 0x41013041);
> WREG32(base_reg + 0xC00, 0x803F);
> @@ -567,6 +615,12 @@ static int goya_config_spmu(struct hl_device *hdev,
> return -EINVAL;
> }
>
> + if (events_num > SPMU_MAX_EVENTS) {
> + dev_err(hdev->dev,
> + "too many events values for SPMU disable\n");
> + return -EINVAL;
> + }
> +
> WREG32(base_reg + 0xE04, 0x41013040);
>
> for (i = 0 ; i < events_num ; i++)
> --
> 2.17.1
>
Both patches are:
Reviewed-by: Oded Gabbay
struct hl_fpriv *hpriv;
> struct hl_device *hdev;
> - struct hl_ctx *ctx;
>
> hpriv = container_of(ref, struct hl_fpriv, refcount);
>
> hdev = hpriv->hdev;
> - ctx = hpriv->ctx;
>
> put_pid(hpriv->taskpid);
>
> --
> 2.7.4
>
>
This patch is:
Reviewed-by: Oded Gabbay
Applied to -next.
Thanks,
Oded
as percentage the total utilization rate.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/command_submission.c | 20 +++-
drivers/misc/habanalabs/device.c | 114 ++-
drivers/misc/habanalabs/habanalabs.h | 23 +++-
drivers/misc/habanalabs/habanalabs_ioctl.c
Add a new opcode to INFO IOCTL to retrieve aggregate H/W events. i.e. the
events counters are NOT cleared upon device reset, but count from the
loading of the driver.
Add the code to support it in the device event handling function.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya
is displayed as
the sensors group name.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c| 4
drivers/misc/habanalabs/goya/goyaP.h | 2 ++
drivers/misc/habanalabs/hwmon.c| 4 +++-
drivers/misc/habanalabs/include/armcp_if.h | 17
We want to stop using the acronym KMD. Therefore, replace all locations
(except for register names we can't modify) where KMD is written to other
terms such as "Linux kernel driver" or "Host kernel driver", etc.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/asid.
If the initialization of a device failed, the driver prints an error
message with the id of the device. The device index on the file system is
that id divided by 2.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
In case the F/W fails to initialize the thermal sensors, print an
appropriate error message to kernel log and fail the device
initialization.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 5 +
drivers/misc/habanalabs/include/hl_boot_if.h | 2 ++
2 files
ing. The user will wait
> - * inside the kernel until the CS has finished or until the user-requeusted
> + * inside the kernel until the CS has finished or until the user-requested
> * timeout has expired.
> *
> * The return value of the IOCTL is a standard Linux error code. The possible
> --
> 2.17.1
>
This patch is:
Reviewed-by: Oded Gabbay
* @type: queue type.
> * @driver_only: true if only the driver is allowed to send a job to this
> queue,
> * false otherwise.
> + * @requires_kernel_cb: true if a CB handle must be provided for jobs on this
> + * queue, false otherwise (a CB add
Reduce latency to memory during TPC kernel execution.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 3 +++
drivers/misc/habanalabs/habanalabs.h | 7 ---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/habanalabs/goya/goya.c
b/drivers/misc
Hi Greg,
a while ago we had an argument about identifying in my driver's code
whether I'm running on x86 or powerpc. I tried to do something
dynamically (based on parent pci bridge ID), and you and other people
objected to it.
I see in other drivers (more then a few) that they are using #ifdef
bs.h
> @@ -451,7 +451,7 @@ struct hl_debug_params_spmu {
> #define HL_DEBUG_OP_BMON 4
> /* Opcode for SPMU component */
> #define HL_DEBUG_OP_SPMU 5
> -/* Opcode for timestamp */
> +/* Opcode for timestamp (deprecated) */
> #define HL_DEBUG_OP_TIMESTAMP 6
> /* Opcode for setting the device into or out of debug mode. The enable
> * variable should be 1 for enabling debug mode and 0 for disabling it
> --
> 2.17.1
>
This patch is:
Reviewed-by: Oded Gabbay
Applied to -next
Oded
() so it would work in architectures that have separate
address ranges for IO memory.
This patch makes the code that writes the PQE to be ASIC-specific so we
can handle this properly per ASIC.
Signed-off-by: Oded Gabbay
Tested-by: Ben Segal
---
drivers/misc/habanalabs/goya/goya.c | 7
the endianness of a couple of kernel log
debug messages that print values of packets
Signed-off-by: Ben Segal
Reviewed-by: Oded Gabbay
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/goya/goya.c | 33 +
1 file changed, 24 insertions(+), 9 deletions(-)
diff --git
Now that we don't print the queue testing messages, we need to print when
the reset is finished so whoever looks at the kernel log will know the
reset process was finished successfully and the driver is not stuck.
Signed-off-by: Oded Gabbay
---
drivers/misc/habanalabs/device.c | 2 ++
1 file
901 - 1000 of 1658 matches
Mail list logo