Skip to contentSkip to conversation

powerpc: Fix declaration type for I/O functions

PATCH New Prabhakar Kushwaha 5 participants 9 messages Apr 11, 2012 – Aug 24, 2012 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix declaration type for I/O functions

Prototype declaration of I/O operation functions are not correct. as both 'extern' and function definition are at same place.

Chage protoype declaration as static.

---
Based upon git://git.denx.de/u-boot.git branch master

 arch/powerpc/include/asm/io.h |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
arch/powerpc/include/asm/io.h +10 -10
index 0a71bb9..9597583 100644
@@ -162,7 +162,7 @@ static inline void __raw_writel(unsigned int v, volatile void __iomem *addr)
  * is actually performed (i.e. the data has come back) before we start
  * executing any following instructions.
  */
-extern inline u8 in_8(const volatile unsigned char __iomem *addr)
+static inline u8 in_8(const volatile unsigned char __iomem *addr)
 {
 	u8 ret;
 
@@ -173,7 +173,7 @@ extern inline u8 in_8(const volatile unsigned char __iomem *addr)
 	return ret;
 }
 
-extern inline void out_8(volatile unsigned char __iomem *addr, u8 val)
+static inline void out_8(volatile unsigned char __iomem *addr, u8 val)
 {
 	__asm__ __volatile__("sync;\n"
 			     "stb%U0%X0 %1,%0;\n"
@@ -181,7 +181,7 @@ extern inline void out_8(volatile unsigned char __iomem *addr, u8 val)
 			     : "r" (val));
 }
 
-extern inline u16 in_le16(const volatile unsigned short __iomem *addr)
+static inline u16 in_le16(const volatile unsigned short __iomem *addr)
 {
 	u16 ret;
 
@@ -192,7 +192,7 @@ extern inline u16 in_le16(const volatile unsigned short __iomem *addr)
 	return ret;
 }
 
-extern inline u16 in_be16(const volatile unsigned short __iomem *addr)
+static inline u16 in_be16(const volatile unsigned short __iomem *addr)
 {
 	u16 ret;
 
@@ -202,18 +202,18 @@ extern inline u16 in_be16(const volatile unsigned short __iomem *addr)
 	return ret;
 }
 
-extern inline void out_le16(volatile unsigned short __iomem *addr, u16 val)
+static inline void out_le16(volatile unsigned short __iomem *addr, u16 val)
 {
 	__asm__ __volatile__("sync; sthbrx %1,0,%2" : "=m" (*addr) :
 			      "r" (val), "r" (addr));
 }
 
-extern inline void out_be16(volatile unsigned short __iomem *addr, u16 val)
+static inline void out_be16(volatile unsigned short __iomem *addr, u16 val)
 {
 	__asm__ __volatile__("sync; sth%U0%X0 %1,%0" : "=m" (*addr) : "r" (val));
 }
 
-extern inline u32 in_le32(const volatile unsigned __iomem *addr)
+static inline u32 in_le32(const volatile unsigned __iomem *addr)
 {
 	u32 ret;
 
@@ -224,7 +224,7 @@ extern inline u32 in_le32(const volatile unsigned __iomem *addr)
 	return ret;
 }
 
-extern inline u32 in_be32(const volatile unsigned __iomem *addr)
+static inline u32 in_be32(const volatile unsigned __iomem *addr)
 {
 	u32 ret;
 
@@ -234,13 +234,13 @@ extern inline u32 in_be32(const volatile unsigned __iomem *addr)
 	return ret;
 }
 
-extern inline void out_le32(volatile unsigned __iomem *addr, u32 val)
+static inline void out_le32(volatile unsigned __iomem *addr, u32 val)
 {
 	__asm__ __volatile__("sync; stwbrx %1,0,%2" : "=m" (*addr) :
 			     "r" (val), "r" (addr));
 }
 
-extern inline void out_be32(volatile unsigned __iomem *addr, u32 val)
+static inline void out_be32(volatile unsigned __iomem *addr, u32 val)
 {
 	__asm__ __volatile__("sync; stw%U0%X0 %1,%0" : "=m" (*addr) : "r" (val));
 }
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/1 powerpc: Fix declaration type for I/O functions

Dear Prabhakar Kushwaha,

Quoted 11 lines · In message <[email protected]> you wrote:

Prototype declaration of I/O operation functions are not correct. as both 'extern' and function definition are at same place.

Chage protoype declaration as static.

---
Based upon git://git.denx.de/u-boot.git branch master

 arch/powerpc/include/asm/io.h |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

Applied, thanks.

Dah - here we go! Thanks...

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The explanation requiring the fewest assumptions is the  most  likely
to be correct.                                    -- William of Occam
#2 lore raw

PATCH 1/1 powerpc: Fix declaration type for I/O functions

In reply to Prabhakar Kushwaha

