From f5ad907e31345807c5c2bd0fbb12a120e82e3042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lefaure?= Date: Mon, 4 Sep 2017 15:14:12 -0400 Subject: [PATCH 1/3] c6x: remove unused KTHREAD_SIZE definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit KTHREAD_SIZE has never been used since it has been defined for c6x arch. Let's remove this useless definition. Signed-off-by: Jérémy Lefaure Signed-off-by: Mark Salter --- arch/c6x/kernel/asm-offsets.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/c6x/kernel/asm-offsets.c b/arch/c6x/kernel/asm-offsets.c index cff57764fcad..0f8fde494875 100644 --- a/arch/c6x/kernel/asm-offsets.c +++ b/arch/c6x/kernel/asm-offsets.c @@ -107,7 +107,6 @@ void foo(void) /* These would be unneccessary if we ran asm files * through the preprocessor. */ - DEFINE(KTHREAD_SIZE, THREAD_SIZE); DEFINE(KTHREAD_SHIFT, THREAD_SHIFT); DEFINE(KTHREAD_START_SP, THREAD_START_SP); DEFINE(ENOSYS_, ENOSYS); From 319938bd6f07e59ba55dff0abb3b51f5230a8f24 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Fri, 19 Jan 2018 11:19:33 -0800 Subject: [PATCH 2/3] c6x: fix platforms/plldata.c get_coreid build error Fix build error reported by the 0day bot by including the header file for that macro. Fixes this build error: (should fix; not tested) arch/c6x/platforms/plldata.c: In function 'c6472_setup_clocks': arch/c6x/platforms/plldata.c:279:33: error: implicit declaration of function 'get_coreid'; did you mean 'get_order'? [-Werror=implicit-function-declaration] c6x_core_clk.parent = &sysclks[get_coreid() + 1]; Reported-by: Fengguang Wu Cc: Mark Salter Cc: Aurelien Jacquiot Cc: linux-c6x-dev@linux-c6x.org Cc: Ingo Molnar Signed-off-by: Randy Dunlap Signed-off-by: Mark Salter --- arch/c6x/platforms/plldata.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/c6x/platforms/plldata.c b/arch/c6x/platforms/plldata.c index e8b6cc6a7b5a..1ef04b5ab93f 100644 --- a/arch/c6x/platforms/plldata.c +++ b/arch/c6x/platforms/plldata.c @@ -19,6 +19,7 @@ #include #include +#include #include /* From 85fa2cc51104ee5b529ce85b12f4c8421888544f Mon Sep 17 00:00:00 2001 From: Luc Van Oostenryck Date: Tue, 31 Oct 2017 18:22:02 +0100 Subject: [PATCH 3/3] c6x: pass endianness info to sparse c6x depends on the macro '_BIG_ENDIAN' being defined or not to correctly select or define endian-specific macros, structures or pieces of code. This macro is predefined by the compiler but sparse knows nothing about it and thus may pre-process files differently from what gcc would. Fix this by passing '-D_BIG_ENDIAN' when compiling a big-endian kernel, like GCC would have done. To: Mark Salter To: Aurelien Jacquiot CC: linux-c6x-dev@linux-c6x.org Signed-off-by: Luc Van Oostenryck Signed-off-by: Mark Salter --- arch/c6x/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/c6x/Makefile b/arch/c6x/Makefile index 6f6096ff05a4..6ab942e6c534 100644 --- a/arch/c6x/Makefile +++ b/arch/c6x/Makefile @@ -25,6 +25,7 @@ KBUILD_AFLAGS += -mbig-endian LINKFLAGS += -mbig-endian KBUILD_LDFLAGS += -mbig-endian LDFLAGS += -EB +CHECKFLAGS += -D_BIG_ENDIAN endif head-y := arch/c6x/kernel/head.o