[PATCH 1/2] tm27: Use generic cpu index accessor

Kinsey Moore kinsey.moore at oarcorp.com
Fri Dec 11 15:09:03 UTC 2020


-----Original Message-----
From: Sebastian Huber <sebastian.huber at embedded-brains.de> 
Sent: Thursday, December 10, 2020 23:48
To: Kinsey Moore <kinsey.moore at oarcorp.com>; devel at rtems.org
Subject: Re: [PATCH 1/2] tm27: Use generic cpu index accessor

> On 10/12/2020 21:42, Kinsey Moore wrote:
>> The arm_cp15 function for accessing the current CPU index is specific
>> to ARMv7 while this header is used for ARMv8 as well. Instead, use a
>> generic accessor that is part of the standard CPU API.
>
> I am fine with this fix, however, this is basically now the same 
> approach as in my v2 patch:
>
> https://lists.rtems.org/pipermail/devel/2020-December/063693.html
>
> Since the tm27 test is configured to use only one CPU, the current 
> processor is always 0.

Unfortunately, that's the only API currently available to get that information easily on both architectures. The base function that is wrapped (_CPU_SMP_Get_current_processor) could be provided outside the RTEMS_SMP ifdef block and that could be used instead since this is specific to ARM/AArch64. Would that be acceptable?

Kinsey


More information about the devel mailing list