ia32 & perfmon fix (relative to 2.4.4 + 010508 ia64 patch)
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
ia64/kernel/process.c renamed from ia64/kernel/process.c~ +1 -1
@@ -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 ;
ia64/kernel/perfmon.c renamed from lia64/arch/ia64/kernel/perfmon.c +2 -6
@@ -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 ;