linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] Fix performance monitor on machines with logical PVR
Date: Thu, 04 Oct 2007 14:58:15 +1000	[thread overview]
Message-ID: <1191473895.22572.156.camel@pasglop> (raw)
In-Reply-To: <18180.27001.959843.273645@cargo.ozlabs.ibm.com>


> This change works around this problem by taking out the PMU
> information from the cputable entries for the logical PVR values, and
> changing identify_cpu so that the second call to it won't overwrite
> the PMU information that was established by the first call (the one
> with the real PVR), but does update the other fields.

The description could be more precise. Something along the lines of: The
second call wlil not override the PMU information if the entry for the
logical PVR has a num_pmcs value of 0.

That way, we can -still- override them if future processor also
implement PMC backwater^H^H^Hrd compat mode via a different virtual PVR.

(This is what the code does, it's juse the description that is unclear).

Appart from that and pending testing...

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Oh, and another note: I dislike that:

+                       if (t->num_pmcs && !s->num_pmcs) {
+                               t->cpu_name = s->cpu_name;
+                               t->cpu_features = s->cpu_features;
+                               t->cpu_user_features =
s->cpu_user_features;
+                               t->icache_bsize = s->icache_bsize;
+                               t->dcache_bsize = s->dcache_bsize;
+                               t->cpu_setup = s->cpu_setup;
+                               t->cpu_restore = s->cpu_restore;
+                               t->platform = s->platform;
+                       } else
+                               *t = *s;

That means that we'll easily forget to update this bit of code when
we add things to cputable...

Thus, it would be best to put all the PMC related bits into a single
sub-structure, and rather than doing the above, save it, copy
everything, and eventually copy it back over (if it's a pointer it's
even easier).

Ben.

      reply	other threads:[~2007-10-04  4:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-04  4:18 [PATCH] Fix performance monitor on machines with logical PVR Paul Mackerras
2007-10-04  4:58 ` Benjamin Herrenschmidt [this message]

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=1191473895.22572.156.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).