Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758844AbYLQJUm (ORCPT ); Wed, 17 Dec 2008 04:20:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757561AbYLQJT2 (ORCPT ); Wed, 17 Dec 2008 04:19:28 -0500 Received: from triton.rz.uni-saarland.de ([134.96.7.25]:25289 "EHLO triton.rz.uni-saarland.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756575AbYLQJTZ (ORCPT ); Wed, 17 Dec 2008 04:19:25 -0500 From: Alexander van Heukelum To: linux-arch@vger.kernel.org, Alexander van Heukelum , Ingo Molnar , LKML Cc: Andrew Morton , Sam Ravnborg , Cyrill Gorcunov , Alexander van Heukelum Subject: [PATCH 1/many] PROC macro to annotate functions in assembly files Date: Wed, 17 Dec 2008 10:17:54 +0100 Message-Id: <1229505475-10219-2-git-send-email-heukelum@fastmail.fm> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1229505475-10219-1-git-send-email-heukelum@fastmail.fm> References: <1229505475-10219-1-git-send-email-heukelum@fastmail.fm> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (triton.rz.uni-saarland.de [134.96.7.25]); Wed, 17 Dec 2008 10:18:32 +0100 (CET) X-AntiVirus: checked by AntiVir MailGate (version: 2.1.2-14; AVE: 7.9.0.45; VDF: 7.1.0.243; host: AntiVir3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduce the PROC macro in the generic header file include/linux/linkage.h to annotate functions in assembly files. This is a first step to fully annotate functions (procedures) in .S-files. The PROC macro complements the already existing and being used ENDPROC macro. The generic implementation of PROC is exactly the same as ENTRY. The goal is to annotate functions, at least those called from C code, with PROC at the beginning and ENDPROC at the end. This is for the benefit of debugging and tracing. It will also allow to introduce a framework to check for nesting problems and missing annotations in a later stage by overriding ENTRY/END and PROC/ENDPROC in architecture- specific code, after the annotation errors have been fixed. Signed-off-by: Alexander van Heukelum Cc: Sam Ravnborg Cc: Andrew Morton --- include/linux/linkage.h | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/linux/linkage.h b/include/linux/linkage.h index fee9e59..f4bb5a7 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h @@ -69,10 +69,18 @@ .size name, .-name #endif -/* If symbol 'name' is treated as a subroutine (gets called, and returns) - * then please use ENDPROC to mark 'name' as STT_FUNC for the benefit of - * static analysis tools such as stack depth analyzer. +/* + * If symbol 'name' is treated as a subroutine (gets called, and returns) + * then please use PROC/ENDPROC to mark 'name' as STT_FUNC for the benefit + * of static analysis tools such as stack depth analyzer. */ +#ifndef PROC +#define PROC(name) \ + .globl name; \ + ALIGN; \ + name: +#endif + #ifndef ENDPROC #define ENDPROC(name) \ .type name, @function; \ -- 1.5.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/