From patchwork Mon Jul 8 03:10:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 18276 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ye0-f198.google.com (mail-ye0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 88FFE25E19 for ; Mon, 8 Jul 2013 03:10:43 +0000 (UTC) Received: by mail-ye0-f198.google.com with SMTP id m13sf4601989yen.9 for ; Sun, 07 Jul 2013 20:10:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to:message-id :date:from:user-agent:mime-version:to:cc:subject:references :in-reply-to:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type:content-transfer-encoding; bh=C4Tu71b5uyqSQxdUfdBMnuUL6DX32kmW6TXejaKRsRU=; b=RTiSdroE8yOG9Hhhbi7LbBli9bBlCuRuF62qgrFj4Uo6HXgUCLhdY84xc7PqUF/jH7 asPWwn4FCjKlXcwcjyExGpH7+2MSKvB++ZfFgCKx1WIPUG0+bKmP0gitjBC9tpZcHaPl vCEwLLeYjNJFOZNCRvl6QKbkp4qYplG3u1mZ5tTPiutQItTOa9I2kcaOs2t1hfiBQ4rf mnKynxzJvdPI8Qs9H7Yi38oM7c5Sl4BKj5NsnW6pN1y9FYZJ4YLEj5xH/Kvyfw1FbI/l TPdqVR0jFPuWyfvvxOOXQ2IO2jw+/mCNuJ3ovcbOnL7FYoCjPYEhT36VM1zETE265MU4 Pp1A== X-Received: by 10.236.185.4 with SMTP id t4mr10508788yhm.21.1373253042580; Sun, 07 Jul 2013 20:10:42 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.138 with SMTP id k10ls1664512qek.15.gmail; Sun, 07 Jul 2013 20:10:42 -0700 (PDT) X-Received: by 10.220.173.72 with SMTP id o8mr12566628vcz.75.1373253042339; Sun, 07 Jul 2013 20:10:42 -0700 (PDT) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id xb6si5643683vdb.16.2013.07.07.20.10.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Jul 2013 20:10:42 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id pb11so3182474veb.9 for ; Sun, 07 Jul 2013 20:10:42 -0700 (PDT) X-Received: by 10.52.178.227 with SMTP id db3mr5993733vdc.20.1373253042219; Sun, 07 Jul 2013 20:10:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.149.77 with SMTP id s13csp151930vcv; Sun, 7 Jul 2013 20:10:41 -0700 (PDT) X-Received: by 10.66.228.7 with SMTP id se7mr20818441pac.62.1373253041030; Sun, 07 Jul 2013 20:10:41 -0700 (PDT) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by mx.google.com with ESMTPS id ol10si11567920pbb.34.2013.07.07.20.10.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Jul 2013 20:10:41 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.53 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.220.53; Received: by mail-pa0-f53.google.com with SMTP id tj12so3906266pac.12 for ; Sun, 07 Jul 2013 20:10:40 -0700 (PDT) X-Received: by 10.68.200.104 with SMTP id jr8mr19477887pbc.43.1373253040524; Sun, 07 Jul 2013 20:10:40 -0700 (PDT) Received: from [10.10.10.29] ([115.113.119.130]) by mx.google.com with ESMTPSA id lk9sm3441853pab.2.2013.07.07.20.10.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Jul 2013 20:10:39 -0700 (PDT) Message-ID: <51DA2DAC.9010103@linaro.org> Date: Mon, 08 Jul 2013 08:40:36 +0530 From: Tushar Behera User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: Simon Glass CC: U-Boot Mailing List , Patch Tracking Subject: Re: [PATCH] common: board_f: Fix build error when CONFIG_TRACE is not defined References: <1373013620-13812-1-git-send-email-tushar.behera@linaro.org> In-Reply-To: X-Gm-Message-State: ALoCoQldS/w0ZJrEgtpmmN5UhkWQNQMN0Di9ITB13/8bA44G5OI+W+DUGPsbrnPuiQ8h07btKQRu X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On 07/06/2013 01:27 AM, Simon Glass wrote: > Hi Tushar, > > On Fri, Jul 5, 2013 at 1:40 AM, Tushar Behera wrote: > >> When CONFIG_TRACE is not defined, definition of trace_early_init is not >> compiled and we get following error. >> >> common/libcommon.o:(.data.init_sequence_f+0xc): undefined reference to >> `trace_early_init' >> >> While at it, also define reserve_trace only if CONFIG_TRACE is defined. >> >> CC: Simon Glass >> Signed-off-by: Tushar Behera >> --- >> common/board_f.c | 8 ++++++-- >> 1 file changed, 6 insertions(+), 2 deletions(-) >> >> diff --git a/common/board_f.c b/common/board_f.c >> index ab4242a..a685368 100644 >> --- a/common/board_f.c >> +++ b/common/board_f.c >> @@ -501,17 +501,17 @@ static int reserve_lcd(void) >> } >> #endif /* CONFIG_LCD */ >> >> +#ifdef CONFIG_TRACE >> static int reserve_trace(void) >> { >> -#ifdef CONFIG_TRACE >> gd->relocaddr -= CONFIG_TRACE_BUFFER_SIZE; >> gd->trace_buff = map_sysmem(gd->relocaddr, >> CONFIG_TRACE_BUFFER_SIZE); >> debug("Reserving %dk for trace data at: %08lx\n", >> CONFIG_TRACE_BUFFER_SIZE >> 10, gd->relocaddr); >> -#endif >> >> return 0; >> } >> +#endif >> >> #if defined(CONFIG_VIDEO) && (!defined(CONFIG_PPC) || >> defined(CONFIG_8xx)) \ >> && !defined(CONFIG_ARM) && !defined(CONFIG_X86) >> @@ -833,7 +833,9 @@ static init_fnc_t init_sequence_f[] = { >> #endif >> setup_mon_len, >> setup_fdt, >> +#ifdef CONFIG_TRACE >> trace_early_init, >> +#endif >> #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) >> /* TODO: can this go into arch_cpu_init()? */ >> probecpu, >> @@ -977,7 +979,9 @@ static init_fnc_t init_sequence_f[] = { >> #ifdef CONFIG_LCD >> reserve_lcd, >> #endif >> +#ifdef CONFIG_TRACE >> reserve_trace, >> +#endif >> /* TODO: Why the dependency on CONFIG_8xx? */ >> #if defined(CONFIG_VIDEO) && (!defined(CONFIG_PPC) || >> defined(CONFIG_8xx)) \ >> && !defined(CONFIG_ARM) && !defined(CONFIG_X86) >> > > Does the static inline not work for you? What toolchain are you using? I > assume this is ARM? > I was testing on EXYNOS5250 using 4.7.3 toolchain. My mistake: while testing this patch, I had disabled CONFIG_TRACE, but CONFIG_TRACE_EARLY was still enabled, hence the error. You may ignore the patch. IMHO, we should define the TRACE related config options only if TRACE is enabled. If that is ok for you, I will submit a patch for that. > Simon > --- a/include/configs/exynos5250-dt.h +++ b/include/configs/exynos5250-dt.h @@ -45,11 +45,13 @@ /* Allow tracing to be enabled */ #define CONFIG_TRACE +#ifdef CONFIG_TRACE #define CONFIG_CMD_TRACE #define CONFIG_TRACE_BUFFER_SIZE (16 << 20) #define CONFIG_TRACE_EARLY_SIZE (8 << 20) #define CONFIG_TRACE_EARLY #define CONFIG_TRACE_EARLY_ADDR 0x50000000 +#endif > Regards,