From patchwork Mon Oct 31 01:44:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 122697 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 95E40B6F77 for ; Mon, 31 Oct 2011 12:44:25 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 042AC28BE4; Mon, 31 Oct 2011 02:44:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A9VpegCqfhSK; Mon, 31 Oct 2011 02:44:23 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 732D928B4A; Mon, 31 Oct 2011 02:44:21 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6855F28B4A for ; Mon, 31 Oct 2011 02:44:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Jz6vS-67ezks for ; Mon, 31 Oct 2011 02:44:18 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from relmlor3.renesas.com (relmlor3.renesas.com [210.160.252.173]) by theia.denx.de (Postfix) with ESMTP id 2A5C228B3C for ; Mon, 31 Oct 2011 02:44:16 +0100 (CET) Received: from relmlir2.idc.renesas.com ([10.200.68.152]) by relmlor3.idc.renesas.com ( SJSMS) with ESMTP id <0LTW00HFIQ5PIPC0@relmlor3.idc.renesas.com> for u-boot@lists.denx.de; Mon, 31 Oct 2011 10:44:13 +0900 (JST) Received: from relmlac4.idc.renesas.com ([10.200.69.24]) by relmlir2.idc.renesas.com ( SJSMS) with ESMTP id <0LTW00G84Q5PSVC0@relmlir2.idc.renesas.com> for u-boot@lists.denx.de; Mon, 31 Oct 2011 10:44:13 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id 3C9C548070; Mon, 31 Oct 2011 10:44:13 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 3BBBF4808A; Mon, 31 Oct 2011 10:44:13 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac4.idc.renesas.com with ESMTP id LAJ12739; Mon, 31 Oct 2011 10:44:13 +0900 X-IronPort-AV: E=Sophos; i="4.69,428,1315148400"; d="scan'208"; a="52453012" Received: from unknown (HELO [172.30.8.157]) ([172.30.8.157]) by relmlii1.idc.renesas.com with ESMTP; Mon, 31 Oct 2011 10:44:13 +0900 Message-id: <4EADFD6C.4070502@renesas.com> Date: Mon, 31 Oct 2011 10:44:13 +0900 From: Yoshihiro Shimoda User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.2.23) Gecko/20110920 Thunderbird/3.1.15 MIME-version: 1.0 To: Nobuhiro Iwamatsu Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH] sh: fix build error in cache.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de In the latest U-Boot, the include/common.h includes the asm/cache.h. So, the dcache_invalid_range() in the arch/sh/include/asm/cache.h is multiple defination. sh4-linux-gnu-ld -e 0x8FFC0000 --defsym reloc_dst=0x8FFC0000 -r -o libsh4.o cpu.o interrupts.o watchdog.o cache.o start.o interrupts.o: In function `dcache_wback_range': /home/u-boot/u-boot-sh/include/asm/cache.h:14: multiple definition of `dcache_wback_range' cpu.o:/home/shimoda/development/u-boot/u-boot-sh/include/asm/cache.h:14: first defined here interrupts.o: In function `dcache_invalid_range': /home/u-boot/u-boot-sh/include/asm/cache.h:25: multiple definition of `dcache_invalid_range' cpu.o:/home/shimoda/development/u-boot/u-boot-sh/include/asm/cache.h:25: first defined here ... Signed-off-by: Yoshihiro Shimoda --- arch/sh/include/asm/cache.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sh/include/asm/cache.h b/arch/sh/include/asm/cache.h index 6ffab4d..978cd8c 100644 --- a/arch/sh/include/asm/cache.h +++ b/arch/sh/include/asm/cache.h @@ -10,7 +10,7 @@ int cache_control(unsigned int cmd); struct __large_struct { unsigned long buf[100]; }; #define __m(x) (*(struct __large_struct *)(x)) -void dcache_wback_range(u32 start, u32 end) +static inline void dcache_wback_range(u32 start, u32 end) { u32 v; @@ -21,7 +21,7 @@ void dcache_wback_range(u32 start, u32 end) } } -void dcache_invalid_range(u32 start, u32 end) +static inline void dcache_invalid_range(u32 start, u32 end) { u32 v;