Re: [PATCH v3 5/6] soc: apple: Add RTKit IPC library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, Apr 26, 2022, at 23:01, Arnd Bergmann wrote:
> On Tue, Apr 26, 2022 at 10:15 PM Sven Peter <sven@xxxxxxxxxxxxx> wrote:
>>
>> 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 implement 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.
>>
>> Signed-off-by: Sven Peter <sven@xxxxxxxxxxxxx>
>
> Reviewed-by: Arnd Bergmann <arnd@xxxxxxxx>
>

thanks!

>> +bool apple_rtkit_is_running(struct apple_rtkit *rtk)
>> +{
>> +       if (rtk->crashed)
>> +               return false;
>> +       if ((rtk->iop_power_state & 0xff) != APPLE_RTKIT_PWR_STATE_ON)
>> +               return false;
>> +       if ((rtk->ap_power_state & 0xff) != APPLE_RTKIT_PWR_STATE_ON)
>> +               return false;
>> +       return true;
>> +}
>> +EXPORT_SYMBOL_GPL(apple_rtkit_is_running);
>> +
>> +bool apple_rtkit_is_crashed(struct apple_rtkit *rtk)
>> +{
>> +       return rtk->crashed;
>> +}
>> +EXPORT_SYMBOL_GPL(apple_rtkit_is_crashed);
>
> I noticed that you use EXPORT_SYMBOL_GPL() here, but a more permissive
> EXPORT_SYMBOL() in the SART driver. Is that intentional?

No idea why I used both but it wasn't intentional. I'll change all exports
to EXPORT_SYMBOL_GPL.

>
>> +
>> +#if IS_ENABLED(CONFIG_APPLE_RTKIT)
>> +
>
> Same comment about the #if as for the SART driver: I'd prefer it without the
> conditional compilation.

Ok, will remove those #ifs as well.


Sven



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux