diff mbox

[U-Boot] powerpc: Fix declaration type for I/O functions

Message ID 1334134152-456-1-git-send-email-prabhakar@freescale.com
State Accepted
Commit 20959471b5d07fdeb8603b918d80385aa2954711
Delegated to: Wolfgang Denk
Headers show

Commit Message

Prabhakar Kushwaha April 11, 2012, 8:49 a.m. UTC
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.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
---
 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(-)

Comments

Wolfgang Denk Aug. 9, 2012, 8:24 p.m. UTC | #1
Dear Prabhakar Kushwaha,

In message <1334134152-456-1-git-send-email-prabhakar@freescale.com> 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.
> 
> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> ---
>  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
Andy Fleming Aug. 23, 2012, 5:24 p.m. UTC | #2
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.

On Wed, Apr 11, 2012 at 3:49 AM, Prabhakar Kushwaha
<prabhakar@freescale.com> 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.
>
> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Prabhakar Kushwaha Aug. 23, 2012, 5:29 p.m. UTC | #3
On 08/23/2012 10:54 PM, Andy Fleming wrote:
> 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.
>
> On Wed, Apr 11, 2012 at 3:49 AM, Prabhakar Kushwaha
> <prabhakar@freescale.com> 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.
>>
>> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>

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

Thanks,
Prabhakar
Scott Wood Aug. 23, 2012, 5:57 p.m. UTC | #4
On 08/23/2012 12:24 PM, Andy Fleming wrote:
> 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.
> 
> On Wed, Apr 11, 2012 at 3:49 AM, Prabhakar Kushwaha
> <prabhakar@freescale.com> 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.
>>
>> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> 

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

-Scott
Andy Fleming Aug. 23, 2012, 6:03 p.m. UTC | #5
Very top of Wolfgang's master branch.

On Thu, Aug 23, 2012 at 12:57 PM, Scott Wood <scottwood@freescale.com> wrote:
> On 08/23/2012 12:24 PM, Andy Fleming wrote:
>> 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.
>>
>> On Wed, Apr 11, 2012 at 3:49 AM, Prabhakar Kushwaha
>> <prabhakar@freescale.com> 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.
>>>
>>> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
>>
>
> It builds OK for me using that same toolchain.  What SHA1 are you building?
>
> -Scott
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Tabi Timur-B04825 Aug. 23, 2012, 6:03 p.m. UTC | #6
On Thu, Aug 23, 2012 at 12:24 PM, Andy Fleming <afleming@gmail.com> wrote:

> 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.
Scott Wood Aug. 23, 2012, 6:09 p.m. UTC | #7
On 08/23/2012 01:03 PM, Andy Fleming wrote:
> On Thu, Aug 23, 2012 at 12:57 PM, Scott Wood <scottwood@freescale.com> wrote:
>> On 08/23/2012 12:24 PM, Andy Fleming wrote:
>>> 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.
>>>
>>> On Wed, Apr 11, 2012 at 3:49 AM, Prabhakar Kushwaha
>>> <prabhakar@freescale.com> 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.
>>>>
>>>> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
>>>
>>
>> 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
Scott Wood Aug. 24, 2012, 10:34 p.m. UTC | #8
On 08/23/2012 01:09 PM, Scott Wood wrote:
> On 08/23/2012 01:03 PM, Andy Fleming wrote:
>> On Thu, Aug 23, 2012 at 12:57 PM, Scott Wood <scottwood@freescale.com> wrote:
>>> On 08/23/2012 12:24 PM, Andy Fleming wrote:
>>>> 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.
>>>>
>>>> On Wed, Apr 11, 2012 at 3:49 AM, Prabhakar Kushwaha
>>>> <prabhakar@freescale.com> 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.
>>>>>
>>>>> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
>>>>
>>>
>>> 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.

The p1010rdb patches I posted yesterday fix it for me.

-Scott
diff mbox

Patch

diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h
index 0a71bb9..9597583 100644
--- a/arch/powerpc/include/asm/io.h
+++ b/arch/powerpc/include/asm/io.h
@@ -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));
 }