[U-Boot] [PATCH v2] linkage.h: move from blackfin to common includes

Macpaul Lin macpaul at andestech.com
Thu Dec 1 05:32:10 CET 2011


1. Add linkage.h support from blackfin to common include,
   which is a reduced version from Linux.
2. Add architecture part support of linkage.h into blackfin
3. Fix include path of in blackfin related to linkage.h
   due to header file movement.

Signed-off-by: Macpaul Lin <macpaul at andestech.com>
---
Changes for v2:
  - add default value of align is 4.
  - remove architecture related define of align.
  - remain this empty file for the compilation necessary.
  - squash 3 patches into one to avoid bisect problem.

 arch/blackfin/cpu/cache.S                          |    2 +-
 arch/blackfin/include/asm/blackfin_local.h         |    2 +-
 arch/blackfin/include/asm/cache.h                  |    2 +-
 arch/blackfin/include/asm/linkage.h                |   50 +-------------------
 arch/blackfin/lib/__kgdb.S                         |    2 +-
 arch/blackfin/lib/outs.S                           |    2 +-
 .../include/asm => include/linux}/linkage.h        |    1 +
 7 files changed, 8 insertions(+), 53 deletions(-)
 copy {arch/blackfin/include/asm => include/linux}/linkage.h (98%)

diff --git a/arch/blackfin/cpu/cache.S b/arch/blackfin/cpu/cache.S
index 6ed655a..1e468ee 100644
--- a/arch/blackfin/cpu/cache.S
+++ b/arch/blackfin/cpu/cache.S
@@ -8,9 +8,9 @@
  * Licensed under the GPL-2 or later.
  */
 
-#include <asm/linkage.h>
 #include <config.h>
 #include <asm/blackfin.h>
+#include <linux/linkage.h>
 
 .text
 /* Since all L1 caches work the same way, we use the same method for flushing
diff --git a/arch/blackfin/include/asm/blackfin_local.h b/arch/blackfin/include/asm/blackfin_local.h
index 71207b6..9d27f31 100644
--- a/arch/blackfin/include/asm/blackfin_local.h
+++ b/arch/blackfin/include/asm/blackfin_local.h
@@ -48,8 +48,8 @@
 #define L1_CACHE_SHIFT 5
 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
 
-#include <asm/linkage.h>
 #include <asm/cache.h>
+#include <linux/linkage.h>
 
 #ifndef __ASSEMBLY__
 # ifdef SHARED_RESOURCES
diff --git a/arch/blackfin/include/asm/cache.h b/arch/blackfin/include/asm/cache.h
index 482e4b5..568885a 100644
--- a/arch/blackfin/include/asm/cache.h
+++ b/arch/blackfin/include/asm/cache.h
@@ -7,7 +7,7 @@
 #ifndef __ARCH_BLACKFIN_CACHE_H
 #define __ARCH_BLACKFIN_CACHE_H
 
-#include <asm/linkage.h>	/* for asmlinkage */
+#include <linux/linkage.h>	/* for asmlinkage */
 
 /*
  * Bytes per L1 cache line
diff --git a/arch/blackfin/include/asm/linkage.h b/arch/blackfin/include/asm/linkage.h
index fbb497c..6d4493a 100644
--- a/arch/blackfin/include/asm/linkage.h
+++ b/arch/blackfin/include/asm/linkage.h
@@ -22,53 +22,7 @@
  * MA 02110-1301 USA
  */
 
-#ifndef _LINUX_LINKAGE_H
-#define _LINUX_LINKAGE_H
-
-#include <linux/config.h>
-
-#ifdef __cplusplus
-#define CPP_ASMLINKAGE		extern "C"
-#else
-#define CPP_ASMLINKAGE
-#endif
-
-#define asmlinkage CPP_ASMLINKAGE
-
-#define SYMBOL_NAME_STR(X)	#X
-#define SYMBOL_NAME(X)		X
-#ifdef __STDC__
-#define SYMBOL_NAME_LABEL(X)	X##:
-#else
-#define SYMBOL_NAME_LABEL(X)	X:
-#endif
-
-#define __ALIGN .align		4
-#define __ALIGN_STR		".align 4"
-
-#ifdef __ASSEMBLY__
-
-#define ALIGN			__ALIGN
-#define ALIGN_STR		__ALIGN_STR
-
-#define LENTRY(name) \
-	ALIGN; \
-	SYMBOL_NAME_LABEL(name)
-
-#define ENTRY(name) \
-	.globl SYMBOL_NAME(name); \
-	LENTRY(name)
-#endif
-
-#ifndef END
-#define END(name) \
-	.size name, .-name
-#endif
-
-#ifndef ENDPROC
-#define ENDPROC(name) \
-	.type name, @function; \
-	END(name)
-#endif
+#ifndef __ASM_LINKAGE_H
+#define __ASM_LINKAGE_H
 
 #endif
diff --git a/arch/blackfin/lib/__kgdb.S b/arch/blackfin/lib/__kgdb.S
index cba4179..4ccde8f 100644
--- a/arch/blackfin/lib/__kgdb.S
+++ b/arch/blackfin/lib/__kgdb.S
@@ -1,5 +1,5 @@
 
-#include <asm/linkage.h>
+#include <linux/linkage.h>
 
 /* save stack context for non-local goto
  * int kgdb_setjmp(long *buf)
diff --git a/arch/blackfin/lib/outs.S b/arch/blackfin/lib/outs.S
index 253d4c3..39d5332 100644
--- a/arch/blackfin/lib/outs.S
+++ b/arch/blackfin/lib/outs.S
@@ -8,7 +8,7 @@
  * Licensed under the GPL-2.
  */
 
-#include <asm/linkage.h>
+#include <linux/linkage.h>
 
 .align 2
 
diff --git a/arch/blackfin/include/asm/linkage.h b/include/linux/linkage.h
similarity index 98%
copy from arch/blackfin/include/asm/linkage.h
copy to include/linux/linkage.h
index fbb497c..b8a7067 100644
--- a/arch/blackfin/include/asm/linkage.h
+++ b/include/linux/linkage.h
@@ -25,6 +25,7 @@
 #ifndef _LINUX_LINKAGE_H
 #define _LINUX_LINKAGE_H
 
+#include <asm/linkage.h>
 #include <linux/config.h>
 
 #ifdef __cplusplus
-- 
1.7.3.5



More information about the U-Boot mailing list