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, 27 Dec 2018 13:39:09 +0100	[thread overview]
Message-ID: <23a09eea-2836-a07d-4a10-c87f170a94fb@hauke-m.de> (raw)
In-Reply-To: <FA3C385D-0FE2-4462-A7CA-89D984BBB234@darbyshire-bryant.me.uk>

On 12/25/18 10:35 PM, Kevin 'ldir' Darbyshire-Bryant wrote:
> 
> 
>> On 24 Dec 2018, at 14:43, Kevin 'ldir' Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> wrote:
>>
>>
>>
>>> On 24 Dec 2018, at 13:42, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>>>
>> <snip>
>>> Hi Kevin,
>>>
>>> Normally you should not deactivate any features in cpu-feature-overrides.h which are supported by the CPU, when you do not define any thing the kernel will use auto detection.
>>>
>>> I think we should use the cpu_has_foo features as these are the features which could be used by user space applications, if it is only accidentally deactivated by the kernel, which should not happen, it could be that this feature is not fully set up by the kernel and will not work.
>>>
>>> Hauke
>>
>> Fair enough.
> 
> Tried your patch and discovered you need to wrap the cpu_has_mipsmt_pertccounters:
> 
> +#ifdef CONFIG_MIPS_PERF_SHARED_TC_COUNTERS
> +      if (cpu_has_mipsmt_pertccounters)
> +              seq_printf(m, "%s", " mipsmt_pertccounters");
> +#endif
> 
> otherwise when building for archer c7 v2 (74kc) in openwrt this happens:
> 
> arch/mips/kernel/proc.c: In function 'show_cpuinfo':
> arch/mips/kernel/proc.c:245:6: error: 'cpu_has_mipsmt_pertccounters' undeclared (first use in this function); did you mean 'can_use_mips_counter'?
>    if (cpu_has_mipsmt_pertccounters)
>        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>        can_use_mips_counter
> 
> 
> Cheers,
> 
> Kevin D-B
> 
> 012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A
> 
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

  reply	other threads:[~2018-12-27 12:39 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 [this message]
2018-12-27 13:08           ` Kevin 'ldir' Darbyshire-Bryant
2019-01-03 21:49             ` Hauke Mehrtens
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=23a09eea-2836-a07d-4a10-c87f170a94fb@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).