<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/misc/habanalabs/common/hw_queue.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/misc/habanalabs/common/hw_queue.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/misc/habanalabs/common/hw_queue.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2021-12-26T06:59:08Z</updated>
<entry>
<title>habanalabs: save ctx inside encaps signal</title>
<updated>2021-12-26T06:59:08Z</updated>
<author>
<name>Oded Gabbay</name>
<email>ogabbay@kernel.org</email>
</author>
<published>2021-11-30T13:28:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=357ff3dc9ae5dc1a0d990801b32431f5eecc7ee9'/>
<id>urn:sha1:357ff3dc9ae5dc1a0d990801b32431f5eecc7ee9</id>
<content type='text'>
Compute context pointer in hdev shouldn't be used for fetching the
context's pointer.

If an object needs the context's pointer, it should get it while
incrementing its kref, and when the object is released, put it.

Signed-off-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
</content>
</entry>
<entry>
<title>habanalabs: add SOB information to signal submission uAPI</title>
<updated>2021-12-26T06:59:07Z</updated>
<author>
<name>Dani Liberman</name>
<email>dliberman@habana.ai</email>
</author>
<published>2021-11-09T09:33:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1880f7acd7e0edacbd46385036253801ddc4273f'/>
<id>urn:sha1:1880f7acd7e0edacbd46385036253801ddc4273f</id>
<content type='text'>
For debug purpose, add SOB address and SOB initial counter value
before current submission to uAPI output.

Using SOB address and initial counter, user can calculate how much of
the submmision has been completed.

Signed-off-by: Dani Liberman &lt;dliberman@habana.ai&gt;
Reviewed-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
Signed-off-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
</content>
</entry>
<entry>
<title>habanalabs: fix wait offset handling</title>
<updated>2021-09-14T12:00:04Z</updated>
<author>
<name>farah kassabri</name>
<email>fkassabri@habana.ai</email>
</author>
<published>2021-09-12T11:30:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=42254c2a4991b98ca3f86040a1a7b7b32a0c8c4a'/>
<id>urn:sha1:42254c2a4991b98ca3f86040a1a7b7b32a0c8c4a</id>
<content type='text'>
Add handling for case where the user doesn't set wait offset,
and keeps it as 0. In such a case the driver will decrement one
from this zero value which will cause the code to wait for
wrong number of signals.

The solution is to treat this case as in legacy wait cs,
and wait for the next signal.

Signed-off-by: farah kassabri &lt;fkassabri@habana.ai&gt;
Reviewed-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
Signed-off-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
</content>
</entry>
<entry>
<title>habanalabs: modify multi-CS to wait on stream masters</title>
<updated>2021-09-01T15:38:24Z</updated>
<author>
<name>Ohad Sharabi</name>
<email>osharabi@habana.ai</email>
</author>
<published>2021-08-01T20:02:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=72d6625570c16b9c097d4b9f16c2016974f83366'/>
<id>urn:sha1:72d6625570c16b9c097d4b9f16c2016974f83366</id>
<content type='text'>
During the integration, the multi-CS requirements were refined:
- The multi CS call shall wait on "per-ASIC" predefined stream masters
  instead of set of streams.
- Stream masters are set of QIDs used by the upper SW layers (synapse)
  for completion (must be an external/HW queue).

Signed-off-by: Ohad Sharabi &lt;osharabi@habana.ai&gt;
Reviewed-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
Signed-off-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
</content>
</entry>
<entry>
<title>habanalabs: add support for encapsulated signals submission</title>
<updated>2021-08-29T06:47:48Z</updated>
<author>
<name>farah kassabri</name>
<email>fkassabri@habana.ai</email>
</author>
<published>2021-05-26T07:43:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e4cdccd2ec0d178219dce0707aa2a63746119e3f'/>
<id>urn:sha1:e4cdccd2ec0d178219dce0707aa2a63746119e3f</id>
<content type='text'>
This commit is the second part of the encapsulated signals feature.
It contains the driver support for submission of cs with encapsulated
signals and the wait for them.

Signed-off-by: farah kassabri &lt;fkassabri@habana.ai&gt;
Reviewed-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
Signed-off-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
</content>
</entry>
<entry>
<title>habanalabs: add support for encapsulated signals reservation</title>
<updated>2021-08-29T06:47:48Z</updated>
<author>
<name>farah kassabri</name>
<email>fkassabri@habana.ai</email>
</author>
<published>2021-05-24T15:09:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=dadf17abb7245d9556591d8cc78bf57462e3b20a'/>
<id>urn:sha1:dadf17abb7245d9556591d8cc78bf57462e3b20a</id>
<content type='text'>
The signaling from within encapsulated OP capability is merged into the
existing stream architecture, such that one can trigger multiple
signaling from an encapsulated op, according to the time the event
was done in the graph execution and avoid the need to wait for the
whole encapsulated OP execution to be complete before the stream can
signal.

