nds32: add linkage support
PATCH 1/2 nds32: add linkage support
Add linkage support.
--- arch/nds32/include/asm/linkage.h | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/include/asm/linkage.h
arch/nds32/include/asm/linkage.h new file +31 -0
@@ -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
Signature · 1 line
1.7.3.5
PATCH 2/2 nds32/ag101/watchdog.S: add linkage support
Add linkage support to watchdog.S.
--- arch/nds32/cpu/n1213/ag101/watchdog.S | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
arch/nds32/cpu/n1213/ag101/watchdog.S +3 -2
@@ -22,12 +22,12 @@ */ #include <asm/arch-ag101/ag101.h> +#include <linux/linkage.h> .text #ifndef CONFIG_SKIP_TRUNOFF_WATCHDOG -.globl turnoff_watchdog -turnoff_watchdog: +ENTRY(turnoff_watchdog) #define WD_CR 0xC #define WD_ENABLE 0x1
@@ -45,4 +45,5 @@ turnoff_watchdog: ret +ENDPROC(turnoff_watchdog) #endif
Signature · 1 line
1.7.3.5
PATCH 1/2 nds32: add linkage support
In reply to Macpaul LinQuoted 1 line · On Wednesday 30 November 2011 03:06:42 Macpaul Lin wrote:
Add linkage support.
let's add this to our linux/linkage.h:
#ifndef __ALIGN
#define __ALIGN .align 4
#define __ALIGN_STR ".align 4"
#endif
i think most arches will be this way
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111130/3da967ae/attachment.pgp>
PATCH 1/2 nds32: add linkage support
Hi Mike,
2011/12/1 Mike Frysinger <[email protected]>
Quoted 12 lines · On Wednesday 30 November 2011 03:06:42 Macpaul Lin wrote:
Quoted 1 line
Add linkage support.
let's add this to our
linux/linkage.h:
#ifndef__ALIGN
#define__ALIGN.align 4
#define__ALIGN_STR".align 4"
#endifi think most arches will be this way
-mike
I'm not sure for this because I've found there exists different configurations for other
architectures in Linux.
For example,
../../../arch/arm/include/asm/linkage.h:4:#define __ALIGN .align 0 ../../../arch/arm/include/asm/linkage.h:5:#define __ALIGN_STR ".align 0" ../../../arch/avr32/include/asm/linkage.h:4:#define __ALIGN .balign 2 ../../../arch/avr32/include/asm/linkage.h:5:#define __ALIGN_STR ".balign 2" ../../../arch/score/include/asm/linkage.h:4:#define __ALIGN .align 2 ../../../arch/score/include/asm/linkage.h:5:#define __ALIGN_STR ".align 2"
Signature · 2 lines
Best regards, Macpaul Lin
PATCH 1/2 nds32: add linkage support
Quoted 10 lines · On Wednesday 30 November 2011 21:29:02 Macpaul Lin wrote:
2011/12/1 Mike Frysinger <[email protected]>
Quoted 9 lines · On Wednesday 30 November 2011 03:06:42 Macpaul Lin wrote:
Quoted 1 line
Add linkage support.
let's add this to our
linux/linkage.h:
#ifndef__ALIGN
#define__ALIGN.align 4
#define__ALIGN_STR".align 4"
#endif
Quoted 5 lines
Quoted 1 line
i think most arches will be this way
I'm not sure for this because I've found there exists different configurations for other
architectures in Linux.
more than half will use ".align 4". for the few that do not, they can still define __ALIGN themselves, and thus the "#ifndef __ALIGN" i quoted above will keep it from executing.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111130/b1991efa/attachment.pgp>
PATCH 1/2 nds32: add linkage support
Hi Mike,
Quoted 7 lines
more than half will use ".align 4". for the few that do not, they can still
define__ALIGNthemselves, and thus the "#ifndef__ALIGN" i quoted above will
keep it from executing.
-mike
Good! I will fix this up ASAP. :-)
Signature · 2 lines
Best regards, Macpaul Lin
PATCH v2 1/2 nds32: add linkage support
In reply to Mike FrysingerAdd linkage support.
---
Changes for v2:
- remove architecture related define of align.
- remain this empty file for the compilation necessary.
arch/nds32/include/asm/linkage.h | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/include/asm/linkage.h
arch/nds32/include/asm/linkage.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* 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 + +#endif
Signature · 1 line
1.7.3.5
PATCH v2 2/2 nds32/ag101/watchdog.S: add linkage support
In reply to Mike FrysingerAdd linkage support to watchdog.S.
---
Changes for v2:
- No change.
arch/nds32/cpu/n1213/ag101/watchdog.S | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
arch/nds32/cpu/n1213/ag101/watchdog.S +3 -2
@@ -22,12 +22,12 @@ */ #include <asm/arch-ag101/ag101.h> +#include <linux/linkage.h> .text #ifndef CONFIG_SKIP_TRUNOFF_WATCHDOG -.globl turnoff_watchdog -turnoff_watchdog: +ENTRY(turnoff_watchdog) #define WD_CR 0xC #define WD_ENABLE 0x1
@@ -45,4 +45,5 @@ turnoff_watchdog: ret +ENDPROC(turnoff_watchdog) #endif
Signature · 1 line
1.7.3.5
Macpaul Lin
AppliedPATCH v2 2/2 nds32/ag101/watchdog.S: add linkage support
Hi Macpaul
2011/12/1 Macpaul Lin <[email protected]>
Quoted 11 lines
Add linkage support to
watchdog.S.Signed-off-by Macpaul Lin <[email protected]>---
Changes for v2:
- No change.arch/nds32/cpu/n1213/ag101/watchdog.S | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
Applied, thanks,
Signature · 2 lines
Best regards, Macpaul Lin