From: Greg Banks <gnb@melbourne.sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: OProfile List <oprofile-list@lists.sourceforge.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH 6/11] oprofile: update arm for api changes
Date: Tue, 09 Nov 2004 21:39:45 +1100 [thread overview]
Message-ID: <1099996785.1985.791.camel@hole.melbourne.sgi.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 95 bytes --]
--
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.
[-- Attachment #2: oprofile-callgraph-arm --]
[-- Type: text/plain, Size: 3172 bytes --]
oprofile arm arch updates, including some internal
API changes.
Signed-off-by: John Levon <levon@movementarian.org>
Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
---
arch/arm/oprofile/common.c | 21 ++++++++-------------
arch/arm/oprofile/init.c | 7 ++-----
arch/arm/oprofile/op_model_xscale.c | 5 ++---
3 files changed, 12 insertions(+), 21 deletions(-)
Index: linux/arch/arm/oprofile/init.c
===================================================================
--- linux.orig/arch/arm/oprofile/init.c 2004-10-19 07:53:45.%N +1000
+++ linux/arch/arm/oprofile/init.c 2004-11-06 01:20:07.%N +1100
@@ -12,14 +12,11 @@
#include <linux/errno.h>
#include "op_arm_model.h"
-int __init oprofile_arch_init(struct oprofile_operations **ops)
+void __init oprofile_arch_init(struct oprofile_operations *ops)
{
- int ret = -ENODEV;
-
#ifdef CONFIG_CPU_XSCALE
- ret = pmu_init(ops, &op_xscale_spec);
+ pmu_init(ops, &op_xscale_spec);
#endif
- return ret;
}
void oprofile_arch_exit(void)
Index: linux/arch/arm/oprofile/op_model_xscale.c
===================================================================
--- linux.orig/arch/arm/oprofile/op_model_xscale.c 2004-10-19 07:54:31.%N +1000
+++ linux/arch/arm/oprofile/op_model_xscale.c 2004-11-06 01:20:07.%N +1100
@@ -343,8 +343,7 @@ static void inline __xsc2_check_ctrs(voi
static irqreturn_t xscale_pmu_interrupt(int irq, void *arg, struct pt_regs *regs)
{
- unsigned long pc = profile_pc(regs);
- int i, is_kernel = !user_mode(regs);
+ int i;
u32 pmnc;
if (pmu->id == PMU_XSC1)
@@ -357,7 +356,7 @@ static irqreturn_t xscale_pmu_interrupt(
continue;
write_counter(i, -(u32)results[i].reset_counter);
- oprofile_add_sample(pc, is_kernel, i, smp_processor_id());
+ oprofile_add_sample(regs, i);
results[i].ovf--;
}
Index: linux/arch/arm/oprofile/common.c
===================================================================
--- linux.orig/arch/arm/oprofile/common.c 2004-10-19 07:55:07.%N +1000
+++ linux/arch/arm/oprofile/common.c 2004-11-06 01:20:07.%N +1100
@@ -24,14 +24,6 @@ static int pmu_setup(void);
static void pmu_stop(void);
static int pmu_create_files(struct super_block *, struct dentry *);
-static struct oprofile_operations pmu_ops = {
- .create_files = pmu_create_files,
- .setup = pmu_setup,
- .shutdown = pmu_stop,
- .start = pmu_start,
- .stop = pmu_stop,
-};
-
#ifdef CONFIG_PM
static struct sys_device device_oprofile = {
.id = 0,
@@ -113,19 +105,22 @@ static void pmu_stop(void)
up(&pmu_sem);
}
-int __init pmu_init(struct oprofile_operations **ops, struct op_arm_model_spec *spec)
+void __init pmu_init(struct oprofile_operations *ops, struct op_arm_model_spec *spec)
{
init_MUTEX(&pmu_sem);
if (spec->init() < 0)
- return -ENODEV;
+ return;
pmu_model = spec;
init_driverfs();
- *ops = &pmu_ops;
- pmu_ops.cpu_type = pmu_model->name;
+ ops->create_files = pmu_create_files;
+ ops->setup = pmu_setup;
+ ops->shutdown = pmu_stop;
+ ops->start = pmu_start;
+ ops->stop = pmu_stop;
+ ops->cpu_type = pmu_model->name;
printk(KERN_INFO "oprofile: using %s PMU\n", spec->name);
- return 0;
}
void pmu_exit(void)
reply other threads:[~2004-11-09 10:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1099996785.1985.791.camel@hole.melbourne.sgi.com \
--to=gnb@melbourne.sgi.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oprofile-list@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®