All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] uprobes: move function declarations out of arch
@ 2012-06-19  6:55 Rabin Vincent
  2012-06-20  8:07 ` Linus Walleij
  2012-06-20 10:27 ` Srikar Dronamraju
  0 siblings, 2 replies; 3+ messages in thread
From: Rabin Vincent @ 2012-06-19  6:55 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Srikar Dronamraju, Peter Zijlstra, Ananth N Mavinakayanahalli,
	linux-kernel, Rabin Vincent

Move the arch_* function declarations to the common header so that they
don't have to be copy/pasted verbatim across arches.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
---
 arch/x86/include/asm/uprobes.h |    6 ------
 include/linux/uprobes.h        |    9 +++++++++
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/arch/x86/include/asm/uprobes.h b/arch/x86/include/asm/uprobes.h
index f3971bb..95488b3 100644
--- a/arch/x86/include/asm/uprobes.h
+++ b/arch/x86/include/asm/uprobes.h
@@ -48,10 +48,4 @@ struct arch_uprobe_task {
 #endif
 };
 
-extern int  arch_uprobe_analyze_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long addr);
-extern int  arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs);
-extern int  arch_uprobe_post_xol(struct arch_uprobe *aup, struct pt_regs *regs);
-extern bool arch_uprobe_xol_was_trapped(struct task_struct *tsk);
-extern int  arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, void *data);
-extern void arch_uprobe_abort_xol(struct arch_uprobe *aup, struct pt_regs *regs);
 #endif	/* _ASM_UPROBES_H */
diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h
index efe4b33..e2d2948 100644
--- a/include/linux/uprobes.h
+++ b/include/linux/uprobes.h
@@ -30,6 +30,8 @@
 struct vm_area_struct;
 struct mm_struct;
 struct inode;
+struct notifier_block;
+struct arch_uprobe;
 
 #ifdef CONFIG_ARCH_SUPPORTS_UPROBES
 # include <asm/uprobes.h>
@@ -118,6 +120,13 @@ extern bool uprobe_deny_signal(void);
 extern bool __weak arch_uprobe_skip_sstep(struct arch_uprobe *aup, struct pt_regs *regs);
 extern void uprobe_clear_state(struct mm_struct *mm);
 extern void uprobe_reset_state(struct mm_struct *mm);
+
+extern int  arch_uprobe_analyze_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long addr);
+extern int  arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs);
+extern int  arch_uprobe_post_xol(struct arch_uprobe *aup, struct pt_regs *regs);
+extern bool arch_uprobe_xol_was_trapped(struct task_struct *tsk);
+extern int  arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, void *data);
+extern void arch_uprobe_abort_xol(struct arch_uprobe *aup, struct pt_regs *regs);
 #else /* !CONFIG_UPROBES */
 struct uprobes_state {
 };
-- 
1.7.4.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] uprobes: move function declarations out of arch
  2012-06-19  6:55 [PATCH] uprobes: move function declarations out of arch Rabin Vincent
@ 2012-06-20  8:07 ` Linus Walleij
  2012-06-20 10:27 ` Srikar Dronamraju
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2012-06-20  8:07 UTC (permalink / raw)
  To: Rabin Vincent, Arnd Bergmann
  Cc: Ingo Molnar, Srikar Dronamraju, Peter Zijlstra,
	Ananth N Mavinakayanahalli, linux-kernel

On Tue, Jun 19, 2012 at 8:55 AM, Rabin Vincent
<rabin.vincent@stericsson.com> wrote:

> Move the arch_* function declarations to the common header so that they
> don't have to be copy/pasted verbatim across arches.
>
> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>

Looping in Arnd as arch maintainer to get some traction.
(Looks good to me!)

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] uprobes: move function declarations out of arch
  2012-06-19  6:55 [PATCH] uprobes: move function declarations out of arch Rabin Vincent
  2012-06-20  8:07 ` Linus Walleij
@ 2012-06-20 10:27 ` Srikar Dronamraju
  1 sibling, 0 replies; 3+ messages in thread
From: Srikar Dronamraju @ 2012-06-20 10:27 UTC (permalink / raw)
  To: Rabin Vincent
  Cc: Ingo Molnar, Peter Zijlstra, Ananth N Mavinakayanahalli, linux-kernel

> 
> -extern int  arch_uprobe_analyze_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long addr);
> -extern int  arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs);
> -extern int  arch_uprobe_post_xol(struct arch_uprobe *aup, struct pt_regs *regs);
> -extern bool arch_uprobe_xol_was_trapped(struct task_struct *tsk);
> -extern int  arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, void *data);
> -extern void arch_uprobe_abort_xol(struct arch_uprobe *aup, struct pt_regs *regs);
>  #endif	/* _ASM_UPROBES_H */
> diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h
> index efe4b33..e2d2948 100644
> --- a/include/linux/uprobes.h
> +++ b/include/linux/uprobes.h
> @@ -30,6 +30,8 @@
>  struct vm_area_struct;
>  struct mm_struct;
>  struct inode;
> +struct notifier_block;
> +struct arch_uprobe;
> 

One nit:
Do we need this forward declaration. It should anyway be defined in the
asm/uprobes.h?

>  #ifdef CONFIG_ARCH_SUPPORTS_UPROBES
>  # include <asm/uprobes.h>
> @@ -118,6 +120,13 @@ extern bool uprobe_deny_signal(void);
>  extern bool __weak arch_uprobe_skip_sstep(struct arch_uprobe *aup, struct pt_regs *regs);
>  extern void uprobe_clear_state(struct mm_struct *mm);
>  extern void uprobe_reset_state(struct mm_struct *mm);
> +
> +extern int  arch_uprobe_analyze_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long addr);
> +extern int  arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs);
> +extern int  arch_uprobe_post_xol(struct arch_uprobe *aup, struct pt_regs *regs);
> +extern bool arch_uprobe_xol_was_trapped(struct task_struct *tsk);
> +extern int  arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val, void *data);
> +extern void arch_uprobe_abort_xol(struct arch_uprobe *aup, struct pt_regs *regs);
>  #else /* !CONFIG_UPROBES */
>  struct uprobes_state {
>  };

I am okay with moving the declarations to include/linux/uprobes.h

-- 
Thanks and Regards
Srikar


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-06-20 10:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-19  6:55 [PATCH] uprobes: move function declarations out of arch Rabin Vincent
2012-06-20  8:07 ` Linus Walleij
2012-06-20 10:27 ` Srikar Dronamraju

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.