From patchwork Thu Jan 23 20:05:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 23641 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f72.google.com (mail-vb0-f72.google.com [209.85.212.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A8F7820307 for ; Thu, 23 Jan 2014 20:06:07 +0000 (UTC) Received: by mail-vb0-f72.google.com with SMTP id w20sf3772089vbb.11 for ; Thu, 23 Jan 2014 12:06:06 -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=d+Ivq/RvD0dpwqK9ZPcq9UrbSQnIr6PJ3ioBKQHhICs=; b=NPsiWjTDPrx1CrszgLEUhviE9bXKYe5C3zzN/TVerk/dgEy3fYi5AHHYgHD3yvKTjC X0jIi5dWVPP/ZWaBp1Vg6GOgG6RXtq07ckfhogj/hNmmw8KEg3BhNF8hsVWVVUI9qsGj nn3o1V+GBAkf+ihdM9EtJ/nmivpcapNu7pjBRWMeIONDwSKrHyS8id/P0gc+R1v0d1UG cZqop++jRylghVouQUhjpDkyXEjk471RObkUpsNbl3Y9AO2RgH771tJvebaAeDODzAUD RTkqBQ4saAltz0AdfyWoAnrovwu0HKMfAxBRtiynwH9wwuygtAlYeU2wfDyCLhQ0WCP/ MZNA== X-Gm-Message-State: ALoCoQkIQ2wQtRNoPve960O31jRdwWakPpUA1lmsQh/LPdGT9VokCFaFnkXQFmq7xabhiLv0mOII X-Received: by 10.58.23.137 with SMTP id m9mr3813727vef.13.1390507566837; Thu, 23 Jan 2014 12:06:06 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.47.9 with SMTP id l9ls352153qga.13.gmail; Thu, 23 Jan 2014 12:06:06 -0800 (PST) X-Received: by 10.58.4.138 with SMTP id k10mr5456061vek.8.1390507566684; Thu, 23 Jan 2014 12:06:06 -0800 (PST) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id b7si7209820vej.70.2014.01.23.12.06.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Jan 2014 12:06:06 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.174 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.174; Received: by mail-vc0-f174.google.com with SMTP id im17so1340093vcb.5 for ; Thu, 23 Jan 2014 12:06:06 -0800 (PST) X-Received: by 10.58.58.3 with SMTP id m3mr1056343veq.32.1390507566594; Thu, 23 Jan 2014 12:06:06 -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 u4csp51570vcz; Thu, 23 Jan 2014 12:06:06 -0800 (PST) X-Received: by 10.224.114.141 with SMTP id e13mr3659444qaq.65.1390507565971; Thu, 23 Jan 2014 12:06:05 -0800 (PST) Received: from mail-qa0-f53.google.com (mail-qa0-f53.google.com [209.85.216.53]) by mx.google.com with ESMTPS id f10si8530489qar.151.2014.01.23.12.06.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Jan 2014 12:06:05 -0800 (PST) Received-SPF: neutral (google.com: 209.85.216.53 is neither permitted nor denied by best guess record for domain of dave.long@linaro.org) client-ip=209.85.216.53; Received: by mail-qa0-f53.google.com with SMTP id cm18so2813504qab.12 for ; Thu, 23 Jan 2014 12:06:05 -0800 (PST) X-Received: by 10.140.93.111 with SMTP id c102mr13733102qge.53.1390507565768; Thu, 23 Jan 2014 12:06:05 -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 js9sm13677540qeb.9.2014.01.23.12.06.04 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Jan 2014 12:06:05 -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 v5 02/16] ARM: move shared uprobe/kprobe definitions into new include file Date: Thu, 23 Jan 2014 15:05:45 -0500 Message-Id: <1390507559-4697-3-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1390507559-4697-1-git-send-email-dave.long@linaro.org> References: <1390507559-4697-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.174 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 --- 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