<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/soc/apple, branch linux-6.3.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>soc: apple: rtkit: Do not copy the reg state structure to the stack</title>
<updated>2023-02-13T19:20:34+00:00</updated>
<author>
<name>Asahi Lina</name>
<email>lina@asahilina.net</email>
</author>
<published>2023-02-11T09:13:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4ec98e6db9f24a9f4716685c62c9f6c348fec45b'/>
<id>4ec98e6db9f24a9f4716685c62c9f6c348fec45b</id>
<content type='text'>
The register state struct is 848 bytes, which ends up bloating the
apple_rtkit_crashlog_dump_regs stack frame beyond 1024 on some
32-bit platforms, triggering compile warnings.

This doesn't matter for 64BIT/ARM64, but there's also no good reason to
copy the structure to the stack in this case. We can use __packed to
avoid alignment issues, there are no double-read hazards, and this is a
fatal error path so performance does not matter.

Fixes: 22991d8d5725 ("soc: apple: rtkit: Add register dump decoding to crashlog")
Signed-off-by: Asahi Lina &lt;lina@asahilina.net&gt;
Reviewed-by: Eric Curtin &lt;ecurtin@redhat.com&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The register state struct is 848 bytes, which ends up bloating the
apple_rtkit_crashlog_dump_regs stack frame beyond 1024 on some
32-bit platforms, triggering compile warnings.

This doesn't matter for 64BIT/ARM64, but there's also no good reason to
copy the structure to the stack in this case. We can use __packed to
avoid alignment issues, there are no double-read hazards, and this is a
fatal error path so performance does not matter.

Fixes: 22991d8d5725 ("soc: apple: rtkit: Add register dump decoding to crashlog")
Signed-off-by: Asahi Lina &lt;lina@asahilina.net&gt;
Reviewed-by: Eric Curtin &lt;ecurtin@redhat.com&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc: apple: rtkit: Add register dump decoding to crashlog</title>
<updated>2023-01-31T11:44:47+00:00</updated>
<author>
<name>Asahi Lina</name>
<email>lina@asahilina.net</email>
</author>
<published>2023-01-23T03:17:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=22991d8d57251509b8ee5c0b3dac04506fe5ed7a'/>
<id>22991d8d57251509b8ee5c0b3dac04506fe5ed7a</id>
<content type='text'>
When the coprocessor crashes, it's useful to get a proper register dump
so we can find out what the firmware was doing. Add a decoder for this.

Originally this had ESR decoding by reusing the ARM64 arch header for
this, but that introduces some module linking and cross-arch compilation
issues, so let's leave that out for now.

Reviewed-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Reviewed-by: Eric Curtin &lt;ecurtin@redhat.com&gt;
Signed-off-by: Asahi Lina &lt;lina@asahilina.net&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the coprocessor crashes, it's useful to get a proper register dump
so we can find out what the firmware was doing. Add a decoder for this.

Originally this had ESR decoding by reusing the ARM64 arch header for
this, but that introduces some module linking and cross-arch compilation
issues, so let's leave that out for now.

Reviewed-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Reviewed-by: Eric Curtin &lt;ecurtin@redhat.com&gt;
Signed-off-by: Asahi Lina &lt;lina@asahilina.net&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc: apple: rtkit: Export non-devm init/free functions</title>
<updated>2023-01-31T11:40:14+00:00</updated>
<author>
<name>Asahi Lina</name>
<email>lina@asahilina.net</email>
</author>
<published>2023-01-21T07:41:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b3892860f50920ea46342d32bf51323877365082'/>
<id>b3892860f50920ea46342d32bf51323877365082</id>
<content type='text'>
While we normally encourage devm usage by drivers, some consumers (and
in particular the upcoming Rust abstractions) might want to manually
manage memory. Export the raw functions to make this possible.

Signed-off-by: Asahi Lina &lt;lina@asahilina.net&gt;
Reviewed-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Reviewed-by: Eric Curtin &lt;ecurtin@redhat.com&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While we normally encourage devm usage by drivers, some consumers (and
in particular the upcoming Rust abstractions) might want to manually
manage memory. Export the raw functions to make this possible.

Signed-off-by: Asahi Lina &lt;lina@asahilina.net&gt;
Reviewed-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Reviewed-by: Eric Curtin &lt;ecurtin@redhat.com&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc: apple: apple-pmgr-pwrstate: Switch to IRQ-safe mode</title>
<updated>2023-01-31T11:37:07+00:00</updated>
<author>
<name>Hector Martin</name>
<email>marcan@marcan.st</email>
</author>
<published>2023-01-23T06:51:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c289d5bce8521352a596f3ad27cd6d70b9f9f821'/>
<id>c289d5bce8521352a596f3ad27cd6d70b9f9f821</id>
<content type='text'>
This requires changing the reset path locking primitives to the spinlock
path in genpd, instead of the mutex path.

Reviewed-by: Eric Curtin &lt;ecurtin@redhat.com&gt;
Reviewed-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This requires changing the reset path locking primitives to the spinlock
path in genpd, instead of the mutex path.

Reviewed-by: Eric Curtin &lt;ecurtin@redhat.com&gt;
Reviewed-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc: apple: rtkit: Add apple_rtkit_idle() function</title>
<updated>2023-01-31T11:35:47+00:00</updated>
<author>
<name>Hector Martin</name>
<email>marcan@marcan.st</email>
</author>
<published>2023-01-23T06:53:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=40eaa8c0cbba4a27668c7e01373ccd5b38381e2f'/>
<id>40eaa8c0cbba4a27668c7e01373ccd5b38381e2f</id>
<content type='text'>
This is yet another low power mode, used by DCP.

