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

Add linkage.h support from blackfin to common include, which is a reduced version from Linux.
Signed-off-by: Macpaul Lin macpaul@andestech.com --- arch/blackfin/include/asm/linkage.h | 74 ----------------------------------- include/linux/linkage.h | 72 ++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 74 deletions(-) delete mode 100644 arch/blackfin/include/asm/linkage.h create mode 100644 include/linux/linkage.h
diff --git a/arch/blackfin/include/asm/linkage.h b/arch/blackfin/include/asm/linkage.h deleted file mode 100644 index fbb497c..0000000 --- a/arch/blackfin/include/asm/linkage.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * U-boot - linkage.h - * - * Copyright (c) 2005-2007 Analog Devices Inc. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - * 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 - -#endif diff --git a/include/linux/linkage.h b/include/linux/linkage.h new file mode 100644 index 0000000..1081dad --- /dev/null +++ b/include/linux/linkage.h @@ -0,0 +1,72 @@ +/* + * U-boot - linkage.h + * + * Copyright (c) 2005-2007 Analog Devices Inc. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#ifndef _LINUX_LINKAGE_H +#define _LINUX_LINKAGE_H + +#include <asm/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 + +#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 + +#endif

add architecture part support of linkage.h
Signed-off-by: Macpaul Lin macpaul@andestech.com --- arch/blackfin/include/asm/linkage.h | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) create mode 100644 arch/blackfin/include/asm/linkage.h
diff --git a/arch/blackfin/include/asm/linkage.h b/arch/blackfin/include/asm/linkage.h new file mode 100644 index 0000000..9d6edd9 --- /dev/null +++ b/arch/blackfin/include/asm/linkage.h @@ -0,0 +1,31 @@ +/* + * U-boot - linkage.h + * + * Copyright (c) 2005-2007 Analog Devices Inc. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#ifndef __ASM_LINKAGE_H +#define __ASM_LINKAGE_H + +#define __ALIGN .align 4 +#define __ALIGN_STR ".align 4" + +#endif

Fix include path of linkage.h due to header file movement.
Signed-off-by: Macpaul Lin macpaul@andestech.com --- arch/blackfin/cpu/cache.S | 2 +- arch/blackfin/include/asm/blackfin_local.h | 2 +- arch/blackfin/include/asm/cache.h | 2 +- arch/blackfin/lib/__kgdb.S | 2 +- arch/blackfin/lib/outs.S | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
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/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

On Wednesday 30 November 2011 02:23:45 Macpaul Lin wrote:
Add linkage.h support from blackfin to common include, which is a reduced version from Linux.
since applying any of these patches alone will break things, you'll have to squash them into one. otherwise git bisect won't work.
otherwise, it looks good to me :) -mike

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@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

On Wednesday 30 November 2011 23:32:10 Macpaul Lin wrote:
- Add linkage.h support from blackfin to common include, which is a reduced version from Linux.
- Add architecture part support of linkage.h into blackfin
- Fix include path of in blackfin related to linkage.h due to header file movement.
i'll test it out and run it through my Blackfin tree. let's see if any one else has any feedback ... -mike

On Thursday 01 December 2011 13:05:42 Mike Frysinger wrote:
On Wednesday 30 November 2011 23:32:10 Macpaul Lin wrote:
Add linkage.h support from blackfin to common include,
which is a reduced version from Linux.
Add architecture part support of linkage.h into blackfin
Fix include path of in blackfin related to linkage.h
due to header file movement.
i'll test it out and run it through my Blackfin tree. let's see if any one else has any feedback ...
FYI, i'll be including it as part of my Blackfin merge when the window closes -mike

Hi Mike,
2012/1/11 Mike Frysinger vapier@gentoo.org
FYI, i'll be including it as part of my Blackfin merge when the window closes -mike
Thanks for your information, I'll do other fix based on this commit.

On Wed, Nov 30, 2011 at 5:23 AM, Macpaul Lin macpaul@andestech.com wrote:
Add linkage.h support from blackfin to common include, which is a reduced version from Linux.
Signed-off-by: Macpaul Lin macpaul@andestech.com
arch/blackfin/include/asm/linkage.h | 74 ----------------------------------- include/linux/linkage.h | 72 ++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 74 deletions(-) delete mode 100644 arch/blackfin/include/asm/linkage.h create mode 100644 include/linux/linkage.h
You can use the -M git option to properly do the filename change.
Regards,
Fabio Estevam

On Tuesday 10 January 2012 21:05:35 Fabio Estevam wrote:
On Wed, Nov 30, 2011 at 5:23 AM, Macpaul Lin macpaul@andestech.com wrote:
Add linkage.h support from blackfin to common include, which is a reduced version from Linux.
Signed-off-by: Macpaul Lin macpaul@andestech.com
arch/blackfin/include/asm/linkage.h | 74 ----------------------------------- include/linux/linkage.h | 72 ++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 74 deletions(-) delete mode 100644 arch/blackfin/include/asm/linkage.h create mode 100644 include/linux/linkage.h
You can use the -M git option to properly do the filename change.
the -M option is display of the changeset only ... it doesn't affect what gets committed/merged. but using -C/-M when sending patches would be nice as it's easier to review. -mike
participants (4)
-
Fabio Estevam
-
Macpaul Lin
-
Macpaul Lin
-
Mike Frysinger