From: David Mosberger <davidm@hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] ia32 & perfmon fix (relative to 2.4.4 + 010508 ia64 patch)
Date: Thu, 17 May 2001 14:58:21 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590693005602@msgid-missing> (raw)
The patch below fixes a silly typo in the ia32 support and a buglet in
the PMU support. I also noticed that "strace -f" is currently broken
for ia64 processes. I tracked it down to the coredump related changes
in ptrace(), but don't have a complete fix yet.
--david
--- arch/ia64/kernel/process.c~ Wed May 16 18:27:32 2001
+++ arch/ia64/kernel/process.c Wed May 16 23:18:57 2001
@@ -285,7 +285,7 @@
* state from the current task to the new task
*/
if (IS_IA32_PROCESS(ia64_task_regs(current)))
- ia32_save_state(&p->thread);
+ ia32_save_state(p);
#endif
#ifdef CONFIG_PERFMON
p->thread.pfm_pend_notify = 0;
--- ../lia64/arch/ia64/kernel/perfmon.c Sun Apr 29 17:09:23 2001
+++ arch/ia64/kernel/perfmon.c Wed May 16 18:13:26 2001
@@ -787,26 +787,22 @@
/* XXX: ctx locking may be required here */
for (i = 0; i < count; i++, req++) {
- int k;
-
if (copy_from_user(&tmp, req, sizeof(tmp))) return -EFAULT;
if (!PMD_IS_IMPL(tmp.pfr_reg.reg_num)) return -EINVAL;
- k = tmp.pfr_reg.reg_num - PMU_FIRST_COUNTER;
-
if (PMD_IS_COUNTER(tmp.pfr_reg.reg_num)) {
if (ta = current){
val = ia64_get_pmd(tmp.pfr_reg.reg_num);
} else {
- val = th->pmd[k];
+ val = th->pmd[tmp.pfr_reg.reg_num];
}
val &= pmu_conf.perf_ovfl_val;
/*
* lower part of .val may not be zero, so we must be an addition because of
* residual count (see update_counters).
*/
- val += ctx->ctx_pmds[k].val;
+ val += ctx->ctx_pmds[tmp.pfr_reg.reg_num - PMU_FIRST_COUNTER].val;
} else {
/* for now */
if (ta != current) return -EINVAL;
reply other threads:[~2001-05-17 14:58 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=marc-linux-ia64-105590693005602@msgid-missing \
--to=davidm@hpl.hp.com \
--cc=linux-ia64@vger.kernel.org \
/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