This commit implements only the reserve/unreserve part.

Signed-off-by: farah kassabri &lt;fkassabri@habana.ai&gt;
Reviewed-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
Signed-off-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
</content>
</entry>
<entry>
<title>habanalabs: signal/wait change sync object reset flow</title>
<updated>2021-08-29T06:47:48Z</updated>
<author>
<name>farah kassabri</name>
<email>fkassabri@habana.ai</email>
</author>
<published>2021-06-20T08:08:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8ca2072ed8936076ae3ec7e508290a29be9024d8'/>
<id>urn:sha1:8ca2072ed8936076ae3ec7e508290a29be9024d8</id>
<content type='text'>
Currently the SOB reset was in fence release function which happens
only at the CS wraparound during the CS allocation time.

In order to support the new encapsulated signals reservation feature,
we need to move the SOB reset to an earlier phase because this SOB
could reach it's max value very fast using the signal reservation.

Signed-off-by: farah kassabri &lt;fkassabri@habana.ai&gt;
Reviewed-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
Signed-off-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
</content>
</entry>
<entry>
<title>habanalabs: add wait-for-multi-CS uAPI</title>
<updated>2021-08-29T06:47:48Z</updated>
<author>
<name>Ohad Sharabi</name>
<email>osharabi@habana.ai</email>
</author>
<published>2021-06-14T19:18:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=215f0c1775d5506c8a833b5c85a77b5fb65bf26b'/>
<id>urn:sha1:215f0c1775d5506c8a833b5c85a77b5fb65bf26b</id>
<content type='text'>
When user sends multiple CSs, waiting for each CS is not efficient
as it involves many user-kernel context switches.

In order to address this issue we add support to "wait on multiple CSs"
using a new uAPI which can wait on maximum of 32 CSs. The new uAPI is
defined using a new flag - WAIT_FOR_MULTI_CS - in the wait_for_cs IOCTL.

The input parameters for this uAPI will be:
@seq: user pointer to an array of up to 32 CS's sequence numbers.
@seq_array_len: length of sequence array.
@timeout_us: timeout for waiting for any CS.

The output paramateres for this API will be:
@status: multi CS ioctl completion status (dedicated status was added as
         well).
@flags: bitmap of output flags of the CS.
@cs_completion_map: bitmap for multi CS, if CS sequence that was placed
                    in index N in input seq array has completed- the N-th
		    bit in cs_completion_map will be 1, otherwise it will
		    be 0.
@timestamp_nsec: timestamp of the first completed CS

Signed-off-by: Ohad Sharabi &lt;osharabi@habana.ai&gt;
Reviewed-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
Signed-off-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
</content>
</entry>
<entry>
<title>habanalabs: fix race between soft reset and heartbeat</title>
<updated>2021-08-29T06:47:47Z</updated>
<author>
<name>Koby Elbaz</name>
<email>kelbaz@habana.ai</email>
</author>
<published>2021-07-06T17:50:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8bb8b505761238be0d6a83dc41188867d65e5d4c'/>
<id>urn:sha1:8bb8b505761238be0d6a83dc41188867d65e5d4c</id>
<content type='text'>
There is a scenario where an ongoing soft reset would race with an
ongoing heartbeat routine, eventually causing heartbeat to fail and
thus to escalate into a hard reset.

With this fix, soft-reset procedure will disable heartbeat CPU messages
and flush the (ongoing) current one before continuing with reset code.

Signed-off-by: Koby Elbaz &lt;kelbaz@habana.ai&gt;
Reviewed-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
Signed-off-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
</content>
</entry>
<entry>
<title>habanalabs: add validity check for signal cs</title>
<updated>2021-06-21T07:16:52Z</updated>
<author>
<name>farah kassabri</name>
<email>fkassabri@habana.ai</email>
</author>
<published>2021-06-01T13:44:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3817b352aad3b43f897c3034b16886cdb949b720'/>
<id>urn:sha1:3817b352aad3b43f897c3034b16886cdb949b720</id>
<content type='text'>
In preparation for a new feature that allows the user to reserve
signals ahead of submissions, we need to change a current assumption
in the code.

Currently, the driver uses 2 SOBs to support signal CS. When the first
SOB reaches max value, the driver switches to the other one and assumes
that when it will need to switch back to the first one, all of the
signals have already been handled.

This assumption won't hold when the new feature will be added, because
using signal reservation, the driver can reach the max SOB value very
fast.

The change is to add a validity check when submitting a signal CS, to
make sure the previous SOB is available (all the signals attached to
it indeed finished).

Signed-off-by: farah kassabri &lt;fkassabri@habana.ai&gt;
Reviewed-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
Signed-off-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
</content>
</entry>
</feed>
