From patchwork Fri Mar 7 20:10:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 3794531 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CDB169F369 for ; Fri, 7 Mar 2014 20:11:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 689022034B for ; Fri, 7 Mar 2014 20:11:52 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 49E6120274 for ; Fri, 7 Mar 2014 20:11:51 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WM17T-0003ZB-Rh; Fri, 07 Mar 2014 20:11:47 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WM17R-00051t-D1; Fri, 07 Mar 2014 20:11:45 +0000 Received: from mail-pb0-f45.google.com ([209.85.160.45]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WM17M-0004z5-Qv for linux-arm-kernel@lists.infradead.org; Fri, 07 Mar 2014 20:11:42 +0000 Received: by mail-pb0-f45.google.com with SMTP id uo5so4619843pbc.4 for ; Fri, 07 Mar 2014 12:11:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ltvRq/v8op22rDqt6W7CUm4Xpd+gyGVTEDYfrapdWYQ=; b=kjMP60DT4of4rWAHFdhpEj16F6hOU64Z1vYbsD7nq+4NcKjuUpxf7kDEkoWYgdFE9Q LDI9H7xxh8fy+Z36huSyx/NVo6RtcjPPqE18mSgs+0FI/LrcXU4WWeMIhRXKmO24u4Tt 1LWj+YLPNTKfTI88cdbUGdpM4nS7XD1o2DU8m+yiKd6fe8ujlJkR3IWJmVQWa1eKdOpX FdwSG08qEqC1DmB2nYreSwLmWMsMh0Nr9sPlTp9ZyGMPSW6Yrvb/+4deczjVTK1qrLzz PMi3V+WD9ZAmPHAEgDbseboWZ4VcES7rTjf+EqczkqR0bZkkH8/vM3/5d2RqQwizZ70I xn5Q== X-Gm-Message-State: ALoCoQl+eeB4WbEjNjA1fpkerCOcXbLD9FngVd4RYtR5GWX/RNMmROZFm4aet5/JarRYxXNg3o4L X-Received: by 10.68.245.162 with SMTP id xp2mr24284242pbc.69.1394223069269; Fri, 07 Mar 2014 12:11:09 -0800 (PST) Received: from localhost.localdomain (n182z4l226.static.ctm.net. [182.93.4.226]) by mx.google.com with ESMTPSA id tu3sm12419427pab.1.2014.03.07.12.11.05 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Mar 2014 12:11:08 -0800 (PST) From: David Long To: linux-arm-kernel@lists.infradead.org, Russell King Subject: [PATCH v7 04/15] ARM: move shared uprobe/kprobe definitions into new include file Date: Fri, 7 Mar 2014 15:10:29 -0500 Message-Id: <1394223040-17129-5-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1394223040-17129-1-git-send-email-dave.long@linaro.org> References: <1394223040-17129-1-git-send-email-dave.long@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140307_151140_952936_8E38186D X-CRM114-Status: GOOD ( 11.40 ) X-Spam-Score: -2.6 (--) Cc: "Jon Medhurst \(Tixy\)" , Peter Zijlstra , Srikar Dronamraju , Oleg Nesterov , Anil S Keshavamurthy , linux-kernel@vger.kernel.org, Rabin Vincent , Ingo Molnar , Paul Mackerras , Arnaldo Carvalho de Melo , Masami Hiramatsu , davem@davemloft.net, Ananth N Mavinakayanahalli X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "David A. Long" Separate the kprobe-only definitions from the definitions needed by both kprobes and uprobes. Signed-off-by: David A. Long Acked-by: Jon Medhurst --- arch/arm/include/asm/kprobes.h | 15 +--------- arch/arm/include/asm/{kprobes.h => probes.h} | 44 +++++----------------------- 2 files changed, 8 insertions(+), 51 deletions(-) copy arch/arm/include/asm/{kprobes.h => probes.h} (52%) diff --git a/arch/arm/include/asm/kprobes.h b/arch/arm/include/asm/kprobes.h index fd2e5ca..6e10466 100644 --- a/arch/arm/include/asm/kprobes.h +++ b/arch/arm/include/asm/kprobes.h @@ -28,21 +28,8 @@ #define kretprobe_blacklist_size 0 typedef u32 kprobe_opcode_t; - struct kprobe; -typedef void (kprobe_insn_handler_t)(struct kprobe *, struct pt_regs *); -typedef unsigned long (kprobe_check_cc)(unsigned long); -typedef void (kprobe_insn_singlestep_t)(struct kprobe *, struct pt_regs *); -typedef void (kprobe_insn_fn_t)(void); - -/* Architecture specific copy of original instruction. */ -struct arch_specific_insn { - kprobe_opcode_t *insn; - kprobe_insn_handler_t *insn_handler; - kprobe_check_cc *insn_check_cc; - kprobe_insn_singlestep_t *insn_singlestep; - kprobe_insn_fn_t *insn_fn; -}; +#include struct prev_kprobe { struct kprobe *kp; diff --git a/arch/arm/include/asm/kprobes.h b/arch/arm/include/asm/probes.h similarity index 52% copy from arch/arm/include/asm/kprobes.h copy to arch/arm/include/asm/probes.h index fd2e5ca..90c5f54 100644 --- a/arch/arm/include/asm/kprobes.h +++ b/arch/arm/include/asm/probes.h @@ -1,5 +1,8 @@ /* - * arch/arm/include/asm/kprobes.h + * arch/arm/include/asm/probes.h + * + * Original contents copied from arch/arm/include/asm/kprobes.h + * which contains the following notice... * * Copyright (C) 2006, 2007 Motorola Inc. * @@ -13,23 +16,9 @@ * General Public License for more details. */ -#ifndef _ARM_KPROBES_H -#define _ARM_KPROBES_H - -#include -#include -#include - -#define __ARCH_WANT_KPROBES_INSN_SLOT -#define MAX_INSN_SIZE 2 -#define MAX_STACK_SIZE 64 /* 32 would probably be OK */ +#ifndef _ASM_PROBES_H +#define _ASM_PROBES_H -#define flush_insn_slot(p) do { } while (0) -#define kretprobe_blacklist_size 0 - -typedef u32 kprobe_opcode_t; - -struct kprobe; typedef void (kprobe_insn_handler_t)(struct kprobe *, struct pt_regs *); typedef unsigned long (kprobe_check_cc)(unsigned long); typedef void (kprobe_insn_singlestep_t)(struct kprobe *, struct pt_regs *); @@ -44,23 +33,4 @@ struct arch_specific_insn { kprobe_insn_fn_t *insn_fn; }; -struct prev_kprobe { - struct kprobe *kp; - unsigned int status; -}; - -/* per-cpu kprobe control block */ -struct kprobe_ctlblk { - unsigned int kprobe_status; - struct prev_kprobe prev_kprobe; - struct pt_regs jprobe_saved_regs; - char jprobes_stack[MAX_STACK_SIZE]; -}; - -void arch_remove_kprobe(struct kprobe *); -int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr); -int kprobe_exceptions_notify(struct notifier_block *self, - unsigned long val, void *data); - - -#endif /* _ARM_KPROBES_H */ +#endif