| e210227f | 26-Feb-2025 |
Janne Grunau <[email protected]> |
soc: apple: rtkit: Cut syslog messages after the first '\0'
Certain messages from DCP contain NUL bytes in the random data after the NUL terminated syslog message. Since the syslog message ends with
soc: apple: rtkit: Cut syslog messages after the first '\0'
Certain messages from DCP contain NUL bytes in the random data after the NUL terminated syslog message. Since the syslog message ends with '\n' this results in a dev_info() message terminated with two newlines and an empty printed line in the kernel log.
Signed-off-by: Janne Grunau <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sven Peter <[email protected]>
show more ...
|
| 22af2fac | 26-Feb-2025 |
Janne Grunau <[email protected]> |
soc: apple: rtkit: Use high prio work queue
rtkit messages as communication with the DCP firmware for framebuffer swaps or input events are time critical so use WQ_HIGHPRI to prevent user space CPU
soc: apple: rtkit: Use high prio work queue
rtkit messages as communication with the DCP firmware for framebuffer swaps or input events are time critical so use WQ_HIGHPRI to prevent user space CPU load to increase latency. With kwin_wayland 6's explicit sync mode user space load was able to delay the IOMFB rtkit communication enough to miss vsync for surface swaps. Minimal test scenario is constantly resizing a glxgears Xwayland window.
Signed-off-by: Janne Grunau <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sven Peter <[email protected]>
show more ...
|
| a0639868 | 26-Feb-2025 |
Hector Martin <[email protected]> |
soc: apple: rtkit: Implement OSLog buffers properly
Apparently nobody can figure out where the old logic came from, but it seems like it has never been actually used on any supported firmware to thi
soc: apple: rtkit: Implement OSLog buffers properly
Apparently nobody can figure out where the old logic came from, but it seems like it has never been actually used on any supported firmware to this day. OSLog buffers were apparently never requested.
But starting with 13.3, we actually need this implemented properly for MTP (and later AOP) to work, so let's actually do that.
Signed-off-by: Hector Martin <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sven Peter <[email protected]>
show more ...
|
| 00834971 | 12-Feb-2025 |
Harshit Mogalapalli <[email protected]> |
soc: apple: rtkit: Fix use-after-free in apple_rtkit_crashlog_rx()
This code calls kfree(bfr); and then passes "bfr" to rtk->ops->crashed() which is a use after free. The ->crashed function pointer
soc: apple: rtkit: Fix use-after-free in apple_rtkit_crashlog_rx()
This code calls kfree(bfr); and then passes "bfr" to rtk->ops->crashed() which is a use after free. The ->crashed function pointer is implemented by apple_nvme_rtkit_crashed() and it doesn't use the "bfr" pointer so this doesn't cause a problem. But it still looks sketchy as can be.
Fix this by moving kfree() after the last usage of bfr.
Fixes: bf8b4e49777d ("soc: apple: rtkit: Pass the crashlog to the crashed() callback") Signed-off-by: Harshit Mogalapalli <[email protected]> Reviewed-by: Eric Curtin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sven Peter <[email protected]>
show more ...
|
| bf8b4e49 | 02-Feb-2025 |
Asahi Lina <[email protected]> |
soc: apple: rtkit: Pass the crashlog to the crashed() callback
Client drivers might want a copy of the crashlog to stash into a devcoredump blob. Since device memory management can be very variable,
soc: apple: rtkit: Pass the crashlog to the crashed() callback
Client drivers might want a copy of the crashlog to stash into a devcoredump blob. Since device memory management can be very variable, the actual devcoredump implementation is left to client drivers. Pass the raw crashlog buffer to the client callback so it can use it if desired.
Signed-off-by: Asahi Lina <[email protected]> Reviewed-by: Jens Axboe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sven Peter <[email protected]>
show more ...
|
| 4dae8c04 | 30-Oct-2023 |
Rob Herring <[email protected]> |
soc: apple: mailbox: Add explicit include of platform_device.h
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus.
soc: apple: mailbox: Add explicit include of platform_device.h
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other and pull in various other headers. In preparation to fix this, adjust the includes for what is actually needed.
platform_device.h is implicitly included by of_platform.h, but that's going to be removed.
Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Neal Gompa <[email protected]> Signed-off-by: Hector Martin <[email protected]>
show more ...
|
| c84292d9 | 28-Mar-2023 |
Hector Martin <[email protected]> |
soc: apple: mailbox: Rename config symbol to APPLE_MAILBOX
With the original owner of APPLE_MAILBOX removed, let's rename the new APPLE_MBOX to the old name. This avoids .config churn for downstream
soc: apple: mailbox: Rename config symbol to APPLE_MAILBOX
With the original owner of APPLE_MAILBOX removed, let's rename the new APPLE_MBOX to the old name. This avoids .config churn for downstream users, and leaves us with an identical config symbol and module name as before.
Acked-by: Eric Curtin <[email protected]> Acked-by: Neal Gompa <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Signed-off-by: Hector Martin <[email protected]>
show more ...
|
| bb538eff | 14-Mar-2023 |
Hector Martin <[email protected]> |
soc: apple: rtkit: Port to the internal mailbox driver
Now that we have a mailbox driver in drivers/soc/apple, port the RTKit code to it. This mostly just entails replacing calls through the mailbox
soc: apple: rtkit: Port to the internal mailbox driver
Now that we have a mailbox driver in drivers/soc/apple, port the RTKit code to it. This mostly just entails replacing calls through the mailbox subsystem with direct calls into the driver.
Acked-by: Eric Curtin <[email protected]> Acked-by: Neal Gompa <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Signed-off-by: Hector Martin <[email protected]>
show more ...
|
| 6e1457fc | 14-Mar-2023 |
Hector Martin <[email protected]> |
soc: apple: mailbox: Add ASC/M3 mailbox driver
This new driver is based on the existing apple-mailbox driver, but replaces the usage of the mailbox subsystem with directly exported symbols.
As part
soc: apple: mailbox: Add ASC/M3 mailbox driver
This new driver is based on the existing apple-mailbox driver, but replaces the usage of the mailbox subsystem with directly exported symbols.
As part of this refactor, this adds support for using the hardware FIFOs (not supported in mailbox) and implicitly fixes a bunch of bugs caused by bad interactions with the mailbox subsystem. It also adds runtime-PM support.
The new config symbol is APPLE_MBOX, while the module name remains identical ("apple-mailbox"). The configs are mutually exclusive in Kconfig, to avoid conflicts.
Acked-by: Eric Curtin <[email protected]> Acked-by: Neal Gompa <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Signed-off-by: Hector Martin <[email protected]>
show more ...
|
| bdfe6de2 | 24-Feb-2023 |
Martin Povišer <[email protected]> |
soc: apple: rtkit: Crop syslog messages
Crop trailing whitespace, null, and newline characters in syslog messages received from coprocessors. Notably DCP sends its messages including a trailing newl
soc: apple: rtkit: Crop syslog messages
Crop trailing whitespace, null, and newline characters in syslog messages received from coprocessors. Notably DCP sends its messages including a trailing newline, so prior to this change we would end up cluttering the kernel log by repeated newlines at the end of messages.
Signed-off-by: Martin Povišer <[email protected]> Reviewed-by: Hector Martin <[email protected]> Signed-off-by: Hector Martin <[email protected]>
show more ...
|
| 22991d8d | 23-Jan-2023 |
Asahi Lina <[email protected]> |
soc: apple: rtkit: Add register dump decoding to crashlog
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 th
soc: apple: rtkit: Add register dump decoding to crashlog
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 <[email protected]> Reviewed-by: Eric Curtin <[email protected]> Signed-off-by: Asahi Lina <[email protected]> Signed-off-by: Hector Martin <[email protected]>
show more ...
|
| b3892860 | 21-Jan-2023 |
Asahi Lina <[email protected]> |
soc: apple: rtkit: Export non-devm init/free functions
While we normally encourage devm usage by drivers, some consumers (and in particular the upcoming Rust abstractions) might want to manually man
soc: apple: rtkit: Export non-devm init/free functions
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 <[email protected]> Reviewed-by: Sven Peter <[email protected]> Reviewed-by: Eric Curtin <[email protected]> Signed-off-by: Hector Martin <[email protected]>
show more ...
|
| c289d5bc | 23-Jan-2023 |
Hector Martin <[email protected]> |
soc: apple: apple-pmgr-pwrstate: Switch to IRQ-safe mode
This requires changing the reset path locking primitives to the spinlock path in genpd, instead of the mutex path.
Reviewed-by: Eric Curtin
soc: apple: apple-pmgr-pwrstate: Switch to IRQ-safe mode
This requires changing the reset path locking primitives to the spinlock path in genpd, instead of the mutex path.
Reviewed-by: Eric Curtin <[email protected]> Reviewed-by: Sven Peter <[email protected]> Signed-off-by: Hector Martin <[email protected]>
show more ...
|