public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: mingo@kernel.org, acme@redhat.com, linux-kernel@vger.kernel.org,
	alexander.shishkin@linux.intel.com, jolsa@redhat.com,
	eranian@google.com, namhyung@kernel.org, ak@linux.intel.com
Subject: Re: [PATCH 1/5] perf/x86/intel/uncore: Parse uncore discovery tables
Date: Tue, 16 Mar 2021 08:42:25 -0400	[thread overview]
Message-ID: <f6231c10-60b1-34ec-fb7e-103a6cd2dbcf@linux.intel.com> (raw)
In-Reply-To: <YFCZyqz+56bB8n2k@hirez.programming.kicks-ass.net>



On 3/16/2021 7:43 AM, Peter Zijlstra wrote:
> On Fri, Mar 12, 2021 at 08:34:34AM -0800, kan.liang@linux.intel.com wrote:
>> From: Kan Liang <kan.liang@linux.intel.com>
>>
>> A self-describing mechanism for the uncore PerfMon hardware has been
>> introduced with the latest Intel platforms. By reading through an MMIO
>> page worth of information, perf can 'discover' all the standard uncore
>> PerfMon registers in a machine.
>>
>> The discovery mechanism relies on BIOS's support. With a proper BIOS,
>> a PCI device with the unique capability ID 0x23 can be found on each
>> die. Perf can retrieve the information of all available uncore PerfMons
>> from the device via MMIO. The information is composed of one global
>> discovery table and several unit discovery tables.
> 
>> If a BIOS doesn't support the 'discovery' mechanism, there is nothing
>> changed.
> 
> What if the BIOS got it wrong? Will the driver still get it correct if
> it is a known platform?

Yes, I will submit a platform specific patch to fix this case.

> 
> Do we need a chicken flag to kill the discovery? uncore_no_discover?
> 

Yes, I plan to introduce a .use_discovery_tables flag to indicate 
whether to use the discovery tables for the known platform.

The below codes is part of the upcoming SPR uncore patches.
The first SPR uncore patch will still rely on the BIOS discovery tables, 
because some uncore block information hasn't been published yet. We have 
to retrieve the information fro the tables. Once all the information is 
published, we can kill the discovery by removing the 
".use_discovery_tables = true".

+static const struct intel_uncore_init_fun spr_uncore_init __initconst = {
+       .cpu_init = spr_uncore_cpu_init,
+       .pci_init = spr_uncore_pci_init,
+       .mmio_init = spr_uncore_mmio_init,
+       .use_discovery_tables = true,
+};

Thanks,
Kan

  reply	other threads:[~2021-03-16 12:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12 16:34 [PATCH 0/5] Uncore PMON discovery mechanism support kan.liang
2021-03-12 16:34 ` [PATCH 1/5] perf/x86/intel/uncore: Parse uncore discovery tables kan.liang
2021-03-16 11:40   ` Peter Zijlstra
2021-03-16 12:29     ` Liang, Kan
2021-03-16 11:43   ` Peter Zijlstra
2021-03-16 12:42     ` Liang, Kan [this message]
2021-03-16 14:05       ` Peter Zijlstra
2021-03-16 14:53         ` Liang, Kan
2021-03-12 16:34 ` [PATCH 2/5] perf/x86/intel/uncore: Generic support for the MSR type of uncore blocks kan.liang
2021-03-12 16:34 ` [PATCH 3/5] perf/x86/intel/uncore: Rename uncore_notifier to uncore_pci_sub_notifier kan.liang
2021-03-12 16:34 ` [PATCH 4/5] perf/x86/intel/uncore: Generic support for the PCI type of uncore blocks kan.liang
2021-03-12 16:34 ` [PATCH 5/5] perf/x86/intel/uncore: Generic support for the MMIO " kan.liang

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=f6231c10-60b1-34ec-fb7e-103a6cd2dbcf@linux.intel.com \
    --to=kan.liang@linux.intel.com \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@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