Reviewed-by: Eric Curtin &lt;ecurtin@redhat.com&gt;
Reviewed-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is yet another low power mode, used by DCP.

Reviewed-by: Eric Curtin &lt;ecurtin@redhat.com&gt;
Reviewed-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc: apple: rtkit: Stop casting function pointer signatures</title>
<updated>2022-11-28T11:34:09+00:00</updated>
<author>
<name>Sven Peter</name>
<email>sven@svenpeter.dev</email>
</author>
<published>2022-11-04T15:41:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5acf07ff25f0c1c44105e6b8ebf88c55a0a04d2f'/>
<id>5acf07ff25f0c1c44105e6b8ebf88c55a0a04d2f</id>
<content type='text'>
Fixes: 9bd1d9a0d8bb ("soc: apple: Add RTKit IPC library")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes: 9bd1d9a0d8bb ("soc: apple: Add RTKit IPC library")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc: apple: sart: Stop casting function pointer signatures</title>
<updated>2022-11-28T11:34:09+00:00</updated>
<author>
<name>Sven Peter</name>
<email>sven@svenpeter.dev</email>
</author>
<published>2022-11-04T15:39:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=422d0b860dc223b5dfc6d083697cae258bb5a4a1'/>
<id>422d0b860dc223b5dfc6d083697cae258bb5a4a1</id>
<content type='text'>
Fixes: b170143ae111 ("soc: apple: Add SART driver")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes: b170143ae111 ("soc: apple: Add SART driver")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc: apple: rtkit: Add apple_rtkit_poll</title>
<updated>2022-09-17T17:53:29+00:00</updated>
<author>
<name>Hector Martin</name>
<email>marcan@marcan.st</email>
</author>
<published>2022-09-14T08:34:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f5a5e83379b537f6252526bb4d285b771f6f0b89'/>
<id>f5a5e83379b537f6252526bb4d285b771f6f0b89</id>
<content type='text'>
This allows a client to receive messages in atomic context, by polling.

Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Reviewed-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Reviewed-by: Eric Curtin &lt;ecurtin@redhat.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows a client to receive messages in atomic context, by polling.

Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
Signed-off-by: Russell King (Oracle) &lt;rmk+kernel@armlinux.org.uk&gt;
Reviewed-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Reviewed-by: Eric Curtin &lt;ecurtin@redhat.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc: apple: Add SART driver</title>
<updated>2022-05-02T15:24:45+00:00</updated>
<author>
<name>Sven Peter</name>
<email>sven@svenpeter.dev</email>
</author>
<published>2022-05-01T14:55:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b170143ae1113882731666aec9b9105356f1fc17'/>
<id>b170143ae1113882731666aec9b9105356f1fc17</id>
<content type='text'>
The NVMe co-processor on the Apple M1 uses a DMA address filter called
SART for some DMA transactions. This adds a simple driver used to
configure the memory regions from which DMA transactions are allowed.

Unlike a real IOMMU, SART does not support any pagetables and can't be
implemented inside the IOMMU subsystem using iommu_ops.

It also can't be implemented using dma_map_ops since not all DMA
transactions of the NVMe controller are filtered by SART.
Instead, most buffers have to be registered using the integrated NVMe
IOMMU and we can't have two separate dma_map_ops implementations for a
single device.

Co-developed-by: Hector Martin &lt;marcan@marcan.st&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
Signed-off-by: Sven Peter &lt;sven@svenpeter.dev&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The NVMe co-processor on the Apple M1 uses a DMA address filter called
SART for some DMA transactions. This adds a simple driver used to
configure the memory regions from which DMA transactions are allowed.

Unlike a real IOMMU, SART does not support any pagetables and can't be
implemented inside the IOMMU subsystem using iommu_ops.

It also can't be implemented using dma_map_ops since not all DMA
transactions of the NVMe controller are filtered by SART.
Instead, most buffers have to be registered using the integrated NVMe
IOMMU and we can't have two separate dma_map_ops implementations for a
single device.

Co-developed-by: Hector Martin &lt;marcan@marcan.st&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Hector Martin &lt;marcan@marcan.st&gt;
Signed-off-by: Sven Peter &lt;sven@svenpeter.dev&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>soc: apple: Add RTKit IPC library</title>
<updated>2022-05-01T14:55:06+00:00</updated>
<author>
<name>Sven Peter</name>
<email>sven@svenpeter.dev</email>
</author>
<published>2022-05-01T14:55:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9bd1d9a0d8bb1a549831fd98fcc3105960f7068b'/>
<id>9bd1d9a0d8bb1a549831fd98fcc3105960f7068b</id>
<content type='text'>
Apple SoCs such as the M1 come with multiple embedded co-processors
running proprietary firmware. Communication with those is established
over a simple mailbox using the RTKit IPC protocol.

This cannot be implemented inside the mailbox subsystem since on top
of communication over channels we also need support for starting,
hibernating and resetting these co-processors. We also need to
handle shared memory allocations differently depending on the
co-processor and don't want to split that across multiple drivers.

Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Sven Peter &lt;sven@svenpeter.dev&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apple SoCs such as the M1 come with multiple embedded co-processors
running proprietary firmware. Communication with those is established
over a simple mailbox using the RTKit IPC protocol.

This cannot be implemented inside the mailbox subsystem since on top
of communication over channels we also need support for starting,
hibernating and resetting these co-processors. We also need to
handle shared memory allocations differently depending on the
co-processor and don't want to split that across multiple drivers.

Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Sven Peter &lt;sven@svenpeter.dev&gt;
</pre>
</div>
</content>
</entry>
</feed>
