linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jan.glauber@caviumnetworks.com (Jan Glauber)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8 1/3] perf: cavium: Support memory controller PMU counters
Date: Wed, 26 Jul 2017 17:13:14 +0200	[thread overview]
Message-ID: <20170726151314.GA10696@hc> (raw)
In-Reply-To: <20170726145522.GC28875@nazgul.tnic>

On Wed, Jul 26, 2017 at 04:55:22PM +0200, Borislav Petkov wrote:
> On Wed, Jul 26, 2017 at 03:35:25PM +0100, Suzuki K Poulose wrote:
> > So the Cavium EDACs, which appear as PCI devices have a PMU attached to it.
> 
> Cavium EDACs?
> 
> So let me set something straight first: An EDAC driver simply talks to
> some RAS IP block and reports errors. It shouldn't have anything to do
> with a PMU.
> 
> > In order to build this PMU driver as a module, we need a way to load the module
> > automatically based on the PCI id. However, since the EDAC driver already
> > registers with that PCI id, we cannot use the same for the PMU. Ideally,
> 
> So this is strange. There's a single PCI ID but multiple functionalities
> behind it?

Yes, but I would still not call a memory controller a RAS IP block.
There are a number of registers on the memory controller (or on the OCX
TLK interconnect), and while some of them are RAS related there are also
other registers in the same device like the counters we want to access
via PMU code.

> > the PMU driver should be loaded when the EDAC driver is loaded. But looking
> > at the links above, it looks like you don't like the idea of triggering a
> > probe of the PMU component from the EDAC driver. We may be able to get rid
> > of the PMU specific information from the EDAC driver by maintaining the PCI
> > id of the device in the PMU driver. But we may still need to make sure that
> > the PMU driver gets a chance to probe the PMU when the device is available.
> > 
> > What do you think is the best option here ?
> 
> Can either of the two - EDAC or PMU driver - use an alternate detection
> method?

I'm currently using pci_get_device(vendor-ID, device-ID, ...) which
works fine.

> For example, we moved the main x86 EDAC drivers we moved to x86 CPU
> family, model, stepping detection from PCI IDs because the PCI IDs were
> clumsy to use.

I'm also looking for CPU implementor (MIDR), I could check for the model
too but I still need to detect devices based on PCI IDs as the model
check is not sufficient here (only multi-socket ThunderX has OCX TLK
devices).

--Jan

> -- 
> Regards/Gruss,
>     Boris.
> 
> ECO tip #101: Trim your mails when you reply.
> --

  reply	other threads:[~2017-07-26 15:13 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 15:04 [PATCH v8 0/3] Cavium ARM64 uncore PMU support Jan Glauber
2017-07-25 15:04 ` [PATCH v8 1/3] perf: cavium: Support memory controller PMU counters Jan Glauber
2017-07-25 15:39   ` Suzuki K Poulose
2017-07-26 11:19     ` Jan Glauber
2017-07-26 12:47       ` Suzuki K Poulose
2017-07-26 13:10         ` Jan Glauber
2017-07-26 14:35           ` Suzuki K Poulose
2017-07-26 14:55             ` Borislav Petkov
2017-07-26 15:13               ` Jan Glauber [this message]
2017-07-26 15:17                 ` Suzuki K Poulose
2017-07-26 15:28                   ` Borislav Petkov
2017-07-26 15:46                   ` Jan Glauber
2017-07-26 16:25                     ` Jonathan Cameron
2017-07-26 16:40                       ` Jan Glauber
2017-07-26 15:35                 ` Borislav Petkov
2017-07-26 15:45                   ` Jan Glauber
2017-07-26 15:55                     ` Borislav Petkov
2017-07-26 16:19                       ` Greg KH
2017-07-26 16:30                         ` Borislav Petkov
2017-07-26 17:33                           ` Greg KH
2017-07-26 20:02                             ` David Daney
2017-07-26 20:08                               ` Greg KH
2017-07-26 21:02                                 ` David Daney
2017-07-27  2:29                                   ` Greg KH
2017-07-27 17:29                                     ` David Daney
2017-07-28  1:11                                       ` Greg KH
2017-07-28  7:23                                         ` Borislav Petkov
2017-07-27  5:11                                   ` Borislav Petkov
2017-07-27  9:08                                     ` Jan Glauber
2017-07-27 13:15                                       ` Borislav Petkov
2017-07-28 23:12                                         ` Greg KH
2017-08-08 13:25                                           ` Will Deacon
2017-08-15  9:13                                             ` Jan Glauber
2017-08-07  9:37                                       ` Suzuki K Poulose
2017-07-25 15:56   ` Jonathan Cameron
2017-07-25 15:04 ` [PATCH v8 2/3] perf: cavium: Support transmit-link " Jan Glauber
2017-07-25 15:04 ` [PATCH v8 3/3] perf: cavium: Add Documentation Jan Glauber

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=20170726151314.GA10696@hc \
    --to=jan.glauber@caviumnetworks.com \
    --cc=linux-arm-kernel@lists.infradead.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).