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: 25900 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 929D0203C3 for ; Fri, 7 Mar 2014 20:11:11 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id wo20sf17233808obc.2 for ; Fri, 07 Mar 2014 12:11:11 -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=ltvRq/v8op22rDqt6W7CUm4Xpd+gyGVTEDYfrapdWYQ=; b=kVbh5wJUbe9FmGAnHNpeOSSu6s7BYsXqy/cZdDKD9NbXKg3dzBMKXLb1HSkcD7/YMq vNHldkHmJZ8+bV9G5Ut/1ChZRZ7IsKQneWkmerDqKRgcU8ft3rG/O5DkOUOscdFu5pzC mKxG8p11yaE+cHZ10kMU1gc3J7cRMpLu/NC1tFeiBgTQpOiOBRpSCx/WW+w4vJyAvTOY TRCLHUzTN7tP1Ak9gmbJH9WRZ2NyYIBmV+6MeJ63NQJWs+Dz/Y3tp3Ml2gFgFX+mfJYq gvKIC8bTQROumMO8uLorcKrxomSI2pTC6RPrFXooq6CgfiOatwQXw7uGiMB/hlJL3+rO oT1g== X-Gm-Message-State: ALoCoQnUeBOEbpSV8YMaRnQP2K0gFpmysWI9rfUNugVfc6AiU93FOap1cwt/b0q9vY8KUfFkXqqt X-Received: by 10.182.19.231 with SMTP id i7mr7745099obe.25.1394223071142; Fri, 07 Mar 2014 12:11:11 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.92.65 with SMTP id a59ls1363449qge.72.gmail; Fri, 07 Mar 2014 12:11:11 -0800 (PST) X-Received: by 10.58.132.203 with SMTP id ow11mr11948753veb.1.1394223071007; Fri, 07 Mar 2014 12:11:11 -0800 (PST) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id kl10si3122293vdb.77.2014.03.07.12.11.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Mar 2014 12:11:11 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.172 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.172; Received: by mail-vc0-f172.google.com with SMTP id la4so1252756vcb.31 for ; Fri, 07 Mar 2014 12:11:10 -0800 (PST) X-Received: by 10.52.110.196 with SMTP id ic4mr13431981vdb.27.1394223070915; Fri, 07 Mar 2014 12:11:10 -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.78.9 with SMTP id i9csp139725vck; Fri, 7 Mar 2014 12:11:10 -0800 (PST) X-Received: by 10.66.163.138 with SMTP id yi10mr24001773pab.95.1394223069675; Fri, 07 Mar 2014 12:11:09 -0800 (PST) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by mx.google.com with ESMTPS id u5si9389378pbi.88.2014.03.07.12.11.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 07 Mar 2014 12:11:09 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.50 is neither permitted nor denied by best guess record for domain of dave.long@linaro.org) client-ip=209.85.220.50; Received: by mail-pa0-f50.google.com with SMTP id kq14so4639695pab.9 for ; Fri, 07 Mar 2014 12:11:09 -0800 (PST) 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 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 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-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.172 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 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