linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: Kevin 'ldir' Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Cc: "paul.burton@mips.com" <paul.burton@mips.com>,
	"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
	"jonas.gorski@gmail.com" <jonas.gorski@gmail.com>
Subject: Re: [PATCH] MIPS: Add CPU option reporting to /proc/cpuinfo
Date: Thu, 3 Jan 2019 22:49:47 +0100	[thread overview]
Message-ID: <57008009-6432-7c83-b15b-aa9a9ae567c3@hauke-m.de> (raw)
In-Reply-To: <5B483FB8-8081-45E9-A082-FCA7F77EE06F@darbyshire-bryant.me.uk>

On 12/27/18 2:08 PM, Kevin 'ldir' Darbyshire-Bryant wrote:
> 
> 
>> On 27 Dec 2018, at 12:39, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>>
>>>
>> Hi Kevin,
>>
>> I do not see any condition based on CONFIG_MIPS_PERF_SHARED_TC_COUNTERS in arch/mips/include/asm/cpu-features.h, which kernel version did you use to test this patch? cpu_has_mipsmt_pertccounters was introduced between kernel 4.14 and 4.19, so it is not available in older kernel versions.
>>
>> Hauke
> 
> 
> This is 4.14.90 on openwrt…and I don’t think there are any sneaky backports involved in this area.
> 
> Take a look around line 131 of arch/mips/kernel/perf_event_mipsxx.c

Hi Kevin,

I assume you are talking about this:
https://elixir.bootlin.com/linux/v4.19.13/source/arch/mips/kernel/perf_event_mipsxx.c#L131

I still do not get why this is a problem.

If code wants to check if a feature is supported it includes 
"asm/cpu-features.h", this file then includes "cpu-feature-overrides.h".
For cpu-feature-overrides.h either the generic and empty version is 
provided or the SoC code has its own version with some SoC specific 
settings.

The asm/cpu-features.h file checks if the SoC code provided a special 
settings and if not it will add the code which will detect this feature 
dynamically, see here:
https://elixir.bootlin.com/linux/v4.19.13/source/arch/mips/include/asm/cpu-features.h#L577

This code should provide some settings independently of any Kconfig 
setting, for some Kconfig settings it is known that it is not active.

Hauke

  reply	other threads:[~2019-01-03 21:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-23 22:52 [PATCH] MIPS: Add CPU option reporting to /proc/cpuinfo Hauke Mehrtens
2018-12-24  9:03 ` Kevin 'ldir' Darbyshire-Bryant
2018-12-24 13:42   ` Hauke Mehrtens
2018-12-24 14:43     ` Kevin 'ldir' Darbyshire-Bryant
2018-12-25 21:35       ` Kevin 'ldir' Darbyshire-Bryant
2018-12-27 12:39         ` Hauke Mehrtens
2018-12-27 13:08           ` Kevin 'ldir' Darbyshire-Bryant
2019-01-03 21:49             ` Hauke Mehrtens [this message]
2019-01-03 23:13               ` Kevin 'ldir' Darbyshire-Bryant

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=57008009-6432-7c83-b15b-aa9a9ae567c3@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=jonas.gorski@gmail.com \
    --cc=ldir@darbyshire-bryant.me.uk \
    --cc=linux-mips@vger.kernel.org \
    --cc=paul.burton@mips.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 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).