linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
To: ananth@in.ibm.com, akpm@osdl.org, paulmck@us.ibm.com
Cc: linux-kernel@vger.kernel.org, systemtap@sources.redhat.com,
	Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Subject: [patch 2/4] Kprobes - cleanup include_asm_kprobes_h
Date: Tue, 13 Dec 2005 12:35:49 -0800	[thread overview]
Message-ID: <20051213203901.071468453@csdlinux-2.jf.intel.com> (raw)
In-Reply-To: 20051213203547.649087523@csdlinux-2.jf.intel.com

[-- Attachment #1: cleanup_arch_kprobe_h.patch --]
[-- Type: text/plain, Size: 3430 bytes --]

[PATCH] kprobes - cleanup include_asm_kprobes_h

The arch specific kprobes.h files never gets included
when CONFIG_KPROBES is turned off. Hence check for
CONFIG_KPROBES is not appropriate here in this 
arch specific kprobes.h files.

Also the below defined function kprobes_exception_notify()
is not needed when CONFIG_KPROBES is off.

Compile tested for both CONFIG_KPROBES=y and N.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
--------------------------------------------------------------------

 include/asm-i386/kprobes.h    |    8 --------
 include/asm-ia64/kprobes.h    |    8 --------
 include/asm-powerpc/kprobes.h |    8 --------
 include/asm-sparc64/kprobes.h |    9 ---------
 4 files changed, 33 deletions(-)

Index: linux-2.6.15-rc5-mm2/include/asm-i386/kprobes.h
===================================================================
--- linux-2.6.15-rc5-mm2.orig/include/asm-i386/kprobes.h
+++ linux-2.6.15-rc5-mm2/include/asm-i386/kprobes.h
@@ -76,14 +76,6 @@ static inline void restore_interrupts(st
 		local_irq_enable();
 }
 
-#ifdef CONFIG_KPROBES
 extern int kprobe_exceptions_notify(struct notifier_block *self,
 				    unsigned long val, void *data);
-#else				/* !CONFIG_KPROBES */
-static inline int kprobe_exceptions_notify(struct notifier_block *self,
-					   unsigned long val, void *data)
-{
-	return 0;
-}
-#endif
 #endif				/* _ASM_KPROBES_H */
Index: linux-2.6.15-rc5-mm2/include/asm-ia64/kprobes.h
===================================================================
--- linux-2.6.15-rc5-mm2.orig/include/asm-ia64/kprobes.h
+++ linux-2.6.15-rc5-mm2/include/asm-ia64/kprobes.h
@@ -115,7 +115,6 @@ static inline void arch_copy_kprobe(stru
 {
 }
 
-#ifdef CONFIG_KPROBES
 extern int kprobe_exceptions_notify(struct notifier_block *self,
 				    unsigned long val, void *data);
 
@@ -124,11 +123,4 @@ static inline void jprobe_return(void)
 {
 }
 
-#else				/* !CONFIG_KPROBES */
-static inline int kprobe_exceptions_notify(struct notifier_block *self,
-					   unsigned long val, void *data)
-{
-	return 0;
-}
-#endif
 #endif				/* _ASM_KPROBES_H */
Index: linux-2.6.15-rc5-mm2/include/asm-powerpc/kprobes.h
===================================================================
--- linux-2.6.15-rc5-mm2.orig/include/asm-powerpc/kprobes.h
+++ linux-2.6.15-rc5-mm2/include/asm-powerpc/kprobes.h
@@ -70,14 +70,6 @@ struct kprobe_ctlblk {
 	struct prev_kprobe prev_kprobe;
 };
 
-#ifdef CONFIG_KPROBES
 extern int kprobe_exceptions_notify(struct notifier_block *self,
 				    unsigned long val, void *data);
-#else				/* !CONFIG_KPROBES */
-static inline int kprobe_exceptions_notify(struct notifier_block *self,
-					   unsigned long val, void *data)
-{
-	return 0;
-}
-#endif
 #endif	/* _ASM_POWERPC_KPROBES_H */
Index: linux-2.6.15-rc5-mm2/include/asm-sparc64/kprobes.h
===================================================================
--- linux-2.6.15-rc5-mm2.orig/include/asm-sparc64/kprobes.h
+++ linux-2.6.15-rc5-mm2/include/asm-sparc64/kprobes.h
@@ -38,15 +38,6 @@ struct kprobe_ctlblk {
 	struct prev_kprobe prev_kprobe;
 };
 
-#ifdef CONFIG_KPROBES
 extern int kprobe_exceptions_notify(struct notifier_block *self,
 				    unsigned long val, void *data);
-#else				/* !CONFIG_KPROBES */
-static inline int kprobe_exceptions_notify(struct notifier_block *self,
-					   unsigned long val, void *data)
-{
-	return 0;
-}
-#endif
-
 #endif /* _SPARC64_KPROBES_H */

--


  parent reply	other threads:[~2005-12-13 21:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-13 20:35 [patch 0/4] Kprobes cleanup patches Anil S Keshavamurthy
2005-12-13 20:35 ` [patch 1/4] Kprobes - Enable funcions only for required arch Anil S Keshavamurthy
2005-12-13 20:35 ` Anil S Keshavamurthy [this message]
2005-12-13 20:35 ` [patch 3/4] Kprobes - Changed from using spinlock to mutext Anil S Keshavamurthy
2005-12-14 23:50   ` Keshavamurthy Anil S
2005-12-13 20:35 ` [patch 4/4] Kprobes Cleanup arch_remove_kprobe Anil S Keshavamurthy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051213203901.071468453@csdlinux-2.jf.intel.com \
    --to=anil.s.keshavamurthy@intel.com \
    --cc=akpm@osdl.org \
    --cc=ananth@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@us.ibm.com \
    --cc=systemtap@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).