<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/misc/habanalabs/common/context.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/context.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/misc/habanalabs/common/context.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-05-22T19:01:21Z</updated>
<entry>
<title>habanalabs: remove hdev from hl_ctx_get args</title>
<updated>2022-05-22T19:01:21Z</updated>
<author>
<name>Ohad Sharabi</name>
<email>osharabi@habana.ai</email>
</author>
<published>2022-05-11T10:28:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e31dd9362f01682192d80221cc4339e4f7140f30'/>
<id>urn:sha1:e31dd9362f01682192d80221cc4339e4f7140f30</id>
<content type='text'>
This argument is unused by the function.

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>habanalabs: keep control device alive during hard reset</title>
<updated>2021-12-26T06:59:09Z</updated>
<author>
<name>Dani Liberman</name>
<email>dliberman@habana.ai</email>
</author>
<published>2021-12-08T07:52:03Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=707c1252868d885c47b80613b60bdcb19e133397'/>
<id>urn:sha1:707c1252868d885c47b80613b60bdcb19e133397</id>
<content type='text'>
Need to allow user retrieve data during reset and afterwards without
the need to reopen the device.
Did it by seperating the user peocesses list into two lists:
1. fpriv_list which contains list of user processes that opened
   the device (currently only one).
2. fpriv_ctrl_list which contains list of user processes that opened
   the control device. This processes in this list shall not be
   killed during reset, only when the device is suddenly removed from
   PCI chain.

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: remove compute context pointer</title>
<updated>2021-12-26T06:59:08Z</updated>
<author>
<name>Oded Gabbay</name>
<email>ogabbay@kernel.org</email>
</author>
<published>2021-11-30T21:08:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5b90e59d55d94aa939fae941db4a0e613e6ecc1e'/>
<id>urn:sha1:5b90e59d55d94aa939fae941db4a0e613e6ecc1e</id>
<content type='text'>
It was an error to save the compute context's pointer in the device
structure, as it allowed its use without proper ref-cnt.

Change the variable to a flag that only indicates whether there is
an active compute context. Code that needs the pointer will now
be forced to use proper internal APIs to get the pointer.

Signed-off-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
</content>
</entry>
<entry>
<title>habanalabs: add helper to get compute context</title>
<updated>2021-12-26T06:59:08Z</updated>
<author>
<name>Oded Gabbay</name>
<email>ogabbay@kernel.org</email>
</author>
<published>2021-11-30T21:02:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4337b50b5fe5ee64c821790f601ee6153bb9f027'/>
<id>urn:sha1:4337b50b5fe5ee64c821790f601ee6153bb9f027</id>
<content type='text'>
There are multiple places where the code needs to get the context's
pointer and increment its ref cnt. This is the proper way instead
of using the compute context pointer in the device structure.

Signed-off-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
</content>
</entry>
<entry>
<title>habanalabs: fix etr asid configuration</title>
<updated>2021-12-26T06:59:08Z</updated>
<author>
<name>Oded Gabbay</name>
<email>ogabbay@kernel.org</email>
</author>
<published>2021-11-30T20:32:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6798676f7ef5916133e0c915be73b7a3b7e2a312'/>
<id>urn:sha1:6798676f7ef5916133e0c915be73b7a3b7e2a312</id>
<content type='text'>
Pass the user's context pointer into the etr configuration function
to extract its ASID.

Using the compute_ctx pointer is an error as it is just an indication
of whether a user has opened the compute device.

Signed-off-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
</content>
</entry>
<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: remove redundant check on ctx_fini</title>
<updated>2021-12-26T06:59:08Z</updated>
<author>
<name>Oded Gabbay</name>
<email>ogabbay@kernel.org</email>
</author>
<published>2021-11-30T15:04:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a4dd2ecf36c4458db14df3aae81ec3e3f4b4688e'/>
<id>urn:sha1:a4dd2ecf36c4458db14df3aae81ec3e3f4b4688e</id>
<content type='text'>
The driver supports only a single context. Therefore, no need to check
if the user context that is closed is the compute context. The user
context, if exists, is always the compute context.

Signed-off-by: Oded Gabbay &lt;ogabbay@kernel.org&gt;
</content>
</entry>
<entry>
<title>habanalabs: context cleanup cosmetics</title>
<updated>2021-10-18T09:05:48Z</updated>
<author>
<name>Omer Shpigelman</name>
<email>oshpigelman@habana.ai</email>
</author>
<published>2021-10-11T07:03:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=fae132632c55fdab81a81e0fd3d578d38ce43f78'/>
<id>urn:sha1:fae132632c55fdab81a81e0fd3d578d38ce43f78</id>
<content type='text'>
No need to check the return value if the following action is the same for
both cases. In addition, now that hl_ctx_free() doesn't print if the
context is not released, its name can be misleading as the context might
stay alive after it is executed with no indication for that.
Hence we can discard it and simply put the refcount.

Signed-off-by: Omer Shpigelman &lt;oshpigelman@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: remove redundant warning message</title>
<updated>2021-08-29T06:47:48Z</updated>
<author>
<name>Oded Gabbay</name>
<email>ogabbay@kernel.org</email>
</author>
<published>2021-07-14T08:01:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e62ada5e23d06dfeba2d3b098a9c70ac027c19b6'/>
<id>urn:sha1:e62ada5e23d06dfeba2d3b098a9c70ac027c19b6</id>
<content type='text'>
This warning is redundant as we will print a notice in case the device
is still in use after the FD was closed. No need to print the same
message per context.

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>
</feed>
