lkml.org 
[lkml]   [2023]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] soc: apple: rtkit: Add register dump decoding to crashlog
From
On 23/01/2023 21.18, Eric Curtin wrote:
> On Mon, 23 Jan 2023 at 03:19, Asahi Lina <lina@asahilina.net> wrote:
>>
>> 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 <sven@svenpeter.dev>
>> Reviewed-by: Eric Curtin <ecurtin@redhat.com>
>> Signed-off-by: Asahi Lina <lina@asahilina.net>
>> ---
>
> I would be thinking, rather that duplicating the PSR_MODE_* defines
> and values, why not just ifdef the whole
> "apple_rtkit_crashlog_dump_regs(" function and the "case
> APPLE_RTKIT_CRASHLOG_REGS" part (and maybe even
> apple_rtkit_crashlog_regs struct also). Is it worth compiling that
> code on other CPU architectures when PSR seems to be an ARM specific
> thing?

It's mostly just for compile testing! The code is about the architecture
of the coprocessor, not the host CPU, so it still makes sense in
principle (though of course it's not very likely that SoCs with a
combination like that will ever exist). It helped the kernel test robot
find a bad format specifier in this code during a compile test run for a
32-bit arch, so I think it makes sense to keep it.

~~ Lina

\
 
 \ /
  Last update: 2023-03-26 23:53    [W:0.818 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site