All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: "Philip J. Mucci" <phil@sicortex.com>
Cc: eranian@hpl.hp.com, perfmon@napali.hpl.hp.com, linux-mips@linux-mips.org
Subject: Re: [Perfctr-devel] 2.6.19-rc6-git10 new perfmon code base + libpfm + pfmon
Date: Tue, 28 Nov 2006 18:20:49 +0000	[thread overview]
Message-ID: <20061128182049.GA19304@linux-mips.org> (raw)
In-Reply-To: <1164725427.2316.109.camel@localhost.localdomain>

On Tue, Nov 28, 2006 at 03:50:27PM +0100, Philip J. Mucci wrote:

> Linux-MIPS users will need the following patch to add the 'cpu'
> directories to sysfs.

This patch is to some file which doesn't even exist in standard
kernels.  Nor should it be done in the perfmon code if it did exist in
the stock kernel.

> Index: perfmon/perfmon_sysfs.c
> ===================================================================
> --- perfmon/perfmon_sysfs.c	(.../perfmon2-post-sf-pre-fixup)	(revision 27882)
> +++ perfmon/perfmon_sysfs.c	(.../perfmon2-post-sf-post-fixup)	(revision 27882)
> @@ -79,6 +79,10 @@
>  
>  static struct kobject pfm_kernel_kobj, pfm_kernel_fmt_kobj;
>  
> +/* Remove this after mips get topology.c files */

Why should there be one?  I guess you were looking for topology_init
which exists since Febuary 20 / linux-2.6.16-rc5 and does register all
CPUs.

> +struct cpu sysfs_cpus[NR_CPUS];
> +
>  static void pfm_reset_stats(int cpu)
>  {
>  	struct pfm_stats *st;
> @@ -400,6 +404,19 @@
>  	int done_kobj_fmt = 0, done_kobj_kernel = 0;
>  	int i, cpu = -1;
>  	
> +	/* This is a hack to be removed */
> +
> +        for_each_present_cpu(i) {
> +          ret = register_cpu(&sysfs_cpus[i],i,NULL);
> +          if (ret)
> +            {
> +              PFM_INFO("cannot register cpu %d: %d\n",i,ret);
> +              goto error;
> +            }
> +        }
> +
> +	/* End hack */

Formatting style, see Documentation/CodingStyle.

  Ralf

  reply	other threads:[~2006-11-28 18:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-27 14:37 2.6.19-rc6-git10 new perfmon code base + libpfm + pfmon Stephane Eranian
2006-11-27 14:37 ` Stephane Eranian
2006-11-27 19:05 ` [perfmon] " William Cohen
2006-11-28 14:50 ` [Perfctr-devel] " Philip J. Mucci
2006-11-28 18:20   ` Ralf Baechle [this message]
2006-11-28 19:05     ` Philip J. Mucci
2006-11-29 16:04       ` Ralf Baechle

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=20061128182049.GA19304@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=eranian@hpl.hp.com \
    --cc=linux-mips@linux-mips.org \
    --cc=perfmon@napali.hpl.hp.com \
    --cc=phil@sicortex.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.