From patchwork Sun Apr 28 02:17:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 240225 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 F2BD02C00A8 for ; Sun, 28 Apr 2013 12:22:14 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3068A4A327; Sun, 28 Apr 2013 04:20:30 +0200 (CEST) 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 iBbzZWs5LVRq; Sun, 28 Apr 2013 04:20:29 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AD6634A1CB; Sun, 28 Apr 2013 04:19:04 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8175B4A175 for ; Sun, 28 Apr 2013 04:18:39 +0200 (CEST) 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 TuTLUtkfkPiZ for ; Sun, 28 Apr 2013 04:18:37 +0200 (CEST) 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 mail-ye0-f201.google.com (mail-ye0-f201.google.com [209.85.213.201]) by theia.denx.de (Postfix) with ESMTPS id 415D54A19C for ; Sun, 28 Apr 2013 04:18:24 +0200 (CEST) Received: by mail-ye0-f201.google.com with SMTP id m2so556211yen.4 for ; Sat, 27 Apr 2013 19:18:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=0wL0ZtiIg1n74tMByuf4p/n56HEAnc3VMWKPKdremIY=; b=GAgSg570J+bU5Hg1yWrPyuAsncgnWNqtkrZMUBn078awsR/Av+vTSc/8Hd3MTB/SHr NCKWvm+GO8hZA7+dEwuDb1ifxlM7y+y0C3yLhHGYIk9Gfh62176gLDjJXr/DJbPZJ6Fx Er+W8MxmXxVFaLcStgEww3JXPLHQ4jMAeGvFVVGTQ89wGvdq7tJD8G8PpvPsLTd5OtPB 7REHOVDPfgMtIgrmYLLaZ0RrpUvJaCZgUxz3SwUhdXptNG5VzlCsxDCJc1FGhmMDEb3d 6psvrEjIVb059E/h7NN5D+O6g0yKCTVq/dnlvcnY9/mF4yZB+qpxhOAT/NQCc4xVQg9F OpHA== X-Received: by 10.236.80.106 with SMTP id j70mr9479042yhe.11.1367115503065; Sat, 27 Apr 2013 19:18:23 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id b49si12725yhj.6.2013.04.27.19.18.23 for (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Sat, 27 Apr 2013 19:18:23 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.83.1]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id E40255A4271; Sat, 27 Apr 2013 19:18:22 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id C373716088E; Sat, 27 Apr 2013 19:18:22 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sat, 27 Apr 2013 19:17:52 -0700 Message-Id: <1367115472-29531-16-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1367115472-29531-1-git-send-email-sjg@chromium.org> References: <1367115472-29531-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQkurvIirRjB1OaV08ngjSq1Hdq/HHmbQqDU1VbooBEam7MrvTkLJ5KrOjeP+fOEaUAUKlFNArZlXlGEnxkafNYQ36w3MY4VVs4WPV3WMYLNXEtFOXlsaAHyIiUYvN0dRNesIylyFDfCLwS5igs0vogZMdX/TkHvrb/cWizJ+12NQxylwtxy0C3k1qA3k45ksTKbVvgU Cc: Tom Rini , u-boot-review@google.com Subject: [U-Boot] [RFC PATCH 15/15] exynos: Avoid function instrumentation for microsecond timer X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de For tracing to work it has to be able to access the microsecond timer without causing a recursive call to the function entry/exit handlers. Add attributes to the relevant functions to support this. Signed-off-by: Simon Glass --- arch/arm/cpu/armv7/s5p-common/timer.c | 2 +- arch/arm/include/asm/arch-exynos/cpu.h | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/arm/cpu/armv7/s5p-common/timer.c b/arch/arm/cpu/armv7/s5p-common/timer.c index 4adfaae..637593c 100644 --- a/arch/arm/cpu/armv7/s5p-common/timer.c +++ b/arch/arm/cpu/armv7/s5p-common/timer.c @@ -95,7 +95,7 @@ unsigned long get_timer(unsigned long base) return time_ms - base; } -unsigned long timer_get_us(void) +unsigned long __attribute__((no_instrument_function)) timer_get_us(void) { static unsigned long base_time_us; diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index f76e489..6b1b54f 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -175,7 +175,7 @@ static inline char *s5p_get_cpu_name(void) } #define IS_SAMSUNG_TYPE(type, id) \ -static inline int cpu_is_##type(void) \ +static inline int __attribute__((no_instrument_function)) cpu_is_##type(void) \ { \ return (s5p_cpu_id >> 12) == id; \ } @@ -184,7 +184,8 @@ IS_SAMSUNG_TYPE(exynos4, 0x4) IS_SAMSUNG_TYPE(exynos5, 0x5) #define IS_EXYNOS_TYPE(type, id) \ -static inline int proid_is_##type(void) \ +static inline int __attribute__((no_instrument_function)) \ + proid_is_##type(void) \ { \ return s5p_cpu_id == id; \ } @@ -194,9 +195,10 @@ IS_EXYNOS_TYPE(exynos4412, 0x4412) IS_EXYNOS_TYPE(exynos5250, 0x5250) #define SAMSUNG_BASE(device, base) \ -static inline unsigned int samsung_get_base_##device(void) \ +static inline unsigned int __attribute__((no_instrument_function)) \ + samsung_get_base_##device(void) \ { \ - if (cpu_is_exynos4()) { \ + if (cpu_is_exynos4()) { \ if (proid_is_exynos4412()) \ return EXYNOS4X12_##base; \ return EXYNOS4_##base; \