[Sound-open-firmware] [PATCH_V2 3/7] cnl-interrupt: refine interrupt setting for change in irq_desc
Marcin Maka
marcin.maka at linux.intel.com
Tue May 8 11:14:34 CEST 2018
On 5/8/2018 11:08 AM, rander.wang wrote:
>
> On 5/8/2018 5:05 PM, Marcin Maka wrote:
>> On 5/8/2018 9:38 AM, Liam Girdwood wrote:
>>> On Tue, 2018-05-08 at 14:23 +0800, Rander Wang wrote:
>>>> diff --git a/src/platform/cannonlake/include/platform/platform.h
>>>> b/src/platform/cannonlake/include/platform/platform.h
>>>> index dc9a963..d157daa 100644
>>>> --- a/src/platform/cannonlake/include/platform/platform.h
>>>> +++ b/src/platform/cannonlake/include/platform/platform.h
>>>> @@ -43,6 +43,8 @@ struct sof;
>>>> #define PLATFORM_SSP_COUNT 3
>>>> #define MAX_GPDMA_COUNT 2
>>>> +#define MAX_CORE_COUNT 4
>>>> +
>>>> /* Host page size */
>>>> #define HOST_PAGE_SIZE 4096
>>>> #define PLATFORM_PAGE_TABLE_SIZE 256
>>>> @@ -126,6 +128,14 @@ struct sof;
>>>> extern struct timer *platform_timer;
>>>> +static inline int platform_get_core_id(void)
>>>> +{
>>>> + int prid;
>>>> +
>>>> + __asm__("rsr.prid %0" : "=a"(prid));
>>>> + return prid;
>>>> +}
>>>> +
>>>
>> There is a HAL function xthal_get_prid() as well as XTHAL_GET_PRID()
>> macro already provided by the HAL.
>>
> Hi Maka, you can search my first version of this patch,
> xthal_get_prid is used. i change this for Liam
>
> advised me not to call this function in generic code
>
Sure, there should be a generic int cpu_get_id(void) visible to the
generic code, either #define'd or implemented as a call to
xthal_get_prid() in xtensa arch specific implementation.
I'm just not sure what is the point of having another asm
implementation, not use the one already provided by the HAL lib.
>>>
>>> Best to put this in src/arch/xtensa/include/arch/cpu.h
>>>
>>> and rename to cpu_get_id()
>>
>>>
>>> Liam
>>>
> _______________________________________________
> Sound-open-firmware mailing list
> Sound-open-firmware at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
More information about the Sound-open-firmware
mailing list