From patchwork Tue Oct 15 21:04:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 3048891 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 C8EDA9F2B7 for ; Tue, 15 Oct 2013 21:42:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 04FAB2031C for ; Tue, 15 Oct 2013 21:42:56 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1120D2030E for ; Tue, 15 Oct 2013 21:42:55 +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 1VWBpg-0003gu-Jd; Tue, 15 Oct 2013 21:07:13 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VWBp2-00062v-MS; Tue, 15 Oct 2013 21:06:32 +0000 Received: from mail-qe0-f41.google.com ([209.85.128.41]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VWBnY-0005rW-QO for linux-arm-kernel@lists.infradead.org; Tue, 15 Oct 2013 21:05:05 +0000 Received: by mail-qe0-f41.google.com with SMTP id x7so5589573qeu.14 for ; Tue, 15 Oct 2013 14:04:39 -0700 (PDT) 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=A1gIL7hiX8TzwJuCOkFQPPrPRc1Qfcq8/W03tZ1TIDato7lcP25qV2sN4Ec/wtZVi/ 1F4UwxGHJfXOOTQHl4Qx0x5eX1BSowT2rd6CdZqS45MihhNOOMHcfNLJq3JjPQeZZLRV elcX3wsH7hi03JuPvVmIeLVyl5UJIbo1QfG8/4DDf1f+1dO3l4IEmAOzc/c1BEu/yNml ZC/tYXF9XUtozw3EFPnnkVp6zItwxpNVmm+vnIUMIDRdvCP0ByrGa2gEnikL4bSHzgwc 2UTRePaKC2W1qY9Hro5EqhptyOTaRBRU2v1RjlxFn/XxhtkBogYQ/hv5Nsr+O5eSukqY WqVg== X-Gm-Message-State: ALoCoQnSvj0DAaBd8Vl1MHvNVhAHoggvsJCAAUNxSLHbulAII+cA3nC4QJritIZy24HLrrivbmne X-Received: by 10.49.121.134 with SMTP id lk6mr24414598qeb.29.1381871079790; Tue, 15 Oct 2013 14:04:39 -0700 (PDT) Received: from localhost.localdomain (pool-72-71-243-183.cncdnh.fast00.myfairpoint.net. [72.71.243.183]) by mx.google.com with ESMTPSA id i4sm159645128qan.0.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Oct 2013 14:04:38 -0700 (PDT) From: David Long To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 06/13] ARM: move shared uprobe/kprobe definitions into new include file Date: Tue, 15 Oct 2013 17:04:21 -0400 Message-Id: <1381871068-27660-7-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1381871068-27660-1-git-send-email-dave.long@linaro.org> References: <1381871068-27660-1-git-send-email-dave.long@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131015_170500_952940_98A537F2 X-CRM114-Status: GOOD ( 10.32 ) X-Spam-Score: -2.6 (--) Cc: "Jon Medhurst \(Tixy\)" , Srikar Dronamraju , Oleg Nesterov , linux-kernel@vger.kernel.org, Rabin Vincent , Ingo Molnar 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