diff options
author | Rabin Vincent <rabin@rab.in> | 2012-10-14 21:23:09 +0200 |
---|---|---|
committer | David A. Long <dave.long@linaro.org> | 2013-10-14 01:36:56 -0400 |
commit | b0dbfb680a87f1144c0c7bbe6280a96c1ebbec26 (patch) | |
tree | 91ba8322a2be27924010ce305c0c6e9714e7f20c /kernel | |
parent | 1b3e9d4e275d534bbbdf7f7e02bae67a15b2dca1 (diff) |
uprobes: allow arch-specific initialization
Add a weak function for any architecture-specific initialization. ARM
will use this to register the handlers for the undefined instructions it
uses to implement uprobes.
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: David A. Long <dave.long@linaro.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/events/uprobes.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index 22d0121205cc..9734a5f54805 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c @@ -1860,8 +1860,14 @@ static struct notifier_block uprobe_exception_nb = { .priority = INT_MAX-1, /* notified after kprobes, kgdb */ }; +int __weak __init arch_uprobes_init(void) +{ + return 0; +} + static int __init init_uprobes(void) { + int ret; int i; for (i = 0; i < UPROBES_HASH_SZ; i++) @@ -1870,6 +1876,10 @@ static int __init init_uprobes(void) if (percpu_init_rwsem(&dup_mmap_sem)) return -ENOMEM; + ret = arch_uprobes_init(); + if (ret) + return ret; + return register_die_notifier(&uprobe_exception_nb); } module_init(init_uprobes); |