This patch (commit 20959471b5d07fdeb8603b918d80385aa2954711), strangely, causes the error below to happen when I build P1010RDB_36BIT_NAND:

Configuring for P1010RDB_36BIT_NAND - Board: P1010RDB, Options: P1010RDB,36BIT,N AND
make[1]: *** [/local/afleming/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2 /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/bin/powerpc -linux-gnu-size: './u-boot': No such file /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/bin/powerpc -linux-gnu-ld: section .bootpg loaded at [00000000ff801000,00000000ff80120f] ove rlaps section .data loaded at [00000000ff800e90,00000000ff80102b] make[1]: *** [/local/afleming/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....

${CROSS_COMPILE}gcc --version:
powerpc-linux-gnu-gcc (Sourcery G++ Lite 2010.09-55) 4.5.1

I'm guessing this change increased the amount of inlining. Sadly, the subsequent patches, which were intended to shrink the SPL build, were not enough to fix this problem.

My inclination is to revert this patch until we figure out what went wrong.

Quoted 6 lines · Prabhakar Kushwaha

Prototype declaration of I/O operation functions are not correct. as both 'extern' and function definition are at same place.

Chage protoype declaration as static.

#3 lore raw

PATCH 1/1 powerpc: Fix declaration type for I/O functions

Quoted 20 lines · Andy Fleming

This patch (commit 20959471b5d07fdeb8603b918d80385aa2954711), strangely, causes the error below to happen when I build P1010RDB_36BIT_NAND:

Configuring for P1010RDB_36BIT_NAND - Board: P1010RDB, Options: P1010RDB,36BIT,N AND
make[1]: *** [/local/afleming/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2 /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/bin/powerpc -linux-gnu-size: './u-boot': No such file /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/bin/powerpc -linux-gnu-ld: section .bootpg loaded at [00000000ff801000,00000000ff80120f] ove rlaps section .data loaded at [00000000ff800e90,00000000ff80102b] make[1]: *** [/local/afleming/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....

${CROSS_COMPILE}gcc --version:
powerpc-linux-gnu-gcc (Sourcery G++ Lite 2010.09-55) 4.5.1

Quoted 14 lines

I'm guessing this change increased the amount of inlining. Sadly, the subsequent patches, which were intended to shrink the SPL build, were not enough to fix this problem.

My inclination is to revert this patch until we figure out what went wrong.

Quoted 6 lines · Prabhakar Kushwaha

Prototype declaration of I/O operation functions are not correct. as both 'extern' and function definition are at same place.

Chage protoype declaration as static.

if this patch is creating problem. Please revert it, till a proper solution is not found.

Thanks,
Prabhakar

#4 lore raw

PATCH 1/1 powerpc: Fix declaration type for I/O functions

In reply to Andy Fleming
Quoted 20 lines · Andy Fleming

This patch (commit 20959471b5d07fdeb8603b918d80385aa2954711), strangely, causes the error below to happen when I build P1010RDB_36BIT_NAND:

Configuring for P1010RDB_36BIT_NAND - Board: P1010RDB, Options: P1010RDB,36BIT,N AND
make[1]: *** [/local/afleming/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2 /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/bin/powerpc -linux-gnu-size: './u-boot': No such file /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/bin/powerpc -linux-gnu-ld: section .bootpg loaded at [00000000ff801000,00000000ff80120f] ove rlaps section .data loaded at [00000000ff800e90,00000000ff80102b] make[1]: *** [/local/afleming/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....

${CROSS_COMPILE}gcc --version:
powerpc-linux-gnu-gcc (Sourcery G++ Lite 2010.09-55) 4.5.1

Quoted 15 lines

I'm guessing this change increased the amount of inlining. Sadly, the subsequent patches, which were intended to shrink the SPL build, were not enough to fix this problem.

My inclination is to revert this patch until we figure out what went wrong.

Quoted 6 lines · Prabhakar Kushwaha

Prototype declaration of I/O operation functions are not correct. as both 'extern' and function definition are at same place.

Chage protoype declaration as static.

It builds OK for me using that same toolchain. What SHA1 are you building?

-Scott

#5 lore raw

PATCH 1/1 powerpc: Fix declaration type for I/O functions

Very top of Wolfgang's master branch.

Quoted 46 lines · Scott Wood
Quoted 20 lines · Andy Fleming

This patch (commit 20959471b5d07fdeb8603b918d80385aa2954711), strangely, causes the error below to happen when I build P1010RDB_36BIT_NAND:

Configuring for P1010RDB_36BIT_NAND - Board: P1010RDB, Options: P1010RDB,36BIT,N AND
make[1]: *** [/local/afleming/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2 /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/bin/powerpc -linux-gnu-size: './u-boot': No such file /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/bin/powerpc -linux-gnu-ld: section .bootpg loaded at [00000000ff801000,00000000ff80120f] ove rlaps section .data loaded at [00000000ff800e90,00000000ff80102b] make[1]: *** [/local/afleming/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....

${CROSS_COMPILE}gcc --version:
powerpc-linux-gnu-gcc (Sourcery G++ Lite 2010.09-55) 4.5.1

Quoted 15 lines

I'm guessing this change increased the amount of inlining. Sadly, the subsequent patches, which were intended to shrink the SPL build, were not enough to fix this problem.

My inclination is to revert this patch until we figure out what went wrong.

Quoted 6 lines · Prabhakar Kushwaha

Prototype declaration of I/O operation functions are not correct. as both 'extern' and function definition are at same place.

Chage protoype declaration as static.

It builds OK for me using that same toolchain. What SHA1 are you building?

-Scott

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#6 lore raw

PATCH 1/1 powerpc: Fix declaration type for I/O functions

Quoted 35 lines · Andy Fleming
Quoted 34 lines · Scott Wood
Quoted 33 lines · Andy Fleming

This patch (commit 20959471b5d07fdeb8603b918d80385aa2954711), strangely, causes the error below to happen when I build P1010RDB_36BIT_NAND:

Configuring for P1010RDB_36BIT_NAND - Board: P1010RDB, Options: P1010RDB,36BIT,N AND
make[1]: *** [/local/afleming/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2 /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/bin/powerpc -linux-gnu-size: './u-boot': No such file /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/bin/powerpc -linux-gnu-ld: section .bootpg loaded at [00000000ff801000,00000000ff80120f] ove rlaps section .data loaded at [00000000ff800e90,00000000ff80102b] make[1]: *** [/local/afleming/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....

${CROSS_COMPILE}gcc --version:
powerpc-linux-gnu-gcc (Sourcery G++ Lite 2010.09-55) 4.5.1

I'm guessing this change increased the amount of inlining. Sadly, the subsequent patches, which were intended to shrink the SPL build, were not enough to fix this problem.

My inclination is to revert this patch until we figure out what went wrong.

Quoted 5 lines · Prabhakar Kushwaha

Prototype declaration of I/O operation functions are not correct. as both 'extern' and function definition are at same place.

Chage protoype declaration as static.

Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
Quoted 1 line

It builds OK for me using that same toolchain. What SHA1 are you building?

-Scott

Very top of Wolfgang's master branch.

Sigh, I missed the "36bit" part. Before reverting, let me see if I can fix it today.

BTW, "top of ..." is not a SHA1.

-Scott

#7 lore raw

PATCH 1/1 powerpc: Fix declaration type for I/O functions

Quoted 43 lines · Scott Wood
Quoted 42 lines · Andy Fleming
Quoted 40 lines · Scott Wood
Quoted 20 lines · Andy Fleming

This patch (commit 20959471b5d07fdeb8603b918d80385aa2954711), strangely, causes the error below to happen when I build P1010RDB_36BIT_NAND:

Configuring for P1010RDB_36BIT_NAND - Board: P1010RDB, Options: P1010RDB,36BIT,N AND
make[1]: *** [/local/afleming/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2 /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/bin/powerpc -linux-gnu-size: './u-boot': No such file /opt/freescale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/bin/powerpc -linux-gnu-ld: section .bootpg loaded at [00000000ff801000,00000000ff80120f] ove rlaps section .data loaded at [00000000ff800e90,00000000ff80102b] make[1]: *** [/local/afleming/u-boot/nand_spl/u-boot-spl] Error 1
make: *** [nand_spl] Error 2
make: *** Waiting for unfinished jobs....

${CROSS_COMPILE}gcc --version:
powerpc-linux-gnu-gcc (Sourcery G++ Lite 2010.09-55) 4.5.1

Quoted 15 lines

I'm guessing this change increased the amount of inlining. Sadly, the subsequent patches, which were intended to shrink the SPL build, were not enough to fix this problem.

My inclination is to revert this patch until we figure out what went wrong.

Quoted 6 lines · Prabhakar Kushwaha

Prototype declaration of I/O operation functions are not correct. as both 'extern' and function definition are at same place.

Chage protoype declaration as static.

It builds OK for me using that same toolchain. What SHA1 are you building?

-Scott

Quoted 7 lines
Quoted 2 lines

Very top of Wolfgang's master branch.

Sigh, I missed the "36bit" part. Before reverting, let me see if I can fix it today.

BTW, "top of ..." is not a SHA1.

The p1010rdb patches I posted yesterday fix it for me.

-Scott

#8 lore raw

PATCH 1/1 powerpc: Fix declaration type for I/O functions

In reply to Andy Fleming
Quoted 3 lines · Andy Fleming

I'm guessing this change increased the amount of inlining. Sadly, the subsequent patches, which were intended to shrink the SPL build, were not enough to fix this problem.

Maybe there are places where we can use raw I/O instead of accessors? Matt posted a patch like that a few weeks ago.

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale