From patchwork Mon Feb 10 07:38:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 24386 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f199.google.com (mail-qc0-f199.google.com [209.85.216.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B4004202B2 for ; Mon, 10 Feb 2014 07:39:17 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id m20sf13489211qcx.10 for ; Sun, 09 Feb 2014 23:39:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=gDE30XZNnxqod1SCjDOujWA61GcBSlzyV6askJiZYhY=; b=kbnmBGozy5uHFoklZuWwNPy+FZrbGv/gMxjFBwJcKtZ/qmYRycv9kh26tIX5Iryu2Z gyhou+nUy0fWw1fwXxQX/UkkHQWt05scFpWUH7UcC7L0MtyHmCzSSbpGPYWqOjJrqhNm gYTQ15bffU+MGL3lSNFa0a/ufvAUJnRmHo3DW2dlUnKN9iNvHbJlTLImyckY4mxc8gse PxqdSlKHfS+/7VobDz5nhQxo0TKBXUa0qUUhGyzFthye/nyGc5MkcMW/aaMRA3wVMf0J JbT1e/AyehxW4EaBeWRjZPOH3buJ4XxDjFZpfttx/Qob4hELZvq/opy/ggmPn6DWAzfr EV/Q== X-Gm-Message-State: ALoCoQlmYtWD0dn2Ybe+e6hIgcST7XgkpZ6pv0/N8lznoh/QknTjM2WzsI2NYYcIgLo1tQgbVHWx X-Received: by 10.236.134.174 with SMTP id s34mr791596yhi.32.1392017956911; Sun, 09 Feb 2014 23:39:16 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.38.47 with SMTP id s44ls1912003qgs.70.gmail; Sun, 09 Feb 2014 23:39:16 -0800 (PST) X-Received: by 10.220.99.7 with SMTP id s7mr22342911vcn.19.1392017956858; Sun, 09 Feb 2014 23:39:16 -0800 (PST) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id be7si4558111vcb.35.2014.02.09.23.39.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 09 Feb 2014 23:39:16 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id ld13so4581976vcb.32 for ; Sun, 09 Feb 2014 23:39:16 -0800 (PST) X-Received: by 10.221.40.10 with SMTP id to10mr620898vcb.22.1392017956773; Sun, 09 Feb 2014 23:39:16 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp148178vcz; Sun, 9 Feb 2014 23:39:15 -0800 (PST) X-Received: by 10.140.102.204 with SMTP id w70mr41771131qge.110.1392017955157; Sun, 09 Feb 2014 23:39:15 -0800 (PST) Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) by mx.google.com with ESMTPS id c6si9477257qad.169.2014.02.09.23.39.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 09 Feb 2014 23:39:15 -0800 (PST) Received-SPF: neutral (google.com: 209.85.216.47 is neither permitted nor denied by best guess record for domain of dave.long@linaro.org) client-ip=209.85.216.47; Received: by mail-qa0-f47.google.com with SMTP id j5so8868844qaq.6 for ; Sun, 09 Feb 2014 23:39:15 -0800 (PST) X-Received: by 10.140.85.179 with SMTP id n48mr41687120qgd.91.1392017954840; Sun, 09 Feb 2014 23:39:14 -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 k107sm22671621qgk.5.2014.02.09.23.39.12 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 09 Feb 2014 23:39:13 -0800 (PST) From: David Long To: linux-arm-kernel@lists.infradead.org, Russell King Cc: Rabin Vincent , "Jon Medhurst (Tixy)" , Oleg Nesterov , Srikar Dronamraju , Ingo Molnar , Masami Hiramatsu , Ananth N Mavinakayanahalli , Anil S Keshavamurthy , , Peter Zijlstra , Paul Mackerras , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org Subject: [PATCH v6 02/14] ARM: move shared uprobe/kprobe definitions into new include file Date: Mon, 10 Feb 2014 02:38:53 -0500 Message-Id: <1392017945-4507-3-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1392017945-4507-1-git-send-email-dave.long@linaro.org> References: <1392017945-4507-1-git-send-email-dave.long@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: dave.long@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 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/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 f82ec22..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