8 May
2018
8 May
'18
9:38 a.m.
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;
+}
Best to put this in src/arch/xtensa/include/arch/cpu.h
and rename to cpu_get_id()
Liam