From patchwork Mon Dec 16 04:08:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 3351481 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 12BF3C0D4A for ; Mon, 16 Dec 2013 04:10:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 40BFB20377 for ; Mon, 16 Dec 2013 04:10:36 +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 490E820364 for ; Mon, 16 Dec 2013 04:10:35 +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 1VsPVG-0007vm-91; Mon, 16 Dec 2013 04:09:58 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VsPV5-0007a6-Oy; Mon, 16 Dec 2013 04:09:47 +0000 Received: from mail-qc0-f173.google.com ([209.85.216.173]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VsPUf-0007UT-1H for linux-arm-kernel@lists.infradead.org; Mon, 16 Dec 2013 04:09:22 +0000 Received: by mail-qc0-f173.google.com with SMTP id m20so3243991qcx.4 for ; Sun, 15 Dec 2013 20:08:58 -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=BAy/5llTlmq6HDRGp/1ap4iqytQ/Vncuh83+96SYX/s=; b=GXUXjAr75hcPYB6S8V299fDugrriGz6QlmzFVUncassDunsCY2IPcz1lFA/tZgRD7M 8D5R60I1A+9KA5/c8nNH87xqcY3eiIU7sUBIJXqQquD84pFQAB26KmafU/bwbuoZRbSx uyLZ2Q9jehBEr8blTmYknZaipEHjSfi9DOggbLTvUplHQ8sOTC2alioc48YyjhiBCUXH m2Sw2WZquQqdXw8A105VKfytO48gBG4dZ2sZEu5YbGLDzR6YrYi6FUjpWo2n/FSGkb5x djD8u/eM7Ws1w5pgFTLH9jxlr8rEJZ/u75H6q4TYiFGvDq0zbF1oca0FLFiZebF1nmHG ORbQ== X-Gm-Message-State: ALoCoQlNJ7pX0e6svtiA8QdSRRk6zam2NKu3dQOs1ee6gmEzymkCFv5XHDEIX2hWemK/PawiYzH5 X-Received: by 10.49.109.200 with SMTP id hu8mr28903361qeb.72.1387166938404; Sun, 15 Dec 2013 20:08:58 -0800 (PST) Received: from localhost.localdomain (pool-72-71-243-183.cncdnh.fast00.myfairpoint.net. [72.71.243.183]) by mx.google.com with ESMTPSA id hb2sm36013890qeb.6.2013.12.15.20.08.56 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 15 Dec 2013 20:08:57 -0800 (PST) From: David Long To: linux-arm-kernel@lists.infradead.org, Russell King Subject: [PATCH v4 02/16] ARM: move shared uprobe/kprobe definitions into new include file Date: Sun, 15 Dec 2013 23:08:36 -0500 Message-Id: <1387166930-13182-3-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1387166930-13182-1-git-send-email-dave.long@linaro.org> References: <1387166930-13182-1-git-send-email-dave.long@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131215_230921_180602_8ED90411 X-CRM114-Status: GOOD ( 10.46 ) 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.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 --- arch/arm/include/asm/kprobes.h | 15 +-------------- arch/arm/include/asm/probes.h | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 arch/arm/include/asm/probes.h diff --git a/arch/arm/include/asm/kprobes.h b/arch/arm/include/asm/kprobes.h index f82ec22..30fc11b 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/probes.h b/arch/arm/include/asm/probes.h new file mode 100644 index 0000000..21da148 --- /dev/null +++ b/arch/arm/include/asm/probes.h @@ -0,0 +1,18 @@ +#ifndef _ASM_PROBES_H +#define _ASM_PROBES_H + +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; +}; + +#endif